/gi,"\n"),t=t.replace(/<\/div>/gi,""),t=t.replace(/
/gi,"\n"),t=t.replace(/<\/p>/gi,""),t=t.replace(/\n{3,}/g,"\n\n"),t=t.replace(/<\/?[^>]+(>|$)/g,""),t=t.split("\n").map(((e="")=>e.trim())).join("\n"),t=t.replace(/[ ]+/g," "),t=t.trim(),t},Us=(e="")=>{let t=Es(e).replace(/\n/g,"
");return t.replace(/
$/g,"")},Fs=e=>{e.preventDefault();let t="";const i=!(!e.clipboardData||"object"!==typeof e.clipboardData||"function"!==typeof e.clipboardData.getData);i&&(t=e.clipboardData.getData("text/plain"));const a=document.createElement("textarea");a.innerHTML=t,t=a.innerText,t=Es(t),"function"===typeof document.execCommand&&document.execCommand("insertText",!1,t)},Is=(e,t=0)=>{let i=t;const a=window.getSelection();if(a?.rangeCount>0){const t=a.getRangeAt(0),o=t.cloneRange();o.selectNodeContents(e),o.setEnd(t.endContainer,t.endOffset);const r=o.toString().length;!isNaN(r)&&r>0&&(i=r)}return i},zs=(e,t)=>{for(var i of e.childNodes)if(3===i.nodeType){if(i.length>=t){var a=document.createRange(),o=window.getSelection();return a.setStart(i,t),a.collapse(!0),o.removeAllRanges(),o.addRange(a),-1}t-=i.length}else if(t=zs(i,t),-1===t)return-1;return t},Ps=e=>{let t=typeof e;switch(t){case"string":{let t=parseInt(e,10);return isNaN(t)?"true"===e:Boolean(t)}case"number":return Boolean(e);case"boolean":return e;default:return!!e}};var Vs={name:"AppointmentEditStatusDialog",components:{Loading:ge},props:["appointment","triggerElement"],emits:["close","cancelAppointment"],data(){return{editable:!0,errorMessages:[],selectedValue:null,loading:!1,isOpen:!1}},mounted(){!this.selectedValue&&this.availableOptions.length&&(this.selectedValue=this.availableOptions[0])},computed:{currentStatus(){return this.appointment.status},currentStatusMeta(){return this.appointment.meta?.status??""},availableOptions(){let e=[];switch(this.currentStatus){case"booked":e=this.isInFuture(this.appointment)?["canceled"]:["no_show"];break;case"canceled":e=["booked"];break;case"pending_payment":e=["booked","abandoned"];break;case"pending_form":e=["abandoned"];break;case"abandoned":e=["booked"];break;default:e=["booked","canceled","abandoned"]}return e},shouldCheckAppointmentAvailability(){return["canceled","abandoned"].includes(this.currentStatus)},shouldCheckStaffAvailability(){return!!this.shouldCheckAppointmentAvailability&&!wa().isEmpty(this.appointment.staff_ids)},warningMessage(){return"pending_payment"===this.currentStatus&&this.translations.appointments.bypassPaymentWarning},descriptiveText(){let e;switch(this.selectedValue){case"booked":e=this.optionsDescriptiveTexts.booked;break;case"no_show":e=this.optionsDescriptiveTexts.noShow;break;case"canceled":e=this.optionsDescriptiveTexts.canceled;break;case"abandoned":e=this.optionsDescriptiveTexts.abandoned;break;default:e=null}return e},optionsDescriptiveTexts(){return{booked:this.translations.appointments.changeToBooked,canceled:this.translations.appointments.changeToCanceled,abandoned:this.translations.appointments.changeToAbandoned,noShow:this.translations.appointments.changeToNoShow}},descriptiveTextId(){return this.warningMessage?"descTextId":null},...(0,m.rn)("translations",["translations"]),...(0,m.Se)("staff",["getStaffNamesFromIds"]),...(0,m.Se)("appointments",["isInFuture"])},methods:{openDialog(){this.errorMessages=[],this.shouldCheckStaffAvailability&&(this.loading=!0,this.checkStaffAvailability({id:this.appointment.id,staffIds:this.appointment.staff_ids}).then((e=>{e&&e.availability&&(this.isStaffAvailable(e.availability)||(this.editable=!1,this.displayAvailabilityError(e.availability))),this.loading=!1}))),this.shouldCheckAppointmentAvailability&&(this.loading=!0,this.checkAppointmentAvailability(this.appointment.id).then((e=>{"unavailable"===e.data.result&&(this.editable=!1,this.errorMessages.push(e.data.message)),this.loading=!1}))),this.$nextTick((()=>{this.$refs["changeStatus"].open()}))},closeDialog(){this.$refs["changeStatus"].close(),this.$emit("close")},confirmStatusChange(){if(this.selectedValue){if("canceled"===this.selectedValue)return this.$emit("cancelAppointment"),void this.closeDialog();this.shouldCheckAppointmentAvailability?this.checkAppointmentAvailability(this.appointment.id).then((e=>{"unavailable"===e.data.result?(this.editable=!1,this.errorMessages.push(e.data.message)):this.saveNewStatus()})):this.saveNewStatus(),this.closeDialog()}},saveNewStatus(){if(this.selectedValue&&this.selectedValue!==this.currentStatus&&"no_show"!==this.currentStatusMeta&&this.editable){var e=this.appointment.id,t={status:"updating"};if(this.setAppointmentData({id:e,appt:t}),"no_show"!==this.selectedValue){var i={id:e,status:this.selectedValue};this.saveAppointment(i).then((()=>{})).catch((e=>{console.log(e)}))}if("no_show"===this.selectedValue){var a={status:"no_show"};this.saveAppointmentMeta({id:e,meta:a}).then((()=>{this.setAppointmentData({id:e,appt:{status:this.appointment.status}})})).catch((e=>{console.log(e)}))}}},isStaffAvailable(e){if(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!1===e[t])return!1;return!0}},displayAvailabilityError(e){if(wa().isEmpty(e))return;const t=Object.keys(e).filter((t=>!Ps(e[t])));if(wa().isEmpty(t))return;let i=this.getStaffNamesFromIds(t);if(wa().isEmpty(i))return;let a=this.translations.errors.staffUnavailable+": "+i;this.errorMessages.push(a)},onDialogClose(){this.isOpen=!1,this.triggerElement&&this.triggerElement.focus()},onDialogOpen(){this.isOpen=!0,setTimeout((()=>{this.$refs.dialogTitle.focus()}),100)},...(0,m.nv)("appointments",["saveAppointment","saveAppointmentMeta","checkAppointmentAvailability","checkStaffAvailability"]),...(0,m.OI)("appointments",["setAppointmentData"])}};const Ws=(0,he.Z)(Vs,[["render",Gs],["__scopeId","data-v-6c90c354"]]);var Rs=Ws;const Ls={key:0,style:{"min-height":"150px"}},js={key:1,class:"staff-items-wrapper"},qs={key:0},Ns={key:1},$s=["label"],Hs=["value"],Zs={key:0},Ys={key:1},Ks={key:2};function Js(e,t,i,a,l,s){const n=(0,o.up)("foxy-dialog-title"),d=(0,o.up)("loading"),p=(0,o.up)("foxy-notification"),f=(0,o.up)("foxy-select2"),u=(0,o.up)("foxy-switch"),c=(0,o.up)("foxy-dialog-content"),h=(0,o.up)("foxy-dialog-button"),m=(0,o.up)("foxy-dialog-footer"),g=(0,o.up)("foxy-dialog");return i.appointment?((0,o.wg)(),(0,o.j4)(g,{key:0,ref:"editStaffDialog","onMdcdialog:opening":s.onDialogOpen,"onMdcdialog:closed":s.onDialogClose},{default:(0,o.w5)((()=>[(0,o.Wm)(n,null,{default:(0,o.w5)((()=>[(0,o._)("div",{tabindex:"-1",ref:"dialogTitle"},(0,r.zw)(e.translations.appointments.editStaffDialog.editForAppointment),513)])),_:1}),(0,o.Wm)(c,{class:"popup-content"},{default:(0,o.w5)((()=>[l.loading?((0,o.wg)(),(0,o.iD)("div",Ls,[(0,o.Wm)(d,{size:"title",message:e.translations.appointments.editStaffDialog.checkingAvailability},null,8,["message"])])):((0,o.wg)(),(0,o.iD)("div",js,[s.isNoneSelected?((0,o.wg)(),(0,o.iD)("div",qs,[(0,o.Wm)(p,{icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.editStaffDialog.noMembersAssigned),1)])),_:1})])):(0,o.kq)("",!0),s.displayUnavailableWarning?((0,o.wg)(),(0,o.iD)("div",Ns,[(0,o.Wm)(p,{icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.editStaffDialog.selectUnavailableWarning),1)])),_:1})])):(0,o.kq)("",!0),l.displaySelect&&!l.loading?((0,o.wg)(),(0,o.j4)(f,{key:2,style:{width:"100%"},label:e.translations.appointments.editStaffDialog.assignTeamMember,theme:s.theme,multiple:!0,name:"staffSelect",id:"staffSelect",modelValue:l.staffSelected,"onUpdate:modelValue":t[0]||(t[0]=e=>l.staffSelected=e)},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.optionGroups,((t,i)=>((0,o.wg)(),(0,o.iD)("optgroup",{label:t.label,key:t.label+i},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.options,(t=>((0,o.wg)(),(0,o.iD)("option",{value:t.value,key:t.value},[(0,o.Uk)((0,r.zw)(t.label)+" ",1),t.belongsToAnotherType?((0,o.wg)(),(0,o.iD)("span",Zs," ("+(0,r.zw)(e.translations.appointments.editStaffDialog.notAssignedWithThisType)+") ",1)):(0,o.kq)("",!0),t.inactive?((0,o.wg)(),(0,o.iD)("span",Ys," ("+(0,r.zw)(e.translations.appointments.editStaffDialog.inactive)+") ",1)):(0,o.kq)("",!0),t.unavailable?((0,o.wg)(),(0,o.iD)("span",Ks," ("+(0,r.zw)(e.translations.appointments.editStaffDialog.unavailable)+") ",1)):(0,o.kq)("",!0)],8,Hs)))),128))],8,$s)))),128))])),_:1},8,["label","theme","modelValue"])):(0,o.kq)("",!0),(0,o._)("div",null,[(0,o.Wm)(u,{modelValue:l.displayAll,"onUpdate:modelValue":t[1]||(t[1]=e=>l.displayAll=e),id:"displayAllSwitch",theme:s.theme,name:"displayAll"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.editStaffDialog.displayAll),1)])),_:1},8,["modelValue","theme"])])]))])),_:1}),(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,{mode:"secondary",action:"dismiss",onClick:s.closeDialog},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(h,{mode:"raised",theme:s.theme,action:"accept",onClick:s.confirmChanges},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.saveChanges),1)])),_:1},8,["theme","onClick"])])),_:1})])),_:1},8,["onMdcdialog:opening","onMdcdialog:closed"])):(0,o.kq)("",!0)}var Xs={name:"AppointmentEditStaffDialog",components:{Loading:ge},props:["appointment","triggerElement"],data(){return{staffAvailability:{},loading:!1,displayAll:!1,hasCheckedForCurrentApptType:!1,staffSelected:[],isAllChecked:!1,displaySelect:!1,isOpen:!1}},mounted(){this.staffSelected=[...this.currentlyAssignedIds]},watch:{displayAll(){this.isAllChecked||this.checkOthersAvailability()}},computed:{optionGroups(){const e=[];if(this.currentlyAssignedIds.length){const t={label:this.translations.appointments.editStaffDialog.currentlyAssigned,options:[]};this.currentlyAssignedIds.forEach((e=>{const i=this.staff.find((t=>t.id===e));let a=!this.currentAppointmentTypeStaffIds.includes(e),o="draft"===i.status||"delete"===i.status;t.options.push({value:i.id,label:i.display_name,belongsToAnotherType:a,inactive:o})})),e.push(t)}if(this.staffIdsToCheckOnload.length){const t={label:this.translations.appointments.editStaffDialog.currentAppointmentType,options:[]};this.staffIdsToCheckOnload.forEach((e=>{const i=this.staff.find((t=>t.id===e));let a=this.isUnavailable(e);t.options.push({value:i.id,label:i.display_name,unavailable:a})})),e.push(t)}if(this.displayAll&&this.isAllChecked){const t={label:this.translations.appointments.editStaffDialog.otherAppointmentTypes,options:[]};this.otherStaff.forEach((e=>{let i=this.isUnavailable(e.id);t.options.push({value:e.id,label:e.display_name,unavailable:i})})),e.push(t)}return e},currentlyAssignedIds(){return[...this.appointment.staff_ids].map((e=>e.toString()))},theme(){return this.appointment?.type_label},displayUnavailableWarning(){return this.staffSelected.some((e=>!1===this.staffAvailability[e]&&!this.currentlyAssignedIds.includes(e)))},appointmentType(){return this.getAppointmentTypeById(this.appointment.appointment_type_id)},currentAppointmentTypeStaffIds(){const e=this.appointmentType;return[...e.staff_ids].map((e=>e.toString()))},staffIdsToCheckOnload(){return wa().difference(this.currentAppointmentTypeStaffIds,this.currentlyAssignedIds)},staffIdsToRenderOnload(){const e=this.currentlyAssignedIds,t=this.currentAppointmentTypeStaffIds,i=[...e,...t];return[...new Set(i)]},otherStaff(){return this.staffStatusPublish.filter((e=>!this.staffIdsToRenderOnload.includes(e.id)))},otherStaffIds(){return this.otherStaff.map((e=>e.id))},isNoneSelected(){return wa().isEmpty(this.staffSelected)},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointments",["appointments"]),...(0,m.rn)("staff",["staff"]),...(0,m.Se)("appointment_types",["getAppointmentTypeById"]),...(0,m.Se)("staff",["staffStatusPublish"])},methods:{openDialog(){this.isOpen=!0,this.displaySelect=!0,this.staffSelected=[...this.currentlyAssignedIds],!this.hasCheckedForCurrentApptType&&this.staffIdsToCheckOnload.length&&(this.fetchStaffAvailability(this.staffIdsToCheckOnload).then((e=>{this.staffAvailability=e||{}})),this.hasCheckedForCurrentApptType=!0),this.$nextTick((()=>{this.$refs["editStaffDialog"].open()}))},async fetchStaffAvailability(e){if(e.length){this.loading=!0;try{let t=await this.checkStaffAvailability({id:this.appointment.id,staffIds:e});return this.loading=!1,t?.availability}catch(t){console.error(t)}}},closeDialog(){this.isOpen=!1,this.displaySelect=!1,this.$refs["editStaffDialog"].close()},isUnavailable(e){return!this.isCurrentlyAssigned(e)&&(!wa().isEmpty(this.staffAvailability)&&this.staffAvailability instanceof Object&&Object.prototype.hasOwnProperty.call(this.staffAvailability,e)?!this.staffAvailability[e]:void 0)},isCurrentlyAssigned(e){return this.currentlyAssignedIds.includes(e)},confirmChanges(){wa().isEqual(this.currentlyAssignedIds,this.staffSelected)||this.saveNewStaff(this.appointment).then((()=>{this.maybeUpdateGroupAppointments()})),this.closeDialog()},async saveNewStaff(e){if(!e)return;let t=e.id,i={staff_ids:this.staffSelected};this.setAppointmentData({id:t,appt:i});var a={id:t,staff_ids:this.staffSelected};try{await this.saveAppointment(a)}catch(o){console.log(o)}},checkOthersAvailability(){this.isAllChecked||this.fetchStaffAvailability(this.otherStaffIds).then((e=>{e&&(this.staffAvailability=Object.assign({},this.staffAvailability,e),this.isAllChecked=!0)}))},maybeUpdateGroupAppointments(){this.appointment.group_id&&"0"!==this.appointment.group_id.toString()&&this.fetchAppointments({group_id:this.appointment.group_id})},onDialogClose(){this.isOpen=!1,this.displaySelect=!1,this.triggerElement&&this.triggerElement.focus()},onDialogOpen(){setTimeout((()=>{this.$refs.dialogTitle.focus()}),150)},...(0,m.nv)("appointments",["saveAppointment","checkStaffAvailability","fetchAppointments"]),...(0,m.OI)("appointments",["setAppointmentData"])}};const Qs=(0,he.Z)(Xs,[["render",Js],["__scopeId","data-v-12084f5c"]]);var en=Qs;const tn={key:0},an={class:"timeline-header"},on={key:1};function rn(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("revisions-filter"),p=(0,o.up)("revision-row");return(0,o.wg)(),(0,o.iD)("div",null,[l.loadingHistory?((0,o.wg)(),(0,o.j4)(n,{key:0,message:s.getMessage()},null,8,["message"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[l.historyData?.length?((0,o.wg)(),(0,o.iD)("div",tn,[(0,o._)("div",an,[(0,o._)("h3",null,(0,r.zw)(s.getTitle()),1),(0,o._)("div",null,[(0,o.Wm)(d,(0,o.dG)({takenActions:s.takenActions,theme:i.theme},{modelValue:s.selectedActions,"onUpdate:modelValue":t[0]||(t[0]=e=>s.selectedActions=e)}),null,16,["modelValue"])])]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.filteredHistory,(e=>((0,o.wg)(),(0,o.j4)(p,{key:e.id,revision:e,theme:i.theme},null,8,["revision","theme"])))),128))])):((0,o.wg)(),(0,o.iD)("div",on,[(0,o._)("p",null,(0,r.zw)(e.translations.errors.cantFetchingHistory),1)]))],64))])}const ln=e=>((0,o.dD)("data-v-05e7b467"),e=e(),(0,o.Cn)(),e),sn={class:"timeline-item"},nn={class:"timeline-item-date"},dn=ln((()=>(0,o._)("div",{class:"timeline-item-line"},null,-1))),pn={class:"timeline-item-icon"},fn={class:"timeline-item-title"},un={class:"timeline-item-subtitle text-break"};function cn(e,t,i,a,l,s){const n=(0,o.up)("foxy-icon");return(0,o.wg)(),(0,o.iD)("div",sn,[(0,o._)("div",nn,(0,r.zw)(l.moment.utc(i.revision.date_created).tz(e.settings.global.timezone_string).format(e.settings.global.date_format_moment+" "+e.settings.global.time_format_moment+" z")),1),dn,(0,o._)("div",pn,[(0,o.Wm)(n,{theme:"success"===i.revision.result?"green":"deep-orange",icon:s.icon},null,8,["theme","icon"])]),(0,o._)("div",{class:(0,r.C_)(["timeline-item-content chat-bubble",[`md-theme-${i.theme}`]])},[(0,o._)("div",fn,(0,r.zw)(i.revision.action_title),1),(0,o._)("div",un,(0,r.zw)(s.displaySummary),1)],2)])}var hn={name:"RevisionRow",props:{revision:{type:Object,required:!0},theme:{type:String,required:!0}},data(){return{moment:fe()}},computed:{icon(){switch(this.revision.action){case"first_booked":case"booked":return"check_circle";case"rescheduled":return"event_repeat";case"canceled":return"cancel";case"sync_appointment_to_calendar":return"autorenew";case"edited":return"edit";case"abandoned":return"disabled_by_default";case"pending_payment":return"pending";case"pending_form":return"pending";case"notification_scheduled":case"notification_with_duration":case"reminder":return"schedule_send";case"notification_sent":case"reminder_sent":return"send";case"notification_not_sent":case"notification_canceled":return"cancel_schedule_send";case"assigned":case"reassigned":return"group";case"publish":return"add_circle_outline";case"delete":return"delete";case"title_changed":case"max_excution_time_changed":case"buffer_before_changed":case"buffer_after_changed":case"max_event_count_changed":case"min_booking_notice_changed":case"capacity_changed":case"capacity_type_changed":case"timezone_style_changed":case"duration_changed":case"label_id_changed":case"slug_changed":case"instructions_changed":case"availability_increment_changed":case"availability_type_changed":case"availability_changed":case"web_meetings_changed":case"booking_flow_settings_changed":case"customer_information_changed":case"staff_changed":case"staff_ids_changed":case"staff_capacity_changed":case"has_max_capacity_changed":return"edit";case"status_changed":return"replay";case"no_show":return"event_busy";case"no_show_reverted":return"event_available";case"opt_out_notification":return"unsubscribe";default:return"info"}},displaySummary(){return this.revision.action_summary_populated.replace(/<[^>]+>/g,"").replace(/"/g,'"').replace(/&/g,"&")},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","timestampFormat"])}};const mn=(0,he.Z)(hn,[["render",cn],["__scopeId","data-v-05e7b467"]]);var gn=mn;const _n=e=>((0,o.dD)("data-v-6ee74534"),e=e(),(0,o.Cn)(),e),yn={class:"filterWrapper"},wn={key:0,class:"popupContainer"},xn=_n((()=>(0,o._)("div",{class:"popupOverlay"},null,-1))),Cn={class:"popupContent",id:"popup-content"};function vn(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-checkbox-multi");return(0,o.wg)(),(0,o.iD)("div",yn,[(0,o._)("div",null,[(0,o.Wm)(n,{indicator:s.filterApplied,icon:"filter_list",onClick:s.toggleFilters},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.filter.filter),1)])),_:1},8,["indicator","onClick"])]),l.isMenuOpen?((0,o.wg)(),(0,o.iD)("div",wn,[xn,(0,o._)("div",Cn,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.sortedActions,((e,i)=>((0,o.wg)(),(0,o.iD)("div",{class:"check-item",key:i},[((0,o.wg)(),(0,o.j4)(d,{key:i,id:"revision-action-"+i,name:"revision-actions",value:e,modelValue:s.selectedActions,"onUpdate:modelValue":t[0]||(t[0]=e=>s.selectedActions=e)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.displayAction(e)),1)])),_:2},1032,["id","value","modelValue"]))])))),128))])])):(0,o.kq)("",!0)])}var bn={name:"AppointmentRevisionsFilter",components:{},props:{theme:{type:String,required:!0},takenActions:{type:Array,required:!0},modelValue:{required:!0}},emits:["update:modelValue"],data(){return{isMenuOpen:!1,parentElement:null,inputElements:null}},mounted(){document.addEventListener("click",this.OverlayClickHandler),document.addEventListener("keydown",this.keyDownHandler)},beforeUnmount(){document.removeEventListener("click",this.OverlayClickHandler),document.removeEventListener("keydown",this.keyDownHandler)},computed:{selectedActions:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},filterApplied(){return!!this.modelValue?.length},checkboxes(){return this.getCheckboxes()},firstCheckboxElement(){return this.checkboxes.length?this.checkboxes[0]:null},lastCheckboxElement(){return this.checkboxes.length?this.checkboxes[this.checkboxes.length-1]:null},sortedActions(){const e=this.takenActions.map((e=>({action:e,translation:this.translations.revisions.actions[e]})));return e.sort(((e,t)=>e.translation?.localeCompare(t.translation))),e.map((e=>e.action)).filter((e=>""!==e.action))},...(0,m.rn)("translations",["translations"])},methods:{toggleFilters(){this.parentElement=null,this.inputElements=null,this.isMenuOpen=!this.isMenuOpen},displayAction(e){return this.translations.revisions.actions[e]?this.translations.revisions.actions[e]:e},OverlayClickHandler(e){this.isMenuOpen&&e.target.matches(".popupOverlay")&&this.toggleFilters()},keyDownHandler(e){if(!this.isMenuOpen)return;if("Escape"===e.key)return void this.toggleFilters();const t=this.firstCheckboxElement,i=this.lastCheckboxElement,a=document.activeElement;if("Tab"===e.key){const o=a===t,r=a===i;e.shiftKey?o&&(e.preventDefault(),i.focus()):r&&(e.preventDefault(),t.focus())}},getCheckboxes(){if(!this.isMenuOpen)return[];const e=this.parentElement||(this.parentElement=document.querySelector("#popup-content")),t=this.inputElements||(this.inputElements=e?.querySelectorAll('input[type="checkbox"]'));return t||[]}}};const Bn=(0,he.Z)(bn,[["render",vn],["__scopeId","data-v-6ee74534"]]);var Sn=Bn,kn={name:"RevisionsList",components:{RevisionRow:gn,RevisionsFilter:Sn,Loading:ge},props:{type:{type:String,required:!0},id:{type:String,required:!0},theme:{type:String,required:!0}},data(){return{loadingHistory:!1,filterBy:[],historyData:null}},mounted(){this.fetchHistory()},computed:{filteredHistory(){return wa().isEmpty(this.filterBy)?this.historyData:this.historyData.filter((e=>this.filterBy.includes(e.action)))},takenActions(){const e=new Set;return this.historyData.forEach((t=>{t.action&&e.add(t.action)})),Array.from(e)},selectedActions:{get(){return this.filterBy},set(e){this.filterBy=e}},...(0,m.rn)("translations",["translations"])},methods:{getArgs(){switch(this.type){case"appointment_type":return{appointment_type_id:this.id};case"appointment":return{appointment_id:this.id};default:return{}}},getTitle(){switch(this.type){case"appointment_type":return this.translations.appointmentTypes.appointmentTypeHistory;case"appointment":return this.translations.appointments.appointmentHistory;default:return{}}},getMessage(){switch(this.type){case"appointment_type":return this.translations.appointmentTypes.loadingHistory;case"appointment":return this.translations.appointments.loadingHistory;default:return{}}},fetchHistory(){this.loadingHistory=!0;let e=this.getArgs();this.fetchAppointmentHistory(e).then((e=>{this.historyData=e,this.loadingHistory=!1}))},...(0,m.nv)("appointments",["fetchAppointmentHistory"])}};const An=(0,he.Z)(kn,[["render",rn],["__scopeId","data-v-15b6fb5f"]]);var Mn=An,Dn={name:"AppointmentDetails",components:{Loading:ge,AppointmentPaymentItem:us,AppointmentMeta:vs,AppointmentCancelDialog:Tr,Revisions:Mn,AppointmentAbandonDialog:Vr,AppointmentEditStaffDialog:en,AppointmentEditStatusDialog:Rs},props:{id:{type:[Number,String],required:!0}},data(){return{appointment:null,editEmbedSrc:"",error:!1,errorDescription:"",errorLabel:"",fetchedStaff:!1,fetchedResources:!1,fetchedResourceGroups:!1,loading:!0,loadingMessage:"",loadingMeta:!1,loadingPayments:!1,moment:fe(),expiresIn:"",expirationDate:"",countDownInterval:null,displayStatusDialog:!1,triggerElement:null,openDotMenu:!1,section:"",sectionId:""}},watch:{appointmentsList:{handler(e){this.appointment=e.find((e=>e.id===this.id)),this.appointment&&(this.appointment=this.prepAppointment(this.appointment))},deep:!0,immediate:!0},id(e,t){e!==t&&this.displayAppointment()}},beforeUnmount(){clearInterval(this.countDownInterval)},mounted(){this.loadingMessage=this.translations.appointments.loadingSingle,this.displayAppointment();let e=[K.appointment_details];this.paymentsModule.installed&&this.paymentsModule.enabled&&e.push(K.appointment_details_payments_enabled),this.getGuides({"ssasc-plugin-screen":e}),this.appointment&&this.appointment.status.match(/pending.*/)&&(this.countDown(),this.countDownInterval=setInterval(this.countDown,6e4))},computed:{appointmentsList(){return this.appointments},appointmentName(){return this.appointment.customer_information.name?this.appointment.customer_information.name:this.appointment.customer_information.Name},isBasic(){return!this.settings.installed.license},availableCustomerInformation(){let e={};return this.appointment?(Object.keys(this.appointment.customer_information).forEach((t=>{this.appointment.customer_information[t]?.length&&(e[t]=this.appointment.customer_information[t])})),e):e},basicCustomerInformation(){let e={};return this.appointment&&this.isBasic?(Object.keys(this.availableCustomerInformation).forEach((t=>{"name"!==t&&(e[t]=this.appointment.customer_information[t])})),e):e},paidCustomerInformation(){if(!this.appointment||this.isBasic)return[];let e={};return Object.keys(this.availableCustomerInformation).forEach((t=>{"Name"!==t&&(e[t]=this.appointment.customer_information[t])})),e},icons(){let e={},t=this.appointmentTypes.filter((e=>e.id===this.appointment.appointment_type_id))[0];return t&&t.custom_customer_information.forEach((t=>{e[t.field]=t.icon})),e},cancelable(){if(!this.appointment)return;let e=!0;return"canceled"!==this.appointment.status&&"abandoned"!==this.appointment.status||(e=!1),this.isInFuture(this.appointment)||(e=!1),e},statusEditable(){return!!this.appointment&&("0"===this.appointment.rescheduled_to_appointment_id&&(!!this.currentUserCan("ssa_manage_appointments")&&(!(!this.isInFuture(this.appointment)&&"booked"!==this.appointment.status)&&"no_show"!==this.appointment.meta?.status)))},dateFormat(){return this.settings.global.date_format_moment},timeFormat(){return this.settings.global.time_format_moment},dateTimeFormat(){return this.dateFormat+" "+this.timeFormat+" z"},rescheduledFromStartDates(){return!!this.appointment?.meta?.rescheduled_from_start_dates?.length&&this.appointment.meta.rescheduled_from_start_dates.map((e=>fe().utc(e).tz(this.settings.global.timezone_string).format(this.dateTimeFormat))).reverse()},rescheduledToAppointment(){if(this.appointment&&"0"!==this.appointment.rescheduled_to_appointment_id)return this.appointments.find((e=>e.id===this.appointment.rescheduled_to_appointment_id))},rescheduledFromAppointment(){if(this.appointment&&"0"!==this.appointment.rescheduled_from_appointment_id)return this.appointments.find((e=>e.id===this.appointment.rescheduled_from_appointment_id))},rescheduledToDatetime(){if(this.rescheduledToAppointment)return fe().utc(this.rescheduledToAppointment.start_date).tz(this.settings.global.timezone_string).format(this.dateTimeFormat)},rescheduledFromDatetime(){if(this.rescheduledFromAppointment)return fe().utc(this.rescheduledFromAppointment.start_date).tz(this.settings.global.timezone_string).format(this.dateTimeFormat)},allowSms(){return Ps(this.appointment.allow_sms)},isPhoneAppointment(){return this.phoneAppointmentTypes.find((e=>e.id===this.appointment.appointment_type_id))},isSmsEnabled(){return Ps(this.sms.enabled)},appointmentStatusGuideUrl(){const e="https://simplyscheduleappointments.com/guides/booking-status-overview/",t={utm_source:"plugin",utm_medium:"guides",utm_campaign:"support-help",utm_term:"pending-payment",utm_content:"booking-status-overview"};return`${e}?${Wt().stringify(t)}`},displayEditstaff(){return!!this.isStaffRequired&&(!!this.isInFuture(this.appointment)&&(!["canceled","abandoned"].includes(this.appointment.status)&&this.currentUserCan("ssa_manage_staff")))},currentAppointmentType(){return this.getAppointmentTypeById(this.appointment.appointment_type_id)},displayHistory(){return!!this.settings.developer?.display_appointment_revisions&&null!==this.appointment},isReservedStatus(){return D.includes(this.appointment?.status)},isStaffRequired(){return this.staffModule?.enabled&&""!==this.currentAppointmentType.staff.required},displayResources(){let e=[];return Object.values(this.appointment.selected_resources).forEach((t=>{let i=this.getResourceGroupInformation(t.resource_group_id),a=this.getResourceTitle(t.resource_id);e.push({resourceGroup:i,resourceTitle:a,resourceType:i.resource_type})})),e},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings","timestampFormat"]),...(0,m.rn)("appointment_types",["appointmentTypes"]),...(0,m.rn)("appointments",["appointments"]),...(0,m.rn)("staff",["staff"]),...(0,m.rn)("resources",["resources","resourceGroups"]),...(0,m.Se)(["displayDuration"]),...(0,m.Se)("staff",["appointmentStaffNames","staffModule","currentUserCan"]),...(0,m.Se)("appointments",["prepAppointment","wpUserGravatar","wpUserLink","wpUserName","isAddressDisplayed","isInFuture"]),...(0,m.Se)("payments",["paymentsModule"]),...(0,m.Se)("notifications",["phoneAppointmentTypes","sms"]),...(0,m.Se)("appointment_types",["getAppointmentTypeById"]),...(0,m.Se)("resources",["resourcesModule"])},methods:{cancelDelete(){this.$refs["confirmDelete"].close()},confirmCancel(){this.$refs.cancelDialog.openDialog()},openChangeStatusDialog(e){this.triggerElement=e.target,this.displayStatusDialog=!0,this.$nextTick((()=>{this.$refs.changeStatusDialog.openDialog()}))},editStaff(e){this.triggerElement=e.target,this.$refs.editStaffDialog?.openDialog()},confirmAbandon(){this.$refs.abandonDialog.openDialog()},confirmDelete(){this.$refs["confirmDelete"].open()},editAppointment(){this.editEmbedSrc=this.appointment.public_edit_url+"&redirect_from=ssa_admin",this.$refs.editDialog.open()},deleteAppt(){this.loadingMessage=this.translations.appointments.deletingSingle,this.loading=!0,this.$refs["confirmDelete"].close(),this.deleteAppointment(this.appointment).then((()=>{this.$router.push("/ssa/appointments")})).catch((e=>{console.log(e)}))},displayAppointment(){return this.loading=!0,this.appointment=this.appointments.find((e=>e.id===this.id)),this.appointment?(this.appointment=this.prepAppointment(this.appointment),this.loading=!1,this.error=!1,this.maybeFetchPayments(),this.maybeFetchMeta(),void this.maybeFetchRescheduledAppointments()):!this.staffModule.enabled||this.staff||this.fetchedStaff?!this.resourcesModule.enabled||this.resourceGroups||this.fetchedResourceGroups?!this.resourcesModule.enabled||this.resources||this.fetchedResources?void this.fetchAppointment(this.id).then((()=>{this.loading=!1,this.appointment=this.appointments.find((e=>e.id===this.id)),this.appointment?(this.appointment=this.prepAppointment(this.appointment),this.maybeFetchPayments(),this.maybeFetchMeta(),this.maybeFetchRescheduledAppointments(),this.appointment.status.match(/pending.*/)&&(this.countDown(),this.countDownInterval=setInterval(this.countDown,6e4))):(this.error=!0,this.errorLabel=this.translations.appointments.errorNotFound,this.errorDescription=this.translations.appointments.errorNotFoundDescription)})).catch((e=>{console.log(e),this.error=!0,this.errorLabel=this.translations.appointments.errorLoading,this.errorDescription=this.translations.appointments.errorLoadingDescription})):(this.loading=!0,void this.fetchResources().then((()=>{this.displayAppointment(),this.fetchedResource=!0})).catch((e=>{console.log(e),this.error=!0,this.errorLabel=this.translations.appointments.errorLoading,this.errorDescription=this.translations.appointments.errorLoadingDescription}))):(this.loading=!0,void this.fetchResourceGroups().then((()=>{this.displayAppointment(),this.fetchedResourceGroups=!0})).catch((e=>{console.log(e),this.error=!0,this.errorLabel=this.translations.appointments.errorLoading,this.errorDescription=this.translations.appointments.errorLoadingDescription}))):(this.loading=!0,void this.fetchStaff().then((()=>{this.displayAppointment(),this.fetchedStaff=!0})).catch((e=>{console.log(e),this.error=!0,this.errorLabel=this.translations.appointments.errorLoading,this.errorDescription=this.translations.appointments.errorLoadingDescription})))},maybeFetchPayments(){this.paymentsModule.installed&&(Object.prototype.hasOwnProperty.call(this.appointment,"payments")||(this.loadingPayments=!0,this.fetchPayments(this.appointment.id).then((()=>{this.loadingPayments=!1}))))},maybeFetchMeta(){Object.prototype.hasOwnProperty.call(this.appointment,"meta")||(this.loadingMeta=!0,this.fetchAppointmentMeta(this.appointment).then((()=>{this.loadingMeta=!1})))},refreshAppointment(){this.loading=!0,this.fetchAppointment(this.id).then((()=>{this.loading=!1,this.appointment=this.appointments.find((e=>e.id===this.id)),this.appointment?(this.appointment=this.prepAppointment(this.appointment),this.maybeFetchPayments(),this.maybeFetchMeta(),this.maybeFetchRescheduledAppointments()):(this.error=!0,this.errorLabel=this.translations.appointments.errorNotFound,this.errorDescription=this.translations.appointments.errorNotFoundDescription)})).catch((e=>{console.log(e),this.error=!0,this.errorLabel=this.translations.appointments.errorLoading,this.errorDescription=this.translations.appointments.errorLoadingDescription}))},maybeFetchRescheduledAppointments(){this.appointment&&("0"===this.appointment.rescheduled_to_appointment_id||this.rescheduledToAppointment||this.fetchAppointment(this.appointment.rescheduled_to_appointment_id),"0"===this.appointment.rescheduled_from_appointment_id||this.rescheduledFromAppointment||this.fetchAppointment(this.appointment.rescheduled_from_appointment_id))},countDown(){this.expirationDate=fe().utc(this.appointment.expiration_date),fe().duration(this.expirationDate.diff(fe().utc()))<=0?(this.expiresIn=-1,clearInterval(this.countDownInterval)):this.expiresIn=fe().duration(this.expirationDate.diff(fe().utc())).humanize(!0)},getResourceGroupInformation(e){let t=this.resourceGroups.find((t=>t.id==e));return{title:t.title,resource_type:t.resource_type}},getResourceTitle(e){if(0!=e){let t=this.resources.find((t=>t.id==e));return t.title}},updateSection(e,t){e?(this.section=e,this.sectionId=t):(this.section=null,this.sectionId=null)},cancelRemoveNoShowStatus(){this.$refs.removeNoShowStatusDialog.close()},confirmRemoveNoShowStatus(e){e?.target&&"BUTTON"===e.target.tagName&&e.target.classList.add("button-visible"),this.$refs.removeNoShowStatusDialog.open()},removeNoShowStatus(){this.loading=!0,this.$refs.removeNoShowStatusDialog.close(),this.saveAppointmentMeta({id:this.appointment.id,meta:{status:"no-show-reverted"}}).then((()=>{this.loading=!1})).catch((e=>{console.log(e),this.loading=!1}))},onRemoveNoShowStatusDialogClose(){const e=this.$refs.removeNoShowStatusButton;e&&e.classList?.contains("button-visible")&&e.classList.remove("button-visible")},...(0,m.nv)("appointments",["deleteAppointment","fetchAppointment","fetchAppointmentMeta","saveAppointment","saveAppointmentMeta"]),...(0,m.nv)("payments",["fetchPayments"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.nv)("staff",["fetchStaff"]),...(0,m.nv)("resources",["fetchResources","fetchResourceGroups"])}};const Tn=(0,he.Z)(Dn,[["render",Zl],["__scopeId","data-v-9ad3d1c4"]]);var On=Tn;const Gn=e=>((0,o.dD)("data-v-45bb3578"),e=e(),(0,o.Cn)(),e),En={class:"appointment group"},Un={class:"md-title",style:{flex:"1"}},Fn=Gn((()=>(0,o._)("span",{class:"screen-reader-text"},"Appointment options",-1))),In={class:"single-group-appointment"},zn={class:"md-title"},Pn={key:2,class:"status canceled"},Vn={class:"md-subheading"},Wn={class:"foxy-list-default appointment-group-list-items"},Rn={class:"foxy-list-text-container"},Ln={class:"name-and-status"},jn={key:0,class:"no-show"},qn=["onClick"],Nn=["onClick"],$n={class:"md-list-text-container"},Hn=["innerHTML"],Zn={key:1},Yn={key:0};function Kn(e,t,i,a,l,s){const n=(0,o.up)("foxy-empty"),d=(0,o.up)("loading"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-icon"),u=(0,o.up)("foxy-icon-button"),c=(0,o.up)("foxy-list-item"),h=(0,o.up)("foxy-menu"),m=(0,o.up)("foxy-menu-anchor"),g=(0,o.up)("foxy-toolbar"),_=(0,o.up)("appointment-edit-staff-dialog"),y=(0,o.up)("router-link"),w=(0,o.up)("foxy-dialog-title"),x=(0,o.up)("foxy-list"),C=(0,o.up)("foxy-dialog-content"),v=(0,o.up)("foxy-dialog-button"),b=(0,o.up)("foxy-dialog-footer"),B=(0,o.up)("foxy-dialog"),S=(0,o.up)("foxy-notification");return(0,o.wg)(),(0,o.iD)("div",En,[l.error?((0,o.wg)(),(0,o.j4)(n,{key:0,icon:e.api.admin_static_url+"/images/foxes/fox-sleeping.svg",label:l.errorLabel,description:l.errorDescription},null,8,["icon","label","description"])):l.loading?((0,o.wg)(),(0,o.j4)(d,{key:1,message:l.loadingMessage},null,8,["message"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o.Wm)(p,{tag:"md-button",to:"/ssa/appointments",icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.viewAll),1)])),_:1}),(0,o.Wm)(g,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("h2",Un,(0,r.zw)(e.translations.appointments.group.appointmentDetails),1),(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{onClick:t[0]||(t[0]=e=>l.openMenu=!0)},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{icon:"more_vert"}),Fn])),_:1}),(0,o.Wm)(h,{modelValue:l.openMenu,"onUpdate:modelValue":t[1]||(t[1]=e=>l.openMenu=e)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{onClick:s.exportToCsv},{default:(0,o.w5)((()=>[(0,o.Uk)(" Export ")])),_:1},8,["onClick"]),s.isCancelable?((0,o.wg)(),(0,o.j4)(c,{key:0,onClick:s.confirmGroupCancel},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0),(0,o.Wm)(c,{onClick:s.confirmGroupDelete},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.delete),1)])),_:1},8,["onClick"])])),_:1},8,["modelValue"])])),_:1})])),_:1}),(0,o._)("div",In,[(0,o._)("h3",zn,[(0,o.Uk)((0,r.zw)(s.appointmentTypeMeta.type_title)+" ",1),e.appointmentStaffNames(s.groupAppointments)?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.appointment.with)+" "+(0,r.zw)(e.appointmentStaffNames(s.groupAppointments)),1)],64)):(0,o.kq)("",!0),s.displayEditStaff?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o._)("button",{class:"link edit-staff-link",onClick:t[2]||(t[2]=(...e)=>s.editStaff&&s.editStaff(...e))},(0,r.zw)(e.translations.appointments.editStaffDialog.editTeam),1),(0,o.Wm)(_,(0,o.dG)({appointment:s.appointmentTypeMeta,triggerElement:l.triggerElement},{ref:"editStaffDialog"}),null,16)],64)):(0,o.kq)("",!0),"canceled"===e.groupAppointmentStatus(s.groupAppointments)?((0,o.wg)(),(0,o.iD)("span",Pn," ("+(0,r.zw)(e.translations.appointments.statuses["canceled"])+") ",1)):(0,o.kq)("",!0)]),(0,o._)("p",Vn,(0,r.zw)(l.moment(s.appointmentTypeMeta.start_date,e.timestampFormat).format(e.settings.global.date_format_moment+" "+e.settings.global.time_format_moment))+" "+(0,r.zw)(l.moment.utc(s.appointmentTypeMeta.start_date).tz(e.settings.global.timezone_string).format("z"))+" ("+(0,r.zw)(e.displayDuration(s.appointmentTypeMeta.duration))+") ",1),(0,o._)("ul",Wn,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.groupAppointments,((t,i)=>((0,o.wg)(),(0,o.iD)("li",{key:i,class:(0,r.C_)(["foxy-list-container","status-"+t.status])},[(0,o.Wm)(f,{class:"md-size-2x",icon:"person",theme:s.appointmentTypeMeta.type_label},null,8,["theme"]),(0,o._)("div",Rn,[(0,o._)("span",Ln,[(0,o._)("span",null,(0,r.zw)(t.customer_information.Name),1),"no_show"===t.meta?.status?((0,o.wg)(),(0,o.iD)("span",jn,[(0,o.Wm)(f,{icon:"event_busy",theme:"grey"})])):(0,o.kq)("",!0)]),(0,o._)("span",null,(0,r.zw)(t.customer_information.Email),1),(0,o._)("p",null,[(0,o.Wm)(y,{class:"link",to:"/ssa/appointment/"+t.id},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.viewDetails),1)])),_:2},1032,["to"]),e.isInFutureUtc(t)&&"canceled"!==t.status?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)(" | "),(0,o._)("button",{class:"link",onClick:e=>s.confirmCancel(t.id)},(0,r.zw)(e.translations.appointments.cancel),9,qn)],64)):(0,o.kq)("",!0),s.canMarkAsNoShow(t)?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)(" | "),(0,o._)("button",{class:"link",onClick:e=>s.confirmNoShow(t)},(0,r.zw)(e.translations.appointments.markAsNoShow),9,Nn)],64)):(0,o.kq)("",!0)])])],2)))),128))])])],64)),(0,o.Wm)(B,{ref:"confirmCancel"},{default:(0,o.w5)((()=>[(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.cancelConfirm),1)])),_:1}),(0,o.Wm)(C,null,{default:(0,o.w5)((()=>[l.currentAppointment?((0,o.wg)(),(0,o.j4)(x,{key:0},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.availableCustomerInformation,((t,i,a)=>((0,o.wg)(),(0,o.j4)(c,{key:a},{default:(0,o.w5)((()=>[(0,o._)("div",$n,[(0,o._)("span",null,(0,r.zw)(e.translations.appointmentTypes.customer_information[i]?e.translations.appointmentTypes.customer_information[i]:i),1),"string"===typeof t?((0,o.wg)(),(0,o.iD)("span",{key:0,innerHTML:t},null,8,Hn)):((0,o.wg)(),(0,o.iD)("span",Zn,(0,r.zw)(t.join(", ")),1))])])),_:2},1024)))),128))])),_:1})):(0,o.kq)("",!0)])),_:1}),(0,o.Wm)(b,null,{default:(0,o.w5)((()=>[(0,o.Wm)(v,{action:"dismiss",onClick:s.cancelCancel},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.cancelConfirmCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(v,{action:"accept",onClick:s.cancelAppt},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.cancelConfirmOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512),(0,o.Wm)(B,{ref:"confirmCancelGroup"},{default:(0,o.w5)((()=>[(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.cancelConfirm),1)])),_:1}),(0,o.Wm)(C,null,{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.appointments.group.cancelConfirmBody),1),s.groupAppointments.length?((0,o.wg)(),(0,o.iD)("ul",Yn,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.groupAppointments,((e,t)=>((0,o.wg)(),(0,o.iD)("li",{key:t},(0,r.zw)(e.customer_information.Name),1)))),128))])):(0,o.kq)("",!0)])),_:1}),(0,o.Wm)(b,null,{default:(0,o.w5)((()=>[(0,o.Wm)(v,{action:"dismiss",onClick:s.cancelCancelGroup},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.cancelConfirmCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(v,{action:"accept",onClick:s.cancelGroup},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.cancelConfirmOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512),(0,o.Wm)(B,{ref:"confirmDeleteGroup"},{default:(0,o.w5)((()=>[(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.deleteConfirm),1)])),_:1}),(0,o.Wm)(C,null,{default:(0,o.w5)((()=>[(0,o.Wm)(S,{theme:"amber",icon:"warning"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.deleteConfirmExplanation)+" ",1),s.isCancelable?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.deleteConfirmExplanationCancelable),1)],64)):(0,o.kq)("",!0)])),_:1}),s.groupAppointments.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("p",null,(0,r.zw)(e.translations.appointments.group.deleteConfirmBody),1),(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.groupAppointments,((e,t)=>((0,o.wg)(),(0,o.iD)("li",{key:t},(0,r.zw)(e.customer_information.Name),1)))),128))])],64)):(0,o.kq)("",!0)])),_:1}),(0,o.Wm)(b,null,{default:(0,o.w5)((()=>[(0,o.Wm)(v,{action:"dismiss",onClick:s.cancelDeleteGroup},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.cancelDeleteCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(v,{action:"accept",onClick:s.deleteAppointment},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.group.cancelDeleteOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512)])}var Jn={name:"GroupAppointment",components:{Loading:ge,AppointmentEditStaffDialog:en},props:{id:{type:[Number,String],required:!0}},data(){return{currentAppointment:null,error:!1,errorDescription:"",errorLabel:"",loading:!0,loadingMessage:"",moment:fe(),triggerElement:null,openMenu:!1}},watch:{id(e,t){e!==t&&this.displayAppointment()}},mounted(){this.loadingMessage=this.translations.appointments.loadingSingle,this.displayAppointment()},computed:{appointmentTypeMeta(){if(!this.groupAppointments.length)return;let e=this.groupAppointments[0];return this.prepAppointment(e)},isCancelable(){return!!this.groupAppointments.length&&(this.isInFutureUtc(this.appointmentTypeMeta)&&"canceled"!==this.groupAppointmentStatus(this.groupAppointments))},groupAppointments(){return this.appointments.length?this.appointments.filter((e=>e.group_id===this.id)):[]},availableCustomerInformation(){if(!this.currentAppointment)return[];let e={};return Object.keys(this.currentAppointment.customer_information).forEach((t=>{this.appointment.customer_information[t]?.length&&(e[t]=this.appointment.customer_information[t])})),e},displayEditStaff(){return!!this.isStaffRequired&&(!!this.groupAppointments.length&&(!["canceled","abandoned"].includes(this.groupAppointmentStatus(this.groupAppointments))&&(!!this.isInFutureUtc(this.appointmentTypeMeta)&&!!this.currentUserCan("ssa_manage_staff"))))},appointmentType(){return this.getAppointmentTypeById(this.appointmentTypeMeta?.appointment_type_id)},isStaffRequired(){return this.staffModule?.enabled&&""!==this.appointmentType?.staff.required},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings","timestampFormat"]),...(0,m.rn)("appointment_types",["appointmentTypes"]),...(0,m.rn)("appointments",["appointments"]),...(0,m.Se)(["displayDuration"]),...(0,m.Se)("appointments",["csvExportFile","groupAppointmentStatus","prepAppointment","isInFutureUtc"]),...(0,m.Se)("staff",["appointmentStaffNames","currentUserCan","staffModule"]),...(0,m.Se)("appointment_types",["getAppointmentTypeById"])},methods:{cancelAppt(){let e=this.currentAppointment.id,t={status:"canceling"};this.setAppointmentData({id:e,appt:t});let i={id:e,status:"canceled"};this.saveAppointment(i).then((()=>{})).catch((e=>{console.log(e)})),this.$refs["confirmCancel"].close()},cancelCancel(){this.$refs["confirmCancel"].close()},confirmCancel(e){this.currentAppointment=this.groupAppointments.find((t=>t.id.toString()===e.toString())),this.$refs["confirmCancel"].open()},cancelCancelGroup(){this.$refs["confirmCancelGroup"].close()},confirmGroupCancel(){this.$refs["confirmCancelGroup"].open()},cancelGroup(){this.cancelGroupAppointment(this.id).then((()=>{})).catch((e=>{console.log(e)})),this.$refs["confirmCancelGroup"].close()},confirmGroupDelete(){this.$refs["confirmDeleteGroup"].open()},cancelDeleteGroup(){this.$refs["confirmDeleteGroup"].close()},deleteAppointment(){this.loadingMessage=this.translations.appointments.group.deleting,this.loading=!0,this.$refs["confirmDeleteGroup"].close(),this.deleteGroupAppointment(this.id).then((()=>{this.$router.push("/ssa/appointments")})).catch((e=>{console.log(e)}))},checkGroupAppointments(){this.groupAppointments.length||(this.error=!0,this.errorLabel=this.translations.appointments.errorNotFound,this.errorDescription=this.translations.appointments.errorNotFoundDescription)},displayAppointment(){if(this.loading=!0,this.groupAppointments.length)return this.loading=!1,void(this.error=!1);this.fetchAppointments({group_id:this.id}).then((()=>{this.loading=!1,this.checkGroupAppointments()}))},exportToCsv(){this.csvExportFile(this.groupAppointments)},editStaff(e){this.triggerElement=e.target,this.$refs.editStaffDialog?.openDialog()},canMarkAsNoShow(e){return!this.isInFutureUtc(e)&&"booked"===e.status&&"no_show"!==e.meta?.status},confirmNoShow(e){if(!this.canMarkAsNoShow(e))return;const t={status:"no_show"};this.saveAppointmentMeta({id:e.id,meta:t}).then((()=>{})).catch((e=>{console.log(e)}))},...(0,m.nv)("appointments",["cancelGroupAppointment","deleteGroupAppointment","saveAppointmentMeta","fetchAppointments","saveAppointment"]),...(0,m.OI)("appointments",["setAppointmentData"])}};const Xn=(0,he.Z)(Jn,[["render",Kn],["__scopeId","data-v-45bb3578"]]);var Qn=Xn,ed=[{path:"appointments",name:"appointments",component:Lr,meta:{ssa_manage_appointments:!0,ssa_manage_others_appointments:!0}},{path:"appointment/:id",component:On,props:!0,meta:{ssa_manage_appointments:!0,ssa_manage_others_appointments:!0}},{path:"event/:id",component:Qn,props:!0,meta:{ssa_manage_appointments:!0,ssa_manage_others_appointments:!0}}];const td={class:"appointment-types-all"};function id(e,t,i,a,r,l){const s=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",td,[(0,o.Wm)(s,{onSaved:l.backToList},null,8,["onSaved"])])}var ad={name:"AppointmentTypesAll",store:$J,data(){return{}},methods:{backToList(){this.$router.push("/ssa/appointment-types/all")}}};const od=(0,he.Z)(ad,[["render",id]]);var rd=od;const ld={class:"appt-types"},sd={class:"md-title"},nd={key:0,class:"ssa-appointment-status-selector"},dd=(0,o._)("div",{style:{flex:"1"}},null,-1),pd={class:"appt-types-list-toolbar-actions"},fd={key:0,role:"separator",class:"mdc-list-divider"},ud=["onClick"],cd={class:"appt-type-item-title text-break","data-test":"test-appt-type-item-title"},hd={class:"appt-type-item-desc"},md={key:0};function gd(e,t,i,a,l,s){const n=(0,o.up)("foxy-list-item"),d=(0,o.up)("foxy-select"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-menu"),u=(0,o.up)("foxy-menu-anchor"),c=(0,o.up)("foxy-icon"),h=(0,o.up)("foxy-toolbar"),m=(0,o.up)("foxy-checkbox"),g=(0,o.up)("foxy-icon-button"),_=(0,o.up)("draggable"),y=(0,o.up)("foxy-empty"),w=(0,o.up)("foxy-dialog-title"),x=(0,o.up)("foxy-notification"),C=(0,o.up)("foxy-layout"),v=(0,o.up)("foxy-dialog-content"),b=(0,o.up)("foxy-dialog-button"),B=(0,o.up)("foxy-dialog-footer"),S=(0,o.up)("foxy-dialog"),k=(0,o.up)("foxy-snackbar");return(0,o.wg)(),(0,o.iD)("div",ld,[(0,o.Wm)(h,{style:{"min-height":"76px"},class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("h2",sd,[s.bulkEditMode?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(s.bulkEditingComputed.length)+" "+(0,r.zw)(e.translations.general.selected),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[0===e.deletedAppointmentTypes.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.appointmentTypesTitle),1)],64)):(0,o.kq)("",!0)],64))]),s.bulkEditMode?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("div",nd,[e.deletedAppointmentTypes.length?((0,o.wg)(),(0,o.j4)(d,{key:0,label:e.translations.settings.appointmentTypesTitle,name:"filter-time",id:"filter-time",modelValue:s.selectedStatus,"onUpdate:modelValue":t[0]||(t[0]=e=>s.selectedStatus=e)},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{"data-value":"publish",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.appointmentTypesTitle),1)])),_:1}),(0,o.Wm)(n,{"data-value":"delete",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.appointmentTypesDeleted),1)])),_:1})])),_:1},8,["label","modelValue"])):(0,o.kq)("",!0)])),dd,(0,o._)("div",pd,[s.bulkEditMode&&s.bulkEditingComputed.length>1?((0,o.wg)(),(0,o.j4)(u,{key:0,"md-direction":"bottom left","md-size":"4"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{onClick:t[1]||(t[1]=e=>l.openMenu=!0)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.bulkEdit),1)])),_:1}),(0,o.Wm)(f,{modelValue:l.openMenu,"onUpdate:modelValue":t[9]||(t[9]=e=>l.openMenu=e)},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{onClick:t[2]||(t[2]=e=>s.openBulkEdit("basics"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.basics),1)])),_:1}),(0,o.Wm)(n,{onClick:t[3]||(t[3]=e=>s.openBulkEdit("availability"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.availability),1)])),_:1}),(0,o.Wm)(n,{onClick:t[4]||(t[4]=e=>s.openBulkEdit("scheduling"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.scheduling),1)])),_:1}),(0,o.Wm)(n,{onClick:t[5]||(t[5]=e=>s.openBulkEdit("customerInfo"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.customerInfo),1)])),_:1}),s.extrasEnabled?((0,o.wg)(),(0,o.iD)("li",fd)):(0,o.kq)("",!0),s.showPayments?((0,o.wg)(),(0,o.j4)(n,{key:1,onClick:t[6]||(t[6]=e=>s.openBulkEdit("payments"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.payments),1)])),_:1})):(0,o.kq)("",!0),s.showGoogleCalendar?((0,o.wg)(),(0,o.j4)(n,{key:2,onClick:t[7]||(t[7]=e=>s.openBulkEdit("googleCalendar"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.googleCalendar),1)])),_:1})):(0,o.kq)("",!0),s.showMailchimp?((0,o.wg)(),(0,o.j4)(n,{key:3,onClick:t[8]||(t[8]=e=>s.openBulkEdit("mailchimp"))},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.mailchimp),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["modelValue"])])),_:1})):s.bulkEditMode||"delete"===s.selectedStatus?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(u,{"md-direction":"bottom-start"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{class:"md-primary indicator-button",disabled:l.saving,icon:"label",indicator:s.isFilteringByLabel,onClick:t[10]||(t[10]=e=>l.openLabelMenu=!0)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.labels),1)])),_:1},8,["disabled","indicator"]),(0,o.Wm)(f,{modelValue:l.openLabelMenu,"onUpdate:modelValue":t[11]||(t[11]=e=>l.openLabelMenu=e)},{default:(0,o.w5)((()=>[s.isFilteringByLabel?((0,o.wg)(),(0,o.j4)(n,{key:0,onClick:e.clearSelectedAppointmentTypeLabel},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"clear",theme:"light-green"}),(0,o.Uk)(" "+(0,r.zw)(e.translations.appointmentTypes.actions.clearLabelFilter),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.apptTypeLabels,(t=>((0,o.wg)(),(0,o.j4)(n,{key:t.id,onClick:i=>e.setSelectedAppointmentTypeLabel(t)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{theme:t.color,icon:"label"},null,8,["theme"]),(0,o.Uk)(" "+(0,r.zw)(t.name),1)])),_:2},1032,["onClick"])))),128))])),_:1},8,["modelValue"])])),_:1}),e.editableAppointmentTypes.length>1?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[l.reordering?((0,o.wg)(),(0,o.j4)(p,{key:0,disabled:l.saving,mode:"raised",icon:"save",onClick:s.saveAppointmentTypeOrder},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.saveOrder),1)])),_:1},8,["disabled","onClick"])):((0,o.wg)(),(0,o.j4)(p,{key:1,disabled:l.saving,class:"md-primary",icon:"drag_indicator",onClick:s.reorderAppointmentTypes},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.reorder),1)])),_:1},8,["disabled","onClick"]))],64)):(0,o.kq)("",!0),(0,o.Wm)(p,{class:"md-primary ssa-appt-type-add-new","data-test":"test-ssa-appt-type-add-new",disabled:l.saving,icon:"add",onClick:s.addAppointmentType},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.addNew),1)])),_:1},8,["disabled","onClick"])],64))])])),_:1}),s.displayAppointmentTypes.length?((0,o.wg)(),(0,o.j4)(_,{key:0,animation:150,class:(0,r.C_)(["sortable-list appt-type-editable-list",{disabled:l.saving,dragging:l.dragging}]),"ghost-class":"ghost",tag:"ul",handle:".handle",modelValue:s.displayAppointmentTypes,"onUpdate:modelValue":t[13]||(t[13]=e=>s.displayAppointmentTypes=e),"item-key":"id",onStart:t[14]||(t[14]=e=>l.dragging=!0),onEnd:t[15]||(t[15]=e=>l.dragging=!1)},{item:(0,o.w5)((({element:i})=>[(0,o._)("li",{class:(0,r.C_)(["list-item",{deleted:"delete"===i.status}])},[(0,o._)("div",{class:(0,r.C_)(["icon-toggle",{"bulk-edit":s.bulkEditMode,"bulk-edit-avail":e.editableAppointmentTypes.length>1&&!l.reordering}])},[(0,o.Wm)(c,{icon:"label",theme:e.labelInfo(i.label_id,"color")},null,8,["theme"]),(0,o.Wm)(m,{theme:e.labelInfo(i.label_id,"color"),id:"appt-type-"+i.id,name:"appt-type-"+i.id,value:i.id.toString(),modelValue:s.bulkEditingComputed,"onUpdate:modelValue":t[12]||(t[12]=e=>s.bulkEditingComputed=e),label:e.translations.appointmentTypes.actions.bulkEdit},null,8,["theme","id","name","value","modelValue","label"])],2),(0,o._)("div",{class:"text-container",onClick:e=>s.editAppointmentType(i.id)},[(0,o._)("span",cd,(0,r.zw)(i.title),1),(0,o._)("span",hd,[(0,o.Uk)((0,r.zw)(e.displayDuration(i.duration))+" - ",1),(0,o._)("span",{class:(0,r.C_)(["label-inline",[`md-theme-${e.labelInfo(i.label_id,"color")}`]])},(0,r.zw)(e.labelInfo(i.label_id,"name")),3)])],8,ud),l.reordering?((0,o.wg)(),(0,o.j4)(c,{key:0,class:(0,r.C_)(["handle",{dragging:l.dragging}]),theme:"blue-grey",icon:"drag_indicator"},null,8,["class"])):((0,o.wg)(),(0,o.j4)(u,{key:1},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{"data-test":"test-appt-type-edit-anchor",class:"md-icon-button md-list-action",disabled:l.saving,onClick:e=>l.openActionsMenu[i.id]=!0,theme:e.labelInfo(i.label_id,"color")},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"settings",theme:e.labelInfo(i.label_id,"color")},null,8,["theme"])])),_:2},1032,["disabled","onClick","theme"]),(0,o.Wm)(f,{modelValue:l.openActionsMenu[i.id],"onUpdate:modelValue":e=>l.openActionsMenu[i.id]=e,style:{right:"0",left:"unset"}},{default:(0,o.w5)((()=>["delete"!==s.selectedStatus?((0,o.wg)(),(0,o.j4)(n,{key:0,onClick:e=>s.editAppointmentType(i.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"])):(0,o.kq)("",!0),"delete"!==s.selectedStatus?((0,o.wg)(),(0,o.j4)(n,{key:1,onClick:e=>s.cloneAppointmentType(i.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"content_copy"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.clone),1)])),_:2},1032,["onClick"])):(0,o.kq)("",!0),"delete"!==s.selectedStatus?((0,o.wg)(),(0,o.j4)(n,{key:2,onClick:e=>s.confirmDelete(i.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.delete),1)])),_:2},1032,["onClick"])):(0,o.kq)("",!0),"delete"===s.selectedStatus?((0,o.wg)(),(0,o.j4)(n,{key:3,onClick:e=>s.recoverSelectedAppointmentType(i.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"undo"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.recover),1)])),_:2},1032,["onClick"])):(0,o.kq)("",!0)])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024))],2)])),_:1},8,["class","modelValue"])):((0,o.wg)(),(0,o.j4)(y,{key:1,label:e.translations.appointmentTypes.empty},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{mode:"raised",class:"md-primary",onClick:s.addAppointmentType},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.create),1)])),_:1},8,["onClick"])])),_:1},8,["label"])),(0,o.Wm)(S,{ref:"confirmDelete","data-test":"test-confirm-delete-dialog"},{default:(0,o.w5)((()=>[(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.confirmDelete),1)])),_:1}),s.deletedType?((0,o.wg)(),(0,o.j4)(v,{key:0},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.deletedType.title)+" ("+(0,r.zw)(e.displayDuration(s.deletedType.duration))+") ",1),s.deletedTypeAppointments.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[s.showMeprWarninOnDelete?((0,o.wg)(),(0,o.j4)(C,{key:0},{default:(0,o.w5)((()=>[(0,o.Wm)(x,{icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.deleteTypeWithMembershipsWarn),1)])),_:1})])),_:1})):(0,o.kq)("",!0),(0,o._)("p",null,(0,r.zw)(e.translations.appointmentTypes.confirmDeleteAppointments),1),(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.deletedTypeAppointments,(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id},[t.mepr_membership?.id?((0,o.wg)(),(0,o.iD)("span",md,[(0,o._)("strong",null,(0,r.zw)(t.mepr_membership.title),1),(0,o.Uk)(" - ")])):(0,o.kq)("",!0),(0,o.Uk)(" "+(0,r.zw)(l.moment(t.start_date,e.timestampFormat).format(e.settings.global.date_format_moment+" "+e.settings.global.time_format_moment)),1)])))),128))])],64)):(0,o.kq)("",!0)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(B,null,{default:(0,o.w5)((()=>[(0,o.Wm)(b,{action:"dismiss",onClick:s.cancelDelete},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.confirmDeleteCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(b,{action:"accept",onClick:s.deleteSelectedAppointmentType},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.confirmDeleteOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512),(0,o.Wm)(k,{position:"top center",modelValue:l.isErrorDeletingVisible,"onUpdate:modelValue":t[16]||(t[16]=e=>l.isErrorDeletingVisible=e),"timeout-ms":1e4,message:e.translations.errors.cantDeleteType},null,8,["modelValue","message"])])}var _d=i(76983),yd=i.n(_d),wd={name:"AppointmentTypesList",store:$J,components:{draggable:yd()},data(){return{deletedId:null,moment:fe(),reordering:!1,dragging:!1,saving:!1,openMenu:!1,openLabelMenu:!1,openActionsMenu:{},isErrorDeletingVisible:!1}},beforeMount(){this.emptyCurrentAppointmentType(),this.updateBulkEditing([])},mounted(){if(this.maybeFetchAppointmentTypes(),this.maybeUpdateSortOrder(),this.maybeUpdateAppointmentTypeLabels(),this.appointments.length)return;let e=fe().utc().locale("en").format("YYYY-MM-DD");this.fetchAppointments({end_date_min:e,order:"ASC",orderby:"start_date"})},watch:{selectedStatus(){"delete"===this.selectedStatus&&(this.reordering=!1)},$route:"maybeFetchAppointmentTypes"},computed:{deletedType(){if(this.deletedId)return this.editableAppointmentTypes.find((e=>e.id.toString()===this.deletedId.toString()))},deletedTypeAppointments(){return this.upcomingAppointments.filter((e=>e.appointment_type_id===this.deletedId))},selectedStatus:{get(){return this.selectedApointmentTypeStatus},set(e){this.setSelectedAppointmentTypeStatus(e)}},selectedLabel:{get(){return this.selectedAppointmentTypeLabel},set(e){this.setSelectedAppointmentTypeLabel(e)}},isFilteringByLabel(){return 0!==Object.keys(this.selectedLabel).length},displayAppointmentTypes:{get(){return"delete"===this.selectedStatus?this.deletedAppointmentTypes:this.isFilteringByLabel?this.editableAppointmentTypes.filter((e=>e.label_id===this.selectedLabel.id)):this.editableAppointmentTypes},set(e){this.setAppointmentTypesOrder(e)}},bulkEditingComputed:{get(){return this.bulkEditing},set(e){this.updateBulkEditing(e)}},bulkEditMode(){return this.editableAppointmentTypes.length>1&&this.bulkEditing.length},extrasEnabled(){return this.showGoogleCalendar||this.showMailchimp||this.showPayments},showGoogleCalendar(){return this.settings.installed.google_calendar&&this.settings.google_calendar.enabled&&this.settings.google_calendar.access_token},showMailchimp(){return this.settings.installed.mailchimp&&this.settings.mailchimp.enabled&&!wa().isEmpty(this.settings.mailchimp.account_details)},showPayments(){return this.settings.installed.payments&&(this.settings.stripe.enabled||this.settings.paypal.enabled)},labelsColors(){return this.apptTypeLabels},showMeprWarninOnDelete(){return this.deletedTypeAppointments.some((e=>Object.prototype.hasOwnProperty.call(e,"mepr_membership")&&!wa().isEmpty(e["mepr_membership"])))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","timestampFormat","appointments"]),...(0,m.Se)(["displayDuration"]),...(0,m.Se)("appointments",["upcomingAppointments"]),...(0,m.Se)("appointment_types",["editableAppointmentTypes","deletedAppointmentTypes","labelInfo"]),...(0,m.rn)("appointment_types",["selectedApointmentTypeStatus","selectedAppointmentTypeLabel","bulkEditing","currentAppointmentType","refreshMomentApptTypes","appointmentTypes"]),...(0,m.rn)("labels",["apptTypeLabels"])},methods:{maybeUpdateAppointmentTypeLabels(){let e=wa().cloneDeep(this.appointmentTypes);wa().isEmpty(e)||e.forEach((e=>{(wa().isEmpty(e["label_id"])||"0"==e["label_id"])&&(e["label_id"]=1,this.saveAppointmentType(e))}))},addAppointmentType(){this.createNewAppointmentType(),mY.push("/ssa/appointment-types/type")},cancelDelete(){this.$refs["confirmDelete"].close()},cloneAppointmentType(e){this.saving=!0,this.updateCloneAppointmentType(e).then((()=>{this.saving=!1,mY.push("/ssa/appointment-types/type")}))},confirmDelete(e){this.$refs["confirmDelete"].open(),this.deletedId=e},deleteSelectedAppointmentType(){var e=this.deletedId;this.$refs["confirmDelete"].close(),this.deleteAppointmentType(e).then((()=>{})).catch((e=>{console.log(e),this.isErrorDeletingVisible=!0}))},recoverSelectedAppointmentType(e){this.recoverAppointmentType(e).then((()=>{this.selectedStatus="publish"})).catch((e=>{console.log(e),this.isErrorDeletingVisible=!0}))},editAppointmentType(e){this.saving||this.reordering||mY.push({name:"appointment-type-single",params:{id:e}})},maybeUpdateSortOrder(){if(this.editableAppointmentTypes.length<2)return;let e=this.editableAppointmentTypes.map((e=>e.display_order)),t=e.every(((e,t,i)=>e===i[0]));t&&this.editableAppointmentTypes.length&&(this.editableAppointmentTypes.forEach(((e,t)=>{this.setAppointmentTypeProperties({display_order:t,id:e.id})})),this.updateAppointmentTypes())},openBulkEdit(e){mY.push({name:"appointment-type-bulk-edit",params:{section:e}})},reorderAppointmentTypes(){this.reordering=!this.reordering},saveAppointmentTypeOrder(){this.saving=!0,this.updateAppointmentTypes().then((()=>{this.saving=!1,this.reorderAppointmentTypes()}))},maybeFetchAppointmentTypes(){if(wa().isEmpty(this.refreshMomentApptTypes))return void this.resetRefreshMomentApptTypes();let e=fe()().subtract(2,"minutes");e>this.refreshMomentApptTypes&&(this.fetchAppointmentTypes(),this.resetRefreshMomentApptTypes())},...(0,m.nv)("appointment_types",["updateAppointmentTypes","updateCloneAppointmentType","deleteAppointmentType","recoverAppointmentType","createNewAppointmentType","updateCloneAppointmentType","emptyCurrentAppointmentType","fetchAppointmentTypes","saveAppointmentType"]),...(0,m.nv)("appointments",["fetchAppointments"]),...(0,m.OI)("appointment_types",["removeAppointmentType","setAppointmentTypeProperties","setAppointmentTypesOrder","updateBulkEditing","setSelectedAppointmentTypeStatus","setSelectedAppointmentTypeLabel","clearSelectedAppointmentTypeLabel","resetRefreshMomentApptTypes"])}};const xd=(0,he.Z)(wd,[["render",gd]]);var Cd=xd;const vd={class:"appt-type-edit"},bd={class:"md-title text-break"},Bd={style:{"margin-top":"0"}},Sd={class:"button-bar"},kd={class:"md-title"},Ad={style:{color:"gray","font-size":"initial"}},Md={class:"md-subhead"},Dd={style:{cursor:"pointer"}},Td={key:0,style:{"margin-top":"18px","margin-bottom":"18px"}};function Od(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-dialog-confirm"),p=(0,o.up)("foxy-snackbar"),f=(0,o.up)("basics"),u=(0,o.up)("foxy-accordion-item"),c=(0,o.up)("availability"),h=(0,o.up)("foxy-notification"),m=(0,o.up)("staff"),g=(0,o.up)("capacity"),_=(0,o.up)("scheduling"),y=(0,o.up)("resources"),w=(0,o.up)("payments"),x=(0,o.up)("google-calendar"),C=(0,o.up)("web-meetings"),v=(0,o.up)("mailchimp"),b=(0,o.up)("webhooks"),B=(0,o.up)("customer-information"),S=(0,o.up)("notifications"),k=(0,o.up)("foxy-list-item"),A=(0,o.up)("foxy-select"),M=(0,o.up)("first-available"),D=(0,o.up)("booking-flow"),T=(0,o.up)("foxy-accordion"),O=(0,o.up)("foxy-progress-circular"),G=(0,o.up)("foxy-card-header"),E=(0,o.up)("foxy-icon"),U=(0,o.up)("foxy-icon-button"),F=(0,o.up)("foxy-card-content"),I=(0,o.up)("foxy-card"),z=(0,o.up)("revisions"),P=(0,o.up)("foxy-theme");return(0,o.wg)(),(0,o.iD)("div",vd,[(0,o.Wm)(n,{onClick:s.cancelEdit,icon:"keyboard_arrow_left",theme:"black"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o._)("h2",bd,(0,r.zw)(e.currentAppointmentType.title),1),(0,o.Wm)(d,{ref:"confirmLeaveDirty",title:e.translations.appointmentTypes.confirmIgnoreChangesTitle,"content-html":e.translations.appointmentTypes.confirmIgnoreChangesContent,"ok-text":e.translations.appointmentTypes.confirmIgnoreChangesOkay,"cancel-text":e.translations.appointmentTypes.confirmIgnoreChangesCancel,onConfirm:s.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"]),(0,o.Wm)(p,{position:"top center",modelValue:l.isShortcodeNoticeVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>l.isShortcodeNoticeVisible=e),message:e.translations.appointmentTypes.shortcodeCopied},null,8,["modelValue","message"]),(0,o.Wm)(P,{theme:e.labelInfo(e.currentAppointmentType.label_id,"color")},{default:(0,o.w5)((()=>[(0,o.Wm)(T,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.basics,message:e.translations.wizard.appointmentType.basicsMessage,index:"0",section:"basics",open:l.section,error:!l.validBasics,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{onValidationCheck:s.validateBasics},null,8,["onValidationCheck"])])),_:1},8,["label","message","open","error","onUpdateActive"]),(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.availability,message:e.translations.wizard.appointmentType.availabilityMessage,index:"1",section:"availability",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{onValidationCheck:s.validateAvailability},null,8,["onValidationCheck"]),(0,o.Wm)(h,{icon:"help"},{default:(0,o.w5)((()=>[(0,o._)("p",Bd,(0,r.zw)(e.translations.support.availabilityDetective.intro),1),(0,o.Wm)(n,{tag:"md-button",mode:"secondary",theme:"on-primary",to:"/ssa/support/availability-detective"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.support.availabilityDetective.title),1)])),_:1})])),_:1})])),_:1},8,["label","message","open","onUpdateActive"]),e.settings.installed.staff&&e.settings.staff.enabled&&e.currentAppointmentType.hasOwnProperty("staff")&&e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.j4)(u,{key:0,label:e.translations.wizard.appointmentType.staff,message:e.translations.wizard.appointmentType.staffMessage,index:"2",section:"staff",open:l.section,error:!l.validStaff,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{onStaffRequiredChange:s.staffUpdateCapacity,onValidationCheck:s.validateStaff},null,8,["onStaffRequiredChange","onValidationCheck"])])),_:1},8,["label","message","open","error","onUpdateActive"])):(0,o.kq)("",!0),(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.capacity,message:e.translations.wizard.appointmentType.capacityMessage,index:"3",section:"capacity",open:l.section,error:!l.validCapacity,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{onValidationCheck:s.validateCapacity},null,8,["onValidationCheck"])])),_:1},8,["label","message","open","error","onUpdateActive"]),(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.scheduling,message:e.translations.wizard.appointmentType.schedulingMessage,index:"4",section:"scheduling",open:l.section,error:!l.validScheduling,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(_,{onValidationCheck:s.validateScheduling},null,8,["onValidationCheck"])])),_:1},8,["label","message","open","error","onUpdateActive"]),e.settings.installed.resources&&e.settings.resources.enabled?((0,o.wg)(),(0,o.j4)(u,{key:1,label:e.translations.wizard.appointmentType.resources,message:e.translations.wizard.appointmentType.resourcesMessage,index:"5",section:"resources",open:l.section,error:!l.validResources,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(y,{onValidationCheck:s.validateResources},null,8,["onValidationCheck"])])),_:1},8,["label","message","open","error","onUpdateActive"])):(0,o.kq)("",!0),e.settings.installed.payments&&e.settings.payments.enabled&&(e.settings.paypal.enabled||e.settings.stripe.enabled)?((0,o.wg)(),(0,o.j4)(u,{key:2,label:e.translations.wizard.appointmentType.payments,message:e.translations.wizard.appointmentType.paymentsMessage,index:"6",section:"payments",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(w,{onValidationCheck:s.validatePayments},null,8,["onValidationCheck"])])),_:1},8,["label","message","open","onUpdateActive"])):(0,o.kq)("",!0),e.settings.installed.google_calendar&&e.settings.google_calendar.enabled?((0,o.wg)(),(0,o.j4)(u,{key:3,label:e.translations.wizard.appointmentType.googleCalendar,message:e.translations.wizard.appointmentType.googleCalendarMessage,index:"7",section:"google-calendar",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(x)])),_:1},8,["label","message","open","onUpdateActive"])):(0,o.kq)("",!0),e.webMeetingsProviders.length>0?((0,o.wg)(),(0,o.j4)(u,{key:4,label:e.translations.wizard.appointmentType.webMeetings,message:e.translations.wizard.appointmentType.webMeetingsMessage,index:"8",section:"web-meetings",error:!l.validWebMeetings,open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(C,{onValidationCheck:s.validateWebMeetings},null,8,["onValidationCheck"])])),_:1},8,["label","message","error","open","onUpdateActive"])):(0,o.kq)("",!0),e.settings.installed.mailchimp&&e.settings.mailchimp.enabled?((0,o.wg)(),(0,o.j4)(u,{key:5,label:e.translations.wizard.appointmentType.mailchimp,message:e.translations.wizard.appointmentType.mailchimpMessage,index:"9",section:"mailchimp",error:!l.validMailchimp,open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(v,{modelValue:s.mailchimp,"onUpdate:modelValue":t[1]||(t[1]=e=>s.mailchimp=e),onValidationCheck:s.validateMailchimp},null,8,["modelValue","onValidationCheck"])])),_:1},8,["label","message","error","open","onUpdateActive"])):(0,o.kq)("",!0),e.settings.installed.webhooks&&e.settings.webhooks.enabled&&e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:6,label:e.translations.wizard.appointmentType.webhooks,message:e.translations.wizard.appointmentType.webhooksMessage,index:"10",section:"webhooks",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(b)])),_:1},8,["label","message","open","onUpdateActive"])):(0,o.kq)("",!0),(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.customerInfo,message:e.translations.wizard.appointmentType.customerInfoMessage,index:"11",section:"customer-information",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(B)])),_:1},8,["label","message","open","onUpdateActive"]),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:7,label:e.translations.wizard.appointmentType.notifications,message:e.translations.wizard.appointmentType.notificationsMessage,index:"12",section:"notifications",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(S,{onValidationCheck:s.validateNotifications},null,8,["onValidationCheck"])])),_:1},8,["label","message","open","onUpdateActive"])):(0,o.kq)("",!0),(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.bookingFlow,message:e.translations.wizard.appointmentType.bookingFlowMessage,error:!l.validFirstAvailable,index:"13",section:"bookingFlow",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[s.bookingFlowEnabled?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("div",{key:0,class:"accordion-item-disabled-overlay",onClick:t[2]||(t[2]=(...e)=>s.maybeShowUpgrade&&s.maybeShowUpgrade(...e))})),(0,o.Wm)(A,{label:e.translations.appointmentTypes.bookingFlow,id:"bookingFlow",modelValue:s.flow,"onUpdate:modelValue":t[3]||(t[3]=e=>s.flow=e),disabled:!s.bookingFlowEnabled,class:"md-input-container"},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.bookingFlows,(t=>((0,o.wg)(),(0,o.j4)(k,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.bookingFlows[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"]),"first_available"==s.flow?((0,o.wg)(),(0,o.j4)(M,{key:1,onValidationCheck:s.validateFirstAvailable},null,8,["onValidationCheck"])):(0,o.kq)("",!0),(0,o.Wm)(D,{ref:"bookingFlow","booking-flow":s.flow},null,8,["booking-flow"])])),_:1},8,["label","message","error","open","onUpdateActive"])])),_:1}),(0,o._)("div",Sd,[(0,o.Wm)(n,{mode:"secondary",theme:"on-primary",onClick:s.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(n,{"data-test":"test-save-appt-type",mode:"raised",class:"md-primary",onClick:s.saveAppointmentType,disabled:!s.validFormFields||l.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick","disabled"]),l.saving?((0,o.wg)(),(0,o.j4)(O,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)]),(0,o.Wm)(I,null,{default:(0,o.w5)((()=>[(0,o.Wm)(G,null,{default:(0,o.w5)((()=>[(0,o._)("div",kd,[(0,o.Uk)((0,r.zw)(e.translations.wizard.appointmentType.booking)+" ",1),(0,o._)("span",Ad,(0,r.zw)(e.translations.wizard.appointmentType.id)+": "+(0,r.zw)(i.id),1)]),(0,o._)("div",Md,(0,r.zw)(e.translations.wizard.appointmentType.bookingMessage),1)])),_:1}),(0,o.Wm)(F,null,{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.wizard.appointmentType.specialBooking),1),(0,o._)("p",Dd,[(0,o._)("code",{ref:"shortcode",onClick:t[4]||(t[4]=(...e)=>s.copyShortcode&&s.copyShortcode(...e))}," [ssa_booking type="+(0,r.zw)(e.currentAppointmentType.slug)+"] ",513),(0,o.Wm)(U,{onClick:s.copyShortcode},{default:(0,o.w5)((()=>[(0,o.Wm)(E,{icon:"file_copy"})])),_:1},8,["onClick"])])])),_:1})])),_:1}),s.displayHistory?((0,o.wg)(),(0,o.iD)("div",Td,[(0,o.Wm)(T,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{label:e.translations.wizard.appointmentType.revisions,message:e.translations.wizard.appointmentType.revisionsMessage,index:"14",section:"revisions",open:l.section,onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(z,{id:e.currentAppointmentType.id,theme:e.labelInfo(e.currentAppointmentType.label_id,"color"),type:"appointment_type"},null,8,["id","theme"])])),_:1},8,["label","message","open","onUpdateActive"])])),_:1})])):(0,o.kq)("",!0)])),_:1},8,["theme"])])}const Gd={class:"appt-type-basics"};function Ed(e,t,i,a,l,s){const n=(0,o.up)("foxy-textfield"),d=(0,o.up)("foxy-layout"),p=(0,o.up)("duration"),f=(0,o.up)("LabelsSettingsMenu"),u=(0,o.up)("foxy-list-item"),c=(0,o.up)("foxy-select");return(0,o.wg)(),(0,o.iD)("div",Gd,[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[i.bulkMode?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(n,{key:0,"data-test":"test-appt-type-title-input",modelValue:l.v$.title.$model,"onUpdate:modelValue":t[0]||(t[0]=e=>l.v$.title.$model=e),valid:!s.titleError&&!s.titleRegexValidatorError,label:e.translations.appointmentTypes.title,helptext:s.titleError?e.translations.appointmentTypes.titleError:s.titleRegexValidatorError?e.translations.appointmentTypes.titleRegexValidatorError:"","helptext-persistent":"","helptext-validation":"",maxlength:"255",required:""},null,8,["modelValue","valid","label","helptext"]))])),_:1}),(0,o.Wm)(d,{"md-gutter":!0,class:"field-group",style:{"align-items":"center"}},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{modelValue:l.v$.duration.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>l.v$.duration.$model=e),"allow-null":i.bulkMode,required:!i.bulkMode},null,8,["modelValue","allow-null","required"])])),_:1}),(0,o.Wm)(d,{"md-flex":30,class:"label-select"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{modelValue:s.label_id,"onUpdate:modelValue":t[2]||(t[2]=e=>s.label_id=e)},null,8,["modelValue"])])),_:1})])),_:1}),s.showSlug?((0,o.wg)(),(0,o.j4)(d,{key:0,"md-gutter":!0},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{"md-flex":66,class:(0,r.C_)({"full-width":e.settings.installed.booking_flows})},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{modelValue:l.v$.slug.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>l.v$.slug.$model=e),valid:!s.slugError&&!s.slugCharactersError,label:e.translations.appointmentTypes.slug,helptext:s.slugError?e.translations.appointmentTypes.slugError:s.slugCharactersError?e.translations.appointmentTypes.slugCharactersError:"","helptext-persistent":"","helptext-validation":"",required:""},null,8,["modelValue","valid","label","helptext"])])),_:1},8,["class"]),e.settings.installed.booking_flows?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:0,"md-flex":33},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{label:e.translations.appointmentTypes.bookingLayout,id:"layout",modelValue:s.layout,"onUpdate:modelValue":t[4]||(t[4]=e=>s.layout=e)},{default:(0,o.w5)((()=>[i.bulkMode?((0,o.wg)(),(0,o.j4)(u,{key:0,"data-value":"",role:"option"})):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.bookingLayouts,(t=>((0,o.wg)(),(0,o.j4)(u,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.bookingLayouts[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])])),_:1}))])),_:1})):e.settings.installed.booking_flows?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(c,{key:1,label:e.translations.appointmentTypes.bookingLayout,id:"layout",modelValue:s.layout,"onUpdate:modelValue":t[5]||(t[5]=e=>s.layout=e)},{default:(0,o.w5)((()=>[i.bulkMode?((0,o.wg)(),(0,o.j4)(u,{key:0,"data-value":"",role:"option"})):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.bookingLayouts,(t=>((0,o.wg)(),(0,o.j4)(u,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.bookingLayouts[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])),(0,o.Wm)(d,{"md-gutter":!0},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"instructions-field"},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{modelValue:s.instructions,"onUpdate:modelValue":t[6]||(t[6]=e=>s.instructions=e),label:e.translations.appointmentTypes.instructions,helptext:e.translations.appointmentTypes.instructions_description,placeholder:e.translations.appointmentTypes.instructions_placeholder,id:"instructions"},null,8,["modelValue","label","helptext","placeholder"])])),_:1})])),_:1})])}const Ud={class:"duration-field"},Fd={class:"md-error"},Id={class:"md-helper-text"};function zd(e,t,i,a,l,s){const n=(0,o.up)("foxy-textfield"),d=(0,o.up)("foxy-layout"),p=(0,o.up)("foxy-list-item"),f=(0,o.up)("foxy-select");return(0,o.wg)(),(0,o.iD)("div",Ud,[(0,o.Wm)(d,{"md-gutter":!0,style:{"align-items":"center"}},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{type:"number",min:0,id:"duration-"+l.id,modelValue:l.displayedCount,"onUpdate:modelValue":t[0]||(t[0]=e=>l.displayedCount=e),onChange:s.queueUpdateDurationInfo,required:i.required,valid:!s.showError,label:e.translations.appointmentTypes.duration},null,8,["id","modelValue","onChange","required","valid","label"])])),_:1}),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(f,{class:"w-full",label:e.translations.appointmentTypes.durationType,id:"durationType-"+l.id,modelValue:l.selectedUnit,"onUpdate:modelValue":[t[1]||(t[1]=e=>l.selectedUnit=e),s.queueUpdateDurationInfo]},{default:(0,o.w5)((()=>[i.allowNull?((0,o.wg)(),(0,o.j4)(p,{key:0,"data-value":"",role:"option"})):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.durationUnits,(t=>((0,o.wg)(),(0,o.j4)(p,{"data-value":t,key:t,role:"option"},{default:(0,o.w5)((()=>[1===l.displayedCount||"1"===l.displayedCount?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.time.units[t].single),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.time.units[t].plural),1)],64))])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","id","modelValue","onUpdate:modelValue"])])),_:1})])),_:1}),i.errorText?((0,o.wg)(),(0,o.j4)(d,{key:0,class:"duration-helper-text"},{default:(0,o.w5)((()=>[(0,o._)("span",Fd,(0,r.zw)(i.errorText),1)])),_:1})):i.helpText?((0,o.wg)(),(0,o.j4)(d,{key:1,class:"duration-helper-text"},{default:(0,o.w5)((()=>[(0,o._)("span",Id,(0,r.zw)(i.helpText),1)])),_:1})):(0,o.kq)("",!0)])}var Pd={name:"DurationInput",store:$J,props:["modelValue","helpText","errorText","allowNull","required"],emits:["update:modelValue"],data(){return{durationUnits:L,id:null,selectedUnit:"minutes",displayedCount:this.modelValue}},mounted:function(){this.minutes&&Number.isInteger(this.minutes)&&(this.minutes%10080===0?(this.displayedCount=this.minutes/10080,this.selectedUnit="weeks"):this.minutes%1440===0?(this.displayedCount=this.minutes/1440,this.selectedUnit="days"):this.minutes%60===0&&(this.displayedCount=this.minutes/60,this.selectedUnit="hours")),this.id=this._uid},computed:{minutes:function(){return parseInt(this.modelValue)},showError(){let e=!1;return this.allowNull||this.displayedCount?(this.required&&parseInt(this.displayedCount)<1||this.allowNull&&parseInt(this.displayedCount)<0||this.errorText)&&(e=!0):e=!0,e},...(0,m.rn)("translations",["translations"])},methods:{queueUpdateDurationInfo:function(){this.$nextTick((()=>{this.updateDurationInfo()}))},updateDurationInfo:function(){let e=this.displayedCount;switch(e||this.allowNull||(e=0),this.selectedUnit){case"hours":e=60*this.displayedCount;break;case"days":e=60*this.displayedCount*24;break;case"weeks":e=60*this.displayedCount*24*7;break}""===this.displayedCount&&this.allowNull?this.$emit("update:modelValue",""):this.$emit("update:modelValue",e.toString())}}};const Vd=(0,he.Z)(Pd,[["render",zd]]);var Wd=Vd,Rd=i(14219),Ld=i(75420);const jd=e=>((0,o.dD)("data-v-7c194993"),e=e(),(0,o.Cn)(),e),qd={id:"label-trigger-description",class:"screen-reader-text"},Nd=["aria-hidden"],$d=jd((()=>(0,o._)("div",{class:"popupOverlay"},null,-1))),Hd={key:0,class:"fieldset-wrapper"},Zd=["onClick","onKeyup"],Yd={class:"screen-reader-text"},Kd={class:"tools-wrapper"},Jd=["onClick"],Xd={class:"dialog-tools"},Qd={class:"screen-reader-text"},ep=["onClick","disabled","aria-disabled"],tp={class:"dialog-tools","data-tooltip-id":"tooltip-defaultLabelDisabled"},ip={class:"screen-reader-text"},ap={class:"menu-footer-btn"},op={key:1,class:"fieldset-wrapper"},rp={class:"md-subheading"},lp={class:"input-fields-wrapper"},sp={class:"custom-label"},np={class:"squares-wrapper"},dp=["data-tooltip-id"],pp=["onUpdate:modelValue","id","value","checked"],fp=["for"],up={class:"screen-reader-text"},cp={class:"menu-footer-btn"},hp={key:0},mp={key:1},gp={class:"screen-reader-text"};function _p(e,t,i,l,s,n){const d=(0,o.up)("foxy-textfield"),p=(0,o.up)("foxy-icon"),f=(0,o.up)("foxy-icon-button"),u=(0,o.up)("foxy-tooltip"),c=(0,o.up)("foxy-button"),h=(0,o.up)("foxy-progress-circular"),m=(0,o.up)("foxy-dialog-title"),g=(0,o.up)("foxy-notification"),_=(0,o.up)("foxy-layout"),y=(0,o.up)("router-link"),w=(0,o.up)("foxy-dialog-content"),x=(0,o.up)("foxy-dialog-button"),C=(0,o.up)("foxy-dialog-footer"),v=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.iD)("div",{class:(0,r.C_)(["labels-field-container",`md-theme-${n.label.color}`])},[(0,o.Wm)(d,{class:"textfield-label","leading-icon":"label",prefix:e.translations.appointmentTypes.label,"trailing-icon":s.isPopupDisplayed?"keyboard_arrow_up":"keyboard_arrow_down",type:"button",id:"label-menu-trigger","aria-haspopup":"dialog","aria-controls":"label-popup-container","aria-expanded":s.isPopupDisplayed,"aria-describedby":"label-trigger-description",modelValue:n.label.name,"onUpdate:modelValue":t[0]||(t[0]=e=>n.label.name=e),onClick:n.toggleLabelPopup},null,8,["prefix","trailing-icon","aria-expanded","modelValue","onClick"]),(0,o._)("span",qd,(0,r.zw)(e.translations.appointmentTypes.labels.popupDescription),1),s.isPopupDisplayed?((0,o.wg)(),(0,o.iD)("div",{key:0,role:"dialog","aria-hidden":!s.isPopupDisplayed,class:"label-popup",id:"label-popup-container"},[$d,s.showMenuList?((0,o.wg)(),(0,o.iD)("fieldset",Hd,[(0,o._)("div",{class:(0,r.C_)(["header-menu dynamicBgTextColor",[`md-theme-${n.label.color}`]])},[(0,o._)("legend",{tabindex:"0",ref:"selectLabelTitle",class:"md-subheading"},(0,r.zw)(e.translations.appointmentTypes.labels.selectLabel),513),(0,o.Wm)(f,{onClick:n.createLabel},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{icon:"add"})])),_:1},8,["onClick"])],2),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.apptTypeLabelsList,((t,i)=>((0,o.wg)(),(0,o.iD)("div",{class:"label-menu-item-wrapper",key:t.id+t.name},[(0,o.Wm)(p,{icon:"label",theme:t.color},null,8,["theme"]),(0,o._)("button",{class:"select-label-button",onClick:e=>n.selectThisLabel(t),onKeyup:(0,a.D2)((e=>n.selectThisLabel(t)),["enter"])},[(0,o._)("span",Yd,(0,r.zw)(e.translations.appointmentTypes.labels.selectLabel),1),(0,o.Uk)(" "+(0,r.zw)(t.name),1)],40,Zd),(0,o._)("div",Kd,[(0,o._)("button",{ref_for:!0,ref:"edit"+i.toString(),onClick:e=>n.editThisLabel(t,i)},[(0,o._)("span",Xd,[(0,o.Wm)(p,{icon:"edit"})]),(0,o._)("span",Qd,(0,r.zw)(e.translations.appointmentTypes.labels.editLabel)+" "+(0,r.zw)(t.name),1)],8,Jd),(0,o._)("button",{ref_for:!0,ref:"delete"+i.toString(),onClick:e=>n.maybeDeleteThisLabel(t,i),disabled:1==t.id,"aria-disabled":1==t.id,"aria-haspopup":"dialog","aria-controls":"confirmDeleteDialog"},[(0,o._)("span",tp,[(0,o.Wm)(p,{icon:"delete",theme:1==t.id?"grey":"deep-orange"},null,8,["theme"]),1==t.id?((0,o.wg)(),(0,o.j4)(u,{key:0,id:"tooltip-defaultLabelDisabled",position:"above"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.labels.defaultLabelDisabled),1)])),_:1})):(0,o.kq)("",!0)]),(0,o._)("span",ip,(0,r.zw)(e.translations.appointmentTypes.labels.deleteLabel)+" "+(0,r.zw)(t.name),1)],8,ep)])])))),128)),(0,o._)("span",ap,[(0,o.Wm)(c,{ref:"createBtn",onClick:n.createLabel,mode:"raised",class:"md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.labels.addLabel),1)])),_:1},8,["onClick"])])])):(0,o.kq)("",!0),s.showMenuList?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("fieldset",op,[(0,o._)("div",{class:(0,r.C_)(["header-menu dynamicBgTextColor",[`md-theme-${n.label.color}`]])},[(0,o._)("legend",rp,(0,r.zw)(s.isEditMode?e.translations.appointmentTypes.labels.updateLabel:e.translations.appointmentTypes.labels.createLabel),1)],2),(0,o._)("div",lp,[(0,o.Wm)(d,{ref:"inputLabelName",id:"dialog-field-label-name",modelValue:n.currentLabel.name,"onUpdate:modelValue":t[1]||(t[1]=e=>n.currentLabel.name=e),modelModifiers:{trim:!0},valid:!n.nameError,label:e.translations.appointmentTypes.labels.labelName,helptext:n.nameError?n.invalidCharacterError?e.translations.appointmentTypes.labels.invalidCharacterError+"” > ,":e.translations.appointmentTypes.labels.duplicateNameError:"","helptext-validation":"",required:"",maxlength:"120"},null,8,["modelValue","valid","label","helptext"]),(0,o._)("fieldset",null,[(0,o._)("legend",sp,(0,r.zw)(e.translations.appointmentTypes.labels.chooseColor),1),(0,o._)("div",np,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.options.colors,(e=>((0,o.wg)(),(0,o.iD)("div",{class:"wrapper",key:e.value+e.text,"data-tooltip-id":"tooltip-label-color"+e.text},[(0,o.wy)((0,o._)("input",{"onUpdate:modelValue":e=>n.currentLabel.color=e,id:e.text,name:"color",type:"radio",value:e.value,checked:n.currentLabel.color===e.value},null,8,pp),[[a.G2,n.currentLabel.color]]),(0,o._)("label",{class:(0,r.C_)([`md-theme-${e.value}`]),for:e.text},[(0,o._)("span",up,(0,r.zw)(e.text),1),(0,o.Wm)(u,{id:"tooltip-label-color"+e.text,position:"above"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.text),1)])),_:2},1032,["id"])],10,fp)],8,dp)))),128))])])]),(0,o._)("div",cp,[(0,o.Wm)(c,{disabled:s.saving,ref:"cancelBtn",mode:"secondary",onClick:n.cancelUpdating},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.cancel),1)])),_:1},8,["disabled","onClick"]),(0,o.Wm)(c,{ref:"saveBtn",disabled:n.disableSaving,mode:"raised",class:"md-primary",onClick:n.handleSave},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.isEditMode?e.translations.appointmentTypes.actions.update:e.translations.appointmentTypes.actions.save),1)])),_:1},8,["disabled","onClick"]),s.saving?((0,o.wg)(),(0,o.j4)(h,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])])),(0,o._)("div",null,[(0,o.Wm)(v,{"aria-label":e.translations.appointmentTypes.labels.confirmDeleteAriaLabel,id:"confirmDeleteDialog",ref:"confirmDelete","foxy-click-outside-to-close":!s.saving},{default:(0,o.w5)((()=>[(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.labels.confirmDeleteTitle),1)])),_:1}),n.affectedApptTypesOnDelete.length?((0,o.wg)(),(0,o.j4)(w,{key:0},{default:(0,o.w5)((()=>[(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(g,{icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.labels.confirmDeleteWarning),1)])),_:1})])),_:1}),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.affectedApptTypesOnDelete,(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id},[(0,o.Uk)((0,r.zw)(t.title)+" ",1),t.id===e.currentAppointmentType.id?((0,o.wg)(),(0,o.iD)("span",hp,(0,r.zw)(e.translations.appointmentTypes.current),1)):((0,o.wg)(),(0,o.iD)("span",mp,[(0,o.Wm)(y,{ref_for:!0,ref:"edit-link",to:"/ssa/appointment-types/type/"+t.id,onClick:e=>n.handleEditApptType(e,t)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.edit)+" ",1),(0,o._)("span",gp,(0,r.zw)(t.title),1)])),_:2},1032,["to","onClick"])]))])))),128))])])),_:1})])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(C,null,{default:(0,o.w5)((()=>[(0,o.Wm)(x,{disabled:s.saving,action:"dismiss",class:"md-raised",ref:"confirmDeleteCancel",onClick:n.cancelDeleting},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.labels.keepLabel),1)])),_:1},8,["disabled","onClick"]),(0,o.Wm)(x,{disabled:s.saving,action:"accept",class:"md-raised md-primary",ref:"confirmDeleteDelete",onClick:n.confirmDeleting},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.labels.confirmDelete),1)])),_:1},8,["disabled","onClick"]),s.saving?((0,o.wg)(),(0,o.j4)(h,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])),_:1})])),_:1},8,["aria-label","foxy-click-outside-to-close"])])],8,Nd)):(0,o.kq)("",!0)],2)}var yp={name:"LabelsSettingsMenu",props:["modelValue"],emits:["update:modelValue"],data(){return{options:X,saving:!1,isPopupDisplayed:!1,isEditMode:!1,showMenuList:!0,storedFocusIndex:null,isDeletePopupOpen:!1}},computed:{label(){let e=this.apptTypeLabels.find((e=>e.id==this.modelValue));return e||this.defaultLabel},currentLabel:{get(){return this.currentApptTypeLabel},set(e){this.setCurrentLabel(e)}},labelToDelete:{get(){return this.labelToDelete},set(e){this.setLabelToDelete(e)}},apptTypeLabelsList:{get(){return this.appointmentTypeLabels},set(e){this.setApptTypeLabels(e)}},firstActiveElement(){if(this.isPopupDisplayed){if(this.isDeletePopupOpen)return this.editApptTypeLinkRef?this.editApptTypeLinkRef.$el:this.$refs["confirmDeleteCancel"].$el;if(this.showMenuList&&this.$refs.firstAddBtn)return this.$refs.firstAddBtn.$el;if(!this.showMenuList&&this.$refs.inputLabelName)return this.$refs.inputLabelName.$el}return null},lastActiveElement(){if(this.isPopupDisplayed){if(this.isDeletePopupOpen)return this.$refs["confirmDeleteDelete"].$el;if(this.$refs.createBtn&&this.showMenuList)return this.$refs.createBtn.$el;if(this.$refs.saveBtn&&!this.showMenuList)return this.$refs.saveBtn._props.disabled?this.$refs.cancelBtn.$el:this.$refs.saveBtn.$el}return null},editApptTypeLinkRef(){return this.isDeletePopupOpen&&this.$refs["edit-link"]?this.$refs["edit-link"][0]:null},storedActiveElement(){return this.$refs[this.storedFocusIndex]?this.$refs[this.storedFocusIndex][0]:null},affectedApptTypesOnDelete(){return this.affectedApptTypesOnLabelDelete&&this.labelToDelete?this.affectedApptTypesOnLabelDelete.filter((e=>"publish"===e.status)):[]},disableSaving(){return""===this.currentLabel?.name||this.saving||this.nameError},nameError(){return this.invalidCharacterError||this.duplicateNameError},invalidCharacterError(){if(0===Object.keys(this.currentLabel).length)return!1;var e=/(<[^>]+>)|"|,/gi;return!!this.currentLabel.name.match(e)},duplicateNameError(){return 0!==Object.keys(this.currentLabel).length&&!!this.apptTypeLabels.find((e=>e.name.toLowerCase()===this.currentLabel?.name.toLowerCase()&&e.id!==this.currentLabel?.id))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("labels",["apptTypeLabels","currentApptTypeLabel","labelToDelete"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("appointment_types",["affectedApptTypesOnLabelDelete"]),...(0,m.Se)("labels",["appointmentTypeLabels","defaultLabel"])},mounted(){document.addEventListener("click",this.OverlayClickHandler),document.addEventListener("keydown",this.keyDownHandler)},beforeUnmount(){document.removeEventListener("click",this.OverlayClickHandler),document.removeEventListener("keydown",this.keyDownHandler)},methods:{keyDownHandler(e){this.isPopupDisplayed&&!this.saving&&("Escape"!==e.key||this.$refs["confirmDelete"].active?9===e.keyCode&&(e.shiftKey?document.activeElement===this.firstActiveElement&&(e.preventDefault(),this.lastActiveElement.focus()):document.activeElement===this.lastActiveElement&&(e.preventDefault(),this.firstActiveElement?.focus())):this.closeLabelPopup())},OverlayClickHandler(e){this.saving||this.isPopupDisplayed&&e.target.matches(".popupOverlay")&&this.closeLabelPopup()},closeLabelPopup(){this.isPopupDisplayed=!1},toggleLabelPopup(){this.isPopupDisplayed=!this.isPopupDisplayed,this.showMenuList=!0,this.$nextTick((()=>{this.isPopupDisplayed&&this.$refs.selectLabelTitle.focus()}))},editThisLabel(e,t){this.storedFocusIndex="edit"+t.toString(),this.showMenuList=!1,this.isEditMode=!0,this.setCurrentLabel(e)},maybeDeleteThisLabel(e,t){e.id!=this.defaultLabel.id&&1!==this.apptTypeLabelsList.length&&(this.storedFocusIndex="delete"+t.toString(),this.setLabelToDelete(e),this.$refs["confirmDelete"].open(),this.isDeletePopupOpen=!0)},cancelDeleting(e){e.preventDefault(),this.$refs["confirmDelete"].close(),this.isDeletePopupOpen=!1,this.restoreFocus(),this.clearLabelToDelete()},confirmDeleting(e){e.preventDefault(),this.saving=!0,this.maybeInvokeEmit(),this.maybeResetApptTypesLabelToDefault(),this.deleteAppointmentTypeLabel().then((()=>{this.$refs["confirmDelete"].close(),this.isDeletePopupOpen=!1,this.restoreFocus(),this.saving=!1,this.clearLabelToDelete()}))},maybeInvokeEmit(){this.label.id===this.labelToDelete.id&&this.$emit("update:modelValue",this.defaultLabel.id)},selectThisLabel(e){this.$emit("update:modelValue",e.id),this.isPopupDisplayed=!1},handleSave(e){this.nameError||(e.preventDefault(),this.saving=!0,this.isEditMode?this.saveLabel().then((()=>{this.isEditMode=!1,this.showMenuList=!0,this.restoreFocus(),this.saving=!1})):this.saveNewLabel().then((e=>{this.showMenuList=!0,this.restoreFocus(),this.$emit("update:modelValue",e.id),this.saving=!1})))},cancelUpdating(e){e.preventDefault(),this.showMenuList=!0,this.isEditMode=!1,this.resetCurrentLabel(),this.restoreFocus()},createLabel(){this.isEditMode=!1,this.showMenuList=!1,this.resetCurrentLabel()},restoreFocus(){this.showMenuList&&this.$nextTick((()=>{this.storedActiveElement?(this.storedActiveElement.focus(),this.storedFocusIndex=null):this.firstActiveElement?.focus()}))},handleEditApptType(e,t){this.setCurrentAppointmentType(wa().cloneDeep(t)),this.cancelDeleting(e)},...(0,m.nv)("labels",["saveNewLabel","saveLabel","deleteAppointmentTypeLabel"]),...(0,m.nv)("appointment_types",["maybeResetApptTypesLabelToDefault"]),...(0,m.OI)("labels",["setApptTypeLabels","setCurrentLabel","resetCurrentLabel","setLabelToDelete","clearLabelToDelete"]),...(0,m.OI)("appointment_types",["setCurrentAppointmentType"])}};const wp=(0,he.Z)(yp,[["render",_p],["__scopeId","data-v-7c194993"]]);var xp=wp;const Cp=e=>/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(e),vp=e=>!/^-+$/.test(e);var bp={name:"AppointmentTypeBasics",components:{duration:Wd,LabelsSettingsMenu:xp},store:$J,props:{bulkMode:{default:!1,type:Boolean}},data(){return{v$:(0,Rd.Xw)(),options:X}},validations(){const e=this.bulkMode,t=this.showSlug;return{duration:{required:(0,Ld.CF)((()=>!e)),minValue:(0,Ld.uv)(1)},slug:{required:(0,Ld.CF)((()=>t)),regexValidator:Cp},title:{required:(0,Ld.CF)((()=>!e)),regexValidator:vp}}},computed:{titleError(){return!this.bulkMode&&(this.v$.title.$invalid&&this.v$.title.required.$invalid)},titleRegexValidatorError(){return!this.bulkMode&&(this.v$.title.$invalid&&this.v$.title.regexValidator.$invalid)},slugError(){return!this.bulkMode&&(this.v$.slug.$invalid&&this.v$.slug.required)},slugCharactersError(){return!this.bulkMode&&(this.v$.slug.$invalid&&!this.v$.slug.regexValidator.$invalid)},showSlug(){return!this.bulkMode&&this.currentAppointmentType&&Object.prototype.hasOwnProperty.call(this.currentAppointmentType,"slug")},duration:{get(){return this.currentAppointmentType?this.currentAppointmentType.duration:0},set(e){this.updateCurrentAppointmentType({key:"duration",value:e}),this.validationCheck()}},title:{get(){return this.currentAppointmentType?this.currentAppointmentType.title:""},set(e){this.updateCurrentAppointmentType({key:"title",value:e}),this.validationCheck()}},label_id:{get(){return this.currentAppointmentType.label_id?this.currentAppointmentType.label_id:"1"},set(e){this.updateCurrentAppointmentType({key:"label_id",value:e})}},slug:{get(){return this.currentAppointmentType.slug},set(e){this.updateCurrentAppointmentType({key:"slug",value:e}),this.v$.slug.$touch(),this.validationCheck()}},layout:{get(){return this.currentAppointmentType.booking_layout?this.currentAppointmentType.booking_layout:"week"},set(e){this.updateCurrentAppointmentType({key:"booking_layout",value:e})}},instructions:{get(){return this.currentAppointmentType?this.currentAppointmentType.instructions:""},set(e){this.updateCurrentAppointmentType({key:"instructions",value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"])},methods:{validationCheck(){var e=this.v$.duration.required?!this.v$.duration.$invalid:this.v$.duration.minValue;this.$emit("validationCheck",!this.titleError&&!this.titleRegexValidatorError&&!this.slugError&&!this.slugCharactersError&&e)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const Bp=(0,he.Z)(bp,[["render",Ed]]);var Sp=Bp;const kp={class:"md-fieldset field-wrapper"},Ap={id:"availability-type-help","aria-live":"polite"},Mp={class:"md-fieldset field-wrapper"},Dp={class:"subsection-title"},Tp={class:"subsection-description"};function Op(e,t,i,a,l,s){const n=(0,o.up)("foxy-radio"),d=(0,o.up)("availability-picker"),p=(0,o.up)("start-time-picker"),f=(0,o.up)("date-time-picker");return(0,o.wg)(),(0,o.iD)("div",{class:(0,r.C_)(["appt-type-availability","md-theme-"+s.appointmentTypeLabel])},[(0,o._)("fieldset",kp,[(0,o._)("legend",null,(0,r.zw)(e.translations.appointmentTypes.availabilityType),1),(0,o.Wm)(n,{modelValue:s.availability_type,"onUpdate:modelValue":t[0]||(t[0]=e=>s.availability_type=e),label:e.translations.appointmentTypes.availabilityBlocks,name:"availability_type",value:"available_blocks",id:"availability_type_blocks","aria-described-by":"availability-type-help"},null,8,["modelValue","label"]),(0,o.Wm)(n,{modelValue:s.availability_type,"onUpdate:modelValue":t[1]||(t[1]=e=>s.availability_type=e),label:e.translations.appointmentTypes.availabilityStartTimes,name:"availability_type",value:"start_times",id:"availability_type_times","aria-described-by":"availability-type-help"},null,8,["modelValue","label"]),(0,o._)("div",Ap,[(0,o._)("p",null,["start_times"===s.availability_type?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.availabilityStartTimesHelp),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.availabilityBlocksHelp),1)],64))])])]),(0,o._)("fieldset",Mp,[(0,o._)("legend",null,(0,r.zw)(e.translations.appointmentTypes.availabilityIncrement),1),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.availabilityTimeIncrements,(i=>((0,o.wg)(),(0,o.j4)(n,{key:i,modelValue:s.increment,"onUpdate:modelValue":t[2]||(t[2]=e=>s.increment=e),label:`${i} ${e.translations.time.units.minutes.plural}`,name:"increment",value:i,id:"increment-"+i,onChange:s.updateAvailability},null,8,["modelValue","label","value","id","onChange"])))),128))]),"available_blocks"===s.availability_type?((0,o.wg)(),(0,o.j4)(d,{key:0,increment:s.increment,ref:"availability-field",modelValue:s.availability,"onUpdate:modelValue":t[3]||(t[3]=e=>s.availability=e)},null,8,["increment","modelValue"])):((0,o.wg)(),(0,o.j4)(p,{key:1,increment:s.increment,ref:"start-time-field",modelValue:s.availability,"onUpdate:modelValue":t[4]||(t[4]=e=>s.availability=e)},null,8,["increment","modelValue"])),e.advancedSchedulingModule.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o._)("h3",Dp,(0,r.zw)(e.translations.appointmentTypes.availability_window),1),(0,o._)("p",Tp,(0,r.zw)(e.translations.appointmentTypes.availability_window_help),1),(0,o.Wm)(f,{label:e.translations.appointmentTypes.availability_start_date,"is-valid":l.validAvailabilityWindow,"error-text":e.translations.settings.advanced_scheduling.availability_window_error,modelValue:s.availability_start_date,"onUpdate:modelValue":[t[5]||(t[5]=e=>s.availability_start_date=e),s.validateAvailabilityWindow]},null,8,["label","is-valid","error-text","modelValue","onUpdate:modelValue"]),(0,o.Wm)(f,{label:e.translations.appointmentTypes.availability_end_date,"is-valid":l.validAvailabilityWindow,"error-text":e.translations.settings.advanced_scheduling.availability_window_error,modelValue:s.availability_end_date,"onUpdate:modelValue":[t[6]||(t[6]=e=>s.availability_end_date=e),s.validateAvailabilityWindow]},null,8,["label","is-valid","error-text","modelValue","onUpdate:modelValue"])],64)):(0,o.kq)("",!0)],2)}const Gp={class:"availability-table"},Ep={key:0},Up={key:1};function Fp(e,t,i,l,s,n){const d=(0,o.up)("foxy-icon"),p=(0,o.up)("foxy-icon-button"),f=(0,o.up)("cell");return(0,o.wg)(),(0,o.iD)("div",Gp,[(0,o._)("table",{class:(0,r.C_)(n.classes)},[(0,o._)("thead",null,[(0,o._)("tr",null,[(0,o._)("th",null,[n.canAddTimeBefore?((0,o.wg)(),(0,o.j4)(p,{key:0,onClick:n.addTimeBefore,mode:"raised",size:"small",class:"addTimeBeforeBtn"},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"add"})])),_:1},8,["onClick"])):(0,o.kq)("",!0)]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.weekdays,((e,t)=>((0,o.wg)(),(0,o.iD)("th",{key:`thead-${e}`},(0,r.zw)(n.weekdaysDisplay[t]),1)))),128))])]),(0,o._)("tfoot",null,[(0,o._)("tr",null,[(0,o._)("th",null,[n.canAddTimeAfter?((0,o.wg)(),(0,o.j4)(p,{key:0,onClick:n.addTimeAfter,class:"addTimeAfterBtn",size:"small",mode:"raised"},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"add"})])),_:1},8,["onClick"])):(0,o.kq)("",!0)]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.weekdays,(e=>((0,o.wg)(),(0,o.iD)("td",{key:`tfoot-${e}`}," ")))),128))])]),(0,o._)("tbody",{onMousedown:t[0]||(t[0]=(0,a.iM)((e=>n.mousedown(e)),["prevent"])),onMouseup:t[1]||(t[1]=(0,a.iM)((e=>n.mouseup(e)),["prevent"])),onMouseover:t[2]||(t[2]=(0,a.iM)((e=>n.mouseover(e)),["prevent"]))},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.times,(e=>((0,o.wg)(),(0,o.iD)("tr",{class:(0,r.C_)({hour:"00"===e.timeMinutes}),key:e.timeCalc},["00"!==e.timeMinutes?((0,o.wg)(),(0,o.iD)("th",Ep," ")):((0,o.wg)(),(0,o.iD)("th",Up,(0,r.zw)(e.timeString),1)),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.weekdays,(t=>((0,o.wg)(),(0,o.j4)(f,{day:t,time:e.timeCalc,checked:n.checked[t],"onUpdate:checked":e=>n.checked[t]=e,key:t+" - "+e.timeCalc,onUpdate:n.updateAvailability},null,8,["day","time","checked","onUpdate:checked","onUpdate"])))),128))],2)))),128))],32)],2)])}const Ip=["id","name","value","checked"],zp=["for","title"];function Pp(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("td",{class:(0,r.C_)({selected:s.isSelected})},[(0,o._)("input",{id:s.id,type:"checkbox",name:i.day,value:i.time,checked:s.isSelected,onChange:t[0]||(t[0]=(...e)=>s.changeCheck&&s.changeCheck(...e))},null,40,Ip),(0,o._)("label",{for:s.id,title:i.time},(0,r.zw)(i.day)+" "+(0,r.zw)(i.time),9,zp)],2)}var Vp={name:"AvailabilityPickerCell",props:{day:{type:String,required:!0},time:{type:String,required:!0},checked:{type:Array,required:!0}},computed:{id:function(){var e=this.day.toLowerCase(),t=e+this.time;return t.replace(/[^a-z0-9\-_:\]|^[^a-z]+/gi,"")},isSelected:function(){var e=!1,t=this.checked,i=t.indexOf(this.time);return i>=0&&(e=!0),e}},methods:{changeCheck:function(){this.$emit("update")}}};const Wp=(0,he.Z)(Vp,[["render",Pp]]);var Rp=Wp,Lp={name:"AvailabilityTable",store:$J,components:{cell:Rp},props:{modelValue:{type:Object,required:!0},increment:{type:Number,default:null}},emits:["update:modelValue"],data(){return{isMouseDown:!1,erasing:!1,drawing:!1,startRowIndex:null,startCellIndex:null,timeStart:"08:00",timeEnd:"19:00"}},computed:{classes:function(){return{availability:!0,bordered:!0,erasing:this.erasing,drawing:this.drawing}},times:function(){var e=[],t=this.timeStringToMoment(this.timeStart),i=this.timeStringToMoment(this.timeEnd),a=this.increment||60,o=t.clone().subtract(a,"minutes"),r=i.clone();while(o.add(a,"minutes").diff(r)<0)e.push({timeString:o.clone().format(this.settings.global.time_format_moment),timeMinutes:o.clone().locale("en").format("mm"),timeCalc:o.clone().locale("en").format("HH:mm")});return e},checked(){let e={};return this.weekdays.map((t=>{let i=[],a=this.modelValue[t],o=this.increment||60;a&&!wa().isEmpty(a)&&a.map((e=>{let t=fe()(e.time_start,"HH:mm").locale("en"),a=t.clone().subtract(o,"minutes");if(Object.prototype.hasOwnProperty.call(e,"time_end")){let t=fe()(e.time_end,"HH:mm").locale("en");while(a.add(o,"minutes").diff(t)<0)i.push(a.clone().format("HH:mm"))}else i.push(t.clone().format("HH:mm"))})),e[t]=i})),e},weekdays:function(){return this.getWeekdays(this.settings.global.start_of_week)},weekdaysDisplay:function(){fe().locale(this.settings.global.locale);var e=this.settings.global.start_of_week,t=fe().weekdays(!1);if(e>0){var i=t.splice(0,e);t=[...t,...i]}return t},canAddTimeBefore:function(){var e=this.timeStringToMoment(this.timeStart);return!e.isSame(fe()().startOf("day"))},canAddTimeAfter:function(){var e=this.timeStringToMoment(this.timeEnd).add(59,"minute");return!e.isAfter(fe()().endOf("day"))},...(0,m.Se)({getWeekdays:"weekdays"}),...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},beforeMount:function(){this.calculateStartAndEndTimes(),document.addEventListener("mouseup",this.mouseup)},beforeUnmount(){document.removeEventListener("mouseup",this.mouseup)},mounted(){this.updateAvailability()},methods:{calculateStartAndEndTimes:function(){let e=[];for(let l in this.modelValue)Array.prototype.push.apply(e,this.modelValue[l]);if(0===e.length)return;let t=e.map((e=>parseInt(e.time_start.split(":")[0]))),i=e.filter((e=>Object.prototype.hasOwnProperty.call(e,"time_end"))),a=i.map((e=>parseInt(e.time_end.split(":")[0]))),o=t.reduce(((e,t)=>Math.min(e,t))),r=a.length?a.reduce(((e,t)=>Math.max(e,t))):t.reduce(((e,t)=>Math.max(e,t)));this.timeStart=o>=1?(o-1).toString()+":00":o.toString()+":00",this.timeEnd=r<=23?(r+1).toString()+":00":r.toString()+":00"},addTimeBefore:function(){var e=this.timeStringToMoment(this.timeStart).subtract(1,"hour");this.timeStart=e.format("HH:mm")},addTimeAfter:function(){var e=this.timeStringToMoment(this.timeEnd).add(1,"hour");e.isAfter(fe()().endOf("day"))&&e.subtract(1,"minute"),this.timeEnd=e.format("HH:mm")},timeStringToMoment:function(e){var t=fe()(e,["H:mm:ss","HH:mm:ss","H:mm","HH:mm","h:mma","hh:mma","h:mmA","hh:mmA","h:mm","hh:mm"]);return t},updateAvailability:wa().debounce((function(){var e=this.increment||60,t={};this.weekdays.map((i=>{var a=[].slice.call(document.getElementsByName(i)),o=!1,r=0,l=[];a.map(((t,i)=>{if(t.checked&&a.length===i+1){o||l.push({time_start:fe()(t.value,this.settings.global.time_format_moment).locale("en").format("HH:mm:ss")}),o=!1;let i=l[r],a=fe()(t.value,this.settings.global.time_format_moment).locale("en").add(e,"minutes");a.isAfter(fe()().locale("en").endOf("day"))?i.time_end="24:00:00":i.time_end=a.format("HH:mm:ss"),r++}else if(t.checked&&!o){o=!0;var s={time_start:fe()(t.value,this.settings.global.time_format_moment).locale("en").format("HH:mm:ss")};l.push(s)}else if(!t.checked&&o){o=!1;let e=l[r];e.time_end=fe()(t.value,this.settings.global.time_format_moment).locale("en").format("HH:mm:ss"),r++}})),t[i]=l})),this.$emit("update:modelValue",t)}),300),toggleCheck:function(e,t){var i=e.querySelector('input[type="checkbox"]');t&&(this.erasing?i.checked=!1:this.drawing&&(i.checked=!0));var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),i.dispatchEvent(a)},getCellIndex:function(e){for(var t=e.parentNode.childNodes,i=0,a=0;a[(0,o.Wm)(n,{icon:"add"})])),_:1},8,["onClick"])):(0,o.kq)("",!0)]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.weekdays,((i,a)=>((0,o.wg)(),(0,o.iD)("th",{key:a,scope:"col"},[(0,o._)("button",{"aria-label":e.translations.appointmentTypes.availabilityToggle+" "+s.weekdaysDisplay[a],onClick:t[0]||(t[0]=(...e)=>s.toggleCol&&s.toggleCol(...e))},(0,r.zw)(s.weekdaysDisplay[a]),9,Hp)])))),128))])]),(0,o._)("tfoot",null,[(0,o._)("tr",null,[(0,o._)("th",null,[s.canAddTimeAfter?((0,o.wg)(),(0,o.j4)(d,{key:0,onClick:s.addTimeAfter,class:"addTimeAfterBtn",size:"small",mode:"raised"},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{icon:"add"})])),_:1},8,["onClick"])):(0,o.kq)("",!0)]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.weekdays,(e=>((0,o.wg)(),(0,o.iD)("td",{key:e}," ")))),128))])]),(0,o._)("tbody",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.times,(i=>((0,o.wg)(),(0,o.iD)("tr",{key:i.timeCalc,class:(0,r.C_)({hour:"00"===i.timeMinutes})},[(0,o._)("th",Zp,[(0,o._)("button",{"aria-label":e.translations.appointmentTypes.availabilityToggle+" "+i.timeString,onClick:t[1]||(t[1]=(...e)=>s.toggleRow&&s.toggleRow(...e))},(0,r.zw)(i.timeString),9,Yp)]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.weekdays,(e=>((0,o.wg)(),(0,o.j4)(p,{day:e,time:i.timeCalc,checked:s.checked[e],"onUpdate:checked":t=>s.checked[e]=t,key:e+" - "+i.timeCalc,onUpdate:s.updateAvailability},null,8,["day","time","checked","onUpdate:checked","onUpdate"])))),128))],2)))),128))])])])}const Jp=["id","name","value","checked"],Xp=["for","title"];function Qp(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("td",null,[(0,o._)("input",{type:"checkbox",id:s.id,class:"single-time",name:i.day,value:i.time,checked:s.isSelected,onChange:t[0]||(t[0]=(...e)=>s.changeCheck&&s.changeCheck(...e))},null,40,Jp),(0,o._)("label",{for:s.id,title:i.time},(0,r.zw)(i.day)+" "+(0,r.zw)(i.time),9,Xp)])}var ef={name:"StartTimePickerCell",props:{day:{type:String,required:!0},time:{type:String,required:!0},checked:{type:Array,required:!0}},computed:{id(){let e=this.day.toLowerCase(),t=e+this.time;return t.replace(/[^a-z0-9\-_:\]|^[^a-z]+/gi,"")},isSelected(){let e=this.checked,t=e.indexOf(this.time);return t>=0}},methods:{changeCheck(){this.$emit("update")}}};const tf=(0,he.Z)(ef,[["render",Qp]]);var af=tf,of={name:"StartTimes",components:{cell:af},props:["modelValue","increment"],emits:["update:modelValue"],data(){return{isShiftPressed:!1,startCellIndex:null,startCellState:!1,startRowIndex:null,table:null,timeStart:"9:00",timeEnd:"18:00"}},beforeMount(){this.calculateStartAndEndTimes()},mounted(){this.updateAvailability(),this.table=document.querySelector(".start-times"),this.table.addEventListener("change",this.toggleRange),document.addEventListener("keyup",this.detectShift),document.addEventListener("keydown",this.detectShift)},beforeUnmount(){this.table.removeEventListener("change",this.toggleRange),document.removeEventListener("keyup",this.detectShift),document.removeEventListener("keydown",this.detectShift)},computed:{canAddTimeAfter(){let e=this.timeStringToMoment(this.timeEnd).add(59,"minute");return!e.isAfter(fe()().endOf("day"))},canAddTimeBefore(){let e=this.timeStringToMoment(this.timeStart);return!e.isSame(fe()().startOf("day"))},checked(){let e={};return this.weekdays.map((t=>{let i=[],a=this.modelValue[t],o=this.increment||60;a&&!wa().isEmpty(a)&&a.map((e=>{let t=fe()(e.time_start,"H:mm"),a=t.clone().subtract(o,"minutes");if(Object.prototype.hasOwnProperty.call(e,"time_end")){let t=fe()(e.time_end,"H:mm");while(a.add(o,"minutes").diff(t)<0)i.push(a.clone().format("H:mm"))}else i.push(t.clone().format("H:mm"))})),e[t]=i})),e},times(){let e=[],t=this.timeStringToMoment(this.timeStart),i=this.timeStringToMoment(this.timeEnd),a=this.increment||60,o=t.clone().subtract(a,"minutes"),r=i.clone();while(o.add(a,"minutes").diff(r)<0)e.push({timeString:o.clone().format(this.settings.global.time_format_moment),timeMinutes:o.clone().format("mm"),timeCalc:o.clone().format("H:mm")});return e},weekdays(){return this.getWeekdays(this.settings.global.start_of_week)},weekdaysDisplay(){fe().locale(this.settings.global.locale);let e=this.settings.global.start_of_week,t=fe().weekdays(!1);if(e>0){let i=t.splice(0,e);t=[...t,...i]}return t},...(0,m.Se)({getWeekdays:"weekdays"}),...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{addTimeAfter(){let e=this.timeStringToMoment(this.timeEnd).add(1,"hour");e.isAfter(fe()().endOf("day"))&&e.subtract(1,"minute"),this.timeEnd=e.format("H:mm")},addTimeBefore(){let e=this.timeStringToMoment(this.timeStart).subtract(1,"hour");this.timeStart=e.format("H:mm")},calculateStartAndEndTimes(){let e=[];for(let l in this.modelValue)Array.prototype.push.apply(e,this.modelValue[l]);if(0===e.length)return;let t=e.map((e=>parseInt(e.time_start.split(":")[0]))),i=e.filter((e=>Object.prototype.hasOwnProperty.call(e,"time_end"))),a=i.map((e=>parseInt(e.time_end.split(":")[0]))),o=t.reduce(((e,t)=>Math.min(e,t))),r=a.length?a.reduce(((e,t)=>Math.max(e,t))):t.reduce(((e,t)=>Math.max(e,t)));this.timeStart=o>=1?(o-1).toString()+":00":o.toString()+":00",this.timeEnd=r<=23?(r+1).toString()+":00":r.toString()+":00"},detectShift(e){this.isShiftPressed=e.shiftKey},getCellIndex:function(e){for(var t=e.parentNode.childNodes,i=0,a=0;a=0&&this.startRowIndex>=0){let i=this.getCellIndex(t),a=this.getRowIndex(t),o=a{let i=[].slice.call(document.getElementsByName(t)),a=[];i.map((e=>{e.checked&&a.push({time_start:fe()(e.value,this.settings.global.time_format_moment).format("HH:mm:ss")})})),e[t]=a})),this.$emit("update:modelValue",e)}),300)}};const rf=(0,he.Z)(of,[["render",Kp]]);var lf=rf,sf={name:"AppointmentTypeAvailability",components:{AvailabilityPicker:qp,StartTimePicker:lf,DateTimePicker:ar},data(){return{options:X,validAvailabilityWindow:!0}},computed:{availability_end_date:{get(){return this.currentAppointmentType?this.currentAppointmentType.availability_end_date:null},set(e){this.updateCurrentAppointmentType({key:"availability_end_date",value:e})}},availability_start_date:{get(){return this.currentAppointmentType?this.currentAppointmentType.availability_start_date:null},set(e){this.updateCurrentAppointmentType({key:"availability_start_date",value:e})}},availability_type:{get(){return this.currentAppointmentType.availability_type},set(e){this.updateCurrentAppointmentType({key:"availability_type",value:e})}},increment:{get(){return parseInt(this.currentAppointmentType.availability_increment,10)},set(e){const t=parseInt(e,10);this.updateCurrentAppointmentType({key:"availability_increment",value:t})}},availability:{get(){return this.currentAppointmentType.availability},set(e){this.updateCurrentAppointmentType({key:"availability",value:e})}},appointmentTypeLabel(){return this.labelInfo(this.currentAppointmentType.label_id,"color")||"light-green"},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("advanced_scheduling",["advancedSchedulingModule"]),...(0,m.Se)("appointment_types",["labelInfo"])},methods:{updateAvailability(){"available_blocks"===this.availability_type?this.$refs["availability-field"].updateAvailability():this.$refs["start-time-field"].updateAvailability()},validateAvailabilityWindow(){let e=fe().utc(this.availability_start_date,this.timestampFormat).locale("en"),t=fe().utc(this.availability_end_date,this.timestampFormat).locale("en");e.isValid()&&t.isValid()?this.validAvailabilityWindow=e.isBefore(t):this.validAvailabilityWindow=!0,this.$emit("validationCheck",this.validAvailabilityWindow)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const nf=(0,he.Z)(sf,[["render",Op]]);var df=nf;const pf={class:"appt-type-scheduling"},ff={class:"subsection-title"},uf={class:"subsection-description"},cf={key:0},hf={key:1},mf={class:"appointment-scheduling-section"},gf={class:"appointment-scheduling-section-header"},_f={class:"subsection-title"},yf={class:"subsection-description"},wf={class:"appointment-duration-fields"},xf={class:"inline-label"},Cf={class:"md-subheading"},vf={class:"inline-label"},bf={class:"md-subheading"},Bf={class:"appointment-scheduling-section"},Sf={class:"appointment-scheduling-section-header"},kf={class:"subsection-title"},Af={class:"subsection-description"},Mf={class:"appointment-duration-fields"},Df={class:"inline-label"},Tf={class:"md-subheading"},Of={class:"appointment-scheduling-section"},Gf={class:"appointment-scheduling-section-header"},Ef={class:"subsection-title"},Uf={class:"subsection-description"},Ff={class:"appointment-duration-fields"},If={class:"inline-label"},zf={class:"md-subheading"},Pf={class:"appointment-scheduling-section booking-section"},Vf={class:"appointment-scheduling-section-header"},Wf={class:"subsection-title"},Rf={class:"subsection-description"},Lf={class:"subsection-title"},jf={class:"subsection-description"};function qf(e,t,i,a,l,s){const n=(0,o.up)("foxy-radio"),d=(0,o.up)("router-link"),p=(0,o.up)("duration"),f=(0,o.up)("foxy-layout"),u=(0,o.up)("date-time-picker"),c=(0,o.up)("foxy-checkbox"),h=(0,o.up)("foxy-textfield");return(0,o.wg)(),(0,o.iD)("div",pf,[(0,o._)("h3",ff,(0,r.zw)(e.translations.appointmentTypes.timezoneStyle),1),(0,o._)("p",uf,(0,r.zw)(e.translations.appointmentTypes.timezoneStyleHelp),1),(0,o._)("div",null,[(0,o.Wm)(n,{modelValue:s.timezone_style,"onUpdate:modelValue":t[0]||(t[0]=e=>s.timezone_style=e),"data-test":"test-tzstyle-localized",id:"tzstyle-localized",name:"timezone_style",value:"localized",label:e.translations.appointmentTypes.timezoneStyleLocalized},null,8,["modelValue","label"]),(0,o.Wm)(n,{modelValue:s.timezone_style,"onUpdate:modelValue":t[1]||(t[1]=e=>s.timezone_style=e),"data-test":"test-tzstyle-locked",id:"tzstyle-locked",name:"timezone_style",value:"locked",label:e.translations.appointmentTypes.timezoneStyleLocked},null,8,["modelValue","label"])]),"locked"===s.timezone_style?((0,o.wg)(),(0,o.iD)("div",cf,[(0,o._)("p",null,(0,r.zw)(e.translations.appointmentTypes.timezoneStyleLockedHelp),1),(0,o._)("p",null,[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.timezoneStyleYourTimezone)+" ",1),(0,o._)("strong",null,(0,r.zw)(e.formatTimezone(e.settings.global.timezone_string))+" ",1),(0,o.Wm)(d,{to:"/ssa/settings/general"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.edit),1)])),_:1})])])):((0,o.wg)(),(0,o.iD)("p",hf,(0,r.zw)(e.translations.appointmentTypes.timezoneStyleLocalizedHelp),1)),(0,o._)("div",mf,[(0,o._)("div",gf,[(0,o._)("h3",_f,(0,r.zw)(e.translations.appointmentTypes.buffer),1),(0,o._)("p",yf,(0,r.zw)(e.translations.appointmentTypes.buffer_help),1)]),(0,o._)("div",wf,[(0,o.Wm)(f,{class:"complex-field"},{default:(0,o.w5)((()=>[(0,o._)("div",xf,[(0,o._)("p",Cf,(0,r.zw)(e.translations.appointmentTypes.scheduling.before),1)]),(0,o.Wm)(p,{modelValue:l.v$.buffer_before.$model,"onUpdate:modelValue":t[2]||(t[2]=e=>l.v$.buffer_before.$model=e),"allow-null":!0,"help-text":e.translations.appointmentTypes.buffer_before},null,8,["modelValue","help-text"])])),_:1}),(0,o.Wm)(f,{class:"complex-field"},{default:(0,o.w5)((()=>[(0,o._)("div",vf,[(0,o._)("p",bf,(0,r.zw)(e.translations.appointmentTypes.scheduling.after),1)]),(0,o.Wm)(p,{modelValue:l.v$.buffer_after.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>l.v$.buffer_after.$model=e),"allow-null":!0,"help-text":e.translations.appointmentTypes.buffer_after},null,8,["modelValue","help-text"])])),_:1})])]),(0,o._)("div",Bf,[(0,o._)("div",Sf,[(0,o._)("h3",kf,(0,r.zw)(e.translations.appointmentTypes.notice),1),(0,o._)("p",Af,(0,r.zw)(e.translations.appointmentTypes.notice_help),1)]),(0,o._)("div",Mf,[(0,o.Wm)(f,{class:(0,r.C_)(["complex-field",{"md-input-invalid":!l.validMinMax}])},{default:(0,o.w5)((()=>[(0,o._)("div",Df,[(0,o._)("p",Tf,(0,r.zw)(e.translations.appointmentTypes.min_booking_notice),1)]),(0,o.Wm)(p,{modelValue:l.v$.min_booking_notice.$model,"onUpdate:modelValue":t[4]||(t[4]=e=>l.v$.min_booking_notice.$model=e),"allow-null":!0,"help-text":e.translations.appointmentTypes.min_booking_notice_help,"error-text":s.minBookingNoticeErrorMessage},null,8,["modelValue","help-text","error-text"])])),_:1},8,["class"])])]),e.advancedSchedulingModule.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o._)("div",Of,[(0,o._)("div",Gf,[(0,o._)("h3",Ef,(0,r.zw)(e.translations.appointmentTypes.advance),1),(0,o._)("p",Uf,(0,r.zw)(e.translations.appointmentTypes.advance_help),1)]),(0,o._)("div",Ff,[(0,o.Wm)(f,{class:(0,r.C_)(["complex-field",{"md-input-invalid":!l.validMinMax}])},{default:(0,o.w5)((()=>[(0,o._)("div",If,[(0,o._)("p",zf,(0,r.zw)(e.translations.appointmentTypes.max_booking_notice),1)]),(0,o.Wm)(p,{modelValue:l.v$.max_booking_notice.$model,"onUpdate:modelValue":t[5]||(t[5]=e=>l.v$.max_booking_notice.$model=e),"allow-null":!0,"help-text":e.translations.appointmentTypes.max_booking_notice_help,"error-text":s.maxBookingNoticeErrorMessage},null,8,["modelValue","help-text","error-text"])])),_:1},8,["class"])])]),(0,o._)("div",Pf,[(0,o._)("div",Vf,[(0,o._)("h3",Wf,(0,r.zw)(e.translations.appointmentTypes.booking_window),1),(0,o._)("p",Rf,(0,r.zw)(e.translations.appointmentTypes.booking_window_help),1)]),(0,o._)("div",null,[(0,o.Wm)(u,{label:e.translations.appointmentTypes.booking_start_date,"error-text":e.translations.settings.advanced_scheduling.booking_window_error,"is-valid":l.validBookingWindow,modelValue:s.booking_start_date,"onUpdate:modelValue":[t[6]||(t[6]=e=>s.booking_start_date=e),s.validationCheck]},null,8,["label","error-text","is-valid","modelValue","onUpdate:modelValue"]),(0,o.Wm)(u,{label:e.translations.appointmentTypes.booking_end_date,"error-text":e.translations.settings.advanced_scheduling.booking_window_error,"is-valid":l.validBookingWindow,modelValue:s.booking_end_date,"onUpdate:modelValue":[t[7]||(t[7]=e=>s.booking_end_date=e),s.validationCheck]},null,8,["label","error-text","is-valid","modelValue","onUpdate:modelValue"])])])],64)):(0,o.kq)("",!0),(0,o._)("h3",Lf,(0,r.zw)(e.translations.appointmentTypes.max),1),(0,o._)("p",jf,(0,r.zw)(e.translations.appointmentTypes.max_help),1),(0,o.Wm)(f,{"md-column":""},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{id:"limitmax",name:"limitmax",modelValue:l.isLimitmaxChecked,"onUpdate:modelValue":t[8]||(t[8]=e=>l.isLimitmaxChecked=e),label:e.translations.appointmentTypes.limitmax},null,8,["modelValue","label"])])),_:1}),l.isLimitmaxChecked?((0,o.wg)(),(0,o.j4)(f,{key:3,"md-column":""},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,{type:"number",min:"1",onChange:s.validationCheck,modelValue:s.max_event_count,"onUpdate:modelValue":t[9]||(t[9]=e=>s.max_event_count=e),label:e.translations.appointmentTypes.max_event_count,helptext:l.validPerDayLimit?"":e.translations.settings.advanced_scheduling.perDayLimitError,"helptext-persistent":"","helptext-validation":"",id:"max_event_count",valid:l.validPerDayLimit},null,8,["onChange","modelValue","label","helptext","valid"])])),_:1})])),_:1})):(0,o.kq)("",!0)])}var Nf={name:"AppointmentTypeScheduling",store:$J,components:{Duration:Wd,DateTimePicker:ar},data(){return{v$:(0,Rd.Xw)(),options:X,moment:fe(),validBookingWindow:!0,validMinMax:!0,isLimitmaxChecked:!1,validPerDayLimit:!0}},validations:{buffer_before:{minValue:(0,Ld.uv)(0)},buffer_after:{minValue:(0,Ld.uv)(0)},min_booking_notice:{minValue:(0,Ld.uv)(0)},max_booking_notice:{minValue:(0,Ld.uv)(0)}},mounted(){this.max_event_count>0&&(this.isLimitmaxChecked=!0)},watch:{isLimitmaxChecked(e){e?this.max_event_count=this.currentAppointmentType.max_event_count>0?this.currentAppointmentType.max_event_count:3:(this.max_event_count="",this.validationCheck())}},computed:{timezone_style:{get(){return this.currentAppointmentType&&this.currentAppointmentType.timezone_style?this.currentAppointmentType.timezone_style:"localized"},set(e){this.updateCurrentAppointmentType({key:"timezone_style",value:e})}},booking_end_date:{get(){return this.currentAppointmentType?this.currentAppointmentType.booking_end_date:""},set(e){this.updateCurrentAppointmentType({key:"booking_end_date",value:e})}},booking_start_date:{get(){return this.currentAppointmentType?this.currentAppointmentType.booking_start_date:""},set(e){this.updateCurrentAppointmentType({key:"booking_start_date",value:e})}},buffer_after:{get(){return this.currentAppointmentType?this.currentAppointmentType.buffer_after:""},set(e){this.updateCurrentAppointmentType({key:"buffer_after",value:e}),this.validationCheck()}},bufferAfterError(){return this.v$.buffer_after.$invalid},buffer_before:{get(){return this.currentAppointmentType?this.currentAppointmentType.buffer_before:""},set(e){this.updateCurrentAppointmentType({key:"buffer_before",value:e}),this.validationCheck()}},bufferBeforeError(){return this.v$.buffer_before.$invalid},min_booking_notice:{get(){return this.currentAppointmentType?this.currentAppointmentType.min_booking_notice:""},set(e){this.updateCurrentAppointmentType({key:"min_booking_notice",value:e}),this.validationCheck()}},minBookingNoticeError(){return this.v$.min_booking_notice.$invalid},minBookingNoticeErrorMessage(){return this.advancedSchedulingModule.enabled&&!this.validMinMax&&this.min_booking_notice>=1&&this.max_booking_notice>=1?this.translations.appointmentTypes.min_max_error:""},max_booking_notice:{get(){let e=null;return this.currentAppointmentType&&(e=this.currentAppointmentType.max_booking_notice),0!==e&&"0"!==e||(e=""),e},set(e){this.updateCurrentAppointmentType({key:"max_booking_notice",value:e}),this.validationCheck()}},maxBookingNoticeError(){return this.v$.max_booking_notice.$invalid},maxBookingNoticeErrorMessage(){if(this.advancedSchedulingModule.enabled){if(this.max_booking_notice<1)return this.translations.appointmentTypes.max_booking_notice_error;if(!this.validMinMax&&this.max_booking_notice>=1&&this.min_booking_notice>=1)return this.translations.appointmentTypes.min_max_error}return""},max_event_count:{get(){return this.currentAppointmentType?this.currentAppointmentType.max_event_count:""},set(e){this.updateCurrentAppointmentType({key:"max_event_count",value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","timestampFormat"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)(["formatTimezone"]),...(0,m.Se)("advanced_scheduling",["advancedSchedulingModule"])},methods:{validationCheck(){let e=fe().utc(this.booking_start_date,this.timestampFormat),t=fe().utc(this.booking_end_date,this.timestampFormat);e.isValid()&&t.isValid()?this.validBookingWindow=e.isBefore(t):this.validBookingWindow=!0;let i=this.min_booking_notice?parseInt(this.min_booking_notice,10):null,a=this.max_booking_notice?parseInt(this.max_booking_notice,10):null;this.validMinMax=null===i&&null===a||!(i&&a&&a<=i)&&0!==a,this.isLimitmaxChecked?this.validPerDayLimit=parseInt(this.max_event_count,10)>0:this.validPerDayLimit=!0,this.$emit("validationCheck",this.validBookingWindow&&this.validMinMax&&this.validPerDayLimit&&!this.bufferBeforeError&&!this.bufferAfterError&&!this.maxBookingNoticeError&&!this.minBookingNoticeError)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const $f=(0,he.Z)(Nf,[["render",qf]]);var Hf=$f;const Zf={class:"appt-type-payments"},Yf={class:"subsection-title"},Kf={class:"subsection-description"},Jf={class:"radio-list"},Xf=(0,o._)("hr",null,null,-1),Qf=["value"],eu={key:0,class:"md-error"},tu={class:"subsection-title"},iu={class:"check-list"},au={key:0},ou={class:"check-list"},ru={class:"subsection-title"},lu={key:0,class:"error-message"};function su(e,t,i,l,s,n){const d=(0,o.up)("foxy-radio"),p=(0,o.up)("foxy-textfield"),f=(0,o.up)("foxy-layout"),u=(0,o.up)("foxy-select2"),c=(0,o.up)("foxy-input-container"),h=(0,o.up)("foxy-switch"),m=(0,o.up)("foxy-checkbox-multi"),g=(0,o.up)("foxy-button"),_=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.iD)("div",Zf,[e.activePaymentMethods.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("h3",Yf,(0,r.zw)(e.translations.appointmentTypes.payments.requiredPaymentTitle),1),(0,o._)("p",Kf,(0,r.zw)(e.translations.appointmentTypes.payments.requiredPayment),1),(0,o._)("div",Jf,[(0,o.Wm)(d,{modelValue:n.payment_required,"onUpdate:modelValue":t[0]||(t[0]=e=>n.payment_required=e),label:e.translations.appointmentTypes.payments.required,id:"payment-required",name:"payment_required",value:"required"},null,8,["modelValue","label"]),(0,o.Wm)(d,{modelValue:n.payment_required,"onUpdate:modelValue":t[1]||(t[1]=e=>n.payment_required=e),label:e.translations.appointmentTypes.payments.optional,id:"payment-optional",name:"payment_required",value:"optional"},null,8,["modelValue","label"]),(0,o.Wm)(d,{modelValue:n.payment_required,"onUpdate:modelValue":t[2]||(t[2]=e=>n.payment_required=e),label:e.translations.appointmentTypes.payments.none,id:"payment-none",name:"payment_required",value:"none"},null,8,["modelValue","label"])]),n.paymentsEnabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[Xf,(0,o.Wm)(f,{"md-gutter":!0,class:"col3-big-middle"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{modelValue:l.v$.price.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>l.v$.price.$model=e),modelModifiers:{number:!0,trim:!0},label:e.translations.appointmentTypes.payments.price,helptext:l.v$.price.$invalid?n.price_error:"","helptext-persistent":"","helptext-validation":"",min:"0",type:"number",onChange:n.tidyPrice,required:"",step:"any",valid:!l.v$.price.$invalid},null,8,["modelValue","label","helptext","onChange","valid"])])),_:1}),(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{label:e.translations.appointmentTypes.payments.currency,name:"currency",id:"currency",onInput:n.tidyPrice,modelValue:l.v$.currency.$model,"onUpdate:modelValue":t[4]||(t[4]=e=>l.v$.currency.$model=e)},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.currencies,(e=>((0,o.wg)(),(0,o.iD)("option",{value:e.code,key:e.number},(0,r.zw)(e.currency)+" ("+(0,r.zw)(e.code)+") ",9,Qf)))),128))])),_:1},8,["label","onInput","modelValue"]),l.v$.currency.$invalid&&l.v$.currency.$dirty?((0,o.wg)(),(0,o.iD)("span",eu,(0,r.zw)(e.translations.appointmentTypes.payments.currencyError),1)):(0,o.kq)("",!0)])),_:1})])),_:1}),(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.wy)((0,o.Wm)(p,{outline:"",class:"readonly",modelValue:n.display_price,"onUpdate:modelValue":t[5]||(t[5]=e=>n.display_price=e),label:e.translations.appointmentTypes.payments.displayPrice,readonly:""},null,8,["modelValue","label"]),[[a.F8,n.price]])])),_:1})])),_:1}),(0,o._)("h3",tu,(0,r.zw)(e.translations.appointmentTypes.payments.refundPolicySection.title),1),(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{modelValue:n.refund_policy,"onUpdate:modelValue":t[6]||(t[6]=e=>n.refund_policy=e),label:e.translations.appointmentTypes.payments.refundPolicy,valid:!l.v$.refund_policy.$invalid,required:n.isRefundPolicyTxtRequired,helptext:l.v$.refund_policy.$invalid?e.translations.appointmentTypes.payments.refundPolicySection.required.textEmptyError:e.translations.appointmentTypes.payments.refundPolicyHelp,"helptext-persistent":"","helptext-validation":"",rows:"3",id:"refund-policy-text","aria-required":n.isRefundPolicyTxtRequired?"true":"false",multiline:""},null,8,["modelValue","label","valid","required","helptext","aria-required"])])),_:1}),(0,o.Wm)(h,{modelValue:n.refundPolicyRequired,"onUpdate:modelValue":t[7]||(t[7]=e=>n.refundPolicyRequired=e),id:"refundPolicyRequired",name:"refundPolicyRequired"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.payments.refundPolicySection.required.switchLabel),1)])),_:1},8,["modelValue"]),n.refundPolicyRequired?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("p",null,(0,r.zw)(e.translations.appointmentTypes.payments.refundPolicySection.required.checkboxMessage),1),(0,o.Wm)(p,{modelValue:n.refundCheckboxLabel,"onUpdate:modelValue":t[8]||(t[8]=e=>n.refundCheckboxLabel=e),label:e.translations.appointmentTypes.payments.refundPolicySection.required.checkboxLabel,helptext:l.v$.refundCheckboxLabel.$invalid?e.translations.appointmentTypes.payments.refundPolicySection.required.labelEmptyError:e.translations.appointmentTypes.payments.refundPolicySection.required.helperText,"helptext-persistent":"","helptext-validation":"",id:"checkbox-label","aria-describedby":"checkbox-label-description","aria-required":"true",onChange:n.validationCheck,valid:!l.v$.refundCheckboxLabel.$invalid},null,8,["modelValue","label","helptext","onChange","valid"])],64)):(0,o.kq)("",!0),(0,o._)("fieldset",iu,[(0,o._)("legend",null,(0,r.zw)(e.translations.appointmentTypes.payments.refundPolicySection.display.title),1),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.displayPolicyOptions,((i,a)=>((0,o.wg)(),(0,o.iD)("div",{class:"check-item",key:a},[((0,o.wg)(),(0,o.j4)(m,{key:a,id:i,name:"displayPolicyOptions",value:i,disabled:"customerInformationScreen"===i,theme:e.currentAppointmentType.label?e.currentAppointmentType.label:"light-green",theming:"primary",modelValue:n.whereToDisplayPolicy,"onUpdate:modelValue":t[9]||(t[9]=e=>n.whereToDisplayPolicy=e)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.payments.refundPolicySection.display.options[i])+" ",1),"customerInformationScreen"===i?((0,o.wg)(),(0,o.iD)("span",au," - "+(0,r.zw)(e.translations.appointmentTypes.payments.refundPolicySection.display.default),1)):(0,o.kq)("",!0)])),_:2},1032,["id","value","disabled","theme","modelValue"]))])))),128))]),(0,o._)("fieldset",ou,[(0,o._)("legend",null,[(0,o._)("h3",ru,(0,r.zw)(e.translations.appointmentTypes.payments.paymentMethods),1)]),l.v$.payment_methods.$invalid?((0,o.wg)(),(0,o.iD)("p",lu,(0,r.zw)(e.translations.appointmentTypes.payments.paymentMethodsError),1)):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.activePaymentMethods,((i,a)=>((0,o.wg)(),(0,o.iD)("div",{class:"check-item",key:a},[((0,o.wg)(),(0,o.j4)(m,{key:a,id:"payment-method-"+a,name:"payment-methods",value:i,theme:e.currentAppointmentType.label?e.currentAppointmentType.label:"light-green",theming:"primary",modelValue:l.v$.payment_methods.$model,"onUpdate:modelValue":t[10]||(t[10]=e=>l.v$.payment_methods.$model=e)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.displayGateway(i)),1)])),_:2},1032,["id","value","theme","modelValue"]))])))),128))])],64)):(0,o.kq)("",!0)],64)):((0,o.wg)(),(0,o.j4)(_,{key:1,label:e.translations.appointmentTypes.payments.noGateways},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/payments"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.payments.setup),1)])),_:1})])),_:1},8,["label"]))])}var nu={setup(){return{v$:(0,Rd.Xw)()}},name:"AppointmentTypePayments",data(){return{currencies:V,paymentInfo:{},displayPolicyOptions:j}},validations(){return{price:{required:(0,Ld.CF)((()=>this.paymentsEnabled)),minVal:(0,Ld.uv)(this.currencyObj.min),decimal:Ld.gH},currency:{required:(0,Ld.CF)((()=>this.paymentsEnabled))},payment_methods:{required:(0,Ld.CF)((()=>this.paymentsEnabled))},refundCheckboxLabel:{required:(0,Ld.CF)((()=>this.checkboxLabelRequired))},refund_policy:{required:(0,Ld.CF)((()=>this.checkboxLabelRequired))}}},mounted(){var e=wa().cloneDeep(this.currentAppointmentType.payments);wa().isEmpty(e)&&(e={},e.payment_methods=this.activePaymentMethods.slice(0),e.currency=this.settings.payments.default_currency),this.paymentInfo=e,this.paymentInfo.refund_policy_checkbox_label||(this.paymentInfo.refund_policy_checkbox_label=this.translations.appointmentTypes.payments.refundPolicySection.required.defaultLabel)},watch:{paymentInfo:{handler(e){this.updateCurrentAppointmentType({key:"payments",value:wa().cloneDeep(e)})},deep:!0},refund_policy:{handler(){this.validationCheck()}},checkboxLabelRequired:{handler(){this.validationCheck()}},payment_required:{handler(){this.validationCheck()}},paymentsEnabled:{handler(){this.validationCheck()}},display_price:{handler(){this.validationCheck()}}},computed:{price:{get(){return this.paymentInfo.price?this.paymentInfo.price:null},set(e){this.paymentInfo.price=e,this.validationCheck()}},price_error(){return"USD"===this.currency?this.translations.appointmentTypes.payments.priceUSDError:this.translations.appointmentTypes.payments.priceError+parseFloat(this.currencyObj.min).toFixed(this.currencyObj.digits)},currency:{get(){return this.paymentInfo.currency?this.paymentInfo.currency:this.settings.payments.default_currency},set(e){this.paymentInfo.currency=e,this.validationCheck()}},currencyObj(){return this.currencies.find((e=>this.currency===e.code))},display_price(){let e=this.settings.global.locale.replace("_","-");e=e.replace("_formal",""),e=e.replace("_informal","");let t=parseFloat(this.price);return t?new Intl.NumberFormat(e,{style:"currency",currency:this.currency}).format(t):null},refund_policy:{get(){return this.paymentInfo.refund_policy?this.paymentInfo.refund_policy:""},set(e){this.paymentInfo.refund_policy=e}},refundPolicyRequired:{get(){return!!this.paymentInfo.refund_policy_required&&this.paymentInfo.refund_policy_required},set(e){this.paymentInfo.refund_policy_required=e,this.validationCheck()}},checkboxLabelRequired(){return!0===this.refundPolicyRequired},refundCheckboxLabel:{get(){return this.paymentInfo.refund_policy_checkbox_label?this.paymentInfo.refund_policy_checkbox_label:""},set(e){this.paymentInfo.refund_policy_checkbox_label=e,this.validationCheck()}},whereToDisplayPolicy:{get(){return this.paymentInfo.refund_policy_display_screen?this.paymentInfo.refund_policy_display_screen:["customerInformationScreen","confirmationScreen"]},set(e){this.paymentInfo.refund_policy_display_screen=e}},isRefundPolicyTxtRequired(){return!0===this.refundPolicyRequired},payment_methods:{get(){return this.paymentInfo.payment_methods?this.paymentInfo.payment_methods:this.activePaymentMethods.slice(0)},set(e){this.paymentInfo.payment_methods=e,this.validationCheck()}},payment_required:{get(){return this.paymentInfo.payment_required?this.paymentInfo.payment_required:"none"},set(e){this.paymentInfo.payment_required=e,this.validationCheck()}},paymentsEnabled(){return"none"!==this.payment_required},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("payments",["activePaymentMethods","displayGateway"])},methods:{validationCheck(){this.$emit("validationCheck",!this.v$.$invalid)},tidyPrice(){null!==this.price&&(this.price=parseFloat(this.price).toFixed(this.currencyObj.digits))},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const du=(0,he.Z)(nu,[["render",su]]);var pu=du;const fu={class:"appt-type-staff"},uu={class:"md-subheading caption-pair"},cu={class:"md-caption caption-pair"},hu={class:"radio-list"},mu={key:0,class:"radio-list",role:"radiogroup","aria-labelledby":"groupLabel",style:{"padding-left":"2rem"}},gu={id:"groupLabel",class:"screen-reader-text"},_u={class:"md-subheading"},yu={class:"staff-list-assossiated"};function wu(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-radio"),f=(0,o.up)("foxy-notification"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-checkbox"),h=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.iD)("div",fu,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,size:"body",message:e.translations.settings.staff.loading},null,8,["message"])):e.staffStatusPublish.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(d,{tag:"md-button",class:"md-primary right-align-link",to:"/ssa/settings/staff"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.actions.manageTeamMembers),1)])),_:1}),(0,o._)("div",null,[(0,o._)("h3",uu,(0,r.zw)(e.translations.settings.staff.appointmentType.staffEnableHeading),1),(0,o._)("p",cu,(0,r.zw)(e.translations.settings.staff.appointmentType.staffEnableDesc),1),(0,o._)("div",hu,[(0,o.Wm)(p,{modelValue:s.staffRequired,"onUpdate:modelValue":t[0]||(t[0]=e=>s.staffRequired=e),id:"staff-user-preference",name:"staffRequired",value:"user_preference"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.appointmentType.userPreferenceLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.staff.appointmentType.userPreferenceDesc),1)])),_:1},8,["modelValue"]),(0,o.Wm)(p,{modelValue:s.staffRequired,"onUpdate:modelValue":t[1]||(t[1]=e=>s.staffRequired=e),id:"staff-any",name:"staffRequired",value:"any"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.appointmentType.anyLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.staff.appointmentType.anyDesc),1)])),_:1},8,["modelValue"]),"any"==s.staffRequired?((0,o.wg)(),(0,o.iD)("div",mu,[(0,o._)("div",gu,(0,r.zw)(e.translations.settings.staff.appointmentType.assignmentLabel),1),(0,o.Wm)(p,{modelValue:s.staffAssignment,"onUpdate:modelValue":t[2]||(t[2]=e=>s.staffAssignment=e),name:"staff-assignment",value:"random"},{default:(0,o.w5)((()=>[(0,o._)("span",null,[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.appointmentType.randomAssignmentLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.staff.appointmentType.randomAssignmentDesc),1)])])),_:1},8,["modelValue"]),(0,o.Wm)(p,{modelValue:s.staffAssignment,"onUpdate:modelValue":t[3]||(t[3]=e=>s.staffAssignment=e),name:"staff-assignment",value:"round_robin"},{default:(0,o.w5)((()=>[(0,o._)("span",null,[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.appointmentType.roundRobinAssignmentLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.staff.appointmentType.roundRobinAssignmentDesc),1)])])),_:1},8,["modelValue"])])):(0,o.kq)("",!0),(0,o.Wm)(p,{modelValue:s.staffRequired,"onUpdate:modelValue":t[4]||(t[4]=e=>s.staffRequired=e),id:"staff-all",name:"staffRequired",value:"all"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.appointmentType.allLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.staff.appointmentType.allDesc),1)])),_:1},8,["modelValue"]),(0,o.Wm)(p,{modelValue:s.staffRequired,"onUpdate:modelValue":t[5]||(t[5]=e=>s.staffRequired=e),id:"staff-none",name:"staffRequired",value:""},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.appointmentType.noneLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.staff.appointmentType.noneDesc),1)])),_:1},8,["modelValue"])])]),s.staffError?((0,o.wg)(),(0,o.j4)(f,{key:0,icon:"warning",theme:"orange"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.appointmentType.staffWarning),1)])),_:1})):(0,o.kq)("",!0),""!==s.staffRequired?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o._)("h3",_u,(0,r.zw)(e.translations.settings.staff.appointmentType.teamLabel),1),(0,o._)("div",yu,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.staffStatusPublish,(i=>((0,o.wg)(),(0,o.j4)(c,{key:i.id,modelValue:s.selectedStaff,"onUpdate:modelValue":t[6]||(t[6]=e=>s.selectedStaff=e),id:"staff-"+i.id,name:"staff-"+i.id,value:i.id,class:"staff-item",label:i.display_name},{default:(0,o.w5)((()=>[""===i.web_meetings_url&&Object.prototype.hasOwnProperty.call(e.currentAppointmentType,"web_meetings")&&"staff"===e.currentAppointmentType.web_meetings.provider?((0,o.wg)(),(0,o.j4)(u,{key:0,theme:"yellow",icon:"warning"})):(0,o.kq)("",!0),""===i.web_meetings_url&&Object.prototype.hasOwnProperty.call(e.currentAppointmentType,"web_meetings")&&"staff"===e.currentAppointmentType.web_meetings.provider?((0,o.wg)(),(0,o.j4)(f,{key:1,theme:"amber",inline:!0},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.appointmentType.noWebMeetingUrl),1)])),_:1})):(0,o.kq)("",!0)])),_:2},1032,["modelValue","id","name","value","label"])))),128))])],64)):(0,o.kq)("",!0)],64)):((0,o.wg)(),(0,o.j4)(h,{key:2,label:"No team members yet"},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/staff"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.actions.addNew),1)])),_:1})])),_:1}))])}var xu={name:"AppointmentTypeStaff",components:{Loading:ge},data(){return{loading:!0}},mounted(){this.staff&&this.staff.length?this.loading=!1:this.fetchStaff().then((()=>{this.loading=!1}))},watch:{staffRequired(){if(""===this.staffRequired&&Object.prototype.hasOwnProperty.call(this.currentAppointmentType,"web_meetings")&&"staff"===this.currentAppointmentType.web_meetings.provider){let e=wa().cloneDeep(this.currentAppointmentType.web_meetings);e.provider=""!==e.url?"custom":"",this.updateCurrentAppointmentType({key:"web_meetings",value:e})}}},computed:{staffRequired:{get(){return Object.prototype.hasOwnProperty.call(this.currentAppointmentType,"staff")&&this.currentAppointmentType.staff?this.currentAppointmentType.staff.required:""},set(e){let t=this.currentAppointmentType.staff;t="string"===typeof t||"undefined"===typeof t?wa().cloneDeep(U):wa().cloneDeep(this.currentAppointmentType.staff),t.required=e;let i=Object.prototype.hasOwnProperty.call(this.currentAppointmentType,"staff")&&this.currentAppointmentType.staff?this.currentAppointmentType.staff.required:"";this.$emit("staffRequiredChange",{oldStaff:i,newStaff:e}),this.updateCurrentAppointmentType({key:"staff",value:t}),this.validationCheck()}},staffAssignment:{get(){return Object.prototype.hasOwnProperty.call(this.currentAppointmentType,"staff")&&this.currentAppointmentType.staff?this.currentAppointmentType.staff.assignment:"random"},set(e){let t=this.currentAppointmentType.staff;t="string"===typeof t||"undefined"===typeof t?wa().cloneDeep(U):wa().cloneDeep(this.currentAppointmentType.staff),t.assignment=e,this.updateCurrentAppointmentType({key:"staff",value:t}),this.validationCheck()}},selectedStaff:{get(){return Object.prototype.hasOwnProperty.call(this.currentAppointmentType,"staff_ids")&&this.currentAppointmentType.staff_ids?this.currentAppointmentType.staff_ids.map(String):[]},set(e){this.updateCurrentAppointmentType({key:"staff_ids",value:e}),this.validationCheck()}},staffError(){return!!this.staffRequired&&!this.selectedStaff.length},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("staff",["staffStatusPublish"]),...(0,m.rn)(["settings"])},methods:{validationCheck(){this.$emit("validationCheck",!this.staffError)},...(0,m.nv)("staff",["fetchStaff"]),...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const Cu=(0,he.Z)(xu,[["render",wu]]);var vu=Cu;const bu={class:"appt-type-google-calendar"},Bu={class:"md-heading-group"},Su={class:"md-headline"},ku={class:"md-subheading"},Au={key:0,style:{padding:"1rem"}},Mu={class:"md-heading-group"},Du={class:"md-headline"},Tu={class:"md-subheading"},Ou={class:"checkboxes-list-flex-row"};function Gu(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-empty"),f=(0,o.up)("foxy-radio"),u=(0,o.up)("foxy-list-item"),c=(0,o.up)("foxy-list"),h=(0,o.up)("foxy-switch"),m=(0,o.up)("foxy-checkbox");return(0,o.wg)(),(0,o.iD)("div",bu,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,size:"body",message:e.translations.settings.google_calendar.loadingCalendars},null,8,["message"])):l.error?((0,o.wg)(),(0,o.j4)(p,{key:1,label:e.translations.appointmentTypes.google_calendar.checkSettingsMessage},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/google-calendar"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.google_calendar.checkSettings),1)])),_:1})])),_:1},8,["label"])):e.settings.google_calendar.access_token?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o._)("div",Bu,[(0,o._)("h3",Su,(0,r.zw)(e.translations.wizard.appointmentType.apptSyncHeading),1),(0,o._)("div",ku,(0,r.zw)(e.translations.wizard.appointmentType.apptSyncDesc),1)]),(0,o.Wm)(c,{"non-interactive":"","fit-content":""},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.writeableGoogleCalendars,(e=>((0,o.wg)(),(0,o.j4)(u,{key:e.gcal_id},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{modelValue:s.googleCalendarBooking,"onUpdate:modelValue":t[0]||(t[0]=e=>s.googleCalendarBooking=e),label:e.summary,value:e.gcal_id,name:"googleCalendarBooking"},null,8,["modelValue","label","value"])])),_:2},1024)))),128)),(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Wm)(f,{modelValue:s.googleCalendarBooking,"onUpdate:modelValue":t[1]||(t[1]=e=>s.googleCalendarBooking=e),label:e.translations.wizard.googleCalendar.dontAdd,value:"",name:"googleCalendarBooking"},null,8,["modelValue","label"])])),_:1})])),_:1}),s.googleCalendarBooking?((0,o.wg)(),(0,o.iD)("div",Au,[(0,o.Wm)(h,{id:"sharedCalendarEvent",modelValue:s.sharedCalendarEvent,"onUpdate:modelValue":t[2]||(t[2]=e=>s.sharedCalendarEvent=e),name:"sharedCalendarEvent"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.google_calendar.sharedCalendarEvent),1)])),_:1},8,["modelValue"]),(0,o._)("div",null,(0,r.zw)(e.translations.appointmentTypes.google_calendar.sharedCalendarEventDesc),1)])):(0,o.kq)("",!0),(0,o._)("div",Mu,[(0,o._)("h3",Du,(0,r.zw)(e.translations.wizard.appointmentType.checkCalendars),1),(0,o._)("div",Tu,(0,r.zw)(e.translations.wizard.appointmentType.checkCalendarsDesc),1)]),(0,o._)("div",Ou,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.googleCalendars,(e=>((0,o.wg)(),(0,o.j4)(m,{key:e.gcal_id,modelValue:s.googleCalendarsAvailability,"onUpdate:modelValue":t[3]||(t[3]=e=>s.googleCalendarsAvailability=e),id:e.gcal_id,name:e.gcal_id,value:e.gcal_id.toString(),label:e.summary},null,8,["modelValue","id","name","value","label"])))),128))])],64)):((0,o.wg)(),(0,o.j4)(p,{key:3,label:e.translations.appointmentTypes.google_calendar.noAccessToken},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/google-calendar"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.google_calendar.setup),1)])),_:1})])),_:1},8,["label"]))])}var Eu={name:"GoogleCalendar",components:{Loading:ge},data(){return{loading:!0,error:!1}},mounted(){this.googleCalendars.length?this.loading=!1:this.fetchGoogleCalendars().then((()=>{this.cleanUpCalendars(),this.loading=!1})).catch((e=>{console.log(e),this.loading=!1,this.error=!0}))},computed:{googleCalendarBooking:{get(){return this.currentAppointmentType.google_calendar_booking},set(e){this.updateCurrentAppointmentType({key:"google_calendar_booking",value:e})}},googleCalendarsAvailability:{get(){return this.currentAppointmentType.google_calendars_availability&&"boolean"!==typeof this.currentAppointmentType.google_calendars_availability?this.currentAppointmentType.google_calendars_availability:[]},set(e){this.updateCurrentAppointmentType({key:"google_calendars_availability",value:e})}},sharedCalendarEvent:{get(){return 0!==parseInt(this.currentAppointmentType.shared_calendar_event)},set(e){const t=e?"1":"0";this.updateCurrentAppointmentType({key:"shared_calendar_event",value:t})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("google_calendar",["googleCalendars"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("google_calendar",["writeableGoogleCalendars"])},methods:{cleanUpCalendars(){let e=this.currentAppointmentType.google_calendars_availability.slice(0),t=this.googleCalendars.map((e=>e.gcal_id)),i=e.filter((e=>t.indexOf(e)>=0));this.updateCurrentAppointmentType({key:"google_calendars_availability",value:i})},...(0,m.nv)("google_calendar",["fetchGoogleCalendars"]),...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const Uu=(0,he.Z)(Eu,[["render",Gu]]);var Fu=Uu;const Iu=e=>((0,o.dD)("data-v-46faddac"),e=e(),(0,o.Cn)(),e),zu={class:"ssa-web-meetings-type"},Pu=Iu((()=>(0,o._)("br",null,null,-1))),Vu={key:0,class:"subsection-title"},Wu={key:1},Ru={key:2,class:"md-whiteframe banner vert"},Lu={class:"md-subheading"},ju={class:"md-body"},qu={key:3},Nu={class:"subsection-title"},$u={key:4},Hu={class:"subsection-title"},Zu={class:"link",target:"_blank",href:"https://simplyscheduleappointments.com/guides/zoom/#open-meeting"};function Yu(e,t,i,a,l,s){const n=(0,o.up)("foxy-radio"),d=(0,o.up)("foxy-list-item"),p=(0,o.up)("foxy-icon"),f=(0,o.up)("foxy-notification"),u=(0,o.up)("foxy-list"),c=(0,o.up)("foxy-textfield"),h=(0,o.up)("foxy-button"),m=(0,o.up)("promo-web-meetings"),g=(0,o.up)("foxy-dialog"),_=(0,o.up)("promo-business");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("div",zu,[(0,o.Wm)(u,{"non-interactive":"","fit-content":""},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"mdc-radio-input-field",modelValue:s.webMeetingProvider,"onUpdate:modelValue":t[0]||(t[0]=e=>s.webMeetingProvider=e),name:"webMeetingProvider",value:"",label:e.translations.appointmentTypes.web_meetings.providers.none.label},null,8,["modelValue","label"])])),_:1}),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.availableWebMeetingsProviders,(i=>((0,o.wg)(),(0,o.j4)(d,{onClick:()=>s.maybeShowUpgrade(i),disabled:!i.installed,key:i.name,class:(0,r.C_)({staff:"staff"===i.name})},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"mdc-radio-input-field",modelValue:s.webMeetingProvider,"onUpdate:modelValue":t[1]||(t[1]=e=>s.webMeetingProvider=e),name:"webMeetingProvider",value:i.name,disabled:!i.installed},{default:(0,o.w5)((()=>["staff"===i.name&&e.currentStaffMissingWebMeetingsUrl?((0,o.wg)(),(0,o.j4)(p,{key:0,theme:"yellow",icon:"warning"})):(0,o.kq)("",!0),(0,o.Uk)(" "+(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers[i.name].label),1)])),_:2},1032,["modelValue","value","disabled"]),Pu,"staff"===i.name&&e.currentStaffMissingWebMeetingsUrl?((0,o.wg)(),(0,o.j4)(f,{key:0,theme:"amber",inline:!0},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.staff.warning),1)])),_:1})):(0,o.kq)("",!0)])),_:2},1032,["onClick","disabled","class"])))),128))])),_:1}),s.includeCustomMeetingUrlField?((0,o.wg)(),(0,o.iD)("h3",Vu,(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers[s.webMeetingProvider].settingsHeading),1)):(0,o.kq)("",!0),s.includeCustomMeetingUrlField?((0,o.wg)(),(0,o.iD)("fieldset",Wu,[(0,o._)("legend",null,(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers[s.webMeetingProvider].legend),1),(0,o.Wm)(c,{type:"url",id:"custom-provider",placeholder:"https://",modelValue:l.v$.webMeetingUrl.$model,"onUpdate:modelValue":t[2]||(t[2]=e=>l.v$.webMeetingUrl.$model=e),label:e.translations.appointmentTypes.web_meetings.providers[s.webMeetingProvider].urlLabel,helptext:s.webMeetingUrlError?e.translations.appointmentTypes.web_meetings.providers[s.webMeetingProvider].error:"","helptext-persistent":"","helptext-validation":"",valid:!s.webMeetingUrlError},null,8,["modelValue","label","helptext","valid"])])):(0,o.kq)("",!0),s.googleCalendarBooking||"google"!==s.webMeetingProvider?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("div",Ru,[(0,o._)("div",Lu,[(0,o.Wm)(p,{icon:"warning",theme:"amber"}),(0,o.Uk)(" "+(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.google.googleNoCalendarHeading),1)]),(0,o._)("div",ju,[(0,o._)("p",null,(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.google.noCalendarSelectedMessage),1),(0,o.Wm)(h,{class:"md-raised md-primary",onClick:s.editGoogleCalendar},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.google.googleEditSettings),1)])),_:1},8,["onClick"])])])),"webex"===s.webMeetingProvider?((0,o.wg)(),(0,o.iD)("fieldset",qu,[(0,o._)("legend",Nu,(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.webex.legend),1),(0,o.Wm)(u,{"non-interactive":"","fit-content":""},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"mdc-radio-input-field",modelValue:s.webMeetingProviderWebexPrivate,"onUpdate:modelValue":t[3]||(t[3]=e=>s.webMeetingProviderWebexPrivate=e),value:"private",name:"webMeetingProviderWebexPrivate",label:e.translations.appointmentTypes.web_meetings.providers.webex.options.private},null,8,["modelValue","label"])])),_:1}),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"mdc-radio-input-field",modelValue:s.webMeetingProviderWebexPrivate,"onUpdate:modelValue":t[4]||(t[4]=e=>s.webMeetingProviderWebexPrivate=e),name:"webMeetingProviderWebexPrivate",value:"open",label:e.translations.appointmentTypes.web_meetings.providers.webex.options.open},null,8,["modelValue","label"])])),_:1})])),_:1})])):(0,o.kq)("",!0),"zoom"===s.webMeetingProvider?((0,o.wg)(),(0,o.iD)("fieldset",$u,[(0,o._)("legend",Hu,(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.zoom.legend),1),(0,o.Wm)(u,{"non-interactive":"","fit-content":""},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"mdc-radio-input-field",modelValue:s.webMeetingProviderZoomPrivate,"onUpdate:modelValue":t[5]||(t[5]=e=>s.webMeetingProviderZoomPrivate=e),name:"webMeetingProviderZoomPrivate",value:"private",label:e.translations.appointmentTypes.web_meetings.providers.zoom.options.private},null,8,["modelValue","label"])])),_:1}),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"mdc-radio-input-field",modelValue:s.webMeetingProviderZoomPrivate,"onUpdate:modelValue":t[6]||(t[6]=e=>s.webMeetingProviderZoomPrivate=e),name:"webMeetingProviderZoomPrivate",value:"open",label:e.translations.appointmentTypes.web_meetings.providers.zoom.options.open},null,8,["modelValue","label"])])),_:1})])),_:1}),"open"===s.webMeetingProviderZoomPrivate?((0,o.wg)(),(0,o.j4)(f,{key:0,theme:"amber",icon:"warning"},{default:(0,o.w5)((()=>[(0,o._)("span",null,(0,r.zw)(e.translations.appointmentTypes.web_meetings.providers.zoom.notice.openMeeting),1),(0,o._)("span",null,[(0,o.Uk)(" "),(0,o._)("a",Zu,(0,r.zw)(e.translations.general.learnMore),1)])])),_:1})):(0,o.kq)("",!0)])):(0,o.kq)("",!0),(0,o.Wm)(g,{ref:"upgradeWebMeetings"},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{dismissable:!1,onPromoClicked:t[7]||(t[7]=e=>s.closeDialog("upgradeWebMeetings"))})])),_:1},512),(0,o.Wm)(g,{ref:"upgradeBusiness"},{default:(0,o.w5)((()=>[(0,o.Wm)(_,{"upgrade-url-params":l.promoBusiness,dismissable:!1,onPromoClicked:t[8]||(t[8]=t=>s.closeDialog(e.upgradeBusiness))},null,8,["upgrade-url-params"])])),_:1},512)])])}const Ku=["href"],Ju=["src"],Xu=(0,o._)("div",{class:"md-title"},[(0,o.Uk)(" Simply Schedule Appointments "),(0,o._)("strong",null,"Plus")],-1);function Qu(e,t,i,a,l,s){const n=(0,o.up)("foxy-fab"),d=(0,o.up)("foxy-card-media"),p=(0,o.up)("foxy-card-header"),f=(0,o.up)("foxy-card-area"),u=(0,o.up)("foxy-button"),c=(0,o.up)("foxy-card-actions"),h=(0,o.up)("foxy-card-content"),m=(0,o.up)("foxy-card");return(0,o.wg)(),(0,o.j4)(m,{"md-with-hover":!0,transition:"fade","md-column":"",class:"limited-width",onClick:s.promoClicked},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[i.dismissable?((0,o.wg)(),(0,o.j4)(n,{key:0,"wrapper-class":"promo-close-fab",mini:"",icon:"clear",theme:"white",onClick:s.clearAd,"aria-label":e.translations.promo.dismissNotice},null,8,["onClick","aria-label"])):(0,o.kq)("",!0),(0,o._)("a",{href:e.upgradeUrlParsed(l.purchasePlusLink,i.upgradeUrlParams),target:"_blank"},[(0,o._)("img",{src:e.$store.state.api.admin_static_url+"/images/upsell-promo-plus.svg",alt:"Simply Schedule Appointments Plus",class:"promo-img promo-plus"},null,8,Ju)],8,Ku)])),_:1}),(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[Xu])),_:1}),(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[(0,o.Wm)(f,{"md-inset":""},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.promo.webMeetingsText),1),(0,o._)("ul",null,[(0,o._)("li",null,(0,r.zw)(e.translations.promo.webMeetingsTextBullets.google),1),(0,o._)("li",null,(0,r.zw)(e.translations.promo.webMeetingsTextBullets.zoom),1),(0,o._)("li",null,(0,r.zw)(e.translations.promo.plusTextBullets.customFields),1),(0,o._)("li",null,(0,r.zw)(e.translations.promo.plusTextBullets.classes),1)])])),_:1}),(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{mode:"raised",class:"md-accent",href:e.upgradeUrlParsed(l.purchasePlusLink,i.upgradeUrlParams),target:"_blank"},{default:(0,o.w5)((()=>[(0,o.Uk)(" Upgrade now ")])),_:1},8,["href"])])),_:1})])),_:1})])),_:1},8,["onClick"])}var ec={name:"PromoWebMeetings",store:$J,props:{dismissable:{type:Boolean,default:!0},upgradeUrlParams:{type:Object,default(){return{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-plus",utm_term:"plus-features",utm_content:"general-plus-web-meeting-settings"}}}},data(){return{slug:"promo-web-meetings",purchasePlusLink:qe}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.Se)(["upgradeUrlParsed"])},methods:{clearAd(){this.$emit("clearAd",this.slug)},promoClicked(){this.$emit("promoClicked")}}};const tc=(0,he.Z)(ec,[["render",Qu]]);var ic=tc;const ac={href:"https://simplyscheduleappointments.com/features",target:"_blank"},oc=["src"],rc=(0,o._)("h2",{class:"md-title"},[(0,o.Uk)(" Simply Schedule Appointments "),(0,o._)("strong",null,"Business")],-1);function lc(e,t,i,a,l,s){const n=(0,o.up)("foxy-fab"),d=(0,o.up)("foxy-card-media"),p=(0,o.up)("foxy-card-header"),f=(0,o.up)("foxy-card-area"),u=(0,o.up)("foxy-button"),c=(0,o.up)("foxy-card-actions"),h=(0,o.up)("foxy-card-content"),m=(0,o.up)("foxy-card");return(0,o.wg)(),(0,o.j4)(m,{"md-with-hover":!0,transition:"fade","md-column":"",class:"limited-width",onClick:s.promoClicked},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[i.dismissable?((0,o.wg)(),(0,o.j4)(n,{key:0,"wrapper-class":"promo-close-fab",mini:"",icon:"clear",theme:"white",onClick:s.clearAd,"aria-label":e.translations.promo.dismissNotice},null,8,["onClick","aria-label"])):(0,o.kq)("",!0),(0,o._)("a",ac,[(0,o._)("img",{src:e.$store.state.api.admin_static_url+"/images/upsell-promo-business.svg",alt:"Simply Schedule Appointments Pro",class:"promo-img promo-business"},null,8,oc)])])),_:1}),(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[rc])),_:1}),(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[(0,o.Wm)(f,{"md-inset":""},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.promo.businessText),1),(0,o._)("ul",null,[(0,o._)("li",null,(0,r.zw)(e.translations.promo.businessTextBullets.team),1),(0,o._)("li",null,(0,r.zw)(e.translations.promo.businessTextBullets.resources),1),(0,o._)("li",null,(0,r.zw)(e.translations.promo.businessTextBullets.bonus),1)])])),_:1}),(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{mode:"raised",theme:"accent",href:e.upgradeUrlParsed(this.businessUpgradeLink,this.upgradeUrlParams),target:"_blank"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.promo.businessTextCta.upgrade),1)])),_:1},8,["href"])])),_:1})])),_:1})])),_:1},8,["onClick"])}var sc={name:"PromoBusiness",store:$J,props:{dismissable:{type:Boolean,default:!0},upgradeUrlParams:{type:Object,default(){return{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-business",utm_term:"business-features",utm_content:"general-business-settings-popup"}}}},data(){return{slug:"promo-business"}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.Se)(["upgradeUrlParsed","businessUpgradeLink"])},methods:{clearAd(){this.$emit("clearAd",this.slug)},promoClicked(){this.$emit("promoClicked")}}};const nc=(0,he.Z)(sc,[["render",lc]]);var dc=nc,pc={name:"WebMeetings",components:{PromoWebMeetings:ic,PromoBusiness:dc},data(){return{v$:(0,Rd.Xw)(),webMeetingsInfo:{},promoBusiness:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-business",utm_term:"business-features",utm_content:"general-business-web-meeting-settings"}}},validations:{webMeetingUrl:{url:Ld.HQ,maxLength:(0,Ld.BS)(256)}},mounted(){let e=wa().cloneDeep(this.currentAppointmentType.web_meetings);wa().isEmpty(e)&&(e={provider:"",url:""}),this.staffEnabled||"staff"!==e.provider||(e.provider=""!==e.url?"custom":"",this.updateCurrentAppointmentType({key:"web_meetings",value:e})),this.webMeetingsInfo=e,this.fetchStaff()},watch:{webMeetingsInfo:{handler(e){this.updateCurrentAppointmentType({key:"web_meetings",value:wa().cloneDeep(e)})},deep:!0},staffEnabled(e){e||(this.webMeetingsInfo.provider=""!==this.webMeetingsInfo.url?"custom":"")}},computed:{webMeetingProvider:{get(){return this.webMeetingsInfo.provider?this.webMeetingsInfo.provider:""},set(e){this.webMeetingsInfo.provider=e,this.validationCheck()}},includeCustomMeetingUrlField(){return["custom","staff"].includes(this.webMeetingProvider)},webMeetingProviderZoomPrivate:{get(){return this.webMeetingsInfo.zoom_privacy?this.webMeetingsInfo.zoom_privacy:"private"},set(e){this.webMeetingsInfo.zoom_privacy=e,this.validationCheck()}},webMeetingProviderWebexPrivate:{get(){return this.webMeetingsInfo.webex_privacy?this.webMeetingsInfo.webex_privacy:"private"},set(e){this.webMeetingsInfo.webex_privacy=e,this.validationCheck()}},webMeetingUrl:{get(){return this.webMeetingsInfo.url?this.webMeetingsInfo.url:""},set(e){this.webMeetingsInfo.url=e,this.validationCheck()}},webMeetingUrlError(){return"custom"===this.webMeetingProvider&&this.v$.webMeetingUrl.$invalid},availableWebMeetingsProviders(){return this.webMeetingsProviders?this.webMeetingsProviders.filter((e=>e.enabled||!e.installed)):[]},googleCalendarBooking(){return this.currentAppointmentType.google_calendar_booking},staffEnabled(){return!!Object.prototype.hasOwnProperty.call(this.settings,"staff")&&(!!this.settings.staff.enabled&&!!this.settings.installed.staff)},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)(["webMeetingsProviders"]),...(0,m.Se)("staff",["currentStaffMissingWebMeetingsUrl"])},methods:{closeDialog(e){this.$refs[e].close()},editGoogleCalendar(){let e=this.getClosest(this.$el,".ssa-accordion-item"),t=e.parentNode.querySelector('.ssa-accordion-item[data-section="google-calendar"] button');t.click()},getClosest(e,t){for(;e&&e!==document;e=e.parentNode)if(e.matches(t))return e;return null},maybeShowUpgrade(e){e.installed||("staff"!==e.name?this.$refs["upgradeWebMeetings"].open():this.$refs["upgradeBusiness"].open())},validationCheck(){this.$emit("validationCheck",!this.webMeetingUrlError)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"]),...(0,m.nv)("staff",["fetchStaff"])}};const fc=(0,he.Z)(pc,[["render",Yu],["__scopeId","data-v-46faddac"]]);var uc=fc;const cc={class:"appt-type-mailchimp"},hc={key:1};function mc(e,t,i,a,l,s){const n=(0,o.up)("foxy-radio"),d=(0,o.up)("foxy-list-item"),p=(0,o.up)("foxy-list"),f=(0,o.up)("foxy-textfield"),u=(0,o.up)("foxy-button"),c=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.iD)("div",cc,[e.settings.mailchimp.account_details?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[e.settings.mailchimp.lists.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("p",null,(0,r.zw)(e.translations.appointmentTypes.mailchimp.listSelect),1),(0,o.Wm)(p,{"non-interactive":"","fit-content":""},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.settings.mailchimp.lists,(e=>((0,o.wg)(),(0,o.j4)(d,{key:e.id},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{modelValue:l.optin_list,"onUpdate:modelValue":t[0]||(t[0]=e=>l.optin_list=e),label:e.name,id:"list-"+e.id,name:"mailchimpList",value:e.id,class:"md-primary"},null,8,["modelValue","label","id","value"])])),_:2},1024)))),128)),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{modelValue:l.optin_list,"onUpdate:modelValue":t[1]||(t[1]=e=>l.optin_list=e),label:e.translations.appointmentTypes.mailchimp.noSelection,id:"list-none",name:"mailchimpList",value:"",class:"md-primary"},null,8,["modelValue","label"])])),_:1})])),_:1}),(0,o.Wm)(f,{modelValue:l.optin_text,"onUpdate:modelValue":t[2]||(t[2]=e=>l.optin_text=e),label:e.translations.appointmentTypes.mailchimp.optinTextLabel,helptext:l.validMailchimp?"":e.translations.appointmentTypes.mailchimp.optinTextError,"helptext-persistent":"","helptext-validation":"",id:"mailchimpOptinText",required:"",onChange:s.queueUpdateMailchimp,valid:l.validMailchimp},null,8,["modelValue","label","helptext","onChange","valid"])],64)):((0,o.wg)(),(0,o.iD)("p",hc,(0,r.zw)(e.translations.appointmentTypes.mailchimp.noLists),1))],64)):((0,o.wg)(),(0,o.j4)(c,{key:1,label:e.translations.appointmentTypes.mailchimp.noConnection},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/mailchimp"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.mailchimp.setup),1)])),_:1})])),_:1},8,["label"]))])}var gc={name:"AppointmentTypeMailchimp",props:["modelValue"],emits:["update:modelValue","validationCheck"],data(){return{optin_list:"",optin_text:"",validMailchimp:!0}},mounted(){this.optin_text=this.modelValue.optin_text?this.modelValue.optin_text:this.translations.appointmentTypes.mailchimp.optin,this.optin_list=this.modelValue.optin_list?this.modelValue.optin_list:"",this.updateMailchimp(this.optin_list)},watch:{optin_list(e){this.queueUpdateMailchimp(e)}},computed:{mailchimp(){return this.currentAppointmentType?.mailchimp?wa().cloneDeep(this.currentAppointmentType.mailchimp):{}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"])},methods:{validateMailchimp(e){let t=!e.optin_list.length||e.optin_text.length>0;this.validMailchimp=t,this.$emit("validationCheck",t)},queueUpdateMailchimp:function(e){this.$nextTick((()=>{this.updateMailchimp(e)}))},updateMailchimp(e){let t={};t.optin_text=this.optin_text,"string"===typeof e&&(t.optin_list=e);let i=Object.assign({},this.mailchimp,t);this.validateMailchimp(i),this.$emit("update:modelValue",i)}}};const _c=(0,he.Z)(gc,[["render",mc]]);var yc=_c;const wc={class:"appt-type-webhooks"},xc={class:"webhooks-container"},Cc={class:"webhooks-container webhooks-container-left"};function vc(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-list-item"),p=(0,o.up)("foxy-list"),f=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.iD)("div",wc,[s.applicableWebhooks.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("p",null,(0,r.zw)(e.translations.settings.webhooks.intro),1),(0,o.Wm)(p,{class:"md-double-line"},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.applicableWebhooks,((t,i)=>((0,o.wg)(),(0,o.j4)(d,{key:i,onClick:e=>s.editWebhook(i)},{default:(0,o.w5)((()=>[(0,o._)("div",xc,[(0,o._)("div",Cc,[(0,o._)("span",null,(0,r.zw)(t.title),1),(0,o._)("span",null,[1===t.triggers.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.fields.trigger_single),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.fields.trigger_plural),1)],64)),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.triggers,((i,a)=>((0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.fields.triggerNames[i]),1),as.editWebhook(i)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"])])])),_:2},1032,["onClick"])))),128))])),_:1})],64)):((0,o.wg)(),(0,o.j4)(f,{key:1,label:e.translations.settings.webhooks.empty_appointment_type,class:"appt-type-webhooks-empty-state"},null,8,["label"])),(0,o.Wm)(n,{class:"md-primary",onClick:s.editWebhooksSettings},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.action),1)])),_:1},8,["onClick"])])}var bc={name:"AppointmentTypeWebhooks",data(){return{}},computed:{applicableWebhooks(){let e=this.settings.webhooks.webhooks;return e.filter((e=>0===e.appointment_types.length||e.appointment_types.indexOf(this.currentAppointmentType.id)>-1))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"])},methods:{editWebhook(e){this.$router.push({name:"webhook-single",params:{index:e}})},editWebhooksSettings(){this.$router.push("/ssa/settings/webhooks")}}};const Bc=(0,he.Z)(bc,[["render",vc],["__scopeId","data-v-6cb8f1c8"]]);var Sc=Bc;function kc(e,t,i,a,r,l){const s=(0,o.up)("customer-information-plus"),n=(0,o.up)("customer-information-basic");return e.settings.installed.license?((0,o.wg)(),(0,o.j4)(s,{key:0})):((0,o.wg)(),(0,o.j4)(n,{key:1}))}const Ac={class:"appt-type-customer-information"},Mc={class:"md-body-2"};function Dc(e,t,i,a,l,s){const n=(0,o.up)("foxy-layout"),d=(0,o.up)("foxy-checkbox"),p=(0,o.up)("foxy-button"),f=(0,o.up)("promo-plus"),u=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.iD)("div",Ac,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.currentAppointmentType.customer_information,((i,a)=>((0,o.wg)(),(0,o.j4)(n,{"md-row":"","md-vertical-align":"center",class:"customer-info-field",key:a},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{"md-flex":"20"},{default:(0,o.w5)((()=>[(0,o._)("span",Mc,(0,r.zw)(e.translations.appointmentTypes.customer_information[i.field]),1)])),_:2},1024),(0,o.Wm)(n,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{id:"display-"+a,name:"display-"+a,value:i.field.toString(),modelValue:s.display,"onUpdate:modelValue":t[0]||(t[0]=e=>s.display=e),disabled:"name"===i.field.toLowerCase()||"email"===i.field.toLowerCase(),label:e.translations.appointmentTypes.display},null,8,["id","name","value","modelValue","disabled","label"]),(0,o.Wm)(d,{id:"required-"+a,name:"required-"+a,value:i.field.toString(),modelValue:s.required,"onUpdate:modelValue":t[1]||(t[1]=e=>s.required=e),disabled:"name"===i.field.toLowerCase()||"email"===i.field.toLowerCase(),label:e.translations.appointmentTypes.required},null,8,["id","name","value","modelValue","disabled","label"])])),_:2},1024)])),_:2},1024)))),128)),(0,o._)("div",null,[(0,o.Wm)(p,{"data-test":"test-customer-info-add-field","data-test-showUpdage":"",mode:"raised",class:"md-primary",icon:"add",theme:"grey",onClick:s.ShowUpgrade},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions["add-field"]),1)])),_:1},8,["onClick"])]),(0,o.Wm)(u,{ref:"upgradeCustomerInfo"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{"upgrade-url-params":l.promoPlusUpgradeParams,dismissable:!1,onPromoClicked:s.closeDialog},null,8,["upgrade-url-params","onPromoClicked"])])),_:1},512)])}var Tc={name:"AppointmentTypeCustomerInformationBasic",components:{PromoPlus:it},store:$J,data(){return{promoPlusUpgradeParams:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-plus",utm_term:"custom-fields",utm_content:"general-plus-popup"}}},computed:{customer_information:{get(){return this.currentAppointmentType.customer_information},set(e){this.updateCurrentAppointmentType({key:"customer_information",value:e})}},display:{get(){var e=this.currentAppointmentType.customer_information.filter((e=>"boolean"===typeof e.display?e.display:"true"===e.display));return e=e.map((e=>e.field)),e},set(e){this.updateDisplay(e)}},required:{get(){var e=this.currentAppointmentType.customer_information.filter((e=>"boolean"===typeof e.required?e.required:"true"===e.required));return e=e.map((e=>e.field)),e},set(e){this.updateRequired(e)}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["currentAppointmentType"])},methods:{updateDisplay:function(e){var t=wa().cloneDeep(this.currentAppointmentType.customer_information);t.map((t=>{var i=e.includes(t.field);t.display=i,i||(t.required=i)})),this.updateCurrentAppointmentType({key:"customer_information",value:t})},updateRequired:function(e){var t=wa().cloneDeep(this.currentAppointmentType.customer_information);t.map((t=>{var i=e.includes(t.field);t.required=i,i&&(t.display=i)})),this.updateCurrentAppointmentType({key:"customer_information",value:t})},closeDialog(){this.$refs["upgradeCustomerInfo"].close()},ShowUpgrade(){this.$refs["upgradeCustomerInfo"].open()},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const Oc=(0,he.Z)(Tc,[["render",Dc]]);var Gc=Oc;const Ec={class:"list-container appt-type-customer-information"},Uc={class:"list-item-group"},Fc={class:"md-list-text-container"},Ic={key:0,class:"required"},zc={class:"screen-reader-text"};function Pc(e,t,i,a,l,s){const n=(0,o.up)("foxy-icon"),d=(0,o.up)("foxy-icon-button"),p=(0,o.up)("foxy-list-item"),f=(0,o.up)("foxy-menu"),u=(0,o.up)("foxy-menu-anchor"),c=(0,o.up)("draggable"),h=(0,o.up)("foxy-button"),m=(0,o.up)("foxy-dialog-title"),g=(0,o.up)("foxy-textfield"),_=(0,o.up)("foxy-layout"),y=(0,o.up)("foxy-checkbox"),w=(0,o.up)("foxy-select"),x=(0,o.up)("foxy-dialog-content"),C=(0,o.up)("foxy-dialog-button"),v=(0,o.up)("foxy-dialog-footer"),b=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.iD)("div",Ec,[((0,o.wg)(),(0,o.j4)(c,{animation:150,class:"list-group sortable-list","ghost-class":"ghost",move:s.sortableMove,tag:"ul",modelValue:s.fields,"onUpdate:modelValue":t[0]||(t[0]=e=>s.fields=e),"item-key":"id",key:l.refreshKey},{item:(0,o.w5)((({element:t,index:i})=>[(0,o._)("li",Uc,[(0,o.Wm)(n,{class:"md-primary",theme:s.getLabelColor(t),icon:t.icon?t.icon:"bookmark"},null,8,["theme","icon"]),(0,o._)("div",Fc,[(0,o._)("span",null,[(0,o.Uk)((0,r.zw)(Object.prototype.hasOwnProperty.call(e.translations.appointmentTypes.customer_information,t.field)?e.translations.appointmentTypes.customer_information[t.field]:t.field)+" ",1),t.required?((0,o.wg)(),(0,o.iD)("span",Ic,"*")):(0,o.kq)("",!0)]),(0,o._)("span",null,(0,r.zw)(e.translations.appointmentTypes.custom_fields.types[t.type]),1)]),(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"md-icon-button md-list-action",onClick:e=>l.openMenu[i]=!0},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{theme:e.currentAppointmentType.label,icon:"settings"},null,8,["theme"]),(0,o._)("span",zc,(0,r.zw)(e.translations.appointmentTypes.custom_fields.actions.menu),1)])),_:2},1032,["onClick"]),(0,o.Wm)(f,{modelValue:l.openMenu[i],"onUpdate:modelValue":e=>l.openMenu[i]=e},{default:(0,o.w5)((()=>[s.isEditable(t)?((0,o.wg)(),(0,o.j4)(p,{key:0,onClick:e=>s.editInfo(i)},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.appointmentTypes.actions["edit"]),1)])),_:2},1032,["onClick"])):(0,o.kq)("",!0),(0,o.Wm)(p,{onClick:e=>s.cloneInfo(i)},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{icon:"content_copy"}),(0,o._)("span",null,(0,r.zw)(e.translations.appointmentTypes.actions["clone"]),1)])),_:2},1032,["onClick"]),s.isEditable(t)?((0,o.wg)(),(0,o.j4)(p,{key:1,onClick:e=>s.deleteInfo(i)},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.appointmentTypes.actions["delete"]),1)])),_:2},1032,["onClick"])):(0,o.kq)("",!0)])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)])])),_:1},8,["move","modelValue"])),(0,o.Wm)(h,{"data-test":"test-customer-info-add-field",mode:"raised",class:"md-primary",onClick:s.addInfo,icon:"add"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions["add-field"]),1)])),_:1},8,["onClick"]),(0,o.Wm)(b,{class:"customer-inforamtion-plus-dialog",ref:"editInfoDialog"},{default:(0,o.w5)((()=>[(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions["edit"]),1)])),_:1}),(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Wm)(_,{"md-gutter":!0,"md-vertical-align":"center"},{default:(0,o.w5)((()=>[(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(g,{modelValue:s.label,"onUpdate:modelValue":t[1]||(t[1]=e=>s.label=e),label:e.translations.appointmentTypes.custom_fields.labels.label,helptext:l.labelError?e.translations.appointmentTypes.custom_fields.errors.label:"","helptext-persistent":"","helptext-validation":"",id:"custom-field-label",ref:"labelField",valid:!l.labelError},null,8,["modelValue","label","helptext","valid"])])),_:1}),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(y,{id:"required",name:"required",modelValue:s.required,"onUpdate:modelValue":t[2]||(t[2]=e=>s.required=e),label:e.translations.appointmentTypes.custom_fields.labels["required"]},null,8,["modelValue","label"])])),_:1})])),_:1}),(0,o.Wm)(_,{"md-gutter":!0},{default:(0,o.w5)((()=>[(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(w,{label:e.translations.appointmentTypes.custom_fields.labels["type"],name:"type",id:"type",modelValue:s.type,"onUpdate:modelValue":t[3]||(t[3]=e=>s.type=e)},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.customerInformationFieldTypes,(t=>((0,o.wg)(),(0,o.j4)(p,{"data-value":t,key:t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.custom_fields.types[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])])),_:1}),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n,{icon:l.currentInfo.icon},null,8,["icon"])])),_:1}),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(w,{label:e.translations.appointmentTypes.custom_fields.labels["icon"],name:"icon",id:"icon",modelValue:s.icon,"onUpdate:modelValue":t[4]||(t[4]=e=>s.icon=e)},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{"data-value":"",role:"option"}),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.iconOptions,(e=>((0,o.wg)(),(0,o.j4)(p,{"data-value":e,key:e,role:"option",class:"icon-list-item"},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{icon:e},null,8,["icon"])])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])])),_:1})])),_:1}),"checkboxes"===l.currentInfo.type||"radios"===l.currentInfo.type?((0,o.wg)(),(0,o.j4)(_,{key:0},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{modelValue:s.values,"onUpdate:modelValue":t[5]||(t[5]=e=>s.values=e),label:e.translations.appointmentTypes.custom_fields.labels.values,helptext:e.translations.appointmentTypes.custom_fields.labels["one-per-line"],"helptext-persistent":"",multiline:""},null,8,["modelValue","label","helptext"])])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(g,{modelValue:s.instructions,"onUpdate:modelValue":t[6]||(t[6]=e=>s.instructions=e),label:e.translations.appointmentTypes.custom_fields.labels.instructions},null,8,["modelValue","label"])])),_:1})])),_:1}),(0,o.Wm)(v,null,{default:(0,o.w5)((()=>[(0,o.Wm)(C,{action:"dismiss",class:"md-primary",onClick:s.cancel},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions["cancel"]),1)])),_:1},8,["onClick"]),(0,o.Wm)(C,{class:"md-primary",onClick:s.updateInfo},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions["update"]),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512)])}var Vc={name:"AppointmentTypeCustomerInformationPlus",components:{draggable:yd()},data(){return{currentInfo:{},iconOptions:["alarm","assignment","bookmark","build","cake","call","chat","check_circle","code","cloud","computer","create","done","email","face","favorite","fingerprint","flag","folder","gite","help","home","https","image","info","label","link","map","person","pets","phone","place","schedule","smartphone","star","watch","whatshot","work"],customerInformationFieldTypes:x,labelError:!1,openMenu:{},refreshKey:0}},watch:{fields:{handler(){this.refreshKey++},deep:!0}},computed:{label:{get(){return this.currentInfo.field?this.currentInfo.field:""},set(e){this.currentInfo.field.trim()!==e.trim()&&(this.labelError=!1),this.currentInfo.field=e}},required:{get(){return this.currentInfo.required},set(e){this.currentInfo.required=e}},type:{get(){return this.currentInfo["type"]},set(e){this.currentInfo.type=e}},icon:{get(){return this.currentInfo.icon},set(e){this.currentInfo.icon=e}},values:{get(){return this.currentInfo.values},set(e){this.currentInfo.values=e}},instructions:{get(){return this.currentInfo.instructions},set(e){this.currentInfo.instructions=e}},fields:{get(){return this.currentAppointmentType.custom_customer_information},set(e){this.updateCurrentAppointmentType({key:"custom_customer_information",value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("appointment_types",["labelInfo"])},methods:{isEditable(e){var t=!0,i=["name","Name","email","Email","Email address"];return i.includes(e.field)&&(t=!1),t},getLabelColor(e){return this.isEditable(e)?this.labelInfo(this.currentAppointmentType.label_id,"color"):"grey"},prepInfo(e){let t=wa().clone(this.currentAppointmentType.custom_customer_information[e]);return t.values=Array.isArray(t.values)?t.values.join("\r\n"):t.values,t},editInfo(e){let t=this.prepInfo(e);t.index=e,this.currentInfo=t,this.$refs["editInfoDialog"].open()},cloneInfo(e){let t=this.prepInfo(e);this.currentInfo=t,this.$refs["editInfoDialog"].open()},deleteInfo(e){let t=this.currentAppointmentType.custom_customer_information.slice(0);t.splice(e,1),this.updateCurrentAppointmentType({key:"custom_customer_information",value:t})},addInfo(){this.currentInfo=wa().clone(w),this.$refs["editInfoDialog"].open()},checkForDuplicateLabel(){let e=this.label.trim().toLowerCase(),t=this.currentAppointmentType.custom_customer_information.map((e=>e.field.trim().toLowerCase()));Object.prototype.hasOwnProperty.call(this.currentInfo,"index")&&(t=t.filter(((e,t)=>t!==this.currentInfo.index))),this.labelError=t.includes(e)},updateInfo(){if(this.checkForDuplicateLabel(),this.labelError){let e=this.$refs.labelField;return void e.$el.focus()}let e=this.currentAppointmentType.custom_customer_information.slice(0),t=Object.prototype.hasOwnProperty.call(this.currentInfo,"index")?this.currentInfo.index:void 0,i=wa().clone(this.currentInfo),a=i.values.split(/\n/),o=a.map((e=>e.trim())).filter((e=>e));i.values=o,"undefined"!==typeof t?(delete i.index,e.splice(t,1,i)):e.push(i),this.updateCurrentAppointmentType({key:"custom_customer_information",value:e}),this.$refs["editInfoDialog"].close(),this.currentInfo={}},cancel(){this.currentInfo={},this.$refs["editInfoDialog"].close()},sortableMove(e){return!e.related.classList.contains("sortable-fixed")},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const Wc=(0,he.Z)(Vc,[["render",Pc]]);var Rc=Wc,Lc={name:"AppointmentTypeCustomerInformation",store:$J,props:{bulkMode:{default:!1,type:Boolean}},components:{CustomerInformationBasic:Gc,CustomerInformationPlus:Rc},data(){return{}},beforeMount(){this.bulkMode&&this.defineAppointmentTypeCustomerInformation(this.settings)},computed:{...(0,m.rn)(["settings"])},methods:{...(0,m.OI)("appointment_types",["defineAppointmentTypeCustomerInformation"])}};const jc=(0,he.Z)(Lc,[["render",kc]]);var qc=jc;const Nc={class:"appt-type-notifications"},$c={class:"appt-type-notifications__selected"},Hc={class:"subsection-title"},Zc={class:"md-list-item-container"},Yc={class:"md-list-text-container"},Kc={class:"appt-type-notifications__opt-in"},Jc={class:"subsection-title"},Xc={class:"description"},Qc={key:0,class:"opt-in-settings"};function eh(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-list-item"),p=(0,o.up)("foxy-list"),f=(0,o.up)("foxy-switch"),u=(0,o.up)("foxy-textfield"),c=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.iD)("div",Nc,[s.applicableNotifications.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o._)("div",$c,[(0,o._)("h3",Hc,(0,r.zw)(e.translations.settings.notifications.selected),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.notifications.intro),1),(0,o.Wm)(p,{class:"md-double-line"},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.applicableNotifications,(t=>((0,o.wg)(),(0,o.j4)(d,{key:t.id,onClick:e=>s.editNotification(t.id)},{default:(0,o.w5)((()=>[(0,o._)("div",Zc,[(0,o._)("div",Yc,[(0,o._)("span",null,(0,r.zw)(t.title),1),(0,o._)("span",null,[e.remindersInstalled&&t.duration>0?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.displayDuration(t.duration)+" "+e.translations.settings.notifications.when[t.when].toLowerCase()+" "),1)],64)):(0,o.kq)("",!0),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.notifications.triggers[t.trigger]),1)])]),(0,o.Wm)(n,{class:"md-list-action md-primary",onClick:e=>s.editNotification(t.id)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"])])])),_:2},1032,["onClick"])))),128))])),_:1})]),(0,o._)("div",Kc,[(0,o._)("h3",Jc,(0,r.zw)(e.translations.settings.notifications.optinSettings.title),1),(0,o._)("p",Xc,(0,r.zw)(e.translations.settings.notifications.optinSettings.description),1),(0,o.Wm)(f,{modelValue:s.optinEnabled,"onUpdate:modelValue":t[0]||(t[0]=e=>s.optinEnabled=e),id:"optinEnabled",name:"optinEnabled"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.optinSettings.enabled),1)])),_:1},8,["modelValue"]),s.optinEnabled?((0,o.wg)(),(0,o.iD)("div",Qc,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.notifications.optinSettings.explanation),1),(0,o.Wm)(u,{modelValue:s.optinLabel,"onUpdate:modelValue":t[1]||(t[1]=e=>s.optinLabel=e),required:"",label:e.translations.settings.notifications.optinSettings.labelField.label,valid:l.isOptinLabelValid,helptext:e.translations.settings.notifications.optinSettings.labelField.helptext,"helptext-validation":"","helptext-persistent":""},null,8,["modelValue","label","valid","helptext"]),(0,o.Wm)(u,{modelValue:s.optinDescription,"onUpdate:modelValue":t[2]||(t[2]=e=>s.optinDescription=e),label:e.translations.settings.notifications.optinSettings.descriptionField.label,helptext:e.translations.settings.notifications.optinSettings.descriptionField.helptext,"helptext-persistent":""},null,8,["modelValue","label","helptext"])])):(0,o.kq)("",!0)])],64)):((0,o.wg)(),(0,o.j4)(c,{key:1,label:e.translations.settings.notifications.empty_appointment_type},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"md-primary",onClick:s.editNotificationsSettings},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.actions.editAll),1)])),_:1},8,["onClick"])])),_:1},8,["label"]))])}var th={name:"AppointmentTypeNotifications",data(){return{isOptinLabelValid:!0}},emits:["validationCheck"],computed:{optinEnabled:{get(){return this.currentAppointmentType.notifications.notifications_opt_in?.enabled||!1},set(e){!0===e&&this.maybePopulateOptinValues(),this.currentAppointmentType.notifications.notifications_opt_in||(this.currentAppointmentType.notifications.notifications_opt_in={}),this.currentAppointmentType.notifications.notifications_opt_in.enabled=e,this.validationCheck()}},optinLabel:{get(){return this.currentAppointmentType.notifications.notifications_opt_in?.label},set(e){this.currentAppointmentType.notifications.notifications_opt_in.label=e,this.validationCheck()}},optinDescription:{get(){return this.currentAppointmentType.notifications.notifications_opt_in?.description},set(e){this.currentAppointmentType.notifications.notifications_opt_in.description=e,this.validationCheck()}},applicableNotifications(){let e=this.settings.notifications.notifications;return e.filter((e=>!1!==e.active&&(0===e.appointment_types.length||e.appointment_types.indexOf(this.currentAppointmentType.id)>-1)))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)(["displayDuration"]),...(0,m.Se)("notifications",["remindersInstalled"])},methods:{maybePopulateOptinValues(){wa().isEmpty(this.currentAppointmentType?.notifications?.notifications_opt_in)&&(this.currentAppointmentType.notifications=C)},editNotification(e){this.$router.push({name:"notification-single",params:{id:e}})},editNotificationsSettings(){this.$router.push("/ssa/settings/notifications")},validationCheck(){let e=!0;this.optinEnabled&&(e=this.optinLabel.length>0,this.isOptinLabelValid=e),this.$emit("validationCheck",e)}}};const ih=(0,he.Z)(th,[["render",eh]]);var ah=ih;const oh={class:"appt-type-capacity"},rh={key:4,class:"md-checkbox-with-note"},lh={class:"md-checkbox-note"};function sh(e,t,i,a,l,s){const n=(0,o.up)("foxy-list-item"),d=(0,o.up)("foxy-select"),p=(0,o.up)("foxy-layout"),f=(0,o.up)("foxy-textfield"),u=(0,o.up)("foxy-checkbox"),c=(0,o.up)("promo-capacity"),h=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.iD)("div",oh,[s.capacityEnabled?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("div",{key:0,class:"accordion-item-disabled-overlay",onClick:t[0]||(t[0]=(...e)=>s.maybeShowUpgrade&&s.maybeShowUpgrade(...e))})),(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{label:e.translations.appointmentTypes.capacity.fields.capacity_type.label,id:"capacity_type",disabled:!s.capacityEnabled,modelValue:s.capacity_type,"onUpdate:modelValue":t[1]||(t[1]=e=>s.capacity_type=e),helptext:s.capacityTypeHelp},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.capacityTypes,(t=>((0,o.wg)(),(0,o.j4)(n,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.capacity.capacityTypeOptions[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","disabled","modelValue","helptext"])])),_:1}),s.staffEnabled&&!s.resourcesEnabled&&"group"===s.capacity_type?((0,o.wg)(),(0,o.j4)(f,{key:1,type:"number",min:"1",max:"100000",disabled:!s.capacityEnabled,modelValue:l.v$.staff_capacity.$model,"onUpdate:modelValue":t[2]||(t[2]=e=>l.v$.staff_capacity.$model=e),modelModifiers:{number:!0},label:e.translations.appointmentTypes.capacity.fields.staff_capacity.label,helptext:e.translations.appointmentTypes.capacity.fields.staff_capacity.help,"helptext-persistent":"",id:"staff-capacity"},null,8,["disabled","modelValue","label","helptext"])):(0,o.kq)("",!0),s.resourcesEnabled&&!s.staffEnabled&&"group"===s.capacity_type?((0,o.wg)(),(0,o.j4)(f,{key:2,type:"number",min:1,max:1e5,disabled:!s.capacityEnabled,modelValue:l.v$.resources_capacity.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>l.v$.resources_capacity.$model=e),modelModifiers:{number:!0},label:e.translations.appointmentTypes.capacity.fields.resources_capacity.label,helptext:e.translations.appointmentTypes.capacity.fields.resources_capacity.help,"helptext-persistent":"",id:"resources-capacity"},null,8,["disabled","modelValue","label","helptext"])):(0,o.kq)("",!0),s.resourcesEnabled&&s.staffEnabled&&"group"===s.capacity_type?((0,o.wg)(),(0,o.j4)(f,{key:3,type:"number",min:1,max:1e5,disabled:!s.capacityEnabled,modelValue:l.v$.resources_staff_capacity.$model,"onUpdate:modelValue":t[4]||(t[4]=e=>l.v$.resources_staff_capacity.$model=e),modelModifiers:{number:!0},label:e.translations.appointmentTypes.capacity.fields.resources_staff_capacity.label,helptext:e.translations.appointmentTypes.capacity.fields.resources_staff_capacity.help,"helptext-persistent":"",id:"resources-staff-capacity"},null,8,["disabled","modelValue","label","helptext"])):(0,o.kq)("",!0),s.staffEnabled||s.resourcesEnabled?((0,o.wg)(),(0,o.iD)("div",rh,[(0,o.Wm)(u,{id:"has_max_capacity",name:"has_max_capacity",onChange:s.maxUpdateCapacity,modelValue:s.has_max_capacity,"onUpdate:modelValue":t[5]||(t[5]=e=>s.has_max_capacity=e),label:e.translations.appointmentTypes.capacity.fields.has_max_capacity.label},null,8,["onChange","modelValue","label"]),(0,o._)("p",lh,(0,r.zw)(e.translations.appointmentTypes.capacity.fields.has_max_capacity.help),1)])):(0,o.kq)("",!0),l.showCapacity?((0,o.wg)(),(0,o.j4)(f,{key:5,type:"number",min:1,max:1e5,disabled:!s.capacityEnabled,modelValue:l.v$.capacity.$model,"onUpdate:modelValue":t[6]||(t[6]=e=>l.v$.capacity.$model=e),modelModifiers:{number:!0},valid:!l.v$.capacity.$invalid,label:s.capacityLabel,helptext:s.capacityError?l.v$.capacity.$invalid?e.translations.appointmentTypes.capacity.fields.capacity.error_bounds:e.translations.appointmentTypes.capacity.fields.capacity.error_mismatch:s.capacityHelp,"helptext-persistent":"","helptext-validation":"",id:"capacity"},null,8,["disabled","modelValue","valid","label","helptext"])):(0,o.kq)("",!0),(0,o.Wm)(h,{ref:"upgradeCapacity"},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{dismissable:!1,onPromoClicked:s.closeDialog},null,8,["onPromoClicked"])])),_:1},512)])}const nh={href:"https://simplyscheduleappointments.com/features",target:"_blank"},dh=["src"],ph=(0,o._)("div",{class:"md-title"},[(0,o.Uk)(" Simply Schedule Appointments "),(0,o._)("strong",null,"Plus")],-1);function fh(e,t,i,a,l,s){const n=(0,o.up)("foxy-fab"),d=(0,o.up)("foxy-card-media"),p=(0,o.up)("foxy-card-header"),f=(0,o.up)("foxy-card-area"),u=(0,o.up)("foxy-button"),c=(0,o.up)("foxy-card-actions"),h=(0,o.up)("foxy-card-content"),m=(0,o.up)("foxy-card");return(0,o.wg)(),(0,o.j4)(m,{"md-with-hover":!0,transition:"fade","md-column":"",class:"limited-width",onClick:s.promoClicked},{default:(0,o.w5)((()=>[(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[i.dismissable?((0,o.wg)(),(0,o.j4)(n,{key:0,"wrapper-class":"promo-close-fab",mini:"",icon:"clear",theme:"white",onClick:s.clearAd,"aria-label":e.translations.promo.dismissNotice},null,8,["onClick","aria-label"])):(0,o.kq)("",!0),(0,o._)("a",nh,[(0,o._)("img",{src:e.$store.state.api.admin_static_url+"/images/upsell-promo-plus.svg",alt:"Simply Schedule Appointments Plus",class:"promo-img promo-plus"},null,8,dh)])])),_:1}),(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[ph])),_:1}),(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[(0,o.Wm)(f,{"md-inset":""},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.promo.capacityText),1),(0,o._)("ul",null,[(0,o._)("li",null,(0,r.zw)(e.translations.promo.capacityTextBullets.google),1),(0,o._)("li",null,(0,r.zw)(e.translations.promo.capacityTextBullets.webMeeting),1)])])),_:1}),(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{mode:"raised",theme:"accent",href:s.upgradeLink,target:"_blank"},{default:(0,o.w5)((()=>[(0,o.Uk)(" Upgrade now ")])),_:1},8,["href"])])),_:1})])),_:1})])),_:1},8,["onClick"])}var uh={name:"PromoCapacity",store:$J,props:{dismissable:{type:Boolean,default:!0}},data(){return{slug:"promo-capacity",purchasePlusLink:qe}},computed:{upgradeLink(){const e=this.purchasePlusLink.split("?"),t=e[0];let i=e.length>1?Wt().parse(e[1]):null;if(!i)return this.purchasePlusLink;const a={utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-plus",utm_term:"capacity",utm_content:"capacity-plus-popup"};return i=Object.assign(i,a),t+"?"+Wt().stringify(i)},...(0,m.rn)("translations",["translations"])},methods:{clearAd(){this.$emit("clearAd",this.slug)},promoClicked(){this.$emit("promoClicked")}}};const ch=(0,he.Z)(uh,[["render",fh]]);var hh=ch,mh={name:"AppointmentTypeCapacity",components:{PromoCapacity:hh},props:{bulkMode:{default:!1,type:Boolean}},data(){return{v$:(0,Rd.Xw)(),capacityTypes:N,showCapacity:!0}},validations(){const e=this.bulkMode;return{capacity:{required:(0,Ld.CF)((()=>!e)),minValue:(0,Ld.uv)(1),maxValue:(0,Ld.PW)(1e5)},staff_capacity:{required:(0,Ld.CF)((()=>!e)),minValue:(0,Ld.uv)(1),maxValue:(0,Ld.PW)(1e5)},resources_capacity:{required:(0,Ld.CF)((()=>!e)),minValue:(0,Ld.uv)(1),maxValue:(0,Ld.PW)(1e5)},resources_staff_capacity:{required:(0,Ld.CF)((()=>!e)),minValue:(0,Ld.uv)(1),maxValue:(0,Ld.PW)(1e5)}}},mounted(){this.showCapacity=!this.staffEnabled&&!this.resourcesEnabled||this.has_max_capacity,this.staffEnabled||this.resourcesEnabled||1e5!=this.capacity||this.updateCurrentAppointmentType({key:"capacity",value:1})},watch:{capacity_type(e,t){this.staffUpdateCapacity({val:e,oldVal:t}),this.resourcesUpdateCapacity({val:e,oldVal:t})}},computed:{capacity:{get(){return this.currentAppointmentType?parseInt(this.currentAppointmentType.capacity,10):1},set(e){this.updateCurrentAppointmentType({key:"capacity",value:e}),this.v$.capacity.$touch(),this.validationCheck()}},capacity_type:{get(){return this.currentAppointmentType?this.currentAppointmentType.capacity_type:"individual"},set(e){this.updateCurrentAppointmentType({key:"capacity_type",value:e})}},capacityEnabled(){return this.settings.capacity&&this.settings.capacity.enabled},capacityError(){return!this.bulkMode&&(!!("group"===this.capacity_type&&this.staffEnabled&&this.staff_capacity>this.capacity)||(!!("group"===this.capacity_type&&this.resourcesEnabled&&this.resources_capacity>this.capacity)||this.v$.capacity.$invalid))},capacityHelp(){return this.staffEnabled?this.translations.appointmentTypes.capacity.fields.capacity.help_staff:"group"===this.capacity_type?this.translations.appointmentTypes.capacity.fields.capacity.help_group:this.translations.appointmentTypes.capacity.fields.capacity.help},capacityLabel(){return this.staffEnabled?this.translations.appointmentTypes.capacity.fields.capacity.label_staff:this.translations.appointmentTypes.capacity.fields.capacity.label},capacityTypeHelp(){return this.staffEnabled&&this.resourcesEnabled?this.translations.appointmentTypes.capacity.fields.capacity_type.help_staff_resources:this.staffEnabled?this.translations.appointmentTypes.capacity.fields.capacity_type.help_staff:this.resourcesEnabled?this.translations.appointmentTypes.capacity.fields.capacity_type.help_resources:this.translations.appointmentTypes.capacity.fields.capacity_type.help},has_max_capacity:{get(){return!!this.currentAppointmentType&&Ps(this.currentAppointmentType.has_max_capacity)},set(e){this.updateCurrentAppointmentType({key:"has_max_capacity",value:e}),this.showCapacity=!this.staffEnabled&&!this.resourcesEnabled||e,this.validationCheck()}},staff_capacity:{get(){return this.currentAppointmentType?parseInt(this.currentAppointmentType.staff_capacity,10):1},set(e){this.updateCurrentAppointmentType({key:"staff_capacity",value:e}),this.v$.staff_capacity.$touch(),this.validationCheck()}},resources_capacity:{get(){return this.currentAppointmentType?parseInt(this.currentAppointmentType.resource_capacity,10):1},set(e){this.updateCurrentAppointmentType({key:"resource_capacity",value:e}),this.v$.resources_capacity.$touch(),this.validationCheck()}},resources_staff_capacity:{get(){return this.currentAppointmentType?parseInt(this.currentAppointmentType.resource_capacity,10):1},set(e){this.resources_capacity=e,this.staff_capacity=e}},staffEnabled(){return this.staffModule.enabled&&""!==this.currentAppointmentType.staff.required},resourcesEnabled(){return this.resourcesModule.enabled&&0!=this.currentAppointmentType.resources_settings.length},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.Se)("staff",["staffModule"]),...(0,m.Se)("resources",["resourcesModule"])},methods:{closeDialog(){this.$refs["upgradeCapacity"].close()},maxUpdateCapacity(e){let t=e?10:1e5;this.updateCurrentAppointmentType({key:"capacity",value:t})},maybeShowUpgrade(){this.capacityEnabled||this.$refs["upgradeCapacity"].open()},staffUpdateCapacity(e){e.val!==e.oldVal&&this.staffEnabled&&"individual"===e.val&&this.updateCurrentAppointmentType({key:"staff_capacity",value:1})},resourcesUpdateCapacity(e){e.val!==e.oldVal&&this.resourcesEnabled&&"individual"===e.val&&this.updateCurrentAppointmentType({key:"resource_capacity",value:1})},validationCheck(){this.$emit("validationCheck",!this.capacityError)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const gh=(0,he.Z)(mh,[["render",sh]]);var _h=gh;const yh={class:"tabs"},wh={class:"tabs-nav"},xh=["onClick"],Ch={class:"step"},vh={class:"img-container"},bh={class:"tabs-content"};function Bh(e,t,i,a,l,s){const n=(0,o.up)("resources-team-list"),d=(0,o.up)("resources-team-radio"),p=(0,o.up)("list-resources-list-team"),f=(0,o.up)("list-resources-radio-team"),u=(0,o.up)("radio-resources-list-team"),c=(0,o.up)("radio-resources-radio-team"),h=(0,o.up)("date-month"),m=(0,o.up)("date-week"),g=(0,o.up)("date-only-available"),_=(0,o.up)("time-of-day-columns"),y=(0,o.up)("single-column"),w=(0,o.up)("row-view"),x=(0,o.up)("block-view"),C=(0,o.up)("appointment-options"),v=(0,o.up)("express-single-column"),b=(0,o.up)("express-rows"),B=(0,o.up)("express-blocks"),S=(0,o.up)("express-list-resources-multiple-time"),k=(0,o.up)("express-radio-resources-multiple-time"),A=(0,o.up)("express-radio-resources-single-time"),M=(0,o.up)("express-list-resources-single-time"),D=(0,o.up)("express-radio-resources-rows"),T=(0,o.up)("express-list-resources-rows"),O=(0,o.up)("express-radio-resources-block"),G=(0,o.up)("express-list-resources-block"),E=(0,o.up)("list-resources-list-team-multiple-time"),U=(0,o.up)("list-resources-radio-team-multiple-time"),F=(0,o.up)("radio-resources-radio-team-multiple-time"),I=(0,o.up)("radio-resources-list-team-multiple-time"),z=(0,o.up)("list-resources-radio-team-single-time"),P=(0,o.up)("list-resources-list-team-single-time"),V=(0,o.up)("radio-resources-radio-team-single-time"),W=(0,o.up)("radio-resources-list-team-single-time"),R=(0,o.up)("list-resources-list-team-rows"),L=(0,o.up)("list-resources-radio-team-rows"),j=(0,o.up)("radio-resources-list-team-rows"),q=(0,o.up)("radio-resources-radio-team-rows"),N=(0,o.up)("list-resources-list-team-block"),$=(0,o.up)("radio-resources-list-team-block"),H=(0,o.up)("list-resources-radio-team-block"),Z=(0,o.up)("radio-resources-radio-team-block"),Y=(0,o.up)("foxy-list-item"),K=(0,o.up)("foxy-select"),J=(0,o.up)("foxy-switch"),X=(0,o.up)("promo-pro"),Q=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.iD)("div",yh,[(0,o._)("div",wh,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.steps,((t,i)=>((0,o.wg)(),(0,o.iD)("div",{key:t,class:(0,r.C_)(["tabs-nav-tab",[t===l.activeStep?"tabs-nav-tab-active":"",{"tabs-nav-tab-disabled":!s.bookingFlowEnabled},[`md-theme-${s.label.color}`]]]),onClick:e=>s.activate(t)},[(0,o._)("span",{class:(0,r.C_)(["number",[`md-theme-${s.label.color}`]])},(0,r.zw)(i+1),3),(0,o._)("span",Ch,(0,r.zw)(e.translations.appointmentTypes.steps[t]),1),(0,o._)("div",vh,["resources"!=t&&"team"!=t||!s.shouldShowListViewForResourcesTeam?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(n,{key:0,color:s.label.color},null,8,["color"])),"resources"!=t&&"team"!=t||!s.shouldShowRadioViewForResourcesTeam?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:1,color:s.label.color},null,8,["color"])),"resources_and_team"==t&&"list"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(p,{key:2,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"resources_and_team"==t&&"list"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(f,{key:3,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"resources_and_team"==t&&"radio"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(u,{key:4,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"resources_and_team"==t&&"radio"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(c,{key:5,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"date"==t&&"month"==s.dateView?((0,o.wg)(),(0,o.j4)(h,{key:6,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"date"==t&&"week"==s.dateView?((0,o.wg)(),(0,o.j4)(m,{key:7,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"date"==t&&"only_available"==s.dateView?((0,o.wg)(),(0,o.j4)(g,{key:8,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"time"==t&&"time_of_day_columns"==s.timeView?((0,o.wg)(),(0,o.j4)(_,{key:9,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"time"==t&&"single_column"==s.timeView?((0,o.wg)(),(0,o.j4)(y,{key:10,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"time"==t&&"rows"==s.timeView?((0,o.wg)(),(0,o.j4)(w,{key:11,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"time"==t&&"block"==s.timeView?((0,o.wg)(),(0,o.j4)(x,{key:12,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&s.resourcesTeamNotRequired?((0,o.wg)(),(0,o.j4)(C,{key:13,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&s.resourcesTeamNotRequired?((0,o.wg)(),(0,o.j4)(v,{key:14,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&s.resourcesTeamNotRequired?((0,o.wg)(),(0,o.j4)(b,{key:15,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&s.resourcesTeamNotRequired?((0,o.wg)(),(0,o.j4)(B,{key:16,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&s.shouldShowListViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(S,{key:17,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&s.shouldShowRadioViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(k,{key:18,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&s.shouldShowRadioViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(A,{key:19,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&s.shouldShowListViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(M,{key:20,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&s.shouldShowRadioViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(D,{key:21,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&s.shouldShowListViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(T,{key:22,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&s.shouldShowRadioViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(O,{key:23,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&s.shouldShowListViewForResourcesTeam?((0,o.wg)(),(0,o.j4)(G,{key:24,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&"list"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(E,{key:25,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&"list"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(U,{key:26,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&"radio"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(F,{key:27,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"time_of_day_columns"==s.timeView&&"radio"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(I,{key:28,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&"list"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(z,{key:29,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&"list"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(P,{key:30,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&"radio"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(V,{key:31,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"single_column"==s.timeView&&"radio"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(W,{key:32,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&"list"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(R,{key:33,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&"list"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(L,{key:34,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&"radio"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(j,{key:35,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"rows"==s.timeView&&"radio"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(q,{key:36,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&"list"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(N,{key:37,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&"radio"==s.resourcesView&&"list"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)($,{key:38,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&"list"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(H,{key:39,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0),"appointmentOptions"==t&&"block"==s.timeView&&"radio"==s.resourcesView&&"radio"==s.teamView&&s.isResourcesTeamRequired?((0,o.wg)(),(0,o.j4)(Z,{key:40,color:s.label.color},null,8,["color"])):(0,o.kq)("",!0)])],10,xh)))),128))]),(0,o._)("div",bh,["resources"!=l.activeStep&&"appointmentOptions"!=l.activeStep&&"resources_and_team"!=l.activeStep||!s.onlyResourcesRequired&&!s.isResourcesTeamRequired?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(K,{key:0,label:e.translations.appointmentTypes.resourcesView,id:"resourcesView",modelValue:s.resourcesView,"onUpdate:modelValue":t[0]||(t[0]=e=>s.resourcesView=e),disabled:!s.bookingFlowEnabled},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.resourceViews,(t=>((0,o.wg)(),(0,o.j4)(Y,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.resourcesViews[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"])),"team"!=l.activeStep&&"appointmentOptions"!=l.activeStep&&"resources_and_team"!=l.activeStep||!s.onlyTeamRequired&&!s.isResourcesTeamRequired?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(K,{key:1,label:e.translations.appointmentTypes.teamView,id:"teamView",modelValue:s.teamView,"onUpdate:modelValue":t[1]||(t[1]=e=>s.teamView=e),disabled:!s.bookingFlowEnabled},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.teamViews,(t=>((0,o.wg)(),(0,o.j4)(Y,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.teamViews[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"])),"date"==l.activeStep?((0,o.wg)(),(0,o.j4)(K,{key:2,label:e.translations.appointmentTypes.dateView,id:"dateView",modelValue:s.dateView,"onUpdate:modelValue":t[2]||(t[2]=e=>s.dateView=e),disabled:!s.bookingFlowEnabled},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.dateViewOptions,(t=>((0,o.wg)(),(0,o.j4)(Y,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.dateViews[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"])):(0,o.kq)("",!0),"time"==l.activeStep||"appointmentOptions"==l.activeStep?((0,o.wg)(),(0,o.j4)(K,{key:3,label:e.translations.appointmentTypes.timeView,id:"timeView",modelValue:s.timeView,"onUpdate:modelValue":t[3]||(t[3]=e=>s.timeView=e),disabled:!s.bookingFlowEnabled},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.timeViews,(t=>((0,o.wg)(),(0,o.j4)(Y,{key:t,"data-value":t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.timeViews[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"])):(0,o.kq)("",!0),"time"==l.activeStep||"appointmentOptions"==l.activeStep?((0,o.wg)(),(0,o.j4)(J,{key:4,modelValue:s.showEndTime,"onUpdate:modelValue":t[4]||(t[4]=e=>s.showEndTime=e),id:"show_end_time",theme:s.label["color"],name:"show_end_time"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.showEndTime),1)])),_:1},8,["modelValue","theme"])):(0,o.kq)("",!0)]),(0,o.Wm)(Q,{ref:"upgradeBookingFlow"},{default:(0,o.w5)((()=>[(0,o.Wm)(X,{"upgrade-url-params":l.promoProUpgradeParams,"pro-text":e.translations.promo.proTextPopUp,dismissable:!1,onPromoClicked:s.closeDialog},null,8,["upgrade-url-params","pro-text","onPromoClicked"])])),_:1},512)])}const Sh={width:"138",height:"79",viewBox:"0 0 138 79",fill:"none",xmlns:"http://www.w3.org/2000/svg"},kh=(0,o.uE)('',16),Ah={filter:"url(#filter0_ddd_1887_13357)"},Mh=(0,o.uE)('',24);function Dh(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Sh,[kh,(0,o._)("g",Ah,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"59.4844",y:"55.499",width:"17.7188",height:"6.15",fill:"#8BC34A"},null,2)]),Mh]))])}var Th={name:"DateMonth",props:{color:{default:"light-green",type:String}}};const Oh=(0,he.Z)(Th,[["render",Dh]]);var Gh=Oh;const Eh={width:"143",height:"46",viewBox:"0 0 143 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Uh=(0,o.uE)('',7),Fh={filter:"url(#filter1_ddd_3046_15637)"},Ih=(0,o.uE)('',7);function zh(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Eh,[Uh,(0,o._)("g",Fh,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"35.8584",y:"27",width:"23.8524",height:"12.2",fill:"#8BC34A"},null,2)]),Ih]))])}var Ph={name:"DateWeek",props:{color:{default:"light-green",type:String}}};const Vh=(0,he.Z)(Ph,[["render",zh]]);var Wh=Vh;const Rh={width:"138",height:"45",viewBox:"0 0 138 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lh=(0,o.uE)('',7),jh={filter:"url(#filter2_ddd_1862_13311)"},qh=(0,o.uE)('',7);function Nh(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Rh,[Lh,(0,o._)("g",jh,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"56.5938",y:"26.6001",width:"24.375",height:"12.2",fill:"#8BC34A"},null,2)]),qh]))])}var $h={name:"DateOnlyAvailable",props:{color:{default:"light-green",type:String}}};const Hh=(0,he.Z)($h,[["render",Nh]]);var Zh=Hh;const Yh={width:"140",height:"97",viewBox:"0 0 140 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Kh={filter:"url(#filter0_ddd_2801_15627)"},Jh=(0,o._)("rect",{x:"116",y:"83.425",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Xh={filter:"url(#filter1_ddd_2801_15627)"},Qh=(0,o._)("rect",{x:"91",y:"83.425",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),em={filter:"url(#filter2_ddd_2801_15627)"},tm=(0,o._)("rect",{x:"116",y:"71.7402",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),im={filter:"url(#filter3_ddd_2801_15627)"},am=(0,o._)("rect",{x:"91",y:"71.7402",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),om=(0,o.uE)('',22),rm={filter:"url(#filter4_ddd_2801_15627)"},lm=(0,o.uE)('',21),sm={filter:"url(#filter5_ddd_2801_15627)"},nm=(0,o._)("rect",{x:"116",y:"25",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),dm={filter:"url(#filter6_ddd_2801_15627)"},pm=(0,o._)("rect",{x:"91",y:"25",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),fm={filter:"url(#filter7_ddd_2801_15627)"},um=(0,o._)("rect",{x:"91",y:"37",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),cm={filter:"url(#filter8_ddd_2801_15627)"},hm=(0,o._)("rect",{x:"118.961",y:"40.7852",width:"13.3247",height:"1.025",fill:"white"},null,-1),mm=(0,o._)("rect",{x:"25.3125",y:"20.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),gm=(0,o._)("rect",{x:"101",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),_m={filter:"url(#filter9_ddd_2801_15627)"},ym=(0,o._)("rect",{x:"116",y:"48.3701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),wm={filter:"url(#filter10_ddd_2801_15627)"},xm=(0,o._)("rect",{x:"91",y:"48.3701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Cm={filter:"url(#filter11_ddd_2801_15627)"},vm=(0,o._)("rect",{x:"116",y:"60.0552",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),bm={filter:"url(#filter12_ddd_2801_15627)"},Bm=(0,o._)("rect",{x:"91",y:"60.0552",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Sm=(0,o.uE)('',1);function km(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Yh,[(0,o._)("g",Kh,[Jh,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"87.5251",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Xh,[Qh,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"93.9608",y:"87.5251",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",em,[tm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"75.8403",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",im,[am,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"93.9608",y:"75.8403",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),om,(0,o._)("g",rm,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"36.5653",y:"57.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),lm,(0,o._)("g",sm,[nm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"29.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",dm,[pm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"93.9608",y:"29.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",fm,[um,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"93.9608",y:"41.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",cm,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"116.1",y:"36.7851",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),hm]),mm,gm,(0,o._)("g",_m,[ym,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"52.4702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",wm,[xm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"93.9608",y:"52.4702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Cm,[vm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"64.1553",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",bm,[Bm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"93.9608",y:"64.1553",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),Sm]))])}var Am={name:"AppointmentOptions",props:{color:{default:"light-green",type:String}}};const Mm=(0,he.Z)(Am,[["render",km]]);var Dm=Mm;const Tm={width:"139",height:"83",viewBox:"0 0 139 83",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Om=(0,o.uE)('',8),Gm={filter:"url(#filter0_ddd_1773_15061)"},Em=(0,o._)("rect",{x:"40.7065",y:"72.4092",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Um={filter:"url(#filter1_ddd_1773_15061)"},Fm=(0,o._)("rect",{x:"40.7065",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Im={filter:"url(#filter2_ddd_1773_15061)"},zm=(0,o._)("rect",{x:"43.7915",y:"50.2959",width:"13.8835",height:"0.732234",fill:"white"},null,-1),Pm={filter:"url(#filter3_ddd_1773_15061)"},Vm=(0,o._)("rect",{x:"40.7065",y:"55.7148",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Wm={filter:"url(#filter4_ddd_1773_15061)"},Rm=(0,o._)("rect",{x:"40.7065",y:"64.0615",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Lm={filter:"url(#filter5_ddd_1773_15061)"},jm=(0,o._)("rect",{x:"12.4487",y:"71.5303",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),qm={filter:"url(#filter6_ddd_1773_15061)"},Nm=(0,o._)("rect",{x:"68.9644",y:"71.5303",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),$m={filter:"url(#filter7_ddd_1773_15061)"},Hm=(0,o._)("rect",{x:"97.2222",y:"71.5303",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Zm={filter:"url(#filter8_ddd_1773_15061)"},Ym=(0,o._)("rect",{x:"12.4487",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Km={filter:"url(#filter9_ddd_1773_15061)"},Jm=(0,o._)("rect",{x:"68.9644",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Xm={filter:"url(#filter10_ddd_1773_15061)"},Qm=(0,o._)("rect",{x:"97.2222",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),eg={filter:"url(#filter11_ddd_1773_15061)"},tg=(0,o._)("rect",{x:"12.4487",y:"46.9277",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),ig={filter:"url(#filter12_ddd_1773_15061)"},ag=(0,o._)("rect",{x:"68.9644",y:"46.9277",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),og={filter:"url(#filter13_ddd_1773_15061)"},rg=(0,o._)("rect",{x:"97.2222",y:"46.9277",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),lg={filter:"url(#filter14_ddd_1773_15061)"},sg=(0,o._)("rect",{x:"12.4487",y:"54.8359",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),ng={filter:"url(#filter15_ddd_1773_15061)"},dg=(0,o._)("rect",{x:"68.9644",y:"54.8359",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),pg={filter:"url(#filter16_ddd_1773_15061)"},fg=(0,o._)("rect",{x:"97.2222",y:"54.8359",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),ug={filter:"url(#filter17_ddd_1773_15061)"},cg=(0,o._)("rect",{x:"12.4487",y:"63.1836",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),hg={filter:"url(#filter18_ddd_1773_15061)"},mg=(0,o._)("rect",{x:"68.9644",y:"63.1836",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),gg={filter:"url(#filter19_ddd_1773_15061)"},_g=(0,o._)("rect",{x:"97.2222",y:"63.1836",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),yg=(0,o.uE)('',1);function wg(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Tm,[Om,(0,o._)("g",Gm,[Em,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"43.7915",y:"75.3379",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Um,[Fm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"43.7915",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Im,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"40.8065",y:"47.4672",width:"19.8539",height:"6.39011",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),zm]),(0,o._)("g",Pm,[Vm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"43.7915",y:"58.6436",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Wm,[Rm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"43.7915",y:"66.9902",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Lm,[jm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"15.5337",y:"74.459",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",qm,[Nm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.0493",y:"74.459",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",$m,[Hm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.307",y:"74.459",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Zm,[Ym,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"15.5337",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Km,[Jm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.0493",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Xm,[Qm,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.307",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",eg,[tg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"15.5337",y:"49.8564",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",ig,[ag,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.0493",y:"49.8564",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",og,[rg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.307",y:"49.8564",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",lg,[sg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"15.5337",y:"57.7646",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",ng,[dg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.0493",y:"57.7646",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",pg,[fg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.307",y:"57.7646",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",ug,[cg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"15.5337",y:"66.1123",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",hg,[mg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.0493",y:"66.1123",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",gg,[_g,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.307",y:"66.1123",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),yg]))])}var xg={name:"TimeOfDayColumns",props:{color:{default:"light-green",type:String}}};const Cg=(0,he.Z)(xg,[["render",wg]]);var vg=Cg;const bg={width:"134",height:"88",viewBox:"0 0 134 88",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bg={filter:"url(#filter0_ddd_2919_15498)"},Sg=(0,o._)("rect",{x:"52.2188",y:"73.8701",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),kg=(0,o._)("rect",{x:"0.1875",y:"0.0700684",width:"30.4688",height:"4.92",fill:"#434343"},null,-1),Ag=(0,o._)("rect",{x:"0.1875",y:"6.21997",width:"23.1562",height:"4.92",fill:"#BDBDBD"},null,-1),Mg=(0,o._)("rect",{x:"109.875",y:"0.0700684",width:"23.1562",height:"4.92",fill:"#BDBDBD"},null,-1),Dg={filter:"url(#filter1_ddd_2919_15498)"},Tg=(0,o._)("rect",{x:"52.2188",y:"27.1299",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),Og={filter:"url(#filter2_ddd_2919_15498)"},Gg=(0,o._)("rect",{x:"56.3433",y:"42.915",width:"18.5625",height:"1.025",fill:"white"},null,-1),Eg=(0,o._)("rect",{x:"51",y:"17.98",width:"29.25",height:"2.46",fill:"#434343"},null,-1),Ug={filter:"url(#filter3_ddd_2919_15498)"},Fg=(0,o._)("rect",{x:"52.2188",y:"50.5",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),Ig={filter:"url(#filter4_ddd_2919_15498)"},zg=(0,o._)("rect",{x:"52.2188",y:"62.1851",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),Pg=(0,o.uE)('',1);function Vg(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",bg,[(0,o._)("g",Bg,[Sg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"56.3433",y:"77.9702",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),kg,Ag,Mg,(0,o._)("g",Dg,[Tg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"56.3433",y:"31.23",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Og,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"52.3188",y:"38.9149",width:"26.6125",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),Gg]),Eg,(0,o._)("g",Ug,[Fg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"56.3433",y:"54.6001",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Ig,[zg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"56.3433",y:"66.2852",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),Pg]))])}var Wg={name:"FirstAvailableView",props:{color:{default:"light-green",type:String}}};const Rg=(0,he.Z)(Wg,[["render",Vg]]);var Lg=Rg;const jg={width:"139",height:"77",viewBox:"0 0 139 77",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qg=(0,o.uE)('',6),Ng={filter:"url(#filter0_ddd_4343_2181)"},$g=(0,o._)("rect",{x:"44.0852",y:"41.9287",width:"13.8835",height:"0.732234",fill:"white"},null,-1),Hg={filter:"url(#filter1_ddd_4343_2181)"},Zg=(0,o._)("rect",{x:"12.748",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Yg={filter:"url(#filter2_ddd_4343_2181)"},Kg=(0,o._)("rect",{x:"69.2635",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Jg={filter:"url(#filter3_ddd_4343_2181)"},Xg=(0,o._)("rect",{x:"97.5215",y:"39.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Qg={filter:"url(#filter4_ddd_4343_2181)"},e_=(0,o._)("rect",{x:"13",y:"66.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),t_={filter:"url(#filter5_ddd_4343_2181)"},i_=(0,o._)("rect",{x:"69.5156",y:"66.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),a_={filter:"url(#filter6_ddd_4343_2181)"},o_=(0,o._)("rect",{x:"41",y:"66",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),r_={filter:"url(#filter7_ddd_4343_2181)"},l_=(0,o._)("rect",{x:"97.7734",y:"66.0195",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),s_=(0,o.uE)('',1);function n_(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",jg,[qg,(0,o._)("g",Ng,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"41.1",y:"39.1",width:"19.8539",height:"6.39011",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),$g]),(0,o._)("g",Hg,[Zg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"15.8329",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Yg,[Kg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.3483",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Jg,[Xg,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.606",y:"41.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",Qg,[e_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"16.0848",y:"68.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",t_,[i_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.6004",y:"68.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",a_,[o_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"44.0848",y:"68.9287",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",r_,[l_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"100.858",y:"68.9482",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),s_]))])}var d_={name:"RowTimeView",props:{color:{default:"light-green",type:String}}};const p_=(0,he.Z)(d_,[["render",n_]]);var f_=p_;const u_={width:"139",height:"65",viewBox:"0 0 139 65",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c_=(0,o.uE)('',5),h_={filter:"url(#filter0_ddd_4343_2152)"},m_=(0,o._)("rect",{x:"16.3922",y:"39",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),g_={filter:"url(#filter1_ddd_4343_2152)"},__=(0,o._)("rect",{x:"47.5313",y:"41.9287",width:"13.8835",height:"0.732234",fill:"white"},null,-1),y_={filter:"url(#filter2_ddd_4343_2152)"},w_=(0,o._)("rect",{x:"72.5",y:"39",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),x_={filter:"url(#filter3_ddd_4343_2152)"},C_=(0,o._)("rect",{x:"100.554",y:"39",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),v_={filter:"url(#filter4_ddd_4343_2152)"},b_=(0,o._)("rect",{x:"30.4191",y:"53.5901",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),B_={filter:"url(#filter5_ddd_4343_2152)"},S_=(0,o._)("rect",{x:"58.4731",y:"53.5901",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),k_={filter:"url(#filter6_ddd_4343_2152)"},A_=(0,o._)("rect",{x:"86.527",y:"53.5901",width:"20.0539",height:"6.59011",rx:"0.5",fill:"white"},null,-1),M_=(0,o.uE)('',1);function D_(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",u_,[c_,(0,o._)("g",h_,[m_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"19.477",y:"41.9287",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",g_,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"44.5461",y:"39.1",width:"19.8539",height:"6.39011",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),__]),(0,o._)("g",y_,[w_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"75.5848",y:"41.9287",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",x_,[C_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"103.639",y:"41.9287",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",v_,[b_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"33.5039",y:"56.5188",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",B_,[S_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"61.5579",y:"56.5188",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),(0,o._)("g",k_,[A_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"89.6118",y:"56.5188",width:"13.8835",height:"0.732234",fill:"#8BC34A"},null,2)]),M_]))])}var T_={name:"BlockTimeView",props:{color:{default:"light-green",type:String}}};const O_=(0,he.Z)(T_,[["render",D_]]);var G_=O_;const E_={width:"134",height:"99",viewBox:"0 0 134 99",fill:"none",xmlns:"http://www.w3.org/2000/svg"},U_={filter:"url(#filter0_ddd_2986_15430)"},F_=(0,o._)("rect",{x:"101.434",y:"85.5549",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),I_={filter:"url(#filter1_ddd_2986_15430)"},z_=(0,o._)("rect",{x:"101.434",y:"73.8701",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),P_=(0,o.uE)('',22),V_={filter:"url(#filter2_ddd_2986_15430)"},W_=(0,o.uE)('',21),R_={filter:"url(#filter3_ddd_2986_15430)"},L_=(0,o._)("rect",{x:"101.434",y:"27.1299",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),j_={filter:"url(#filter4_ddd_2986_15430)"},q_=(0,o._)("rect",{x:"105.559",y:"42.915",width:"18.5625",height:"1.025",fill:"white"},null,-1),N_=(0,o._)("rect",{x:"31.9656",y:"19.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),$_=(0,o._)("rect",{x:"100.216",y:"20.98",width:"29.25",height:"2.46",fill:"#434343"},null,-1),H_={filter:"url(#filter5_ddd_2986_15430)"},Z_=(0,o._)("rect",{x:"101.434",y:"50.5",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),Y_={filter:"url(#filter6_ddd_2986_15430)"},K_=(0,o._)("rect",{x:"101.434",y:"62.1851",width:"26.8125",height:"9.225",rx:"0.5",fill:"white"},null,-1),J_=(0,o.uE)('',1);function X_(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",E_,[(0,o._)("g",U_,[F_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"105.559",y:"89.655",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",I_,[z_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"105.559",y:"77.9702",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),P_,(0,o._)("g",V_,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"42.9343",y:"57.8799",width:"7.3125",height:"6.15",fill:"#8BC34A"},null,2)]),W_,(0,o._)("g",R_,[L_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"105.559",y:"31.23",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",j_,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"101.534",y:"38.9149",width:"26.6125",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),q_]),N_,$_,(0,o._)("g",H_,[Z_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"105.559",y:"54.6001",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Y_,[K_,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"105.559",y:"66.2852",width:"18.5625",height:"1.025",fill:"#8BC34A"},null,2)]),J_]))])}var Q_={name:"ExpressStingleColumn",props:{color:{default:"light-green",type:String}}};const ey=(0,he.Z)(Q_,[["render",X_]]);var ty=ey;const iy={width:"156",height:"79",viewBox:"0 0 156 79",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ay=(0,o.uE)('',22),oy={filter:"url(#filter0_ddd_5774_2266)"},ry=(0,o.uE)('',24),ly={filter:"url(#filter1_ddd_5774_2266)"},sy=(0,o._)("rect",{x:"91.3526",y:"36.6899",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),ny={filter:"url(#filter2_ddd_5774_2266)"},dy=(0,o._)("rect",{x:"109.564",y:"39.6187",width:"9.72692",height:"0.732234",fill:"white"},null,-1),py={filter:"url(#filter3_ddd_5774_2266)"},fy=(0,o._)("rect",{x:"123.453",y:"36.6899",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),uy={filter:"url(#filter4_ddd_5774_2266)"},cy=(0,o._)("rect",{x:"139.503",y:"36.6899",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),hy={filter:"url(#filter5_ddd_5774_2266)"},my=(0,o._)("rect",{x:"91.3526",y:"47.2803",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),gy={filter:"url(#filter6_ddd_5774_2266)"},_y=(0,o._)("rect",{x:"107.403",y:"47.2803",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),yy={filter:"url(#filter7_ddd_5774_2266)"},wy=(0,o._)("rect",{x:"123.453",y:"47.2803",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),xy={filter:"url(#filter8_ddd_5774_2266)"},Cy=(0,o._)("rect",{x:"139.503",y:"47.2803",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),vy={filter:"url(#filter9_ddd_5774_2266)"},by=(0,o._)("rect",{x:"97.3776",y:"57.8701",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),By={filter:"url(#filter10_ddd_5774_2266)"},Sy=(0,o._)("rect",{x:"115.428",y:"57.8701",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),ky={filter:"url(#filter11_ddd_5774_2266)"},Ay=(0,o._)("rect",{x:"133.478",y:"57.8701",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),My=(0,o.uE)('',1);function Dy(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",iy,[ay,(0,o._)("g",oy,[(0,o._)("rect",{x:"31.9068",y:"57.8799",width:"8.20312",height:"6.15",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),ry,(0,o._)("g",ly,[sy,(0,o._)("rect",{x:"93.5139",y:"39.6187",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",ny,[(0,o._)("rect",{x:"107.503",y:"36.7899",width:"13.85",height:"6.39011",rx:"0.4",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),stroke:"#8BC34A","stroke-width":"0.2"},null,2),dy]),(0,o._)("g",py,[fy,(0,o._)("rect",{x:"125.614",y:"39.6187",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",uy,[cy,(0,o._)("rect",{x:"141.664",y:"39.6187",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",hy,[my,(0,o._)("rect",{x:"93.5139",y:"50.209",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",gy,[_y,(0,o._)("rect",{x:"109.564",y:"50.209",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",yy,[wy,(0,o._)("rect",{x:"125.614",y:"50.209",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",xy,[Cy,(0,o._)("rect",{x:"141.664",y:"50.209",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",vy,[by,(0,o._)("rect",{x:"99.5389",y:"60.7988",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",By,[Sy,(0,o._)("rect",{x:"117.589",y:"60.7988",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",ky,[Ay,(0,o._)("rect",{x:"135.639",y:"60.7988",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),My]))])}var Ty={name:"expressRows",props:{color:{default:"light-green",type:String}}};const Oy=(0,he.Z)(Ty,[["render",Dy]]);var Gy=Oy;const Ey={width:"157",height:"79",viewBox:"0 0 157 79",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Uy=(0,o.uE)('',22),Fy={filter:"url(#filter0_ddd_5772_1874)"},Iy=(0,o.uE)('',24),zy={filter:"url(#filter1_ddd_5772_1874)"},Py=(0,o._)("rect",{x:"92",y:"36.6899",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Vy={filter:"url(#filter2_ddd_5772_1874)"},Wy=(0,o._)("rect",{x:"110.212",y:"39.6187",width:"9.72692",height:"0.732234",fill:"white"},null,-1),Ry={filter:"url(#filter3_ddd_5772_1874)"},Ly=(0,o._)("rect",{x:"124.1",y:"36.6899",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),jy={filter:"url(#filter4_ddd_5772_1874)"},qy=(0,o._)("rect",{x:"140.15",y:"36.6899",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Ny=(0,o._)("rect",{x:"120.6",y:"46.2803",width:"5",height:"1.23",fill:"#434343"},null,-1),$y={filter:"url(#filter5_ddd_5772_1874)"},Hy=(0,o._)("rect",{x:"92",y:"50.5103",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Zy={filter:"url(#filter6_ddd_5772_1874)"},Yy=(0,o._)("rect",{x:"108.05",y:"50.5103",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Ky={filter:"url(#filter7_ddd_5772_1874)"},Jy=(0,o._)("rect",{x:"124.1",y:"50.5103",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),Xy={filter:"url(#filter8_ddd_5772_1874)"},Qy=(0,o._)("rect",{x:"140.15",y:"50.5103",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),ew=(0,o._)("rect",{x:"120.6",y:"60.1001",width:"5",height:"1.23",fill:"#434343"},null,-1),tw={filter:"url(#filter9_ddd_5772_1874)"},iw=(0,o._)("rect",{x:"92",y:"64.3301",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),aw={filter:"url(#filter10_ddd_5772_1874)"},ow=(0,o._)("rect",{x:"108.05",y:"64.3301",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),rw={filter:"url(#filter11_ddd_5772_1874)"},lw=(0,o._)("rect",{x:"124.1",y:"64.3301",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),sw={filter:"url(#filter12_ddd_5772_1874)"},nw=(0,o._)("rect",{x:"140.15",y:"64.3301",width:"14.05",height:"6.59011",rx:"0.5",fill:"white"},null,-1),dw=(0,o.uE)('',1);function pw(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Ey,[Uy,(0,o._)("g",Fy,[(0,o._)("rect",{x:"28.9087",y:"57.8799",width:"7.54141",height:"6.15",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),Iy,(0,o._)("g",zy,[Py,(0,o._)("rect",{x:"94.1613",y:"39.6187",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",Vy,[(0,o._)("rect",{x:"108.15",y:"36.7899",width:"13.85",height:"6.39011",rx:"0.4",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),stroke:"#8BC34A","stroke-width":"0.2"},null,2),Wy]),(0,o._)("g",Ry,[Ly,(0,o._)("rect",{x:"126.261",y:"39.6187",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",jy,[qy,(0,o._)("rect",{x:"142.311",y:"39.6187",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),Ny,(0,o._)("g",$y,[Hy,(0,o._)("rect",{x:"94.1613",y:"53.439",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",Zy,[Yy,(0,o._)("rect",{x:"110.211",y:"53.439",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",Ky,[Jy,(0,o._)("rect",{x:"126.261",y:"53.439",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",Xy,[Qy,(0,o._)("rect",{x:"142.311",y:"53.439",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),ew,(0,o._)("g",tw,[iw,(0,o._)("rect",{x:"94.1613",y:"67.2588",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",aw,[ow,(0,o._)("rect",{x:"110.211",y:"67.2588",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",rw,[lw,(0,o._)("rect",{x:"126.261",y:"67.2588",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),(0,o._)("g",sw,[nw,(0,o._)("rect",{x:"142.311",y:"67.2588",width:"9.72692",height:"0.732234",class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]])},null,2)]),dw]))])}var fw={name:"expressBlocks",props:{color:{default:"light-green",type:String}}};const uw=(0,he.Z)(fw,[["render",pw]]);var cw=uw;const hw={width:"135",height:"81",viewBox:"0 0 135 81",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mw=(0,o.uE)('',7),gw={filter:"url(#filter0_ddd_3688_15819)"},_w=(0,o._)("rect",{width:"42",height:"36",transform:"translate(47 39)",fill:"white"},null,-1),yw=(0,o._)("rect",{x:"52",y:"55",width:"27",height:"2",fill:"#434343"},null,-1),ww=(0,o._)("rect",{x:"52",y:"64",width:"27",height:"2",fill:"#434343"},null,-1),xw=(0,o.uE)('',2);function Cw(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",hw,[mw,(0,o._)("g",gw,[_w,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"52",y:"46",width:"27",height:"2",fill:"#689F38"},null,2),yw,ww]),xw]))])}var vw={name:"ResourcesTeamList",props:{color:{default:"light-green",type:String}}};const bw=(0,he.Z)(vw,[["render",Cw]]);var Bw=bw;const Sw={width:"135",height:"54",viewBox:"0 0 135 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},kw=(0,o._)("rect",{width:"26",height:"5",fill:"#434343"},null,-1),Aw=(0,o._)("rect",{y:"6",width:"20",height:"5",fill:"#BDBDBD"},null,-1),Mw=(0,o._)("rect",{x:"115",width:"20",height:"5",fill:"#BDBDBD"},null,-1),Dw=(0,o._)("rect",{x:"47",y:"21",width:"43",height:"2",fill:"#434343"},null,-1),Tw=(0,o._)("rect",{x:"55",y:"42",width:"31",height:"2",fill:"#9E9E9E"},null,-1),Ow=(0,o._)("rect",{x:"55",y:"50",width:"31",height:"2",fill:"#9E9E9E"},null,-1),Gw={"clip-path":"url(#clip0_3688_15820)"},Ew=(0,o.uE)('',3);function Uw(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Sw,[kw,Aw,Mw,Dw,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"55",y:"33",width:"31",height:"2",fill:"#689F38"},null,2),Tw,Ow,(0,o._)("g",Gw,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M47 32.75C46.31 32.75 45.75 33.31 45.75 34C45.75 34.69 46.31 35.25 47 35.25C47.69 35.25 48.25 34.69 48.25 34C48.25 33.31 47.69 32.75 47 32.75ZM47 31.5C45.62 31.5 44.5 32.62 44.5 34C44.5 35.38 45.62 36.5 47 36.5C48.38 36.5 49.5 35.38 49.5 34C49.5 32.62 48.38 31.5 47 31.5ZM47 36C45.895 36 45 35.105 45 34C45 32.895 45.895 32 47 32C48.105 32 49 32.895 49 34C49 35.105 48.105 36 47 36Z",fill:"#689F38"},null,2)]),Ew]))])}var Fw={name:"ResourcesTeamList",props:{color:{default:"light-green",type:String}}};const Iw=(0,he.Z)(Fw,[["render",Uw]]);var zw=Iw;const Pw={width:"157",height:"97",viewBox:"0 0 157 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Vw={filter:"url(#filter0_ddd_3688_15780)"},Ww=(0,o._)("rect",{x:"111",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Rw={filter:"url(#filter1_ddd_3688_15780)"},Lw=(0,o._)("rect",{x:"111",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),jw=(0,o.uE)('',22),qw={filter:"url(#filter2_ddd_3688_15780)"},Nw=(0,o.uE)('',21),$w={filter:"url(#filter3_ddd_3688_15780)"},Hw=(0,o._)("rect",{x:"111",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Zw={filter:"url(#filter4_ddd_3688_15780)"},Yw=(0,o._)("rect",{x:"113.961",y:"40.915",width:"13.3247",height:"1.025",fill:"white"},null,-1),Kw=(0,o._)("rect",{x:"62.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),Jw=(0,o._)("rect",{x:"118",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),Xw={filter:"url(#filter5_ddd_3688_15780)"},Qw=(0,o._)("rect",{x:"111",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),ex={filter:"url(#filter6_ddd_3688_15780)"},tx=(0,o._)("rect",{x:"111",y:"60.1851",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),ix={filter:"url(#filter7_ddd_3688_15780)"},ax=(0,o._)("rect",{x:"134",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),ox={filter:"url(#filter8_ddd_3688_15780)"},rx=(0,o._)("rect",{x:"134",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),lx={filter:"url(#filter9_ddd_3688_15780)"},sx=(0,o._)("rect",{x:"134",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),nx={filter:"url(#filter10_ddd_3688_15780)"},dx=(0,o._)("rect",{x:"134",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),px={filter:"url(#filter11_ddd_3688_15780)"},fx=(0,o._)("rect",{x:"134",y:"37",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),ux={filter:"url(#filter12_ddd_3688_15780)"},cx=(0,o._)("rect",{x:"134",y:"60.1851",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),hx=(0,o._)("mask",{id:"path-71-inside-1_3688_15780",fill:"white"},[(0,o._)("path",{d:"M2.90942 23H42.9094V31H2.90942V23Z"})],-1),mx=(0,o._)("path",{d:"M2.90942 23H42.9094V31H2.90942V23Z",fill:"#E0E0E0"},null,-1),gx=(0,o._)("path",{d:"M42.9094 30H2.90942V32H42.9094V30Z",fill:"black",mask:"url(#path-71-inside-1_3688_15780)"},null,-1),_x={filter:"url(#filter13_ddd_3688_15780)"},yx=(0,o._)("rect",{width:"27",height:"34",transform:"translate(5.90942 27)",fill:"white"},null,-1),wx=(0,o._)("rect",{x:"10.9094",y:"43",width:"17",height:"2",fill:"#434343"},null,-1),xx=(0,o._)("rect",{x:"10.9094",y:"52",width:"17",height:"2",fill:"#434343"},null,-1),Cx=(0,o.uE)('',2);function vx(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",Pw,[(0,o._)("g",Vw,[Ww,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"113.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Rw,[Lw,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"113.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),jw,(0,o._)("g",qw,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"74.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),Nw,(0,o._)("g",$w,[Hw,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"113.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Zw,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"111.1",y:"36.9149",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),Yw]),Kw,Jw,(0,o._)("g",Xw,[Qw,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"113.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",ex,[tx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"113.961",y:"64.2852",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",ix,[ax,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"136.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",ox,[rx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"136.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",lx,[sx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"136.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",nx,[dx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"136.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",px,[fx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"136.961",y:"41.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",ux,[cx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"136.961",y:"64.2852",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),hx,mx,gx,(0,o._)("g",_x,[yx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"10.9094",y:"34",width:"17",height:"2",fill:"#689F38"},null,2),wx,xx]),Cx]))])}var bx={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Bx=(0,he.Z)(bx,[["render",vx]]);var Sx=Bx;const kx={width:"152",height:"97",viewBox:"0 0 152 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ax={filter:"url(#filter0_ddd_3688_15778)"},Mx=(0,o._)("rect",{x:"106",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Dx={filter:"url(#filter1_ddd_3688_15778)"},Tx=(0,o._)("rect",{x:"106",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Ox=(0,o.uE)('',22),Gx={filter:"url(#filter2_ddd_3688_15778)"},Ex=(0,o.uE)('',21),Ux={filter:"url(#filter3_ddd_3688_15778)"},Fx=(0,o._)("rect",{x:"106",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Ix={filter:"url(#filter4_ddd_3688_15778)"},zx=(0,o._)("rect",{x:"108.961",y:"40.915",width:"13.3247",height:"1.025",fill:"white"},null,-1),Px=(0,o._)("rect",{x:"55.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),Vx=(0,o._)("rect",{x:"113",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),Wx=(0,o._)("rect",{x:"6",y:"20",width:"25",height:"2",fill:"#434343"},null,-1),Rx={filter:"url(#filter5_ddd_3688_15778)"},Lx=(0,o._)("rect",{x:"106",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),jx={filter:"url(#filter6_ddd_3688_15778)"},qx=(0,o._)("rect",{x:"106",y:"60.1851",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Nx={filter:"url(#filter7_ddd_3688_15778)"},$x=(0,o._)("rect",{x:"129",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Hx={filter:"url(#filter8_ddd_3688_15778)"},Zx=(0,o._)("rect",{x:"129",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Yx={filter:"url(#filter9_ddd_3688_15778)"},Kx=(0,o._)("rect",{x:"129",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Jx={filter:"url(#filter10_ddd_3688_15778)"},Xx=(0,o._)("rect",{x:"129",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Qx={filter:"url(#filter11_ddd_3688_15778)"},eC=(0,o._)("rect",{x:"129",y:"37",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),tC={filter:"url(#filter12_ddd_3688_15778)"},iC=(0,o._)("rect",{x:"129",y:"60.1851",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),aC=(0,o._)("rect",{x:"13",y:"38",width:"20",height:"2",fill:"#9E9E9E"},null,-1),oC=(0,o._)("rect",{x:"13",y:"46",width:"20",height:"2",fill:"#9E9E9E"},null,-1),rC={"clip-path":"url(#clip0_3688_15778)"},lC=(0,o.uE)('',3);function sC(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",kx,[(0,o._)("g",Ax,[Mx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Dx,[Tx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),Ox,(0,o._)("g",Gx,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"67.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),Ex,(0,o._)("g",Ux,[Fx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Ix,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"106.1",y:"36.9149",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),zx]),Px,Vx,Wx,(0,o._)("g",Rx,[Lx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",jx,[qx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"64.2852",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Nx,[$x,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Hx,[Zx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Yx,[Kx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Jx,[Xx,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Qx,[eC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"41.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",tC,[iC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"64.2852",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"29",width:"20",height:"2",fill:"#689F38"},null,2),aC,oC,(0,o._)("g",rC,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 28.75C4.31 28.75 3.75 29.31 3.75 30C3.75 30.69 4.31 31.25 5 31.25C5.69 31.25 6.25 30.69 6.25 30C6.25 29.31 5.69 28.75 5 28.75ZM5 27.5C3.62 27.5 2.5 28.62 2.5 30C2.5 31.38 3.62 32.5 5 32.5C6.38 32.5 7.5 31.38 7.5 30C7.5 28.62 6.38 27.5 5 27.5ZM5 32C3.895 32 3 31.105 3 30C3 28.895 3.895 28 5 28C6.105 28 7 28.895 7 30C7 31.105 6.105 32 5 32Z",fill:"#689F38"},null,2)]),lC]))])}var nC={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const dC=(0,he.Z)(nC,[["render",sC]]);var pC=dC;const fC={width:"141",height:"97",viewBox:"0 0 141 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},uC={filter:"url(#filter0_ddd_3688_15777)"},cC=(0,o._)("rect",{x:"116",y:"83.5549",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),hC={filter:"url(#filter1_ddd_3688_15777)"},mC=(0,o._)("rect",{x:"116",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),gC=(0,o.uE)('',22),_C={filter:"url(#filter2_ddd_3688_15777)"},yC=(0,o.uE)('',21),wC={filter:"url(#filter3_ddd_3688_15777)"},xC=(0,o._)("rect",{x:"116",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),CC={filter:"url(#filter4_ddd_3688_15777)"},vC=(0,o._)("rect",{x:"118.961",y:"40.915",width:"13.3247",height:"1.025",fill:"white"},null,-1),bC=(0,o._)("rect",{x:"55.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),BC=(0,o._)("rect",{x:"113",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),SC={filter:"url(#filter5_ddd_3688_15777)"},kC=(0,o._)("rect",{x:"116",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),AC={filter:"url(#filter6_ddd_3688_15777)"},MC=(0,o._)("rect",{x:"116",y:"60.1851",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),DC=(0,o._)("rect",{x:"13",y:"38",width:"20",height:"2",fill:"#9E9E9E"},null,-1),TC=(0,o._)("rect",{x:"13",y:"46",width:"20",height:"2",fill:"#9E9E9E"},null,-1),OC={"clip-path":"url(#clip0_3688_15777)"},GC=(0,o.uE)('',3);function EC(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",fC,[(0,o._)("g",uC,[cC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"87.655",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",hC,[mC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),gC,(0,o._)("g",_C,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"67.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),yC,(0,o._)("g",wC,[xC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",CC,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"116.1",y:"36.9149",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),vC]),bC,BC,(0,o._)("g",SC,[kC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",AC,[MC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"64.2852",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"29",width:"20",height:"2",fill:"#689F38"},null,2),DC,TC,(0,o._)("g",OC,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 28.75C4.31 28.75 3.75 29.31 3.75 30C3.75 30.69 4.31 31.25 5 31.25C5.69 31.25 6.25 30.69 6.25 30C6.25 29.31 5.69 28.75 5 28.75ZM5 27.5C3.62 27.5 2.5 28.62 2.5 30C2.5 31.38 3.62 32.5 5 32.5C6.38 32.5 7.5 31.38 7.5 30C7.5 28.62 6.38 27.5 5 27.5ZM5 32C3.895 32 3 31.105 3 30C3 28.895 3.895 28 5 28C6.105 28 7 28.895 7 30C7 31.105 6.105 32 5 32Z",fill:"#689F38"},null,2)]),GC]))])}var UC={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const FC=(0,he.Z)(UC,[["render",EC]]);var IC=FC;const zC={width:"143",height:"97",viewBox:"0 0 143 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PC={filter:"url(#filter0_ddd_3688_15779)"},VC=(0,o._)("rect",{x:"118.909",y:"83.5549",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),WC={filter:"url(#filter1_ddd_3688_15779)"},RC=(0,o._)("rect",{x:"118.909",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),LC=(0,o.uE)('',22),jC={filter:"url(#filter2_ddd_3688_15779)"},qC=(0,o.uE)('',21),NC={filter:"url(#filter3_ddd_3688_15779)"},$C=(0,o._)("rect",{x:"118.909",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),HC={filter:"url(#filter4_ddd_3688_15779)"},ZC=(0,o._)("rect",{x:"121.87",y:"40.915",width:"13.3247",height:"1.025",fill:"white"},null,-1),YC=(0,o._)("rect",{x:"63.2219",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),KC=(0,o._)("rect",{x:"115.909",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),JC={filter:"url(#filter5_ddd_3688_15779)"},XC=(0,o._)("rect",{x:"118.909",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),QC={filter:"url(#filter6_ddd_3688_15779)"},ev=(0,o._)("rect",{x:"118.909",y:"60.1851",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),tv=(0,o._)("mask",{id:"path-59-inside-1_3688_15779",fill:"white"},[(0,o._)("path",{d:"M2.90942 23H42.9094V31H2.90942V23Z"})],-1),iv=(0,o._)("path",{d:"M2.90942 23H42.9094V31H2.90942V23Z",fill:"#E0E0E0"},null,-1),av=(0,o._)("path",{d:"M42.9094 30H2.90942V32H42.9094V30Z",fill:"black",mask:"url(#path-59-inside-1_3688_15779)"},null,-1),ov={filter:"url(#filter7_ddd_3688_15779)"},rv=(0,o._)("rect",{width:"27",height:"34",transform:"translate(5.90942 27)",fill:"white"},null,-1),lv=(0,o._)("rect",{x:"10.9094",y:"43",width:"17",height:"2",fill:"#434343"},null,-1),sv=(0,o._)("rect",{x:"10.9094",y:"52",width:"17",height:"2",fill:"#434343"},null,-1),nv=(0,o.uE)('',2);function dv(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",zC,[(0,o._)("g",PC,[VC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.87",y:"87.655",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",WC,[RC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.87",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),LC,(0,o._)("g",jC,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"74.4747",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),qC,(0,o._)("g",NC,[$C,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.87",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",HC,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"119.009",y:"36.9149",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),ZC]),YC,KC,(0,o._)("g",JC,[XC,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.87",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",QC,[ev,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.87",y:"64.2852",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),tv,iv,av,(0,o._)("g",ov,[rv,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"10.9094",y:"34",width:"17",height:"2",fill:"#689F38"},null,2),lv,sv]),nv]))])}var pv={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const fv=(0,he.Z)(pv,[["render",dv]]);var uv=fv;const cv=(0,o.uE)('',1),hv=[cv];function mv(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,hv)}var gv={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const _v=(0,he.Z)(gv,[["render",mv]]);var yv=_v;const wv=(0,o.uE)('',1),xv=[wv];function Cv(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,xv)}var vv={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const bv=(0,he.Z)(vv,[["render",Cv]]);var Bv=bv;const Sv=(0,o.uE)('',1),kv=[Sv];function Av(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,kv)}var Mv={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Dv=(0,he.Z)(Mv,[["render",Av]]);var Tv=Dv;const Ov=(0,o.uE)('',1),Gv=[Ov];function Ev(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,Gv)}var Uv={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Fv=(0,he.Z)(Uv,[["render",Ev]]);var Iv=Fv;const zv={width:"155",height:"97",viewBox:"0 0 155 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pv={filter:"url(#filter0_ddd_3834_15666)"},Vv=(0,o._)("rect",{x:"109",y:"83.4844",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Wv={filter:"url(#filter1_ddd_3834_15666)"},Rv=(0,o._)("rect",{x:"109",y:"71.7998",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Lv=(0,o.uE)('',22),jv={filter:"url(#filter2_ddd_3834_15666)"},qv=(0,o.uE)('',21),Nv={filter:"url(#filter3_ddd_3834_15666)"},$v=(0,o._)("rect",{x:"109",y:"25.0596",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Hv={filter:"url(#filter4_ddd_3834_15666)"},Zv=(0,o._)("rect",{x:"111.961",y:"40.8452",width:"13.3247",height:"1.025",fill:"white"},null,-1),Yv=(0,o._)("rect",{x:"60.3125",y:"18.6797",width:"29.25",height:"2.46",fill:"#434343"},null,-1),Kv=(0,o._)("rect",{x:"116",y:"18.9297",width:"25",height:"2",fill:"#434343"},null,-1),Jv={filter:"url(#filter5_ddd_3834_15666)"},Xv=(0,o._)("rect",{x:"109",y:"48.4297",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Qv={filter:"url(#filter6_ddd_3834_15666)"},eb=(0,o._)("rect",{x:"109",y:"60.1152",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),tb={filter:"url(#filter7_ddd_3834_15666)"},ib=(0,o._)("rect",{x:"132",y:"83.4844",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),ab={filter:"url(#filter8_ddd_3834_15666)"},ob=(0,o._)("rect",{x:"132",y:"71.7998",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),rb={filter:"url(#filter9_ddd_3834_15666)"},lb=(0,o._)("rect",{x:"132",y:"25.0596",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),sb={filter:"url(#filter10_ddd_3834_15666)"},nb=(0,o._)("rect",{x:"132",y:"48.4297",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),db={filter:"url(#filter11_ddd_3834_15666)"},pb=(0,o._)("rect",{x:"132",y:"36.9297",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),fb={filter:"url(#filter12_ddd_3834_15666)"},ub=(0,o._)("rect",{x:"132",y:"60.1152",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),cb=(0,o.uE)('',6),hb={filter:"url(#filter13_ddd_3834_15666)"},mb=(0,o._)("rect",{width:"25.65",height:"34",transform:"translate(5.85001 31.9297)",fill:"white"},null,-1),gb=(0,o._)("rect",{x:"10.85",y:"47.9297",width:"17",height:"2",fill:"#434343"},null,-1),_b=(0,o._)("rect",{x:"10.85",y:"56.9297",width:"17",height:"2",fill:"#434343"},null,-1),yb=(0,o.uE)('',3);function wb(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",zv,[(0,o._)("g",Pv,[Vv,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"111.961",y:"87.5845",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Wv,[Rv,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"111.961",y:"75.8999",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),Lv,(0,o._)("g",jv,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"72.5653",y:"55.376",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),qv,(0,o._)("g",Nv,[$v,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"111.961",y:"29.1597",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Hv,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"109.1",y:"36.8451",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),Zv]),Yv,Kv,(0,o._)("g",Jv,[Xv,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"111.961",y:"52.5298",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Qv,[eb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"111.961",y:"64.2153",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",tb,[ib,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"134.961",y:"87.5845",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",ab,[ob,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"134.961",y:"75.8999",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",rb,[lb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"134.961",y:"29.1597",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",sb,[nb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"134.961",y:"52.5298",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",db,[pb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"134.961",y:"41.0298",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",fb,[ub,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"134.961",y:"64.2153",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),cb,(0,o._)("g",hb,[mb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"10.85",y:"38.9297",width:"17",height:"2",fill:"#689F38"},null,2),gb,_b]),yb]))])}var xb={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Cb=(0,he.Z)(xb,[["render",wb]]);var vb=Cb;const bb={width:"144",height:"97",viewBox:"0 0 144 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bb=(0,o._)("rect",{x:"9",y:"20",width:"25",height:"2",fill:"#434343"},null,-1),Sb={filter:"url(#filter0_ddd_3834_16963)"},kb=(0,o._)("rect",{x:"119",y:"83.5552",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Ab={filter:"url(#filter1_ddd_3834_16963)"},Mb=(0,o._)("rect",{x:"119",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Db=(0,o.uE)('',22),Tb={filter:"url(#filter2_ddd_3834_16963)"},Ob=(0,o.uE)('',21),Gb={filter:"url(#filter3_ddd_3834_16963)"},Eb=(0,o._)("rect",{x:"119",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Ub={filter:"url(#filter4_ddd_3834_16963)"},Fb=(0,o._)("rect",{x:"121.961",y:"40.9155",width:"13.3247",height:"1.025",fill:"white"},null,-1),Ib=(0,o._)("rect",{x:"58.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),zb=(0,o._)("rect",{x:"116",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),Pb={filter:"url(#filter5_ddd_3834_16963)"},Vb=(0,o._)("rect",{x:"119",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Wb={filter:"url(#filter6_ddd_3834_16963)"},Rb=(0,o._)("rect",{x:"119",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Lb=(0,o.uE)('',6),jb={filter:"url(#filter7_ddd_3834_16963)"},qb=(0,o._)("rect",{width:"26.325",height:"34",transform:"translate(5.92499 32)",fill:"white"},null,-1),Nb=(0,o._)("rect",{x:"10.925",y:"48",width:"17",height:"2",fill:"#434343"},null,-1),$b=(0,o._)("rect",{x:"10.925",y:"57",width:"17",height:"2",fill:"#434343"},null,-1),Hb=(0,o.uE)('',2);function Zb(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",bb,[Bb,(0,o._)("g",Sb,[kb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.961",y:"87.6553",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Ab,[Mb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),Db,(0,o._)("g",Tb,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"70.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),Ob,(0,o._)("g",Gb,[Eb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Ub,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"119.1",y:"36.9154",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),Fb]),Ib,zb,(0,o._)("g",Pb,[Vb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Wb,[Rb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"121.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),Lb,(0,o._)("g",jb,[qb,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"10.925",y:"39",width:"17",height:"2",fill:"#689F38"},null,2),Nb,$b]),Hb]))])}var Yb={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Kb=(0,he.Z)(Yb,[["render",Zb]]);var Jb=Kb;const Xb=(0,o.uE)('',1),Qb=[Xb];function eB(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,Qb)}var tB={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const iB=(0,he.Z)(tB,[["render",eB]]);var aB=iB;const oB=(0,o.uE)('',1),rB=[oB];function lB(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,rB)}var sB={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const nB=(0,he.Z)(sB,[["render",lB]]);var dB=nB;const pB={width:"154",height:"97",viewBox:"0 0 154 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fB={filter:"url(#filter0_ddd_3834_17404)"},uB=(0,o._)("rect",{x:"108",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),cB={filter:"url(#filter1_ddd_3834_17404)"},hB=(0,o._)("rect",{x:"108",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),mB=(0,o.uE)('',22),gB={filter:"url(#filter2_ddd_3834_17404)"},_B=(0,o.uE)('',21),yB={filter:"url(#filter3_ddd_3834_17404)"},wB=(0,o._)("rect",{x:"108",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),xB={filter:"url(#filter4_ddd_3834_17404)"},CB=(0,o._)("rect",{x:"110.961",y:"40.9155",width:"13.3247",height:"1.025",fill:"white"},null,-1),vB=(0,o._)("rect",{x:"59.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),bB=(0,o._)("rect",{x:"115",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),BB={filter:"url(#filter5_ddd_3834_17404)"},SB=(0,o._)("rect",{x:"108",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),kB={filter:"url(#filter6_ddd_3834_17404)"},AB=(0,o._)("rect",{x:"108",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),MB={filter:"url(#filter7_ddd_3834_17404)"},DB=(0,o._)("rect",{x:"131",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),TB={filter:"url(#filter8_ddd_3834_17404)"},OB=(0,o._)("rect",{x:"131",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),GB={filter:"url(#filter9_ddd_3834_17404)"},EB=(0,o._)("rect",{x:"131",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),UB={filter:"url(#filter10_ddd_3834_17404)"},FB=(0,o._)("rect",{x:"131",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),IB={filter:"url(#filter11_ddd_3834_17404)"},zB=(0,o._)("rect",{x:"131",y:"37",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),PB={filter:"url(#filter12_ddd_3834_17404)"},VB=(0,o._)("rect",{x:"131",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),WB=(0,o.uE)('',5),RB=(0,o._)("rect",{x:"13",y:"54",width:"20",height:"2",fill:"#9E9E9E"},null,-1),LB=(0,o._)("rect",{x:"13",y:"62",width:"20",height:"2",fill:"#9E9E9E"},null,-1),jB={"clip-path":"url(#clip0_3834_17404)"},qB=(0,o.uE)('',3);function NB(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",pB,[(0,o._)("g",fB,[uB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",cB,[hB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),mB,(0,o._)("g",gB,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"71.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),_B,(0,o._)("g",yB,[wB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",xB,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.1",y:"36.9154",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),CB]),vB,bB,(0,o._)("g",BB,[SB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",kB,[AB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",MB,[DB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",TB,[OB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",GB,[EB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",UB,[FB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",IB,[zB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"41.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",PB,[VB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),WB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"45",width:"20",height:"2",fill:"#689F38"},null,2),RB,LB,(0,o._)("g",jB,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 44.75C4.31 44.75 3.75 45.31 3.75 46C3.75 46.69 4.31 47.25 5 47.25C5.69 47.25 6.25 46.69 6.25 46C6.25 45.31 5.69 44.75 5 44.75ZM5 43.5C3.62 43.5 2.5 44.62 2.5 46C2.5 47.38 3.62 48.5 5 48.5C6.38 48.5 7.5 47.38 7.5 46C7.5 44.62 6.38 43.5 5 43.5ZM5 48C3.895 48 3 47.105 3 46C3 44.895 3.895 44 5 44C6.105 44 7 44.895 7 46C7 47.105 6.105 48 5 48Z",fill:"#689F38"},null,2)]),qB]))])}var $B={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const HB=(0,he.Z)($B,[["render",NB]]);var ZB=HB;const YB={width:"141",height:"97",viewBox:"0 0 141 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},KB={filter:"url(#filter0_ddd_3834_17073)"},JB=(0,o._)("rect",{x:"116",y:"83.4849",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),XB={filter:"url(#filter1_ddd_3834_17073)"},QB=(0,o._)("rect",{x:"116",y:"71.7998",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),eS=(0,o.uE)('',22),tS={filter:"url(#filter2_ddd_3834_17073)"},iS=(0,o.uE)('',21),aS={filter:"url(#filter3_ddd_3834_17073)"},oS=(0,o._)("rect",{x:"116",y:"25.0596",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),rS={filter:"url(#filter4_ddd_3834_17073)"},lS=(0,o._)("rect",{x:"118.961",y:"40.8452",width:"13.3247",height:"1.025",fill:"white"},null,-1),sS=(0,o._)("rect",{x:"55.3125",y:"18.6797",width:"29.25",height:"2.46",fill:"#434343"},null,-1),nS=(0,o._)("rect",{x:"113",y:"18.9297",width:"25",height:"2",fill:"#434343"},null,-1),dS={filter:"url(#filter5_ddd_3834_17073)"},pS=(0,o._)("rect",{x:"116",y:"48.4297",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),fS={filter:"url(#filter6_ddd_3834_17073)"},uS=(0,o._)("rect",{x:"116",y:"60.1152",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),cS=(0,o.uE)('',5),hS=(0,o._)("rect",{x:"11",y:"53.9297",width:"20",height:"2",fill:"#9E9E9E"},null,-1),mS=(0,o._)("rect",{x:"11",y:"61.9297",width:"20",height:"2",fill:"#9E9E9E"},null,-1),gS={"clip-path":"url(#clip0_3834_17073)"},_S=(0,o.uE)('',3);function yS(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",YB,[(0,o._)("g",KB,[JB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"87.585",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",XB,[QB,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"75.8999",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),eS,(0,o._)("g",tS,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"67.5653",y:"55.376",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),iS,(0,o._)("g",aS,[oS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"29.1597",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",rS,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"116.1",y:"36.8451",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),lS]),sS,nS,(0,o._)("g",dS,[pS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"52.5298",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",fS,[uS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"64.2153",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),cS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"11",y:"44.9297",width:"20",height:"2",fill:"#689F38"},null,2),hS,mS,(0,o._)("g",gS,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M3 44.6797C2.31 44.6797 1.75 45.2397 1.75 45.9297C1.75 46.6197 2.31 47.1797 3 47.1797C3.69 47.1797 4.25 46.6197 4.25 45.9297C4.25 45.2397 3.69 44.6797 3 44.6797ZM3 43.4297C1.62 43.4297 0.5 44.5497 0.5 45.9297C0.5 47.3097 1.62 48.4297 3 48.4297C4.38 48.4297 5.5 47.3097 5.5 45.9297C5.5 44.5497 4.38 43.4297 3 43.4297ZM3 47.9297C1.895 47.9297 1 47.0347 1 45.9297C1 44.8247 1.895 43.9297 3 43.9297C4.105 43.9297 5 44.8247 5 45.9297C5 47.0347 4.105 47.9297 3 47.9297Z",fill:"#689F38"},null,2)]),_S]))])}var wS={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const xS=(0,he.Z)(wS,[["render",yS]]);var CS=xS;const vS=(0,o.uE)('',1),bS=[vS];function BS(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,bS)}var SS={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const kS=(0,he.Z)(SS,[["render",BS]]);var AS=kS;const MS=(0,o.uE)('',1),DS=[MS];function TS(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,DS)}var OS={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const GS=(0,he.Z)(OS,[["render",TS]]);var ES=GS;const US={width:"141",height:"97",viewBox:"0 0 141 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},FS=(0,o._)("rect",{x:"6",y:"19.9297",width:"25",height:"2",fill:"#434343"},null,-1),IS={filter:"url(#filter0_ddd_3834_17167)"},zS=(0,o._)("rect",{x:"116",y:"83.4849",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),PS={filter:"url(#filter1_ddd_3834_17167)"},VS=(0,o._)("rect",{x:"116",y:"71.7998",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),WS=(0,o.uE)('',22),RS={filter:"url(#filter2_ddd_3834_17167)"},LS=(0,o.uE)('',21),jS={filter:"url(#filter3_ddd_3834_17167)"},qS=(0,o._)("rect",{x:"116",y:"25.0596",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),NS={filter:"url(#filter4_ddd_3834_17167)"},$S=(0,o._)("rect",{x:"118.961",y:"40.8452",width:"13.3247",height:"1.025",fill:"white"},null,-1),HS=(0,o._)("rect",{x:"55.3125",y:"18.6797",width:"29.25",height:"2.46",fill:"#434343"},null,-1),ZS=(0,o._)("rect",{x:"113",y:"18.9297",width:"25",height:"2",fill:"#434343"},null,-1),YS={filter:"url(#filter5_ddd_3834_17167)"},KS=(0,o._)("rect",{x:"116",y:"48.4297",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),JS={filter:"url(#filter6_ddd_3834_17167)"},XS=(0,o._)("rect",{x:"116",y:"60.1152",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),QS=(0,o.uE)('',4),ek=(0,o._)("rect",{x:"11",y:"37.9297",width:"20",height:"2",fill:"#9E9E9E"},null,-1),tk=(0,o._)("rect",{x:"11",y:"45.9297",width:"20",height:"2",fill:"#9E9E9E"},null,-1),ik={"clip-path":"url(#clip0_3834_17167)"},ak=(0,o.uE)('',3);function ok(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",US,[FS,(0,o._)("g",IS,[zS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"87.585",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",PS,[VS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"75.8999",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),WS,(0,o._)("g",RS,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"67.5653",y:"55.376",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),LS,(0,o._)("g",jS,[qS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"29.1597",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",NS,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"116.1",y:"36.8451",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),$S]),HS,ZS,(0,o._)("g",YS,[KS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"52.5298",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",JS,[XS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"64.2153",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),QS,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"11",y:"28.9297",width:"20",height:"2",fill:"#689F38"},null,2),ek,tk,(0,o._)("g",ik,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M3 28.6797C2.31 28.6797 1.75 29.2397 1.75 29.9297C1.75 30.6197 2.31 31.1797 3 31.1797C3.69 31.1797 4.25 30.6197 4.25 29.9297C4.25 29.2397 3.69 28.6797 3 28.6797ZM3 27.4297C1.62 27.4297 0.5 28.5497 0.5 29.9297C0.5 31.3097 1.62 32.4297 3 32.4297C4.38 32.4297 5.5 31.3097 5.5 29.9297C5.5 28.5497 4.38 27.4297 3 27.4297ZM3 31.9297C1.895 31.9297 1 31.0347 1 29.9297C1 28.8247 1.895 27.9297 3 27.9297C4.105 27.9297 5 28.8247 5 29.9297C5 31.0347 4.105 31.9297 3 31.9297Z",fill:"#689F38"},null,2)]),ak]))])}var rk={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const lk=(0,he.Z)(rk,[["render",ok]]);var sk=lk;const nk={width:"154",height:"97",viewBox:"0 0 154 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dk={filter:"url(#filter0_ddd_3834_17405)"},pk=(0,o._)("rect",{x:"108",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),fk={filter:"url(#filter1_ddd_3834_17405)"},uk=(0,o._)("rect",{x:"108",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),ck=(0,o.uE)('',22),hk={filter:"url(#filter2_ddd_3834_17405)"},mk=(0,o.uE)('',21),gk={filter:"url(#filter3_ddd_3834_17405)"},_k=(0,o._)("rect",{x:"108",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),yk={filter:"url(#filter4_ddd_3834_17405)"},wk=(0,o._)("rect",{x:"110.961",y:"40.9155",width:"13.3247",height:"1.025",fill:"white"},null,-1),xk=(0,o._)("rect",{x:"59.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),Ck=(0,o._)("rect",{x:"115",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),vk={filter:"url(#filter5_ddd_3834_17405)"},bk=(0,o._)("rect",{x:"108",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Bk={filter:"url(#filter6_ddd_3834_17405)"},Sk=(0,o._)("rect",{x:"108",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),kk={filter:"url(#filter7_ddd_3834_17405)"},Ak=(0,o._)("rect",{x:"131",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Mk={filter:"url(#filter8_ddd_3834_17405)"},Dk=(0,o._)("rect",{x:"131",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Tk={filter:"url(#filter9_ddd_3834_17405)"},Ok=(0,o._)("rect",{x:"131",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Gk={filter:"url(#filter10_ddd_3834_17405)"},Ek=(0,o._)("rect",{x:"131",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Uk={filter:"url(#filter11_ddd_3834_17405)"},Fk=(0,o._)("rect",{x:"131",y:"37",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Ik={filter:"url(#filter12_ddd_3834_17405)"},zk=(0,o._)("rect",{x:"131",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),Pk=(0,o.uE)('',5),Vk=(0,o._)("rect",{x:"13",y:"38",width:"20",height:"2",fill:"#9E9E9E"},null,-1),Wk=(0,o._)("rect",{x:"13",y:"46",width:"20",height:"2",fill:"#9E9E9E"},null,-1),Rk={"clip-path":"url(#clip0_3834_17405)"},Lk=(0,o.uE)('',3);function jk(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",nk,[(0,o._)("g",dk,[pk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",fk,[uk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),ck,(0,o._)("g",hk,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"71.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),mk,(0,o._)("g",gk,[_k,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",yk,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.1",y:"36.9154",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),wk]),xk,Ck,(0,o._)("g",vk,[bk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Bk,[Sk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"110.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",kk,[Ak,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Mk,[Dk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Tk,[Ok,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Gk,[Ek,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Uk,[Fk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"41.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",Ik,[zk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"133.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),Pk,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"29",width:"20",height:"2",fill:"#689F38"},null,2),Vk,Wk,(0,o._)("g",Rk,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 28.75C4.31 28.75 3.75 29.31 3.75 30C3.75 30.69 4.31 31.25 5 31.25C5.69 31.25 6.25 30.69 6.25 30C6.25 29.31 5.69 28.75 5 28.75ZM5 27.5C3.62 27.5 2.5 28.62 2.5 30C2.5 31.38 3.62 32.5 5 32.5C6.38 32.5 7.5 31.38 7.5 30C7.5 28.62 6.38 27.5 5 27.5ZM5 32C3.895 32 3 31.105 3 30C3 28.895 3.895 28 5 28C6.105 28 7 28.895 7 30C7 31.105 6.105 32 5 32Z",fill:"#689F38"},null,2)]),Lk]))])}var qk={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Nk=(0,he.Z)(qk,[["render",jk]]);var $k=Nk;const Hk=(0,o.uE)('',1),Zk=[Hk];function Yk(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,Zk)}var Kk={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const Jk=(0,he.Z)(Kk,[["render",Yk]]);var Xk=Jk;const Qk=(0,o.uE)('',1),eA=[Qk];function tA(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,eA)}var iA={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const aA=(0,he.Z)(iA,[["render",tA]]);var oA=aA;const rA={width:"141",height:"97",viewBox:"0 0 141 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lA=(0,o._)("rect",{x:"6",y:"20",width:"25",height:"2",fill:"#434343"},null,-1),sA={filter:"url(#filter0_ddd_3834_15762)"},nA=(0,o._)("rect",{x:"116",y:"83.5552",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),dA={filter:"url(#filter1_ddd_3834_15762)"},pA=(0,o._)("rect",{x:"116",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),fA=(0,o.uE)('',22),uA={filter:"url(#filter2_ddd_3834_15762)"},cA=(0,o.uE)('',21),hA={filter:"url(#filter3_ddd_3834_15762)"},mA=(0,o._)("rect",{x:"116",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),gA={filter:"url(#filter4_ddd_3834_15762)"},_A=(0,o._)("rect",{x:"118.961",y:"40.9155",width:"13.3247",height:"1.025",fill:"white"},null,-1),yA=(0,o._)("rect",{x:"55.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),wA=(0,o._)("rect",{x:"113",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),xA={filter:"url(#filter5_ddd_3834_15762)"},CA=(0,o._)("rect",{x:"116",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),vA={filter:"url(#filter6_ddd_3834_15762)"},bA=(0,o._)("rect",{x:"116",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),BA=(0,o._)("rect",{x:"13",y:"38",width:"20",height:"2",fill:"#9E9E9E"},null,-1),SA=(0,o._)("rect",{x:"13",y:"46",width:"20",height:"2",fill:"#9E9E9E"},null,-1),kA={"clip-path":"url(#clip0_3834_15762)"},AA=(0,o._)("g",{"clip-path":"url(#clip1_3834_15762)"},[(0,o._)("path",{d:"M5 36.5C3.62 36.5 2.5 37.62 2.5 39C2.5 40.38 3.62 41.5 5 41.5C6.38 41.5 7.5 40.38 7.5 39C7.5 37.62 6.38 36.5 5 36.5ZM5 41C3.895 41 3 40.105 3 39C3 37.895 3.895 37 5 37C6.105 37 7 37.895 7 39C7 40.105 6.105 41 5 41Z",fill:"#9E9E9E"})],-1),MA=(0,o._)("g",{"clip-path":"url(#clip2_3834_15762)"},[(0,o._)("path",{d:"M5 44.5C3.62 44.5 2.5 45.62 2.5 47C2.5 48.38 3.62 49.5 5 49.5C6.38 49.5 7.5 48.38 7.5 47C7.5 45.62 6.38 44.5 5 44.5ZM5 49C3.895 49 3 48.105 3 47C3 45.895 3.895 45 5 45C6.105 45 7 45.895 7 47C7 48.105 6.105 49 5 49Z",fill:"#9E9E9E"})],-1),DA=(0,o._)("rect",{x:"13",y:"68",width:"20",height:"2",fill:"#9E9E9E"},null,-1),TA=(0,o._)("rect",{x:"13",y:"76",width:"20",height:"2",fill:"#9E9E9E"},null,-1),OA={"clip-path":"url(#clip3_3834_15762)"},GA=(0,o.uE)('',3);function EA(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",rA,[lA,(0,o._)("g",sA,[nA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"87.6553",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",dA,[pA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),fA,(0,o._)("g",uA,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"67.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),cA,(0,o._)("g",hA,[mA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",gA,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"116.1",y:"36.9154",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),_A]),yA,wA,(0,o._)("g",xA,[CA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",vA,[bA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"118.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"29",width:"20",height:"2",fill:"#689F38"},null,2),BA,SA,(0,o._)("g",kA,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 28.75C4.31 28.75 3.75 29.31 3.75 30C3.75 30.69 4.31 31.25 5 31.25C5.69 31.25 6.25 30.69 6.25 30C6.25 29.31 5.69 28.75 5 28.75ZM5 27.5C3.62 27.5 2.5 28.62 2.5 30C2.5 31.38 3.62 32.5 5 32.5C6.38 32.5 7.5 31.38 7.5 30C7.5 28.62 6.38 27.5 5 27.5ZM5 32C3.895 32 3 31.105 3 30C3 28.895 3.895 28 5 28C6.105 28 7 28.895 7 30C7 31.105 6.105 32 5 32Z",fill:"#689F38"},null,2)]),AA,MA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"59",width:"20",height:"2",fill:"#689F38"},null,2),DA,TA,(0,o._)("g",OA,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 58.75C4.31 58.75 3.75 59.31 3.75 60C3.75 60.69 4.31 61.25 5 61.25C5.69 61.25 6.25 60.69 6.25 60C6.25 59.31 5.69 58.75 5 58.75ZM5 57.5C3.62 57.5 2.5 58.62 2.5 60C2.5 61.38 3.62 62.5 5 62.5C6.38 62.5 7.5 61.38 7.5 60C7.5 58.62 6.38 57.5 5 57.5ZM5 62C3.895 62 3 61.105 3 60C3 58.895 3.895 58 5 58C6.105 58 7 58.895 7 60C7 61.105 6.105 62 5 62Z",fill:"#689F38"},null,2)]),GA]))])}var UA={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const FA=(0,he.Z)(UA,[["render",EA]]);var IA=FA;const zA={width:"152",height:"97",viewBox:"0 0 152 97",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PA={filter:"url(#filter0_ddd_3834_15561)"},VA=(0,o._)("rect",{x:"106",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),WA={filter:"url(#filter1_ddd_3834_15561)"},RA=(0,o._)("rect",{x:"106",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),LA=(0,o.uE)('',22),jA={filter:"url(#filter2_ddd_3834_15561)"},qA=(0,o.uE)('',21),NA={filter:"url(#filter3_ddd_3834_15561)"},$A=(0,o._)("rect",{x:"106",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),HA={filter:"url(#filter4_ddd_3834_15561)"},ZA=(0,o._)("rect",{x:"108.961",y:"40.9155",width:"13.3247",height:"1.025",fill:"white"},null,-1),YA=(0,o._)("rect",{x:"55.3125",y:"18.75",width:"29.25",height:"2.46",fill:"#434343"},null,-1),KA=(0,o._)("rect",{x:"113",y:"19",width:"25",height:"2",fill:"#434343"},null,-1),JA=(0,o._)("rect",{x:"6",y:"20",width:"25",height:"2",fill:"#434343"},null,-1),XA={filter:"url(#filter5_ddd_3834_15561)"},QA=(0,o._)("rect",{x:"106",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),eM={filter:"url(#filter6_ddd_3834_15561)"},tM=(0,o._)("rect",{x:"106",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),iM={filter:"url(#filter7_ddd_3834_15561)"},aM=(0,o._)("rect",{x:"129",y:"83.5547",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),oM={filter:"url(#filter8_ddd_3834_15561)"},rM=(0,o._)("rect",{x:"129",y:"71.8701",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),lM={filter:"url(#filter9_ddd_3834_15561)"},sM=(0,o._)("rect",{x:"129",y:"25.1299",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),nM={filter:"url(#filter10_ddd_3834_15561)"},dM=(0,o._)("rect",{x:"129",y:"48.5",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),pM={filter:"url(#filter11_ddd_3834_15561)"},fM=(0,o._)("rect",{x:"129",y:"37",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),uM={filter:"url(#filter12_ddd_3834_15561)"},cM=(0,o._)("rect",{x:"129",y:"60.1855",width:"19.2468",height:"9.225",rx:"0.5",fill:"white"},null,-1),hM=(0,o._)("rect",{x:"13",y:"38",width:"20",height:"2",fill:"#9E9E9E"},null,-1),mM=(0,o._)("rect",{x:"13",y:"46",width:"20",height:"2",fill:"#9E9E9E"},null,-1),gM={"clip-path":"url(#clip0_3834_15561)"},_M=(0,o._)("g",{"clip-path":"url(#clip1_3834_15561)"},[(0,o._)("path",{d:"M5 36.5C3.62 36.5 2.5 37.62 2.5 39C2.5 40.38 3.62 41.5 5 41.5C6.38 41.5 7.5 40.38 7.5 39C7.5 37.62 6.38 36.5 5 36.5ZM5 41C3.895 41 3 40.105 3 39C3 37.895 3.895 37 5 37C6.105 37 7 37.895 7 39C7 40.105 6.105 41 5 41Z",fill:"#9E9E9E"})],-1),yM=(0,o._)("g",{"clip-path":"url(#clip2_3834_15561)"},[(0,o._)("path",{d:"M5 44.5C3.62 44.5 2.5 45.62 2.5 47C2.5 48.38 3.62 49.5 5 49.5C6.38 49.5 7.5 48.38 7.5 47C7.5 45.62 6.38 44.5 5 44.5ZM5 49C3.895 49 3 48.105 3 47C3 45.895 3.895 45 5 45C6.105 45 7 45.895 7 47C7 48.105 6.105 49 5 49Z",fill:"#9E9E9E"})],-1),wM=(0,o._)("rect",{x:"13",y:"66",width:"20",height:"2",fill:"#9E9E9E"},null,-1),xM=(0,o._)("rect",{x:"13",y:"74",width:"20",height:"2",fill:"#9E9E9E"},null,-1),CM={"clip-path":"url(#clip3_3834_15561)"},vM=(0,o.uE)('',3);function bM(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",zA,[(0,o._)("g",PA,[VA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",WA,[RA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),LA,(0,o._)("g",jA,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"67.5653",y:"55.4463",width:"6.14747",height:"5.68927",fill:"#8BC34A"},null,2)]),qA,(0,o._)("g",NA,[$A,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",HA,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"106.1",y:"36.9154",width:"19.0468",height:"9.025",rx:"0.4",fill:"#8BC34A",stroke:"#8BC34A","stroke-width":"0.2"},null,2),ZA]),YA,KA,JA,(0,o._)("g",XA,[QA,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",eM,[tM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"108.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",iM,[aM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"87.6548",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",oM,[rM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"75.9702",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",lM,[sM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"29.23",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",nM,[dM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"52.6001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",pM,[fM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"41.1001",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("g",uM,[cM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"131.961",y:"64.2856",width:"13.3247",height:"1.025",fill:"#8BC34A"},null,2)]),(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"29",width:"20",height:"2",fill:"#689F38"},null,2),hM,mM,(0,o._)("g",gM,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 28.75C4.31 28.75 3.75 29.31 3.75 30C3.75 30.69 4.31 31.25 5 31.25C5.69 31.25 6.25 30.69 6.25 30C6.25 29.31 5.69 28.75 5 28.75ZM5 27.5C3.62 27.5 2.5 28.62 2.5 30C2.5 31.38 3.62 32.5 5 32.5C6.38 32.5 7.5 31.38 7.5 30C7.5 28.62 6.38 27.5 5 27.5ZM5 32C3.895 32 3 31.105 3 30C3 28.895 3.895 28 5 28C6.105 28 7 28.895 7 30C7 31.105 6.105 32 5 32Z",fill:"#689F38"},null,2)]),_M,yM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"13",y:"57",width:"20",height:"2",fill:"#689F38"},null,2),wM,xM,(0,o._)("g",CM,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M5 56.75C4.31 56.75 3.75 57.31 3.75 58C3.75 58.69 4.31 59.25 5 59.25C5.69 59.25 6.25 58.69 6.25 58C6.25 57.31 5.69 56.75 5 56.75ZM5 55.5C3.62 55.5 2.5 56.62 2.5 58C2.5 59.38 3.62 60.5 5 60.5C6.38 60.5 7.5 59.38 7.5 58C7.5 56.62 6.38 55.5 5 55.5ZM5 60C3.895 60 3 59.105 3 58C3 56.895 3.895 56 5 56C6.105 56 7 56.895 7 58C7 59.105 6.105 60 5 60Z",fill:"#689F38"},null,2)]),vM]))])}var BM={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const SM=(0,he.Z)(BM,[["render",bM]]);var kM=SM;const AM=(0,o.uE)('',1),MM=[AM];function DM(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,MM)}var TM={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const OM=(0,he.Z)(TM,[["render",DM]]);var GM=OM;const EM=(0,o.uE)('',1),UM=[EM];function FM(e,t,i,a,r,l){return(0,o.wg)(),(0,o.iD)("div",null,UM)}var IM={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const zM=(0,he.Z)(IM,[["render",FM]]);var PM=zM;const VM={width:"135",height:"81",viewBox:"0 0 135 81",fill:"none",xmlns:"http://www.w3.org/2000/svg"},WM=(0,o.uE)('',12),RM={filter:"url(#filter0_ddd_3834_17260)"},LM=(0,o._)("rect",{width:"42",height:"36",transform:"translate(47 39)",fill:"white"},null,-1),jM=(0,o._)("rect",{x:"52",y:"55",width:"27",height:"2",fill:"#434343"},null,-1),qM=(0,o._)("rect",{x:"52",y:"64",width:"27",height:"2",fill:"#434343"},null,-1),NM=(0,o.uE)('',1);function $M(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",VM,[WM,(0,o._)("g",RM,[LM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"52",y:"46",width:"27",height:"2",fill:"#689F38"},null,2),jM,qM]),NM]))])}var HM={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const ZM=(0,he.Z)(HM,[["render",$M]]);var YM=ZM;const KM={width:"135",height:"79",viewBox:"0 0 135 79",fill:"none",xmlns:"http://www.w3.org/2000/svg"},JM=(0,o.uE)('',8),XM=(0,o._)("rect",{x:"54",y:"67",width:"31",height:"2",fill:"#9E9E9E"},null,-1),QM=(0,o._)("rect",{x:"54",y:"75",width:"31",height:"2",fill:"#9E9E9E"},null,-1),eD={"clip-path":"url(#clip1_3834_17406)"},tD=(0,o.uE)('',3);function iD(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",KM,[JM,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"54",y:"58",width:"31",height:"2",fill:"#689F38"},null,2),XM,QM,(0,o._)("g",eD,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M46 57.75C45.31 57.75 44.75 58.31 44.75 59C44.75 59.69 45.31 60.25 46 60.25C46.69 60.25 47.25 59.69 47.25 59C47.25 58.31 46.69 57.75 46 57.75ZM46 56.5C44.62 56.5 43.5 57.62 43.5 59C43.5 60.38 44.62 61.5 46 61.5C47.38 61.5 48.5 60.38 48.5 59C48.5 57.62 47.38 56.5 46 56.5ZM46 61C44.895 61 44 60.105 44 59C44 57.895 44.895 57 46 57C47.105 57 48 57.895 48 59C48 60.105 47.105 61 46 61Z",fill:"#689F38"},null,2)]),tD]))])}var aD={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const oD=(0,he.Z)(aD,[["render",iD]]);var rD=oD;const lD={width:"135",height:"75",viewBox:"0 0 135 75",fill:"none",xmlns:"http://www.w3.org/2000/svg"},sD=(0,o._)("rect",{width:"26",height:"5",fill:"#434343"},null,-1),nD=(0,o._)("rect",{y:"6",width:"20",height:"5",fill:"#BDBDBD"},null,-1),dD=(0,o._)("rect",{x:"115",width:"20",height:"5",fill:"#BDBDBD"},null,-1),pD=(0,o._)("rect",{x:"47",y:"21",width:"43",height:"2",fill:"#434343"},null,-1),fD=(0,o._)("rect",{x:"58",y:"42",width:"31",height:"2",fill:"#9E9E9E"},null,-1),uD=(0,o._)("rect",{x:"58",y:"50",width:"31",height:"2",fill:"#9E9E9E"},null,-1),cD={"clip-path":"url(#clip0_3834_17407)"},hD=(0,o.uE)('',7);function mD(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",lD,[sD,nD,dD,pD,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"58",y:"33",width:"31",height:"2",fill:"#689F38"},null,2),fD,uD,(0,o._)("g",cD,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M50 32.75C49.31 32.75 48.75 33.31 48.75 34C48.75 34.69 49.31 35.25 50 35.25C50.69 35.25 51.25 34.69 51.25 34C51.25 33.31 50.69 32.75 50 32.75ZM50 31.5C48.62 31.5 47.5 32.62 47.5 34C47.5 35.38 48.62 36.5 50 36.5C51.38 36.5 52.5 35.38 52.5 34C52.5 32.62 51.38 31.5 50 31.5ZM50 36C48.895 36 48 35.105 48 34C48 32.895 48.895 32 50 32C51.105 32 52 32.895 52 34C52 35.105 51.105 36 50 36Z",fill:"#689F38"},null,2)]),hD]))])}var gD={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const _D=(0,he.Z)(gD,[["render",mD]]);var yD=_D;const wD={width:"135",height:"85",viewBox:"0 0 135 85",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xD=(0,o._)("rect",{width:"26",height:"5",fill:"#434343"},null,-1),CD=(0,o._)("rect",{y:"6",width:"20",height:"5",fill:"#BDBDBD"},null,-1),vD=(0,o._)("rect",{x:"115",width:"20",height:"5",fill:"#BDBDBD"},null,-1),bD=(0,o._)("rect",{x:"47",y:"21",width:"43",height:"2",fill:"#434343"},null,-1),BD=(0,o._)("rect",{x:"58",y:"42",width:"31",height:"2",fill:"#9E9E9E"},null,-1),SD=(0,o._)("rect",{x:"58",y:"50",width:"31",height:"2",fill:"#9E9E9E"},null,-1),kD={"clip-path":"url(#clip0_3834_17276)"},AD=(0,o._)("g",{"clip-path":"url(#clip1_3834_17276)"},[(0,o._)("path",{d:"M50 40.5C48.62 40.5 47.5 41.62 47.5 43C47.5 44.38 48.62 45.5 50 45.5C51.38 45.5 52.5 44.38 52.5 43C52.5 41.62 51.38 40.5 50 40.5ZM50 45C48.895 45 48 44.105 48 43C48 41.895 48.895 41 50 41C51.105 41 52 41.895 52 43C52 44.105 51.105 45 50 45Z",fill:"#9E9E9E"})],-1),MD=(0,o._)("g",{"clip-path":"url(#clip2_3834_17276)"},[(0,o._)("path",{d:"M50 48.5C48.62 48.5 47.5 49.62 47.5 51C47.5 52.38 48.62 53.5 50 53.5C51.38 53.5 52.5 52.38 52.5 51C52.5 49.62 51.38 48.5 50 48.5ZM50 53C48.895 53 48 52.105 48 51C48 49.895 48.895 49 50 49C51.105 49 52 49.895 52 51C52 52.105 51.105 53 50 53Z",fill:"#9E9E9E"})],-1),DD=(0,o._)("rect",{x:"58",y:"73",width:"31",height:"2",fill:"#9E9E9E"},null,-1),TD=(0,o._)("rect",{x:"58",y:"81",width:"31",height:"2",fill:"#9E9E9E"},null,-1),OD={"clip-path":"url(#clip3_3834_17276)"},GD=(0,o.uE)('',3);function ED(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",wD,[xD,CD,vD,bD,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"58",y:"33",width:"31",height:"2",fill:"#689F38"},null,2),BD,SD,(0,o._)("g",kD,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M50 32.75C49.31 32.75 48.75 33.31 48.75 34C48.75 34.69 49.31 35.25 50 35.25C50.69 35.25 51.25 34.69 51.25 34C51.25 33.31 50.69 32.75 50 32.75ZM50 31.5C48.62 31.5 47.5 32.62 47.5 34C47.5 35.38 48.62 36.5 50 36.5C51.38 36.5 52.5 35.38 52.5 34C52.5 32.62 51.38 31.5 50 31.5ZM50 36C48.895 36 48 35.105 48 34C48 32.895 48.895 32 50 32C51.105 32 52 32.895 52 34C52 35.105 51.105 36 50 36Z",fill:"#689F38"},null,2)]),AD,MD,(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"58",y:"64",width:"31",height:"2",fill:"#689F38"},null,2),DD,TD,(0,o._)("g",OD,[(0,o._)("path",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),d:"M50 63.75C49.31 63.75 48.75 64.31 48.75 65C48.75 65.69 49.31 66.25 50 66.25C50.69 66.25 51.25 65.69 51.25 65C51.25 64.31 50.69 63.75 50 63.75ZM50 62.5C48.62 62.5 47.5 63.62 47.5 65C47.5 66.38 48.62 67.5 50 67.5C51.38 67.5 52.5 66.38 52.5 65C52.5 63.62 51.38 62.5 50 62.5ZM50 67C48.895 67 48 66.105 48 65C48 63.895 48.895 63 50 63C51.105 63 52 63.895 52 65C52 66.105 51.105 67 50 67Z",fill:"#689F38"},null,2)]),GD]))])}var UD={name:"ResourcesList",props:{color:{default:"light-green",type:String}}};const FD=(0,he.Z)(UD,[["render",ED]]);var ID=FD,zD={name:"BookingFlow",components:{DateMonth:Gh,DateWeek:Wh,AppointmentOptions:Dm,TimeOfDayColumns:vg,SingleColumn:Lg,RowView:f_,BlockView:G_,ExpressSingleColumn:ty,ExpressRows:Gy,ExpressBlocks:cw,DateOnlyAvailable:Zh,ResourcesTeamList:Bw,ResourcesTeamRadio:zw,ExpressListResourcesMultipleTime:Sx,ExpressRadioResourcesMultipleTime:pC,ExpressRadioResourcesSingleTime:IC,ExpressListResourcesSingleTime:uv,ExpressListResourcesRows:yv,ExpressRadioResourcesRows:Bv,ExpressListResourcesBlock:Tv,ExpressRadioResourcesBlock:Iv,ListResourcesListTeamMultipleTime:vb,ListResourcesRadioTeamMultipleTime:ZB,ListResourcesRadioTeamSingleTime:CS,ListResourcesListTeamSingleTime:Jb,ListResourcesListTeamRows:aB,ListResourcesRadioTeamRows:AS,RadioResourcesListTeamRows:Xk,RadioResourcesRadioTeamRows:GM,ListResourcesListTeamBlock:dB,RadioResourcesListTeamBlock:oA,ListResourcesRadioTeamBlock:ES,RadioResourcesRadioTeamBlock:PM,RadioResourcesRadioTeamSingleTime:IA,RadioResourcesListTeamSingleTime:sk,RadioResourcesListTeamMultipleTime:$k,RadioResourcesRadioTeamMultipleTime:kM,ListResourcesListTeam:YM,ListResourcesRadioTeam:rD,RadioResourcesListTeam:yD,RadioResourcesRadioTeam:ID,PromoPro:ft},props:{bookingFlow:{default:"expanded",type:String}},data(){return{activeStep:"",options:X,promoProUpgradeParams:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-pro",utm_term:"booking-flows",utm_content:"general-pro-settings-popup"}}},watch:{steps(e,t){e!=t&&(this.activeStep=this.steps[0])}},mounted(){this.activeStep=this.steps[0]},computed:{label(){let e=this.apptTypeLabels.find((e=>e.id==this.currentAppointmentType.label_id));return e||this.defaultLabel},resourcesView:{get(){return this.currentAppointmentType.booking_flow_settings.resources_view?this.currentAppointmentType.booking_flow_settings.resources_view:"list"},set(e){this.updateBookingFlowSettings({key:"resources_view",value:e})}},dateView:{get(){return this.currentAppointmentType.booking_layout?this.currentAppointmentType.booking_layout:"week"},set(e){this.updateCurrentAppointmentType({key:"booking_layout",value:e})}},dateViewOptions(){return this.settings.installed.booking_flows?this.options.dateViews:this.options.bookingLayouts},timeView:{get(){return this.currentAppointmentType.booking_flow_settings.time_view?this.currentAppointmentType.booking_flow_settings.time_view:"time_of_day_columns"},set(e){this.updateBookingFlowSettings({key:"time_view",value:e})}},teamView:{get(){return this.currentAppointmentType.booking_flow_settings.team_view?this.currentAppointmentType.booking_flow_settings.team_view:"list"},set(e){this.updateBookingFlowSettings({key:"team_view",value:e})}},isResourcesEnabled(){return this.settings.installed.resources&&this.settings.resources.enabled},isTeamEnabled(){return this.settings.installed.staff&&this.settings.staff.enabled},showEndTime:{get(){return!!this.currentAppointmentType.booking_flow_settings.show_end_time&&this.currentAppointmentType.booking_flow_settings.show_end_time},set(e){this.updateBookingFlowSettings({key:"show_end_time",value:e})}},steps(){let e=this.options.expandedSteps;switch(this.currentAppointmentType.booking_flow_settings.booking_flow){case"expanded":e=this.getExpandedSteps();break;case"express":e=this.options.expressSteps;break;case"first_available":switch(this.currentAppointmentType.booking_flow_settings.fallback_booking_flow){case"expanded":e=e=this.getExpandedSteps();break;case"express":e=this.options.expressSteps;break}break}return e},shouldShowListViewForResourcesTeam(){return"list"==this.resourcesView&&this.onlyResourcesRequired||"list"==this.teamView&&this.onlyTeamRequired},shouldShowRadioViewForResourcesTeam(){return"radio"==this.resourcesView&&this.onlyResourcesRequired||"radio"==this.teamView&&this.onlyTeamRequired},onlyResourcesRequired(){return this.isResourcesEnabled&&(!this.isTeamEnabled||"user_preference"!=this.currentAppointmentType.staff.required)&&this.currentAppointmentType.resources_settings.some((e=>"user_preference"==e.resource_option))},onlyTeamRequired(){return this.isTeamEnabled&&"user_preference"==this.currentAppointmentType.staff.required&&(!this.isResourcesEnabled||this.currentAppointmentType.resources_settings.every((e=>"user_preference"!=e.resource_option)))},isResourcesTeamRequired(){return this.isTeamEnabled&&this.isResourcesEnabled&&"user_preference"==this.currentAppointmentType.staff.required&&this.currentAppointmentType.resources_settings.some((e=>"user_preference"==e.resource_option))},resourcesTeamNotRequired(){return!(this.onlyResourcesRequired||this.isResourcesTeamRequired)&&!(this.onlyTeamRequired||this.isResourcesTeamRequired)},bookingFlowEnabled(){return this.settings.installed.booking_flows},...(0,m.rn)("appointment_types",["currentAppointmentType","booking_flow_settings"]),...(0,m.rn)("labels",["apptTypeLabels"]),...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings"]),...(0,m.Se)("labels",["defaultLabel"])},methods:{getExpandedSteps(){let e=this.options.expandedSteps;return this.isResourcesTeamRequired?e.unshift("resources_and_team"):e=e.filter((e=>"resources_and_team"!==e)),this.onlyResourcesRequired?e.unshift("resources"):e=e.filter((e=>"resources"!==e)),this.onlyTeamRequired?e.unshift("team"):e=e.filter((e=>"team"!==e)),e=[...new Set(e)],e},activate(e){this.bookingFlowEnabled?this.activeStep=e:this.maybeShowUpgrade()},maybeShowUpgrade(){this.bookingFlowEnabled||this.$refs["upgradeBookingFlow"].open()},closeDialog(){this.$refs["upgradeBookingFlow"].close()},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"]),...(0,m.OI)("appointment_types",["updateBookingFlowSettings"])}};const PD=(0,he.Z)(zD,[["render",Bh],["__scopeId","data-v-415390dd"]]);var VD=PD;const WD={class:"inline-label"},RD={class:"md-subheading"};function LD(e,t,i,a,l,s){const n=(0,o.up)("first-available-view"),d=(0,o.up)("duration"),p=(0,o.up)("foxy-layout"),f=(0,o.up)("foxy-notification"),u=(0,o.up)("foxy-list-item"),c=(0,o.up)("foxy-select");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(p,{class:(0,r.C_)(["complex-field",{"md-input-invalid":!l.validMinMax}])},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{class:"preview",color:s.label.color},null,8,["color"]),(0,o._)("div",WD,[(0,o._)("p",RD,(0,r.zw)(e.translations.appointmentTypes.first_available_within),1)]),(0,o.Wm)(d,{modelValue:l.v$.suggest_first_available_within_minutes.$model,"onUpdate:modelValue":t[0]||(t[0]=e=>l.v$.suggest_first_available_within_minutes.$model=e),"allow-null":!0,"help-text":e.translations.appointmentTypes.first_available_within_help},null,8,["modelValue","help-text"])])),_:1},8,["class"]),(0,o.Wm)(f,{theme:"blue",icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.first_available_notification),1)])),_:1}),(0,o.Wm)(c,{label:e.translations.appointmentTypes.fallBackBookingFlow,name:"firstBookingFlow",id:"firstBookingFlow",modelValue:s.fallBackBookingFlow,"onUpdate:modelValue":t[1]||(t[1]=e=>s.fallBackBookingFlow=e)},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.options.fallBackBookingFlows,(t=>((0,o.wg)(),(0,o.j4)(u,{"data-value":t,key:t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.bookingFlows[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])])}const jD={width:"141",height:"48",viewBox:"0 0 141 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qD={filter:"url(#filter0_ddd_2823_15688)"},ND=(0,o.uE)('',6);function $D(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",null,[((0,o.wg)(),(0,o.iD)("svg",jD,[(0,o._)("g",qD,[(0,o._)("rect",{class:(0,r.C_)(["changeColor",[`md-theme-${i.color}`]]),x:"3.73277",y:"35.1401",width:"47.7763",height:"7.32",fill:"#8BC34A"},null,2)]),ND]))])}var HD={name:"FirstAvailableView",props:{color:{default:"light-green",type:String}}};const ZD=(0,he.Z)(HD,[["render",$D]]);var YD=ZD,KD={name:"FirstAvailable",components:{Duration:Wd,FirstAvailableView:YD},props:{},data(){return{v$:(0,Rd.Xw)(),options:X,validMinMax:!0}},validations:{suggest_first_available_within_minutes:{minValue:(0,Ld.uv)(0)}},computed:{suggest_first_available_within_minutes:{get(){return this.currentAppointmentType.booking_flow_settings.suggest_first_available_within_minutes},set(e){this.updateBookingFlowSettings({key:"suggest_first_available_within_minutes",value:e}),this.validationCheck()}},fallBackBookingFlow:{get(){return this.currentAppointmentType.booking_flow_settings.fallback_booking_flow?this.currentAppointmentType.booking_flow_settings.fallback_booking_flow:"expanded"},set(e){this.updateBookingFlowSettings({key:"fallback_booking_flow",value:e})}},label(){let e=this.apptTypeLabels.find((e=>e.id==this.currentAppointmentType.label_id));return e||this.defaultLabel},...(0,m.rn)("appointment_types",["currentAppointmentType"]),...(0,m.rn)("translations",["translations"]),...(0,m.rn)("labels",["apptTypeLabels"])},methods:{validationCheck(){let e=this.suggest_first_available_within_minutes?parseInt(this.suggest_first_available_within_minutes,10):null;this.validMinMax=!(e<0),this.$emit("validationCheck",this.validMinMax)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"]),...(0,m.OI)("appointment_types",["updateBookingFlowSettings"]),...(0,m.Se)("labels",["defaultLabel"])}};const JD=(0,he.Z)(KD,[["render",LD]]);var XD=JD;const QD={class:"md-heading"},eT={key:0},tT=["onClick"],iT={key:1},aT={key:0,class:"radio-list",role:"radiogroup","aria-labelledby":"groupLabel",style:{"padding-left":"2rem"}},oT={id:"groupLabel",class:"screen-reader-text"},rT={key:1};function lT(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-radio"),p=(0,o.up)("foxy-notification"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.iD)("div",null,[s.loadingValue?((0,o.wg)(),(0,o.j4)(n,{key:0,size:"body",message:e.translations.settings.resources.loading},null,8,["message"])):s.appointmentTypeResourceGroups.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.appointmentTypeResourceGroups,(t=>((0,o.wg)(),(0,o.iD)("div",{class:"resources-list",key:t.id},[(0,o._)("h3",QD,(0,r.zw)(t.title),1),"identifiable"==t.resource_type?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[0==s.getAssignedResources(t.id).length?((0,o.wg)(),(0,o.iD)("div",eT,[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.appointmentType.emptyResourceGroup)+" ",1),(0,o._)("a",{href:"#",onClick:e=>s.openResourceGroup(t.id)},(0,r.zw)(e.translations.settings.resources.appointmentType.addResourcesToGroup),9,tT)])):((0,o.wg)(),(0,o.iD)("fieldset",iT,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.resources.appointmentType.selectPreference),1),(0,o.Wm)(d,{modelValue:s.getResourceOption(t.id).resource_option,"onUpdate:modelValue":e=>s.getResourceOption(t.id).resource_option=e,id:"resource"+t.id+"-user-preference",name:"resource-preference",value:"user_preference",display:"flex"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.resources.appointmentType.userPreferenceLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.resources.appointmentType.userPreferenceDesc),1)])),_:2},1032,["modelValue","onUpdate:modelValue","id"]),(0,o.Wm)(d,{modelValue:s.getResourceOption(t.id).resource_option,"onUpdate:modelValue":e=>s.getResourceOption(t.id).resource_option=e,id:"resource"+t.id+"-any",name:"resource-preference",value:"any",display:"flex"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.resources.appointmentType.anyLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.resources.appointmentType.anyDesc),1)])),_:2},1032,["modelValue","onUpdate:modelValue","id"]),(0,o.Wm)(d,{modelValue:s.getResourceOption(t.id).resource_option,"onUpdate:modelValue":e=>s.getResourceOption(t.id).resource_option=e,id:"resource"+t.id+"-assigned",name:"resource-preference",value:"assigned",display:"flex"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.resources.appointmentType.assignedLabel),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.resources.appointmentType.assignedDesc),1)])),_:2},1032,["modelValue","onUpdate:modelValue","id"]),"assigned"===s.getResourceOption(t.id).resource_option?((0,o.wg)(),(0,o.iD)("div",aT,[(0,o._)("div",oT,(0,r.zw)(e.translations.settings.resources.appointmentType.selectResource),1),"assigned"===s.getResourceOption(t.id).resource_option&&0==s.getResourceOption(t.id).assigned_resource_id?((0,o.wg)(),(0,o.j4)(p,{key:0,icon:"warning",theme:"orange"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.resources.assignResource),1)])),_:1})):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.getAssignedResources(t.id),(e=>((0,o.wg)(),(0,o.j4)(d,{modelValue:s.getResourceOption(t.id).assigned_resource_id,"onUpdate:modelValue":e=>s.getResourceOption(t.id).assigned_resource_id=e,key:e.id,id:"assigned-resource-"+e.id,name:"assigned-resource",value:e.id,label:e.title},null,8,["modelValue","onUpdate:modelValue","id","value","label"])))),128))])):(0,o.kq)("",!0)]))],64)):"identical"==t.resource_type?((0,o.wg)(),(0,o.iD)("div",rT,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.resources.appointmentType.identical),1)])):(0,o.kq)("",!0)])))),128)),(0,o.Wm)(f,{class:"md-list-action md-primary",onClick:t[0]||(t[0]=e=>s.manageResources())},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.manageResources),1)])),_:1})],64)):((0,o.wg)(),(0,o.j4)(u,{key:2,label:e.translations.errors.noResourcesAppointmentType},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/resources/all"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.addNew),1)])),_:1})])),_:1},8,["label"]))])}var sT={name:"ResourcesList",components:{Loading:ge},data(){return{loading:!0,options:{}}},watch:{resourceOptions:{deep:!0,handler(e){Object.values(e).forEach((e=>{"any"!==e.resource_option&&"user_preference"!==e.resource_option||(e.assigned_resource_id=0)})),Object.values(e).length>0&&(this.setCurrentAppointmentTypeIsDirty(!0),this.validationCheck())}}},mounted(){this.resourceGroups&&this.resourceGroups.length||(this.loading=!0,this.fetchResourceGroups()),this.resources&&this.resources.length||(this.loading=!0,this.fetchResources().then((()=>{this.loading=!1})))},computed:{appointmentTypeResourceGroups(){const e=this.currentAppointmentType.resource_group_ids,t=this.resourceGroups.filter((t=>{const i=parseInt(t.id);return e?.includes(i)}));return t},resourceOptions(){return this.currentAppointmentType.resources_settings},loadingValue:{get(){return!this.resources||!this.resourceGroups},set(e){this.loading=e}},...(0,m.rn)("resources",["resourceGroups","resources"]),...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["currentAppointmentType"])},methods:{manageResources(){this.$router.push({name:"resources-all"})},getAssignedResources(e){const t=this.resourceGroups.find((t=>t.id===e)).resource_ids;return this.resources.filter((e=>"publish"===e.status&&t.includes(parseInt(e.id))))},validationCheck(){const e=[];Object.entries(this.currentAppointmentType.resources_settings).forEach((([t,i])=>{"assigned"===i.resource_option&&0==i.assigned_resource_id&&e.push(t)})),this.$emit("validationCheck",!e.length>0)},openResourceGroup(e){let t=this.resourceGroups.find((t=>t.id===e));this.setCurrentResourceGroup(t),this.$router.push({name:"identifiable-group",params:{id:t.id}})},getResourceOption(e){return this.currentAppointmentType.resources_settings.find((t=>t.resource_group_id==e))},...(0,m.OI)("appointment_types",["setCurrentAppointmentTypeIsDirty"]),...(0,m.OI)("resources",["setCurrentResourceGroup"]),...(0,m.nv)("resources",["fetchResourceGroups","fetchResources"])}};const nT=(0,he.Z)(sT,[["render",lT],["__scopeId","data-v-44e5c9fd"]]);var dT=nT,pT={name:"AppointmentTypeEdit",props:{id:{type:[Number,String],required:!0}},components:{basics:Sp,availability:df,scheduling:Hf,Staff:vu,Capacity:_h,googleCalendar:Fu,webMeetings:uc,Webhooks:Sc,mailchimp:yc,customerInformation:qc,notifications:ah,Payments:pu,BookingFlow:VD,FirstAvailable:XD,Resources:dT,Revisions:Mn},data(){return{saving:!1,moment:fe(),validAvailability:!0,validBasics:!0,validCapacity:!0,validMailchimp:!0,validFirstAvailable:!0,validPayments:!0,validNotifications:!0,validScheduling:!0,validResources:!0,validStaff:!0,validWebMeetings:!0,section:"0",sectionId:"basics",options:X,isShortcodeNoticeVisible:!1,routerNext:null}},beforeMount(){if(this.id){var e=this.appointmentTypes.find((e=>e.id===this.id));this.updateCurrentAppointmentType(e)}},mounted(){this.fetchAppointmentType(this.currentAppointmentType.id),this.getGuides({"ssasc-plugin-screen":this.currentGuides})},beforeRouteLeave(e,t,i){if(this.currentAppointmentTypeIsDirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{currentAppointmentType:{handler:function(e,t){this.dirty=t},deep:!0},currentGuides(){this.getGuides({"ssasc-plugin-screen":this.currentGuides})}},computed:{mailchimp:{get(){return this.currentAppointmentType.mailchimp},set(e){this.updateCurrentAppointmentType({key:"mailchimp",value:e})}},validFormFields(){return this.validBasics&&this.validAvailability&&this.validScheduling&&this.validPayments&&this.validMailchimp&&this.validNotifications&&this.validStaff&&this.validCapacity&&this.validWebMeetings&&this.validFirstAvailable&&this.validResources},currentGuides(){if("capacity"===this.sectionId)return K.appointment_types.capacity;if("staff"===this.sectionId)return K.appointment_types.staff;if(this.settings.advanced_scheduling.enabled&&["availability","scheduling"].includes(this.sectionId))return K.appointment_types.advanced_scheduling_enabled;if(this.settings.installed.google_calendar&&this.settings.google_calendar.enabled&&"google-calendar"===this.sectionId)return K.appointment_types.google_calendar_enabled;if("web-meetings"===this.sectionId){let e=[K.appointment_types.web_meetings_enabled];return this.settings.installed.google_calendar&&this.settings.google_calendar.enabled&&this.settings.google_calendar.web_meetings?e.push(K.appointment_types.web_meetings_google_calendar):this.settings.installed.zoom&&this.settings.zoom.enabled&&""!==this.settings.zoom.access_token&&e.push(K.appointment_types.web_meetings_zoom),e}return"mailchimp"===this.sectionId?K.appointment_types.mailchimp_enabled:"webhooks"===this.sectionId?K.appointment_types.webhooks_enabled:"customer-information"===this.sectionId?K.appointment_types.customer_information:K.appointment_types.edit},flow:{get(){return this.currentAppointmentType.booking_flow_settings.booking_flow?this.currentAppointmentType.booking_flow_settings.booking_flow:"expanded"},set(e){"first_available"==e?this.updateBookingFlowSettings({key:"suggest_first_available",value:!0}):(this.validFirstAvailable=!0,this.updateBookingFlowSettings({key:"suggest_first_available",value:!1})),this.updateBookingFlowSettings({key:"booking_flow",value:e})}},displayHistory(){return!!this.settings.developer?.display_appointment_revisions&&(void 0!=this.currentAppointmentType.id&&null!==this.currentAppointmentType)},bookingFlowEnabled(){return this.settings.installed.booking_flows},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","timestampFormat"]),...(0,m.rn)("appointment_types",["appointmentTypes","currentAppointmentTypeIsDirty","currentAppointmentType"]),...(0,m.Se)("appointment_types",["labelInfo"]),...(0,m.Se)("staff",["currentUserCan"]),...(0,m.Se)(["webMeetingsProviders"])},methods:{copyShortcode(){let e=this.$refs["shortcode"].textContent,t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999em",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.isShortcodeNoticeVisible=!0},validateBasics(e){this.validBasics=e},validateCapacity(e){this.validCapacity=e},validateTitle(e){this.validTitle=e},validateSlug(e){this.validSlug=e},validateAvailability(e){this.validAvailability=e},validateScheduling(e){this.validScheduling=e},validatePayments(e){this.validPayments=e},validateNotifications(e){this.validNotifications=e},validateMailchimp(e){this.validMailchimp=e},validateStaff(e){this.validStaff=e},validateWebMeetings(e){this.validWebMeetings=e},validateFirstAvailable(e){this.validFirstAvailable=e},validateResources(e){this.validResources=e},saveAppointmentType:function(){this.saving=!0,this.updateAppointmentType().then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")})),this.settings.global.wizard_completed||(this.updateWizardCompleted({settings:this.settings,value:fe().utc().format(this.timestampFormat)}),this.updateGlobalSettings())},staffUpdateCapacity(e){if(e.oldStaff===e.newStaff)return;let t=this.currentAppointmentType?parseInt(this.currentAppointmentType.capacity,10):1,i=this.currentAppointmentType?this.currentAppointmentType.capacity_type:"individual",a=this.currentAppointmentType?parseInt(this.currentAppointmentType.staff_capacity,10):1;!e.oldStaff&&e.newStaff?(this.updateCurrentAppointmentType({key:"capacity",value:1e5}),"individual"===i?this.updateCurrentAppointmentType({key:"staff_capacity",value:1}):this.updateCurrentAppointmentType({key:"staff_capacity",value:t})):e.oldStaff&&!e.newStaff&&(this.updateCurrentAppointmentType({key:"staff_capacity",value:1e5}),0==this.currentAppointmentType.resources_settings.length&&this.updateCurrentAppointmentType({key:"capacity",value:a}))},cancelEdit:function(){this.$router.push("/ssa/appointment-types/all")},updateSection(e,t){e?(this.section=e,this.sectionId=t):(this.section=null,this.sectionId=null)},dialogLeaveWithoutSaving(){this.routerNext()},maybeShowUpgrade(){this.bookingFlowEnabled||this.$refs.bookingFlow.maybeShowUpgrade()},...(0,m.OI)("global_settings",["updateWizardCompleted"]),...(0,m.nv)("global_settings",["updateGlobalSettings"]),...(0,m.nv)("appointment_types",["fetchAppointmentType","updateAppointmentType","updateCurrentAppointmentType"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.OI)("appointment_types",["updateBookingFlowSettings"])}};const fT=(0,he.Z)(pT,[["render",Od]]);var uT=fT;const cT={class:"appt-type-bulk-edit"},hT={style:{flex:"1"}},mT={class:"md-title"};function gT(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-dialog-confirm"),f=(0,o.up)("foxy-switch"),u=(0,o.up)("foxy-toolbar"),c=(0,o.up)("bulk-single"),h=(0,o.up)("bulk-all"),m=(0,o.up)("foxy-snackbar");return(0,o.wg)(),(0,o.iD)("div",cT,[l.saving?((0,o.wg)(),(0,o.j4)(n,{key:0,message:e.translations.general.saving},null,8,["message"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(d,{onClick:s.cancelBulkEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[l.dirty?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.back),1)],64))])),_:1},8,["onClick"]),(0,o.Wm)(p,{ref:"confirmLeaveDirty",title:e.translations.appointmentTypes.confirmIgnoreChangesTitle,"content-html":e.translations.appointmentTypes.confirmIgnoreChangesContent,"ok-text":e.translations.appointmentTypes.confirmIgnoreChangesOkay,"cancel-text":e.translations.appointmentTypes.confirmIgnoreChangesCancel,onCancel:s.dialogKeepEdits,onConfirm:s.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onCancel","onConfirm"]),(0,o.Wm)(u,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("div",hT,[(0,o._)("h2",mT,(0,r.zw)(e.translations.wizard.appointmentType[i.section]),1)]),(0,o.Wm)(f,{id:"editSingle",modelValue:l.editSingle,"onUpdate:modelValue":[t[0]||(t[0]=e=>l.editSingle=e),s.switchEditMode],name:"editSingle"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.actions.editSingle),1)])),_:1},8,["modelValue","onUpdate:modelValue"])])),_:1}),l.editSingle?((0,o.wg)(),(0,o.j4)(c,{key:0,onChangeAccordion:s.changeAppointmentType,onCancel:s.changeAppointmentType,onSave:s.saveSingleEdit,saving:l.singleSaving,section:i.section,dirty:l.dirty},null,8,["onChangeAccordion","onCancel","onSave","saving","section","dirty"])):((0,o.wg)(),(0,o.j4)(h,{key:1,onCancel:s.cancelBulkEdit,onSave:s.saveBulkEdit,section:i.section},null,8,["onCancel","onSave","section"]))],64)),(0,o.Wm)(m,{position:"top center",modelValue:l.isSaveStatusVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>l.isSaveStatusVisible=e),message:l.snackbarTitle+" "+e.translations.appointmentTypes.saved},null,8,["modelValue","message"])])}const _T={class:"accordion-actions"},yT={class:"actions-button-flex"};function wT(e,t,i,l,s,n){const d=(0,o.up)("basics"),p=(0,o.up)("availability"),f=(0,o.up)("scheduling"),u=(0,o.up)("payments"),c=(0,o.up)("google-calendar"),h=(0,o.up)("mailchimp"),m=(0,o.up)("customer-information"),g=(0,o.up)("notifications"),_=(0,o.up)("foxy-progress-circular"),y=(0,o.up)("foxy-button"),w=(0,o.up)("foxy-accordion-item"),x=(0,o.up)("foxy-accordion"),C=(0,o.up)("foxy-theme");return(0,o.wg)(),(0,o.j4)(C,{theme:e.currentAppointmentType?e.currentAppointmentType.label:"default"},{default:(0,o.w5)((()=>[(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.bulkEditing,(l=>((0,o.wg)(),(0,o.j4)(w,{key:l,label:e.getAppointmentTypeById(l).title,section:i.section,index:l,onUpdateActive:n.changeAccordion,open:e.currentAppointmentType?e.currentAppointmentType.id:null},{default:(0,o.w5)((()=>[(0,o._)("div",{class:(0,r.C_)(["accordion-edit-section",{saving:i.saving}])},["basics"===i.section?((0,o.wg)(),(0,o.j4)(d,{key:0,onValidationCheck:n.validateBasics},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"availability"===i.section?((0,o.wg)(),(0,o.j4)(p,{key:1,onValidationCheck:n.validateAvailability},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"scheduling"===i.section?((0,o.wg)(),(0,o.j4)(f,{key:2,onValidationCheck:n.validateScheduling},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"payments"===i.section?((0,o.wg)(),(0,o.j4)(u,{key:3,onValidationCheck:n.validatePayments},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"googleCalendar"===i.section?((0,o.wg)(),(0,o.j4)(c,{key:4})):(0,o.kq)("",!0),"mailchimp"===i.section?((0,o.wg)(),(0,o.j4)(h,{key:5,onValidationCheck:n.validateMailchimp,modelValue:n.mailchimp,"onUpdate:modelValue":t[0]||(t[0]=e=>n.mailchimp=e)},null,8,["onValidationCheck","modelValue"])):(0,o.kq)("",!0),"customerInfo"===i.section?((0,o.wg)(),(0,o.j4)(m,{key:6})):(0,o.kq)("",!0),"notifications"===i.section?((0,o.wg)(),(0,o.j4)(g,{key:7})):(0,o.kq)("",!0)],2),(0,o._)("div",_T,[(0,o._)("div",yT,[(0,o.wy)((0,o.Wm)(_,{indeterminate:"",medium:"",class:"md-primary"},null,512),[[a.F8,i.saving]]),(0,o.Wm)(y,{onClick:n.cancel},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(y,{disabled:i.saving||!n.validFormFields,mode:"raised",class:"md-primary",onClick:n.save},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["disabled","onClick"])])])])),_:2},1032,["label","section","index","onUpdateActive","open"])))),128))])),_:1})])),_:1},8,["theme"])}var xT={name:"BulkEditSingle",props:["section","dirty","saving"],components:{Basics:Sp,Availability:df,Scheduling:Hf,Payments:pu,GoogleCalendar:Fu,Mailchimp:yc,CustomerInformation:qc,Notifications:ah},data(){return{validBasics:!0,validAvailability:!0,validScheduling:!0,validPayments:!0,validMailchimp:!0}},computed:{mailchimp:{get(){return this.currentAppointmentType&&this.currentAppointmentType.mailchimp?this.currentAppointmentType.mailchimp:{}},set(e){this.updateCurrentAppointmentType({key:"mailchimp",value:e})}},validFormFields(){let e=!0;switch(this.section){case"basics":e=this.validBasics;break;case"availability":e=this.validAvailability;break;case"scheduling":e=this.validScheduling;break;case"payments":e=this.validPayments;break;case"mailchimp":e=this.validMailchimp;break}return e},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["bulkEditing","currentAppointmentType"]),...(0,m.Se)("appointment_types",["getAppointmentTypeById"])},methods:{save(){this.$emit("save")},cancel(){this.$emit("cancel")},validateBasics(e){this.validBasics=e},validateAvailability(e){this.validAvailability=e},validateScheduling(e){this.validScheduling=e},validatePayments(e){this.validPayments=e},validateMailchimp(e){this.validMailchimp=e},changeAccordion(e){this.$emit("changeAccordion",e)},...(0,m.nv)("appointment_types",["updateCurrentAppointmentType"])}};const CT=(0,he.Z)(xT,[["render",wT]]);var vT=CT;function bT(e,t,i,a,l,s){const n=(0,o.up)("basics"),d=(0,o.up)("availability"),p=(0,o.up)("scheduling"),f=(0,o.up)("payments"),u=(0,o.up)("google-calendar"),c=(0,o.up)("mailchimp"),h=(0,o.up)("customer-information"),m=(0,o.up)("foxy-card-content"),g=(0,o.up)("foxy-button"),_=(0,o.up)("foxy-card-actions"),y=(0,o.up)("foxy-card"),w=(0,o.up)("foxy-theme");return(0,o.wg)(),(0,o.j4)(w,{theme:e.currentAppointmentType.label},{default:(0,o.w5)((()=>[(0,o._)("p",null,[(0,o._)("strong",null,(0,r.zw)(e.translations.appointmentTypes.bulkEditExplanation),1),(0,o.Uk)(" "+(0,r.zw)(s.appointment_type_names),1)]),(0,o.Wm)(y,null,{default:(0,o.w5)((()=>[(0,o.Wm)(m,null,{default:(0,o.w5)((()=>["basics"===i.section?((0,o.wg)(),(0,o.j4)(n,{key:0,"bulk-mode":!0,onValidationCheck:s.validateBasics},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"availability"===i.section?((0,o.wg)(),(0,o.j4)(d,{key:1,onValidationCheck:s.validateAvailability},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"scheduling"===i.section?((0,o.wg)(),(0,o.j4)(p,{key:2,onValidationCheck:s.validateScheduling},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"payments"===i.section?((0,o.wg)(),(0,o.j4)(f,{key:3,onValidationCheck:s.validatePayments},null,8,["onValidationCheck"])):(0,o.kq)("",!0),"googleCalendar"===i.section?((0,o.wg)(),(0,o.j4)(u,{key:4})):(0,o.kq)("",!0),"mailchimp"===i.section?((0,o.wg)(),(0,o.j4)(c,{key:5,onValidationCheck:s.validateMailchimp,modelValue:s.mailchimp,"onUpdate:modelValue":t[0]||(t[0]=e=>s.mailchimp=e)},null,8,["onValidationCheck","modelValue"])):(0,o.kq)("",!0),"customerInfo"===i.section?((0,o.wg)(),(0,o.j4)(h,{key:6,"bulk-mode":!0})):(0,o.kq)("",!0)])),_:1}),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(g,{onClick:s.cancel},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(g,{mode:"raised",onClick:s.save,disabled:!s.validFormFields},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick","disabled"])])),_:1})])),_:1})])),_:1},8,["theme"])}var BT={name:"BulkEditAll",props:{section:{type:String,default:""}},components:{Basics:Sp,Availability:df,Scheduling:Hf,Payments:pu,GoogleCalendar:Fu,Mailchimp:yc,CustomerInformation:qc},data(){return{validBasics:!0,validAvailability:!0,validScheduling:!0,validPayments:!0,validMailchimp:!0}},watch:{section(){"availability"===this.section&&(this.maybeSyncAvailabilityType(),this.maybeSyncAvailability())}},mounted(){"availability"===this.section&&(this.maybeSyncAvailabilityType(),this.maybeSyncAvailability())},computed:{mailchimp:{get(){return this.currentAppointmentType.mailchimp},set(e){this.updateCurrentAppointmentType({key:"mailchimp",value:e})}},validFormFields(){let e=!0;switch(this.section){case"basics":e=this.validBasics;break;case"availability":e=this.validAvailability;break;case"scheduling":e=this.validScheduling;break;case"payments":e=this.validPayments;break;case"mailchimp":e=this.validMailchimp;break}return e},appointment_types(){let e=this.bulkEditing.map((e=>{let t=this.appointmentTypes.find((t=>t.id===e));return t}));return e},appointment_type_names(){let e=this.appointment_types.map((e=>e.title));return e.join(", ")},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("appointment_types",["appointmentTypes","bulkEditing","currentAppointmentType"])},methods:{cancel(){this.$emit("cancel")},save(){this.$emit("save")},validateBasics(e){this.validBasics=e},validateAvailability(e){this.validAvailability=e},maybeSyncAvailability(){let e=this.appointment_types.map((e=>e.availability)),t=!0;for(let i=0;ie.availability_type)),t=!0;for(let i=0;i{})):i()},watch:{currentAppointmentType:{handler:function(e){e?.id&&(this.currentAppointmentTypePreviousValue?.id&&e?.id&&this.currentAppointmentTypePreviousValue?.id!==e?.id||!this.currentAppointmentTypePreviousValue?.id&&e&&e.id?this.currentAppointmentTypePreviousValue=JSON.parse(JSON.stringify(e)):this.currentAppointmentTypePreviousValue?.id&&(JSON.stringify(e)!==JSON.stringify(this.currentAppointmentTypePreviousValue)?this.dirty=!0:this.dirty=!1))},deep:!0,immediate:!0}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["router"]),...(0,m.rn)("appointment_types",["bulkEditing","currentAppointmentType","appointmentTypes"]),...(0,m.Se)("appointment_types",["editableAppointmentTypeIds"])},methods:{backToList(){this.router.push("/ssa/appointment-types/all")},changeAppointmentType(e){if(this.dirty){let t=()=>{if(e&&"object"!=typeof e){var t=this.appointmentTypes.find((t=>t.id==e));this.updateCurrentAppointmentType(t)}else this.emptyCurrentAppointmentType();this.$nextTick((()=>{this.dirty=!1}))};this.displayDialog(t,(()=>{}))}else{if(e){var t=this.appointmentTypes.find((t=>t.id==e));this.updateCurrentAppointmentType(t)}else this.emptyCurrentAppointmentType();this.$nextTick((()=>{this.dirty=!1}))}},cancelBulkEdit(){this.backToList()},saveBulkEdit(){this.saving=!0,this.updateAppointmentTypes(!0).then((()=>{this.$nextTick((()=>{this.saving=!1,this.dirty=!1,this.backToList()}))}))},saveSingleEdit(){this.singleSaving=!0,this.updateAppointmentType().then((()=>{this.snackbarTitle=this.currentAppointmentType.title,this.isSaveStatusVisible=!0,this.emptyCurrentAppointmentType(),this.currentAppointmentTypePreviousValue=null,this.singleSaving=!1,this.$nextTick((()=>{this.dirty=!1}))}))},switchEditMode(e){if(this.dirty){let t=()=>{e?this.emptyCurrentAppointmentType():this.defineNewEmptyAppointmentType(),this.$nextTick((()=>{this.dirty=!1}))},i=()=>{this.editSingle=!this.editSingle};this.displayDialog(t,i)}else e?this.emptyCurrentAppointmentType():this.defineNewEmptyAppointmentType(),this.$nextTick((()=>{this.dirty=!1}))},displayDialog(e,t){let i="confirmLeaveDirty";this.$refs[i].open(),this.confirmDialogCallbacks={okCb:e,cancelCb:t}},dialogLeaveWithoutSaving(){this.$nextTick((()=>{this.confirmDialogCallbacks.okCb()}))},dialogKeepEdits(){this.$nextTick((()=>{this.confirmDialogCallbacks.cancelCb()}))},...(0,m.nv)("appointment_types",["updateAppointmentType","updateAppointmentTypes","updateCurrentAppointmentType","emptyCurrentAppointmentType"]),...(0,m.OI)("appointment_types",["defineNewEmptyAppointmentType","updateBulkEditing"])}};const MT=(0,he.Z)(AT,[["render",gT]]);var DT=MT,TT=[{path:"appointment-types",component:rd,redirect:"/ssa/appointment-types/all",meta:{ssa_manage_appointment_types:!0},children:[{path:"all",name:"appointment-types-all",component:Cd},{path:"type/:id?",name:"appointment-type-single",component:uT,props:!0},{path:"edit/:section",name:"appointment-type-bulk-edit",component:DT,props:!0}]}];const OT={class:"settings-all"};function GT(e,t,i,a,r,l){const s=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",OT,[(0,o.Wm)(s,{onSaved:l.backToSettings},null,8,["onSaved"])])}var ET={name:"SettingsAll",data(){return{}},methods:{backToSettings(){this.$router.push("/ssa/settings/all")}}};const UT=(0,he.Z)(ET,[["render",GT]]);var FT=UT;const IT={class:"settings-list"},zT={class:"md-title",style:{flex:"1"}},PT={key:1,class:"align-right"};function VT(e,t,i,a,l,s){const n=(0,o.up)("no-permission"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-toolbar"),f=(0,o.up)("license-key"),u=(0,o.up)("settings-card"),c=(0,o.up)("foxy-notification"),h=(0,o.up)("foxy-layout"),m=(0,o.up)("foxy-theme");return(0,o.wg)(),(0,o.iD)("div",IT,[e.currentUserCan("ssa_manage_site_settings")||e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(p,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("h2",zT,(0,r.zw)(e.translations.settings.settingsTitle),1),e.settings.installed.license&&0!=e.settings.license?.license_show_settings&&e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(d,{key:0,class:"md-primary",onClick:s.toggleLicense},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.license.manage),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0)])),_:1}),l.license?((0,o.wg)(),(0,o.j4)(f,{key:0})):(0,o.kq)("",!0),(0,o.Wm)(h,{class:"settings-list-container","md-gutter":""},{default:(0,o.w5)((()=>[e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:0,onEdit:t[0]||(t[0]=e=>s.editSettings("general")),image:e.api.admin_static_url+"/images/settings-general.svg",title:e.translations.settings.general.title,"can-disable":!1},null,8,["image","title"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:1,onEdit:t[1]||(t[1]=e=>s.editSettings("styles")),image:e.api.admin_static_url+"/images/settings-styles.svg",title:e.translations.settings.styles.title,"can-disable":!1},null,8,["image","title"])):(0,o.kq)("",!0),e.settings.installed.translation&&e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:2,onEdit:t[2]||(t[2]=e=>s.editSettings("translations")),image:e.api.admin_static_url+"/images/settings-translation.svg",title:e.translations.settings.translations.title,"can-disable":!1},null,8,["image","title"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:3,onEdit:t[3]||(t[3]=e=>s.editSettings("advanced-scheduling")),image:e.api.admin_static_url+"/images/settings-advanced-scheduling.svg",title:e.translations.settings.advanced_scheduling.title,"can-disable":!1},null,8,["image","title"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:4,onEdit:t[4]||(t[4]=e=>s.editSettings("notifications")),image:s.notificationImage,title:e.translations.settings.notifications.title,modelValue:s.notifications_enabled,"onUpdate:modelValue":t[5]||(t[5]=e=>s.notifications_enabled=e)},null,8,["image","title","modelValue"])):(0,o.kq)("",!0),e.settings.installed.blackout_dates&&e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:5,onEdit:t[6]||(t[6]=e=>s.editSettings("blackout")),image:e.api.admin_static_url+"/images/settings-blackout.svg",title:e.translations.settings.blackout.title,modelValue:s.blackout_enabled,"onUpdate:modelValue":t[7]||(t[7]=e=>s.blackout_enabled=e)},null,8,["image","title","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:6,onEdit:t[8]||(t[8]=e=>s.editSettings("google-calendar")),image:e.api.admin_static_url+"/images/settings-google-calendar.svg",title:e.translations.settings.google_calendar.title,upgrade:e.googleCalendarModule.upgrade,"upgrade-level":"plus",modelValue:s.google_calendar_enabled,"onUpdate:modelValue":t[9]||(t[9]=e=>s.google_calendar_enabled=e)},{default:(0,o.w5)((()=>[e.googleCalendarModule.enabled&&!e.settings.google_calendar.access_token?((0,o.wg)(),(0,o.j4)(c,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.google_calendar.noAccessToken),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:7,onEdit:t[10]||(t[10]=e=>s.editSettings("calendar-events")),modelValue:s.customizeCalendarEvents,"onUpdate:modelValue":t[11]||(t[11]=e=>s.customizeCalendarEvents=e),image:e.api.admin_static_url+"/images/settings-calendar-events.svg",title:e.translations.settings.calendar_events.card_title},null,8,["modelValue","image","title"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:8,onEdit:t[12]||(t[12]=e=>s.editSettings("mailchimp")),image:e.api.admin_static_url+"/images/settings-mailchimp.svg",title:e.translations.settings.mailchimp.title,upgrade:e.mailchimpModule.upgrade,"upgrade-level":"plus",modelValue:s.mailchimp_enabled,"onUpdate:modelValue":t[13]||(t[13]=e=>s.mailchimp_enabled=e)},{default:(0,o.w5)((()=>[e.mailchimpModule.enabled&&!e.settings.mailchimp.account_details?((0,o.wg)(),(0,o.j4)(c,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.mailchimp.noConnection),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:9,onEdit:t[14]||(t[14]=e=>s.editSettings("zoom")),image:e.api.admin_static_url+"/images/settings-zoom.svg",title:e.translations.settings.zoom.title,upgrade:e.zoomModule.upgrade,"upgrade-level":"plus",modelValue:s.zoom_enabled,"onUpdate:modelValue":t[15]||(t[15]=e=>s.zoom_enabled=e)},{default:(0,o.w5)((()=>[e.zoomModule.enabled&&!e.settings.zoom.auth_code?((0,o.wg)(),(0,o.j4)(c,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.zoom.noAuthCode),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:10,onEdit:t[16]||(t[16]=e=>s.editSettings("webex")),image:e.api.admin_static_url+"/images/settings-webex.svg",title:e.translations.settings.webex.title,upgrade:e.webexModule.upgrade,"upgrade-level":"plus",modelValue:s.webex_enabled,"onUpdate:modelValue":t[17]||(t[17]=e=>s.webex_enabled=e)},{default:(0,o.w5)((()=>[e.webexModule.enabled&&!e.settings.webex.access_token?((0,o.wg)(),(0,o.j4)(c,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointmentTypes.webex.noAuthCode),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:11,onEdit:t[18]||(t[18]=e=>s.editSettings("webhooks")),image:e.api.admin_static_url+"/images/settings-webhooks.svg",title:e.translations.settings.webhooks.title,upgrade:e.webhooksModule.upgrade,"upgrade-level":"pro",modelValue:s.webhooks_enabled,"onUpdate:modelValue":t[19]||(t[19]=e=>s.webhooks_enabled=e)},null,8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:12,onEdit:t[20]||(t[20]=e=>s.editSettings("payments")),image:e.api.admin_static_url+"/images/settings-payments.svg",title:e.translations.settings.payments.title,upgrade:e.paymentsModule.upgrade,"upgrade-level":"pro",modelValue:s.payments_enabled,"onUpdate:modelValue":t[21]||(t[21]=e=>s.payments_enabled=e)},null,8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(u,{key:13,onEdit:t[22]||(t[22]=e=>s.editSettings("tracking")),image:e.api.admin_static_url+"/images/settings-tracking.svg",title:e.translations.settings.tracking.title,upgrade:e.trackingModule.upgrade,"upgrade-level":"pro",modelValue:s.tracking_enabled,"onUpdate:modelValue":t[23]||(t[23]=e=>s.tracking_enabled=e)},null,8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.j4)(u,{key:14,onEdit:t[24]||(t[24]=e=>s.editSettings("staff")),image:e.api.admin_static_url+"/images/settings-staff.svg",title:e.translations.settings.staff.title,upgrade:e.staffModule.upgrade,"upgrade-level":"business",modelValue:s.staff_enabled,"onUpdate:modelValue":t[25]||(t[25]=e=>s.staff_enabled=e)},null,8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_resources")?((0,o.wg)(),(0,o.j4)(u,{key:15,onEdit:t[26]||(t[26]=e=>s.editSettings("resources")),image:e.api.admin_static_url+"/images/settings-resources.svg",title:e.translations.settings.resources.title,upgrade:e.resourcesModule.upgrade,"upgrade-level":"business",modelValue:s.resources_enabled,"onUpdate:modelValue":t[27]||(t[27]=e=>s.resources_enabled=e)},null,8,["image","title","upgrade","modelValue"])):(0,o.kq)("",!0)])),_:1}),e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.iD)("div",PT,[(0,o.Wm)(m,{theme:"grey"},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{theme:"grey",tag:"md-button",to:"/ssa/settings/import-export",class:"md-dense md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.title),1)])),_:1}),(0,o.Wm)(d,{theme:"grey",tag:"md-button",to:"/ssa/settings/developer",class:"md-dense md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developerScreen),1)])),_:1})])),_:1})])):(0,o.kq)("",!0)],64)):((0,o.wg)(),(0,o.j4)(n,{key:0}))])}const WT=e=>((0,o.dD)("data-v-5301ac76"),e=e(),(0,o.Cn)(),e),RT={class:"md-title"},LT={class:"license-key-form-layout"},jT={key:1,class:"license-key-valid"},qT={style:{display:"flex","align-items":"center"}},NT={class:"display-license-key"},$T={class:"inline-license-button"},HT=["innerHTML"],ZT=["innerHTML"],YT=WT((()=>(0,o._)("br",null,null,-1)));function KT(e,t,i,l,s,n){const d=(0,o.up)("foxy-progress-circular"),p=(0,o.up)("foxy-layout"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-list-item"),h=(0,o.up)("foxy-menu"),m=(0,o.up)("foxy-menu-anchor"),g=(0,o.up)("foxy-textfield");return e.settings.installed.license?((0,o.wg)(),(0,o.iD)("form",{key:0,novalidate:"",onSubmit:t[3]||(t[3]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"])),class:"license-key-form"},[(0,o._)("h2",RT,(0,r.zw)(e.translations.settings.license.key),1),(0,o._)("div",LT,[s.checking?((0,o.wg)(),(0,o.j4)(p,{key:0,"md-column":"",class:"license-validating"},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{medium:"",indeterminate:""}),(0,o._)("div",null,(0,r.zw)(e.translations.settings.license.validating),1)])),_:1})):"valid"===e.settings.license.license_status?((0,o.wg)(),(0,o.iD)("div",jT,[(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o._)("div",qT,[(0,o._)("span",null,(0,r.zw)(e.translations.settings.license.currentLicense)+": ",1),(0,o._)("span",null,[(0,o._)("strong",null,(0,r.zw)(this.api.edition_str)+" "+(0,r.zw)(e.translations.settings.license.edition),1)]),n.hasUpgradePaths?((0,o.wg)(),(0,o.j4)(m,{key:0,"md-direction":"bottom left","md-size":"3"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{class:"md-primary",disabled:!1,style:{"margin-left":"5px"},onClick:t[0]||(t[0]=e=>s.openUpgradeMenu=!0)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.license.upgrade),1)])),_:1}),(0,o.Wm)(h,{modelValue:s.openUpgradeMenu,"onUpdate:modelValue":t[1]||(t[1]=e=>s.openUpgradeMenu=e)},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.upgradePaths,((e,t)=>((0,o.wg)(),(0,o.j4)(c,{key:t,onClick:i=>n.navigateTo(e,t)},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(t.charAt(0).toUpperCase()+t.slice(1))+" ",1),(0,o.Wm)(u,{icon:"launch",style:{margin:"0 5px"}})])),_:2},1032,["onClick"])))),128))])),_:1},8,["modelValue"])])),_:1})):(0,o.kq)("",!0)])])),_:1}),(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o._)("div",NT,(0,r.zw)(n.displayKey),1),(0,o._)("div",null,["valid"===e.settings.license.license_status?((0,o.wg)(),(0,o.j4)(f,{key:0,class:"md-primary",onClick:n.removeLicense},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.license.remove),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0)])])),_:1})])):((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o.Wm)(g,{modelValue:n.key,"onUpdate:modelValue":t[2]||(t[2]=e=>n.key=e),label:e.translations.settings.license.key,helptext:n.licenseError?this.settings.license.license_status_message:"","helptext-persistent":"","helptext-validation":"",id:"license",valid:!n.licenseError},null,8,["modelValue","label","helptext","valid"])])),_:1}),(0,o.Wm)(p,{class:"license-actions-layout"},{default:(0,o.w5)((()=>[(0,o._)("div",$T,[(0,o.Wm)(f,{mode:"raised",onClick:n.validateLicense},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.license.validate),1)])),_:1},8,["onClick"])])])),_:1})],64))]),n.displayHelpLinks?((0,o.wg)(),(0,o.j4)(p,{key:0,"md-column":"",class:"md-body-2"},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.settings.license.needHelp),1),(0,o._)("ul",null,[(0,o._)("li",null,[(0,o._)("span",{innerHTML:n.collectLicense},null,8,HT)]),(0,o._)("li",null,[(0,o._)("span",{innerHTML:n.contactSupport},null,8,ZT)])]),YT])),_:1})):(0,o.kq)("",!0)],32)):(0,o.kq)("",!0)}var JT=i(71067).sprintf,XT={name:"LicenseKey",data(){return{checking:!1,openUpgradeMenu:!1}},beforeMount(){this.checking=!0,this.fetchLicenseSettings().then((()=>{this.checking=!1,this.checkLicenseValidity()}))},computed:{collectLicense(){return JT(this.translations.settings.license.collectLicense,'',"")},contactSupport(){return JT(this.translations.settings.license.contactSupport,'',"")},licenseError(){return"invalid"===this.settings.license.license_status},displayKey(){return this.settings.license.license_filtered.replace(/.(?=.{4,}$)/g,"• ")},key:{get(){return this.settings.license.license_filtered},set(e){this.updateLicenseKey({settings:this.settings,value:e})}},displayHelpLinks(){return!this.checking&&("invalid"===this.settings.license.license_status||"empty"===this.settings.license.license_status)&&this.settings.installed.license},hasUpgradePaths(){return!wa().isEmpty(this.settings?.license?.license_upgrade_links)},upgradePaths(){return this.hasUpgradePaths?this.settings.license.license_upgrade_links:[]},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","api"]),...(0,m.Se)(["upgradeUrlParsed"])},methods:{validateLicense(){this.checking=!0,this.updateLicenseSettings().then((()=>{this.checking=!1,this.checkLicenseValidity()}))},removeLicense(){this.checking=!0,this.updateLicenseKey({settings:this.settings,value:""}),this.updateLicenseSettings().then((()=>{this.checking=!1}))},checkLicenseValidity(){"valid"===this.settings.license.license_status&&this.$emit("validatedLicense")},navigateTo(e,t){let i={utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade",utm_content:"upgrade-license-dropdown"};i.utm_campaign=i.utm_campaign+"-"+t;let a=this.upgradeUrlParsed(e,i);window.open(a,"_blank")},...(0,m.nv)("license",["fetchLicenseSettings","updateLicenseSettings"]),...(0,m.OI)("license",["updateLicenseKey"])}};const QT=(0,he.Z)(XT,[["render",KT],["__scopeId","data-v-5301ac76"]]);var eO=QT;const tO=["src"],iO={key:0,class:"media-caption plus"},aO={key:1,class:"media-caption pro"},oO={key:2,class:"media-caption business"},rO=(0,o._)("div",{class:"mdc-card__ripple"},null,-1),lO={class:"md-title"},sO={key:1,style:{flex:"1"}},nO={class:"screen-reader-text"},dO={key:2,class:"coming-soon-wrap"},pO={class:"coming-soon"},fO={key:3,class:"beta-wrap"},uO={class:"beta"};function cO(e,t,i,l,s,n){const d=(0,o.up)("foxy-card-media"),p=(0,o.up)("foxy-card-header"),f=(0,o.up)("foxy-card-content"),u=(0,o.up)("foxy-switch"),c=(0,o.up)("foxy-button"),h=(0,o.up)("foxy-card-actions"),m=(0,o.up)("foxy-card"),g=(0,o.up)("promo-pro"),_=(0,o.up)("foxy-dialog"),y=(0,o.up)("promo-plus"),w=(0,o.up)("promo-business"),x=(0,o.up)("foxy-dialog-title"),C=(0,o.up)("foxy-dialog-content"),v=(0,o.up)("foxy-dialog-button"),b=(0,o.up)("foxy-dialog-footer"),B=(0,o.up)("foxy-layout");return(0,o.wg)(),(0,o.j4)(B,{class:"settings-list-item"},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{"md-with-hover":i.modelValue,class:(0,r.C_)(["full-width settings overflow-visible",{disabled:!i.modelValue}]),onClick:n.maybeEdit},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:(0,r.C_)(["mdc-card__primary-action",{cardStyle:i.cardStyle}])},{default:(0,o.w5)((()=>[(0,o._)("img",{src:i.image,alt:""},null,8,tO),i.upgrade?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},["plus"===i.upgradeLevel?((0,o.wg)(),(0,o.iD)("div",iO,(0,r.zw)(e.translations.promo.availablePlus),1)):(0,o.kq)("",!0),"pro"===i.upgradeLevel?((0,o.wg)(),(0,o.iD)("div",aO,(0,r.zw)(e.translations.promo.availablePro),1)):(0,o.kq)("",!0),"business"===i.upgradeLevel?((0,o.wg)(),(0,o.iD)("div",oO,(0,r.zw)(e.translations.promo.availableBusiness),1)):(0,o.kq)("",!0)],64)):(0,o.kq)("",!0),rO])),_:1},8,["class"]),(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o._)("h3",lO,(0,r.zw)(i.title),1)])),_:1}),e.$slots.default?((0,o.wg)(),(0,o.j4)(f,{key:0},{default:(0,o.w5)((()=>[(0,o.WI)(e.$slots,"default")])),_:3})):(0,o.kq)("",!0),i.upgrade?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(h,{key:1,class:"split-actions"},{default:(0,o.w5)((()=>[i.canDisable?((0,o.wg)(),(0,o.j4)(u,{key:0,id:n.slugifyTitle,modelValue:n.switchValue,"onUpdate:modelValue":t[0]||(t[0]=e=>n.switchValue=e),onClick:(0,a.iM)(n.doNothing,["stop"]),name:e.translations.settings.enable+i.title},null,8,["id","modelValue","onClick","name"])):((0,o.wg)(),(0,o.iD)("span",sO)),(0,o.Wm)(c,{disabled:!i.modelValue,theme:"black"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.edit)+" ",1),(0,o._)("span",nO,(0,r.zw)(i.title),1)])),_:1},8,["disabled"])])),_:1})),i.upgrade&&"coming-soon"==i.upgradeLevel?((0,o.wg)(),(0,o.iD)("div",dO,[(0,o._)("div",pO,(0,r.zw)(e.translations.settings.comingSoon),1)])):i.inBeta?((0,o.wg)(),(0,o.iD)("div",fO,[(0,o._)("div",uO,(0,r.zw)(e.translations.settings.beta),1)])):(0,o.kq)("",!0)])),_:3},8,["md-with-hover","class","onClick"]),(0,o.Wm)(_,{ref:"upgradePro"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{"upgrade-url-params":s.promoProUpgradeParams,dismissable:!1,"pro-text":e.translations.promo.proTextPopUp,onPromoClicked:n.closeDialogs},null,8,["upgrade-url-params","pro-text","onPromoClicked"])])),_:1},512),(0,o.Wm)(_,{ref:"upgradePlus"},{default:(0,o.w5)((()=>[(0,o.Wm)(y,{"upgrade-url-params":s.promoPlusUpgradeParams,dismissable:!1,onPromoClicked:n.closeDialogs},null,8,["upgrade-url-params","onPromoClicked"])])),_:1},512),(0,o.Wm)(_,{ref:"upgradeBusiness"},{default:(0,o.w5)((()=>[(0,o.Wm)(w,{"upgrade-url-params":s.promoBusinessUpgradeParams,dismissable:!1,onPromoClicked:n.closeDialogs},null,8,["upgrade-url-params","onPromoClicked"])])),_:1},512),(0,o.Wm)(_,{ref:"enableSetting"},{default:(0,o.w5)((()=>[(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(i.title),1)])),_:1}),(0,o.Wm)(C,null,{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.settings.disabledWarning),1)])),_:1}),(0,o.Wm)(b,null,{default:(0,o.w5)((()=>[(0,o.Wm)(v,{action:"dismiss",theme:"black",onClick:n.closeDialogs},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(v,{action:"accept",class:"md-primary",onClick:n.enableThis},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.enable),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512)])),_:3})}var hO={name:"SettingsCard",components:{PromoPlus:it,PromoPro:ft,PromoBusiness:dc},props:{canDisable:{type:Boolean,default:!0},cardStyle:{type:String,default:""},image:{type:String,default:""},inBeta:{type:Boolean,default:!1},title:{type:String,default:""},upgrade:Boolean,upgradeLevel:{type:String,default:""},modelValue:{type:Boolean,default:!0}},emits:["update:modelValue","edit"],data(){return{promoPlusUpgradeParams:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-plus",utm_term:"plus-features",utm_content:"general-plus-settings-popup"},promoProUpgradeParams:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-pro",utm_term:"pro-features",utm_content:"general-pro-settings-popup"},promoBusinessUpgradeParams:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-business",utm_term:"business-features",utm_content:"general-business-settings-popup"}}},computed:{switchValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},slugifyTitle(){return pa()(this.title,{lower:!0,strict:!0})},...(0,m.rn)("translations",["translations"])},methods:{closeDialogs(){this.$refs["enableSetting"].close(),this.$refs["upgradePlus"].close(),this.$refs["upgradePro"].close()},doNothing(){},edit(){this.$emit("edit")},enableThis(){this.switchValue=!0,this.edit()},maybeEdit(){this.modelValue?this.edit():this.upgrade&&"plus"===this.upgradeLevel?this.$refs["upgradePlus"].open():this.upgrade&&"pro"===this.upgradeLevel?this.$refs["upgradePro"].open():this.upgrade&&"business"===this.upgradeLevel?this.$refs["upgradeBusiness"].open():this.upgrade&&"coming-soon"===this.upgradeLevel||this.$refs["enableSetting"].open()}}};const mO=(0,he.Z)(hO,[["render",cO]]);var gO=mO,_O={name:"SettingsList",components:{NoPermission:ia,licenseKey:eO,SettingsCard:gO},data(){return{license:!1,enableFeatureName:"",enableFeatureTitle:""}},watch:{guidesList(){this.getGuides({"ssasc-plugin-screen":this.guidesList})},$route:"maybeFetchSettings"},mounted(){this.getGuides({"ssasc-plugin-screen":this.guidesList}),this.maybeFetchSettings()},computed:{blackout_enabled:{get(){return this.settings.blackout_dates.enabled},set(e){this.updateBlackoutEnabled({settings:this.settings,value:e}),this.updateBlackoutSettings()}},google_calendar_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"google_calendar")&&(!!this.settings.google_calendar.enabled&&!!this.settings.installed.google_calendar)},set(e){this.updateGoogleCalendarEnabled({settings:this.settings,value:e}),this.updateGoogleCalendarSettings()}},customizeCalendarEvents:{get(){return this.settings.calendar_events.enabled},set(e){this.setCalendarEventsEnabled({settings:this.settings,value:e}),this.updateCalendarEventsSettings()}},mailchimp_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"mailchimp")&&(!!this.settings.mailchimp.enabled&&!!this.settings.installed.mailchimp)},set(e){this.updateMailchimpEnabled({settings:this.settings,value:e}),this.updateMailchimpSettings()}},webex_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"webex")&&(!!this.settings.installed.webex&&!!this.settings.webex.enabled)},set(e){this.updateWebexEnabled(e),this.updateWebexSettings()}},zoom_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"zoom")&&(!!this.settings.zoom.enabled&&!!this.settings.installed.zoom)},set(e){this.updateZoomEnabled({settings:this.settings,value:e}),this.updateZoomSettings()}},notifications_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"notifications")&&(!!this.settings.notifications.enabled&&!!this.settings.installed.notifications)},set(e){this.setNotificationsEnabled({settings:this.settings,value:e}),this.updateNotificationsSettings()}},webhooks_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"webhooks")&&(!!this.settings.webhooks.enabled&&!!this.settings.installed.webhooks)},set(e){this.updateWebhooksEnabled({value:e,settings:this.settings}),this.updateWebhooksSettings()}},payments_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"payments")&&(!!this.settings.payments.enabled&&!!this.settings.installed.payments)},set(e){this.updatePaymentsEnabled(e)}},staff_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"staff")&&(!!this.settings.staff.enabled&&!!this.settings.installed.staff)},set(e){this.updateStaffEnabled(e)}},resources_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"resources")&&(!!this.settings.resources.enabled&&!!this.settings.installed.resources)},set(e){this.updateResourcesEnabled(e)}},tracking_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"tracking")&&(!!this.settings.tracking.enabled&&!!this.settings.installed.tracking)},set(e){this.updateTrackingEnabled(e)}},notificationImage(){return this.smsModule.installed?this.api.admin_static_url+"/images/settings-notifications-sms.svg":this.api.admin_static_url+"/images/settings-notifications.svg"},guidesList(){let e=[K.settings.list];return this.license&&e.push(K.settings.license_enabled),e},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings","refreshMomentSettings"]),...(0,m.Se)("advanced_scheduling",["advancedSchedulingModule"]),...(0,m.Se)("zoom",["zoomModule"]),...(0,m.Se)("mailchimp",["mailchimpModule"]),...(0,m.Se)("google_calendar",["googleCalendarModule"]),...(0,m.Se)("notifications",["smsModule"]),...(0,m.Se)("payments",["paymentsModule"]),...(0,m.Se)("staff",["currentUserCan","staffModule"]),...(0,m.Se)("tracking",["trackingModule"]),...(0,m.Se)("webex",["webexModule"]),...(0,m.Se)("webhooks",["webhooksModule"]),...(0,m.Se)("resources",["resourcesModule"])},methods:{toggleLicense(){this.license=!this.license},editSettings(e){this.$router.push(`/ssa/settings/${e}`)},maybeFetchSettings(){if(wa().isEmpty(this.refreshMomentSettings))return void this.resetRefreshMomentSettings();let e=fe()().subtract(2,"minutes");e>this.refreshMomentSettings&&(this.fetchSettings(),this.resetRefreshMomentSettings())},...(0,m.nv)("notifications",["updateNotificationsSettings"]),...(0,m.nv)("advanced_scheduling",["updateAdvancedSchedulingSettings"]),...(0,m.nv)("developer_settings",["updateDeveloperSettings"]),...(0,m.nv)("zoom",["updateZoomSettings"]),...(0,m.nv)("mailchimp",["updateMailchimpSettings"]),...(0,m.nv)("google_calendar",["updateGoogleCalendarSettings","updateCalendarEventsSettings"]),...(0,m.nv)("webhooks",["updateWebhooksSettings"]),...(0,m.nv)("payments",["updatePaymentsEnabled"]),...(0,m.nv)("staff",["updateStaffEnabled"]),...(0,m.nv)("resources",["updateResourcesEnabled"]),...(0,m.nv)("tracking",["updateTrackingEnabled"]),...(0,m.OI)("notifications",["setNotificationsEnabled"]),...(0,m.OI)("advanced_scheduling",["updateAdvancedSchedulingEnabled"]),...(0,m.OI)("zoom",["updateZoomEnabled"]),...(0,m.OI)("mailchimp",["updateMailchimpEnabled"]),...(0,m.OI)("google_calendar",["updateGoogleCalendarEnabled","setCalendarEventsEnabled"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.OI)("webex",["updateWebexEnabled"]),...(0,m.nv)("webex",["updateWebexSettings"]),...(0,m.OI)("webhooks",["updateWebhooksEnabled"]),...(0,m.nv)("blackout",["updateBlackoutSettings"]),...(0,m.OI)("blackout",["updateBlackoutEnabled"]),...(0,m.nv)(["fetchSettings"]),...(0,m.OI)(["resetRefreshMomentSettings"])}};const yO=(0,he.Z)(_O,[["render",VT]]);var wO=yO;function xO(e,t,i,a,r,l){const s=(0,o.up)("license-key");return(0,o.wg)(),(0,o.j4)(s)}var CO={name:"SettingsLicense",store:$J,components:{licenseKey:eO},data(){return{}}};const vO=(0,he.Z)(CO,[["render",xO]]);var bO=vO;const BO={class:"global-settings"},SO={href:"https://simplyscheduleappointments.com/document/timezones-and-offsets/",target:"_blank"},kO={class:"md-input-container foxy-input-container"},AO=["value"],MO={value:"0"},DO=["value"],TO={class:"button-bar align-right"};function OO(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-notification"),f=(0,o.up)("foxy-select2"),u=(0,o.up)("foxy-list-item"),c=(0,o.up)("foxy-select"),h=(0,o.up)("foxy-textfield"),m=(0,o.up)("foxy-phone-field"),g=(0,o.up)("foxy-button"),_=(0,o.up)("foxy-progress-circular"),y=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",BO,[(0,o._)("form",{novalidate:"",onSubmit:t[11]||(t[11]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[(0,o.Wm)(d,{"wizard-mode":i.wizardMode},null,8,["wizard-mode"]),s.timezoneWarning?((0,o.wg)(),(0,o.j4)(p,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.general.genericTimezoneWarning)+" ",1),(0,o._)("a",SO,(0,r.zw)(e.translations.general.learnMore),1)])),_:1})):(0,o.kq)("",!0),(0,o._)("div",kO,[(0,o.Wm)(f,{style:{width:"100%"},name:"timezone",id:"timezone",modelValue:n.timezone_string,"onUpdate:modelValue":t[0]||(t[0]=e=>n.timezone_string=e),label:e.translations.settings.general.timezone,disabled:s.saving},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.allSupportedTimezones,(t=>((0,o.wg)(),(0,o.iD)("option",{value:t,key:t},(0,r.zw)(e.formatTimezone(t)),9,AO)))),128))])),_:1},8,["modelValue","label","disabled"])]),(0,o.Wm)(c,{"menu-fullwidth":!1,label:e.translations.settings.general.dateFormat,name:"dateFormat",id:"dateFormat",modelValue:n.date_format,"onUpdate:modelValue":t[1]||(t[1]=e=>n.date_format=e),disabled:s.saving,"md-menu-class":"md-align-trigger"},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.localizedDateFormats,((e,t)=>((0,o.wg)(),(0,o.j4)(u,{"data-value":e.php,key:e.php,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.moment().format(e.js))+" ",1),t>0?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)(" — "),(0,o._)("code",null,(0,r.zw)(e.php),1)],64)):(0,o.kq)("",!0)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"]),(0,o.Wm)(c,{"menu-fullwidth":!1,label:e.translations.settings.general.timeFormat,name:"timeFormat",id:"timeFormat",modelValue:n.time_format,"onUpdate:modelValue":t[2]||(t[2]=e=>n.time_format=e),disabled:s.saving},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.localizedTimeFormats,((e,t)=>((0,o.wg)(),(0,o.j4)(u,{"data-value":e.php,key:e.php,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.moment().format(e.js))+" ",1),t>0?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)(" — "),(0,o._)("code",null,(0,r.zw)(e.php),1)],64)):(0,o.kq)("",!0)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"]),(0,o.Wm)(c,{"menu-fullwidth":!1,label:e.translations.settings.general.weekStartsOn,name:"weekStartsOn",id:"weekStartsOn",modelValue:n.start_of_week,"onUpdate:modelValue":t[3]||(t[3]=e=>n.start_of_week=e),disabled:s.saving},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.moment.weekdays(!1),((e,t)=>((0,o.wg)(),(0,o.j4)(u,{"data-value":t.toString(),key:e,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"]),(0,o.Wm)(c,{"menu-fullwidth":!1,label:e.translations.settings.general.countryCode.label,name:"defaultCountryCode",id:"defaultCountryCode",modelValue:n.country_code,"onUpdate:modelValue":t[4]||(t[4]=e=>n.country_code=e),disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{"data-value":"",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.general.countryCode.defaultValue),1)])),_:1}),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.countries,(e=>((0,o.wg)(),(0,o.j4)(u,{"data-value":e.iso2,key:e.iso2,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.name),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","disabled"]),(0,o.Wm)(h,{required:"",modelValue:n.staff_name,"onUpdate:modelValue":t[5]||(t[5]=e=>n.staff_name=e),disabled:s.saving,label:e.translations.settings.general.contact,helptext:n.staff_name.length?e.translations.settings.general.contact_helper:e.translations.settings.general.contact_error,"helptext-persistent":"","helptext-validation":"",valid:n.staff_name.length>0},null,8,["modelValue","disabled","label","helptext","valid"]),(0,o.Wm)(h,{required:"",modelValue:n.company_name,"onUpdate:modelValue":t[6]||(t[6]=e=>n.company_name=e),disabled:s.saving,label:e.translations.settings.general.business,helptext:n.company_name.length?"":e.translations.settings.general.business_error,"helptext-persistent":"","helptext-validation":"",valid:n.company_name.length>0},null,8,["modelValue","disabled","label","helptext","valid"]),(0,o.Wm)(h,{required:"",modelValue:n.admin_email,"onUpdate:modelValue":t[7]||(t[7]=e=>n.admin_email=e),disabled:s.saving,label:e.translations.settings.general.email,helptext:n.admin_email.length?e.translations.settings.general.email_helper:e.translations.settings.general.email_error,"helptext-persistent":"","helptext-validation":"",valid:n.admin_email.length>0},null,8,["modelValue","disabled","label","helptext","valid"]),e.smsModule.active?((0,o.wg)(),(0,o.j4)(m,{key:1,modelValue:n.admin_phone,"onUpdate:modelValue":t[8]||(t[8]=e=>n.admin_phone=e),label:e.translations.settings.general.phone,"input-options":{id:"admin_phone"},onValidate:t[9]||(t[9]=e=>n.checkPhone(e)),required:e.smsModule.active,"helptext-validation":!s.validAdminPhone,helptext:s.validAdminPhone?e.translations.settings.general.phone_help:e.translations.settings.general.phone_error,"helptext-persistent":!s.validAdminPhone},null,8,["modelValue","label","required","helptext-validation","helptext","helptext-persistent"])):(0,o.kq)("",!0),s.loading||i.wizardMode?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(f,{key:2,label:e.translations.settings.general.editAppointmentPage,name:"editAppointmentPage",id:"editAppointmentPage",modelValue:n.edit_appointment_page_id,"onUpdate:modelValue":t[10]||(t[10]=e=>n.edit_appointment_page_id=e),disabled:s.saving},{default:(0,o.w5)((()=>[(0,o._)("option",MO,(0,r.zw)(e.translations.settings.general.fullScreenPage),1),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.wpPages,(e=>((0,o.wg)(),(0,o.iD)("option",{value:e.id,key:e.id},(0,r.zw)(e.title.rendered)+" ("+(0,r.zw)(e.id)+") ",9,DO)))),128))])),_:1},8,["label","modelValue","disabled"])),(0,o._)("div",TO,[(0,o.Wm)(g,{"data-test":"test-save-changes",mode:"raised",class:"md-primary",onClick:n.saveSettings,disabled:s.saving},{default:(0,o.w5)((()=>[s.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(n._button),1)],64))])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(_,{key:0,indeterminate:""})):(0,o.kq)("",!0)])],32),(0,o.Wm)(y,{ref:"confirmLeaveDirty",title:e.translations.settings.general.confirmTitle,"content-html":e.translations.settings.general.confirmContent,"ok-text":e.translations.general.ok,"cancel-text":e.translations.general.cancel,onConfirm:n.onConfirm},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}const GO={class:"settings-header"},EO={key:0,class:"md-title"};function UO(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",GO,[(0,o.Wm)(n,{"data-test":"test-return-to-settings",tag:"md-button",onClick:s.handleLinkClick,style:{"padding-left":"0"},icon:"keyboard_arrow_left",theme:"black"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.returnToSettings),1)])),_:1},8,["onClick"]),s.headline?((0,o.wg)(),(0,o.iD)("h2",EO,[(0,o.Uk)((0,r.zw)(s.headline)+" ",1),i.loading?((0,o.wg)(),(0,o.j4)(d,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])):(0,o.kq)("",!0)])}var FO={name:"SettingsHeader",store:$J,props:{loading:{type:Boolean,default:!1},wizardMode:{default:!1,type:Boolean}},data(){return{viewName:this.$route.name}},computed:{headline(){let e;switch(this.viewName){case"settings-general":e=this.translations.settings.general.title;break;case"settings-import-export":e=this.translations.settings.import_export.title;break;case"settings-styles":e=this.translations.settings.styles.title;break;case"settings-translations":e=this.translations.settings.translations.title;break;case"settings-google-calendar":e=this.translations.settings.google_calendar.title;break;case"settings-mailchimp":e=this.translations.settings.mailchimp.title;break;case"settings-advanced-scheduling":e=this.translations.settings.advanced_scheduling.title;break;case"payments-all":e=this.translations.settings.payments.title;break;case"settings-tracking":e=this.translations.settings.tracking.title;break;case"settings-zoom":e=this.translations.settings.zoom.title;break}return e},...(0,m.rn)("translations",["translations"])},methods:{cancelEdit(){this.$emit("cancelEdit")},handleLinkClick(){this.wizardMode?this.$router.back():this.$router.push("/ssa/settings/all")}}};const IO=(0,he.Z)(FO,[["render",UO]]);var zO=IO,PO={name:"SettingsGlobal",components:{SettingsHeader:zO},props:{button:{default:"Save",type:String},wizardMode:{default:!1,type:Boolean}},data(){return{moment:fe(),countries:Z,dirty:!1,options:X,saving:!1,timezoneWarning:!1,validAdminPhone:!0,loading:!1,routerNext:null}},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";return this.$refs[e].open(),void(this.routerNext=i)}i()},watch:{admin_email:function(e,t){e!==t&&(this.dirty=!0)},admin_phone:function(e,t){e!==t&&(this.dirty=!0)},company_name:function(e,t){e!==t&&(this.dirty=!0)},date_format:function(e,t){e!==t&&(this.dirty=!0)},staff_name:function(e,t){e!==t&&(this.dirty=!0)},start_of_week:function(e,t){e!==t&&(this.dirty=!0)},time_format:function(e,t){e!==t&&(this.dirty=!0)},timezone_string:function(e,t){e!==t&&(this.dirty=!0),this.timezoneWarning=e.includes("UTC")||e.includes("GMT")},edit_appointment_page_id:function(e,t){e!==t&&(this.dirty=!0)}},mounted(){this.wpPages||(this.loading=!0,this.fetchWPPages().then((()=>{this.loading=!1})).catch((e=>{console.log(e)}))),(this.timezone_string.includes("UTC")||this.timezone_string.includes("GMT"))&&(this.timezoneWarning=!0),this.getGuides({"ssasc-plugin-screen":K.general})},computed:{_button(){return"Save"===this.button?this.translations.general.save:this.button},admin_email:{get(){return this.settings.global.admin_email},set(e){this.updateAdminEmail({settings:this.settings,value:e})}},admin_phone:{get(){return this.settings.global.admin_phone?this.settings.global.admin_phone:""},set(e){this.setAdminPhone({settings:this.settings,value:e})}},company_name:{get(){return this.settings.global.company_name},set(e){this.updateCompanyName({settings:this.settings,value:e})}},country_code:{get(){return this.settings.global.country_code},set(e){this.setCountryCode({settings:this.settings,code:e})}},date_format:{get(){return this.settings.global.date_format},set(e){this.updateDateFormat({settings:this.settings,value:e})}},localizedDateFormats(){let e=wa().cloneDeep(this.options.dateFormats);return e[0].js=this.api.locale_fjy,e},localizedTimeFormats(){let e=wa().cloneDeep(this.options.timeFormats);return e[0].js=this.api.locale_gia,e},staff_name:{get(){return this.settings.global.staff_name},set(e){this.updateStaffName({settings:this.settings,value:e})}},start_of_week:{get(){return this.settings.global.start_of_week},set(e){this.updateStartOfWeek({settings:this.settings,value:e})}},time_format:{get(){return this.settings.global.time_format},set(e){this.updateTimeFormat({settings:this.settings,value:e})}},timezone_string:{get(){return this.settings.global.timezone_string},set(e){this.updateTimezoneString({settings:this.settings,value:e})}},edit_appointment_page_id:{get(){return this.settings.global.edit_appointment_page_id.toString()},set(e){this.updateAppointmentPage({settings:this.settings,value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","timestampFormat","settings"]),...(0,m.rn)("global_settings",["wpPages"]),...(0,m.Se)(["formatTimezone","allSupportedTimezones"]),...(0,m.Se)("notifications",["smsModule"])},methods:{checkPhone(e){!this.smsModule.active||e?this.validAdminPhone=!0:this.validAdminPhone=!1},saveSettings(){this.admin_email.length&&this.company_name.length&&this.staff_name.length&&(this.saving=!0,this.updateGlobalSettings().then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")})))},onConfirm(){this.routerNext(),this.fetchSettings()},...(0,m.nv)(["fetchSettings"]),...(0,m.nv)("global_settings",["updateGlobalSettings","fetchWPPages"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.OI)("global_settings",["setAdminPhone","setCountryCode","updateStartOfWeek","updateTimezoneString","updateDateFormat","updateTimeFormat","updateAdminEmail","updateCompanyName","updateStaffName","updateAppointmentPage"])}};const VO=(0,he.Z)(PO,[["render",OO]]);var WO=VO;function RO(e,t,i,r,l,s){const n=(0,o.up)("foxy-snackbar"),d=(0,o.up)("settings-header"),p=(0,o.up)("settings-developer-settings"),f=(0,o.up)("foxy-tab-item"),u=(0,o.up)("settings-developer-jobs"),c=(0,o.up)("foxy-tabs"),h=(0,o.up)("purge-appointments");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{novalidate:"",onSubmit:t[1]||(t[1]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[(0,o.Wm)(n,{position:"top center",modelValue:l.isSaveSettingsVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>l.isSaveSettingsVisible=e),message:e.translations.settings.advanced_scheduling.saved},null,8,["modelValue","message"]),(0,o.Wm)(d),(0,o.Wm)(c,{"onUpdate:modelValue":s.setCurrentTab},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{label:e.translations.settings.developer.title},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{onSaved:s.onSettingsSaved},null,8,["onSaved"])])),_:1},8,["label"]),(0,o.Wm)(f,{label:e.translations.settings.jobs.title},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{onSaved:s.onSettingsSaved,onConfirmPurge:s.handleConfirmPurge},null,8,["onSaved","onConfirmPurge"])])),_:1},8,["label"])])),_:1},8,["onUpdate:modelValue"])],32),(0,o.Wm)(h,{modelValue:l.jobs,"onUpdate:modelValue":t[2]||(t[2]=e=>l.jobs=e)},null,8,["modelValue"])])}const LO={class:"md-title"},jO={class:"foxy-switch-with-helper"},qO={class:"foxy-helper-text"},NO={class:"foxy-switch-with-helper"},$O={class:"foxy-helper-text"},HO=(0,o._)("hr",null,null,-1),ZO={key:0,class:"md-title"},YO={key:1,class:"foxy-switch-with-helper"},KO={class:"foxy-helper-text"},JO={class:"foxy-switch-with-helper"},XO={class:"foxy-helper-text"},QO={key:2},eG={class:"md-title"},tG={class:"foxy-switch-with-helper"},iG={class:"foxy-helper-text"},aG={class:"button-bar align-right"};function oG(e,t,i,l,s,n){const d=(0,o.up)("foxy-switch"),p=(0,o.up)("foxy-notification"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-progress-circular"),c=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{novalidate:"",onSubmit:t[5]||(t[5]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[(0,o._)("h2",LO,(0,r.zw)(e.translations.settings.developer.title),1),(0,o._)("div",jO,[(0,o.Wm)(d,{modelValue:n.enqueue_everywhere,"onUpdate:modelValue":t[0]||(t[0]=e=>n.enqueue_everywhere=e),id:"enqueue_everywhere",name:"enqueue_everywhere"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.enqueue_everywhere.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",qO,(0,r.zw)(e.translations.settings.developer.enqueue_everywhere.help),1)]),(0,o._)("div",NO,[(0,o.Wm)(d,{modelValue:n.disable_availability_caching,"onUpdate:modelValue":t[1]||(t[1]=e=>n.disable_availability_caching=e),id:"disable_availability_caching",name:"disable_availability_caching"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.disable_availability_caching.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",$O,(0,r.zw)(e.translations.settings.developer.disable_availability_caching.help),1)]),HO,n.isBetaEmpty?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("h2",ZO,(0,r.zw)(e.translations.settings.developer.beta_updates.title),1)),n.showBetaUpdates?((0,o.wg)(),(0,o.iD)("div",YO,[(0,o.Wm)(d,{modelValue:n.beta_updates,"onUpdate:modelValue":t[2]||(t[2]=e=>n.beta_updates=e),id:"beta_updates",name:"beta_updates"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.beta_updates.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",KO,(0,r.zw)(e.translations.settings.developer.beta_updates.help),1)])):(0,o.kq)("",!0),(0,o._)("div",JO,[(0,o.Wm)(d,{modelValue:n.display_appointment_revisions,"onUpdate:modelValue":t[3]||(t[3]=e=>n.display_appointment_revisions=e),id:"display_appointment_revisions",name:"display_appointment_revisions"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.display_appointment_revisions.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",XO,(0,r.zw)(e.translations.settings.developer.display_appointment_revisions.help),1)]),n.isBetaEmpty?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("hr",QO)),(0,o._)("h2",eG,(0,r.zw)(e.translations.settings.developer.pluginSettings.title),1),(0,o._)("div",tG,[n.remove_data_on_uninstall?((0,o.wg)(),(0,o.j4)(p,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.pluginSettings.warning),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(d,{modelValue:n.remove_data_on_uninstall,"onUpdate:modelValue":t[4]||(t[4]=e=>n.remove_data_on_uninstall=e),id:"remove_data_on_uninstall",name:"remove_data_on_uninstall"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.pluginSettings.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",iG,(0,r.zw)(e.translations.settings.developer.pluginSettings.help),1)]),(0,o._)("div",aG,[(0,o.Wm)(f,{mode:"raised",class:"md-primary",onClick:n.saveSettings,disabled:s.saving},{default:(0,o.w5)((()=>[s.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(n._button),1)],64))])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(u,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])],32),(0,o.Wm)(c,{ref:"confirmLeaveDirty",title:e.translations.settings.general.confirmTitle,"content-html":e.translations.settings.general.confirmContent,"ok-text":e.translations.general.ok,"cancel-text":e.translations.general.cancel,onConfirm:n.onConfirm},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}var rG={name:"SettingsDeveloperSettings",props:{button:{default:"Save",type:String}},emits:["saved"],data(){return{dirty:!1,saving:!1,betaFeatures:[],routerNext:null}},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";return this.$refs[e].open(),void(this.routerNext=i)}i()},watch:{booking_api_embed:function(e,t){e!==t&&(this.dirty=!0)},capacity_availability:function(e,t){e!==t&&(this.dirty=!0)},disable_availability_caching:function(e,t){e!==t&&(this.dirty=!0)},enqueue_everywhere:function(e,t){e!==t&&(this.dirty=!0)},beta_updates:function(e,t){e!==t&&(this.dirty=!0)},display_appointment_revisions:function(e,t){e!==t&&(this.dirty=!0)}},computed:{showBetaUpdates(){return this.settings.installed.license},isBetaEmpty(){return this.checkBetaFeaturesArray(),0==this.betaFeatures.length},_button(){return"Save"===this.button?this.translations.general.save:this.button},booking_api_embed:{get(){return this.settings.developer.booking_api_embed},set(e){this.setBookingApiEmbed({settings:this.settings,value:e})}},capacity_availability:{get(){return this.settings.developer.capacity_availability},set(e){this.setCapacityAvailability({settings:this.settings,value:e})}},disable_availability_caching:{get(){return this.settings.developer.disable_availability_caching},set(e){this.setDisableAvailabilityCaching({settings:this.settings,value:e})}},enqueue_everywhere:{get(){return this.settings.developer.enqueue_everywhere},set(e){this.setEnqueueEverywhere({settings:this.settings,value:e})}},beta_updates:{get(){return this.settings.developer.beta_updates},set(e){this.setBetaUpdates({settings:this.settings,value:e})}},display_appointment_revisions:{get(){return this.settings.developer.display_appointment_revisions},set(e){this.setDisplayAppointmentRevisions({settings:this.settings,value:e})}},remove_data_on_uninstall:{get(){return this.settings.developer.remove_data_on_uninstall},set(e){this.setRemoveDataOnUninstall({settings:this.settings,value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{saveSettings(){this.saving=!0,this.updateDeveloperSettings().then((()=>this.fetchSettings())).then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")}))},checkBetaFeaturesArray(){this.showBetaUpdates&&this.betaFeatures.push("BetaUpdates"),this.betaFeatures.push("NewBookingApp"),this.betaFeatures.push("revisionsHistory")},onConfirm(){this.routerNext(),this.fetchSettings()},...(0,m.nv)(["fetchSettings"]),...(0,m.nv)("developer_settings",["updateDeveloperSettings"]),...(0,m.OI)("developer_settings",["setDisableAvailabilityCaching","setEnqueueEverywhere","setBetaUpdates","setBookingApiEmbed","setCapacityAvailability","setRemoveDataOnUninstall","setDisplayAppointmentRevisions"])}};const lG=(0,he.Z)(rG,[["render",oG]]);var sG=lG;const nG={class:"ssa-settings-developer-job"},dG={class:"md-title"},pG={class:"ssa-developer-job"},fG={class:"config"},uG={class:"purge_options"};function cG(e,t,i,a,l,s){const n=(0,o.up)("foxy-switch"),d=(0,o.up)("foxy-button");return(0,o.wg)(),(0,o.iD)("div",nG,[(0,o._)("h2",dG,(0,r.zw)(e.translations.settings.jobs.title),1),(0,o._)("h3",null,(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.title),1),(0,o._)("div",pG,[(0,o._)("div",fG,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.description),1),(0,o._)("div",uG,[(0,o.Wm)(n,{id:"purge_past_appointments",modelValue:l.jobs.purge_appointments.settings.purge_past_appointments,"onUpdate:modelValue":t[0]||(t[0]=e=>l.jobs.purge_appointments.settings.purge_past_appointments=e),name:"purge_past_appointments"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.settings.past_appointments),1)])),_:1},8,["modelValue"]),(0,o.Wm)(n,{id:"purge_abandoned_appointments",modelValue:l.jobs.purge_appointments.settings.purge_abandoned_appointments,"onUpdate:modelValue":t[1]||(t[1]=e=>l.jobs.purge_appointments.settings.purge_abandoned_appointments=e),name:"purge_abandoned_appointments"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.settings.abandoned_appointments),1)])),_:1},8,["modelValue"]),(0,o.Wm)(n,{id:"purge_past_canceled_appointments",modelValue:l.jobs.purge_appointments.settings.purge_past_canceled_appointments,"onUpdate:modelValue":t[2]||(t[2]=e=>l.jobs.purge_appointments.settings.purge_past_canceled_appointments=e),name:"purge_past_canceled_appointments"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.settings.past_canceled_appointments),1)])),_:1},8,["modelValue"]),(0,o.Wm)(n,{id:"purge_future_canceled_appointments",modelValue:l.jobs.purge_appointments.settings.purge_future_canceled_appointments,"onUpdate:modelValue":t[3]||(t[3]=e=>l.jobs.purge_appointments.settings.purge_future_canceled_appointments=e),name:"purge_future_canceled_appointments"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.settings.future_canceled_appointments),1)])),_:1},8,["modelValue"])])]),(0,o.Wm)(d,{mode:"raised",disabled:!l.jobs.purge_appointments.settings.purge_past_appointments&&!l.jobs.purge_appointments.settings.purge_abandoned_appointments&&!l.jobs.purge_appointments.settings.purge_past_canceled_appointments&&!l.jobs.purge_appointments.settings.purge_future_canceled_appointments,onClick:s.confirmPurge},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.action),1)])),_:1},8,["disabled","onClick"])])])}var hG={name:"SettingsDeveloperJobs",data(){return{jobs:{purge_appointments:{settings:{purge_past_appointments:!1,purge_abandoned_appointments:!1,purge_past_canceled_appointments:!1,purge_future_canceled_appointments:!1},modalOpen:!1}}}},computed:{...(0,m.rn)("translations",["translations"])},methods:{confirmPurge(){this.jobs.purge_appointments.modalOpen=!0,this.$emit("confirmPurge",{jobs:this.jobs})}}};const mG=(0,he.Z)(hG,[["render",cG]]);var gG=mG;const _G={key:0},yG={key:1,class:"dialog-icon"},wG={key:0,class:"icon"},xG={key:2,class:"dialog-content"},CG={class:"md-headline"},vG={key:3,class:"dialog-content"},bG=["href"],BG={key:4,class:"dialog-content"};function SG(e,t,i,a,l,s){const n=(0,o.up)("foxy-dialog-title"),d=(0,o.up)("foxy-progress-circular"),p=(0,o.up)("foxy-icon"),f=(0,o.up)("foxy-notification"),u=(0,o.up)("foxy-dialog-content"),c=(0,o.up)("foxy-dialog-button"),h=(0,o.up)("foxy-dialog-footer"),m=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.j4)(m,{ref:"purgeAppointmentsDialog",class:"ssa-developer-job-modal","onMdcdialog:closed":s.close},{default:(0,o.w5)((()=>[l.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(n,{key:0},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.title),1)])),_:1})),(0,o.Wm)(u,{class:(0,r.C_)(["purge-appointments",l.status])},{default:(0,o.w5)((()=>[l.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",_G,(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.text),1)),l.status?((0,o.wg)(),(0,o.iD)("div",yG,["loading"===l.status?((0,o.wg)(),(0,o.iD)("div",wG,[(0,o.Wm)(d,{indeterminate:""})])):(0,o.kq)("",!0),"success"===l.status?((0,o.wg)(),(0,o.j4)(p,{key:1,class:"icon md-size-4x",icon:"check_circle"})):(0,o.kq)("",!0),"error"===l.status?((0,o.wg)(),(0,o.j4)(p,{key:2,class:"icon md-size-4x",icon:"error",theme:"deep-orange"})):(0,o.kq)("",!0)])):(0,o.kq)("",!0),"loading"===l.status?((0,o.wg)(),(0,o.iD)("div",xG,[(0,o._)("h3",CG,(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.loading),1)])):(0,o.kq)("",!0),"success"===l.status?((0,o.wg)(),(0,o.iD)("div",vG,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.success),1),l.csv?((0,o.wg)(),(0,o.iD)("a",{key:0,href:l.csv,download:"",class:"link"},(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.download),9,bG)):(0,o.kq)("",!0)])):(0,o.kq)("",!0),"error"===l.status?((0,o.wg)(),(0,o.iD)("div",BG,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.error),1),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.errors,((e,t)=>((0,o.wg)(),(0,o.j4)(f,{key:t,theme:"red"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e),1)])),_:2},1024)))),128))])):(0,o.kq)("",!0)])),_:1},8,["class"]),"loading"!==l.status?((0,o.wg)(),(0,o.j4)(h,{key:1},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{action:"dismiss",class:"md-primary",onClick:s.close},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.close),1)])),_:1},8,["onClick"]),l.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(c,{key:0,mode:"raised",onClick:s.deleteAppointments},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.jobs.jobs.purge_appointments.modal.confirm),1)])),_:1},8,["onClick"]))])),_:1})):(0,o.kq)("",!0)])),_:1},8,["onMdcdialog:closed"])}var kG={name:"JobsPurgeAppointments",props:{modelValue:{default:()=>{},type:Object}},watch:{open(){this.open?(this.status=null,this.csv=null,this.errors=null,this.$refs.purgeAppointmentsDialog.open()):this.$refs.purgeAppointmentsDialog.close()},modelValue(){this.modelValue?.jobs?.purge_appointments&&(this.modelValue.jobs.purge_appointments.modalOpen&&(this.open=!0),this.settings=this.modelValue.jobs.purge_appointments.settings)}},data(){return{csv:null,status:null,errors:null,open:!1,settings:{}}},computed:{...(0,m.rn)("translations",["translations"])},methods:{close(){this.open=!1},deleteAppointments(){this.status="loading",this.purgeAppointments(this.settings).then((e=>{this.status="success",this.csv=e.file_url})).catch((e=>{this.status="error",this.errors=Array.isArray(e)?e:[e]}))},...(0,m.nv)("appointments",["purgeAppointments"])}};const AG=(0,he.Z)(kG,[["render",SG]]);var MG=AG,DG={name:"SettingsDeveloper",components:{SettingsHeader:zO,settingsDeveloperSettings:sG,settingsDeveloperJobs:gG,purgeAppointments:MG},props:{button:{default:"Save",type:String}},data(){return{currentTab:0,jobs:{},isSaveSettingsVisible:!1}},watch:{currentGuidesId(){this.getGuides({"ssasc-plugin-screen":this.currentGuidesId})}},mounted(){this.getGuides({"ssasc-plugin-screen":this.currentGuidesId})},computed:{currentGuidesId(){return 0===this.currentTab?K.developer_settings:K.developer_jobs},...(0,m.rn)("translations",["translations"])},methods:{onSettingsSaved(){this.isSaveSettingsVisible=!0},setCurrentTab(e){this.currentTab=e},handleConfirmPurge(e){this.jobs=e},...(0,m.nv)("guides",["getGuides"])}};const TG=(0,he.Z)(DG,[["render",RO]]);var OG=TG;const GG={class:"ssa-import-export"},EG={class:"export-settings"},UG={class:"md-checkbox-with-note"},FG={class:"md-checkbox-note"},IG={class:"md-checkbox-with-note"},zG={class:"md-checkbox-note"},PG={class:"md-checkbox-with-note"},VG={class:"md-checkbox-note"},WG={key:0,class:"md-checkbox-with-note",style:{"margin-left":"30px"}},RG={class:"md-checkbox-note"},LG={key:1,class:"md-checkbox-with-note",style:{"margin-left":"30px"}},jG={class:"md-checkbox-note"},qG={class:"button-bar align-right"},NG=["value"],$G={class:"import-settings"},HG={class:"import-alert"},ZG={key:0},YG={class:"button-bar align-right"};function KG(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-checkbox"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-progress-circular"),c=(0,o.up)("foxy-snackbar"),h=(0,o.up)("foxy-tab-item"),m=(0,o.up)("foxy-tabs"),g=(0,o.up)("settings-import-export-modal");return(0,o.wg)(),(0,o.iD)("div",GG,[(0,o.Wm)(d),(0,o.Wm)(m,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,{id:"export",label:e.translations.settings.import_export.tabs.export},{default:(0,o.w5)((()=>[(0,o._)("div",EG,[(0,o._)("div",UG,[(0,o.Wm)(p,{modelValue:s.exportFlagSettings,"onUpdate:modelValue":t[0]||(t[0]=e=>s.exportFlagSettings=e),label:e.translations.settings.import_export.options.settings.label},null,8,["modelValue","label"]),(0,o._)("p",FG,(0,r.zw)(e.translations.settings.import_export.options.settings.description),1)]),(0,o._)("div",IG,[(0,o.Wm)(p,{modelValue:s.exportFlagAppointmentTypes,"onUpdate:modelValue":t[1]||(t[1]=e=>s.exportFlagAppointmentTypes=e),label:e.translations.settings.import_export.options.appointment_types.label},null,8,["modelValue","label"]),(0,o._)("p",zG,(0,r.zw)(e.translations.settings.import_export.options.appointment_types.description),1)]),(0,o._)("div",PG,[(0,o.Wm)(p,{modelValue:s.exportFlagAppointments,"onUpdate:modelValue":t[2]||(t[2]=e=>s.exportFlagAppointments=e),label:e.translations.settings.import_export.options.appointments.label},null,8,["modelValue","label"]),(0,o._)("p",VG,(0,r.zw)(e.translations.settings.import_export.options.appointments.description),1),s.exportFlagAppointments?((0,o.wg)(),(0,o.iD)("div",WG,[(0,o.Wm)(p,{modelValue:s.anonymizeExport,"onUpdate:modelValue":t[3]||(t[3]=e=>s.anonymizeExport=e),label:e.translations.settings.import_export.options.anonymize.label},null,8,["modelValue","label"]),(0,o._)("p",RG,(0,r.zw)(e.translations.settings.import_export.options.anonymize.description),1)])):(0,o.kq)("",!0),s.exportFlagAppointments?((0,o.wg)(),(0,o.iD)("div",LG,[(0,o.Wm)(p,{modelValue:s.futureAppointmentsOnly,"onUpdate:modelValue":t[4]||(t[4]=e=>s.futureAppointmentsOnly=e),label:e.translations.settings.import_export.options.future_appointments_only.label},null,8,["modelValue","label"]),(0,o._)("p",jG,(0,r.zw)(e.translations.settings.import_export.options.future_appointments_only.description),1)])):(0,o.kq)("",!0)])]),(0,o._)("div",qG,[(0,o.Wm)(f,{mode:"raised",onClick:n.generateExportCode},{default:(0,o.w5)((()=>[s.generatingCode?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.generate_button_loading),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.generate_button),1)],64))])),_:1},8,["onClick"]),s.generatingCode?((0,o.wg)(),(0,o.j4)(u,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)]),(0,o.wy)((0,o._)("div",null,[(0,o._)("textarea",{class:"export-code",readonly:"",value:JSON.stringify(n.exportCode,null,2),ref:"exportCodeArea",onClick:t[5]||(t[5]=(...e)=>n.selectCode&&n.selectCode(...e)),onFocus:t[6]||(t[6]=(...e)=>n.selectCode&&n.selectCode(...e))},null,40,NG),(0,o._)("p",null,[(0,o.Wm)(f,{class:"copy-code-trigger",onClick:n.copyExportCode,"trailing-icon":"file_copy"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.copy),1)])),_:1},8,["onClick"]),(0,o.Wm)(f,{class:"send-code-trigger",onClick:n.sendExportCode,"trailing-icon":"send","progress-circular":s.sendingToSupport},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.send_to_support),1)])),_:1},8,["onClick","progress-circular"])])],512),[[a.F8,s.showCode]]),(0,o.Wm)(c,{position:"top center",modelValue:s.isExportCodeNoticeVisible,"onUpdate:modelValue":t[7]||(t[7]=e=>s.isExportCodeNoticeVisible=e),message:e.translations.settings.import_export.copied},null,8,["modelValue","message"]),(0,o.Wm)(c,{position:"top center",modelValue:s.isExportCodeSentToSupportVisible,"onUpdate:modelValue":t[8]||(t[8]=e=>s.isExportCodeSentToSupportVisible=e),message:e.translations.settings.import_export.send_to_support_success},null,8,["modelValue","message"])])),_:1},8,["label"]),(0,o.Wm)(h,{id:"import",label:e.translations.settings.import_export.tabs.import},{default:(0,o.w5)((()=>[(0,o._)("div",$G,[(0,o._)("h3",null,(0,r.zw)(e.translations.settings.import_export.import_headline),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.import_export.import_copy),1),(0,o.wy)((0,o._)("div",HG,[s.importCodeIsValid?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",ZG,(0,r.zw)(e.translations.settings.import_export.import_invalid_json_notice),1))],512),[[a.F8,!s.importCodeIsValid]]),(0,o.wy)((0,o._)("textarea",{class:"export-code","onUpdate:modelValue":t[9]||(t[9]=e=>s.importCode=e)},null,512),[[a.nr,s.importCode]]),(0,o._)("div",YG,[(0,o.Wm)(f,{mode:"raised",class:"md-primary",id:"import-btn",disabled:!s.importCodeIsValid||!s.importCode,onClick:n.processImportCode},{default:(0,o.w5)((()=>[s.importingCode?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.import_button_loading),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.import_button),1)],64))])),_:1},8,["disabled","onClick"]),s.importingCode?((0,o.wg)(),(0,o.j4)(u,{key:0,indeterminate:""})):(0,o.kq)("",!0)])])])),_:1},8,["label"])])),_:1}),(0,o.Wm)(g,{loading:s.importingCode,status:s.importStatus,response:s.importStatusResponse},null,8,["loading","status","response"])])}const JG={class:"import-dialog-icon"},XG={key:0,class:"icon"},QG={key:0,class:"import-dialog-content"},eE={class:"md-headline"},tE={key:1,class:"import-dialog-content"},iE=["innerHTML"],aE={key:2,class:"import-dialog-content"},oE={class:"md-headline"},rE={class:"import-dialog-errors"},lE=["innerHTML"];function sE(e,t,i,a,l,s){const n=(0,o.up)("foxy-progress-circular"),d=(0,o.up)("foxy-icon"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-dialog-content"),u=(0,o.up)("foxy-dialog-button"),c=(0,o.up)("foxy-dialog-footer"),h=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.j4)(h,{ref:"modal","foxy-click-outside-to-close":!1,"foxy-esc-to-close":!1,class:"ssa-import-export-modal"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{class:(0,r.C_)(i.status),style:{"text-align":"center"}},{default:(0,o.w5)((()=>[(0,o._)("div",JG,[i.loading?((0,o.wg)(),(0,o.iD)("div",XG,[(0,o.Wm)(n,{indeterminate:""})])):(0,o.kq)("",!0),i.loading||"error"===i.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:1,class:"icon md-size-3x",icon:"check_circle"})),i.loading||"error"!==i.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:2,class:"icon md-size-3x",icon:"error"}))]),i.loading?((0,o.wg)(),(0,o.iD)("div",QG,[(0,o._)("h3",eE,(0,r.zw)(e.translations.settings.import_export.import_button_loading),1)])):(0,o.kq)("",!0),i.loading||"error"===i.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("div",tE,[(0,o._)("h3",{class:"md-headline",innerHTML:i.response},null,8,iE),(0,o.Wm)(p,{onClick:s.refresh},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.import_export.import_success_redirect),1)])),_:1},8,["onClick"])])),i.loading||"error"!==i.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("div",aE,[(0,o._)("h3",oE,(0,r.zw)(e.translations.settings.import_export.import_error_status_notice),1),(0,o._)("div",rE,[(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(i.response,((e,t)=>((0,o.wg)(),(0,o.iD)("li",{key:t,innerHTML:e},null,8,lE)))),128))])])]))])),_:1},8,["class"]),i.loading||"error"!==i.status?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(c,{key:0},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{action:"dismiss",class:"md-primary",onClick:s.close},{default:(0,o.w5)((()=>[(0,o.Uk)(" Close ")])),_:1},8,["onClick"])])),_:1}))])),_:1},512)}var nE={name:"SettingsImportExportModal",props:["status","response","loading"],computed:{...(0,m.rn)("translations",["translations"])},methods:{refresh(){window.location.reload()},close(){this.$refs.modal.close()}},watch:{loading(){this.$refs.modal.open()}}};const dE=(0,he.Z)(nE,[["render",sE]]);var pE=dE,fE={name:"SettingsImportExport",components:{SettingsHeader:zO,settingsImportExportModal:pE},data(){return{anonymizeExport:!1,futureAppointmentsOnly:!1,generatingCode:!1,showCode:!1,importCode:null,importCodeIsValid:!0,importingCode:!1,importStatus:null,importStatusResponse:null,exportFlagSettings:!1,exportFlagAppointmentTypes:!1,exportFlagAppointments:!1,sendingToSupport:!1,exportMessagePayload:{},isExportCodeNoticeVisible:!1,isExportCodeSentToSupportVisible:!1}},mounted(){Object.prototype.hasOwnProperty.call(this.exportMessagePayload,"reply_to")&&this.exportMessagePayload.reply_to||(this.exportMessagePayload.reply_to=this.settings.global.admin_email,this.getGuides({"ssasc-plugin-screen":K.import_export}))},watch:{exportFlagSettings(){this.exportFlagSettings||(this.exportFlagAppointmentTypes=!1,this.exportFlagAppointments=!1)},exportFlagAppointmentTypes(){this.exportFlagAppointmentTypes?this.exportFlagSettings=!0:this.exportFlagAppointments=!1},exportFlagAppointments(){this.exportFlagAppointments&&(this.exportFlagSettings=!0,this.exportFlagAppointmentTypes=!0)},importCode(){this.validateImportCode()}},computed:{exportCode(){return JSON.stringify(this.exportCode)},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","api"]),...(0,m.rn)("import_export",["exportCode"])},methods:{generateExportCode(){const e={settings:this.exportFlagSettings,appointment_types:this.exportFlagAppointmentTypes,appointments:this.exportFlagAppointments,anonymize_customer_information:this.anonymizeExport,future_appointments_only:this.futureAppointmentsOnly};this.generatingCode=!0,this.fetchExportCode(e).then((()=>{this.generatingCode=!1,this.showCode=!0}))},sendExportCode(){Object.prototype.hasOwnProperty.call(this.settings,"license")&&(this.exportMessagePayload.license=this.settings.license.license_filtered),Object.prototype.hasOwnProperty.call(this.api,"site_url")&&(this.exportMessagePayload.site_url=this.api.site_url),this.exportMessagePayload.reply_to=this.settings.global.admin_email,this.exportMessagePayload.export_code=JSON.stringify(this.exportCode),this.exportMessagePayload.message=this.translations.settings.import_export.send_to_support_message,this.sendingToSupport=!0,this.sendSupportMessage(this.exportMessagePayload).then((()=>{this.sendingToSupport=!1,this.isExportCodeSentToSupportVisible=!0}))},selectCode(){this.$refs.exportCodeArea.select()},copyExportCode(){this.$refs.exportCodeArea.select(),document.execCommand("copy"),this.isExportCodeNoticeVisible=!0},validateImportCode(){if(!this.importCode||""===this.importCode)return this.importCodeIsValid=!0,void(this.importStatus=null);this.importCodeIsValid=this.isValidJSON(this.importCode),this.importCodeIsValid?this.importStatus=null:this.importStatus="error"},isValidJSON(e){try{const t=JSON.parse(e);return"object"===typeof t}catch(t){return!1}},async processImportCode(){this.importingCode=!0,this.importStatus=null,this.importStatusResponse=null;const e={settings:!0,appointment_types:!0,appointments:!0,anonymize_customer_information:!1};await this.fetchExportCode(e);try{const e=await this.importJSONCode(this.importCode);this.importingCode=!1,this.importStatus="success",this.importStatusResponse=e,setTimeout((()=>{window.location.reload()}),3e3)}catch(t){this.importingCode=!1,this.importStatus="error",this.importStatusResponse=t}},...(0,m.nv)("guides",["getGuides"]),...(0,m.nv)("import_export",["fetchExportCode","importJSONCode","sendSupportMessage"])}};const uE=(0,he.Z)(fE,[["render",KG]]);var cE=uE;const hE={class:"contrast-calc"},mE={key:2,class:"contrast-warn-text"},gE={label:"System Fonts"},_E=["value"],yE={label:"Google Fonts"},wE=["value"],xE={class:"md-helper-text"},CE={class:"link",style:{"text-decoration":"auto"},href:"https://fonts.google.com/",target:"_blank"},vE={key:0},bE={class:"flex-gap-7 button-bar align-right"};function BE(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("color-picker"),f=(0,o.up)("foxy-icon"),u=(0,o.up)("foxy-select2"),c=(0,o.up)("foxy-input-container"),h=(0,o.up)("foxy-textfield"),m=(0,o.up)("foxy-switch"),g=(0,o.up)("foxy-button"),_=(0,o.up)("CodeEditor"),y=(0,o.up)("foxy-progress-circular"),w=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{novalidate:"",onSubmit:t[6]||(t[6]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[(0,o.Wm)(d),(0,o.Wm)(p,{label:e.translations.settings.styles.accentColor,modelValue:n.accent_color,"onUpdate:modelValue":t[0]||(t[0]=e=>n.accent_color=e),disabled:s.saving},null,8,["label","modelValue","disabled"]),(0,o.Wm)(p,{label:e.translations.settings.styles.backgroundColor,modelValue:n.background_color,"onUpdate:modelValue":t[1]||(t[1]=e=>n.background_color=e),disabled:s.saving},null,8,["label","modelValue","disabled"]),(0,o._)("p",hE,[(0,o._)("span",null,(0,r.zw)(e.translations.settings.styles.contractRatio)+": ",1),(0,o._)("span",{class:"contrast",style:(0,r.j5)({color:n.accent_color,background:n.background_color,padding:"3px"})}," Aa ",4),(0,o.Uk)(" "+(0,r.zw)(n.AccentBackContrast)+" ",1),n.lowContratRatio?((0,o.wg)(),(0,o.j4)(f,{key:0,theme:"deep-orange",icon:"error_outline"})):((0,o.wg)(),(0,o.j4)(f,{key:1,theme:"green",icon:"check_circle"})),n.AccentBackContrastWarn?((0,o.wg)(),(0,o.iD)("span",mE,(0,r.zw)(n.AccentBackContrastWarn),1)):(0,o.kq)("",!0)]),(0,o.Wm)(c,{class:"no-after"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{label:e.translations.settings.styles.font,style:{width:"100%"},name:"font",id:"font",modelValue:n.font,"onUpdate:modelValue":t[2]||(t[2]=e=>n.font=e),disabled:s.saving,required:""},{default:(0,o.w5)((()=>[(0,o._)("optgroup",gE,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.systemFonts,((e,t)=>((0,o.wg)(),(0,o.iD)("option",{value:e,key:t},(0,r.zw)(t),9,_E)))),128))]),(0,o._)("optgroup",yE,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.googleFontList,(e=>((0,o.wg)(),(0,o.iD)("option",{value:e,key:e},(0,r.zw)(e),9,wE)))),128))])])),_:1},8,["label","modelValue","disabled"]),(0,o._)("span",xE,[(0,o._)("a",CE,(0,r.zw)(e.translations.settings.styles.googleFonts),1)])])),_:1}),(0,o.Wm)(h,{modelValue:n.padding,"onUpdate:modelValue":t[3]||(t[3]=e=>n.padding=e),disabled:s.saving,required:"",label:e.translations.settings.styles.padding,helptext:n.padding.length<1?e.translations.settings.styles.requiredPadding:e.translations.settings.styles.cssUnits,"helptext-persistent":"","helptext-validation":"",valid:n.padding.length>=1},null,8,["modelValue","disabled","label","helptext","valid"]),n.low_opacity_bg?((0,o.wg)(),(0,o.iD)("div",vE,[(0,o.Wm)(m,{id:"contrast",modelValue:n.contrast,"onUpdate:modelValue":t[4]||(t[4]=e=>n.contrast=e),disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.styles.contrast)+" ("+(0,r.zw)(e.translations.settings.styles.contrastHelper)+") ",1)])),_:1},8,["modelValue","disabled"])])):(0,o.kq)("",!0),(0,o._)("div",null,[(0,o.Wm)(g,{"data-test":"test-toggle-custom-css",theme:"black",class:"md-primary md-dense",onClick:n.toggleCustomCSS},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.styles.customCSS),1)])),_:1},8,["onClick"]),s.viewCSS?((0,o.wg)(),(0,o.j4)(_,{key:0,"data-test":"test-ssa-styles-custom-css",style:{"margin-top":"8px"},modelValue:n.css,"onUpdate:modelValue":t[5]||(t[5]=e=>n.css=e),theme:"panda-syntax-light","font-size":"14px",width:"100%","line-nums":!0,languages:[["css","CSS"]]},null,8,["modelValue"])):(0,o.kq)("",!0)]),(0,o._)("div",bE,[(0,o.Wm)(g,{"data-test":"test-reset-to-default",mode:"secondary",onClick:n.confirmReset},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.styles.reset),1)])),_:1},8,["onClick"]),(0,o.Wm)(g,{"data-test":"test-save-styles",mode:"raised",class:"md-primary",onClick:n.saveStyles,disabled:s.saving},{default:(0,o.w5)((()=>[s.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)],64))])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(y,{key:0,indeterminate:"",medium:""})):(0,o.kq)("",!0)])],32),(0,o.Wm)(w,{ref:"confirmLeaveDirty",title:e.translations.settings.general.confirmTitle,"content-html":e.translations.settings.general.confirmContent,"ok-text":e.translations.general.ok,"cancel-text":e.translations.general.cancel,onConfirm:n.onDirtyConfirm},null,8,["title","content-html","ok-text","cancel-text","onConfirm"]),(0,o.Wm)(w,{"data-test":"test-confirm-reset-settings-modal",ref:"confirmReset",title:e.translations.settings.styles.confirmTitle,"content-html":e.translations.settings.styles.confirmContent,"ok-text":e.translations.general.ok,"cancel-text":e.translations.general.cancel,onConfirm:n.onResetConfirm},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}function SE(e,t,i,l,s,n){const d=(0,o.up)("foxy-textfield"),p=(0,o.up)("chrome"),f=(0,o.up)("foxy-dialog-content"),u=(0,o.up)("foxy-dialog-button"),c=(0,o.up)("foxy-dialog-footer"),h=(0,o.up)("foxy-dialog");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("div",{class:"color-picker-container",onClick:t[1]||(t[1]=(...e)=>n.pickColor&&n.pickColor(...e))},[(0,o._)("span",{class:"color-sample","data-test":"test-color-sample",style:(0,r.j5)("background-color:"+n.rgba)},null,4),(0,o.Wm)(d,{label:i.label,readonly:"",modelValue:n.displayValue,"onUpdate:modelValue":t[0]||(t[0]=e=>n.displayValue=e),required:"",onKeydown:[(0,a.D2)((0,a.iM)(n.pickColor,["prevent"]),["enter"]),(0,a.D2)((0,a.iM)(n.pickColor,["prevent"]),["space"])],onClick:n.pickColor,disabled:i.disabled,style:{padding:"0",margin:"0"}},null,8,["label","modelValue","onKeydown","onClick","disabled"])]),(0,o.Wm)(h,{ref:"colorPicker",class:"color-picker"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{modelValue:s.colors,"onUpdate:modelValue":t[2]||(t[2]=e=>s.colors=e)},null,8,["modelValue"])])),_:1}),(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u,{action:"accept",onClick:n.closePicker},{default:(0,o.w5)((()=>[(0,o.Uk)(" OK ")])),_:1},8,["onClick"])])),_:1})])),_:1},512)])}var kE=i(65093),AE={name:"ColorPicker",props:{modelValue:{type:String,default:""},label:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],components:{Chrome:kE.Z},data(){return{colors:""}},beforeMount(){this.colors=this.modelValue},watch:{colors:function(){this.updateValue()},modelValue:function(e){e&&(this.colors=this.modelValue)}},computed:{rgba(){if("string"===typeof this.colors)return this.colors;{let e=[this.colors.rgba.r,this.colors.rgba.g,this.colors.rgba.b,this.colors.rgba.a],t="rgba(";return t+=e.join(","),t+=")",t}},displayValue:{get(){if("string"===typeof this.colors){let e=this.colors.substring(this.colors.indexOf("(")).split(","),t=parseInt(e[0].substring(1).trim(),10),i=parseInt(e[1].trim(),10),a=parseInt(e[2].trim(),10),o=parseFloat(e[3].substring(0,e[3].length-1).trim()).toFixed(2);return"#"+t.toString(16)+i.toString(16)+a.toString(16)+" ("+(100*o).toString(10)+"%)"}return this.colors.hex+" ("+parseInt(100*this.colors.rgba.a)+"%)"},set(){}}},methods:{pickColor(){this.disabled||this.$refs.colorPicker.open()},closePicker(){this.$refs.colorPicker.close()},updateValue(){this.$emit("update:modelValue",this.rgba)}}};const ME=(0,he.Z)(AE,[["render",SE]]);var DE=ME,TE=(i(37592),i(28162));function OE(e){return e/=255,e<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function GE(e){const t=OE(e[0]),i=OE(e[1]),a=OE(e[2]);return.2126*t+.7152*i+.0722*a}function EE(e,t){return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)}function UE(e,t){const i=e[3];return[(1-i)*t[0]+i*e[0],(1-i)*t[1]+i*e[1],(1-i)*t[2]+i*e[2],1]}function FE(e){if("string"===typeof e&&e.includes("rgba"))return e.split("(")[1].split(")")[0].split(",").map(Number)}const IE=(e,t)=>{if(e=FE(e),t=FE(t),!e||!t)return void console.error("checkContrast invalid params");const i=[255,255,255,1],a=UE(t,i),o=UE(e,a),r=GE(o),l=GE(a),s=EE(r,l);return parseFloat(s.toFixed(2))};var zE={name:"SettingsStyle",store:$J,components:{SettingsHeader:zO,ColorPicker:DE,CodeEditor:TE.Z},data(){return{saving:!1,dirty:!1,viewCSS:!1,systemFonts:z,routerNext:null}},beforeMount(){this.mergeDefaultStyles(this.settings)},mounted(){this.getGuides({"ssasc-plugin-screen":K.styles})},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{accent_color:function(e,t){e!==t&&(this.dirty=!0)},background_color:function(e,t){e!==t&&(this.dirty=!0)},contrast:function(e,t){e!==t&&(this.dirty=!0)},font:function(e,t){e!==t&&(this.dirty=!0)},padding:function(e,t){e!==t&&(this.dirty=!0)}},computed:{accent_color:{get(){return this.settings.styles.accent_color},set(e){this.updateAccentColor({value:e,settings:this.settings})}},background_color:{get(){return this.settings.styles.background},set(e){e.split("(")[1].split(")")[0].split(",")[3]>.2&&this.updateContrast({value:!1,settings:this.settings}),this.updateBackgroundColor({value:e,settings:this.settings})}},low_opacity_bg:{get(){return this.settings.styles.background.split("(")[1].split(")")[0].split(",")[3]<=.2}},contrast:{get(){return this.settings.styles.contrast},set(e){this.updateContrast({value:e,settings:this.settings})}},font:{get(){return this.settings.styles.font},set(e){this.updateFont({value:e,settings:this.settings})}},padding:{get(){return this.settings.styles.padding},set(e){this.updatePadding({value:e,settings:this.settings})}},css:{get(){return this.settings.styles.css?this.settings.styles.css:"/* "+this.translations.settings.styles.cssComment+" */"},set(e){this.setCss({value:e,settings:this.settings})}},AccentBackContrast(){return IE(this.accent_color,this.background_color)},AccentBackContrastWarn(){return this.lowContratRatio?this.translations.settings.styles.lowContractRatioWarn:this.translations.settings.styles.highContractRatioTxt},lowContratRatio(){return this.AccentBackContrast<3},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("styles",["googleFontList"])},methods:{confirmReset(){this.$refs["confirmReset"].open()},saveStyles(){this.padding&&(this.saving=!0,this.updateStyles().then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")})))},toggleCustomCSS(){this.viewCSS=!this.viewCSS},onDirtyConfirm(){this.routerNext(),this.fetchSettings()},onResetConfirm(){this.resetStyles(this.settings)},...(0,m.nv)(["fetchSettings"]),...(0,m.OI)("styles",["mergeDefaultStyles","updateAccentColor","updateBackgroundColor","updateContrast","updateFont","updatePadding","setCss","resetStyles"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.nv)("styles",["updateStyles"])}};const PE=(0,he.Z)(zE,[["render",BE]]);var VE=PE;const WE=["value"],RE={style:{"padding-left":"1rem",display:"flex","align-items":"end"}},LE={class:"md-title"},jE={class:"foxy-table translations-table"},qE=["href"],NE={class:"screen-reader-text"},$E={class:"screen-reader-text"};function HE(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-select2"),f=(0,o.up)("foxy-layout"),u=(0,o.up)("foxy-button"),c=(0,o.up)("foxy-progress-circular"),h=(0,o.up)("foxy-icon"),m=(0,o.up)("foxy-icon-button");return(0,o.wg)(),(0,o.iD)("form",{novalidate:"",onSubmit:t[1]||(t[1]=(0,a.iM)(((...e)=>n.handleSubmit&&n.handleSubmit(...e)),["stop","prevent"]))},[(0,o.Wm)(d),(0,o._)("p",null,(0,r.zw)(e.translations.settings.translations.description),1),n.uninstalledLanguagePacks.length>0?((0,o.wg)(),(0,o.j4)(f,{key:0,"md-vertical-align":"center"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{style:{flex:"1"}},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{style:{"min-width":"100%"},label:e.translations.settings.translations.selectPack,name:"translationPack",disabled:s.saving,id:"translationPack",modelValue:s.pack,"onUpdate:modelValue":t[0]||(t[0]=e=>s.pack=e)},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.uninstalledLanguagePacks,(e=>((0,o.wg)(),(0,o.iD)("option",{value:e.locale,key:e.locale},(0,r.zw)(n.displayLanguage(e.locale)),9,WE)))),128))])),_:1},8,["label","disabled","modelValue"])])),_:1}),(0,o.Wm)(f,{style:{"padding-left":"1rem"}},{default:(0,o.w5)((()=>[(0,o._)("div",RE,[(0,o.Wm)(u,{type:"submit",disabled:s.saving,mode:"raised",class:"md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.translations.fetchInstall),1)])),_:1},8,["disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(c,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])])),_:1})])),_:1})):(0,o.kq)("",!0),n.showTable?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o._)("h3",LE,(0,r.zw)(e.translations.settings.translations.installedTranslations),1),(0,o._)("div",jE,[(0,o._)("table",{class:(0,r.C_)({"saving-fade":s.saving})},[(0,o._)("thead",null,[(0,o._)("tr",null,[(0,o._)("th",null,(0,r.zw)(e.translations.settings.translations.languagePack),1),(0,o._)("th",null,(0,r.zw)(e.translations.settings.translations.lastUpdated),1)])]),(0,o._)("tbody",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.settings.translation.locales,((t,i)=>((0,o.wg)(),(0,o.iD)("tr",{key:i},[(0,o._)("td",null,[(0,o._)("div",null,(0,r.zw)(n.displayLanguage(i)),1),(0,o._)("div",null,[(0,o._)("a",{class:"link",href:n.improveLink(t,i),target:"_blank"},(0,r.zw)(e.translations.settings.translations.improveTranslation),9,qE)])]),(0,o._)("td",null,[(0,o.Uk)((0,r.zw)(s.moment.utc(t.last_fetched_date,e.timestampFormat).tz(e.settings.global.timezone_string).format(e.settings.global.date_format_moment+" "+e.settings.global.time_format_moment))+" ",1),(0,o._)("div",null,[(0,o.Wm)(m,{onClick:e=>n.deleteLanguage(i),disabled:s.saving,theme:"deep-orange"},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"delete"}),(0,o._)("span",NE,(0,r.zw)(e.translations.settings.translations.remove)+" "+(0,r.zw)(n.displayLanguage(i)),1)])),_:2},1032,["onClick","disabled"]),(0,o.Wm)(m,{onClick:e=>n.refreshLanguagePack(i),disabled:s.saving,class:"md-primary"},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"refresh"}),(0,o._)("span",$E,(0,r.zw)(e.translations.settings.translations.refresh)+" "+(0,r.zw)(n.displayLanguage(i)),1)])),_:2},1032,["onClick","disabled"])])])])))),128))])],2)])],64)):(0,o.kq)("",!0)],32)}var ZE={name:"SettingsTranslations",components:{SettingsHeader:zO},data(){return{moment:fe(),pack:null,saving:!1,translationPacks:R}},mounted(){this.getGuides({"ssasc-plugin-screen":K.translations})},computed:{showTable(){return!wa().isEmpty(this.settings.translation.locales)},uninstalledLanguagePacks(){return this.translationPacks.filter((e=>!Object.prototype.hasOwnProperty.call(this.settings.translation.locales,e.locale)))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["timestampFormat","settings"])},methods:{displayLanguage(e){let t=this.translationPacks.find((t=>t.locale===e));return t.title===t.title_localized?t.title:t.title+" / "+t.title_localized},handleSubmit(){this.pack&&(this.saving=!0,this.fetchLanguagePack(this.pack).then((()=>{this.refreshLanguageTable()})).catch((e=>{console.log(e),this.saving=!1})))},improveLink(e,t){if(e.translation_url)return e.translation_url;let i=t.split("_");i=i.map((e=>e.toLowerCase()));let a=i[0]===i[1]?i[0]:i.join("-");return"https://translate.wordpress.org/projects/wp-plugins/simply-schedule-appointments/dev/"+a+"/default/"},refreshLanguagePack(e){this.saving=!0,this.fetchLanguagePack(e).then((()=>{this.refreshLanguageTable()})).catch((e=>{console.log(e),this.saving=!1}))},refreshLanguageTable(){this.fetchTranslationSettings().then((()=>{this.saving=!1,this.pack=null,location.reload()})).catch((e=>{console.log(e)}))},deleteLanguage(e){this.deleteLanguagePack(e).then((()=>{this.refreshLanguageTable(),this.saving=!1})).catch((e=>{console.log(e)}))},...(0,m.nv)("translations",["fetchLanguagePack","fetchTranslationSettings","deleteLanguagePack"]),...(0,m.nv)("guides",["getGuides"])}};const YE=(0,he.Z)(ZE,[["render",HE]]);var KE=YE;const JE={class:"google-calendar-settings"};function XE(e,t,i,a,r,l){const s=(0,o.up)("settings-header"),n=(0,o.up)("google-calendar-auth"),d=(0,o.up)("google-calendar-list"),p=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",JE,[i.header?((0,o.wg)(),(0,o.j4)(s,{key:0})):(0,o.kq)("",!0),e.settings.google_calendar.enabled||i.showDisabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[l.account_authorized?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(n,{key:0})),l.account_authorized?((0,o.wg)(),(0,o.j4)(d,{key:1})):(0,o.kq)("",!0)],64)):((0,o.wg)(),(0,o.j4)(p,{key:2}))])}const QE=e=>((0,o.dD)("data-v-3d810d0c"),e=e(),(0,o.Cn)(),e),eU={key:0},tU={class:"button-bar justify-center"},iU=["src"],aU=QE((()=>(0,o._)("hr",null,null,-1))),oU={class:"button-bar align-right"};function rU(e,t,i,l,s,n){const d=(0,o.up)("loading"),p=(0,o.up)("router-link"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-textfield"),c=(0,o.up)("foxy-progress-circular");return s.saving?((0,o.wg)(),(0,o.j4)(d,{key:0,message:e.translations.general.saving},null,8,["message"])):n.preset_gcal_mode?((0,o.wg)(),(0,o.iD)("form",{key:1,onSubmit:t[1]||(t[1]=(0,a.iM)((()=>{}),["prevent"]))},[e.settings.google_calendar?.quick_connect_gcal_mode&&"valid"!=e.settings.license?.license_status?((0,o.wg)(),(0,o.iD)("p",eU,[(0,o._)("span",null,(0,r.zw)(e.translations.settings.google_calendar.quickConnectRequiresLicense),1),e.settings.license.license_show_settings?((0,o.wg)(),(0,o.j4)(p,{key:0,class:"link",to:"/ssa/settings/license"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.complete.settings),1)])),_:1})):(0,o.kq)("",!0)])):(0,o.kq)("",!0),(0,o._)("div",tU,[(0,o.Wm)(f,{tabindex:"0",mode:"raised",class:(0,r.C_)(["google-button",{disabled:s.saving||e.settings.google_calendar?.quick_connect_gcal_mode&&"valid"!=e.settings.license?.license_status}]),onClick:n.googleQuickConnectAuth,disabled:s.saving||e.settings.google_calendar?.quick_connect_gcal_mode&&"valid"!=e.settings.license?.license_status},{default:(0,o.w5)((()=>[(0,o._)("img",{src:e.$store.state.api.admin_static_url+"/images/google-calendar-branding/btn_google_dark_normal_ios.svg",alt:""},null,8,iU),(0,o.Uk)(" "+(0,r.zw)(n.authorize_button_text),1)])),_:1},8,["onClick","disabled","class"])]),e.settings.google_calendar?.quick_connect_gcal_mode?((0,o.wg)(),(0,o.iD)("p",{key:1,class:"align-center link",onClick:t[0]||(t[0]=(...e)=>n.switchToManualGcalSetup&&n.switchToManualGcalSetup(...e))},(0,r.zw)(e.translations.settings.google_calendar.manualSetup),1)):(0,o.kq)("",!0)],32)):((0,o.wg)(),(0,o.iD)("form",{key:2,novalidate:"",onSubmit:t[5]||(t[5]=(0,a.iM)(((...e)=>n.saveSettings&&n.saveSettings(...e)),["stop","prevent"]))},[(0,o._)("p",null,[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.enterApi)+" ",1),(0,o._)("span",{class:"link",onClick:t[2]||(t[2]=(...e)=>n.switchToQuickConnectGcalSetup&&n.switchToQuickConnectGcalSetup(...e))},(0,r.zw)(e.translations.settings.google_calendar.quickConnectSetup),1)]),(0,o.Wm)(f,{class:"button-link",href:"https://simplyscheduleappointments.com/document/getting-your-client-id-and-client-secret-from-google/",target:"_blank",mode:"raised"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.wizard.googleCalendar.showMeHow),1)])),_:1}),aU,(0,o.Wm)(u,{modelValue:s.v$.client_id.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>s.v$.client_id.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.google_calendar.clientId,helptext:s.v$.client_id.$invalid&&s.v$.client_id.$dirty?e.translations.wizard.googleCalendar.clientIdError:"","helptext-persistent":"","helptext-validation":"",required:"",id:"client_id",onChange:n.clientIdCheck,disabled:s.saving,valid:!s.v$.client_id.$invalid||!s.v$.client_id.$dirty},null,8,["modelValue","label","helptext","onChange","disabled","valid"]),(0,o.Wm)(u,{modelValue:s.v$.client_secret.$model,"onUpdate:modelValue":t[4]||(t[4]=e=>s.v$.client_secret.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.google_calendar.clientSecret,helptext:s.v$.client_secret.$invalid&&s.v$.client_secret.$dirty?e.translations.wizard.googleCalendar.clientSecretError:"","helptext-persistent":"","helptext-validation":"",required:"",id:"client_secret",onChange:n.clientSecretCheck,disabled:s.saving,valid:!s.v$.client_secret.$invalid||!s.v$.client_secret.$dirty},null,8,["modelValue","label","helptext","onChange","disabled","valid"]),(0,o._)("div",oU,[(0,o.Wm)(f,{class:"md-primary",mode:"raised",onClick:n.saveSettings,disabled:s.saving},{default:(0,o.w5)((()=>[s.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.saveAuthorize),1)],64))])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(c,{key:0,indeterminate:""})):(0,o.kq)("",!0)])],32))}var lU={name:"SettingsGoogleCalendarAuth",data(){return{v$:(0,Rd.Xw)(),needHelp:!1,saving:!1,filtered_gcal_values:!1}},validations:{client_id:{required:Ld.C1},client_secret:{required:Ld.C1}},mounted(){this.set_filtered_gcal_values()},computed:{client_id:{get(){return this.settings.google_calendar.client_id},set(e){this.updateGoogleCalendarClientId({settings:this.settings,value:e})}},client_secret:{get(){return this.settings.google_calendar.client_secret},set(e){this.updateGoogleCalendarClientSecret({settings:this.settings,value:e})}},authorize_button_text(){return this.preset_gcal_mode?this.translations.settings.google_calendar.googleAuthorize:this.translations.settings.google_calendar.saveAuthorize},preset_gcal_mode(){return this.settings.google_calendar?.quick_connect_gcal_mode||this.filtered_gcal_values},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings","router"]),...(0,m.rn)("google_calendar",["googleAuthUrl"])},methods:{switchToManualGcalSetup(){this.saving=!0,this.switchToManualSetup().then((()=>{this.saving=!1}))},switchToQuickConnectGcalSetup(){this.saving=!0,this.switchToQuickConnectSetup().then((()=>{this.saving=!1}))},clientIdCheck(){this.$emit("clientidcheck",this.client_id.length>0)},clientSecretCheck(){this.$emit("clientsecretcheck",this.client_secret.length>0)},googleQuickConnectAuth(){this.saving=!0;const e=window.ssa_is_embed?window.top.location.href:window.location.hostname+window.location.pathname;this.googleCalendarAuth({ssa_redirect:this.$route.path,ssa_base_url:e}).then((()=>{this.saving=!1,window.ssa_is_embed?window.top.location.href=this.googleAuthUrl:window.location.href=this.googleAuthUrl}))},saveSettings(){if(this.v$.$touch(),this.v$.$invalid)return;this.saving=!0;const e=window.ssa_is_embed?window.top.location.href:window.location.hostname+window.location.pathname;this.updateGoogleCalendarEnabled({settings:this.settings,value:!0}),this.updateGoogleCalendarSettings().then((()=>{this.googleCalendarAuth({ssa_redirect:this.$route.path,ssa_base_url:e}).then((()=>{this.saving=!1,window.ssa_is_embed?window.top.location.href=this.googleAuthUrl:window.location.href=this.googleAuthUrl}))}))},set_filtered_gcal_values(){this.settings.google_calendar?.client_id_filtered&&this.settings.google_calendar?.client_id_filtered!=this.settings.google_calendar.client_id&&this.settings.google_calendar?.client_secret_filtered&&this.settings.google_calendar?.client_secret_filtered!==this.settings.google_calendar.client_secret?this.filtered_gcal_values=!0:this.filtered_gcal_values=!1},...(0,m.OI)("google_calendar",["updateGoogleCalendarClientId","updateGoogleCalendarClientSecret","updateGoogleCalendarEnabled"]),...(0,m.nv)("google_calendar",["updateGoogleCalendarSettings","googleCalendarAuth","switchToManualSetup","switchToQuickConnectSetup"])}};const sU=(0,he.Z)(lU,[["render",rU],["__scopeId","data-v-3d810d0c"]]);var nU=sU;const dU={key:2,class:"md-whiteframe"},pU={class:"md-title",style:{flex:"1","line-height":"20px"}},fU={class:"sub"};function uU(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-empty"),f=(0,o.up)("foxy-toolbar"),u=(0,o.up)("google-calendar-sync"),c=(0,o.up)("foxy-layout"),h=(0,o.up)("google-calendar-settings");return(0,o.wg)(),(0,o.iD)("div",null,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,message:e.translations.settings.google_calendar.loadingCalendars},null,8,["message"])):l.error?((0,o.wg)(),(0,o.j4)(p,{key:1,label:l.errorMessage,description:e.translations.wizard.googleCalendar.failedToFetchDescription},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"md-primary",mode:"raised",onClick:s.disconnectAccount},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.disconnect),1)])),_:1},8,["onClick"])])),_:1},8,["label","description"])):((0,o.wg)(),(0,o.iD)("div",dU,[(0,o.Wm)(f,{class:"md-primary"},{default:(0,o.w5)((()=>[(0,o._)("h2",pU,[(0,o._)("span",fU,(0,r.zw)(e.translations.settings.google_calendar.account),1),(0,o.Uk)(" "+(0,r.zw)(e.googleCalendarAccountName),1)]),(0,o.Wm)(d,{mode:"unelevated",onClick:s.disconnectAccount},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.disconnect),1)])),_:1},8,["onClick"])])),_:1}),(0,o.Wm)(c,{"md-gutter":""},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{"md-flex":"50"},{default:(0,o.w5)((()=>[(0,o.Wm)(u)])),_:1}),(0,o.Wm)(c,{"md-flex":"50"},{default:(0,o.w5)((()=>[(0,o.Wm)(h)])),_:1})])),_:1})]))])}const cU={class:"ssa-google-calendar-sync-appointment-types"};function hU(e,t,i,a,l,s){const n=(0,o.up)("foxy-button");return(0,o.wg)(),(0,o.iD)("div",cU,[(0,o._)("h3",null,(0,r.zw)(e.translations.settings.google_calendar.calendarSync),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.google_calendar.authSuccess)+" "+(0,r.zw)(e.translations.settings.google_calendar.authNext),1),(0,o.Wm)(n,{tag:"md-button",mode:"raised",class:"md-raised md-primary",to:"/ssa/appointment-types"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.appointmentTypesEdit),1)])),_:1})])}var mU={name:"SettingsGoogleCalendarSync",computed:{...(0,m.rn)("translations",["translations"])}};const gU=(0,he.Z)(mU,[["render",hU]]);var _U=gU;const yU={class:"ssa-google-calendar-sync-settings"},wU={class:"foxy-switch-label"},xU={class:"foxy-switch-label"},CU={style:{"font-size":"1.17em","font-weight":"bold","margin-bottom":"1rem"}};function vU(e,t,i,a,l,s){const n=(0,o.up)("foxy-switch"),d=(0,o.up)("duration"),p=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",yU,[(0,o._)("div",null,[(0,o._)("h3",null,(0,r.zw)(e.translations.settings.google_calendar.webMeetingsHeadline),1),(0,o.Wm)(n,{id:"googleMeetLink",disabled:l.saving,modelValue:s.web_meetings,"onUpdate:modelValue":t[0]||(t[0]=e=>s.web_meetings=e)},{default:(0,o.w5)((()=>[(0,o._)("span",wU,(0,r.zw)(e.translations.settings.google_calendar.webMeetingsToggleLabel),1)])),_:1},8,["disabled","modelValue"])]),(0,o._)("div",null,[(0,o._)("h3",null,(0,r.zw)(e.translations.settings.google_calendar.deleteEventsHeadline),1),(0,o.Wm)(n,{id:"deleteEvent",disabled:l.saving,modelValue:s.delete_events,"onUpdate:modelValue":t[1]||(t[1]=e=>s.delete_events=e)},{default:(0,o.w5)((()=>[(0,o._)("span",xU,(0,r.zw)(e.translations.settings.google_calendar.deleteEventsToggleLabel),1)])),_:1},8,["disabled","modelValue"])]),(0,o._)("fieldset",null,[(0,o._)("legend",CU,(0,r.zw)(e.translations.settings.google_calendar.refreshIntervalHeadline),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.google_calendar.refreshIntervalDesc),1),(0,o.Wm)(d,{modelValue:s.refresh_interval,"onUpdate:modelValue":t[2]||(t[2]=e=>s.refresh_interval=e)},null,8,["modelValue"])]),l.saving?((0,o.wg)(),(0,o.j4)(p,{key:0,indeterminate:""})):(0,o.kq)("",!0)])}var bU={name:"SettingsGoogleCalendarSettings",components:{Duration:Wd},data(){return{saving:!1}},computed:{refresh_interval:{get(){return parseInt(this.settings.google_calendar.refresh_interval,10)},set(e){this.setGoogleCalendarRefreshInterval({settings:this.settings,value:e}),this.saveSettings()}},web_meetings:{get(){return this.settings.google_calendar.web_meetings},set(e){this.setGoogleCalendarWebMeetings({settings:this.settings,value:e}),this.saveSettings()}},delete_events:{get(){return this.settings.google_calendar.delete_canceled_events},set(e){this.setGoogleCalendarDeleteEvents({settings:this.settings,value:e}),this.saveSettings()}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{saveSettings(){this.saving=!0,this.updateGoogleCalendarSettings().then((()=>{this.saving=!1}))},...(0,m.OI)("google_calendar",["setGoogleCalendarWebMeetings","setGoogleCalendarDeleteEvents","setGoogleCalendarRefreshInterval"]),...(0,m.nv)("google_calendar",["updateGoogleCalendarSettings"])}};const BU=(0,he.Z)(bU,[["render",vU]]);var SU=BU,kU={name:"SettingsGoogleCalendarList",store:$J,components:{Loading:ge,GoogleCalendarSync:_U,GoogleCalendarSettings:SU},data(){return{loading:!0,error:!1,errorMessage:""}},mounted(){this.googleCalendars.length?this.loading=!1:this.fetchGoogleCalendars().then((()=>{this.loading=!1})).catch((e=>{console.log(e),this.loading=!1,this.error=!0,this.errorMessage=this.translations.wizard.googleCalendar.failedToFetch}))},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("google_calendar",["googleCalendars"]),...(0,m.Se)("google_calendar",["googleCalendarAccountName","googleCalendarAccountEmail"]),...(0,m.Se)("appointment_types",["editableAppointmentTypeIds"]),...(0,m.Se)("staff",["currentUserCan"])},methods:{disconnectAccount(){this.googleCalendarDeauth()},editAppointmentType(){let e=this.editableAppointmentTypeIds[0];mY.push(`/ssa/appointment-types/type/${e}`)},openBulkEdit(){this.updateBulkEditing(this.editableAppointmentTypeIds),mY.push({name:"appointment-type-bulk-edit",params:{section:"googleCalendar"}})},...(0,m.nv)("google_calendar",["fetchGoogleCalendars","googleCalendarDeauth"]),...(0,m.OI)("appointment_types",["updateBulkEditing"])}};const AU=(0,he.Z)(kU,[["render",uU]]);var MU=AU;function DU(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.j4)(d,{label:e.translations.settings.featureNotEnabled,description:e.translations.settings.featureNotEnabledDescription},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{tag:"md-button",to:"/ssa/settings/all",mode:"raised",class:"md-raised md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.returnToSettings),1)])),_:1})])),_:1},8,["label","description"])}var TU={name:"SettingNotEnabled",data(){return{}},computed:{...(0,m.rn)("translations",["translations"])}};const OU=(0,he.Z)(TU,[["render",DU]]);var GU=OU,EU={name:"SettingsGoogleCalendar",props:{header:{type:Boolean,default:!0},showDisabled:{type:Boolean,default:!1}},components:{SettingsHeader:zO,GoogleCalendarAuth:nU,GoogleCalendarList:MU,SettingNotEnabled:GU},data(){return{}},mounted(){const e=this.account_authorized?{"ssasc-plugin-screen":K.google_calendar.account_activated}:{"ssasc-plugin-screen":K.google_calendar.enabled};this.getGuides(e)},computed:{account_authorized(){return this.settings.google_calendar.access_token},...(0,m.rn)(["settings"])},methods:{cancelEdit(){this.$emit("cancel")},...(0,m.nv)("guides",["getGuides"])}};const UU=(0,he.Z)(EU,[["render",XE]]);var FU=UU;const IU={class:"event-settings"},zU={class:"button-bar"};function PU(e,t,i,a,l,s){const n=(0,o.up)("foxy-dialog-confirm"),d=(0,o.up)("settings-header"),p=(0,o.up)("settings-calendar-events-edit"),f=(0,o.up)("foxy-accordion-item"),u=(0,o.up)("foxy-accordion"),c=(0,o.up)("foxy-theme"),h=(0,o.up)("foxy-button"),m=(0,o.up)("foxy-progress-circular"),g=(0,o.up)("foxy-snackbar"),_=(0,o.up)("notification-details");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(n,{ref:"confirmLeaveDirty",title:e.translations.settings.notifications.confirmIgnoreChangesTitle,"content-html":e.translations.appointmentTypes.confirmIgnoreChangesContent,"ok-text":e.translations.settings.notifications.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.notifications.confirmIgnoreChangesCancel,onConfirm:s.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"]),i.header?((0,o.wg)(),(0,o.j4)(d,{key:0})):(0,o.kq)("",!0),(0,o._)("h2",null,(0,r.zw)(e.translations.settings.calendar_events.title),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.calendar_events.description),1),(0,o._)("div",IU,[(0,o.Wm)(c,{theme:"grey"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.typesKeys,(t=>((0,o.wg)(),(0,o.j4)(f,{key:t,label:e.translations.settings.calendar_events.types[t].title,message:s.calendarEventsHelper[t],index:t,section:"event-types",open:l.section,error:!l.typesValid[t],onUpdateActive:s.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{type:t,on_change:s.validate},null,8,["type","on_change"])])),_:2},1032,["label","message","index","open","error","onUpdateActive"])))),128))])),_:1})])),_:1}),(0,o._)("div",zU,[(0,o.Wm)(h,{onClick:s.saveEvents,mode:"raised",disabled:s.invalidEvents||l.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.calendar_events.save),1)])),_:1},8,["onClick","disabled"]),l.saving?((0,o.wg)(),(0,o.j4)(m,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)]),(0,o.Wm)(g,{position:"top center",modelValue:l.isSaveCalendarEventsVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>l.isSaveCalendarEventsVisible=e),message:e.translations.settings.calendar_events.success},null,8,["modelValue","message"])]),(0,o.Wm)(_,{title:e.translations.settings.calendar_events.tokenDetailsTitle,description:e.translations.settings.calendar_events.tokenDetails},null,8,["title","description"])])}const VU=e=>((0,o.dD)("data-v-cf7eb29e"),e=e(),(0,o.Cn)(),e),WU={class:"notification-details"},RU=VU((()=>(0,o._)("hr",{class:"foxy-divider"},null,-1))),LU={class:"md-title"},jU=VU((()=>(0,o._)("a",{href:"https://twig.symfony.com/",class:"link",target:"_blank"},"Twig documentation",-1))),qU=VU((()=>(0,o._)("p",null,[(0,o.Uk)(" the syntax uses double curly braces around variables like: "),(0,o._)("span",null,"{{ admin_email }}")],-1))),NU={class:"foxy-table table-twig-token mdc-theme-name--default"},$U=VU((()=>(0,o._)("thead",null,[(0,o._)("tr",null,[(0,o._)("th",null,"Token"),(0,o._)("th",null,"Description")])],-1)));function HU(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",WU,[RU,(0,o._)("h3",LU,(0,r.zw)(i.title),1),(0,o._)("p",null,[(0,o.Uk)((0,r.zw)(i.description)+" ",1),jU]),qU,(0,o._)("div",NU,[(0,o._)("table",null,[$U,(0,o._)("tbody",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.notificationTokens,((t,i)=>((0,o.wg)(),(0,o.iD)("tr",{key:i},[(0,o._)("td",null,[(0,o._)("code",null,(0,r.zw)(t),1)]),(0,o._)("td",null,(0,r.zw)(e.translations.settings.notifications.tokens[t]),1)])))),128))])])])])}var ZU={name:"NotificationDetails",props:["index","title","description"],data(){return{notificationTokens:k}},computed:{...(0,m.rn)("translations",["translations"])}};const YU=(0,he.Z)(ZU,[["render",HU],["__scopeId","data-v-cf7eb29e"]]);var KU=YU;const JU={class:"md-fieldset has-top-menu required"},XU=(0,o._)("legend",null," Event Title ",-1),QU={class:"md-fieldset has-top-menu required"},eF=(0,o._)("legend",null," Event Location ",-1),tF={class:"md-fieldset has-top-menu required"},iF=(0,o._)("legend",null,"Event Details",-1);function aF(e,t,i,a,l,s){const n=(0,o.up)("foxy-notification"),d=(0,o.up)("token-text");return(0,o.wg)(),(0,o.iD)("div",null,["customer"===i.type?((0,o.wg)(),(0,o.j4)(n,{key:0,icon:"info",theme:"blue"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.eventTypeDescription),1)])),_:1})):((0,o.wg)(),(0,o.j4)(n,{key:1,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.eventTypeDescription)+" "+(0,r.zw)(e.translations.settings.calendar_events.sample_appointment_types)+" "+(0,r.zw)(s.sampleAppointmentTypes)+". ",1)])),_:1})),(0,o._)("fieldset",JU,[XU,(0,o.Wm)(d,{options:l.notificationTokens,error:l.errors.title,required:!0,"plain-text":!0,onValidate:s.validateTitle,modelValue:s.eventTitle,"onUpdate:modelValue":t[0]||(t[0]=e=>s.eventTitle=e)},null,8,["options","error","onValidate","modelValue"])]),(0,o._)("fieldset",QU,[eF,(0,o.Wm)(d,{options:l.notificationTokens,error:l.errors.location,required:!0,"plain-text":!0,onValidate:s.validateLocation,modelValue:s.eventLocation,"onUpdate:modelValue":t[1]||(t[1]=e=>s.eventLocation=e)},null,8,["options","error","onValidate","modelValue"])]),(0,o._)("fieldset",tF,[iF,(0,o.Wm)(d,{options:l.notificationTokens,error:l.errors.details,required:!0,onValidate:s.validateDetails,modelValue:s.eventDetails,"onUpdate:modelValue":t[2]||(t[2]=e=>s.eventDetails=e)},null,8,["options","error","onValidate","modelValue"])])])}const oF={class:"token-text"},rF={class:"token-toolbar"},lF={key:0,class:"md-error"};function sF(e,t,i,a,l,s){const n=(0,o.up)("foxy-icon-button"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-list-item"),f=(0,o.up)("foxy-menu"),u=(0,o.up)("foxy-menu-anchor"),c=(0,o.up)("at");return(0,o.wg)(),(0,o.iD)("div",oF,[(0,o._)("div",rF,[i.showPreview?((0,o.wg)(),(0,o.j4)(n,{key:0,theme:"light-green",onClick:s.displayPreview},{default:(0,o.w5)((()=>[(0,o.Uk)(" remove_red_eye ")])),_:1},8,["onClick"])):(0,o.kq)("",!0),(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"text_fields",onClick:t[0]||(t[0]=e=>l.showOptions=!0),theme:"light-green"}),(0,o.Wm)(f,{modelValue:l.showOptions,"onUpdate:modelValue":t[1]||(t[1]=e=>l.showOptions=e),onSelect:s.insertMessageToken},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(i.options,(e=>((0,o.wg)(),(0,o.j4)(p,{key:e},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e),1)])),_:2},1024)))),128))])),_:1},8,["modelValue","onSelect"])])),_:1})]),(0,o.Wm)(c,{ats:["{{"],members:i.options,suffix:"}}",value:s.message,onInput:s.handleInput},{default:(0,o.w5)((()=>[(0,o._)("div",{contenteditable:"","data-lt-active":"false","data-gramm":"false",ref:"messageContent",class:(0,r.C_)(s.errorMessage?"error":""),onPaste:t[2]||(t[2]=(...e)=>s.sanitize&&s.sanitize(...e))},null,34)])),_:1},8,["members","value","onInput"]),s.errorMessage?((0,o.wg)(),(0,o.iD)("span",lF,(0,r.zw)(s.errorMessage),1)):(0,o.kq)("",!0)])}var nF=i(90349),dF=i.n(nF),pF=i(73738),fF=i.n(pF),uF={name:"TokenText",props:{options:{type:Array,default(){return[]}},modelValue:{type:String,default:""},plainText:Boolean,showPreview:{default:!1,type:Boolean},required:{default:!1,type:Boolean}},emits:["update:modelValue","preview","validate"],components:{At:dF()},data(){return{error:null,debouncedValidation:null,debouncedUpdateMessage:fF()(this.updateMessage,500),caretPos:null,showOptions:!1,userInteracted:!1}},watch:{message(){this.debouncedValidation(),this.$emit("preview"),this.plainText&&this.$nextTick((()=>{zs(this.$refs.messageContent,this.caretPos)}))}},mounted(){this.debouncedValidation=fF()(this.validate,500)},computed:{message:{get(){return this.plainText?Us(this.modelValue):this.modelValue},set(e){this.plainText?(this.caretPos=Is(this.$refs.messageContent,this.caretPos),this.$emit("update:modelValue",Es(e))):this.$emit("update:modelValue",e)}},errorMessage(){return this.userInteracted?this.required&&!this.trimmedMessage?this.translations.tokenText.errors.required:this.error?this.error:null:null},trimmedMessage(){return this.message.replace(/<[^>]+>/g,"").trim()},...(0,m.rn)("translations",["translations"])},methods:{handleInput(e){const t=e.target.innerHTML;this.debouncedUpdateMessage(t)},updateMessage(e){this.markUserInteracted(),this.message=e},displayPreview(){this.$emit("preview")},insertMessageToken({index:e}){let t=this.options[e],i=this.$refs.messageContent,a=document.createTextNode("{{"+t+"}}"),o=window.getSelection();if(o.anchorNode&&(o.anchorNode.isContentEditable||o.anchorNode.parentNode.isContentEditable)){let e=o.getRangeAt(0);e.deleteContents(),e.insertNode(a),e.setStartAfter(a),o.removeAllRanges(),o.addRange(e)}else{let e=document.createRange();e.selectNodeContents(i),e.collapse(!1),e.insertNode(a),e.setStartAfter(a),o=window.getSelection(),o.removeAllRanges(),o.addRange(e)}this.message=i.innerHTML},validate(){this.error=null,this.trimmedMessage?this.validateTwigString(this.message).then((()=>{this.error=null,this.$emit("validate",!0)})).catch((()=>{this.error=this.translations.tokenText.errors.validationError,this.$emit("validate",!1)})):this.required?this.$emit("validate",!1):this.$emit("validate",!0)},sanitizeImgSize(){setTimeout((()=>{const e=this.$refs.messageContent,t=e.querySelectorAll("img")??[];t.length&&(t.forEach((e=>{const t=e.clientWidth,i=e.clientHeight;e.style.width=t+"px",e.style.height=i+"px"})),this.$nextTick((()=>{this.$emit("update:modelValue",this.$refs.messageContent.innerHTML)})))}),1500)},sanitize(e){this.plainText||this.sanitizeImgSize(),this.plainText&&Fs(e)},markUserInteracted(){this.userInteracted||(this.userInteracted=!0)},...(0,m.nv)("notifications",["validateTwigString"])}};const cF=(0,he.Z)(uF,[["render",sF]]);var hF=cF,mF={name:"SettingsCalendarEventsEdit",props:["type"],components:{TokenText:hF},data(){return{notificationTokens:k,errors:{title:null,location:null,details:null}}},mounted(){this.validate()},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("appointment_types",["appointmentTypes"]),...(0,m.Se)("appointment_types",["allCalendarEventTypes","appointmentTypesGroupedByEventType"]),eventSettings(){return this.allCalendarEventTypes[this.type]},eventTitle:{get(){return this.eventSettings.title},set(e){const t=Object.assign({},this.eventSettings);t.title=e,this.setCalendarEventType({settings:this.settings,key:this.type,value:t})}},eventLocation:{get(){return this.eventSettings.location},set(e){const t=Object.assign({},this.eventSettings);t.location=e,this.setCalendarEventType({settings:this.settings,key:this.type,value:t})}},eventDetails:{get(){return this.eventSettings.details},set(e){const t=Object.assign({},this.eventSettings);t.details=e,this.setCalendarEventType({settings:this.settings,key:this.type,value:t})}},eventTypeDescription(){return["individual_shared","individual_admin","group_admin"].includes(this.type)&&this.settings.installed.staff&&this.settings.staff.enabled?this.translations.settings.calendar_events.types[this.type].description_staff:this.translations.settings.calendar_events.types[this.type].description},sampleAppointmentTypes(){const e=this.appointmentTypes.filter((e=>-1!==this.appointmentTypesGroupedByEventType[this.type].indexOf(e.id))).map((e=>`"${e.title}"`));if(e.length){if(1===e.length)return e[0];{const t=e.slice(0,3);if(e.length>1&&e.length<4){const e=t.pop();return`${t.join(", ")} ${this.translations.settings.calendar_events.and} ${e}`}if(e.length>=4)return`${t.join(", ")} ${this.translations.settings.calendar_events.and_more}`}}return null},helperText(){let e=`${this.eventTypeDescription} ${this.translations.settings.calendar_events.sample_appointment_types} ${this.sampleAppointmentTypes}`;return e}},methods:{validate(){Object.keys(this.errors).forEach((e=>{const t=""===this.eventSettings[e].replace(/<[^>]+>/g,"").trim();t||this.errors[e]?this.errors[e]=!0:this.errors[e]=!1})),this.$emit("_change",this.type,this.errors)},validateTitle(e){this.errors.title=!e,this.validate()},validateLocation(e){this.errors.location=!e,this.validate()},validateDetails(e){this.errors.details=!e,this.validate()},...(0,m.OI)("google_calendar",["setCalendarEventType"])}};const gF=(0,he.Z)(mF,[["render",aF]]);var _F=gF,yF={name:"SettingsCalendarEvents",components:{SettingsCalendarEventsEdit:_F,NotificationDetails:KU,SettingsHeader:zO},props:{header:{type:Boolean,default:!0}},data(){return{section:null,saving:!1,dirty:!1,leaveWithoutSaving:!1,typesValid:{},isSaveCalendarEventsVisible:!1,routerNext:null}},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},created(){this.typesKeys.forEach((e=>{this.typesValid[e]=!0}))},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("appointment_types",["allCalendarEventTypes","allowedEventTypes"]),typesKeys(){return Object.keys(this.allCalendarEventTypes).filter((e=>this.allowedEventTypes.includes(e)))},invalidEvents(){return Object.values(this.typesValid).filter((e=>!e)).length>0},calendarEventsHelper(){let e={};return this.typesKeys.forEach((t=>{["individual_admin","group_admin"].includes(t)&&this.settings.installed.staff&&this.settings.staff.enabled?e[t]=this.translations.settings.calendar_events.types[t].helper_staff:e[t]=this.translations.settings.calendar_events.types[t].helper})),e}},methods:{...(0,m.OI)("google_calendar",["setCalendarEventsEnabled"]),...(0,m.nv)("google_calendar",["updateCalendarEventsSettings"]),updateSection(e){this.section=e||null},validate(e,t){this.dirty=!0;const i=0===Object.values(t).filter((e=>e)).length;this.typesValid[e]=i},async saveEvents(){this.saving=!0;try{await this.updateCalendarEventsSettings(),this.saving=!1,this.dirty&&(this.isSaveCalendarEventsVisible=!0,this.dirty=!1),this.$emit("saved")}catch(e){console.log(e),this.saving=!1}},dialogLeaveWithoutSaving(){this.routerNext()}}};const wF=(0,he.Z)(yF,[["render",PU]]);var xF=wF;const CF={class:"mailchimp-settings"};function vF(e,t,i,a,r,l){const s=(0,o.up)("settings-header"),n=(0,o.up)("mailchimp-list"),d=(0,o.up)("mailchimp-auth"),p=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",CF,[(0,o.Wm)(s),e.settings.mailchimp.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[l.account_authorized?((0,o.wg)(),(0,o.j4)(n,{key:0})):((0,o.wg)(),(0,o.j4)(d,{key:1}))],64)):((0,o.wg)(),(0,o.j4)(p,{key:1}))])}const bF={class:"button-bar align-right"};function BF(e,t,i,l,s,n){const d=(0,o.up)("foxy-textfield"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-progress-circular"),u=(0,o.up)("foxy-snackbar");return(0,o.wg)(),(0,o.iD)("form",{novalidate:"",onSubmit:t[2]||(t[2]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[(0,o.Wm)(d,{modelValue:n.api_key,"onUpdate:modelValue":t[0]||(t[0]=e=>n.api_key=e),label:e.translations.settings.mailchimp.api_key,helptext:s.validKey?""+e.translations.settings.mailchimp.api_key_helper_label+"":e.translations.settings.mailchimp.apiKeyError,"helptext-persistent":"","helptext-validation":"",required:"",id:"api_key",valid:s.validKey},null,8,["modelValue","label","helptext","valid"]),(0,o._)("div",bF,[(0,o.Wm)(p,{"data-test":"test-save-and-authorise-mailchimp",mode:"raised",class:"md-primary",onClick:n.saveSettings,disabled:s.saving},{default:(0,o.w5)((()=>[s.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.mailchimp.saveAuthorize),1)],64))])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(f,{key:0,indeterminate:""})):(0,o.kq)("",!0)]),(0,o.Wm)(u,{position:"top center",modelValue:s.isMcErrorVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>s.isMcErrorVisible=e),message:s.errorMessage},null,8,["modelValue","message"])],32)}var SF={name:"SettingsMailchimpAuth",data(){return{errorMessage:"",saving:!1,validKey:!0,isMcErrorVisible:!1}},computed:{api_key:{get(){return this.settings.mailchimp.api_key||""},set(e){this.updateMailchimpApiKey({settings:this.settings,value:e.trim()})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{saveSettings(){this.validateKey(),this.validKey&&(this.saving=!0,this.updateMailchimpSettings().then((()=>{this.authorizeMailchimp().then((()=>{this.saving=!1,this.updateMailchimpAuthorized({settings:this.settings,value:!0})})).catch((e=>{this.saving=!1,this.validKey=!1;let t=e.response_code,i=e.error.errors;this.errorMessage=i[t][0],this.isMcErrorVisible=!0}))})))},validateKey(){this.api_key?this.validKey=!0:this.validKey=!1},...(0,m.OI)("mailchimp",["updateMailchimpApiKey","updateMailchimpAuthorized"]),...(0,m.nv)("mailchimp",["updateMailchimpSettings","authorizeMailchimp"])}};const kF=(0,he.Z)(SF,[["render",BF]]);var AF=kF;const MF={key:1,class:"md-whiteframe"},DF={class:"md-title",style:{flex:"1"}},TF={class:"sub"},OF={class:"foxy-list-default"};function GF(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-toolbar");return(0,o.wg)(),(0,o.iD)("div",null,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,message:l.loadingMessage},null,8,["message"])):((0,o.wg)(),(0,o.iD)("div",MF,[(0,o.Wm)(p,{class:"md-primary"},{default:(0,o.w5)((()=>[(0,o._)("h2",DF,[(0,o._)("span",TF,(0,r.zw)(e.translations.settings.mailchimp.lists),1),(0,o.Uk)((0,r.zw)(e.settings.mailchimp.account_details.account_name),1)]),(0,o.Wm)(d,{"data-test":"test-mailchimp-disconnect",onClick:s.disconnect,mode:"unelevated"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webex.disconnect),1)])),_:1},8,["onClick"])])),_:1}),(0,o._)("ul",OF,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.settings.mailchimp.lists,(e=>((0,o.wg)(),(0,o.iD)("li",{key:e.id,class:"mailchimp-list-item"},[(0,o._)("span",null,(0,r.zw)(e.name),1)])))),128))])]))])}var EF={name:"SettingsMailchimpList",store:$J,components:{Loading:ge},data(){return{loading:!0,loadingMessage:""}},mounted(){this.settings.mailchimp.lists.length?this.loading=!1:(this.loadingMessage=this.translations.settings.mailchimp.loadingLists,this.fetchMailchimpLists().then((()=>{this.loading=!1})))},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{disconnect(){this.loadingMessage=this.translations.settings.mailchimp.deauthorize,this.loading=!0,this.deauthorizeMailchimp().then((()=>{this.loading=!1}))},...(0,m.nv)("mailchimp",["fetchMailchimpLists","deauthorizeMailchimp"])}};const UF=(0,he.Z)(EF,[["render",GF],["__scopeId","data-v-556e6f1f"]]);var FF=UF,IF={name:"SettingsMailchimp",store:$J,components:{SettingsHeader:zO,MailchimpAuth:AF,MailchimpList:FF,SettingNotEnabled:GU},data(){return{}},mounted(){this.getGuides({"ssasc-plugin-screen":K.mailchimp})},computed:{account_authorized(){return this.settings.mailchimp.account_details},...(0,m.rn)(["settings"])},methods:{cancelEdit(){this.$emit("cancel")},...(0,m.nv)("guides",["getGuides"])}};const zF=(0,he.Z)(IF,[["render",vF]]);var PF=zF;const VF={class:"webex-settings"};function WF(e,t,i,a,r,l){const s=(0,o.up)("settings-header"),n=(0,o.up)("webex-auth"),d=(0,o.up)("webex-user"),p=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",VF,[i.header?((0,o.wg)(),(0,o.j4)(s,{key:0})):(0,o.kq)("",!0),e.settings.webex.enabled||i.showDisabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[l.account_authorized?((0,o.wg)(),(0,o.j4)(d,{key:1})):((0,o.wg)(),(0,o.j4)(n,{key:0}))],64)):((0,o.wg)(),(0,o.j4)(p,{key:2}))])}const RF={class:"webex-settings"};function LF(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",RF,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.webex.notConnected),1),(0,o.Wm)(n,{mode:"raised",class:"md-primary",onClick:s.saveSettings,disabled:l.saving},{default:(0,o.w5)((()=>[l.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.webex.saveAuthorize),1)],64))])),_:1},8,["onClick","disabled"]),l.saving?((0,o.wg)(),(0,o.j4)(d,{key:0,indeterminate:"",medium:""})):(0,o.kq)("",!0)])}var jF={name:"SettingsWebexAuth",data(){return{saving:!1}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)("webex",["webexAuthUrl"])},methods:{saveSettings(){this.saving=!0;const e=window.ssa_is_embed?window.top.location.href:null;this.updateWebexEnabled(!0),this.webexAuth({ssa_redirect:this.$route.path,ssa_base_url:e}).then((()=>{this.saving=!1,window.ssa_is_embed?window.top.location.href=this.webexAuthUrl:window.location.href=this.webexAuthUrl}))},...(0,m.OI)("webex",["updateWebexEnabled"]),...(0,m.nv)("webex",["webexAuth"])}};const qF=(0,he.Z)(jF,[["render",LF]]);var NF=qF;const $F={key:2,class:"md-whiteframe"},HF={class:"md-title",style:{flex:"1"}},ZF={class:"sub"},YF={class:"ssa-webex-user"},KF={class:"avatar"},JF=["src","alt"],XF={class:"user"},QF={class:"profile"},eI={class:"md-display-1"},tI={class:"md-subhead"},iI=(0,o._)("br",null,null,-1);function aI(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-empty"),f=(0,o.up)("foxy-toolbar"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-avatar"),h=(0,o.up)("foxy-layout");return(0,o.wg)(),(0,o.iD)("div",null,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,message:e.translations.settings.webex.verifying},null,8,["message"])):(0,o.kq)("",!0),!l.loading&&l.error?((0,o.wg)(),(0,o.j4)(p,{key:1,label:l.errorMessage,description:e.translations.settings.webex.failedToFetchDescription},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{mode:"raised",onClick:s.disconnectAccount},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webex.disconnect),1)])),_:1},8,["onClick"])])),_:1},8,["label","description"])):(0,o.kq)("",!0),!l.loading&&e.webexUser?((0,o.wg)(),(0,o.iD)("div",$F,[(0,o.Wm)(f,{class:"md-primary"},{default:(0,o.w5)((()=>[(0,o._)("h2",HF,[(0,o._)("span",ZF,(0,r.zw)(e.translations.settings.webex.account),1)]),(0,o.Wm)(d,{mode:"unelevated",onClick:s.disconnectAccount},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webex.disconnect),1)])),_:1},8,["onClick"])])),_:1}),(0,o.Wm)(h,{"md-gutter":""},{default:(0,o.w5)((()=>[(0,o._)("div",YF,[(0,o._)("div",KF,[e.webexUser.avatar?((0,o.wg)(),(0,o.j4)(c,{key:1,"md-large":"",class:"md-primary"},{default:(0,o.w5)((()=>[(0,o._)("img",{src:e.webexUser.avatar,alt:e.webexUser.first_name},null,8,JF)])),_:1})):((0,o.wg)(),(0,o.j4)(c,{key:0,"md-large":"",class:"md-avatar-icon md-primary"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"person"})])),_:1}))]),(0,o._)("div",XF,[(0,o._)("div",QF,[(0,o._)("h3",eI,(0,r.zw)(e.webexUser.first_name)+" "+(0,r.zw)(e.webexUser.last_name),1),(0,o._)("p",tI,[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.zoom.userEmail)+":",1),iI,(0,o.Uk)((0,r.zw)(e.webexUser.email),1)])])])])])),_:1})])):(0,o.kq)("",!0)])}var oI={name:"SettingsWebexUser",store:$J,components:{Loading:ge},data(){return{loading:!0,error:!1,errorMessage:""}},mounted(){this.webexUser?this.loading=!1:this.fetchWebexUser().then((()=>{this.loading=!1})).catch((e=>{console.log(e),this.loading=!1,this.error=!0,this.errorMessage=this.translations.settings.webex.failedToFetch}))},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("webex",["webexUser"]),...(0,m.Se)("staff",["currentUserCan"])},methods:{disconnectAccount(){this.webexDeauth().then((()=>{window.location.reload()}))},...(0,m.nv)("webex",["fetchWebexUser","webexDeauth"])}};const rI=(0,he.Z)(oI,[["render",aI]]);var lI=rI,sI={name:"SettingsZoom",props:{header:{type:Boolean,default:!0},showDisabled:{type:Boolean,default:!1}},components:{SettingsHeader:zO,WebexAuth:NF,WebexUser:lI,SettingNotEnabled:GU},computed:{account_authorized(){return this.settings.webex.auth_code},...(0,m.rn)(["settings"])},methods:{cancelEdit(){this.$emit("cancel")},...(0,m.nv)("guides",["getGuides"])}};const nI=(0,he.Z)(sI,[["render",WF]]);var dI=nI;const pI={class:"zoom-settings"};function fI(e,t,i,a,r,l){const s=(0,o.up)("settings-header"),n=(0,o.up)("zoom-auth"),d=(0,o.up)("zoom-user"),p=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",pI,[i.header?((0,o.wg)(),(0,o.j4)(s,{key:0})):(0,o.kq)("",!0),e.settings.zoom.enabled||i.showDisabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[l.account_authorized?((0,o.wg)(),(0,o.j4)(d,{key:1})):((0,o.wg)(),(0,o.j4)(n,{key:0}))],64)):((0,o.wg)(),(0,o.j4)(p,{key:2}))])}const uI={class:"zoom-settings"};function cI(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",uI,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.zoom.notConnected),1),(0,o.Wm)(n,{mode:"raised",class:"md-primary",onClick:s.saveSettings,disabled:l.saving},{default:(0,o.w5)((()=>[l.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.zoom.saveAuthorize),1)],64))])),_:1},8,["onClick","disabled"]),l.saving?((0,o.wg)(),(0,o.j4)(d,{key:0,indeterminate:"",medium:""})):(0,o.kq)("",!0)])}var hI={name:"SettingsZoomAuth",data(){return{saving:!1}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)("zoom",["zoomAuthUrl"]),...(0,m.rn)(["settings"])},methods:{saveSettings(){this.saving=!0;const e=window.ssa_is_embed?window.top.location.href:window.location.hostname+window.location.pathname;this.updateZoomEnabled({settings:this.settings,value:!0}),this.zoomAuth({ssa_redirect:window.ssa_is_embed?this.$route.path:null,ssa_base_url:window.ssa_is_embed?e:null}).then((()=>{this.saving=!1,window.ssa_is_embed?window.top.location.href=this.zoomAuthUrl:window.location.href=this.zoomAuthUrl}))},...(0,m.OI)("zoom",["updateZoomEnabled"]),...(0,m.nv)("zoom",["zoomAuth"])}};const mI=(0,he.Z)(hI,[["render",cI]]);var gI=mI;const _I={key:2,class:"md-whiteframe"},yI={class:"md-title",style:{flex:"1"}},wI={class:"sub"},xI={class:"ssa-zoom-user"},CI={class:"avatar"},vI=["src","alt"],bI={class:"user"},BI={class:"profile"},SI={class:"md-display-1"},kI={class:"md-subhead"},AI=(0,o._)("br",null,null,-1),MI={class:"md-subhead meeting-url"},DI=(0,o._)("br",null,null,-1);function TI(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-empty"),f=(0,o.up)("foxy-toolbar"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-avatar"),h=(0,o.up)("foxy-layout");return(0,o.wg)(),(0,o.iD)("div",null,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,message:"Verifying your Zoom user"})):(0,o.kq)("",!0),!l.loading&&l.error?((0,o.wg)(),(0,o.j4)(p,{key:1,label:l.errorMessage,description:e.translations.wizard.zoom.failedToFetchDescription},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{mode:"raised",onClick:s.disconnectAccount},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.zoom.disconnect),1)])),_:1},8,["onClick"])])),_:1},8,["label","description"])):(0,o.kq)("",!0),!l.loading&&e.zoomUser?((0,o.wg)(),(0,o.iD)("div",_I,[(0,o.Wm)(f,{class:"md-primary"},{default:(0,o.w5)((()=>[(0,o._)("h2",yI,[(0,o._)("span",wI,(0,r.zw)(e.translations.settings.zoom.account),1)]),(0,o.Wm)(d,{mode:"unelevated",onClick:s.disconnectAccount},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.zoom.disconnect),1)])),_:1},8,["onClick"])])),_:1}),(0,o.Wm)(h,{"md-gutter":""},{default:(0,o.w5)((()=>[(0,o._)("div",xI,[(0,o._)("div",CI,[e.zoomUser.pic_url?((0,o.wg)(),(0,o.j4)(c,{key:1,"md-large":"",class:"md-primary"},{default:(0,o.w5)((()=>[(0,o._)("img",{src:e.zoomUser.pic_url,alt:e.zoomUser.first_name},null,8,vI)])),_:1})):((0,o.wg)(),(0,o.j4)(c,{key:0,"md-large":"",class:"md-avatar-icon md-primary"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"person"})])),_:1}))]),(0,o._)("div",bI,[(0,o._)("div",BI,[(0,o._)("h3",SI,(0,r.zw)(e.zoomUser.first_name)+" "+(0,r.zw)(e.zoomUser.last_name),1),(0,o._)("p",kI,[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.zoom.userEmail)+":",1),AI,(0,o.Uk)((0,r.zw)(e.zoomUser.email),1)])]),(0,o._)("div",MI,[(0,o._)("p",null,[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.zoom.userMeetingUrl)+":",1),DI,(0,o.Uk)(" "+(0,r.zw)(e.zoomUser.meeting_url),1)])])])])])),_:1})])):(0,o.kq)("",!0)])}var OI={name:"SettingsZoomUser",store:$J,components:{Loading:ge},data(){return{loading:!0,error:!1,errorMessage:""}},mounted(){this.zoomUser?this.loading=!1:this.fetchZoomUser().then((()=>{this.loading=!1})).catch((e=>{console.log(e),this.loading=!1,this.error=!0,this.errorMessage=this.translations.wizard.zoom.failedToFetch}))},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("zoom",["zoomUser"]),...(0,m.Se)("staff",["currentUserCan"])},methods:{disconnectAccount(){this.zoomDeauth().then((()=>{window.location.reload()}))},...(0,m.nv)("zoom",["fetchZoomUser","zoomDeauth"])}};const GI=(0,he.Z)(OI,[["render",TI]]);var EI=GI,UI={name:"SettingsZoom",props:{header:{type:Boolean,default:!0},showDisabled:{type:Boolean,default:!1}},components:{SettingsHeader:zO,ZoomAuth:gI,ZoomUser:EI,SettingNotEnabled:GU},data(){return{}},mounted(){this.getGuides({"ssasc-plugin-screen":K.zoom})},computed:{account_authorized(){return this.settings.zoom.auth_code},...(0,m.rn)(["settings"])},methods:{cancelEdit(){this.$emit("cancel")},...(0,m.nv)("guides",["getGuides"])}};const FI=(0,he.Z)(UI,[["render",fI]]);var II=FI;const zI={class:"advanced-scheduling-settings"},PI={class:"foxy-switch-with-helper"},VI={class:"foxy-helper-text"},WI={class:"link",href:"https://simplyscheduleappointments.com/guides/advanced-scheduling-options/",target:"_blank"},RI={class:"foxy-switch-with-helper"},LI={class:"foxy-helper-text"},jI={class:"link",href:"https://simplyscheduleappointments.com/guides/let-multiple-appointment-types-book-the-same-time-slot/",target:"_blank"};function qI(e,t,i,a,l,s){const n=(0,o.up)("settings-header"),d=(0,o.up)("foxy-switch"),p=(0,o.up)("foxy-snackbar");return(0,o.wg)(),(0,o.iD)("div",zI,[(0,o.Wm)(n,{loading:l.saving},null,8,["loading"]),(0,o._)("div",PI,[(0,o.Wm)(d,{modelValue:s.advanced_scheduling_enabled,"onUpdate:modelValue":t[0]||(t[0]=e=>s.advanced_scheduling_enabled=e),id:"advanced_scheduling_enabled",name:"advanced_scheduling_enabled"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.advanced_scheduling.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",VI,[(0,o.Uk)((0,r.zw)(e.translations.settings.advanced_scheduling.help)+" ",1),(0,o._)("a",WI,(0,r.zw)(e.translations.settings.advanced_scheduling.help_link),1)])]),(0,o._)("div",RI,[(0,o.Wm)(d,{modelValue:s.separate_appointment_type_availability,"onUpdate:modelValue":t[1]||(t[1]=e=>s.separate_appointment_type_availability=e),id:"separate_appointment_type_availability",name:"separate_appointment_type_availability"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.separate_appointment_type_availability.label),1)])),_:1},8,["modelValue"]),(0,o._)("p",LI,[(0,o.Uk)((0,r.zw)(e.translations.settings.developer.separate_appointment_type_availability.help)+" ",1),(0,o._)("a",jI,(0,r.zw)(e.translations.settings.developer.separate_appointment_type_availability.help_link),1)])]),(0,o.Wm)(p,{position:"top center",modelValue:l.isSaveSettingsVisible,"onUpdate:modelValue":t[2]||(t[2]=e=>l.isSaveSettingsVisible=e),message:e.translations.settings.advanced_scheduling.saved},null,8,["modelValue","message"])])}var NI={name:"SettingsAdvancedScheduling",components:{SettingsHeader:zO},data(){return{saving:!1,isSaveSettingsVisible:!1}},mounted(){this.getGuides({"ssasc-plugin-screen":K.advanced_scheduling_options})},computed:{advanced_scheduling_enabled:{get(){return!!this.settings.advanced_scheduling.enabled},set(e){this.updateAdvancedSchedulingEnabled({settings:this.settings,value:e}),this.saving=!0,this.updateAdvancedSchedulingSettings().then((()=>{this.saving=!1,this.isSaveSettingsVisible=!0}))}},separate_appointment_type_availability:{get(){return this.settings.developer.separate_appointment_type_availability},set(e){this.setSeparateAppointmentTypeAvailability({settings:this.settings,value:e}),this.saving=!0,this.updateDeveloperSettings().then((()=>{this.saving=!1,this.isSaveSettingsVisible=!0}))}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("appointment_types",["editableAppointmentTypeIds"]),...(0,m.Se)("staff",["currentUserCan"])},methods:{editAppointmentType(){let e=this.editableAppointmentTypeIds[0];mY.push(`/ssa/appointment-types/type/${e}`)},openBulkEdit(){this.updateBulkEditing(this.editableAppointmentTypeIds),mY.push({name:"appointment-type-bulk-edit",params:{section:"scheduling"}})},...(0,m.nv)(["fetchSettings"]),...(0,m.nv)("advanced_scheduling",["updateAdvancedSchedulingSettings"]),...(0,m.OI)("advanced_scheduling",["updateAdvancedSchedulingEnabled","setSeparateAppointmentTypeAvailability"]),...(0,m.OI)("appointment_types",["updateBulkEditing"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.nv)("developer_settings",["updateDeveloperSettings"])}};const $I=(0,he.Z)(NI,[["render",qI],["__scopeId","data-v-137b3d5b"]]);var HI=$I;const ZI={class:"link",href:"https://simplyscheduleappointments.com/document/conversion-tracking/",target:"_blank"},YI={class:"button-bar align-right"};function KI(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-checkbox"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-progress-circular"),c=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{class:"tracking-settings",novalidate:"",onSubmit:t[2]||(t[2]=(0,a.iM)(((...e)=>n.saveSettings&&n.saveSettings(...e)),["stop","prevent"]))},[(0,o.Wm)(d),(0,o._)("p",null,[(0,o.Uk)((0,r.zw)(e.translations.settings.tracking.instructions)+" ",1),(0,o._)("a",ZI,(0,r.zw)(e.translations.settings.tracking.docLinkText),1)]),(0,o._)("p",null,[(0,o.Wm)(p,{id:"event-tracking",name:"event-tracking",modelValue:n.event_tracking,"onUpdate:modelValue":t[0]||(t[0]=e=>n.event_tracking=e),disabled:s.saving,label:e.translations.settings.tracking.eventTracking},null,8,["modelValue","disabled","label"])]),(0,o._)("p",null,[(0,o.Wm)(p,{id:"page-tracking",name:"page-tracking",modelValue:n.page_tracking,"onUpdate:modelValue":t[1]||(t[1]=e=>n.page_tracking=e),disabled:s.saving,label:e.translations.settings.tracking.pageTracking},null,8,["modelValue","disabled","label"])]),(0,o._)("div",YI,[(0,o.Wm)(f,{mode:"raised",class:"md-primary",onClick:n.saveSettings,disabled:s.saving},{default:(0,o.w5)((()=>[s.saving?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.general.saving),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)],64))])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(u,{key:0,indeterminate:"",medium:""})):(0,o.kq)("",!0)])],32),(0,o.Wm)(c,{ref:"confirmLeaveDirty",title:e.translations.settings.general.confirmTitle,"content-html":e.translations.settings.general.confirmContent,"ok-text":e.translations.general.ok,"cancel-text":e.translations.general.cancel,onConfirm:n.dirtyConfirm},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}var JI={name:"SettingsTracking",components:{SettingsHeader:zO},data(){return{saving:!1,dirty:!1,routerNext:null,to:null}},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{event_tracking:function(e,t){e!==t&&(this.dirty=!0)},page_tracking:function(e,t){e!==t&&(this.dirty=!0)}},mounted(){this.getGuides({"ssasc-plugin-screen":K.tracking})},computed:{event_tracking:{get(){return this.settings.tracking.event_tracking},set(e){this.setEventTracking({settings:this.settings,value:e})}},page_tracking:{get(){return this.settings.tracking.page_tracking},set(e){this.setPageTracking({settings:this.settings,value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{saveSettings(){this.saving=!0,this.saveTrackingSettings().then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")}))},dirtyConfirm(){this.routerNext(),this.fetchSettings()},...(0,m.nv)(["fetchSettings"]),...(0,m.nv)("tracking",["saveTrackingSettings"]),...(0,m.OI)("tracking",["setEventTracking","setPageTracking"]),...(0,m.nv)("guides",["getGuides"])}};const XI=(0,he.Z)(JI,[["render",KI],["__scopeId","data-v-b1b7c6c8"]]);var QI=XI;const ez={key:1,style:{padding:"0"}};function tz(e,t,i,r,l,s){const n=(0,o.up)("no-permission"),d=(0,o.up)("settings-header"),p=(0,o.up)("loading"),f=(0,o.up)("view-selector"),u=(0,o.up)("date-select-and-list"),c=(0,o.up)("setting-not-enabled"),h=(0,o.up)("foxy-snackbar");return(0,o.wg)(),(0,o.iD)("form",{novalidate:"",onSubmit:t[2]||(t[2]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(d),e.settings.blackout_dates.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[l.saving?((0,o.wg)(),(0,o.j4)(p,{key:0,message:e.translations.settings.blackout.saving},null,8,["message"])):((0,o.wg)(),(0,o.iD)("fieldset",ez,[(0,o.Wm)(f),(0,o.Wm)(u,{modelValue:s.blackout_dates,"onUpdate:modelValue":t[0]||(t[0]=e=>s.blackout_dates=e),saving:l.quickSaving},null,8,["modelValue","saving"])]))],64)):((0,o.wg)(),(0,o.j4)(c,{key:1}))],64)):((0,o.wg)(),(0,o.j4)(n,{key:0})),(0,o.Wm)(h,{position:"top center",modelValue:l.isSavedMessageVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>l.isSavedMessageVisible=e),message:e.translations.settings.blackout.saved},null,8,["modelValue","message"])],32)}const iz={key:1,class:"md-title"},az=(0,o._)("div",{style:{flex:"1"}},null,-1);function oz(e,t,i,a,l,s){const n=(0,o.up)("foxy-list-item"),d=(0,o.up)("foxy-select"),p=(0,o.up)("foxy-progress-circular"),f=(0,o.up)("foxy-toolbar");return(0,o.wg)(),(0,o.j4)(f,{class:"md-transparent view-selector"},{default:(0,o.w5)((()=>[s.canSelectBlackoutType&&!l.loading?((0,o.wg)(),(0,o.j4)(d,{key:0,fullwidth:!1,class:"title",label:e.translations.settings.blackout.selectTarget,name:"blackout-view",id:"blackout-view",modelValue:s.blackoutView,"onUpdate:modelValue":t[0]||(t[0]=e=>s.blackoutView=e),"aria-label":"translations.settings.blackout.selectTarget"},{default:(0,o.w5)((()=>[e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(n,{key:0,role:"option","data-value":"global"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.blackout.title)+": "+(0,r.zw)(e.translations.settings.blackout.view.global),1)])),_:1})):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_staff_blackout_dates")&&this.user.staff_id?((0,o.wg)(),(0,o.j4)(n,{key:1,role:"option","data-value":this.user.staff_id},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.blackout.title)+": "+(0,r.zw)(e.translations.settings.blackout.view.self),1)])),_:1},8,["data-value"])):(0,o.kq)("",!0),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.staffExcludingSelfOptions,(t=>((0,o.wg)(),(0,o.j4)(n,{key:t.id,role:"option","data-value":t.id},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.blackout.title)+": "+(0,r.zw)(t.display_name),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])):((0,o.wg)(),(0,o.iD)("h2",iz,[(0,o.Uk)((0,r.zw)(e.translations.settings.blackout.title)+" ",1),l.loading?((0,o.wg)(),(0,o.j4)(p,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])),az])),_:1})}var rz={name:"BlackoutViewSelector",data(){return{loading:!0}},mounted(){(this.currentUserCan("ssa_manage_staff")||this.currentUserCan("ssa_manage_staff_blackout_dates"))&&"undefined"===typeof this.staff&&this.staffModule.enabled?this.fetchStaff().then((()=>{this.loading=!1})).catch(((e,t)=>{console.log(t)})):this.loading=!1},computed:{blackoutView:{get(){return this.$route.params.staffId?this.$route.params.staffId:"global"},set(e){"global"===e?this.$router.push({name:"settings-blackout"}):this.$router.push({name:"settings-blackout-staff",params:{staffId:e}})}},canSelectBlackoutType(){return!!this.staffModule.enabled&&(this.currentUserCan("ssa_manage_site_settings")&&this.currentUserCan("ssa_manage_staff")||this.currentUserCan("ssa_manage_site_settings")&&this.currentUserCan("ssa_manage_staff_blackout_dates")||this.currentUserCan("ssa_manageStaff")&&this.currentUserCan("ssa_manage_staff_blackout_dates"))},staffExcludingSelfOptions(){return this.currentUserCan("ssa_manage_staff")?this.staffExcludingSelf:[]},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["user"]),...(0,m.rn)("staff",["staff"]),...(0,m.Se)("staff",["currentUserCan","staffExcludingSelf","staffModule"])},methods:{...(0,m.nv)("staff",["fetchStaff"])}};const lz=(0,he.Z)(rz,[["render",oz]]);var sz=lz;const nz=e=>((0,o.dD)("data-v-61506d1a"),e=e(),(0,o.Cn)(),e),dz={class:"full-width"},pz={class:"md-title",style:{flex:"1"}},fz=nz((()=>(0,o._)("div",{style:{flex:"1"}},null,-1))),uz={class:"md-list-item-container"},cz={class:"screen-reader-text"};function hz(e,t,i,l,s,n){const d=(0,o.up)("multi-date-picker"),p=(0,o.up)("foxy-layout"),f=(0,o.up)("foxy-progress-circular"),u=(0,o.up)("foxy-toolbar"),c=(0,o.up)("foxy-icon"),h=(0,o.up)("foxy-tooltip"),m=(0,o.up)("foxy-icon-button"),g=(0,o.up)("foxy-list-item"),_=(0,o.up)("foxy-list"),y=(0,o.up)("foxy-empty");return(0,o.wg)(),(0,o.j4)(p,{"md-gutter":24,class:"data-select-and-list"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,null,{default:(0,o.w5)((()=>[(0,o._)("div",dz,[(0,o.Wm)(d,{modelValue:s.selectedDates,"onUpdate:modelValue":t[0]||(t[0]=e=>s.selectedDates=e),readonly:i.readonly,limit:n.limit},null,8,["modelValue","readonly","limit"])])])),_:1}),(0,o.Wm)(p,{"md-column":""},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{theme:"white"},{default:(0,o.w5)((()=>[(0,o._)("h2",pz,(0,r.zw)(e.translations.settings.blackout.selected),1),fz,(0,o.wy)((0,o._)("div",null,[(0,o.Wm)(f,{medium:"",indeterminate:""}),(0,o.Uk)(" "+(0,r.zw)(e.translations.general.saving),1)],512),[[a.F8,i.saving]])])),_:1}),n.allDateData.length?((0,o.wg)(),(0,o.j4)(_,{key:0,class:"md-dense blackout-dates-selected"},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.allDateData,((t,i)=>((0,o.wg)(),(0,o.j4)(g,{key:i,class:(0,r.C_)({past:s.moment(t.date).isBefore(s.moment(),"day")})},{default:(0,o.w5)((()=>[(0,o._)("div",uz,[(0,o._)("span",null,(0,r.zw)(s.moment(t.date).format(e.settings.global.date_format_moment)),1),t.readonly?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(c,{"data-tooltip-id":"date"+i,style:{padding:"12px"},icon:"public"},null,8,["data-tooltip-id"]),(0,o.Wm)(h,{id:"date"+i,position:"end,below"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.blackout.view.global),1)])),_:2},1032,["id"])],64)):((0,o.wg)(),(0,o.j4)(m,{key:1,class:"md-list-action md-accent",onClick:e=>n.deleteDate(t.date)},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{icon:"close",class:"foxy-warn"}),(0,o._)("span",cz,(0,r.zw)(e.translations.actions.delete)+" "+(0,r.zw)(s.moment(t.date).format(e.settings.global.date_format_moment)),1)])),_:2},1032,["onClick"]))])])),_:2},1032,["class"])))),128))])),_:1})):((0,o.wg)(),(0,o.j4)(y,{key:1,label:e.translations.settings.blackout.emptyLabel,description:e.translations.settings.blackout.emptyDesc},null,8,["label","description"]))])),_:1})])),_:1})}const mz={class:"cov-date-body md-theme-light-green"},gz={class:"cov-date-monthly"},_z={class:"screen-reader-text"},yz={class:"cov-date-caption"},wz={class:"screen-reader-text"},xz={key:0,class:"cov-date-box",tabindex:"-1",ref:"dayList"},Cz={class:"cov-picker-box"},vz={class:"week"},bz={class:"days"},Bz=["data-tooltip-id","data-test-date-str","onClick"],Sz={key:1,class:"cov-date-box list-box"},kz={class:"cov-picker-box date-list",id:"yearList",ref:"yearList",tabindex:"-1"},Az={class:"screen-reader-text"},Mz=["onChange","value"],Dz={key:2,class:"cov-date-box list-box"},Tz={class:"cov-picker-box date-list"},Oz=["onClick"];function Gz(e,t,i,l,s,n){const d=(0,o.up)("foxy-icon"),p=(0,o.up)("foxy-tooltip");return(0,o.wg)(),(0,o.iD)("div",mz,[(0,o._)("div",gz,[(0,o._)("button",{class:"cov-date-previous",onClick:t[0]||(t[0]=(0,a.iM)(((...e)=>n.prevMonth&&n.prevMonth(...e)),["prevent"]))},[(0,o.Wm)(d,{class:"md-size-2x",icon:"keyboard_arrow_left",theme:"on-primary"}),(0,o._)("span",_z,(0,r.zw)(e.translations.settings.blackout.previousMonth),1)]),(0,o._)("div",yz,[(0,o._)("button",{class:"caption-year",onClick:t[1]||(t[1]=(0,a.iM)(((...e)=>n.showYear&&n.showYear(...e)),["prevent"]))},(0,r.zw)(n.currentYear),1),(0,o._)("span",{onClick:t[2]||(t[2]=e=>s.displayType="month")},(0,r.zw)(n.displayMonth),1)]),(0,o._)("button",{class:"cov-date-next",onClick:t[3]||(t[3]=(0,a.iM)(((...e)=>n.nextMonth&&n.nextMonth(...e)),["prevent"]))},[(0,o.Wm)(d,{class:"md-size-2x",icon:"keyboard_arrow_right",theme:"on-primary"}),(0,o._)("span",wz,(0,r.zw)(e.translations.settings.blackout.nextMonth),1)])]),"day"===s.displayType?((0,o.wg)(),(0,o.iD)("div",xz,[(0,o._)("div",Cz,[(0,o._)("div",vz,[(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.week,(e=>((0,o.wg)(),(0,o.iD)("li",{key:e},(0,r.zw)(e),1)))),128))])]),(0,o._)("div",bz,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.days,((t,i)=>((0,o.wg)(),(0,o.iD)("div",{class:(0,r.C_)(["day",{selected:t.selected,readonly:t.readonly,unavailable:t.unavailable,"passive-day":!t.inMonth}]),key:i,"data-tooltip-id":"day"+i,"data-test":"test-date-picker-day","data-test-date-str":t.moment.format(e.settings.global.date_format_moment),onClick:e=>n.checkDay(t)},[(0,o.Uk)((0,r.zw)(t.value)+" ",1),t.readonly?((0,o.wg)(),(0,o.j4)(p,{key:0,id:"day"+i,position:"above"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.blackout.view.global),1)])),_:2},1032,["id"])):(0,o.kq)("",!0)],10,Bz)))),128))])])],512)):"year"===s.displayType?((0,o.wg)(),(0,o.iD)("div",Sz,[(0,o._)("fieldset",kz,[(0,o._)("legend",Az,(0,r.zw)(e.translations.settings.blackout.selectYear),1),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.year,((e,t)=>((0,o.wg)(),(0,o.iD)("label",{class:"date-item",key:t},[(0,o._)("input",{onChange:t=>n.setYear(e),type:"checkbox",class:"screen-reader-text",value:e},null,40,Mz),(0,o.Uk)(" "+(0,r.zw)(e),1)])))),128))],512)])):"month"===s.displayType?((0,o.wg)(),(0,o.iD)("div",Dz,[(0,o._)("div",Tz,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.month,((e,t)=>((0,o.wg)(),(0,o.iD)("div",{class:"date-item",key:t,onClick:t=>n.setMonth(e)},(0,r.zw)(e),9,Oz)))),128))])])):(0,o.kq)("",!0)])}var Ez=i(36797),Uz=i.n(Ez),Fz={name:"DatePicker",props:{required:{type:Boolean,default:!1},modelValue:{type:Array,required:!0},readonly:{type:Array,default(){return[]}},limit:{type:Array,default(){return[]}}},emits:["update:modelValue","change"],data(){return{currentMoment:null,displayType:"day",month:Uz().months(),year:[]}},mounted(){this.showDay()},computed:{week(){var e=Uz().weekdaysMin(!1);if(this.settings.global.start_of_week>0){var t=e.slice(0,this.settings.global.start_of_week),i=e.slice(this.settings.global.start_of_week);e=[...i,...t]}return e},displayMonth(){return this.currentMoment?this.currentMoment.format("MMMM"):""},currentYear(){return this.currentMoment?this.currentMoment.format("YYYY"):""},currentMonth(){return this.currentMoment?this.currentMoment.format("MM"):""},currentDay(){return this.currentMoment?this.currentMoment.format("DD"):""},days(){if(!this.currentMoment)return;let e=[],t=this.currentMoment.daysInMonth();for(let r=1;r<=t;++r)e.push({value:r,inMonth:!0,unavailable:!1,selected:!1,readonly:!1,moment:Uz()(this.currentMoment).date(r)}),this.checkBySelectDays(r,e);let i=Uz()(this.currentMoment).date(1).day(),a=this.currentMoment.clone().subtract(1,"month");i=0===i?7:i,i=this.settings.global.start_of_week>i?i+7:i;for(let r=0;r0)for(let r of this.limit)switch(r.type){case"fromto":e=this.limitFromTo(r,e);break;case"weekday":e=this.limitWeekDay(r,e);break}return e=this.checkReadOnlyDays(e),e},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{prevMonth(){var e=this.currentMoment.clone().subtract(1,"month");e.isBefore(Uz()(),"month")||(this.currentMoment=e,this.showDay())},nextMonth(){this.currentMoment=this.currentMoment.clone().add(1,"month"),this.showDay()},showDay(){this.currentMoment=this.currentMoment?this.currentMoment:Uz()(),this.displayType="day",this.$nextTick((()=>{this.$refs.dayList.focus()}))},checkBySelectDays(e,t){this.modelValue.forEach((i=>{this.currentYear===Uz()(i).format("YYYY")&&this.currentMonth===Uz()(i).format("MM")&&e===Math.ceil(Uz()(i).format("D"))&&(t[e-1].selected=!0)}))},checkReadOnlyDays(e){if(!this.readonly||!this.readonly.length)return e;let t=new Set(this.readonly);return e.map((e=>{!e.unavailable&&e.inMonth&&t.has(e.moment.format($))&&(e.selected=!0,e.readonly=!0)})),e},limitWeekDay(e,t){return t.map((t=>{-1===e.available.indexOf(Math.floor(t.moment.format("d")))&&(t.unavailable=!0)})),t},limitFromTo(e,t){return(e.from||e.to)&&t.map((t=>{this.getLimitCondition(e,t)&&(t.unavailable=!0)})),t},getLimitCondition(e,t){let i=t.moment.clone().startOf("day");return e.from&&!e.to?!i.isAfter(e.from):!e.from&&e.to?!i.isBefore(e.to):!i.isBetween(e.from,e.to)},checkDay(e){if(e.unavailable&&!e.selected||""===e.value||e.readonly)return!1;e.inMonth||("next"===e.action?this.nextMonth():this.prevMonth());let t=Uz()(this.currentYear+"-"+this.currentMonth+"-"+e.value,$).format($),i=this.modelValue.indexOf(t),a=this.modelValue.slice();!0===e.selected?(e.selected=!1,-1!==i&&a.splice(i,1)):(e.selected=!0,-1===i&&a.push(t)),this.picked(a)},showYear(){let e=Uz()(this.currentMoment).year(),t=Uz()().year();e=t{this.addYear()}))},addYear(){let e=this.$refs.yearList;e.focus(),e.addEventListener("scroll",(()=>{if(e.scrollTop({date:e,readonly:!1})));let e=new Set(this.readonly),t=new Set([...this.selectedDates,...this.readonly]);return t=Array.from(t),t.sort(),t.map((t=>({date:t,readonly:e.has(t)})))},date(){return{time:fe()().tz(this.settings.global.timzone_string).format($)}},limit(){return[{type:"fromto",from:fe()().tz(this.settings.global.timezone_string).subtract(1,"day").format($)}]},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{deleteDate(e){let t=this.selectedDates.filter((t=>t!==e));this.selectedDates=t}}};const Vz=(0,he.Z)(Pz,[["render",hz],["__scopeId","data-v-61506d1a"]]);var Wz=Vz,Rz={name:"SettingsBlackout",components:{NoPermission:ia,viewSelector:sz,dateSelectAndList:Wz,SettingsHeader:zO,SettingNotEnabled:GU,Loading:ge},data(){return{moment:fe(),quickSaving:!1,saving:!1,limit:[],isSavedMessageVisible:!1}},mounted(){wa().isEmpty(this.settings.blackout_dates)&&this.fetchBlackoutSettings(),this.getGuides({"ssasc-plugin-screen":K.blackout})},beforeRouteLeave(e,t,i){this.saving=!0,this.updateBlackoutSettings().then((()=>{this.saving=!1,i()}))},watch:{blackout_dates:{handler:function(e,t){e.length!==t.length&&this.quickSaveDates()},deep:!0}},computed:{blackout_dates:{get(){return wa().sortBy(this.settings.blackout_dates.dates,(e=>fe()(e).format($)))},set(e){this.updateBlackoutDates({settings:this.settings,value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("staff",["currentUserCan"])},methods:{quickSaveDates:wa().debounce((function(){this.quickSaving=!0,this.updateBlackoutSettings().then((()=>{this.quickSaving=!1,this.isSavedMessageVisible=!0}))}),2e3),...(0,m.nv)(["fetchSettings"]),...(0,m.OI)("blackout",["updateBlackoutDates"]),...(0,m.nv)("guides",["getGuides"]),...(0,m.nv)("blackout",["fetchBlackoutSettings","updateBlackoutSettings"])}};const Lz=(0,he.Z)(Rz,[["render",tz]]);var jz=Lz;const qz={key:1,style:{padding:"0"}};function Nz(e,t,i,r,l,s){const n=(0,o.up)("no-permission"),d=(0,o.up)("loading"),p=(0,o.up)("settings-header"),f=(0,o.up)("view-selector"),u=(0,o.up)("date-select-and-list"),c=(0,o.up)("setting-not-enabled"),h=(0,o.up)("foxy-snackbar");return(0,o.wg)(),(0,o.iD)("form",{novalidate:"",onSubmit:t[2]||(t[2]=(0,a.iM)(((...t)=>e.submit&&e.submit(...t)),["stop","prevent"]))},[s.currentUserCanBlackout?l.loading?((0,o.wg)(),(0,o.j4)(d,{key:1,message:e.translations.settings.blackout.loading},null,8,["message"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[e.currentUserCan("ssa_manage_site_settings")?((0,o.wg)(),(0,o.j4)(p,{key:0})):(0,o.kq)("",!0),e.settings.blackout_dates.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[l.saving?((0,o.wg)(),(0,o.j4)(d,{key:0,message:e.translations.settings.blackout.saving},null,8,["message"])):((0,o.wg)(),(0,o.iD)("fieldset",qz,[(0,o.Wm)(f),(0,o.Wm)(u,{modelValue:s.blackout_dates,"onUpdate:modelValue":[t[0]||(t[0]=e=>s.blackout_dates=e),s.handleUpdatedValue],readonly:s.global_blackout_dates,saving:l.quickSaving},null,8,["modelValue","onUpdate:modelValue","readonly","saving"])]))],64)):((0,o.wg)(),(0,o.j4)(c,{key:2}))],64)):((0,o.wg)(),(0,o.j4)(n,{key:0})),(0,o.Wm)(h,{position:"top center",modelValue:l.isSavedMessageVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>l.isSavedMessageVisible=e),message:e.translations.settings.blackout.saved},null,8,["modelValue","message"])],32)}var $z={name:"SettingsBlackoutStaff",components:{NoPermission:ia,viewSelector:sz,dateSelectAndList:Wz,SettingsHeader:zO,SettingNotEnabled:GU,Loading:ge},props:{staffId:{type:[Number,String],required:!0}},data(){return{loading:!0,limit:[],moment:fe(),quickSaving:!1,saving:!1,staffSwitched:!1,isSavedMessageVisible:!1}},mounted(){"undefined"===typeof this.staff?this.fetchStaff().then((()=>{this.matchCurrentStaff(),this.loading=!1})).catch(((e,t)=>{console.log(t)})):(this.matchCurrentStaff(),this.staffSwitched=!0,this.loading=!1)},beforeRouteEnter(e,t,i){i((a=>{a.navigationGuard(e,t,i)}))},onBeforeRouteUpdate(e,t,i){this.navigationGuard(e,t,i)},beforeRouteLeave(e,t,i){this.saving=!0,this.saveStaff().then((()=>{this.saving=!1,i()}))},watch:{staffId(){this.saving=!0,this.saveStaff().then((()=>{this.saving=!1,this.matchCurrentStaff(),this.staffSwitched=!0}))}},computed:{blackout_dates:{get(){return this.currentStaff&&this.currentStaff.blackout_dates&&this.currentStaff.blackout_dates.dates?wa().sortBy(this.currentStaff.blackout_dates.dates,(e=>fe()(e).format($))):[]},set(e){this.setStaffBlackoutDates(e)}},currentUserCanBlackout(){return this.currentUserCan("ssa_manage_staff")||this.currentUserCan("ssa_manage_staff_blackout_dates")},global_blackout_dates(){return wa().sortBy(this.settings.blackout_dates.dates,(e=>fe()(e).format($)))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("staff",["currentStaff","staff"]),...(0,m.Se)("staff",["currentUserCan","currentUserIsStaff","currentUserStaffId","staffModule"])},methods:{handleUpdatedValue(){this.staffSwitched?this.staffSwitched=!1:this.quickSaveDates()},matchCurrentStaff(){this.setCurrentStaff(this.staff.find((e=>e.id===this.staffId)))},navigationGuard(e,t,i){this.currentUserCan("ssa_manage_staff")?i():this.currentUserIsStaff?this.$router.push("/ssa/settings/blackout/"+this.currentUserStaffId):this.$router.push("/ssa")},quickSaveDates:wa().debounce((function(){this.quickSaving=!0,this.saveStaff().then((()=>{this.quickSaving=!1,this.isSavedMessageVisible=!0}))}),2e3),...(0,m.nv)(["fetchSettings"]),...(0,m.nv)("staff",["fetchStaff","saveStaff"]),...(0,m.OI)("staff",["setCurrentStaff","setStaffBlackoutDates"])}};const Hz=(0,he.Z)($z,[["render",Nz],["__scopeId","data-v-19ef226c"]]);var Zz=Hz,Yz=[{path:"blackout",name:"settings-blackout",component:jz},{path:"blackout/:staffId",name:"settings-blackout-staff",component:Zz,props:!0}];const Kz={class:"notifications-all"};function Jz(e,t,i,a,r,l){const s=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",Kz,[(0,o.Wm)(s,{onSaved:l.backToList},null,8,["onSaved"])])}var Xz={name:"NotificationsAll",data(){return{}},methods:{backToList(){this.$router.push("/ssa/settings/notifications/list")}}};const Qz=(0,he.Z)(Xz,[["render",Jz]]);var eP=Qz;const tP={class:"notifications-settings"},iP={style:{flex:"1"}},aP={class:"md-title"},oP=["src"],rP={class:"md-title"},lP={class:"screen-reader-text"},sP=(0,o._)("span",{style:{flex:"1"}},null,-1),nP={class:"screen-reader-text"},dP=["src"],pP={class:"md-title"},fP=(0,o._)("span",{style:{flex:"1"}},null,-1),uP={class:"screen-reader-text"},cP={key:0,class:"notification-list"};function hP(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-toolbar"),u=(0,o.up)("foxy-card-media"),c=(0,o.up)("foxy-notification"),h=(0,o.up)("foxy-card-header-text"),m=(0,o.up)("foxy-card-header"),g=(0,o.up)("foxy-switch"),_=(0,o.up)("foxy-card-actions"),y=(0,o.up)("foxy-card"),w=(0,o.up)("promo-sms"),x=(0,o.up)("foxy-dialog"),C=(0,o.up)("notification-filter"),v=(0,o.up)("list-item"),b=(0,o.up)("foxy-empty"),B=(0,o.up)("foxy-dialog-title"),S=(0,o.up)("foxy-dialog-content"),k=(0,o.up)("foxy-dialog-button"),A=(0,o.up)("foxy-dialog-footer"),M=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",tP,[(0,o.Wm)(d),e.settings.notifications.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(f,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("div",iP,[(0,o._)("h2",aP,(0,r.zw)(e.translations.settings.notifications.title),1)]),(0,o.Wm)(p,{"data-test":"test-add-new-notification",class:"md-primary",onClick:n.addNotification,icon:"add"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.actions.addNew),1)])),_:1},8,["onClick"])])),_:1}),e.smsModule.installed?((0,o.wg)(),(0,o.j4)(y,{key:0,"md-with-hover":n.sms_enabled,class:(0,r.C_)(["settings",{disabled:!n.sms_enabled}]),onClick:n.maybeEdit},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{class:"md-card-header-flex"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o._)("img",{src:e.api.admin_static_url+"/images/settings-sms.svg",alt:"SMS"},null,8,oP)])),_:1}),(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[(0,o._)("h2",rP,(0,r.zw)(e.translations.settings.sms.title),1),e.smsModule.enabled&&!e.smsModule.active?((0,o.wg)(),(0,o.j4)(c,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.noConnection),1)])),_:1})):e.smsModule.enabled&&e.settings.sms.twilio_test_mode_enabled?((0,o.wg)(),(0,o.j4)(c,{key:1,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.testModeWarning),1)])),_:1})):(0,o.kq)("",!0)])),_:1})])),_:1}),(0,o.Wm)(_,{class:"split-actions"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{id:"sms",modelValue:n.sms_enabled,"onUpdate:modelValue":t[0]||(t[0]=e=>n.sms_enabled=e),onClick:(0,a.iM)(n.doNothing,["stop"])},{default:(0,o.w5)((()=>[(0,o._)("span",lP,(0,r.zw)(e.translations.settings.enable)+" "+(0,r.zw)(e.translations.settings.sms.title),1)])),_:1},8,["modelValue","onClick"]),sP,(0,o.Wm)(p,{onClick:n.maybeEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.edit)+" ",1),(0,o._)("div",nP,(0,r.zw)(e.translations.settings.sms.title),1)])),_:1},8,["onClick"])])),_:1})])),_:1},8,["md-with-hover","class","onClick"])):(0,o.kq)("",!0),e.smsModule.installed?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(y,{key:1,"md-with-hover":n.sms_enabled,class:"settings disabled",onClick:n.showUpgrade},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{class:"md-card-header-flex"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o._)("img",{src:e.api.admin_static_url+"/images/settings-sms.svg",alt:"SMS"},null,8,dP)])),_:1}),(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[(0,o._)("h2",pP,(0,r.zw)(e.translations.settings.sms.title),1)])),_:1})])),_:1}),(0,o.Wm)(_,{class:"split-actions"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,{disabled:""}),fP,(0,o.Wm)(p,{onClick:n.showUpgrade},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.actions.edit)+" ",1),(0,o._)("div",uP,(0,r.zw)(e.translations.settings.sms.title),1)])),_:1},8,["onClick"])])),_:1})])),_:1},8,["md-with-hover","onClick"])),(0,o.Wm)(x,{ref:"upgradeSMS"},{default:(0,o.w5)((()=>[(0,o.Wm)(w,{"upgrade-url-params":s.smsUpgradeParams,dismissable:!1,onPromoClicked:n.closeDialog},null,8,["upgrade-url-params","onPromoClicked"])])),_:1},512),e.settings.notifications.notifications.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o.Wm)(C),e.filteredNotifications.length?((0,o.wg)(),(0,o.iD)("ul",cP,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.filteredNotifications,(e=>((0,o.wg)(),(0,o.j4)(v,{key:e.id,notification:e,onEdit:n.editNotification,onClone:n.cloneNotification,onDelete:n.confirmDelete},null,8,["notification","onEdit","onClone","onDelete"])))),128))])):((0,o.wg)(),(0,o.j4)(b,{key:1,label:e.translations.settings.notifications.filter.empty_label,description:e.translations.settings.notifications.filter.empty_desc},null,8,["label","description"]))],64)):((0,o.wg)(),(0,o.j4)(b,{key:3,label:e.translations.settings.notifications.empty},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{mode:"raised",icon:"add",class:"md-primary",onClick:n.addNotification},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.actions.addNew),1)])),_:1},8,["onClick"])])),_:1},8,["label"])),(0,o.Wm)(x,{ref:"confirmDelete","data-test":"test-confirm-delete-nofifications"},{default:(0,o.w5)((()=>[(0,o.Wm)(B,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.confirmDelete),1)])),_:1}),s.deletedId||0===s.deletedId?((0,o.wg)(),(0,o.j4)(S,{key:0},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.settings.notifications.notifications[n.deletedIndex].title),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(A,null,{default:(0,o.w5)((()=>[(0,o.Wm)(k,{action:"dismiss",onClick:n.cancelDelete},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.confirmDeleteCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(k,{action:"accept",onClick:n.deleteNotification},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.confirmDeleteOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512),(0,o.Wm)(x,{ref:"enableSetting"},{default:(0,o.w5)((()=>[(0,o.Wm)(B,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.title),1)])),_:1}),(0,o.Wm)(S,null,{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.settings.disabledWarning),1)])),_:1}),(0,o.Wm)(A,null,{default:(0,o.w5)((()=>[(0,o.Wm)(k,{action:"dismiss",onClick:n.closeDialogs},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(k,{action:"accept",class:"md-primary",onClick:n.enableThis},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.enable),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512)],64)):((0,o.wg)(),(0,o.j4)(M,{key:1}))])}const mP={class:"screen-reader-text"},gP={class:"md-list-text-container"};function _P(e,t,i,a,l,s){const n=(0,o.up)("foxy-switch"),d=(0,o.up)("foxy-icon"),p=(0,o.up)("foxy-icon-button"),f=(0,o.up)("foxy-list-item"),u=(0,o.up)("foxy-menu"),c=(0,o.up)("foxy-menu-anchor");return(0,o.wg)(),(0,o.iD)("li",{class:(0,r.C_)(["notification-list-item",{"foxy-saving":l.saving}])},[(0,o.Wm)(n,{id:"notification-"+i.notification.id,modelValue:s.notificationActive,"onUpdate:modelValue":t[0]||(t[0]=e=>s.notificationActive=e),disabled:l.saving},{default:(0,o.w5)((()=>[(0,o._)("span",mP,(0,r.zw)(s.displayTitle(i.notification))+" "+(0,r.zw)(e.translations.settings.notifications.triggers[i.notification.trigger]),1)])),_:1},8,["id","modelValue","disabled"]),(0,o._)("div",{class:"md-list-item-container",onClick:t[1]||(t[1]=(...e)=>s.edit&&s.edit(...e))},[(0,o._)("div",gP,[(0,o._)("span",null,[(0,o.Uk)((0,r.zw)(s.displayTitle(i.notification))+" ",1),e.smsModule.active?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},["email"===i.notification.type?((0,o.wg)(),(0,o.j4)(d,{key:0,class:"small md-primary",icon:"email"})):"sms"===i.notification.type?((0,o.wg)(),(0,o.j4)(d,{key:1,class:"small md-primary",icon:"sms"})):(0,o.kq)("",!0)],64)):(0,o.kq)("",!0)]),(0,o._)("span",null,[e.remindersInstalled&&i.notification.duration>0&&i.notification.when?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.displayDuration(i.notification.duration)+" "+e.translations.settings.notifications.when[i.notification.when].toLowerCase()+" "),1)],64)):(0,o.kq)("",!0),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.notifications.triggers[i.notification.trigger]),1)])])]),(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{onClick:t[2]||(t[2]=e=>l.openMenu=!0)},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"settings"})])),_:1}),(0,o.Wm)(u,{modelValue:l.openMenu,"onUpdate:modelValue":t[3]||(t[3]=e=>l.openMenu=e)},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{onClick:s.edit},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.edit),1)])),_:1},8,["onClick"]),(0,o.Wm)(f,{onClick:s.clone},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"content_copy"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.clone),1)])),_:1},8,["onClick"]),(0,o.Wm)(f,{onClick:s.deleteThis},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.delete),1)])),_:1},8,["onClick"])])),_:1},8,["modelValue"])])),_:1})],2)}var yP={name:"NotificationListItem",props:["notification"],data(){return{saving:!1,openMenu:!1}},computed:{notificationActive:{get(){return!Object.prototype.hasOwnProperty.call(this.notification,"active")||this.notification.active},set(e){let t=wa().cloneDeep(this.notification);t.active=e,this.setSingleNotification({id:this.notification.id,notification:t,settings:this.settings,timestampFormat:this.timestampFormat}),this.saving=!0,this.saveNotificationSingle(this.notification.id).then((()=>{this.saving=!1}))}},...(0,m.rn)(["settings","timestampFormat"]),...(0,m.rn)("translations",["translations"]),...(0,m.Se)(["displayDuration"]),...(0,m.Se)("notifications",["remindersInstalled","smsModule"])},methods:{clone(){this.$emit("clone",this.notification.id)},deleteThis(){console.log("list item is emitting delete",this.notification.id),this.$emit("delete",this.notification.id)},displayTitle(){return this.notification.title?this.notification.title:this.notification.subject},edit(){this.$emit("edit",this.notification.id)},...(0,m.nv)("notifications",["saveNotificationSingle"]),...(0,m.OI)("notifications",["setSingleNotification"])}};const wP=(0,he.Z)(yP,[["render",_P]]);var xP=wP;const CP={class:"notification-filter"},vP=(0,o._)("div",{style:{flex:"1"}},null,-1),bP={key:0,class:"appointment-filter-bar",ref:"filterToolbar"},BP={class:"md-subheading"},SP=(0,o._)("div",{class:"clear"},null,-1),kP={class:"appointment-filter-bar-wrap"},AP={key:0,class:"filter-field"},MP={class:"filter-field"},DP={class:"appointment-filter-bar-wrap"},TP={class:"filter-field"},OP={class:"filter-field"},GP={class:"filter-button"};function EP(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-toolbar"),p=(0,o.up)("foxy-select-multiple");return(0,o.wg)(),(0,o.iD)("div",CP,[(0,o.Wm)(d,{class:"md-transparent"},{default:(0,o.w5)((()=>[vP,(0,o.Wm)(n,{class:"md-primary",onClick:s.toggleFilters,icon:"filter_list"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.filter.filter),1)])),_:1},8,["onClick"])])),_:1}),l.openFilters?((0,o.wg)(),(0,o.iD)("fieldset",bP,[(0,o._)("legend",BP,(0,r.zw)(e.translations.settings.notifications.filter.legend),1),SP,(0,o._)("div",kP,[e.smsModule.enabled?((0,o.wg)(),(0,o.iD)("div",AP,[(0,o.Wm)(p,{options:s.whoReceivesOptions,name:"notification-type",id:"notification-type",modelValue:s.filterNotificationType,"onUpdate:modelValue":t[0]||(t[0]=e=>s.filterNotificationType=e),label:e.filter.notification_type.length?e.translations.settings.notifications.filter.fields.type+" ("+e.filter.notification_type.length+" "+e.translations.settings.notifications.filter.selected+")":e.translations.settings.notifications.filter.fields.type},null,8,["options","modelValue","label"])])):(0,o.kq)("",!0),(0,o._)("div",MP,[(0,o.Wm)(p,{options:s.editableAppointmentTypesOptions,name:"appointment-type",id:"appointment-type",modelValue:s.filterAppointmentType,"onUpdate:modelValue":t[1]||(t[1]=e=>s.filterAppointmentType=e),label:e.filter.appointment_type.length?e.translations.settings.notifications.filter.fields.appointment_type+" ("+e.filter.appointment_type.length+" "+e.translations.settings.notifications.filter.selected+")":e.translations.settings.notifications.filter.fields.appointment_type},null,8,["options","modelValue","label"])])]),(0,o._)("div",DP,[(0,o._)("div",TP,[(0,o.Wm)(p,{options:s.notificationTriggersOptions,name:"trigger",id:"trigger",modelValue:s.filterTrigger,"onUpdate:modelValue":t[2]||(t[2]=e=>s.filterTrigger=e),label:e.filter.trigger.length?e.translations.settings.notifications.fields.trigger+" ("+e.filter.trigger.length+" "+e.translations.settings.notifications.filter.selected+")":e.translations.settings.notifications.fields.trigger},null,8,["options","modelValue","label"])]),(0,o._)("div",OP,[(0,o.Wm)(p,{options:s.sentToOptionsSelectOptions,name:"sent-to",id:"sent-to",modelValue:s.filterSentTo,"onUpdate:modelValue":t[3]||(t[3]=e=>s.filterSentTo=e),label:e.filter.sent_to.length?e.translations.settings.notifications.fields.sentTo+" ("+e.filter.sent_to.length+" "+e.translations.settings.notifications.filter.selected+")":e.translations.settings.notifications.fields.sentTo},null,8,["options","modelValue","label"])]),(0,o._)("div",GP,[(0,o.Wm)(n,{class:"md-primary",onClick:s.resetFilter,disabled:!e.filterApplied,icon:"delete_sweep"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.filter.reset),1)])),_:1},8,["onClick","disabled"])])])],512)):(0,o.kq)("",!0)])}var UP={name:"FilterNotifications",data(){return{openFilters:!1,notificationTriggers:v}},beforeMount(){this.remindersInstalled&&(this.notificationTriggers=b)},mounted(){},computed:{filterAppointmentType:{get(){return this.filter.appointment_type},set(e){this.setFilter({key:"appointment_type",value:e})}},filterNotificationType:{get(){return this.filter.notification_type},set(e){this.setFilter({key:"notification_type",value:e})}},filterSentTo:{get(){return this.filter.sent_to},set(e){this.setFilter({key:"sent_to",value:e})}},filterTrigger:{get(){return this.filter.trigger},set(e){this.setFilter({key:"trigger",value:e})}},whoReceivesOptions(){return[{value:"email",label:this.translations.settings.notifications.fields.email},{value:"sms",label:this.translations.settings.notifications.fields.sms}]},editableAppointmentTypesOptions(){return this.editableAppointmentTypes.map((e=>({value:e.id,label:e.title})))},notificationTriggersOptions(){return this.notificationTriggers.map((e=>({value:e,label:this.translations.settings.notifications.triggers[e]})))},sentToOptionsSelectOptions(){return this.sentToOptions.map((e=>({value:e,label:e})))},...(0,m.rn)("notifications",["filter"]),...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("notifications",["filterApplied","remindersInstalled","sentToOptions","smsModule"]),...(0,m.Se)("appointment_types",["editableAppointmentTypes"])},methods:{resetFilter(){this.setFilter(A),this.openFilters=!1},toggleFilters(){this.openFilters=!this.openFilters},...(0,m.OI)("notifications",["setFilter"])}};const FP=(0,he.Z)(UP,[["render",EP]]);var IP=FP;const zP=["href"],PP=["src"],VP={class:"md-title"};function WP(e,t,i,a,l,s){const n=(0,o.up)("foxy-card-media"),d=(0,o.up)("foxy-card-header"),p=(0,o.up)("foxy-card-area"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-card-actions"),c=(0,o.up)("foxy-card-content"),h=(0,o.up)("foxy-card");return(0,o.wg)(),(0,o.j4)(h,{"md-with-hover":!0,transition:"fade","md-column":"",class:"limited-width",onClick:s.promoClicked},{default:(0,o.w5)((()=>[(0,o.Wm)(n,null,{default:(0,o.w5)((()=>[(0,o._)("a",{href:e.upgradeUrlParsed(e.proUpgradeLink,i.upgradeUrlParams),target:"_blank"},[(0,o._)("img",{src:e.api.admin_static_url+"/images/promo-sms.svg",alt:"Simply Schedule Appointments Plus",class:"promo-img promo-plus"},null,8,PP)],8,zP)])),_:1}),(0,o.Wm)(d,null,{default:(0,o.w5)((()=>[(0,o._)("h2",VP,(0,r.zw)(e.translations.promo.smsUpgrade.title),1)])),_:1}),(0,o.Wm)(c,null,{default:(0,o.w5)((()=>[(0,o.Wm)(p,{"md-inset":""},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.promo.smsUpgrade.text),1)])),_:1}),(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Wm)(f,{mode:"raised",class:"md-accent",href:e.upgradeUrlParsed(e.proUpgradeLink,i.upgradeUrlParams),target:"_blank"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.promo.smsUpgrade.cta),1)])),_:1},8,["href"])])),_:1})])),_:1})])),_:1},8,["onClick"])}var RP={name:"PromoSms",store:$J,props:{dismissable:{type:Boolean,default:!0},upgradeUrlParams:{type:Object,default(){return{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-pro",utm_term:"sms",utm_content:"sms-pro-popup"}}}},data(){return{slug:"promo-sms"}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api"]),...(0,m.Se)(["upgradeUrlParsed","proUpgradeLink"])},methods:{promoClicked(){this.$emit("promoClicked")}}};const LP=(0,he.Z)(RP,[["render",WP]]);var jP=LP,qP={name:"SettingsNotifications",components:{SettingsHeader:zO,ListItem:xP,SettingNotEnabled:GU,NotificationFilter:IP,PromoSms:jP},data(){return{deletedId:null,smsUpgradeParams:{utm_source:"plugin",utm_medium:"ads",utm_campaign:"upgrade-pro",utm_term:"sms",utm_content:"sms-settings-card-popup"}}},watch:{sms_enabled(){this.getNotificationGuides()}},mounted(){this.getNotificationGuides()},computed:{deletedIndex(){if(this.deletedId)return this.settings.notifications.notifications.findIndex((e=>e.id===this.deletedId))},sms_enabled:{get(){return!!Object.prototype.hasOwnProperty.call(this.settings,"sms")&&(!!this.settings.sms.enabled&&!!this.settings.installed.sms)},set(e){this.setSmsEnabled({settings:this.settings,payload:e}),this.saveSmsSettings()}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings"]),...(0,m.Se)("notifications",["filteredNotifications","remindersInstalled","smsModule"])},methods:{addNotification(){this.$router.push({name:"notification-single"})},cancelDelete(){this.$refs["confirmDelete"].close()},cloneNotification(e){this.cloneSettingsNotification({settings:this.settings,id:e});let t=this.settings.notifications.notifications[this.settings.notifications.notifications.length-1].id;this.saveNotificationSingle(t),this.$router.push({name:"notification-single",params:{id:t}})},closeDialogs(){this.$refs["enableSetting"].close()},confirmDelete(e){this.deletedId=e,this.$refs["confirmDelete"].open()},deleteNotification(){this.deleteNotificationSingle(this.deletedId),this.deletedId=null,this.$refs["confirmDelete"].close()},displayTitle(e){return e.title?e.title:e.subject},doNothing(){},editNotification(e){this.$router.push({name:"notification-single",params:{id:e}})},editSms(){this.$router.push("/ssa/settings/notifications/sms")},enableThis(){this.sms_enabled=!0,this.editSms()},maybeEdit(){this.sms_enabled?this.editSms():this.$refs["enableSetting"].open()},getNotificationGuides(){let e=[K.notifications.list];this.smsModule.installed&&this.smsModule.enabled&&e.push(K.notifications.sms_enabled),this.getGuides({"ssasc-plugin-screen":e})},closeDialog(){this.$refs["upgradeSMS"].close()},showUpgrade(){this.$refs["upgradeSMS"].open()},...(0,m.OI)("notifications",["cloneSettingsNotification","deleteSettingsNotification","setSmsEnabled"]),...(0,m.nv)("notifications",["deleteNotificationSingle","saveNotificationSingle","saveSmsSettings"]),...(0,m.nv)("guides",["getGuides"])}};const NP=(0,he.Z)(qP,[["render",hP]]);var $P=NP;const HP={class:"md-title"},ZP={key:0,class:"check-list"},YP={key:0,class:"link-hint"},KP={key:0,class:"md-error"},JP={key:3,style:{"margin-top":"12px"}},XP={key:4,class:"md-fieldset contains-layout"},QP={class:"customised-notification-list"},eV={href:"https://simplyscheduleappointments.com/guides/scheduled-event-and-cron-errors/",target:"_blank"},tV={key:0,class:"md-error"},iV={class:"foxy-list-default"},aV={key:0},oV={class:"md-fieldset has-top-menu required","data-test":"test-notification-preview-fieldset"},rV={class:"button-bar"};function lV(e,t,i,l,s,n){const d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-switch"),f=(0,o.up)("foxy-textfield"),u=(0,o.up)("foxy-radio"),c=(0,o.up)("foxy-checkbox-multi"),h=(0,o.up)("foxy-icon"),m=(0,o.up)("router-link"),g=(0,o.up)("foxy-chip-set-editable"),_=(0,o.up)("foxy-list-item"),y=(0,o.up)("foxy-select"),w=(0,o.up)("duration"),x=(0,o.up)("foxy-layout"),C=(0,o.up)("foxy-notification"),v=(0,o.up)("foxy-checkbox"),b=(0,o.up)("token-text"),B=(0,o.up)("preview"),S=(0,o.up)("foxy-progress-circular"),k=(0,o.up)("notification-details"),A=(0,o.up)("promo-sms"),M=(0,o.up)("foxy-dialog"),D=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{onSubmit:t[19]||(t[19]=(0,a.iM)((()=>{}),["prevent"])),class:"notification-edit"},[(0,o.Wm)(d,{onClick:n.cancelEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o._)("h2",HP,[i.id||0===i.id?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(p,{modelValue:n.active,"onUpdate:modelValue":t[0]||(t[0]=e=>n.active=e)},null,8,["modelValue"]),(0,o.Uk)(" "+(0,r.zw)(e.translations.settings.notifications.actions.edit),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.actions.addNew),1)],64))]),(0,o.Wm)(f,{"data-test":"test-notification-title-textfield",valid:s.validTitle,required:"",modelValue:n.title,"onUpdate:modelValue":t[1]||(t[1]=e=>n.title=e),label:e.translations.settings.notifications.fields.title,id:"title",helptext:s.validTitle?"":e.translations.settings.notifications.messages.titleError,"helptext-persistent":"","helptext-validation":""},null,8,["valid","modelValue","label","helptext"]),e.smsModule.active||!e.smsModule.installed?((0,o.wg)(),(0,o.iD)("fieldset",ZP,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.notifications.fields.type),1),(0,o.Wm)(u,{modelValue:n.type,"onUpdate:modelValue":t[2]||(t[2]=e=>n.type=e),id:"type-email",name:"notificationstype",value:"email"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.fields.email),1)])),_:1},8,["modelValue"]),(0,o.Wm)(u,{modelValue:n.type,"onUpdate:modelValue":t[3]||(t[3]=e=>n.type=e),disabled:!e.smsModule.installed,onClick:n.maybeShowUpgrade,id:"type-sms",name:"notificationstype",value:"sms"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.fields.sms)+" ",1),e.smsModule.installed?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("span",YP,(0,r.zw)(e.translations.promo.smsUpgrade.radioHint),1))])),_:1},8,["modelValue","disabled","onClick"])])):(0,o.kq)("",!0),"sms"===n.type?((0,o.wg)(),(0,o.iD)("fieldset",{key:1,"data-test":"test-notification-sms-sentto-fieldset",class:(0,r.C_)(["md-fieldset check-list",{"md-fieldset-invalid":!s.validSmsTo}])},[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.notifications.fields.smsTo),1),s.validSmsTo?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",KP,(0,r.zw)(e.translations.settings.notifications.messages.smsToError),1)),(0,o._)("ul",null,[(0,o._)("li",null,[e.settings.global.admin_phone?((0,o.wg)(),(0,o.j4)(c,{key:0,class:"mdc-theme-name--light-green",id:"admin-phone",modelValue:n.sms_to,"onUpdate:modelValue":t[4]||(t[4]=e=>n.sms_to=e),value:"{{ admin_phone }}"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.general.phone),1)])),_:1},8,["modelValue"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(h,{theme:"amber",icon:"warning"}),(0,o._)("span",null,[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.messages.noAdminPhone)+" ",1),(0,o.Wm)(m,{to:"/ssa/settings/general"},{default:(0,o.w5)((()=>[(0,o.Uk)("Add phone")])),_:1})])],64))]),(0,o._)("li",null,[e.settings.installed.staff&&e.settings.staff.enabled?((0,o.wg)(),(0,o.j4)(c,{key:0,class:"mdc-theme-name--light-green",id:"team-member-phone",modelValue:n.sms_to,"onUpdate:modelValue":t[5]||(t[5]=e=>n.sms_to=e),value:"{{ team_member_phone }}"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.team_member_phone),1)])),_:1},8,["modelValue"])):(0,o.kq)("",!0)]),(0,o._)("li",null,[n.noPhone?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(h,{theme:"amber",icon:"warning"}),(0,o._)("span",null,[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.messages.noCustomerEmail)+" ",1),(0,o.Wm)(m,{to:"/ssa/appointment-types/edit/customerInfo"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.advanced_scheduling.editTypes),1)])),_:1})])],64)):((0,o.wg)(),(0,o.j4)(c,{key:1,class:"mdc-theme-name--light-green",id:"customer-phone",modelValue:n.sms_to,"onUpdate:modelValue":t[6]||(t[6]=e=>n.sms_to=e),value:"{{ customer_phone }}"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.customer_phone),1)])),_:1},8,["modelValue"]))])])],2)):((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o.Wm)(g,{"data-test":"test-notification-email-sentto-field",modelValue:n.sent_to,"onUpdate:modelValue":t[7]||(t[7]=e=>n.sent_to=e),"error-text":e.translations.settings.notifications.messages.sentToError,label:e.translations.settings.notifications.fields.sentTo,"anchor-text":e.translations.settings.notifications.fields.anchorText,options:s.emailOptions,theme:"light-green",onValidateBeforeAdd:n.validateTo,"valid-add":s.validTo,required:!0},null,8,["modelValue","error-text","label","anchor-text","options","onValidateBeforeAdd","valid-add"]),(0,o._)("p",null,[(0,o.Wm)(d,{onClick:n.toggleShowCc,"trailing-icon":s.showCc?"expand_less":"expand_more"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.showCc?e.translations.settings.notifications.hideCcBccReplyToLabel:e.translations.settings.notifications.showCcBccReplyToLabel),1)])),_:1},8,["onClick","trailing-icon"])]),s.showCc?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(g,{modelValue:n.cc,"onUpdate:modelValue":t[8]||(t[8]=e=>n.cc=e),"error-text":e.translations.settings.notifications.messages.sentToError,label:e.translations.settings.notifications.fields.cc,"anchor-text":e.translations.settings.notifications.fields.anchorText,options:s.emailOptions,theme:"light-green",onValidateBeforeAdd:n.validateCc,"valid-add":s.validCc},null,8,["modelValue","error-text","label","anchor-text","options","onValidateBeforeAdd","valid-add"]),(0,o.Wm)(g,{modelValue:n.bcc,"onUpdate:modelValue":t[9]||(t[9]=e=>n.bcc=e),"error-text":e.translations.settings.notifications.messages.sentToError,label:e.translations.settings.notifications.fields.bcc,"anchor-text":e.translations.settings.notifications.fields.anchorText,options:s.emailOptions,theme:"light-green",onValidateBeforeAdd:n.validateBcc,"valid-add":s.validBcc},null,8,["modelValue","error-text","label","anchor-text","options","onValidateBeforeAdd","valid-add"]),(0,o.Wm)(g,{modelValue:n.replyTo,"onUpdate:modelValue":t[10]||(t[10]=e=>n.replyTo=e),"error-text":e.translations.settings.notifications.messages.sentToError,label:e.translations.settings.notifications.fields.replyTo,"anchor-text":e.translations.settings.notifications.fields.anchorText,options:s.emailOptions,theme:"light-green","help-text":e.translations.settings.notifications.messages.replyToHelpText,onValidateBeforeAdd:n.validateReplyTo,"valid-add":s.validReplyTo},null,8,["modelValue","error-text","label","anchor-text","options","help-text","onValidateBeforeAdd","valid-add"])],64)):(0,o.kq)("",!0)],64)),e.remindersInstalled?((0,o.wg)(),(0,o.iD)("fieldset",XP,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.notifications.fields.triggerLegend),1),(0,o.Wm)(x,{"md-gutter":!0},{default:(0,o.w5)((()=>[(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Wm)(w,{"allow-null":!0,"error-text":n.durationError,modelValue:n.duration,"onUpdate:modelValue":t[12]||(t[12]=e=>n.duration=e)},null,8,["error-text","modelValue"])])),_:1}),(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Wm)(y,{label:e.translations.settings.notifications.fields.when,modelValue:n.when,"onUpdate:modelValue":t[13]||(t[13]=e=>n.when=e),disabled:n.disableWhen},{default:(0,o.w5)((()=>[(0,o.Wm)(_,{role:"option","data-value":"after"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.when.after),1)])),_:1}),(0,o.Wm)(_,{role:"option","data-value":"before"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.when.before),1)])),_:1})])),_:1},8,["label","modelValue","disabled"])])),_:1}),(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Wm)(y,{label:e.translations.settings.notifications.fields.trigger,modelValue:n.trigger,"onUpdate:modelValue":t[14]||(t[14]=e=>n.trigger=e),required:!0},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.notificationTriggers,(t=>((0,o.wg)(),(0,o.j4)(_,{"data-value":t,key:t,role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.triggers[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue"])])),_:1})])),_:1}),(0,o.Wm)(a.uT,{name:"fade"},{default:(0,o.w5)((()=>[n.showWarning?((0,o.wg)(),(0,o.j4)(C,{key:0,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o._)("ul",QP,[(0,o._)("li",null,(0,r.zw)(e.translations.settings.notifications.warnings.cronWarning),1),(0,o._)("li",null,(0,r.zw)(e.translations.settings.notifications.warnings.cronWarningNoShow),1)]),(0,o._)("a",eV,(0,r.zw)(e.translations.settings.notifications.warnings.cronLinkText),1)])),_:1})):(0,o.kq)("",!0)])),_:1})])):((0,o.wg)(),(0,o.iD)("div",JP,[(0,o.Wm)(y,{label:e.translations.settings.notifications.fields.trigger,id:"trigger",modelValue:n.trigger,"onUpdate:modelValue":t[11]||(t[11]=e=>n.trigger=e),required:"",helptext:e.translations.settings.notifications.messages.triggerError,"helptext-validation":s.validTrigger},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.notificationTriggers,(t=>((0,o.wg)(),(0,o.j4)(_,{key:t,role:"option","data-value":t},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.triggers[t]),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["label","modelValue","helptext","helptext-validation"])])),(0,o._)("fieldset",{class:(0,r.C_)(["md-fieldset",{"md-fieldset-invalid":!s.validAppointmentTypes}])},[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.appointmentTypesTitle),1),s.validAppointmentTypes?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",tV,(0,r.zw)(e.translations.settings.notifications.messages.appointmentTypesError),1)),n.noPhone?((0,o.wg)(),(0,o.j4)(C,{key:1,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.noPhoneFields),1)])),_:1})):n.notAllPhone?((0,o.wg)(),(0,o.j4)(C,{key:2,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.onlyPhoneFields),1)])),_:1})):(0,o.kq)("",!0),(0,o._)("ul",iV,[n.notAllPhone?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("li",aV,[(0,o.Wm)(v,{modelValue:s.all,"onUpdate:modelValue":t[15]||(t[15]=e=>s.all=e),label:e.translations.settings.appointmentTypeAll,onToggle:n.toggleAll},null,8,["modelValue","label","onToggle"])])),s.all?(0,o.kq)("",!0):((0,o.wg)(!0),(0,o.iD)(o.HY,{key:1},(0,o.Ko)(n.appointmentTypeOptions,(e=>((0,o.wg)(),(0,o.iD)("li",{key:e.id},[(0,o.Wm)(v,{id:"type-"+e.id,name:"appointment-types",value:e.id.toString(),modelValue:n.appointment_types,"onUpdate:modelValue":t[16]||(t[16]=e=>n.appointment_types=e),label:e.title,class:"md-primary"},null,8,["id","value","modelValue","label"])])))),128))])],2),"email"===n.type?((0,o.wg)(),(0,o.iD)("fieldset",{key:5,"data-test":"test-notification-subject-fieldset",class:(0,r.C_)(["md-fieldset has-top-menu required",{"md-fieldset-invalid":!s.validSubject}])},[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.notifications.fields.subject),1),(0,o.Wm)(b,{options:s.notificationTokens,required:!0,onValidate:n.validateSubject,modelValue:n.subject,"onUpdate:modelValue":t[17]||(t[17]=e=>n.subject=e)},null,8,["options","onValidate","modelValue"])],2)):(0,o.kq)("",!0),(0,o._)("fieldset",{"data-test":"test-notification-message-fieldset",class:(0,r.C_)(["md-fieldset has-top-menu required",{"md-fieldset-invalid":!s.validMessage}])},[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.notifications.fields.message),1),(0,o.Wm)(b,{options:s.notificationTokens,required:!0,onValidate:n.validateMessage,modelValue:n.message,"onUpdate:modelValue":t[18]||(t[18]=e=>n.message=e),"show-preview":!1},null,8,["options","onValidate","modelValue"])],2),(0,o._)("fieldset",oV,[(0,o.Wm)(B,{message:n.message,"selected-appointment-types":n.appointment_types},null,8,["message","selected-appointment-types"])]),(0,o._)("div",rV,[(0,o.Wm)(d,{mode:"secondary",onClick:n.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(d,{"data-test":"test-notification-save",mode:"raised",onClick:n.saveNotification,disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick","disabled"]),s.saving?((0,o.wg)(),(0,o.j4)(S,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)]),(0,o.Wm)(k,{title:e.translations.settings.notifications.tokenDetailsTitle,description:e.translations.settings.notifications.tokenDetails},null,8,["title","description"]),(0,o.Wm)(M,{ref:"upgradeSms"},{default:(0,o.w5)((()=>[(0,o.Wm)(A,{dismissable:!1,onPromoClicked:n.closeDialog},null,8,["onPromoClicked"])])),_:1},512)],32),(0,o.Wm)(D,{ref:"confirmLeaveDirty",title:e.translations.settings.notifications.confirmIgnoreChangesTitle,"content-html":e.translations.settings.notifications.confirmIgnoreChangesContent,"ok-text":e.translations.settings.notifications.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.notifications.confirmIgnoreChangesCancel,onConfirm:n.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}function sV(e){return{version:"__VERSION__",install:t=>{Object.entries(e).forEach((([e,i])=>{const a=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=t._context.components[a];o||t.component(a,i)}))},components:e}}function nV(e,t,i,a=!1){if(e){t=t.toLowerCase();const o="function"===typeof CustomEvent?new CustomEvent(t,{detail:i,bubbles:a}):dV(t,a,i);e.dispatchEvent(o)}}const dV=(e,t,i)=>{const a=document.createEvent("CustomEvent");return a.initCustomEvent(e,t,!1,i)},pV={name:"custom-link",props:{tag:String,to:[String,Object],href:String,target:String},setup(e,{slots:t,attrs:i}){const a={};return e.href&&""!==e.href&&(a.href=e.href,a.target=e.target),()=>{const{to:r,href:l}=e,s=(0,o.LL)("router-link");if(r&&s){const a=e.tag??"a";return(0,o.h)(s,{custom:!0,...i,to:r},{default:e=>(0,o.h)(a,{...i,onClick:t=>{t.__itemId=i.itemId,e.navigate(t)}},t.default?.())})}const n=l?"a":e.tag??"a",d=l?"link":"button"!==n?"button":null,p=t.default?.();return(0,o.h)(n,{...i,...a,role:d},{default:()=>p})}}},fV={inheritAttrs:!1},uV=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],cV={props:{theming:{type:String,default:""},theme:{type:String,default:"default"}},mounted(){uV.indexOf(this.theming)>-1&&this.$el.classList.add("mdc-theme--"+this.theming),this.theme&&this.$el.classList.add("mdc-theme-name--"+this.theme)}},hV=["id"],mV={class:"mdc-evolution-chip__cell mdc-evolution-chip__cell--primary",role:"gridcell"},gV={class:"mdc-evolution-chip__action mdc-evolution-chip__action--primary",type:"button",tabindex:"0","data-mdc-deletable":"true","aria-label":"Press backspace or delete to remove"},_V=(0,o._)("span",{class:"mdc-evolution-chip__ripple mdc-evolution-chip__ripple--primary"},null,-1),yV={class:"mdc-evolution-chip__text-label"},wV=(0,o._)("span",{class:"mdc-evolution-chip__ripple mdc-evolution-chip__ripple--trailing"},null,-1),xV={class:"mdc-evolution-chip__icon mdc-evolution-chip__icon--trailing material-icons"};function CV(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("span",{class:(0,r.C_)(["mdc-evolution-chip mdc-theme-name--light-green",{"mdc-ripple-upgraded--background-focused":i.focused}]),role:"presentation",id:s.id},[(0,o._)("span",mV,[(0,o._)("button",gV,[_V,(0,o._)("span",yV,(0,r.zw)(i.value),1)])]),i.trailingIcon?((0,o.wg)(),(0,o.iD)("button",{key:0,onClick:t[0]||(t[0]=t=>e.$emit("remove",s.id)),class:"mdc-evolution-chip__action mdc-evolution-chip__action--trailing",type:"button",tabindex:"-1","data-mdc-deletable":"true","aria-hidden":"true"},[wV,(0,o._)("span",xV,(0,r.zw)(i.trailingIcon),1)])):(0,o.kq)("",!0)],10,hV)}var vV={name:"MdcChp",mixins:[cV,fV],props:{value:{type:String,default:""},focused:[Boolean],leadingIcon:{type:String,default:""},trailingIcon:{type:String,default:""}},data(){return{}},computed:{id(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}}};const bV=(0,he.Z)(vV,[["render",CV]]);var BV=bV;const SV={class:"mdc-evolution-chip-set__chips",ref:"chips",role:"presentation"};function kV(e,t,i,a,l,s){const n=(0,o.up)("foxy-chip");return(0,o.wg)(),(0,o.iD)("div",{class:(0,r.C_)(l.classes),role:"listbox","aria-orientation":"horizontal","aria-multiselectable":"true"},[(0,o._)("span",SV,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(i.chips,((t,a)=>((0,o.wg)(),(0,o.j4)(n,{theming:e.theming,theme:e.theme,"trailing-icon":i.trailingIcon,"leading-icon":i.leadingIcon,value:t,focused:i.focused===t,onRemove:s.handleRemove,key:a},null,8,["theming","theme","trailing-icon","leading-icon","value","focused","onRemove"])))),128))],512)],2)}var AV=i(88676),MV={name:"MdcChipSet",props:{chips:{type:Array,default(){return[]}},focused:{type:String,default:""},input:[Boolean],newChip:{type:Object,default(){return{}}},trailingIcon:{type:String,default:""},leadingIcon:{type:String,default:""}},mixins:[cV,fV],components:{FoxyChip:BV},data(){return{mdcChipSet:void 0,classes:{"mdc-evolution-chip-set":!0,"mdc-evolution-chip-set--input":this.input}}},watch:{newChip(e){this.handleAdd(e)}},mounted(){this.mdcChipSet=new AV.Q(this.$el),this.mdcChipSet.listen("MDCChipSet:removal",this.handleRemove)},beforeUnmount(){this.mdcChipSet.unlisten("MDCChipSet:removal",this.handleRemove),this.mdcChipSet.destroy()},methods:{handleAdd(e){this.$emit("addChip",e.text)},handleRemove(e){const t=this.$el.querySelector('.mdc-evolution-chip[id="'+e+'"] .mdc-evolution-chip__text-label').innerHTML.trim();this.$emit("removeChip",t)}}};const DV=(0,he.Z)(MV,[["render",kV]]);var TV=DV;const OV=(0,o._)("span",{class:"screen-reader-text"},null,-1),GV=["autocomplete"],EV={class:"screen-reader-text"},UV={class:"helper-text"};function FV(e,t,i,a,l,s){const n=(0,o.up)("foxy-chip-set"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-list-item"),f=(0,o.up)("foxy-menu"),u=(0,o.up)("foxy-menu-anchor");return(0,o.wg)(),(0,o.iD)("fieldset",{class:(0,r.C_)(s.containerClasses)},[(0,o._)("legend",null,(0,r.zw)(i.label),1),(0,o._)("div",{class:(0,r.C_)(s.chipContainerClasses),onClick:t[5]||(t[5]=(...e)=>s.focusInput&&s.focusInput(...e))},[(0,o.Wm)(n,{chips:l.componentValue,focused:l.focused,input:!0,"new-chip":l.addedChip,theme:e.theme,theming:e.theming,"trailing-icon":"close",ref:"chipSet",onKeydown:s.backspaceRemoveChip,onRemoveChip:s.removeChip,onAddChip:s.addChip},null,8,["chips","focused","new-chip","theme","theming","onKeydown","onRemoveChip","onAddChip"]),(0,o._)("label",null,[OV,(0,o._)("input",{type:"text",ref:"chipInput",onFocus:t[0]||(t[0]=e=>s.setFocus(!0,e)),onBlur:t[1]||(t[1]=e=>s.setFocus(!1,e)),onKeydown:t[2]||(t[2]=(...e)=>s.handleInput&&s.handleInput(...e)),autocomplete:l.hasFocus?"":"one-time-code"},null,40,GV)]),(0,o.Wm)(u,null,{default:(0,o.w5)((()=>[(0,o.Wm)(d,{class:"as-icon",onClick:t[3]||(t[3]=e=>l.anchorMenuOpen=!0),icon:"email"},{default:(0,o.w5)((()=>[(0,o._)("span",EV,(0,r.zw)(i.anchorText),1)])),_:1}),(0,o.Wm)(f,{modelValue:l.anchorMenuOpen,"onUpdate:modelValue":t[4]||(t[4]=e=>l.anchorMenuOpen=e),onSelect:s.handleTokenSelection},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.displayOptions,(e=>((0,o.wg)(),(0,o.j4)(p,{key:e,"data-value":e},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e),1)])),_:2},1032,["data-value"])))),128))])),_:1},8,["modelValue","onSelect"])])),_:1})],2),(0,o._)("div",UV,[i.validAdd&&i.helpText?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(i.helpText),1)],64)):!i.validAdd&&i.errorText?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(i.errorText),1)],64)):(0,o.kq)("",!0)])],2)}var IV={name:"MdcChipSetEditable",props:{errorText:{type:String,default:""},helpText:{type:String,default:""},label:{type:String,default:""},options:{type:Array,default(){return[]}},required:[Boolean],modelValue:{type:Array,default(){return[]}},validAdd:[Boolean],anchorText:{type:String,default:""}},mixins:[cV],components:{FoxyChipSet:TV},emits:["update:modelValue","validateBeforeAdd"],data(){return{addedChip:null,componentValue:this.modelValue.slice(0),hasFocus:!1,focused:null,anchorMenuOpen:!1}},watch:{modelValue(){this.componentValue=this.modelValue.slice(0)}},computed:{containerClasses(){return{"md-fieldset":!0,"foxy-chip-set-editable":!0,"field-wrapper":!0,"foxy-fieldset-invalid":!this.validAdd,required:this.required}},chipContainerClasses(){return{"editable-chip-set":!0,"has-focus":this.hasFocus}},displayOptions(){return this.options.filter((e=>this.modelValue.indexOf(e)<0))}},methods:{addChip(e){let t=this.modelValue.slice(0);t.push(e),this.$emit("update:modelValue",t)},backspaceRemoveChip(e){"Backspace"!==e.key&&8!==e.keyCode||!document.activeElement.classList.contains("mdc-evolution-chip")||this.removeLastChip()},focusInput(){this.$refs.chipInput.focus(),this.focused=null},handleInput(e){let t=!1,i=e.target.value.trim();if(!i.length)return this.$emit("validateBeforeAdd",""),void("keydown"!==e.type||"Backspace"!==e.key&&8!==e.keyCode||this.focusLastChip());"keydown"!==e.type||"Enter"!==e.key&&13!==e.keyCode&&","!==e.key&&188!==e.keyCode||(t=!0,e.preventDefault()),"blur"===e.type&&(t=!0),t&&(this.$emit("validateBeforeAdd",i),this.$nextTick((()=>{this.validAdd&&(this.addedChip={text:i},e.target.value="")})))},removeChip(e){let t=this.modelValue.findIndex((t=>t===e)),i=this.modelValue.slice(0);i.splice(t,1),this.$emit("update:modelValue",i)},focusLastChip(){if(this.focused)return void this.removeLastChip();let e=this.modelValue[this.modelValue.length-1],t=this.$refs.chipSet.$el,i=t.querySelector(".mdc-evolution-chip:last-child");i&&(this.focused=e,i.focus())},handleTokenSelection({index:e}){let t=this.displayOptions[e];this.addedChip={text:t}},removeLastChip(){this.removeChip(this.focused),this.focusInput()},setFocus(e,t){this.hasFocus=e,e||this.handleInput(t)}}};const zV=(0,he.Z)(IV,[["render",FV]]);var PV=zV;sV({FoxyChip:BV,FoxyChipSet:TV,FoxyChipSetEditable:PV});const VV={key:1,class:"preview-wrapper"},WV={class:"preview-description"},RV={class:"md-title"},LV=["value"],jV=["value"],qV=["innerHTML"];function NV(e,t,i,l,s,n){const d=(0,o.up)("loading"),p=(0,o.up)("foxy-select2"),f=(0,o.up)("foxy-card");return(0,o.wg)(),(0,o.iD)("form",{onSubmit:t[2]||(t[2]=(0,a.iM)((()=>{}),["prevent"])),class:"preview"},[s.loading?((0,o.wg)(),(0,o.j4)(d,{key:0,message:e.translations.settings.notifications.preview.gettingAppointments},null,8,["message"])):((0,o.wg)(),(0,o.iD)("div",VV,[(0,o._)("div",WV,[(0,o._)("h3",RV,(0,r.zw)(e.translations.settings.notifications.preview.title),1),n.matchingAppointments.length?((0,o.wg)(),(0,o.j4)(p,{key:0,label:e.translations.settings.notifications.preview.selectAppointment,name:"appointment",id:"appointment",modelValue:s.viewAppointment,"onUpdate:modelValue":[t[0]||(t[0]=e=>s.viewAppointment=e),n.previewAppointment],disabled:s.fetching},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.matchingAppointments,(e=>((0,o.wg)(),(0,o.iD)("option",{key:e.id,value:e.id},(0,r.zw)(e.customer_information.Name),9,LV)))),128))])),_:1},8,["label","modelValue","disabled","onUpdate:modelValue"])):((0,o.wg)(),(0,o.j4)(p,{key:1,label:e.translations.settings.notifications.preview.selectAppointmentType,name:"appointmentType",id:"appointmentType",modelValue:s.viewAppointmentType,"onUpdate:modelValue":[t[1]||(t[1]=e=>s.viewAppointmentType=e),n.previewAppointmentType],disabled:s.fetching},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.appointmentTypes,(e=>((0,o.wg)(),(0,o.iD)("option",{key:e.id,value:e.id},(0,r.zw)(e.title),9,jV)))),128))])),_:1},8,["label","modelValue","disabled","onUpdate:modelValue"])),(0,o._)("p",null,(0,r.zw)(e.translations.settings.notifications.preview.description),1)]),(0,o.Wm)(f,{class:"preview-container"},{default:(0,o.w5)((()=>[s.fetching?((0,o.wg)(),(0,o.j4)(d,{key:0,size:"title",message:e.translations.settings.notifications.preview.formattingPreview},null,8,["message"])):((0,o.wg)(),(0,o.iD)("div",{key:1,class:"preview",innerHTML:e.settings.notifications.preview},null,8,qV))])),_:1})]))],32)}var $V={name:"NotificationPreview",props:["message","selectedAppointmentTypes"],components:{Loading:ge},data(){return{fetching:!1,loading:!0,now:fe().utc().locale("en").format("YYYY-MM-DD"),moment:fe(),viewAppointment:null,viewAppointmentType:null,debouncePreview:null}},mounted(){if(this.upcomingAppointments&&this.upcomingAppointments.length)return this.loading=!1,this.selectDefaultAppointment(),void this.setDebouncePreview();this.fetchAppointments({end_date_min:this.now,order:"ASC",status:["booked"]}).then((()=>{this.loading=!1,this.selectDefaultAppointment(),this.setDebouncePreview()}))},watch:{message(){"function"===typeof this.debouncePreview&&this.debouncePreview()}},computed:{matchingAppointments(){let e=this.upcomingAppointments;return this.selectedAppointmentTypes.length&&(e=e.filter((e=>this.selectedAppointmentTypes.indexOf(e.appointment_type_id)>-1))),wa().sortBy(e,(e=>e.date_created))},appointmentTypes(){let e=this.editableAppointmentTypes;return this.selectedAppointmentTypes.length&&(e=e.filter((e=>this.selectedAppointmentTypes.indexOf(e.id)>-1))),e},showTz(){let e=this.detectedTimezone;return e!==this.settings.global.timezone_string},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings","timestampFormat"]),...(0,m.Se)(["detectedTimezone"]),...(0,m.Se)("appointment_types",["editableAppointmentTypes"]),...(0,m.Se)("appointments",["upcomingAppointments"])},methods:{previewAppointment(){this.viewAppointment?(this.fetching=!0,this.fetchNotificationPreview({template:this.message,appointment_id:this.viewAppointment}).then((()=>{this.fetching=!1}))):this.selectDefaultAppointment()},previewAppointmentType(){this.viewAppointmentType?(this.fetching=!0,this.fetchNotificationPreview({template:this.message,appointment_type_id:this.viewAppointmentType}).then((()=>{this.fetching=!1}))):this.selectDefaultAppointment()},selectDefaultAppointment(){this.matchingAppointments.length?(this.viewAppointment=this.matchingAppointments[0].id,this.previewAppointment()):this.selectedAppointmentTypes.length?(this.viewAppointmentType=this.selectedAppointmentTypes[0],this.previewAppointmentType()):(this.viewAppointmentType=this.appointmentTypes[0].id,this.previewAppointmentType())},setDebouncePreview(){this.debouncePreview=wa().debounce((()=>{this.matchingAppointments.length?this.previewAppointment():this.previewAppointmentType()}),2e3)},...(0,m.nv)("notifications",["fetchNotificationPreview"]),...(0,m.nv)("appointments",["fetchAppointments"])}};const HV=(0,he.Z)($V,[["render",NV]]);var ZV=HV,YV={name:"NotificationEdit",props:{id:{type:[Number,String],required:!0}},emits:["saved"],components:{duration:Wd,FoxyChipSetEditable:PV,NotificationDetails:KU,Preview:ZV,PromoSms:jP,TokenText:hF},data(){return{all:!0,dirty:!1,emailOptions:[],saving:!1,showCc:!1,notification:{type:"email"},notificationTriggers:v,notificationEmailOptions:B,notificationStaffEmailOptions:S,notificationTokens:k,validTitle:!0,validAppointmentTypes:!0,validBcc:!0,validCc:!0,validReplyTo:!0,validMessage:!0,validSubject:!0,validTo:!0,validSmsTo:!0,validTrigger:!0,validDuration:!0,leaveWithoutSaving:!1,routerNext:null}},beforeMount(){if(this.id||0==this.id){let e=this.settings.notifications.notifications.find((e=>e.id==this.id));this.notification=wa().cloneDeep(e)}if(!Object.prototype.hasOwnProperty.call(this.notification,"id")||!this.notification.id){let e=new Date;this.notification.id=e.getTime()}Object.prototype.hasOwnProperty.call(this.notification,"trigger")||this.notification.trigger||(this.notification.trigger="appointment_booked"),Object.prototype.hasOwnProperty.call(this.notification,"when")||this.notification.when||(this.notification.when="after"),Object.prototype.hasOwnProperty.call(this.notification,"appointment_types")||(this.notification.appointment_types=[]),Object.prototype.hasOwnProperty.call(this.notification,"appointment_types")&&this.notification.appointment_types.length&&(this.all=!1),(this.notification.cc||this.notification.bcc)&&(this.showCc=!0),Object.prototype.hasOwnProperty.call(this.notification,"schema")||(this.notification.schema="2019-04-02"),this.remindersInstalled&&(this.notificationTriggers=b),this.emailOptions.length||(this.settings.installed.staff&&this.settings.staff.enabled?this.emailOptions=this.notificationStaffEmailOptions:this.emailOptions=this.notificationEmailOptions)},mounted(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.getGuides({"ssasc-plugin-screen":this.guidesList})},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{notification:{handler:function(e,t){this.dirty=!wa().isEmpty(t)},deep:!0},all(e){e&&(this.validAppointmentTypes=!0)}},computed:{active:{get(){return!Object.prototype.hasOwnProperty.call(this.notification,"active")||this.notification.active},set(e){this.notification.active=e}},title:{get(){return Object.prototype.hasOwnProperty.call(this.notification,"title")?this.notification.title:""},set(e){this.notification.title=e}},type:{get(){return Object.prototype.hasOwnProperty.call(this.notification,"type")?this.notification.type:"email"},set(e){this.notification.type=e,this.appointment_types=[],this.all=!this.notAllPhone}},sent_to:{get(){return this.notification?.sent_to||[]},set(e){this.notification.sent_to=e}},sms_to:{get(){return this.notification?.sms_to||[]},set(e){this.notification.sms_to=e}},cc:{get(){return this.notification?.cc||[]},set(e){this.notification.cc=e}},bcc:{get(){return this.notification?.bcc||[]},set(e){this.notification.bcc=e}},replyTo:{get(){return this.notification?.replyTo||[]},set(e){Array.isArray(e)&&(e.length>1?this.notification.replyTo=e.slice(-1):this.notification.replyTo=e)}},trigger:{get(){return this.notification?.trigger||"appointment_booked"},set(e){this.notification.trigger=e,"appointment_start_date"!==e&&(this.notification.when="after"),e&&(this.validTrigger=!0)}},when:{get(){return this.notification?.when||"after"},set(e){this.notification.when=e}},duration:{get(){return Object.prototype.hasOwnProperty.call(this.notification,"duration")?this.notification.duration:0},set(e){this.notification.duration=e}},appointment_types:{get(){return this.notification.appointment_types},set(e){this.notification.appointment_types=e,(e.length||this.all)&&(this.validAppointmentTypes=!0)}},subject:{get(){return this.notification?.subject||""},set(e){this.notification.subject=e}},message:{get(){return this.notification?.message||""},set(e){this.notification.message=e}},disableWhen(){return"appointment_start_date"!==this.trigger},notAllPhone(){return this.smsModule.active&&"sms"===this.type&&this.phoneAppointmentTypes.length0&&t{let e=document.querySelector(".mdc-text-field--invalid, .md-fieldset-invalid, .foxy-fieldset-invalid");if(e){let t=e.querySelector("input, textarea, select, div[contenteditable]");t&&(t.focus(),t.scrollIntoView({behavior:"smooth",block:"center"}))}}))},saveNotification(){this.validationCheck()?(this.saving=!0,this.stripSubject(),this.id||0===this.id?this.setSingleNotification({id:this.id,notification:this.notification,settings:this.settings,timestampFormat:this.timestampFormat}):this.addSettingsNotification({settings:this.settings,timestampFormat:this.timestampFormat,notification:this.notification}),this.saveNotificationSingle(this.notification.id).then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")}))):this.focusInvalid()},maybeShowUpgrade(){this.smsModule.installed||this.$refs["upgradeSms"].open()},stripSubject(){if(!Object.prototype.hasOwnProperty.call(this.notification,"subject"))return;let e=this.notification.subject,t=e.replace(/ /g," ");this.notification.subject=t},toggleAll(e){if(e)return void(this.notification.appointment_types=[]);let t=this.editableAppointmentTypes.map((e=>e.id));this.notification.appointment_types=t},toggleShowCc(){this.showCc=!this.showCc},validateReplyTo(e){e.length?0===e.indexOf("{{")&&e.indexOf("}}")>-1?this.validReplyTo=!0:this.validReplyTo=this.validateEmail(e):this.validReplyTo=!0},validateBcc(e){e.length?0===e.indexOf("{{")&&e.indexOf("}}")>-1?this.validBcc=!0:this.validBcc=this.validateEmail(e):this.validBcc=!0},validateCc(e){e.length?0===e.indexOf("{{")&&e.indexOf("}}")>-1?this.validCc=!0:this.validCc=this.validateEmail(e):this.validCc=!0},validateTo(e){e.length?0===e.indexOf("{{")&&e.indexOf("}}")>-1?this.validTo=!0:this.validTo=this.validateEmail(e):this.validTo=!0},validateSubject(e){this.validSubject=e},validateMessage(e){this.validMessage=e},validationCheck(){this.validTo="email"!==this.notification.type||Object.prototype.hasOwnProperty.call(this.notification,"sent_to")&&this.notification.sent_to.length>0,this.validSmsTo="sms"!==this.notification.type||Object.prototype.hasOwnProperty.call(this.notification,"sms_to")&&this.notification.sms_to.length>0,this.validTrigger=!!this.notification.trigger;const e=this.notification.subject?this.notification.subject.replace(/<[^>]+>/g,"").trim():"";this.validSubject="email"!==this.notification.type||!(!Object.prototype.hasOwnProperty.call(this.notification,"subject")||!e.length);const t=this.notification.message?this.notification.message.replace(/<[^>]+>/g,"").trim():"";return this.validMessage=!(!Object.prototype.hasOwnProperty.call(this.notification,"message")||!t.length),this.validAppointmentTypes=Object.prototype.hasOwnProperty.call(this.notification,"appointment_types")&&this.notification.appointment_types.length||this.all,this.validTitle=!(!Object.prototype.hasOwnProperty.call(this.notification,"title")||!this.notification.title),this.validDuration=parseInt(this.duration)>=0,this.validTo&&this.validTitle&&this.validSmsTo&&this.validTrigger&&this.validSubject&&this.validMessage&&this.validAppointmentTypes&&this.validDuration},dialogLeaveWithoutSaving(){this.routerNext()},...(0,m.OI)("notifications",["addSettingsNotification","setNotificationPreview","setSingleNotification"]),...(0,m.nv)("notifications",["saveNotificationSingle"]),...(0,m.nv)("guides",["getGuides"])}};const KV=(0,he.Z)(YV,[["render",lV],["__scopeId","data-v-c73c6700"]]);var JV=KV;const XV={class:"notifications-sms"},QV={class:"settings-header"},eW={class:"md-title"},tW=(0,o._)("br",null,null,-1),iW={class:"button-bar"};function aW(e,t,i,l,s,n){const d=(0,o.up)("foxy-snackbar"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-notification"),u=(0,o.up)("foxy-textfield"),c=(0,o.up)("foxy-phone-field"),h=(0,o.up)("foxy-accordion-item"),m=(0,o.up)("foxy-empty"),g=(0,o.up)("foxy-accordion"),_=(0,o.up)("foxy-theme"),y=(0,o.up)("foxy-progress-circular"),w=(0,o.up)("setting-not-enabled"),x=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",XV,[(0,o._)("form",{novalidate:"",onSubmit:t[7]||(t[7]=(0,a.iM)(((...e)=>n.saveSms&&n.saveSms(...e)),["stop","prevent"])),class:(0,r.C_)({saving:s.saving})},[(0,o.Wm)(d,{position:"top center",modelValue:s.isErrorSavingVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>s.isErrorSavingVisible=e),message:e.translations.errors.troubleSaving+" ","action-text":e.translations.actions.retry,onAction:n.retrySave},null,8,["modelValue","message","action-text","onAction"]),(0,o.Wm)(d,{position:"top center",modelValue:s.isTwilioErrorVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>s.isTwilioErrorVisible=e),message:s.errorMessage},null,8,["modelValue","message"]),(0,o.Wm)(d,{position:"top center",modelValue:s.isTestMessageSentVisible,"onUpdate:modelValue":t[2]||(t[2]=e=>s.isTestMessageSentVisible=e),message:s.testMessageStatus},null,8,["modelValue","message"]),(0,o._)("div",QV,[(0,o.Wm)(p,{tag:"md-button",to:"/ssa/settings/notifications",icon:"keyboard_arrow_left",theme:"black"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.notifications.returnToNotifications),1)])),_:1}),(0,o._)("h2",eW,(0,r.zw)(e.translations.settings.sms.title),1)]),e.settings.sms.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[n.twilio_test_mode_enabled?((0,o.wg)(),(0,o.j4)(f,{key:0,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.testModeWarning),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(_,{theme:"grey"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,{label:e.translations.settings.sms.basics,message:e.translations.settings.sms.basicsMessage,index:"0",open:s.section,onUpdateActive:n.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{modelValue:s.v$.twilio_account_sid.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>s.v$.twilio_account_sid.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.sms.twilioAccountSid,helptext:s.v$.twilio_account_sid.$invalid&&s.v$.twilio_account_sid.$dirty?e.translations.settings.sms.twilioAccountSidError+" - "+e.translations.settings.sms.twilioAccountSidHelp+"":""+e.translations.settings.sms.twilioAccountSidHelp+"","helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,valid:!s.v$.twilio_account_sid.$invalid||!s.v$.twilio_account_sid.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(u,{modelValue:s.v$.twilio_auth_token.$model,"onUpdate:modelValue":t[4]||(t[4]=e=>s.v$.twilio_auth_token.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.sms.twilioAuthToken,helptext:s.v$.twilio_auth_token.$invalid&&s.v$.twilio_auth_token.$dirty?e.translations.settings.sms.twilioAuthTokenError+" - "+e.translations.settings.sms.twilioAuthTokenHelp+"":""+e.translations.settings.sms.twilioAuthTokenHelp+"","helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,valid:!s.v$.twilio_auth_token.$invalid||!s.v$.twilio_auth_token.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(c,{modelValue:n.twilio_send_from_phone,"onUpdate:modelValue":t[5]||(t[5]=e=>n.twilio_send_from_phone=e),modelModifiers:{trim:!0},label:e.translations.settings.sms.twilioSendFromPhone,"input-options":{id:"twilio_send_from_phone",required:!0,disabled:s.saving},onValidate:n.validatePhone,"valid-characters-only":!1,"helptext-validation":!s.validPhone,helptext:s.validPhone?n.twilioSendFromPhoneHelp:n.twilioSendFromPhoneError,"helptext-persistent":""},null,8,["modelValue","label","input-options","onValidate","helptext-validation","helptext"])])),_:1},8,["label","message","open","onUpdateActive"]),(0,o.Wm)(h,{label:e.translations.settings.sms.sendTest,message:e.translations.settings.sms.sendTestMessage,index:"2",open:s.section,onUpdateActive:n.updateSection},{default:(0,o.w5)((()=>[s.dirty||n.missing?((0,o.wg)(),(0,o.j4)(m,{key:0,label:"Settings not saved",description:"Save your settings before attempting to send a test message"})):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(c,{modelValue:s.testPhone,"onUpdate:modelValue":t[6]||(t[6]=e=>s.testPhone=e),modelModifiers:{trim:!0},label:e.translations.settings.sms.sendTestTo,"input-options":{id:"twilio_test_phone",required:!0,disabled:s.sendingTest},onValidate:n.validateTestPhone,"helptext-validation":!s.validTestPhone,helptext:s.validTestPhone?e.translations.settings.sms.sendTestToHelp:e.translations.settings.sms.sendTestToError,"helptext-persistent":""},null,8,["modelValue","label","input-options","onValidate","helptext-validation","helptext"]),tW,(0,o.Wm)(p,{theme:e.$theme.primary,mode:"raised",onClick:n.sendTest,disabled:s.sendingTest||!s.validTestPhone},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.sms.sendTest),1)])),_:1},8,["theme","onClick","disabled"])],64))])),_:1},8,["label","message","open","onUpdateActive"])])),_:1})])),_:1}),(0,o._)("div",iW,[(0,o.Wm)(p,{tag:"md-button",mode:"secondary",to:"/ssa/settings/notifications",disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled"]),(0,o.Wm)(p,{mode:"raised",class:"md-primary",onClick:n.saveSms,disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick","disabled"]),(0,o.wy)((0,o.Wm)(y,{medium:"",class:"md-primary",indeterminate:""},null,512),[[a.F8,s.saving]])])],64)):((0,o.wg)(),(0,o.j4)(w,{key:1}))],34),(0,o.Wm)(x,{ref:"confirmLeaveDirty",title:e.translations.settings.sms.confirmIgnoreChangesTitle,"content-html":e.translations.settings.sms.confirmIgnoreChangesContent,"ok-text":e.translations.settings.sms.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.sms.confirmIgnoreChangesCancel,onConfirm:n.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}var oW={name:"NotificationsSms",components:{SettingNotEnabled:GU},data(){return{v$:(0,Rd.Xw)(),dirty:!1,errorMessage:"",saving:!1,section:"0",sendingTest:!1,testMessageStatus:"",testPhone:null,validPhone:!0,validTestPhone:!0,isErrorSavingVisible:!1,isTwilioErrorVisible:!1,isTestMessageSentVisible:!1,routerNext:null}},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{sms:{handler:function(e,t){this.dirty=t},deep:!0}},validations(){return{twilio_account_sid:{required:Ld.C1},twilio_auth_token:{required:Ld.C1},twilio_send_from_phone:{required:Ld.C1},twilio_test_account_sid:{required:(0,Ld.CF)((()=>this.twilio_test_mode_enabled))},twilio_test_auth_token:{required:(0,Ld.CF)((()=>this.twilio_test_mode_enabled))}}},mounted(){this.getGuides({"ssasc-plugin-screen":K.notifications.sms})},computed:{twilio_account_sid:{get(){return this.settings.sms.twilio_account_sid},set(e){this.updateTwilioAccountSid(e)}},twilio_auth_token:{get(){return this.settings.sms.twilio_auth_token},set(e){this.updateTwilioAuthToken(e)}},twilio_send_from_phone:{get(){return this.settings.sms.twilio_send_from_phone},set(e){this.updateTwilioSendFromPhone(e)}},twilio_test_mode_enabled:{get(){return!!this.settings.sms.twilio_test_mode_enabled},set(e){this.updateTwilioTestModeEnabled(e)}},twilio_test_account_sid:{get(){return this.settings.sms.twilio_test_account_sid},set(e){this.updateTwilioTestAccountSid(e)}},twilio_test_auth_token:{get(){return this.settings.sms.twilio_test_auth_token},set(e){this.updateTwilioTestAuthToken(e)}},missing(){return this.twilio_test_mode_enabled?!this.twilio_test_account_sid||!this.twilio_test_auth_token||!this.twilio_send_from_phone:!this.twilio_send_from_phone||!this.twilio_account_sid||!this.twilio_auth_token},twilioSendFromPhoneError(){const e=this.translations.settings.sms.twilioSendFromPhoneError,t=this.translations.settings.sms.twilioSendFromPhoneHelp,i="https://www.twilio.com/console/sms/services";return`${e} - ${t}`},twilioSendFromPhoneHelp(){const e="https://www.twilio.com/console/sms/services",t=this.translations.settings.sms.twilioSendFromPhoneHelp;return`${t}`},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("notifications",["sms","smsModule"])},methods:{retrySave(){this.isErrorSavingVisible=!1,this.saveSmsSettings()},saveSms(){this.validatePhone(),this.v$.$touch(),this.v$.$invalid||!this.validPhone?this.section="0":(this.saving=!0,this.saveSmsSettings().then((()=>{this.authorizeTwilio().then((()=>{this.dirty=!1,this.saving=!1,this.$router.push("/ssa/settings/notifications")})).catch((e=>{this.saving=!1;let t=e.response_code,i=e.error.errors;this.errorMessage=i[t][0],this.isTwilioErrorVisible=!0}))})).catch(((e,t)=>{console.log("failed to save",t),this.saving=!1,this.isErrorSavingVisible=!0})))},sendTest(){this.testPhone?(this.sendingTest=!0,this.sendTestMessage(this.testPhone).then((()=>{this.sendingTest=!1,this.testMessageStatus=this.translations.settings.sms.sendTestSuccess,this.isTestMessageSentVisible=!0})).catch((e=>{this.sendingTest=!1,console.log(e),this.testMessageStatus=this.translations.settings.sms.sendTestFailure,this.isTestMessageSentVisible=!0}))):this.validTestPhone=!1},updateSection(e){this.section=e||null},validatePhone(e=!0){this.twilio_send_from_phone?this.validPhone=e:this.validPhone=!1},validateTestPhone(e){this.validTestPhone=e},dialogLeaveWithoutSaving(){this.routerNext()},...(0,m.nv)("notifications",["authorizeTwilio","saveSmsSettings","sendTestMessage","updateTwilioAccountSid","updateTwilioAuthToken","updateTwilioSendFromPhone","updateTwilioTestModeEnabled","updateTwilioTestAccountSid","updateTwilioTestAuthToken"]),...(0,m.nv)("guides",["getGuides"])}};const rW=(0,he.Z)(oW,[["render",aW]]);var lW=rW,sW=[{path:"notifications",component:eP,redirect:"/ssa/settings/notifications/list",meta:{ssa_manage_site_settings:!0},children:[{path:"list",name:"notifications-list",component:$P},{path:"notification/:id?",name:"notification-single",component:JV,props:!0},{path:"sms",name:"notifications-sms",component:lW}]}];const nW={class:"payments-settings"};function dW(e,t,i,a,r,l){const s=(0,o.up)("settings-header"),n=(0,o.up)("payments-header"),d=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",nW,["payments-all"===e.$route.name?((0,o.wg)(),(0,o.j4)(s,{key:0})):((0,o.wg)(),(0,o.j4)(n,{key:1})),(0,o.Wm)(d)])}const pW={class:"payments-header"},fW={key:0,class:"md-title"};function uW(e,t,i,a,l,s){const n=(0,o.up)("foxy-button");return(0,o.wg)(),(0,o.iD)("div",pW,[(0,o.Wm)(n,{tag:"md-button",to:"/ssa/settings/payments/all",icon:"keyboard_arrow_left",theme:"black"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.returnToPayments),1)])),_:1}),s.headline?((0,o.wg)(),(0,o.iD)("h2",fW,(0,r.zw)(s.headline),1)):(0,o.kq)("",!0)])}var cW={name:"PaymentsHeader",data(){return{}},computed:{headline(){let e;switch(this.$route.name){case"payments-paypal":e="PayPal";break;case"payments-stripe":e="Stripe";break}return e},...(0,m.rn)("translations",["translations"])}};const hW=(0,he.Z)(cW,[["render",uW]]);var mW=hW,gW={name:"SettingsPayments",components:{SettingsHeader:zO,PaymentsHeader:mW},data(){return{}}};const _W=(0,he.Z)(gW,[["render",dW]]);var yW=_W;const wW={class:"payments-settings settings-list"},xW=["value"];function CW(e,t,i,a,l,s){const n=(0,o.up)("foxy-select2"),d=(0,o.up)("foxy-notification"),p=(0,o.up)("settings-card"),f=(0,o.up)("router-view"),u=(0,o.up)("foxy-layout"),c=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",wW,[e.settings.payments.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(n,{name:"default_currency",id:"default_currency",modelValue:s.default_currency,"onUpdate:modelValue":t[0]||(t[0]=e=>s.default_currency=e),label:e.translations.settings.payments.defaultCurrency},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(l.currencies,(e=>((0,o.wg)(),(0,o.iD)("option",{value:e.code,key:e.number},(0,r.zw)(e.currency)+" ("+(0,r.zw)(e.code)+") ",9,xW)))),128))])),_:1},8,["modelValue","label"]),(0,o.Wm)(u,{"md-gutter":!0,class:"settings-list-container"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{onEdit:t[1]||(t[1]=e=>s.editPayments("stripe")),image:e.api.admin_static_url+"/images/logo-stripe.svg",title:"Stripe","card-style":"payments-settings",modelValue:s.stripe_enabled,"onUpdate:modelValue":t[2]||(t[2]=e=>s.stripe_enabled=e)},{default:(0,o.w5)((()=>[e.stripeModule.enabled&&!e.stripeModule.active?((0,o.wg)(),(0,o.j4)(d,{key:0,theme:"amber",icon:"warning"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.stripe.noConnection),1)])),_:1})):e.stripeModule.test_mode?((0,o.wg)(),(0,o.j4)(d,{key:1,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.stripe.testModeWarning),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["image","modelValue"]),(0,o.Wm)(p,{onEdit:t[3]||(t[3]=e=>s.editPayments("paypal")),image:e.api.admin_static_url+"/images/logo-paypal.svg",title:"PayPal","card-style":"payments-settings",modelValue:s.paypal_enabled,"onUpdate:modelValue":t[4]||(t[4]=e=>s.paypal_enabled=e)},{default:(0,o.w5)((()=>[e.paypalModule.enabled&&!e.paypalModule.active?((0,o.wg)(),(0,o.j4)(d,{key:0,theme:"amber",icon:"warning"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.paypal.noConnection),1)])),_:1})):e.paypalModule.sandbox?((0,o.wg)(),(0,o.j4)(d,{key:1,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.paypal.sandboxMode),1)])),_:1})):(0,o.kq)("",!0)])),_:1},8,["image","modelValue"]),(0,o.Wm)(f)])),_:1})],64)):((0,o.wg)(),(0,o.j4)(c,{key:1}))])}var vW={name:"SettingsPaymentsAll",components:{SettingsCard:gO,SettingNotEnabled:GU},data(){return{currencies:V}},watch:{guidesList(){this.getGuides({"ssasc-plugin-screen":this.guidesList})}},mounted(){this.getGuides({"ssasc-plugin-screen":this.guidesList})},computed:{default_currency:{get(){return this.settings.payments.default_currency},set(e){this.updateDefaultCurrency(e)}},stripe_enabled:{get(){return!!this.settings.stripe.enabled},set(e){this.updateStripeEnabled(e)}},paypal_enabled:{get(){return!!this.settings.paypal.enabled},set(e){this.updatePaypalEnabled(e)}},woocommerce_enabled(){return!1},guidesList(){let e=[K.payments.all];return this.stripe_enabled&&e.push(K.payments.stripe_enabled),this.paypal_enabled&&e.push(K.payments.paypal_enabled),e},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings"]),...(0,m.Se)("payments",["paypalModule","stripeModule"])},methods:{editPayments(e){this.$router.push(`/ssa/settings/payments/${e}`)},...(0,m.nv)("payments",["updatePaypalEnabled","updateStripeEnabled","updateDefaultCurrency"]),...(0,m.nv)("guides",["getGuides"])}};const bW=(0,he.Z)(vW,[["render",CW]]);var BW=bW;const SW={class:"paypal"},kW={class:"md-copyable"},AW={href:"https://developer.paypal.com/",target:"_blank"},MW={class:"checkboxes-list-flex-row"},DW={class:"button-bar"};function TW(e,t,i,l,s,n){const d=(0,o.up)("foxy-snackbar"),p=(0,o.up)("foxy-notification"),f=(0,o.up)("foxy-textfield"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-icon-button"),h=(0,o.up)("foxy-accordion-item"),m=(0,o.up)("foxy-checkbox"),g=(0,o.up)("foxy-accordion"),_=(0,o.up)("foxy-theme"),y=(0,o.up)("foxy-button"),w=(0,o.up)("foxy-progress-circular"),x=(0,o.up)("setting-not-enabled"),C=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",SW,[(0,o._)("form",{novalidate:"",onSubmit:t[7]||(t[7]=(0,a.iM)(((...e)=>n.savePaypal&&n.savePaypal(...e)),["stop","prevent"])),class:(0,r.C_)({saving:s.saving})},[e.settings.paypal.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(d,{position:"top center",modelValue:s.isErrorSavingVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>s.isErrorSavingVisible=e),message:e.translations.errors.troubleSaving+" ","action-text":e.translations.actions.retry,onAction:n.retrySave},null,8,["modelValue","message","action-text","onAction"]),s.showSslWarning?((0,o.wg)(),(0,o.j4)(p,{key:0,icon:"error",theme:"red"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.paypal.sslWarning),1)])),_:1})):e.paypalModule.sandbox?((0,o.wg)(),(0,o.j4)(p,{key:1,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.paypal.sandboxMode),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(_,{theme:"grey"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o.Wm)(h,{label:e.translations.settings.payments.basics,message:e.translations.settings.payments.basicsMessage,index:"0",open:s.section,onUpdateActive:n.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{modelValue:s.v$.paypal_display_title.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>s.v$.paypal_display_title.$model=e),label:e.translations.settings.payments.displayTitle,helptext:s.v$.paypal_display_title.$invalid&&s.v$.paypal_display_title.$dirty?e.translations.settings.payments.displayTitleError:e.translations.settings.payments.displayTitleHelp,"helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,valid:!s.v$.paypal_display_title.$invalid||!s.v$.paypal_display_title.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(f,{modelValue:n.paypal_description,"onUpdate:modelValue":t[2]||(t[2]=e=>n.paypal_description=e),label:e.translations.settings.payments.description,helptext:e.translations.settings.payments.descriptionHelp,"helptext-persistent":"",disabled:s.saving},null,8,["modelValue","label","helptext","disabled"]),(0,o.Wm)(f,{modelValue:s.v$.paypal_email.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>s.v$.paypal_email.$model=e),modelModifiers:{trim:!0,lazy:!0},label:e.translations.settings.payments.paypal.email,helptext:s.v$.paypal_email.$invalid&&s.v$.paypal_email.$dirty?e.translations.settings.payments.paypal.emailError:e.translations.settings.payments.paypal.emailHelp,"helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,valid:!s.v$.paypal_email.$invalid||!s.v$.paypal_email.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o._)("div",kW,[(0,o.Wm)(f,{label:e.translations.settings.payments.paypal.ipn_url,id:"webhook",modelValue:n.ipn_url,"onUpdate:modelValue":t[4]||(t[4]=e=>n.ipn_url=e),readonly:"",helptext:n.webhook_helper_text,ref:"ipnUrlValue",onClick:n.copyIpnUrl,disabled:s.saving,class:"textfield-with-icon"},null,8,["label","modelValue","helptext","onClick","disabled"]),(0,o.Wm)(c,{theme:e.$theme.primary,class:"md-icon-button foxy-textfield-action-button",onClick:n.copyIpnUrl},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"file_copy"})])),_:1},8,["theme","onClick"])]),(0,o.Wm)(d,{position:"top center",modelValue:s.isIpnNoticeVisible,"onUpdate:modelValue":t[5]||(t[5]=e=>s.isIpnNoticeVisible=e),message:e.translations.settings.payments.paypal.ipnCopied},null,8,["modelValue","message"])])),_:1},8,["label","message","open","onUpdateActive"]),(0,o.Wm)(h,{label:e.translations.settings.payments.advanced,message:e.translations.settings.payments.advancedMessage,index:"1",open:s.section,onUpdateActive:n.updateSection},{default:(0,o.w5)((()=>[(0,o._)("p",null,[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.paypal.sandboxHelp1)+" ",1),(0,o._)("a",AW,(0,r.zw)(e.translations.settings.payments.paypal.sandboxHelp2),1)]),(0,o._)("div",MW,[(0,o.Wm)(m,{modelValue:n.paypal_sandbox_enabled,"onUpdate:modelValue":t[6]||(t[6]=e=>n.paypal_sandbox_enabled=e),disabled:s.saving,theme:e.$theme.primary,label:e.translations.settings.payments.paypal.enableSandbox},null,8,["modelValue","disabled","theme","label"])])])),_:1},8,["label","message","open","onUpdateActive"])])),_:1})])),_:1}),(0,o._)("div",DW,[(0,o.Wm)(y,{tag:"md-button",mode:"secondary",class:"md-raised",to:"/ssa/settings/payments",disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled"]),(0,o.Wm)(y,{mode:"raised",class:"md-primary",onClick:n.savePaypal,disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick","disabled"]),(0,o.wy)((0,o.Wm)(w,{class:"md-primary",indeterminate:"",medium:""},null,512),[[a.F8,s.saving]])])],64)):((0,o.wg)(),(0,o.j4)(x,{key:1}))],34),(0,o.Wm)(C,{ref:"confirmLeaveDirty",title:e.translations.settings.payments.confirmIgnoreChangesTitle,"content-html":e.translations.settings.payments.confirmIgnoreChangesContent,"ok-text":e.translations.settings.payments.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.payments.confirmIgnoreChangesCancel,onConfirm:n.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}var OW={name:"PaymentsPaypal",components:{SettingNotEnabled:GU},data(){return{v$:(0,Rd.Xw)(),section:"0",dirty:!1,saving:!1,showSslWarning:!1,isErrorSavingVisible:!1,isIpnNoticeVisible:!1,routerNext:null}},mounted(){this.getGuides({"ssasc-plugin-screen":K.paypal}),wa().isEmpty(this.support)?this.fetchSupportDetails().then((()=>{this.maybeShowSslWarning()})):this.maybeShowSslWarning()},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{paypal:{handler:function(e,t){this.dirty=t},deep:!0}},validations:{paypal_display_title:{required:Ld.C1},paypal_email:{required:Ld.C1,email:Ld.Do}},computed:{ipn_url(){return this.settings.paypal.ipn_url},paypal_description:{get(){return this.settings.paypal.description},set(e){this.updatePaypalDescription(e)}},paypal_display_title:{get(){return this.settings.paypal.title},set(e){this.updatePaypalTitle(e)}},paypal_email:{get(){return this.settings.paypal.email},set(e){this.updatePaypalEmail(e)}},paypal_identity_token:{get(){return this.settings.paypal.identity_token},set(e){this.updatePaypalIdentityToken(e)}},paypal_sandbox_enabled:{get(){return this.settings.paypal.sandbox_enabled},set(e){this.updatePaypalSandbox(e)}},webhook_helper_text(){return this.translations.settings.payments.paypal.ipnHelpPrefix+''+this.translations.settings.payments.paypal.ipnHelp+""},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("support",["support"]),...(0,m.Se)("payments",["paypalModule"])},methods:{copyIpnUrl(){let e=this.$refs["ipnUrlValue"].$el,t=e.querySelector("input"),i=t.value.trim();i&&(t.select(),document.execCommand("copy"),this.isIpnNoticeVisible=!0)},maybeShowSslWarning(){"good"!==this.support.site_status.https_status.status&&(this.showSslWarning=!0)},savePaypal(){this.v$.$touch(),this.v$.$invalid?this.section="0":(this.saving=!0,this.savePaypalSettings().then((()=>{this.dirty=!1,this.saving=!1,this.$router.push("/ssa/settings/payments")})).catch((()=>{this.saving=!1,this.isErrorSavingVisible=!0})))},retrySave(){this.isErrorSavingVisible=!1,this.savePaypal()},updateSection(e){this.section=e||null},dialogLeaveWithoutSaving(){this.routerNext()},...(0,m.nv)("support",["fetchSupportDetails"]),...(0,m.nv)("payments",["savePaypalSettings","updatePaypalDescription","updatePaypalEmail","updatePaypalIdentityToken","updatePaypalSandbox","updatePaypalTitle"]),...(0,m.nv)("guides",["getGuides"])}};const GW=(0,he.Z)(OW,[["render",TW]]);var EW=GW;const UW={class:"stripe"},FW={class:"md-copyable"},IW={class:"stripe-payment-method"},zW={key:0,class:"error-message payment-methods-warning-message"},PW={key:1,class:"error-message payment-methods-warning-message"},VW={class:"button-bar"};function WW(e,t,i,l,s,n){const d=(0,o.up)("foxy-snackbar"),p=(0,o.up)("foxy-notification"),f=(0,o.up)("foxy-textfield"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-icon-button"),h=(0,o.up)("foxy-checkbox"),m=(0,o.up)("foxy-accordion-item"),g=(0,o.up)("foxy-accordion"),_=(0,o.up)("foxy-theme"),y=(0,o.up)("foxy-button"),w=(0,o.up)("foxy-progress-circular"),x=(0,o.up)("setting-not-enabled"),C=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",UW,[(0,o._)("form",{novalidate:"",onSubmit:t[16]||(t[16]=(0,a.iM)(((...e)=>n.saveStripe&&n.saveStripe(...e)),["stop","prevent"])),class:(0,r.C_)({saving:s.saving})},[e.settings.stripe.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(d,{position:"top center",modelValue:s.isErrorSavingVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>s.isErrorSavingVisible=e),message:e.translations.errors.troubleSaving,"action-text":e.translations.actions.retry,onAction:n.retrySave},null,8,["modelValue","message","action-text","onAction"]),e.stripeModule.test_mode?((0,o.wg)(),(0,o.j4)(p,{key:0,icon:"info"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.payments.stripe.testModeWarning),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(_,{theme:"grey"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o.Wm)(m,{label:e.translations.settings.payments.basics,message:e.translations.settings.payments.basicsMessage,index:"0",open:s.section,onUpdateActive:n.updateSection},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{id:"title","data-validatorkey":"stripe_display_title",modelValue:l.v$.stripe_display_title.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>l.v$.stripe_display_title.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.payments.displayTitle,helptext:l.v$.stripe_display_title.$invalid&&l.v$.stripe_display_title.$dirty?e.translations.settings.payments.displayTitleError:e.translations.settings.payments.displayTitleHelp,"helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,valid:!l.v$.stripe_display_title.$invalid||!l.v$.stripe_display_title.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(f,{id:"description","data-validatorkey":"stripe_description",modelValue:n.stripe_description,"onUpdate:modelValue":t[2]||(t[2]=e=>n.stripe_description=e),modelModifiers:{trim:!0},label:e.translations.settings.payments.description,helptext:e.translations.settings.payments.descriptionHelp,"helptext-persistent":"",disabled:s.saving},null,8,["modelValue","label","helptext","disabled"]),(0,o.Wm)(f,{id:"descriptor","data-validatorkey":"stripe_statement_descriptor",modelValue:l.v$.stripe_statement_descriptor.$model,"onUpdate:modelValue":t[3]||(t[3]=e=>l.v$.stripe_statement_descriptor.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.payments.statementDescriptor,helptext:l.v$.stripe_statement_descriptor.$invalid&&l.v$.stripe_statement_descriptor.$dirty?e.translations.settings.payments.statementDescriptorError:e.translations.settings.payments.statementDescriptorHelp,"helptext-persistent":"","helptext-validation":"",disabled:s.saving,valid:!l.v$.stripe_statement_descriptor.$invalid||!l.v$.stripe_statement_descriptor.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(f,{id:"publishable-key","data-validatorkey":"stripe_publishable_key",modelValue:l.v$.stripe_publishable_key.$model,"onUpdate:modelValue":t[4]||(t[4]=e=>l.v$.stripe_publishable_key.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.payments.stripe.publishableKey,helptext:n.publishableKeyHelpText,"helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,valid:!l.v$.stripe_publishable_key.$invalid||!l.v$.stripe_publishable_key.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(f,{id:"secret-key","data-validatorkey":"stripe_secret_key",modelValue:l.v$.stripe_secret_key.$model,"onUpdate:modelValue":t[5]||(t[5]=e=>l.v$.stripe_secret_key.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.payments.stripe.secretKey,helptext:n.secretKeyHelpText,"helptext-persistent":"","helptext-validation":"",required:"",disabled:s.saving,onChange:t[6]||(t[6]=e=>n.clearfieldBackendErrors("secret_key")),valid:!l.v$.stripe_secret_key.$invalid||!l.v$.stripe_secret_key.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o._)("div",FW,[(0,o.Wm)(f,{label:e.translations.settings.payments.stripe.webhook,"aria-describedby":"webhook-helper",id:"webhook",modelValue:n.stripe_webhook,"onUpdate:modelValue":t[7]||(t[7]=e=>n.stripe_webhook=e),readonly:"",helptext:n.stripe_webhook_helper_text,ref:"webhookValue",onClick:n.copyWebhook,disabled:s.saving,class:"textfield-with-icon"},null,8,["label","modelValue","helptext","onClick","disabled"]),(0,o.Wm)(c,{type:"button",theme:e.$theme.primary,class:"foxy-textfield-action-button",onClick:n.copyWebhook},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"file_copy"})])),_:1},8,["theme","onClick"])]),(0,o.Wm)(d,{position:"top center",modelValue:s.isWebhookNoticeVisible,"onUpdate:modelValue":t[8]||(t[8]=e=>s.isWebhookNoticeVisible=e),message:e.translations.settings.payments.stripe.webhookCopied},null,8,["modelValue","message"]),(0,o.Wm)(f,{id:"webhook_secret","data-validatorkey":"stripe_webhook_secret",modelValue:l.v$.stripe_webhook_secret.$model,"onUpdate:modelValue":t[9]||(t[9]=e=>l.v$.stripe_webhook_secret.$model=e),modelModifiers:{trim:!0},label:e.translations.settings.payments.stripe.webhookSecret,helptext:l.v$.stripe_webhook_secret.$invalid?`${n.fieldErrors("webhook_secret")?.message} ${n.fieldErrors("webhook_secret")?.help_link?`– ${e.translations.settings.payments.stripe.webhookSecretHelpPrefix} ${e.translations.settings.payments.stripe.webhookHelpTarget}`:""}`:`${e.translations.settings.payments.stripe.webhookSecretHelpPrefix} ${e.translations.settings.payments.stripe.webhookHelpTarget}`,"helptext-persistent":"","helptext-validation":"",disabled:s.saving,valid:!l.v$.stripe_webhook_secret.$invalid||!l.v$.stripe_webhook_secret.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o._)("div",IW,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.payments.stripe.paymentMethods),1),0===n.stripe_enabled_payment_methods.length?((0,o.wg)(),(0,o.iD)("p",zW,(0,r.zw)(e.translations.settings.payments.stripe.noPaymentMethodsError),1)):n.stripe_enabled_payment_methods.includes("card")?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",PW,(0,r.zw)(e.translations.settings.payments.stripe.noCardPaymentMethodWarning),1)),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.stripe_available_payment_methods,((i,a)=>((0,o.wg)(),(0,o.j4)(h,{key:a,theme:e.$theme.primary,id:"payment-method-"+i,name:"payment-methods",modelValue:n.stripe_enabled_payment_methods,"onUpdate:modelValue":t[10]||(t[10]=e=>n.stripe_enabled_payment_methods=e),value:i,label:i,valid:l.v$.stripe_enabled_payment_methods.valid},null,8,["theme","id","modelValue","value","label","valid"])))),128))])])),_:1},8,["label","message","open","onUpdateActive"]),(0,o.Wm)(m,{label:e.translations.settings.payments.advanced,message:e.translations.settings.payments.advancedMessage,index:"1",open:s.section,onUpdateActive:n.updateSection},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.translations.settings.payments.stripe.testModeHelp),1),(0,o.Wm)(h,{modelValue:n.stripe_test_mode_enabled,"onUpdate:modelValue":t[11]||(t[11]=e=>n.stripe_test_mode_enabled=e),theme:e.$theme.primary,disabled:s.saving,label:e.translations.settings.payments.stripe.testMode},null,8,["modelValue","theme","disabled","label"]),(0,o.Wm)(f,{id:"test-publishable-key","data-validatorkey":"stripe_test_publishable_key",modelValue:l.v$.stripe_test_publishable_key.$model,"onUpdate:modelValue":t[12]||(t[12]=e=>l.v$.stripe_test_publishable_key.$model=e),label:e.translations.settings.payments.stripe.testPublishableKey,helptext:n.publishableTestKeyHelpText,"helptext-persistent":"","helptext-validation":"",disabled:s.saving,valid:!l.v$.stripe_test_publishable_key.$invalid||!l.v$.stripe_test_publishable_key.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(f,{id:"test-secret-key","data-validatorkey":"stripe_test_secret_key",modelValue:l.v$.stripe_test_secret_key.$model,"onUpdate:modelValue":t[13]||(t[13]=e=>l.v$.stripe_test_secret_key.$model=e),label:e.translations.settings.payments.stripe.testSecretKey,helptext:l.v$.stripe_test_secret_key.$invalid?n.fieldErrors("test_secret_key")?.["message"]+(n.fieldErrors("test_secret_key")?.["help_link"]?" – "+e.translations.settings.payments.stripe.testSecretKeyHelp+"":""):""+e.translations.settings.payments.stripe.testSecretKeyHelp+"","helptext-persistent":"","helptext-validation":"",disabled:s.saving,onChange:t[14]||(t[14]=e=>n.clearfieldBackendErrors("test_secret_key")),valid:!l.v$.stripe_test_secret_key.$invalid||!l.v$.stripe_test_secret_key.$dirty},null,8,["modelValue","label","helptext","disabled","valid"]),(0,o.Wm)(f,{id:"test-webhook-secret","data-validatorkey":"stripe_test_webhook_secret",modelValue:l.v$.stripe_test_webhook_secret.$model,"onUpdate:modelValue":t[15]||(t[15]=e=>l.v$.stripe_test_webhook_secret.$model=e),label:e.translations.settings.payments.stripe.testWebhookSecret,helptext:l.v$.stripe_test_webhook_secret.$invalid?`${n.fieldErrors("test_webhook_secret")?.message} ${n.fieldErrors("test_webhook_secret")?.help_link?`– ${e.translations.settings.payments.stripe.webhookSecretHelpPrefix} ${e.translations.settings.payments.stripe.webhookHelpTarget}`:""}`:`${e.translations.settings.payments.stripe.webhookSecretHelpPrefix} ${e.translations.settings.payments.stripe.webhookHelpTarget}`,"helptext-persistent":"","helptext-validation":"",disabled:s.saving,valid:!l.v$.stripe_test_webhook_secret.$invalid||!l.v$.stripe_test_webhook_secret.$dirty},null,8,["modelValue","label","helptext","disabled","valid"])])),_:1},8,["label","message","open","onUpdateActive"])])),_:1})])),_:1}),(0,o._)("div",VW,[(0,o.Wm)(y,{tag:"md-button",mode:"secondary",to:"/ssa/settings/payments",disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled"]),(0,o.Wm)(y,{mode:"raised",onClick:n.saveStripe,disabled:s.saving},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick","disabled"]),(0,o.wy)((0,o.Wm)(w,{class:"md-primary",medium:"",indeterminate:""},null,512),[[a.F8,s.saving]])])],64)):((0,o.wg)(),(0,o.j4)(x,{key:1}))],34),(0,o.Wm)(C,{ref:"confirmLeaveDirty",title:e.translations.settings.payments.confirmIgnoreChangesTitle,"content-html":e.translations.settings.payments.confirmIgnoreChangesContent,"ok-text":e.translations.settings.payments.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.payments.confirmIgnoreChangesCancel,onConfirm:n.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}const RW=e=>/^(?=[^a-z]*[a-z])(?:(?![<>\\'"])[ -~]){1,10}$/i.test(e)||""===e,LW=e=>/^pk_live_[a-zA-Z0-9]+/i.test(e)||""===e,jW=e=>/^sk_live_[a-zA-Z0-9]+/i.test(e)||""===e,qW=e=>/^whsec_[a-zA-Z0-9]+/i.test(e)||""===e,NW=e=>/^pk_test_[a-zA-Z0-9]+/i.test(e)||""===e,$W=e=>/^(|sk_test_[a-zA-Z0-9]+)$/i.test(e)||""===e;var HW={name:"PaymentsStripe",components:{SettingNotEnabled:GU},setup(){return{v$:(0,Rd.Xw)()}},data(){return{section:"0",dirty:!1,saving:!1,fieldBackendErrors:{},isErrorSavingVisible:!1,isWebhookNoticeVisible:!1,routerNext:null}},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{stripe:{handler:function(e,t){this.dirty=t},deep:!0}},validations(){return{stripe_enabled_payment_methods:{valid:()=>this.stripe_enabled_payment_methods.length>0},stripe_display_title:{required:Ld.C1},stripe_publishable_key:{required:(0,Ld.Nf)((()=>this.stripe_test_mode_enabled)),regexValidator:LW,fieldBackendErrorsEmpty:()=>this.fieldBackendErrorsEmpty("publishable_key")},stripe_secret_key:{required:(0,Ld.Nf)((()=>this.stripe_test_mode_enabled)),regexValidator:jW,fieldBackendErrorsEmpty:()=>this.fieldBackendErrorsEmpty("secret_key")},stripe_webhook_secret:{required:!1,regexValidator:qW,fieldBackendErrorsEmpty:()=>this.fieldBackendErrorsEmpty("webhook_secret")},stripe_test_publishable_key:{required:(0,Ld.CF)((()=>this.stripe_test_mode_enabled)),regexValidator:NW,fieldBackendErrorsEmpty:()=>this.fieldBackendErrorsEmpty("test_publishable_key")},stripe_test_secret_key:{required:(0,Ld.CF)((()=>this.stripe_test_mode_enabled)),regexValidator:$W,fieldBackendErrorsEmpty:()=>this.fieldBackendErrorsEmpty("test_secret_key")},stripe_test_webhook_secret:{required:!1,regexValidator:qW,fieldBackendErrorsEmpty:()=>this.fieldBackendErrorsEmpty("test_webhook_secret")},stripe_statement_descriptor:{required:!1,regexValidator:RW}}},mounted(){this.getGuides({"ssasc-plugin-screen":K.stripe})},computed:{stripe_description:{get(){return this.settings.stripe.description},set(e){this.updateStripeDescription(e)}},stripe_statement_descriptor:{get(){return this.settings.stripe.statement_descriptor},set(e){this.updateStripeStatementDescriptor(e)}},stripe_display_title:{get(){return this.settings.stripe.title},set(e){this.updateStripeTitle(e)}},stripe_publishable_key:{get(){return this.settings.stripe.publishable_key},set(e){this.updateStripePublishableKey(e)}},stripe_secret_key:{get(){return this.settings.stripe.secret_key},set(e){this.updateStripeSecretKey(e)}},fieldErrors(){return e=>{if(!e)return console.error("Missing param field in fieldErrors!"),null;const t=this.fieldBackendErrors[e];if(Array.isArray(t)&&t.length>0)return{message:t.join(", "),help_link:!0};const i=this.v$?.[`stripe_${e}`];if(i?.$dirty){if(i.required?.$invalid)return{message:this.translations.settings.payments.stripe.validation_errors?.[e]?.required,help_link:!0};if(i.regexValidator?.$invalid)return{message:this.translations.settings.payments.stripe.validation_errors?.[e]?.regexValidator}}return null}},stripe_webhook(){return this.settings.stripe.webhook},stripe_webhook_helper_text(){return this.translations.settings.payments.stripe.webhookHelpPrefix+' '+this.translations.settings.payments.stripe.webhookHelpTarget+""},publishableTestKeyHelpText(){if(this.v$.stripe_test_publishable_key.$invalid){let e=this.fieldErrors("test_publishable_key")?.["message"]||"";return this.fieldErrors("test_publishable_key")?.["help_link"]&&(e+=` – ${this.translations.settings.payments.stripe.publishableKeyHelp}`),e}return`${this.translations.settings.payments.stripe.publishableKeyHelp}`},publishableKeyHelpText(){const e=this.fieldErrors("publishable_key");return this.v$.stripe_publishable_key.$invalid&&e?.message?`${e.message} ${e.help_link?`– ${this.translations.settings.payments.stripe.publishableKeyHelp}`:""}`:`${this.translations.settings.payments.stripe.publishableKeyHelp}`},secretKeyHelpText(){const e=this.fieldErrors("secret_key");return this.v$.stripe_secret_key.$invalid&&e?.message?`${e.message} ${e.help_link?`– ${this.translations.settings.payments.stripe.secretKeyHelp}`:""}`:`${this.translations.settings.payments.stripe.secretKeyHelp}`},stripe_webhook_secret:{get(){return this.settings.stripe.webhook_secret},set(e){this.updateStripeWebhookSecret(e)}},stripe_available_payment_methods(){return this.settings.stripe.available_payment_methods},stripe_enabled_payment_methods:{get(){return this.settings.stripe.enabled_payment_methods},set(e){this.updateEnabledStripePaymentMethods(e)}},stripe_test_mode_enabled:{get(){return this.settings.stripe.test_mode_enabled},set(e){this.updateStripeTestMode(e)}},stripe_test_publishable_key:{get(){return this.settings.stripe.test_publishable_key},set(e){this.updateStripeTestPublishableKey(e)}},stripe_test_secret_key:{get(){return this.settings.stripe.test_secret_key},set(e){this.updateStripeTestSecretKey(e)}},stripe_test_webhook_secret:{get(){return this.settings.stripe.test_webhook_secret},set(e){this.updateStripeTestWebhookSecret(e)}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("payments",["stripe","stripeModule"])},methods:{clearfieldBackendErrors:function(e){delete this.fieldBackendErrors[e]},saveStripe(){if(this.v$.$touch(),this.v$.$invalid){const e=this.v$.$errors[0].$property??"";this.section=this.getErrorSection(e),this.$nextTick((()=>{const t=this.$el.querySelector(`[data-validatorkey="${e}"]`);t&&t.focus()}))}else this.saving=!0,this.saveStripeSettings().then((()=>{this.fieldBackendErrors={},this.dirty=!1,this.saving=!1,this.$router.push("/ssa/settings/payments")})).catch((e=>{this.fieldBackendErrors={},e.responseJSON.additional_errors?.forEach((e=>{this.fieldBackendErrors[e.message[0]]=this.fieldBackendErrors[e.message[0]]??[],this.fieldBackendErrors[e.message[0]].push(e.message[1])})),this.saving=!1,this.isErrorSavingVisible=!0,this.v$.$touch()}))},getErrorSection(e){switch(e){case"stripe_display_title":case"stripe_publishable_key":case"stripe_secret_key":case"stripe_webhook_secret":return"0";case"stripe_test_publishable_key":case"stripe_test_secret_key":case"stripe_test_webhook_secret":case"stripe_statement_descriptor":return"1";default:return"0"}},retrySave(){this.isErrorSavingVisible=!1,this.saveStripe()},copyWebhook(){let e=this.$refs["webhookValue"].$el,t=e.querySelector("input"),i=t.value.trim();i&&(t.select(),document.execCommand("copy"),this.isWebhookNoticeVisible=!0)},updateSection(e){this.section=e||null},dialogLeaveWithoutSaving(){this.routerNext()},fieldBackendErrorsEmpty(e){return!this.fieldBackendErrors?.[e]?.length},...(0,m.nv)("payments",["saveStripeSettings","updateStripeDescription","updateStripeStatementDescriptor","updateStripeTitle","updateStripePublishableKey","updateStripeSecretKey","updateStripeWebhookSecret","updateEnabledStripePaymentMethods","updateAvailableStripePaymentMethods","updateStripeTestMode","updateStripeTestPublishableKey","updateStripeTestSecretKey","updateStripeTestWebhookSecret"]),...(0,m.nv)("guides",["getGuides"])}};const ZW=(0,he.Z)(HW,[["render",WW],["__scopeId","data-v-2ede5b9c"]]);var YW=ZW,KW=[{path:"payments",component:yW,redirect:"/ssa/settings/payments/all",meta:{ssa_manage_site_settings:!0},children:[{path:"all",name:"payments-all",component:BW},{path:"paypal",name:"payments-paypal",component:EW},{path:"stripe",name:"payments-stripe",component:YW}]}];const JW={class:"webhooks-all"};function XW(e,t,i,a,r,l){const s=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",JW,[(0,o.Wm)(s,{onSaved:l.backToList},null,8,["onSaved"])])}var QW={name:"WebhooksAll",store:$J,data(){return{}},mounted(){this.getGuides({"ssasc-plugin-screen":K.webhooks})},methods:{backToList(){this.$router.push("/ssa/settings/webhooks/list")},...(0,m.nv)("guides",["getGuides"])}};const eR=(0,he.Z)(QW,[["render",XW]]);var tR=eR;const iR={class:"webhooks-settings"},aR={style:{flex:"1"}},oR={class:"md-title"},rR={key:0,class:"foxy-list-default webhook-list"},lR=["onClick"],sR={class:"foxy-list-container"},nR={class:"md-list-text-container"};function dR(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-button"),f=(0,o.up)("foxy-toolbar"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-icon-button"),h=(0,o.up)("foxy-list-item"),m=(0,o.up)("foxy-menu"),g=(0,o.up)("foxy-menu-anchor"),_=(0,o.up)("foxy-empty"),y=(0,o.up)("foxy-dialog-title"),w=(0,o.up)("foxy-dialog-content"),x=(0,o.up)("foxy-dialog-button"),C=(0,o.up)("foxy-dialog-footer"),v=(0,o.up)("foxy-dialog"),b=(0,o.up)("setting-not-enabled");return(0,o.wg)(),(0,o.iD)("div",iR,[(0,o.Wm)(d),e.settings.webhooks.enabled?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(f,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("div",aR,[(0,o._)("h2",oR,(0,r.zw)(e.translations.settings.webhooks.title),1)]),(0,o.Wm)(p,{class:"md-primary",onClick:n.addWebhook,icon:"add"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.actions.addNew),1)])),_:1},8,["onClick"])])),_:1}),e.settings.webhooks.webhooks.length?((0,o.wg)(),(0,o.iD)("ul",rR,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.settings.webhooks.webhooks,((t,i)=>((0,o.wg)(),(0,o.iD)("li",{key:i,onClick:()=>n.editWebhook(i)},[(0,o._)("div",sR,[(0,o._)("div",nR,[(0,o._)("span",null,(0,r.zw)(t.title),1),(0,o._)("span",null,[1===t.triggers.length?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.fields.trigger_single),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.fields.trigger_plural),1)],64)),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.triggers,((i,a)=>((0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.fields.triggerNames[i]),1),a[(0,o.Wm)(c,{onClick:(0,a.iM)((e=>n.actionMenuHandler(i)),["stop"])},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"settings"})])),_:2},1032,["onClick"]),(0,o.Wm)(m,{modelValue:s.openMenu[i],"onUpdate:modelValue":e=>s.openMenu[i]=e},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{onClick:(0,a.iM)((e=>n.editWebhook(i)),["stop"])},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"]),(0,o.Wm)(h,{onClick:(0,a.iM)((e=>n.cloneWebhook(i)),["stop"])},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"content_copy"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.clone),1)])),_:2},1032,["onClick"]),(0,o.Wm)(h,{onClick:(0,a.iM)((e=>n.confirmDelete(i)),["stop"])},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.delete),1)])),_:2},1032,["onClick"])])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)])],8,lR)))),128))])):((0,o.wg)(),(0,o.j4)(_,{key:1,label:e.translations.settings.webhooks.empty},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{mode:"raised",icon:"add",class:"md-primary md-raised",onClick:n.addWebhook},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.actions.addNew),1)])),_:1},8,["onClick"])])),_:1},8,["label"])),(0,o.Wm)(v,{ref:"confirmDelete"},{default:(0,o.w5)((()=>[(0,o.Wm)(y,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.confirmDelete),1)])),_:1}),s.deletedIndex||0===s.deletedIndex?((0,o.wg)(),(0,o.j4)(w,{key:0},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.settings.webhooks.webhooks[s.deletedIndex].title),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(C,null,{default:(0,o.w5)((()=>[(0,o.Wm)(x,{action:"dismiss",onClick:n.cancelDelete},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.confirmDeleteCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(x,{action:"accept",onClick:n.deleteWebhook},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.confirmDeleteOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512)],64)):((0,o.wg)(),(0,o.j4)(b,{key:1}))])}var pR={name:"SettingsWebhooksList",components:{SettingsHeader:zO,SettingNotEnabled:GU},data(){return{deletedIndex:null,openMenu:{}}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"])},methods:{actionMenuHandler(e){this.openMenu={},this.openMenu[e]=!0},addWebhook(){this.$router.push({name:"webhook-single"})},editWebhook(e){this.$router.push({name:"webhook-single",params:{index:e}})},cloneWebhook(e){this.cloneSettingsWebhook({index:e,settings:this.settings}),this.updateWebhooksSettings(),this.$router.push({name:"webhook-single",params:{index:this.settings.webhooks.webhooks.length-1}})},deleteWebhook(){this.deleteSettingsWebhook({index:this.deletedIndex,settings:this.settings}),this.deletedIndex=null,this.$refs["confirmDelete"].close(),this.updateWebhooksSettings()},confirmDelete(e){this.deletedIndex=e,this.$refs["confirmDelete"].open()},cancelDelete(){this.$refs["confirmDelete"].close()},...(0,m.OI)("webhooks",["deleteSettingsWebhook","cloneSettingsWebhook"]),...(0,m.nv)("webhooks",["updateWebhooksSettings"])}};const fR=(0,he.Z)(pR,[["render",dR],["__scopeId","data-v-544b3a67"]]);var uR=fR;const cR={class:"md-title"},hR={class:"md-refreshable"},mR={class:"md-fieldset"},gR={key:0,class:"checkboxes-list-flex-row"},_R={class:"md-fieldset"},yR={class:"foxy-list-default fit-content"},wR={class:"foxy-list-container"},xR={class:"md-fieldset"},CR={class:"checkboxes-list-flex-row"},vR={class:"button-bar"};function bR(e,t,i,l,s,n){const d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-textfield"),f=(0,o.up)("foxy-icon"),u=(0,o.up)("foxy-icon-button"),c=(0,o.up)("foxy-snackbar"),h=(0,o.up)("foxy-checkbox"),m=(0,o.up)("foxy-progress-circular"),g=(0,o.up)("webhook-details"),_=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{onSubmit:t[7]||(t[7]=(0,a.iM)((()=>{}),["prevent"])),class:"webhook-edit"},[(0,o.Wm)(d,{onClick:n.cancelEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o._)("h2",cR,[i.index||0===i.index?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.actions.edit),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.webhooks.actions.addNew),1)],64))]),(0,o.Wm)(p,{modelValue:n.title,"onUpdate:modelValue":t[0]||(t[0]=e=>n.title=e),id:"title",label:e.translations.settings.webhooks.fields.title},null,8,["modelValue","label"]),(0,o._)("div",hR,[(0,o.Wm)(p,{modelValue:n.token,"onUpdate:modelValue":t[1]||(t[1]=e=>n.token=e),id:"token",required:"",label:e.translations.settings.webhooks.fields.token,helptext:s.validToken?e.translations.settings.webhooks.fields.token_help:e.translations.settings.webhooks.fields.token_error,"helptext-persistent":"","helptext-validation":"",valid:s.validToken},null,8,["modelValue","label","helptext","valid"]),(0,o.Wm)(u,{class:"foxy-textfield-action-button",onClick:n.refreshToken},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{icon:"refresh"})])),_:1},8,["onClick"])]),(0,o.Wm)(c,{position:"top center",modelValue:s.isTokenNoticeVisible,"onUpdate:modelValue":t[2]||(t[2]=e=>s.isTokenNoticeVisible=e),message:e.translations.settings.webhooks.fields.token_copied},null,8,["modelValue","message"]),(0,o._)("fieldset",mR,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.webhooks.fields.triggers)+" *",1),(0,o.wy)((0,o._)("p",{class:"error-message"},(0,r.zw)(e.translations.settings.webhooks.errors.requiredTriggers),513),[[a.F8,!s.validTriggers]]),s.webhookTriggers.length?((0,o.wg)(),(0,o.iD)("div",gR,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.webhookTriggers,((i,a)=>((0,o.wg)(),(0,o.j4)(h,{key:a,id:"trigger-"+a,name:"triggers",value:i.toString(),modelValue:n.triggers,"onUpdate:modelValue":t[3]||(t[3]=e=>n.triggers=e),label:e.translations.settings.webhooks.fields.triggerNames[i],class:"md-primary"},null,8,["id","value","modelValue","label"])))),128))])):(0,o.kq)("",!0)]),(0,o._)("fieldset",_R,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.webhooks.fields.urls)+" *",1),(0,o.wy)((0,o._)("p",{class:"error-message"},(0,r.zw)(e.translations.settings.webhooks.errors.requiredUrls),513),[[a.F8,!s.validUrls]]),(0,o._)("ul",yR,[Object.prototype.hasOwnProperty.call(s.webhook,"urls")&&s.webhook.urls.length?((0,o.wg)(!0),(0,o.iD)(o.HY,{key:0},(0,o.Ko)(s.webhook.urls,((e,t)=>((0,o.wg)(),(0,o.iD)("li",{key:t},[(0,o._)("div",wR,[(0,o._)("span",null,[(0,o.Wm)(f,{icon:"link"})]),(0,o._)("span",null,(0,r.zw)(e),1),(0,o.Wm)(u,{class:"md-icon-button md-list-action",onClick:e=>n.removeUrl(t)},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{icon:"clear",class:"md-primary"})])),_:2},1032,["onClick"])])])))),128)):(0,o.kq)("",!0)]),(0,o.Wm)(p,{placeholder:"https://",id:"label",modelValue:s.url,"onUpdate:modelValue":t[4]||(t[4]=e=>s.url=e),onKeyup:n.addUrl,onChange:n.addUrl,label:"Add URL",helptext:s.urlExists?e.translations.settings.webhooks.fields.url_exists:s.validUrl?"":e.translations.settings.webhooks.fields.url_invalid,"helptext-persistent":"","helptext-validation":"",valid:s.validUrls&&!s.urlExists&&s.validUrl},null,8,["modelValue","onKeyup","onChange","helptext","valid"])]),(0,o._)("fieldset",xR,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.appointmentTypesTitle)+" *",1),(0,o.wy)((0,o._)("p",{class:"error-message"},(0,r.zw)(e.translations.settings.webhooks.errors.requiredAppointmentTypes),513),[[a.F8,!s.validAppointmentTypes]]),(0,o._)("div",CR,[(0,o.Wm)(h,{modelValue:s.all,"onUpdate:modelValue":t[5]||(t[5]=e=>s.all=e),label:e.translations.settings.appointmentTypeAll,onToggle:n.toggleAll},null,8,["modelValue","label","onToggle"]),s.all?(0,o.kq)("",!0):((0,o.wg)(!0),(0,o.iD)(o.HY,{key:0},(0,o.Ko)(e.editableAppointmentTypes,(e=>((0,o.wg)(),(0,o.j4)(h,{key:e.id,id:"type-"+e.id,name:"appointment-types",value:e.id.toString(),modelValue:n.appointment_types,"onUpdate:modelValue":t[6]||(t[6]=e=>n.appointment_types=e),label:e.title,class:"md-primary"},null,8,["id","value","modelValue","label"])))),128))])]),(0,o._)("div",vR,[(0,o.Wm)(d,{mode:"secondary",onClick:n.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(d,{mode:"raised",onClick:n.saveWebhook},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["onClick"]),s.saving?((0,o.wg)(),(0,o.j4)(m,{key:0,indeterminate:"",medium:""})):(0,o.kq)("",!0)]),(0,o.Wm)(g,{index:this.index},null,8,["index"])],32),(0,o.Wm)(_,{ref:"confirmLeaveDirty",title:e.translations.settings.webhooks.confirmIgnoreChangesTitle,"content-html":e.translations.settings.webhooks.confirmIgnoreChangesContent,"ok-text":e.translations.settings.webhooks.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.webhooks.confirmIgnoreChangesCancel,onConfirm:n.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"])])}i(95194),i(79976),i(54302),i(1274);const BR={class:"webhook-details"},SR=(0,o._)("hr",{class:"foxy-divider"},null,-1),kR={class:"md-title"},AR={class:"foxy-table mdc-theme-name--default"},MR=(0,o._)("tbody",null,[(0,o._)("tr",null,[(0,o._)("td",null,[(0,o._)("code",null,"Content-Type")]),(0,o._)("td",null,"application/json; charset=utf-8")])],-1),DR={class:"md-title"},TR=(0,o._)("pre",null,[(0,o._)("code",null,'{\n "action": "appointment_booked", // possible values of `appointment_booked`, `appointment_edited`, `appointment_canceled`\n "action_noun": "appointment",\n "action_verb": "booked", // possible values of `booked`, `edited`, `canceled`\n "appointment": {\n "id": "123", // Unique ID to reference this appointment\n "appointment_type_id": "36", // Unique value that is consistent even if the type\'s name/slug changes\n "appointment_type_slug": "2hr-call",\n "customer_id": "1",\n "customer_information": {\n "Name": "Nathan Tyler",\n "Email": "nathan@tylerdigital.com"\n // values from your custom fields will also be included here\n },\n "post_information": [],\n "customer_timezone": "Asia/Beirut",\n "start_date": "2018-09-20 16:15:00", // all dates are stored in the UTC timezone\n "end_date": "2018-09-20 18:15:00",\n "status": "booked", // possible values of `booked` or `canceled`\n "date_created": "2018-09-19 01:00:44",\n "date_modified": "2018-09-19 01:00:44",\n "public_edit_url": "http://yoursite.com/appointments/change/e7b9a0a37d18e86ef11b2da12345678900",\n "price_full": 100.00,\n "payment_method": "stripe",\n "web_meeting_url": "https://your-web-meeting-url.com/url/j.php?MTID=m89e2d3199fc229a01732c0964bf48c03",\n "web_meeting_password": "your-meeting-password",\n "appointment_type_title": "2hr Call",\n "local_time_for": {\n "appointment_type": {\n "raw": {\n "start_date": "2023-10-10 10:00:00",\n "end_date": "2023-10-10 11:00:00",\n "date_created": "2023-10-04 22:04:42",\n "date_modified": "2023-10-04 22:04:44"\n },\n "raw_parts": {\n "start_date": {\n "date": "2023-10-10",\n "time": "10:00:00",\n "timezone": "Asia/Beirut",\n "timezone_offset": "+0300"\n },\n "end_date": {\n "date": "2023-10-10",\n "time": "11:00:00",\n "timezone": "Asia/Beirut",\n "timezone_offset": "+0300"\n },\n "date_created": {\n "date": "2023-10-04",\n "time": "22:04:42",\n "timezone": "Asia/Beirut",\n "timezone_offset": "+0300"\n },\n "date_modified": {\n "date": "2023-10-04",\n "time": "22:04:44",\n "timezone": "Asia/Beirut",\n "timezone_offset": "+0300"\n }\n },\n "formatted": {\n "start_date": "October 10, 2023 10:00 am EEST",\n "end_date": "October 10, 2023 11:00 am EEST",\n "date_created": "October 4, 2023 10:04 pm EEST",\n "date_modified": "October 4, 2023 10:04 pm EEST"\n },\n "formatted_parts": {\n "start_date": {\n "date": "October 10, 2023",\n "time": "10:00 am",\n "timezone": "EEST"\n },\n "end_date": {\n "date": "October 10, 2023",\n "time": "11:00 am",\n "timezone": "EEST"\n },\n "date_created": {\n "date": "October 4, 2023",\n "time": "10:04 pm",\n "timezone": "EEST"\n },\n "date_modified": {\n "date": "October 4, 2023",\n "time": "10:04 pm",\n "timezone": "EEST"\n }\n }\n }\n }\n },\n "team_members": [\n {\n "id": 1,\n "wp_user_id": "2",\n "name": "John",\n "display_name": "John",\n "email": "your-email@example.com"\n }\n ],\n // MemberPress integration; In case the appointment is booked under a specific membership\n "mepr_membership": {\n "id": 1,\n "title": "Premium"\n },\n "meta": [],\n "signature": {\n "token": "1a2b3c4d5e6f..." // so you can verify that the delivered webhook originated from this site\n "site_name": "This WordPress Site" // in case you have multiple sites sharing the same webhook\n "home_url": "https://thissite\'shome.com" // the homepage URL for your website\n "site_url": "https://thissite.com" // in case you have multiple sites sharing the same webhook\n "network_site_url": "1a2b3c4d5e6f..." // only different than `site_url` if using multisite\n }\n}\n')],-1);function OR(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("div",BR,[SR,(0,o._)("h3",kR,(0,r.zw)(e.translations.settings.webhooks.details.deliveryHeaders),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.webhooks.details.deliveryDetails),1),(0,o._)("div",AR,[(0,o._)("table",null,[(0,o._)("thead",null,[(0,o._)("tr",null,[(0,o._)("th",null,(0,r.zw)(e.translations.settings.webhooks.details.deliveryDetailHeader),1),(0,o._)("th",null,(0,r.zw)(e.translations.settings.webhooks.details.deliveryDetailDescription),1)])]),MR])]),(0,o._)("h3",DR,(0,r.zw)(e.translations.settings.webhooks.details.deliveryExample),1),TR])}var GR={name:"WebhookDetails",props:["index"],data(){return{}},computed:{...(0,m.rn)("translations",["translations"])}};const ER=(0,he.Z)(GR,[["render",OR]]);var UR=ER,FR={name:"WebhookEdit",props:["index"],components:{WebhookDetails:UR},data(){return{all:!0,dirty:!1,saving:!1,webhook:{},webhookTriggers:P,url:"",urlExists:!1,validAppointmentTypes:!0,validToken:!0,validTriggers:!0,validUrl:!0,validUrls:!0,leaveWithoutSaving:!1,isTokenNoticeVisible:!1,routerNext:null}},beforeMount(){if(this.index||0===this.index){let e=wa().cloneDeep(this.settings.webhooks.webhooks[this.index]);this.webhook=e}Object.prototype.hasOwnProperty.call(this.webhook,"token")&&this.webhook.token||this.refreshToken(),Object.prototype.hasOwnProperty.call(this.webhook,"triggers")||(this.webhook.triggers=[]),Object.prototype.hasOwnProperty.call(this.webhook,"urls")||(this.webhook.urls=[]),Object.prototype.hasOwnProperty.call(this.webhook,"appointment_types")||(this.webhook.appointment_types=[]),Object.prototype.hasOwnProperty.call(this.webhook,"appointment_types")&&this.webhook.appointment_types.length&&(this.all=!1),Object.prototype.hasOwnProperty.call(this.webhook,"schema")||(this.webhook.schema="2018-09-20")},beforeRouteLeave(e,t,i){if(this.dirty){let e="confirmLeaveDirty";this.$refs[e].open(),this.routerNext=i}else i()},watch:{webhook:{handler:function(e,t){this.dirty=!wa().isEmpty(t)},deep:!0}},computed:{title:{get(){return Object.prototype.hasOwnProperty.call(this.webhook,"title")?this.webhook.title:""},set(e){this.webhook.title=e}},token:{get(){return Object.prototype.hasOwnProperty.call(this.webhook,"token")?this.webhook.token:""},set(e){this.webhook.token=e}},triggers:{get(){return this.webhook.triggers},set(e){this.webhook.triggers=e}},appointment_types:{get(){return this.webhook.appointment_types},set(e){this.webhook.appointment_types=e}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.Se)("appointment_types",["editableAppointmentTypes"])},methods:{cancelEdit(){this.$router.push("/ssa/settings/webhooks/list")},generateToken(){let e=new Uint8Array(12);return window.crypto.getRandomValues(e),Array.from(e,(e=>("0"+e.toString(16)).substr(-2))).join("")},refreshToken(){let e=this.generateToken();this.webhook.token=e},isValidUrl(e){try{let t=e;return t.toLowerCase(),t=new URL(e),!0}catch(t){return!1}},addUrl(e){if(this.validUrl=!0,"keyup"===e.type&&13!==e.keyCode)return;if(!this.url)return;if(!this.isValidUrl(this.url))return void(this.validUrl=!1);let t=Object.prototype.hasOwnProperty.call(this.webhook,"urls")?this.webhook.urls.slice(0):[],i=t.findIndex((e=>e===this.url));i>-1?this.urlExists=!0:(this.urlExists=!1,t.push(this.url),this.webhook.urls=t,this.validateRequiredFields(),this.url="")},removeUrl(e){let t=this.webhook.urls.slice(0);t.splice(e,1),this.webhook.urls=t},validateRequiredFields(){this.validTriggers=this.webhook.triggers.length,this.validUrls=this.webhook.urls.length,this.validAppointmentTypes=this.webhook.appointment_types.length||this.all,this.validToken=this.webhook.token.length},saveWebhook(){this.validateRequiredFields(),this.validUrls&&this.validTriggers&&this.validAppointmentTypes&&this.validToken&&(this.saving=!0,this.index||0===this.index?this.updateSingleWebhook({index:this.index,webhook:this.webhook,settings:this.settings}):this.addSettingsWebhook({webhook:this.webhook,settings:this.settings}),this.updateWebhooksSettings().then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")})))},toggleAll(e){if(e)return void(this.webhook.appointment_types=[]);let t=this.editableAppointmentTypes.map((e=>e.id));this.webhook.appointment_types=t},dialogLeaveWithoutSaving(){this.routerNext()},...(0,m.OI)("webhooks",["updateSingleWebhook","addSettingsWebhook"]),...(0,m.nv)("webhooks",["updateWebhooksSettings"])}};const IR=(0,he.Z)(FR,[["render",bR]]);var zR=IR,PR=[{path:"webhooks",component:tR,redirect:"/ssa/settings/webhooks/list",meta:{ssa_manage_site_settings:!0},children:[{path:"list",name:"webhooks-list",component:uR},{path:"webhook/:index?",name:"webhook-single",component:zR,props:!0}]}];const VR={class:"staff-all"};function WR(e,t,i,a,r,l){const s=(0,o.up)("loading"),n=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",VR,[r.loading?((0,o.wg)(),(0,o.j4)(s,{key:0,message:e.translations.settings.staff.loading},null,8,["message"])):((0,o.wg)(),(0,o.j4)(n,{key:1}))])}var RR={name:"StaffAll",components:{Loading:ge},data(){return{loading:!0}},mounted(){this.init()},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)("staff",["staff","users"])},methods:{init(){return"undefined"===typeof this.staff?(this.loading=!0,void this.fetchStaff().then((()=>this.init())).catch((e=>{console.log("Error loading staff",e)}))):this.users?void(this.loading=!1):(this.loading=!0,void this.fetchUsers().then((()=>this.init())).catch((e=>{console.log("Error loading WP users",e)})))},...(0,m.nv)("staff",["fetchStaff","fetchUsers"])}};const LR=(0,he.Z)(RR,[["render",WR]]);var jR=LR;const qR={class:"staff-listing"},NR=(0,o._)("div",{style:{flex:"1"}},null,-1),$R={key:0,class:"search"},HR={class:"screen-reader-text"},ZR={for:"filterSearchInput",class:"screen-reader-text"},YR={class:"screen-reader-text"},KR={key:1,class:"staff-list"},JR=["onClick"],XR=["src"],QR={class:"md-list-item-container"},eL={class:"md-list-text-container"},tL=["href"],iL={class:"screen-reader-text"},aL={key:1},oL={class:"inline-staff-error-notice"},rL={key:0};function lL(e,t,i,l,s,n){const d=(0,o.up)("settings-header"),p=(0,o.up)("foxy-list-item"),f=(0,o.up)("foxy-select"),u=(0,o.up)("foxy-icon"),c=(0,o.up)("foxy-icon-button"),h=(0,o.up)("foxy-button"),m=(0,o.up)("foxy-toolbar"),g=(0,o.up)("foxy-dialog-title"),_=(0,o.up)("foxy-dialog-button"),y=(0,o.up)("foxy-dialog-footer"),w=(0,o.up)("foxy-dialog"),x=(0,o.up)("foxy-empty"),C=(0,o.up)("foxy-avatar"),v=(0,o.up)("foxy-menu"),b=(0,o.up)("foxy-menu-anchor");return(0,o.wg)(),(0,o.iD)("div",qR,[(0,o.Wm)(d),(0,o.Wm)(m,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o.Wm)(f,{fullwidth:!1,style:{width:"300px"},class:"title",name:"staff-view",id:"staff-view",modelValue:s.staffView,"onUpdate:modelValue":t[0]||(t[0]=e=>s.staffView=e),label:e.translations.settings.staff.selectStaff},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{"data-value":"publish",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.title),1)])),_:1}),(0,o.Wm)(p,{"data-value":"draft",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.status.inactive),1)])),_:1})])),_:1},8,["modelValue","label"]),NR,s.searching?((0,o.wg)(),(0,o.iD)("div",$R,[(0,o.Wm)(c,{onClick:n.closeSearch},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"keyboard_arrow_left"}),(0,o._)("span",HR,(0,r.zw)(e.translations.settings.staff.search.closeSearch),1)])),_:1},8,["onClick"]),(0,o._)("label",ZR,(0,r.zw)(e.translations.settings.staff.search.searchLabel),1),(0,o.wy)((0,o._)("input",{ref:"searchInput",type:"text",id:"filterSearchInput","onUpdate:modelValue":t[1]||(t[1]=e=>n.searchString=e),placeholder:"Search"},null,512),[[a.nr,n.searchString]]),(0,o.wy)((0,o.Wm)(c,{class:"clearFilterSearchInput",onClick:t[2]||(t[2]=e=>n.searchString=""),size:"small"},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"close"}),(0,o._)("span",YR,(0,r.zw)(e.translations.settings.staff.search.clearSearch),1)])),_:1},512),[[a.F8,n.searchString]])])):(0,o.kq)("",!0),(0,o._)("div",null,[s.searching?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(h,{key:0,ref:"openSearchButton",class:"md-primary",onClick:n.openSearch,indicator:""!=n.searchString,icon:"search"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.appointments.filter.search),1)])),_:1},8,["onClick","indicator"])),(0,o.Wm)(h,{class:"md-primary",onClick:n.addStaff,icon:"add"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.actions.addNew),1)])),_:1},8,["onClick"])])])),_:1}),(0,o.Wm)(w,{ref:"confirmDelete"},{default:(0,o.w5)((()=>[(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.confirmDelete),1)])),_:1}),(0,o.Wm)(y,null,{default:(0,o.w5)((()=>[(0,o.Wm)(_,{action:"dismiss",onClick:n.cancelDelete},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.confirmDeleteCancel),1)])),_:1},8,["onClick"]),(0,o.Wm)(_,{action:"accept",onClick:n.deleteSelectedStaff},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.confirmDeleteOk),1)])),_:1},8,["onClick"])])),_:1})])),_:1},512),n.displayStaff.length?((0,o.wg)(),(0,o.iD)("ul",KR,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.displayStaff,(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id,class:(0,r.C_)(["list-item",{"status-deleting":t.id===s.pendingId,"hover-off":n.isEditMenuOpened}]),onClick:e=>n.editStaff(t.id,n.isEditMenuOpened)},[(0,o.Wm)(C,{"md-theme":"light-green",class:"border-theme"},{default:(0,o.w5)((()=>[0!==parseInt(t.user_id,10)?((0,o.wg)(),(0,o.iD)("img",{key:0,src:e.userGravatar(t.user_id),alt:""},null,8,XR)):((0,o.wg)(),(0,o.j4)(u,{key:1,class:"md-size-2x",icon:"account_circle"}))])),_:2},1024),(0,o._)("div",QR,[(0,o._)("div",eL,[(0,o._)("span",null,[(0,o.Uk)((0,r.zw)(t.name?t.name:t.display_name)+" ",1),0!==parseInt(t.user_id,10)?((0,o.wg)(),(0,o.iD)("a",{key:0,href:e.wpUserLink(t.user_id),class:"staff-wp-indicator"},[(0,o.Uk)(" WP "),(0,o._)("span",iL,(0,r.zw)(e.translations.settings.staff.connectedUserEdit),1)],8,tL)):(0,o.kq)("",!0),t.error?.missing_refresh_token||t.error?.google_calendar_get_events_for_staff?((0,o.wg)(),(0,o.iD)("span",aL,[(0,o._)("u",oL,[(0,o.Wm)(u,{icon:"error",theme:e.$theme.error},null,8,["theme"]),(0,o._)("span",null,(0,r.zw)(e.translations.settings.staff.requireGcalReconnect),1)])])):(0,o.kq)("",!0)]),(0,o._)("span",null,(0,r.zw)(t.email),1),e.smsModule.enabled?((0,o.wg)(),(0,o.iD)("span",rL,(0,r.zw)(t.phone),1)):(0,o.kq)("",!0)])]),(0,o.Wm)(b,null,{default:(0,o.w5)((()=>[(0,o.Wm)(c,{disabled:s.saving,onClick:(0,a.iM)((e=>n.openEditMenu(t.id)),["stop"])},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"settings"})])),_:2},1032,["disabled","onClick"]),(0,o.Wm)(v,{modelValue:s.openMenu[t.id],"onUpdate:modelValue":e=>s.openMenu[t.id]=e},{default:(0,o.w5)((()=>["publish"===t.status?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(p,{onClick:e=>n.editStaff(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"]),(0,o.Wm)(p,{onClick:e=>n.toggleStaff(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"block"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.deactivate),1)])),_:2},1032,["onClick"])],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(p,{onClick:e=>n.toggleStaff(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"how_to_reg"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.activate),1)])),_:2},1032,["onClick"]),(0,o.Wm)(p,{onClick:e=>n.confirmDelete(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(u,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.delete),1)])),_:2},1032,["onClick"])],64))])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)],10,JR)))),128))])):((0,o.wg)(),(0,o.j4)(x,{key:0,label:n.emptyLabel,description:n.emptyDescription},{default:(0,o.w5)((()=>["publish"===s.staffView?((0,o.wg)(),(0,o.j4)(h,{key:0,mode:"raised",class:"md-primary",onClick:n.addStaff},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.actions.addNew),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0)])),_:1},8,["label","description"]))])}var sL={name:"SettingsStaff",components:{SettingsHeader:zO},data(){return{pendingId:null,saving:!1,staffView:"publish",searching:!1,filteredStaff:[],openMenu:{}}},watch:{searchString(e,t){if(e!==t){var i=[];i="publish"===this.staffView?[...this.staffStatusPublish]:[...this.staffStatusDraft];var a=[];for(let t=0;te.id.toString()===this.pendingId.toString()))},searchString:{get(){return this.search},set(e){this.setSearch(e)}},isEditMenuOpened(){return Object.keys(this.openMenu).length>0&&Object.values(this.openMenu).some((e=>!0===e))},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["api","settings"]),...(0,m.rn)("staff",["staff","search"]),...(0,m.Se)("appointments",["wpUserLink"]),...(0,m.Se)("staff",["staffStatusDraft","staffStatusPublish","userGravatar"]),...(0,m.Se)("notifications",["smsModule"])},methods:{addStaff(){this.defineNewStaffMember(),this.$router.push({name:"staff-single"})},cancelDelete(){this.$refs["confirmDelete"].close(),this.pendingId=null},confirmDelete(e){this.$refs["confirmDelete"].open(),this.pendingId=e},deleteSelectedStaff(){let e=this.pendingId;this.pendingId=null,this.$refs["confirmDelete"].close(),this.deleteStaff(e).then((()=>{})).catch((e=>{console.log(e)}))},editStaff(e,t=!1){if(t)return;if(this.saving)return;if(this.pendingId)return;let i=this.staff.find((t=>t.id===e));this.setCurrentStaff(i),this.$router.push({name:"staff-single",params:{id:e}})},toggleStaff(e){if(this.saving)return;this.saving=!0,this.pendingId=e;let t=this.staff.find((t=>t.id===e));this.setCurrentStaff(t);let i="publish"===t.status?"draft":"publish";this.setCurrentStaff({key:"status",value:i}),this.saveStaff().then((()=>{this.saving=!1,this.pendingId=null})).catch((e=>{console.log(e)}))},openSearch(){this.searching=1,this.$nextTick((()=>this.$refs.searchInput.focus())),document.addEventListener("keydown",this.keyPressEsc)},keyPressEsc(e){"Escape"===e.key&&(this.closeSearch(),document.removeEventListener("keydown",this.keyPressEsc))},closeSearch(){this.searchString="",this.searching=0,this.$nextTick((()=>this.$refs.openSearchButton?.$el.querySelector("button")?.focus()))},openEditMenu(e){this.openMenu={},this.openMenu[e]=!0},...(0,m.nv)("staff",["deleteStaff","saveStaff"]),...(0,m.OI)("staff",["defineNewStaffMember","setCurrentStaff","setSearch"]),...(0,m.nv)("guides",["getGuides"])}};const nL=(0,he.Z)(sL,[["render",lL]]);var dL=nL;const pL={style:{width:"fit-content"}},fL={class:"md-title"},uL={class:"button-bar"};function cL(e,t,i,l,s,n){const d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-snackbar"),f=(0,o.up)("loading"),u=(0,o.up)("user-selector"),c=(0,o.up)("edit-contact"),h=(0,o.up)("foxy-tab-item"),m=(0,o.up)("edit-permissions"),g=(0,o.up)("foxy-empty"),_=(0,o.up)("edit-availability"),y=(0,o.up)("edit-web-meetings"),w=(0,o.up)("foxy-tabs"),x=(0,o.up)("foxy-progress-circular"),C=(0,o.up)("foxy-dialog-confirm");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o._)("form",{onSubmit:t[1]||(t[1]=(0,a.iM)((()=>{}),["prevent"])),novalidate:"",class:(0,r.C_)(["staff-edit",{saving:s.saving}])},[(0,o._)("div",pL,[e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.j4)(d,{key:0,onClick:n.cancelEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0)]),(0,o._)("h2",fL,(0,r.zw)(n.pageTitle),1),(0,o.Wm)(p,{position:"top center",modelValue:s.isSaveStatusVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>s.isSaveStatusVisible=e),message:e.translations.settings.staff.actions.saved},null,8,["modelValue","message"]),s.loading?((0,o.wg)(),(0,o.j4)(f,{key:0,message:e.translations.settings.staff.loading},null,8,["message"])):i.id?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o.Wm)(w,{ref:"staffTabs"},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{label:e.translations.settings.staff.editProfile.contact,class:"tab-edit-contact"},{default:(0,o.w5)((()=>[(0,o.Wm)(c,{onValidationCheck:n.validateContact,"available-email":s.availableEmail,"user-id":e.userId,saving:s.saving},null,8,["onValidationCheck","available-email","user-id","saving"])])),_:1},8,["label"]),e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.j4)(h,{key:0,label:e.translations.settings.staff.editProfile.permissions},{default:(0,o.w5)((()=>[0!==e.userId?((0,o.wg)(),(0,o.j4)(m,{key:0,id:i.id,"user-id":e.userId,saving:s.saving},null,8,["id","user-id","saving"])):((0,o.wg)(),(0,o.j4)(g,{key:1,label:e.translations.settings.staff.not_connected.title,description:e.translations.settings.staff.not_connected.desc},{default:(0,o.w5)((()=>[(0,o._)("p",null,(0,r.zw)(e.currentStaff.email),1),(0,o.Wm)(d,{href:e.api.admin_url+"user-new.php",class:"md-raised md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.not_connected.addNew),1)])),_:1},8,["href"])])),_:1},8,["label","description"]))])),_:1},8,["label"])):(0,o.kq)("",!0),(0,o.Wm)(h,{label:e.translations.settings.staff.editProfile.availability},{default:(0,o.w5)((()=>[(0,o.Wm)(_,{"all-appointment-types":s.allAppointmentTypes,onToggleAll:n.toggleAllAppointmentTypes,id:i.id},null,8,["all-appointment-types","onToggleAll","id"])])),_:1},8,["label"]),(0,o.Wm)(h,{label:e.translations.settings.staff.editProfile.web_meetings},{default:(0,o.w5)((()=>[(0,o.Wm)(y)])),_:1},8,["label"])])),_:1},512),(0,o._)("div",uL,[(0,o.Wm)(d,{mode:"secondary",disabled:s.saving,onClick:n.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled","onClick"]),(0,o.Wm)(d,{mode:"raised",class:"md-primary",disabled:s.saving,onClick:n.saveStaffForm},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.save),1)])),_:1},8,["disabled","onClick"]),s.saving?((0,o.wg)(),(0,o.j4)(x,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])],64)):((0,o.wg)(),(0,o.j4)(u,{key:1,onCreateUser:n.createStaffFromEmail,disabled:s.saving,label:e.translations.settings.staff.fields.email.label,help:e.translations.settings.staff.fields.email.help},null,8,["onCreateUser","disabled","label","help"]))],34),(0,o.Wm)(C,{ref:"confirmLeaveDirty",title:e.translations.settings.staff.confirmIgnoreChangesTitle,"content-html":e.translations.settings.staff.confirmIgnoreChangesContent,"ok-text":e.translations.settings.staff.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.staff.confirmIgnoreChangesCancel,onConfirm:n.dialogLeaveDirty},null,8,["title","content-html","ok-text","cancel-text","onConfirm"]),(0,o.Wm)(C,{ref:"confirmLeaveIncomplete",title:e.translations.settings.staff.confirmDelete,"content-html":e.translations.settings.staff.confirmImcompleteContent,"ok-text":e.translations.settings.staff.confirmDeleteOk,"cancel-text":e.translations.settings.staff.confirmIncompleteCancel,onConfirm:n.dialogLeaveIncomplete},null,8,["title","content-html","ok-text","cancel-text","onConfirm"]),(0,o.Wm)(C,{ref:"existingStaff",title:s.editExistingText["title"],"content-html":s.editExistingText["content-html"],"ok-text":s.editExistingText["ok-text"],"cancel-text":s.editExistingText["cancel-text"],onConfirm:n.existingStaffConfirm,onCancel:n.existingStaffCancel},null,8,["title","content-html","ok-text","cancel-text","onConfirm","onCancel"]),(0,o.Wm)(C,{ref:"linkToUser",title:e.translations.settings.staff.linkUser.title,"content-html":""+e.translations.settings.staff.linkUser.htmlIntro+"
"+e.translations.settings.staff.fields.name.label+": "+s.currentUser.name+"
"+e.translations.settings.staff.fields.email.label+": "+s.currentUser.email+"
"+e.translations.settings.staff.linkUser.htmlExplanation+"
","ok-text":e.translations.settings.staff.linkUser.okText,"cancel-text":e.translations.settings.staff.linkUser.cancelText,onConfirm:n.linkToUserConfirm,onCancel:n.linkToUserCancel},null,8,["title","content-html","ok-text","cancel-text","onConfirm","onCancel"]),(0,o.Wm)(C,{ref:"emailTaken",title:e.translations.settings.staff.emailTaken.title,"content-html":e.translations.settings.staff.emailTaken["content-html"]},null,8,["title","content-html"])])}const hL={style:{"margin-bottom":"10px"}};function mL(e,t,i,l,s,n){const d=(0,o.up)("foxy-autocomplete"),p=(0,o.up)("foxy-textfield"),f=(0,o.up)("foxy-layout"),u=(0,o.up)("foxy-button");return(0,o.wg)(),(0,o.j4)(f,{"md-vertical-align":"center","md-gutter":16},{default:(0,o.w5)((()=>[(0,o.Wm)(f,null,{default:(0,o.w5)((()=>[e.unattachedUsers.length?((0,o.wg)(),(0,o.j4)(d,{key:0,modelValue:s.selectedEmail,"onUpdate:modelValue":t[0]||(t[0]=e=>s.selectedEmail=e),suggestions:e.unattachedUsers,"print-attribute":"email",onSelected:n.userCallback,disabled:i.disabled,label:i.label,helptext:s.error?e.translations.settings.staff.fields.email.error:i.help,"helptext-persistent":"","helptext-validation":"",valid:!s.error},null,8,["modelValue","suggestions","onSelected","disabled","label","helptext","valid"])):((0,o.wg)(),(0,o.j4)(p,{key:1,modelValue:s.selectedEmail,"onUpdate:modelValue":t[1]||(t[1]=e=>s.selectedEmail=e),onChange:n.userCallback,disabled:i.disabled,label:i.label,helptext:s.error?e.translations.settings.staff.fields.email.error:i.help,"helptext-persistent":"","helptext-validation":"",valid:!s.error},null,8,["modelValue","onChange","disabled","label","helptext","valid"]))])),_:1}),(0,o.Wm)(f,{"md-flex":"none"},{default:(0,o.w5)((()=>[(0,o._)("div",hL,[(0,o.Wm)(u,{mode:"raised",class:"md-primary",disabled:i.disabled,onKeydown:(0,a.D2)((0,a.iM)(n.handleCreate,["prevent"]),["enter"]),onClick:n.handleCreate},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.actions.create),1)])),_:1},8,["disabled","onKeydown","onClick"])])])),_:1})])),_:1})}var gL={name:"UserSelector",components:{},props:{disabled:{type:Boolean},help:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""}},data(){return{error:!1,selectedDisplayName:null,selectedEmail:null,selectedUser:null}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)("staff",["users"]),...(0,m.Se)("notifications",["validateEmail"]),...(0,m.Se)("staff",["unattachedUsers"])},methods:{handleCreate(){this.selectedEmail&&this.validateEmail(this.selectedEmail)?(this.error=!1,this.$emit("createUser",{user_id:this.selectedUser,email:this.selectedEmail,display_name:this.selectedDisplayName})):this.error=!0},userCallback(e){if("object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"email"))return this.selectedEmail=e.email.toLowerCase(),this.selectedUser=e.id,void(this.selectedDisplayName=e.display_name);if(!this.validateEmail(e))return;this.error=!1,this.selectedEmail=e;let t=this.users.find((e=>e.email.toLowerCase()===this.selectedEmail));this.selectedUser=t?t.id:0,this.selectedDisplayName=t?t.display_name:""},...(0,m.nv)("staff",["fetchUsers"])}};const _L=(0,he.Z)(gL,[["render",mL]]);var yL=_L;const wL={class:"edit-staff-contact"},xL={class:"md-title",style:{flex:"1"}};function CL(e,t,i,a,l,s){const n=(0,o.up)("foxy-textfield"),d=(0,o.up)("foxy-toolbar"),p=(0,o.up)("foxy-phone-field"),f=(0,o.up)("foxy-checkbox");return(0,o.wg)(),(0,o.iD)("div",wL,[0===i.userId?((0,o.wg)(),(0,o.j4)(n,{key:0,modelValue:l.v$.name.$model,"onUpdate:modelValue":t[0]||(t[0]=e=>l.v$.name.$model=e),disabled:i.saving,id:"name",required:"",label:e.translations.settings.staff.fields.name.label,helptext:l.v$.name.$error?e.translations.settings.staff.fields.name.error:"","helptext-persistent":"","helptext-validation":"",valid:!l.v$.name.$error},null,8,["modelValue","disabled","label","helptext","valid"])):(0,o.kq)("",!0),0!==i.userId?((0,o.wg)(),(0,o.j4)(d,{key:1,class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("h3",xL,(0,r.zw)(e.translations.settings.staff.connectedUser),1)])),_:1})):(0,o.kq)("",!0),(0,o.Wm)(n,{modelValue:l.v$.display_name.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>l.v$.display_name.$model=e),disabled:i.saving,id:"display_name",required:"",label:e.translations.settings.staff.fields.display_name.label,helptext:l.v$.display_name.$error?e.translations.settings.staff.fields.display_name.error:e.translations.settings.staff.fields.display_name.help,"helptext-persistent":"","helptext-validation":"",valid:!l.v$.display_name.$error},null,8,["modelValue","disabled","label","helptext","valid"]),(0,o.Wm)(n,{modelValue:l.v$.email.$model,"onUpdate:modelValue":t[2]||(t[2]=e=>l.v$.email.$model=e),id:"email",disabled:i.saving||0!==i.userId,required:"",label:e.translations.settings.staff.fields.email.label,helptext:i.availableEmail?l.v$.email.$error?e.translations.settings.staff.fields.email.error:"":e.translations.settings.staff.fields.email.errorTaken,"helptext-persistent":"","helptext-validation":"",valid:!l.v$.email.$error&&i.availableEmail},null,8,["modelValue","disabled","label","helptext","valid"]),e.smsModule.active?((0,o.wg)(),(0,o.j4)(p,{key:2,modelValue:s.phone,"onUpdate:modelValue":t[3]||(t[3]=e=>s.phone=e),modelModifiers:{trim:!0},label:e.translations.settings.staff.fields.phone.label,"input-options":{id:"phone",disabled:i.saving},required:!1,onValidate:s.checkPhone,"helptext-validation":!l.validPhone,helptext:e.translations.settings.general.phone_error,"helptext-persistent":!l.validPhone},null,8,["modelValue","label","input-options","onValidate","helptext-validation","helptext","helptext-persistent"])):(0,o.kq)("",!0),(0,o.Wm)(f,{disabled:e.currentStaff.can_manage_appointments,name:"wpUser",modelValue:s.canLogin,"onUpdate:modelValue":t[4]||(t[4]=e=>s.canLogin=e),label:e.translations.settings.staff.creatUser},null,8,["disabled","modelValue","label"])])}var vL={name:"SettingsContactStaffEdit",props:["userId","saving","availableEmail"],data(){return{v$:(0,Rd.Xw)(),validPhone:!0}},validations:{name:{required:Ld.C1},display_name:{required:Ld.C1},email:{required:Ld.C1,email:Ld.Do}},computed:{display_name:{get(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"display_name")?this.currentStaff.display_name:""},set(e){this.setCurrentStaff({key:"display_name",value:e}),this.validationCheck()}},email:{get(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"email")?this.currentStaff.email.toLowerCase():""},set(e){this.setCurrentStaff({key:"email",value:e.toLowerCase()}),this.validationCheck()}},name:{get(){let e="";return e=0===this.userId?this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"name")?this.currentStaff.name:"":this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"display_name")?this.currentStaff.display_name:"",e},set(e){this.setCurrentStaff({key:"name",value:e}),this.validationCheck()}},phone:{get(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"phone")?this.currentStaff.phone:""},set(e){this.setCurrentStaff({key:"phone",value:e})}},canLogin:{get(){return Ps(this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"can_login")?this.currentStaff.can_login:"")},set(e){this.setCurrentStaff({key:"can_login",value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("staff",["currentStaff"]),...(0,m.Se)("appointments",["wpUserLink"]),...(0,m.Se)("notifications",["smsModule"])},methods:{checkPhone(e){this.validPhone=e,this.validationCheck()},validationCheck(){this.v$.$touch(),this.$emit("validationCheck",!this.v$.name.$invalid&&!this.v$.display_name.$invalid&&!this.v$.email.$invalid&&this.validPhone)},...(0,m.OI)("staff",["setCurrentStaff"])}};const bL=(0,he.Z)(vL,[["render",CL]]);var BL=bL;const SL={class:"edit-staff-permissions"},kL={key:0,class:"md-checkbox-with-note"},AL={key:1,class:"md-checkbox-with-note"},ML={key:2,class:"md-checkbox-with-note"};function DL(e,t,i,a,r,l){const s=(0,o.up)("foxy-checkbox");return(0,o.wg)(),(0,o.iD)("div",SL,[e.settings.blackout_dates.enabled&&0!==i.userId&&e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.iD)("div",kL,[(0,o.Wm)(s,{id:"blackout",name:"blackout",disabled:i.saving||l.adminManagingSelf,modelValue:l.manages_blackout_dates,"onUpdate:modelValue":t[0]||(t[0]=e=>l.manages_blackout_dates=e),label:e.translations.settings.staff.fields.blackout.label},null,8,["disabled","modelValue","label"])])):(0,o.kq)("",!0),0!==i.userId&&e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.iD)("div",AL,[(0,o.Wm)(s,{id:"working-hour-access",name:"working-hour-access",disabled:i.saving||l.adminManagingSelf,modelValue:l.manages_working_hours,"onUpdate:modelValue":t[1]||(t[1]=e=>l.manages_working_hours=e),label:e.translations.settings.staff.fields.manages_working_hours.label},null,8,["disabled","modelValue","label"])])):(0,o.kq)("",!0),e.settings.google_calendar.enabled&&0!==i.userId?((0,o.wg)(),(0,o.iD)("div",ML,[(0,o.Wm)(s,{id:"google-calendar",name:"google-calendar",disabled:i.saving||l.adminManagingSelf,modelValue:l.manages_google,"onUpdate:modelValue":t[2]||(t[2]=e=>l.manages_google=e),label:e.translations.settings.staff.fields.gcalendar.label},null,8,["disabled","modelValue","label"])])):(0,o.kq)("",!0)])}var TL={name:"SettingsPermissionsStaffEdit",props:["userId","saving","id"],data(){return{}},computed:{adminManagingSelf(){return this.currentUserIsSelf&&this.currentUserCan("ssa_manage_staff")},manages_blackout_dates:{get(){return!!this.adminManagingSelf||!(!this.currentStaff||!Object.prototype.hasOwnProperty.call(this.currentStaff,"manages_blackout_dates"))&&!!parseInt(this.currentStaff.manages_blackout_dates,10)},set(e){this.setCurrentStaff({key:"manages_blackout_dates",value:e})}},manages_google:{get(){return!!this.adminManagingSelf||!(!this.currentStaff||!Object.prototype.hasOwnProperty.call(this.currentStaff,"manages_google"))&&!!parseInt(this.currentStaff.manages_google,10)},set(e){this.setCurrentStaff({key:"manages_google",value:e})}},manages_working_hours:{get(){return!!this.adminManagingSelf||!(!this.currentStaff||!Object.prototype.hasOwnProperty.call(this.currentStaff,"manages_working_hours"))&&!!parseInt(this.currentStaff.manages_working_hours,10)},set(e){this.setCurrentStaff({key:"manages_working_hours",value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)(["settings"]),...(0,m.rn)("staff",["currentStaff"]),...(0,m.Se)("staff",["currentUserCan","currentUserIsSelf"])},methods:{...(0,m.OI)("staff",["setCurrentStaff"])}};const OL=(0,he.Z)(TL,[["render",DL]]);var GL=OL;const EL={class:"edit-staff-availability"},UL={class:"md-headline"},FL={key:0,class:"md-error"},IL={class:"foxy-list-default"},zL={key:0},PL={class:"md-heading-group"},VL={class:"md-headline"},WL={key:0},RL={key:1},LL={class:"md-heading-group"},jL={class:"md-headline"},qL={class:"md-headline"},NL={class:"md-fieldset field-wrapper"},$L={class:"custom-working-hours-help","aria-live":"polite"},HL={key:0},ZL=(0,o._)("br",null,null,-1),YL={class:"md-headline"},KL={key:0},JL=(0,o._)("br",null,null,-1);function XL(e,t,i,a,l,s){const n=(0,o.up)("foxy-notification"),d=(0,o.up)("foxy-checkbox"),p=(0,o.up)("appointment-type-read-only"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-radio"),c=(0,o.up)("availability-picker"),h=(0,o.up)("foxy-theme"),m=(0,o.up)("foxy-progress-circular"),g=(0,o.up)("google-calendar-auth"),_=(0,o.up)("google-calendar-list");return(0,o.wg)(),(0,o.iD)("div",EL,[e.currentUserCan("ssa_manage_staff")?((0,o.wg)(),(0,o.iD)("fieldset",{key:0,class:(0,r.C_)(["md-fieldset",{"md-fieldset-invalid":!s.validAppointmentTypes}])},[(0,o._)("legend",UL,(0,r.zw)(e.translations.settings.appointmentTypesTitle),1),s.validAppointmentTypes?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",FL,(0,r.zw)(e.translations.settings.staff.fields.appointment_types.error),1)),e.editableAppointmentTypes.length?e.staffAppointmentTypes.length?s.notAllStaff?((0,o.wg)(),(0,o.j4)(n,{key:3,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.notices.someStaffAppointmentTypes),1)])),_:1})):(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(n,{key:2,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.notices.noStaffAppointmentTypes),1)])),_:1})):((0,o.wg)(),(0,o.j4)(n,{key:1,icon:"warning",theme:"amber"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.notices.noAppointmentTypes),1)])),_:1})),(0,o._)("ul",IL,[s.notAllStaff?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("li",zL,[(0,o.Wm)(d,{modelValue:s.allTypes,"onUpdate:modelValue":t[0]||(t[0]=e=>s.allTypes=e),label:e.translations.settings.staff.fields.appointment_types.all},null,8,["modelValue","label"])])),s.allTypes?(0,o.kq)("",!0):((0,o.wg)(!0),(0,o.iD)(o.HY,{key:1},(0,o.Ko)(e.staffAppointmentTypes,(e=>((0,o.wg)(),(0,o.iD)("li",{key:e.id},[(0,o.Wm)(d,{id:"type-"+e.id,name:"appointment-types",value:e.id.toString(),modelValue:s.appointment_types,"onUpdate:modelValue":t[1]||(t[1]=e=>s.appointment_types=e),label:e.title},null,8,["id","value","modelValue","label"])])))),128))])],2)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o._)("div",PL,[(0,o._)("h3",VL,(0,r.zw)(e.translations.settings.appointmentTypesTitle),1)]),s.appointment_types.length?((0,o.wg)(),(0,o.iD)("ul",WL,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.appointment_types,(e=>((0,o.wg)(),(0,o.j4)(p,{key:e.id,id:e},null,8,["id"])))),128))])):((0,o.wg)(),(0,o.iD)("p",RL,(0,r.zw)(e.translations.settings.staff.fields.appointment_types.error_staff),1))],64)),e.settings.blackout_dates.enabled&&(s.canEditOwnBlackoutDates||e.currentUserCan("ssa_manage_staff"))?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o._)("div",LL,[(0,o._)("h3",jL,(0,r.zw)(e.translations.settings.blackout.title),1),(0,o._)("p",null,(0,r.zw)(e.translations.settings.blackout.description),1)]),(0,o.Wm)(f,{tag:"md-button",mode:"raised",class:"md-primary md-raised",to:"/ssa/settings/blackout/"+i.id},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.fields.blackout.editText),1)])),_:1},8,["to"])],64)):(0,o.kq)("",!0),e.currentUserCan("ssa_manage_staff")||s.canEditOwnWorkingHours?((0,o.wg)(),(0,o.iD)(o.HY,{key:3},[(0,o._)("h3",qL,(0,r.zw)(e.translations.settings.staff.fields.working_hours.label),1),(0,o._)("fieldset",NL,[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.staff.fields.custom_working_hours.legend),1),(0,o.Wm)(u,{modelValue:s.custom_working_hours,"onUpdate:modelValue":t[2]||(t[2]=e=>s.custom_working_hours=e),id:"custom_working_hours_off",name:"custom_working_hours",value:!1,"aria-described-by":"custom-working-hours-help"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.fields.custom_working_hours.labelOff),1)])),_:1},8,["modelValue"]),(0,o.Wm)(u,{modelValue:s.custom_working_hours,"onUpdate:modelValue":t[3]||(t[3]=e=>s.custom_working_hours=e),id:"custom_working_hours_on",name:"custom_working_hours",value:!0,"aria-described-by":"custom-working-hours-help"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.fields.custom_working_hours.labelOn),1)])),_:1},8,["modelValue"]),(0,o._)("div",$L,[(0,o._)("p",null,[s.custom_working_hours?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.fields.custom_working_hours.helpOn),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.fields.custom_working_hours.helpOff),1)],64))])])]),s.custom_working_hours?((0,o.wg)(),(0,o.iD)("p",HL,[(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.fields.working_hours.timezone_label),1),(0,o.Uk)(" "+(0,r.zw)(e.formatTimezone(e.settings.global.timezone_string)),1),ZL,(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.fields.working_hours.current_time_label),1),(0,o.Uk)(" "+(0,r.zw)(l.moment.tz(e.settings.global.timezone_string).format(this.settings.global.date_format_moment+" "+this.settings.global.time_format_moment)),1)])):(0,o.kq)("",!0),(0,o.Wm)(h,{theme:"light-green"},{default:(0,o.w5)((()=>[s.custom_working_hours?((0,o.wg)(),(0,o.j4)(c,{key:0,increment:30,modelValue:s.working_hours,"onUpdate:modelValue":t[4]||(t[4]=e=>s.working_hours=e)},null,8,["modelValue"])):(0,o.kq)("",!0)])),_:1})],64)):(0,o.kq)("",!0),s.managesGoogle?((0,o.wg)(),(0,o.iD)(o.HY,{key:4},[(0,o._)("h3",YL,(0,r.zw)(e.translations.wizard.appointmentType.googleCalendar),1),0!==e.userId&&e.currentUserCan("ssa_manage_staff")&&!e.currentUserIsSelf?((0,o.wg)(),(0,o.iD)("p",KL,[s.googleCalendarConnected?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.google.admin.staff_connected)+" ",1),s.calendarsConnected?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.google.admin.staff_calendars)+" ",1),JL,(0,o._)("strong",null,(0,r.zw)(e.translations.settings.staff.google.admin.calendars_connected),1),(0,o.Uk)(" "+(0,r.zw)(e.currentStaff.google.excluded_calendars.length),1)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.google.admin.staff_no_calendars),1)],64)),(0,o._)("div",null,[(0,o.Wm)(f,{onClick:s.disconnectAccount,disabled:l.disconnecting,class:"md-primary"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.disconnect),1)])),_:1},8,["onClick","disabled"])]),l.disconnecting?((0,o.wg)(),(0,o.j4)(m,{key:2,medium:""})):(0,o.kq)("",!0)],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.google.admin.staff_not_connected),1)],64))])):(0,o.kq)("",!0),s.canConnectOwnGoogleAccount?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[s.googleCalendarConnected?((0,o.wg)(),(0,o.j4)(_,{key:1})):((0,o.wg)(),(0,o.j4)(g,{key:0}))],64)):(0,o.kq)("",!0)],64)):(0,o.kq)("",!0)])}function QL(e,t,i,a,l,s){return(0,o.wg)(),(0,o.iD)("li",null,(0,r.zw)(s.title)+" ("+(0,r.zw)(s.duration)+") ",1)}var ej={props:{id:{type:[Number,String],required:!0}},computed:{appointmentType(){let e=this.appointmentTypes.find((e=>parseInt(e.id,10)===parseInt(this.id,10)));return e},title(){return this.appointmentType?this.appointmentType.title:""},duration(){let e=this.appointmentType?this.appointmentType.duration:0;return this.displayDuration(e)},...(0,m.rn)("appointment_types",["appointmentTypes"]),...(0,m.Se)(["displayDuration"])}};const tj=(0,he.Z)(ej,[["render",QL]]);var ij=tj;function aj(e,t,i,a,l,s){const n=(0,o.up)("foxy-progress-circular"),d=(0,o.up)("foxy-button");return(0,o.wg)(),(0,o.iD)("div",null,[l.saving?((0,o.wg)(),(0,o.j4)(n,{key:0,indeterminate:"",medium:"true",class:"app-spinner"})):((0,o.wg)(),(0,o.j4)(d,{key:1,mode:"raised",class:"md-primary",onClick:s.authorizeGoogle},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.staff.google.actions.connect),1)])),_:1},8,["onClick"]))])}var oj={name:"StaffGoogleCalendarAuth",data(){return{saving:!1}},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)("google_calendar",["googleAuthUrl"]),...(0,m.rn)("staff",["currentStaff"])},methods:{authorizeGoogle(){this.saving=!0;const e=window.ssa_is_embed?window.top.location.href:window.location.hostname+window.location.pathname;this.googleCalendarAuth({ssa_redirect:this.$route.path,ssa_base_url:e,staff_id:this.currentStaff.id}).then((()=>{window.ssa_is_embed?window.top.location.href=this.googleAuthUrl:window.location.href=this.googleAuthUrl}))},...(0,m.nv)("google_calendar",["googleCalendarAuth"])}};const rj=(0,he.Z)(oj,[["render",aj]]);var lj=rj;const sj={class:"md-fieldset",style:{"margin-top":"1rem"}},nj={class:"checkboxes-list-flex-row"};function dj(e,t,i,a,l,s){const n=(0,o.up)("loading"),d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-empty"),f=(0,o.up)("foxy-checkbox");return(0,o.wg)(),(0,o.iD)("div",null,[l.loading?((0,o.wg)(),(0,o.j4)(n,{key:0,size:"body",message:l.loadingMessage},null,8,["message"])):l.error?((0,o.wg)(),(0,o.j4)(p,{key:1,label:e.translations.settings.staff.google.check_settings},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{onClick:s.disconnectAccount,mode:"raised"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.disconnect),1)])),_:1},8,["onClick"])])),_:1},8,["label"])):s.googleCalendarConnected?((0,o.wg)(),(0,o.iD)(o.HY,{key:2},[(0,o.Wm)(d,{onClick:s.disconnectAccount,mode:"raised"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.google_calendar.disconnect),1)])),_:1},8,["onClick"]),(0,o._)("fieldset",sj,[(0,o._)("legend",null,(0,r.zw)(e.translations.wizard.appointmentType.checkCalendars),1),(0,o._)("p",null,(0,r.zw)(e.translations.wizard.appointmentType.checkCalendarsDesc),1),(0,o._)("div",nj,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.googleCalendars,(e=>((0,o.wg)(),(0,o.j4)(f,{key:e.gcal_id,modelValue:s.googleCalendarsAvailability,"onUpdate:modelValue":t[0]||(t[0]=e=>s.googleCalendarsAvailability=e),id:e.gcal_id,name:e.gcal_id,value:e.gcal_id.toString(),label:e.summary},null,8,["modelValue","id","name","value","label"])))),128))])])],64)):(0,o.kq)("",!0)])}var pj={name:"StaffGoogleCalendarList",components:{Loading:ge},data(){return{loading:!0,loadingMessage:"",error:!1}},mounted(){this.loadingMessage=this.translations.settings.google_calendar.loadingCalendars,this.setGoogleAccountConnected(),this.googleCalendars.length?this.loading=!1:this.fetchGoogleCalendars({staff_id:this.currentStaff.id}).then((()=>{this.loading=!1})).catch((e=>{console.log(e),this.loading=!1,this.error=!0}))},computed:{googleCalendarConnected(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"google_access_token")&&!wa().isEmpty(this.currentStaff.google_access_token)},googleCalendarsAvailability:{get(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"google")&&Object.prototype.hasOwnProperty.call(this.currentStaff.google,"excluded_calendars")?this.currentStaff.google.excluded_calendars:[]},set(e){let t=this.currentStaff.google||{},i=Object.assign({},t,{excluded_calendars:e});this.setCurrentStaff({key:"google",value:i})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("staff",["currentStaff","googleCalendars"])},methods:{disconnectAccount(){this.loadingMessage=this.translations.settings.google_calendar.disconnecting,this.loading=!0,this.googleCalendarDeauth({staff_id:this.currentStaff.id}).then((()=>{this.loading=!1,this.saveStaff()}))},setGoogleAccountConnected(){let e=this.currentStaff.google||{},t=Object.assign({},e,{connected:this.googleCalendarConnected}),i=JSON.stringify(e),a=JSON.stringify(t);i!==a&&(this.setCurrentStaff({key:"google",value:t}),this.saveStaff())},...(0,m.nv)("google_calendar",["fetchGoogleCalendars"]),...(0,m.nv)("staff",["googleCalendarDeauth","saveStaff"]),...(0,m.OI)("staff",["setCurrentStaff"])}};const fj=(0,he.Z)(pj,[["render",dj]]);var uj=fj,cj={name:"SettingsAvailabilityStaffEdit",props:["id","allAppointmentTypes"],components:{AvailabilityPicker:qp,AppointmentTypeReadOnly:ij,GoogleCalendarAuth:lj,GoogleCalendarList:uj},data(){return{defaultStaff:q,disconnecting:!1,moment:fe()}},computed:{allTypes:{get(){return this.allAppointmentTypes},set(e){this.$emit("toggleAll",e);let t=this.staffAppointmentTypes.map((e=>e.id));this.setCurrentStaff({key:"appointment_types",value:t})}},appointment_types:{get(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"appointment_types")?this.currentStaff.appointment_types.map(String):[]},set(e){this.setCurrentStaff({key:"appointment_types",value:e})}},validAppointmentTypes(){return this.appointment_types.length>0},calendarsConnected(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"google")&&Object.prototype.hasOwnProperty.call(this.currentStaff.google,"excluded_calendars")&&this.currentStaff.google.excluded_calendars.length},canConnectOwnGoogleAccount(){return!(!this.settings.google_calendar.enabled||!Object.prototype.hasOwnProperty.call(this.currentStaff,"google_access_token"))&&(!!this.currentUserIsSelf||this.currentUserIsStaff&&this.currentUserStaffId===this.currentStaff.id&&this.managesGoogle)},canEditOwnBlackoutDates(){return this.currentUserIsStaff&&this.currentUserStaffId===this.currentStaff.id&&Ps(this.currentStaff.manages_blackout_dates)},canEditOwnWorkingHours(){return this.currentUserIsStaff&&this.currentUserStaffId===this.currentStaff.id&&Ps(this.currentStaff.manages_working_hours)},custom_working_hours:{get(){return!(!this.currentStaff||!Object.prototype.hasOwnProperty.call(this.currentStaff,"custom_working_hours"))&&Ps(this.currentStaff.custom_working_hours)},set(e){this.setCurrentStaff({key:"custom_working_hours",value:Ps(e)})}},googleCalendarConnected(){return this.currentUserIsStaff||this.currentUserIsSelf?this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"google_access_token")&&!wa().isEmpty(this.currentStaff.google_access_token):!!(this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"google")&&Object.prototype.hasOwnProperty.call(this.currentStaff.google,"connected"))&&this.currentStaff.google.connected},managesGoogle(){return!(!this.settings.google_calendar.enabled||!this.settings.google_calendar.access_token)&&(!("0"===this.currentStaff.user_id||!Object.prototype.hasOwnProperty.call(this.currentStaff,"manages_google"))&&Ps(this.currentStaff.manages_google))},notAllStaff(){return this.editableAppointmentTypes.length&&this.staffAppointmentTypes.length{this.disconnecting=!1,this.saveStaff()}))},...(0,m.OI)("staff",["setCurrentStaff"]),...(0,m.nv)("staff",["googleCalendarDeauth","saveStaff"])}};const hj=(0,he.Z)(cj,[["render",XL]]);var mj=hj;const gj={class:"edit-staff-web-meetings"},_j={class:"md-headline"},yj={class:"md-fieldset field-wrapper"};function wj(e,t,i,a,l,s){const n=(0,o.up)("foxy-textfield");return(0,o.wg)(),(0,o.iD)("div",gj,[(0,o._)("div",null,[(0,o._)("h3",_j,(0,r.zw)(e.translations.settings.staff.webMeetings.headline),1),(0,o._)("fieldset",yj,[(0,o._)("p",null,(0,r.zw)(e.translations.settings.staff.webMeetings.web_meetings_url),1),(0,o.Wm)(n,{modelValue:s.web_meetings_url,"onUpdate:modelValue":t[0]||(t[0]=e=>s.web_meetings_url=e),placeholder:"https://",maxlength:"255",id:"web_meetings_url",label:e.translations.settings.staff.webMeetings.headline},null,8,["modelValue","label"])])])])}var xj={name:"SettingsWebMeetingsEdit",computed:{web_meetings_url:{get(){return this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"web_meetings_url")?this.currentStaff.web_meetings_url:null},set(e){this.setCurrentStaff({key:"web_meetings_url",value:e})}},...(0,m.rn)("translations",["translations"]),...(0,m.rn)("staff",["currentStaff"])},methods:{...(0,m.OI)("staff",["setCurrentStaff"])}};const Cj=(0,he.Z)(xj,[["render",wj]]);var vj=Cj,bj={name:"SettingsStaffEdit",components:{Loading:ge,UserSelector:yL,EditContact:BL,EditPermissions:GL,EditAvailability:mj,EditWebMeetings:vj},props:{id:{type:[Number,String],required:!0}},data(){return{allAppointmentTypes:!0,availableEmail:!0,dirty:!1,currentUser:{name:"",email:""},defaultStaff:q,editExistingText:{title:"","content-html":"Edit","ok-text":"","cancel-text":""},incomplete:!1,loading:!0,linkUser:!1,saving:!1,validContact:!0,leaveWithoutSaving:!1,isSaveStatusVisible:!1,routerNext:null,editExistingStaff:null,user:null}},mounted(){this.onMountOrUpdate(),this.getGuides({"ssasc-plugin-screen":K.teams.edit})},onBeforeRouteUpdate(e,t,i){this.onMountOrUpdate(),this.navigationGuard(e,t,i)},beforeRouteLeave(e,t,i){if(this.incomplete){let e="confirmLeaveIncomplete";return this.$refs[e].open(),void(this.routerNext=i)}if(this.dirty){let e="confirmLeaveDirty";return this.$refs[e].open(),void(this.routerNext=i)}i()},watch:{currentStaffString(e,t){this.dirty=t!==e,this.incomplete=e&&0===parseInt(this.currentStaff.user_id,10)&&(!this.currentStaff.name||!this.currentStaff.display_name)}},computed:{currentStaffString(){return JSON.stringify(this.currentStaff)},name(){let e="";return e=0===this.userId?this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"name")?this.currentStaff.name:"":this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"display_name")?this.currentStaff.display_name:"",e},notAllStaff(){return this.editableAppointmentTypes.length&&this.staffAppointmentTypes.length{i.focus()}),200)},cancelEdit(){this.currentUserCan("ssa_manage_staff")?this.$router.push("/ssa/settings/staff"):this.$router.push("/ssa/appointments")},checkEmail(){let e=this.currentStaff&&Object.prototype.hasOwnProperty.call(this.currentStaff,"email")?this.currentStaff.email.toLowerCase():"",t=this.staff.find((e=>e.id===this.currentStaff.id)).email.toLowerCase(),i=this.staff.map((e=>e.email?e.email.toLowerCase():"")),a=i.filter((e=>e!==t));if(this.availableEmail=a.indexOf(e)<0,!this.availableEmail){let e="emailTaken";return void this.$refs[e].open()}if(0!==parseInt(this.currentStaff.user_id,10))return;let o=this.users.find((t=>e===t.email.toLowerCase()));if(o&&!this.linkUser){this.user=o,this.availableEmail=!1,this.currentUser={name:o.display_name,email:o.email.toLowerCase()};let e="linkToUser";this.$refs[e].open()}},linkToUserConfirm(){let e=this.user;this.availableEmail=!0,this.linkUser=!0,this.setCurrentStaff({key:"user_id",value:e.id}),this.saveStaffForm()},linkToUserCancel(){this.availableEmail=!0,this.linkUser=!1},createStaffFromEmail(e){let t=this.staff.find((t=>t.email.toLowerCase()===e.email.toLowerCase()));t?this.editExisting(t):(this.saving=!0,e=Object.assign({},this.defaultStaff,e),this.setCurrentStaff(e),this.updateAllAppointmentTypes(),this.saveStaff().then((()=>{this.saving=!1,this.$router.push({name:"staff-single",params:{id:this.currentStaff.id}})})))},deleteCurrentStaff(){let e=this.currentStaff.id;this.deleteStaff(e).then((()=>{})).catch((e=>{console.log(e)}))},existingStaffConfirm(){let e=this.editExistingStaff;this.setCurrentStaff(e),"publish"!==e.status&&this.setCurrentStaff({key:"status",value:"publish"}),this.saving=!0,this.saveStaff().then((()=>{this.saving=!1,this.updateAllAppointmentTypes()})).catch((e=>{console.log(e)})),this.$router.push("/ssa/settings/staff/profile/"+e.id)},existingStaffCancel(){this.editExistingStaff=null,this.$router.push("/ssa/settings/staff")},editExisting(e){let t=this.translations.settings.staff.editExisting[e.status];this.editExistingText=t;let i="existingStaff";this.$refs[i].open(),this.editExistingStaff=e},loadStaff(){let e=this.staff.find((e=>parseInt(e.id,10)===parseInt(this.id,10)));this.setCurrentStaff(e)},navigationGuard(e,t,i){this.currentUserCan("ssa_manage_staff")?(e.params.id||this.setCurrentStaff(void 0),i()):this.currentUserIsStaff?this.$router.push("/ssa/settings/staff/profile/"+this.currentUserStaffId):this.$router.push("/ssa")},onMountOrUpdate(){this.id?(this.loadStaff(),Object.prototype.hasOwnProperty.call(this.currentStaff,"appointment_types")&&this.currentStaff.appointment_types.length?(this.loading=!1,this.updateAllAppointmentTypes()):this.fetchSingleStaff(this.id).then((()=>{this.loading=!1,this.updateAllAppointmentTypes()}))):this.loading=!1},saveStaffForm(){if(this.checkEmail(),this.updateAllAppointmentTypes(),!this.validContact||!this.availableEmail)return this.saving=!1,void this.activateContactTab();this.saving=!0,this.saveStaff().then((()=>{this.dirty=!1,this.saving=!1,this.linkUser=!1,this.currentUserCan("ssa_manage_staff")?(this.$router.push("/ssa/settings/staff"),this.fetchUsers(),this.fetchStaff()):this.isSaveStatusVisible=!0})).catch((e=>{console.log("failed to save",e),this.saving=!1}))},toggleAllAppointmentTypes(e){this.allAppointmentTypes=e},updateAllAppointmentTypes(){Object.prototype.hasOwnProperty.call(this.currentStaff,"appointment_types")&&(this.allAppointmentTypes=this.currentStaff.appointment_types.length===this.editableAppointmentTypes.length,this.notAllStaff&&(this.allAppointmentTypes=!1))},validateContact(e){this.validContact=e},dialogLeaveDirty(){this.routerNext()},dialogLeaveIncomplete(){this.deleteCurrentStaff(),this.routerNext()},...(0,m.nv)("staff",["deleteStaff","fetchSingleStaff","saveStaff","fetchStaff","fetchUsers"]),...(0,m.OI)("staff",["setCurrentStaff"]),...(0,m.nv)("guides",["getGuides"])}};const Bj=(0,he.Z)(bj,[["render",cL]]);var Sj=Bj,kj=[{path:"staff",component:jR,redirect:"/ssa/settings/staff/all",children:[{path:"all",name:"staff-all",component:dL,meta:{ssa_manage_staff:!0}},{path:"profile/:id?",name:"staff-single",component:Sj,props:!0}]}];function Aj(e,t,i,a,r,l){const s=(0,o.up)("loading"),n=(0,o.up)("router-view");return(0,o.wg)(),(0,o.iD)("div",null,[r.loading?((0,o.wg)(),(0,o.j4)(s,{key:0,message:e.translations.settings.resources.loading},null,8,["message"])):((0,o.wg)(),(0,o.j4)(n,{key:1,onSaved:l.backToList,onAutoGeneratedResources:l.openResourceGroup},null,8,["onSaved","onAutoGeneratedResources"]))])}var Mj={name:"ResourcesaAll",components:{Loading:ge},data(){return{loading:!0}},mounted(){this.init()},computed:{...(0,m.rn)("translations",["translations"]),...(0,m.rn)("resources",["resourceGroups","currentResourceGroup","resources"])},methods:{init(){return"undefined"===typeof this.resourceGroups?(this.loading=!0,void this.fetchResourceGroups().then((()=>this.init())).catch((e=>{console.log("Error loading resource groups",e)}))):"undefined"===typeof this.resources?(this.loading=!0,void this.fetchResources().then((()=>this.init())).catch((e=>{console.log("Error loading resources",e)}))):void(this.loading=!1)},backToList(){this.$router.push({name:"resources-all"})},openResourceGroup(){this.$router.push({name:"identifiable-group",params:{id:this.currentResourceGroup.id}})},...(0,m.nv)("resources",["fetchResources","fetchResourceGroups"])}};const Dj=(0,he.Z)(Mj,[["render",Aj]]);var Tj=Dj;const Oj=e=>((0,o.dD)("data-v-03092804"),e=e(),(0,o.Cn)(),e),Gj={class:"resources_settings_group"},Ej=Oj((()=>(0,o._)("div",{style:{flex:"1"}},null,-1))),Uj={key:1,class:"foxy-list-default resources-list-items-cards"},Fj=["onClick"],Ij={class:"foxy-list-container"},zj={class:"card-content"},Pj={class:"md-title"},Vj={key:0,class:"desc_quantity"},Wj={key:1,class:"desc_quantity"};function Rj(e,t,i,a,l,s){const n=(0,o.up)("settings-header"),d=(0,o.up)("foxy-list-item"),p=(0,o.up)("foxy-select"),f=(0,o.up)("foxy-button"),u=(0,o.up)("foxy-toolbar"),c=(0,o.up)("foxy-empty"),h=(0,o.up)("foxy-card-header"),m=(0,o.up)("foxy-icon"),g=(0,o.up)("foxy-card-content"),_=(0,o.up)("foxy-icon-button"),y=(0,o.up)("foxy-menu"),w=(0,o.up)("foxy-menu-anchor"),x=(0,o.up)("foxy-card-actions"),C=(0,o.up)("foxy-card");return(0,o.wg)(),(0,o.iD)("div",Gj,[(0,o.Wm)(n),(0,o.Wm)(u,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{fullwidth:!1,style:{width:"250px"},class:"title",label:e.translations.settings.resources.selectResources,name:"resources-view",id:"resources-view",modelValue:l.resourcesView,"onUpdate:modelValue":t[0]||(t[0]=e=>l.resourcesView=e)},{default:(0,o.w5)((()=>[(0,o.Wm)(d,{role:"option","data-value":"active"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.title),1)])),_:1}),(0,o.Wm)(d,{"data-value":"inactive",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.status.inactive),1)])),_:1})])),_:1},8,["label","modelValue"]),Ej,(0,o.Wm)(f,{class:"md-primary",onClick:s.createResourceGroup,icon:"add"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.addNewGroup),1)])),_:1},8,["onClick"])])),_:1}),s.displayResources.length?((0,o.wg)(),(0,o.iD)("ul",Uj,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.displayResources,(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id},[(0,o._)("button",{class:"foxy-button-ghost",tabindex:"-1",onClick:e=>s.maybeEditResourceGroup(t)},null,8,Fj),(0,o._)("div",Ij,[(0,o.Wm)(C,{class:"card"},{default:(0,o.w5)((()=>[(0,o._)("div",zj,[(0,o.Wm)(h,null,{default:(0,o.w5)((()=>[(0,o._)("div",Pj,(0,r.zw)(t.title),1)])),_:2},1024),(0,o.Wm)(g,null,{default:(0,o.w5)((()=>[(0,o._)("div",null,(0,r.zw)(t.description),1),"identical"==t.resource_type?((0,o.wg)(),(0,o.iD)("div",Vj,[(0,o.Wm)(m,{icon:"inventory"}),(0,o._)("span",null,(0,r.zw)(t.quantity)+" "+(0,r.zw)(e.translations.resourceGroups.quantity),1)])):(0,o.kq)("",!0),"identifiable"==t.resource_type?((0,o.wg)(),(0,o.iD)("div",Wj,[(0,o.Wm)(m,{icon:"workspaces_filled"}),(0,o._)("span",null,(0,r.zw)(t.published_quantity)+" "+(0,r.zw)(e.translations.resourceGroups.items),1)])):(0,o.kq)("",!0)])),_:2},1024)]),(0,o.Wm)(x,null,{default:(0,o.w5)((()=>[(0,o.Wm)(w,null,{default:(0,o.w5)((()=>[(0,o.Wm)(_,{onClick:e=>{l.openMenu={},l.openMenu[t.id]=!0}},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{icon:"settings"})])),_:2},1032,["onClick"]),(0,o.Wm)(y,{modelValue:l.openMenu[t.id],"onUpdate:modelValue":e=>l.openMenu[t.id]=e},{default:(0,o.w5)((()=>["publish"===t.status?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(d,{onClick:e=>s.editResourceGroup(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"]),(0,o.Wm)(d,{onClick:e=>s.toggleResource(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{icon:"block"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.deactivate),1)])),_:2},1032,["onClick"])],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(d,{onClick:e=>s.toggleResource(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{icon:"how_to_reg"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.activate),1)])),_:2},1032,["onClick"]),(0,o.Wm)(d,{onClick:e=>s.confirmDelete(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(m,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.delete),1)])),_:2},1032,["onClick"])],64))])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)])),_:2},1024)])),_:2},1024)])])))),128))])):((0,o.wg)(),(0,o.j4)(c,{key:0,label:s.emptyLabel,description:s.emptyDescription},{default:(0,o.w5)((()=>["active"===l.resourcesView?((0,o.wg)(),(0,o.j4)(f,{key:0,mode:"raised",class:"md-primary",onClick:s.createResourceGroup},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.addNew),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0)])),_:1},8,["label","description"]))])}var Lj={name:"SettingsResources",components:{SettingsHeader:zO},data(){return{pendingId:null,resourcesView:"active",openMenu:{}}},computed:{emptyDescription(){return"active"===this.resourcesView?this.translations.settings.resources.emptyDescription:this.translations.settings.resources.emptyInactiveDescription},emptyLabel(){return"active"===this.resourcesView?this.translations.settings.resources.emptyLabel:this.translations.settings.resources.emptyInactiveLabel},displayResources(){return"active"===this.resourcesView?this.resourcesStatusActive:this.resourcesStatusInactive},...(0,m.rn)("labels",["apptTypeLabels"]),...(0,m.rn)("translations",["translations"]),...(0,m.rn)("resources",["resourceGroups"]),...(0,m.Se)("resources",["resourcesStatusActive","resourcesStatusInactive"])},methods:{toggleResource(e){if(this.saving)return;this.saving=!0,this.pendingId=e;let t=this.resourceGroups.find((t=>t.id===e));this.setCurrentResourceGroup(t);let i="publish"===t.status?"draft":"publish";this.setCurrentResourceGroup({key:"status",value:i}),"draft"===i&&this.setCurrentResourceGroup({key:"appointment_type_ids",value:[]}),this.saveResourceGroup().then((()=>{this.saving=!1,this.pendingId=null})).catch((e=>{console.log(e)}))},confirmDelete(e){if(this.saving)return;this.saving=!0,this.pendingId=e;let t=this.resourceGroups.find((t=>t.id===e));this.setCurrentResourceGroup(t);let i="deleted";this.setCurrentResourceGroup({key:"status",value:i}),this.saveResourceGroup().then((()=>{this.saving=!1,this.pendingId=null})).catch((e=>{console.log(e)}))},createResourceGroup(){this.setCurrentResourceGroupDefault(),this.$router.push({name:"resources-group-single"})},maybeEditResourceGroup(e){"identical"==e.resource_type?this.editResourceGroup(e.id):this.openResourceGroup(e.id)},editResourceGroup(e){if(this.saving)return;let t=this.resourceGroups.find((t=>t.id===e));this.setCurrentResourceGroup(t),this.$router.push({name:"resources-group-single",params:{id:e}})},openResourceGroup(e){let t=this.resourceGroups.find((t=>t.id===e));this.setCurrentResourceGroup(t),this.$router.push({name:"identifiable-group",params:{id:e}})},...(0,m.nv)("resources",["saveResourceGroup"]),...(0,m.OI)("resources",["setCurrentResourceGroup","setCurrentResourceGroupDefault"])}};const jj=(0,he.Z)(Lj,[["render",Rj],["__scopeId","data-v-03092804"]]);var qj=jj;const Nj={class:"md-title"},$j={class:"button-bar"};function Hj(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-dialog-confirm"),p=(0,o.up)("foxy-snackbar"),f=(0,o.up)("loading"),u=(0,o.up)("edit-group"),c=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(n,{onClick:s.cancelEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o._)("h2",Nj,(0,r.zw)(s.pageTitle),1),(0,o.Wm)(d,{ref:"confirmLeaveDirty",title:e.translations.settings.staff.confirmIgnoreChangesTitle,"content-html":e.translations.settings.staff.confirmIgnoreChangesContent,"ok-text":e.translations.settings.staff.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.staff.confirmIgnoreChangesCancel,onConfirm:s.dialogLeaveWithoutSaving,onCancel:s.dialogKeepEdits},null,8,["title","content-html","ok-text","cancel-text","onConfirm","onCancel"]),(0,o.Wm)(p,{position:"top center",modelValue:l.isSaveStatusVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>l.isSaveStatusVisible=e),message:e.translations.settings.staff.actions.saved},null,8,["modelValue","message"]),l.loading?((0,o.wg)(),(0,o.j4)(f,{key:0,message:e.translations.settings.resources.loading},null,8,["message"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(u,{onValidationCheck:s.validateFormFields},null,8,["onValidationCheck"]),(0,o._)("div",$j,[(0,o.Wm)(n,{mode:"secondary",disabled:l.saving,onClick:s.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled","onClick"]),(0,o.Wm)(n,{mode:"raised",class:"md-primary",disabled:l.saving||!l.validFormFields,onClick:s.saveResourceForm},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.buttonText),1)])),_:1},8,["disabled","onClick"]),l.saving?((0,o.wg)(),(0,o.j4)(c,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])],64))])}const Zj={key:0,class:"md-error"},Yj={class:"appt-types-list-assossiated"},Kj={key:0};function Jj(e,t,i,a,l,s){const n=(0,o.up)("foxy-textfield"),d=(0,o.up)("foxy-checkbox"),p=(0,o.up)("foxy-radio");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(n,{modelValue:l.v$.title.$model,"onUpdate:modelValue":t[0]||(t[0]=e=>l.v$.title.$model=e),id:"title",required:"","aria-describedby":"titleError",label:e.translations.resourceGroups.title,helptext:s.titleError?e.translations.resourceGroups.titleError:"","helptext-persistent":"","helptext-validation":"",valid:!s.titleError},null,8,["modelValue","label","helptext","valid"]),(0,o.Wm)(n,{modelValue:l.v$.description.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>l.v$.description.$model=e),id:"description","aria-describedby":"descriptionError",required:"",multiline:"",label:e.translations.resourceGroups.description,helptext:s.descriptionError?e.translations.resourceGroups.descriptionError:"","helptext-persistent":"","helptext-validation":"",valid:!s.descriptionError},null,8,["modelValue","label","helptext","valid"]),(0,o._)("fieldset",{class:(0,r.C_)(["resource-group md-fieldset",{"md-fieldset-invalid":!l.validAppointmentTypes}])},[(0,o._)("legend",null,(0,r.zw)(e.translations.settings.appointmentTypesTitle),1),l.validAppointmentTypes?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("p",Zj,(0,r.zw)(e.translations.settings.notifications.messages.appointmentTypesError),1)),(0,o._)("div",Yj,[(0,o.Wm)(d,{onToggle:s.toggleAll,modelValue:s.all,"onUpdate:modelValue":t[2]||(t[2]=e=>s.all=e),label:e.translations.settings.appointmentTypeAll},null,8,["onToggle","modelValue","label"]),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.editableAppointmentTypes,(e=>((0,o.wg)(),(0,o.j4)(d,{key:e.id,modelValue:s.appointmentTypes,"onUpdate:modelValue":t[3]||(t[3]=e=>s.appointmentTypes=e),id:"type-"+e.id,name:"appointment-types",value:e.id.toString(),label:e.title},null,8,["modelValue","id","value","label"])))),128))])],2),e.currentResourceGroup.id?(0,o.kq)("",!0):((0,o.wg)(),(0,o.iD)("fieldset",Kj,[(0,o._)("legend",null,(0,r.zw)(e.translations.resourceGroups.selectResourceGroupType),1),(0,o.Wm)(p,{modelValue:s.resourceGroupType,"onUpdate:modelValue":t[4]||(t[4]=e=>s.resourceGroupType=e),id:"identifiable",name:"resourceGroupType",value:"identifiable"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.resourceGroups.identifiable),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.resourceGroups.identifiableDesc),1)])),_:1},8,["modelValue"]),(0,o.Wm)(p,{modelValue:s.resourceGroupType,"onUpdate:modelValue":t[5]||(t[5]=e=>s.resourceGroupType=e),id:"identical",name:"resourceGroupType",value:"identical"},{default:(0,o.w5)((()=>[(0,o._)("strong",null,(0,r.zw)(e.translations.resourceGroups.identical),1),(0,o.Uk)(" "+(0,r.zw)(e.translations.resourceGroups.identicalDesc),1)])),_:1},8,["modelValue"])])),"identical"==s.resourceGroupType?((0,o.wg)(),(0,o.j4)(n,{key:1,type:"number",modelValue:l.v$.quantity.$model,"onUpdate:modelValue":t[6]||(t[6]=e=>l.v$.quantity.$model=e),modelModifiers:{number:!0},id:"quantity","aria-describedby":"quantityError",min:1,label:e.translations.resourceGroups.quantity,helptext:s.quantityError?e.translations.resourceGroups.quantityError:"","helptext-persistent":"","helptext-validation":"",valid:!s.quantityError},null,8,["modelValue","label","helptext","valid"])):(0,o.kq)("",!0)])}var Xj={name:"EditResourceGroup",data(){return{v$:(0,Rd.Xw)(),validAppointmentTypes:!0,isInterchangeable:!1}},validations(){return{title:{required:Ld.C1},description:{required:Ld.C1},quantity:{required:(0,Ld.CF)((()=>"identical"==this.currentResourceGroup.resource_type)),minValue:"identical"==this.currentResourceGroup.resource_type?(0,Ld.uv)(1):(0,Ld.uv)(0)},appointmentTypes:{required:Ld.C1}}},beforeMount(){this.currentResourceGroup||this.setCurrentResourceGroupDefault()},watch:{all(e){e&&(this.validAppointmentTypes=!0,this.validationCheck())}},computed:{title:{get(){return this.currentResourceGroup?this.currentResourceGroup.title:""},set(e){this.updateCurrentResourceGroup({key:"title",value:e}),this.validationCheck()}},description:{get(){return this.currentResourceGroup?this.currentResourceGroup.description:""},set(e){this.updateCurrentResourceGroup({key:"description",value:e}),this.validationCheck()}},resourceGroupType:{get(){return this.currentResourceGroup.resource_type},set(e){"identical"==e?(this.updateCurrentResourceGroup({key:"resource_type",value:e}),this.quantity=1):(this.updateCurrentResourceGroup({key:"resource_type",value:e}),this.quantity=0),this.validationCheck()}},quantity:{get(){return this.currentResourceGroup?this.currentResourceGroup.quantity:1},set(e){this.updateCurrentResourceGroup({key:"quantity",value:e}),this.validationCheck()}},all:{get(){return!this.currentResourceGroup||this.currentResourceGroup.appointment_type_ids.length==this.editableAppointmentTypes.length},set(e){this.appointmentTypes=e?this.editableAppointmentTypes.map((e=>e.id)):[],this.validationCheck()}},appointmentTypes:{get(){return this.currentResourceGroup?this.currentResourceGroup.appointment_type_ids.map(String):[]},set(e){this.updateCurrentResourceGroup({key:"appointment_type_ids",value:e}),0!=e.length||this.all?this.validAppointmentTypes=!0:this.validAppointmentTypes=!1,this.validationCheck()}},titleError(){return this.v$.title.$invalid&&this.v$.title.$dirty},descriptionError(){return this.v$.description.$invalid&&this.v$.description.$dirty},quantityError(){return this.v$.quantity.$invalid&&this.v$.quantity.$dirty},...(0,m.rn)("resources",["currentResourceGroup"]),...(0,m.rn)("translations",["translations"]),...(0,m.Se)("appointment_types",["editableAppointmentTypes"])},methods:{toggleAll(e){if(e)return this.appointmentTypes=[],void(this.all=e);let t=this.editableAppointmentTypes.map((e=>e.id));this.appointmentTypes=t,this.all=e},validationCheck(){this.$emit("validationCheck",!this.v$.$invalid&&this.validAppointmentTypes)},...(0,m.nv)("resources",["updateCurrentResourceGroup"]),...(0,m.OI)("resources",["setCurrentResourceGroupDefault"])}};const Qj=(0,he.Z)(Xj,[["render",Jj]]);var eq=Qj,tq={name:"SettingsResourceGroupEdit",components:{Loading:ge,EditGroup:eq},props:{id:{type:[Number,String],required:!0}},data(){return{loading:!0,saving:!1,validFormFields:!1,leaveWithoutSaving:!1,isSaveStatusVisible:!1,routerNext:null}},beforeRouteLeave(e,t,i){if(this.currentResourceGroupIsDirty){let e="confirmLeaveDirty";return this.$refs[e].open(),void(this.routerNext=i)}i()},mounted(){this.maybeLoadResource()},computed:{pageTitle(){let e=this.translations.settings.resources.actions.addNew;return this.id&&(e=this.translations.settings.resources.emptyEditTitle),e},buttonText(){return this.id?this.translations.general.save:this.translations.general.create},...(0,m.rn)("resources",["resourceGroups","currentResourceGroupIsDirty"]),...(0,m.rn)("translations",["translations"])},methods:{loadResource(){let e=this.resourceGroups.find((e=>parseInt(e.id,10)===parseInt(this.id,10)));this.setCurrentResourceGroup(e),this.loading=!1},cancelEdit(){this.$router.push("/ssa/settings/resources")},dialogLeaveWithoutSaving(){this.routerNext()},dialogKeepEdits(){this.routerNext(!1)},validateFormFields(e){this.validFormFields=e},maybeLoadResource(){this.id?this.loadResource():this.loading=!1},saveResourceForm(){this.saving=!0,this.saveResourceGroup().then((()=>{this.saving=!1,this.dirty=!1,this.$emit("saved")}))},...(0,m.nv)("resources",["saveResourceGroup"]),...(0,m.OI)("resources",["setCurrentResourceGroup"])}};const iq=(0,he.Z)(tq,[["render",Hj]]);var aq=iq;const oq=e=>((0,o.dD)("data-v-afedf28a"),e=e(),(0,o.Cn)(),e),rq={class:"resources_settings_resources"},lq={class:"tootlbar-resources-container"},sq=oq((()=>(0,o._)("div",{style:{flex:"1"}},null,-1))),nq={class:"resourses-toolbar-actions"},dq={class:"empty-state-actions"},pq={key:1,class:"foxy-list-default resources-list-items"},fq=["onClick"],uq={class:"foxy-list-container"},cq={class:"md-list-text-container"},hq={class:"md-title"},mq={class:"screen-reader-text"};function gq(e,t,i,l,s,n){const d=(0,o.up)("foxy-button"),p=(0,o.up)("foxy-list-item"),f=(0,o.up)("foxy-select"),u=(0,o.up)("foxy-toolbar"),c=(0,o.up)("foxy-empty"),h=(0,o.up)("foxy-icon"),m=(0,o.up)("foxy-icon-button"),g=(0,o.up)("foxy-menu"),_=(0,o.up)("foxy-menu-anchor");return(0,o.wg)(),(0,o.iD)("div",rq,[(0,o.Wm)(d,{onClick:n.backToGroups,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.title),1)])),_:1},8,["onClick"]),(0,o.Wm)(u,{class:"md-transparent"},{default:(0,o.w5)((()=>[(0,o._)("div",lq,[(0,o._)("h2",null,(0,r.zw)(e.currentResourceGroup?e.currentResourceGroup.title:e.translations.settings.resources.newResourceGroup),1),(0,o.Wm)(f,{style:{width:"300px"},name:"resources-view",id:"resources-view",modelValue:s.resourcesView,"onUpdate:modelValue":t[0]||(t[0]=e=>s.resourcesView=e),label:e.translations.settings.resources.selectResources},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{"data-value":"active",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.title),1)])),_:1}),(0,o.Wm)(p,{"data-value":"inactive",role:"option"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.status.inactive),1)])),_:1})])),_:1},8,["modelValue","label"])]),sq,(0,o._)("div",nq,[(0,o.Wm)(d,{class:"md-primary",onClick:n.createResource,icon:"add"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.addNew),1)])),_:1},8,["onClick"]),(0,o.Wm)(d,{class:"md-primary",onClick:t[1]||(t[1]=t=>n.editResourceGroup(e.currentResourceGroup.id)),icon:"edit"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.edit),1)])),_:1})])])),_:1}),n.displayResources.length?((0,o.wg)(),(0,o.iD)("ul",pq,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.displayResources,(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id,class:"resource-item"},[(0,o._)("button",{class:"foxy-button-ghost",tabindex:"-1",onClick:e=>n.editResource(t.id)},null,8,fq),(0,o._)("div",uq,[(0,o._)("div",cq,[(0,o._)("div",hq,(0,r.zw)(t.title),1),(0,o._)("div",null,(0,r.zw)(t.description),1)]),(0,o.Wm)(_,null,{default:(0,o.w5)((()=>[(0,o.Wm)(m,{onClick:(0,a.iM)((e=>{s.openMenu={},s.openMenu[t.id]=!0}),["stop"])},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"settings"}),(0,o._)("span",mq,(0,r.zw)(e.translations.settings.resources.resourceSettings),1)])),_:2},1032,["onClick"]),(0,o.Wm)(g,{modelValue:s.openMenu[t.id],"onUpdate:modelValue":e=>s.openMenu[t.id]=e},{default:(0,o.w5)((()=>["publish"===t.status?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Wm)(p,{onClick:e=>n.toggleResource(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"block"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.deactivate),1)])),_:2},1032,["onClick"]),(0,o.Wm)(p,{onClick:e=>n.editResource(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"edit"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.edit),1)])),_:2},1032,["onClick"])],64)):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(p,{onClick:e=>n.toggleResource(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"how_to_reg"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.activate),1)])),_:2},1032,["onClick"]),(0,o.Wm)(p,{onClick:e=>n.confirmDelete(t.id)},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{icon:"delete"}),(0,o._)("span",null,(0,r.zw)(e.translations.actions.delete),1)])),_:2},1032,["onClick"])],64))])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)])])))),128))])):((0,o.wg)(),(0,o.j4)(c,{key:0,label:n.emptyLabel,description:n.emptyDescription},{default:(0,o.w5)((()=>[(0,o._)("div",dq,["active"===s.resourcesView?((0,o.wg)(),(0,o.j4)(d,{key:0,mode:"raised",class:"md-primary",onClick:n.createResource},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.addNew),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0),"active"===s.resourcesView?((0,o.wg)(),(0,o.j4)(d,{key:1,mode:"raised",class:"md-primary",onClick:n.autoGenerateResources},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.autoGenerate),1)])),_:1},8,["onClick"])):(0,o.kq)("",!0)])])),_:1},8,["label","description"]))])}var _q={name:"IdentifiableResources",props:{id:{type:[Number,String],required:!0}},data(){return{pendingId:null,resourcesView:"active",openMenu:{}}},mounted(){let e=this.resourceGroups.find((e=>e.id===this.id));this.setCurrentResourceGroup(e)},computed:{emptyDescription(){return"active"===this.resourcesView?this.translations.settings.resources.emptyGroupDescription:this.translations.settings.resources.emptyInactiveDescription},emptyLabel(){return"active"===this.resourcesView?this.translations.settings.resources.emptyLabel:this.translations.settings.resources.emptyInactiveLabel},displayResources(){let e=this.currentResourceGroup.resource_ids.map((e=>e.toString()));return"active"===this.resourcesView?this.resources.filter((t=>"publish"===t.status&&e.includes(t.id.toString()))):this.resources.filter((t=>"draft"===t.status&&e.includes(t.id.toString())))},...(0,m.rn)("labels",["apptTypeLabels"]),...(0,m.rn)("translations",["translations"]),...(0,m.rn)("resources",["currentResourceGroup","resources","resourceGroups"]),...(0,m.Se)("resources",["resourcesStatusActive","resourcesStatusInactive"])},methods:{toggleResource(e){if(this.saving)return;this.saving=!0,this.pendingId=e;let t=this.resources.find((t=>t.id===e));this.setCurrentResource(t);let i="publish"===t.status?"draft":"publish";this.setCurrentResource({key:"status",value:i}),this.saveResource().then((()=>{this.saving=!1,this.pendingId=null})).catch((e=>{console.log(e)}))},confirmDelete(e){if(this.saving)return;this.saving=!0,this.pendingId=e;let t=this.resources.find((t=>t.id===e));this.setCurrentResource(t);let i="deleted";this.setCurrentResource({key:"status",value:i}),this.saveResource().then((()=>{this.saving=!1,this.pendingId=null})).catch((e=>{console.log(e)}))},autoGenerateResources(){this.setCurrentResource(this.currentResourceGroup),this.$router.push({name:"auto-generate-resources",params:{id:this.currentResourceGroup.id}})},createResource(){this.setCurrentResourceDefault(),this.$router.push({name:"resource-single"})},editResourceGroup(e){if(this.saving)return;let t=this.resourceGroups.find((t=>t.id===e));this.setCurrentResourceGroup(t),this.$router.push({name:"resources-group-single",params:{id:e}})},editResource(e){if(this.saving)return;let t=this.resources.find((t=>t.id===e));this.setCurrentResource(t),this.$router.push({name:"resource-single",params:{id:e}})},backToGroups(){this.$router.push({name:"resources-all"})},...(0,m.nv)("resources",["saveResource"]),...(0,m.OI)("resources",["setCurrentResource","setCurrentResourceDefault","setCurrentResourceGroup"])}};const yq=(0,he.Z)(_q,[["render",gq],["__scopeId","data-v-afedf28a"]]);var wq=yq;const xq={class:"md-title"},Cq={class:"button-bar"};function vq(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-dialog-confirm"),p=(0,o.up)("foxy-snackbar"),f=(0,o.up)("loading"),u=(0,o.up)("foxy-textfield"),c=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(n,{onClick:s.cancelEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o._)("h2",xq,(0,r.zw)(s.pageTitle),1),(0,o.Wm)(d,{ref:"confirmLeaveDirty",title:e.translations.settings.staff.confirmIgnoreChangesTitle,"content-html":e.translations.settings.staff.confirmIgnoreChangesContent,"ok-text":e.translations.settings.staff.confirmIgnoreChangesOkay,"cancel-text":e.translations.settings.staff.confirmIgnoreChangesCancel,onConfirm:s.dialogLeaveWithoutSaving},null,8,["title","content-html","ok-text","cancel-text","onConfirm"]),(0,o.Wm)(p,{position:"top center",modelValue:l.isSaveStatusVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>l.isSaveStatusVisible=e),message:e.translations.settings.staff.actions.saved},null,8,["modelValue","message"]),l.loading?((0,o.wg)(),(0,o.j4)(f,{key:0,message:e.translations.settings.resources.loadingResource},null,8,["message"])):((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Wm)(u,{modelValue:l.v$.title.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>l.v$.title.$model=e),id:"title",required:"","aria-describedby":"titleError",label:e.translations.resourceGroups.title,helptext:s.titleError?e.translations.resourceGroups.titleError:"","helptext-persistent":"","helptext-validation":"",valid:!s.titleError},null,8,["modelValue","label","helptext","valid"]),(0,o.Wm)(u,{modelValue:l.v$.description.$model,"onUpdate:modelValue":t[2]||(t[2]=e=>l.v$.description.$model=e),id:"description","aria-describedby":"descriptionError",required:"",multiline:"",label:e.translations.resourceGroups.description,helptext:s.descriptionError?e.translations.resourceGroups.descriptionError:"","helptext-persistent":"","helptext-validation":"",valid:!s.descriptionError},null,8,["modelValue","label","helptext","valid"]),(0,o._)("div",Cq,[(0,o.Wm)(n,{disabled:l.saving,mode:"secondary",onClick:s.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled","onClick"]),(0,o.Wm)(n,{mode:"raised",disabled:l.saving||!l.validFormFields,onClick:s.saveResourceForm},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(s.buttonText),1)])),_:1},8,["disabled","onClick"]),l.saving?((0,o.wg)(),(0,o.j4)(c,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])],64))])}var bq={name:"EditResource",components:{Loading:ge},props:{id:{type:[Number,String],required:!0}},data(){return{v$:(0,Rd.Xw)(),loading:!0,saving:!1,validFormFields:!1,leaveWithoutSaving:!1,isSaveStatusVisible:!1,routerNext:null}},beforeRouteLeave(e,t,i){if(this.currentResourceIsDirty){let e="confirmLeaveDirty";return this.$refs[e].open(),void(this.routerNext=i)}i()},validations(){return{title:{required:Ld.C1},description:{required:Ld.C1}}},beforeMount(){if(this.id){let e=this.resources.find((e=>e.id===this.id));this.setCurrentResource(e)}else this.setCurrentResourceDefault();this.loading=!1},computed:{title:{get(){return this.currentResource?this.currentResource.title:""},set(e){this.updateCurrentResource({key:"title",value:e}),this.validationCheck()}},description:{get(){return this.currentResource?this.currentResource.description:""},set(e){this.updateCurrentResource({key:"description",value:e}),this.validationCheck()}},pageTitle(){let e=this.translations.settings.resources.actions.addNew;return this.id&&(e=this.name?this.name:this.translations.settings.resources.emptyEditTitleResource),e},titleError(){return this.v$.title.$invalid&&this.v$.title.$dirty},descriptionError(){return this.v$.description.$invalid&&this.v$.description.$dirty},buttonText(){return this.id?this.translations.general.save:this.translations.general.create},...(0,m.rn)("resources",["currentResource","resources","currentResourceIsDirty","currentResourceGroup"]),...(0,m.rn)("translations",["translations"])},methods:{dialogLeaveWithoutSaving(){this.routerNext()},validationCheck(){this.validFormFields=!this.v$.$invalid},cancelEdit(){this.$router.push({name:"identifiable-group",params:{id:this.currentResourceGroup.id}})},saveResourceForm(){this.updateCurrentResource({key:"resource_group_id",value:this.currentResourceGroup.id}),this.saving=!0,this.saveResource().then((()=>{this.saving=!1,this.dirty=!1,this.cancelEdit()}))},...(0,m.nv)("resources",["updateCurrentResource","saveResource"]),...(0,m.OI)("resources",["setCurrentResourceDefault","setCurrentResource"])}};const Bq=(0,he.Z)(bq,[["render",vq]]);var Sq=Bq;const kq={class:"md-title"},Aq={class:"md-fieldset field-wrapper"},Mq={class:"md-subheading"},Dq={class:"radio-list"},Tq={class:"button-bar"};function Oq(e,t,i,a,l,s){const n=(0,o.up)("foxy-button"),d=(0,o.up)("foxy-textfield"),p=(0,o.up)("foxy-radio"),f=(0,o.up)("foxy-progress-circular");return(0,o.wg)(),(0,o.iD)("div",null,[(0,o.Wm)(n,{onClick:s.cancelEdit,icon:"keyboard_arrow_left"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["onClick"]),(0,o._)("h2",kq,(0,r.zw)(s.pageTitle),1),(0,o.Wm)(d,{modelValue:l.v$.resourceTitle.$model,"onUpdate:modelValue":t[0]||(t[0]=e=>l.v$.resourceTitle.$model=e),id:"title",required:"","aria-describedby":"titleError",label:e.translations.resourceGroups.title,helptext:s.titleError?e.translations.resourceGroups.titleError:"","helptext-persistent":"","helptext-validation":"",valid:!s.titleError},null,8,["modelValue","label","helptext","valid"]),(0,o.Wm)(d,{type:"number",required:"",modelValue:l.v$.generateQuantity.$model,"onUpdate:modelValue":t[1]||(t[1]=e=>l.v$.generateQuantity.$model=e),modelModifiers:{number:!0},id:"quantity","aria-describedby":"quantityError",min:1,label:e.translations.resourceGroups.quantity,helptext:s.quantityError?e.translations.resourceGroups.quantityError:e.translations.settings.resources.quantityHelperText,"helptext-persistent":"","helptext-validation":"",valid:!s.quantityError},null,8,["modelValue","label","helptext","valid"]),(0,o._)("fieldset",Aq,[(0,o._)("legend",Mq,(0,r.zw)(e.translations.settings.resources.autoGenerateOptions.label),1),(0,o._)("div",Dq,[(0,o.Wm)(p,{modelValue:s.incrementMethod,"onUpdate:modelValue":t[2]||(t[2]=e=>s.incrementMethod=e),id:"increment-numbers",name:"incrementMethod",value:"numbers"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.autoGenerateOptions.number),1)])),_:1},8,["modelValue"]),(0,o.Wm)(p,{modelValue:s.incrementMethod,"onUpdate:modelValue":t[3]||(t[3]=e=>s.incrementMethod=e),id:"increment-capital",name:"incrementMethod",value:"capital"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.autoGenerateOptions.capital),1)])),_:1},8,["modelValue"]),(0,o.Wm)(p,{modelValue:s.incrementMethod,"onUpdate:modelValue":t[4]||(t[4]=e=>s.incrementMethod=e),id:"increment-small",name:"incrementMethod",value:"small"},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.autoGenerateOptions.lower),1)])),_:1},8,["modelValue"])])]),(0,o._)("div",Tq,[(0,o.Wm)(n,{mode:"raised",disabled:l.saving,onClick:s.cancelEdit},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.general.cancel),1)])),_:1},8,["disabled","onClick"]),(0,o.Wm)(n,{mode:"raised",class:"md-primary",disabled:l.saving||!l.validFormFields,onClick:s.generateResources},{default:(0,o.w5)((()=>[(0,o.Uk)((0,r.zw)(e.translations.settings.resources.actions.autoGenerate),1)])),_:1},8,["disabled","onClick"]),l.saving?((0,o.wg)(),(0,o.j4)(f,{key:0,medium:"",indeterminate:""})):(0,o.kq)("",!0)])])}var Gq={name:"AutoGenerateResources",components:{},props:{id:{type:[Number,String],required:!0}},data(){return{v$:(0,Rd.Xw)(),saving:!1,validFormFields:!1,title:"",quantity:1,incrementBy:"numbers"}},validations(){return{resourceTitle:{required:Ld.C1},generateQuantity:{required:Ld.C1,minValue:(0,Ld.uv)(1)}}},mounted(){if(!this.currentResourceGroup){let e=this.resourceGroups.find((e=>e.id===this.id));this.setCurrentResource(e)}},computed:{resourceTitle:{get(){return this.title?this.title:""},set(e){this.title=e,this.validationCheck()}},generateQuantity:{get(){return this.quantity},set(e){this.quantity=e,this.validationCheck()}},incrementMethod:{get(){return this.incrementBy},set(e){this.incrementBy=e}},pageTitle(){let e=this.translations.settings.resources.actions.autoGenerate;return this.currentResourceGroup&&(e=this.currentResourceGroup.title),e},titleError(){return this.v$.resourceTitle.$invalid&&this.v$.resourceTitle.$dirty},quantityError(){return this.v$.generateQuantity.$invalid},...(0,m.rn)("resources",["currentResource","resources","resourceGroups","currentResourceIsDirty","currentResourceGroup"]),...(0,m.rn)("translations",["translations"])},methods:{cancelEdit(){this.$router.push({name:"identifiable-group",params:{id:this.currentResourceGroup.id}})},validationCheck(){this.validFormFields=!this.v$.$invalid},generateObjects(e,t,i){const a=[];for(let o=0;os.selectCode&&s.selectCode(...e)),onFocus:t[1]||(t[1]=(...e)=>s.selectCode&&s.selectCode(...e))},"\n
+
+
+
+
+
+
+
+