1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CalendarBusinessInfo.BrvyvJEj.css","./ServiceCard.D5DSVrtm.css","./app.DVqQD2Si.css","./_main.BOPInh0y.css","./PhoneElement.CqrgXvy-.css","./TextBoxListElement.BbmoZcvv.css","./TextAreaElement.CLLI-KzT.css","./OptionElement.BqgLznve.css","./authorizeNet.goKbu3C6.css","./ghl-payment-element.B8fA3rJs.css","./CalendarLoader.DCl8rx9c.css","./DatePick.CgU1guwP.css","./ServiceMenuForm.GtRnU9vb.css","./vue-multiselect.B5exX717.css","./ServicesListCard.DUc-hhiA.css","./ServicesListAccordion.C5xgEAJ2.css","./AddServicesFooter.CtEhExAS.css"])))=>i.map(i=>d[i]); 2import{fP as Je,i as ht,a1 as Z,af as Ee,r as N,a3 as ie,c as D,fL as St,D as $e,a$ as Qe,N as r,ag as s,ai as U,ah as t,al as c,fK as yt,ao as pe,a5 as C,ak as z,az as Xe,aE as et,db as bt,aJ as X,aK as ae,aA as G,M as n,cJ as ee,aU as te,aL as wt,aF as O,_ as Ct,c3 as Ne,c_ as T,cs as he,f as Ue,cW as He,cY as kt,g as Mt,h as Dt,c$ as Et,d0 as $t,eC as It,L as xt,Y as Ae,eG as Re,eE as Tt,a as Oe,ap as ke,bi as Lt,u as Rt,cw as tt,j as Ft,cC as De,cE as be,a0 as Vt}from"./CqWH0BZP.js";import{_ as At}from"./CayIr0ud.js";import{T as e,ac as st,Y as p,u as ge,ad as Ie,ae as Ot,af as Pt,ag as Pe,ah as zt,ai as Bt,aj as Yt,X as xe,Z as nt,t as Se,V as we,U as rt,_ as at,$ as it,a1 as Nt,o as ze,ak as Be,v as Ut,al as Fe,aa as jt,am as We,an as Ge,ao as qt,ap as Ze,j as Ht,J as Wt,aq as Gt}from"./C7_QE1jR.js";import Zt from"./DgUpA0Df.js";import{i as Q,j as Kt}from"./BoA7liN9.js";import{S as Jt,c as Qt,b as ot}from"./C6nNTBQ1.js";import{a as Xt,l as es,i as Ve}from"./7jT6BWyQ.js";import{f as ts}from"./CRPoBB0N.js";import{b as ss,a as ns}from"./BKrpkwT2.js";import{c as lt}from"./Cb5GpP63.js";import{_ as je}from"./Bfz1ZMkH.js";import{f as rs,i as as}from"./b_E3N7Ru.js";import{g as Ke}from"./RrNCYXFM.js";import{a as is}from"./Rw3HD8NH.js";import{L as os,l as ls}from"./KPpQo_MF.js";import{A as cs}from"./BUJMsU-H.js";/* empty css */import{D as ds}from"./BS0TQWXo.js";import{F as us}from"./DRNKrJGC.js";/* empty css */import{s as ms}from"./DFiheZjC.js";import{g as vs}from"./DgvJtLXL.js";import{u as ps}from"./BFkM9BLg.js";import{b as fs}from"./A_toV-Ag.js";var _s=200;function gs(a,f,u,g){var y=-1,i=Xt,o=!0,_=a.length,h=[],w=f.length;if(!_)return h;u&&(f=Je(f,ts(u))),f.length>=_s&&(i=Qt,o=!1,f=new Jt(f));e:for(;++y<_;){var I=a[y],R=u==null?I:u(I);if(I=I!==0?I:0,o&&R===R){for(var S=w;S--;)if(f[S]===R)continue e;h.push(I)}else i(f,R,g)||h.push(I)}return h}var hs=ss(function(a,f){var u=es(f);return Ve(u)&&(u=void 0),Ve(a)?gs(a,ns(f,1,Ve,!0),ot(u)):[]});function Ss(a,f){var u=ht(a)?Je:fs;return u(a,ot(f))}const ys="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20style='margin:%20auto;%20background:%20none;%20display:%20block;%20shape-rendering:%20auto;'%20width='48px'%20height='48px'%20viewBox='0%200%20100%20100'%20preserveAspectRatio='xMidYMid'%3e%3ccircle%20cx='50'%20cy='50'%20fill='none'%20stroke='%23004eeb'%20stroke-width='5'%20r='44'%20stroke-dasharray='207.34511513692632%2071.11503837897544'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20repeatCount='indefinite'%20dur='0.9345794392523364s'%20values='0%2050%2050;360%2050%2050'%20keyTimes='0;1'%3e%3c/animateTransform%3e%3c/circle%3e%3c!--%20[ldio]%20generated%20by%20https://loading.io/%20--%3e%3c/svg%3e",bs="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%208.83366H3M13.8333%202.16699V5.50033M7.16667%202.16699V5.50033M7%2018.8337H14C15.4001%2018.8337%2016.1002%2018.8337%2016.635%2018.5612C17.1054%2018.3215%2017.4878%2017.939%2017.7275%2017.4686C18%2016.9339%2018%2016.2338%2018%2014.8337V7.83366C18%206.43353%2018%205.73346%2017.7275%205.19868C17.4878%204.72828%2017.1054%204.34583%2016.635%204.10614C16.1002%203.83366%2015.4001%203.83366%2014%203.83366H7C5.59987%203.83366%204.8998%203.83366%204.36502%204.10614C3.89462%204.34583%203.51217%204.72828%203.27248%205.19868C3%205.73346%203%206.43353%203%207.83366V14.8337C3%2016.2338%203%2016.9339%203.27248%2017.4686C3.51217%2017.939%203.89462%2018.3215%204.36502%2018.5612C4.8998%2018.8337%205.59987%2018.8337%207%2018.8337Z'%20stroke='white'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ct="data:image/svg+xml,%3csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.66675%2010.0003H16.3334M16.3334%2010.0003L10.5001%204.16699M16.3334%2010.0003L10.5001%2015.8337'%20stroke='white'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ws="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5%2017.5L14.5834%2014.5833M16.6667%209.58333C16.6667%2013.4954%2013.4954%2016.6667%209.58333%2016.6667C5.67132%2016.6667%202.5%2013.4954%202.5%209.58333C2.5%205.67132%205.67132%202.5%209.58333%202.5C13.4954%202.5%2016.6667%205.67132%2016.6667%209.58333Z'%20stroke='%23667085'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Cs=ee(()=>te(()=>import("./Cf2CNZwo.js"),__vite__mapDeps([0]),import.meta.url).then(a=>a.default||a)),ks={class:"calendar-service-v2-main-container appointment_service--list"},Ms={class:"service-header"},Ds={class:"service-header-left"},Es={class:"service-header-right"},$s={key:1,class:"service-search-input-container"},Is=["placeholder"],xs={class:"calendars-service-menu-container"},Ts=["data-group-id"],Ls=["onClick"],Rs=["id"],Fs={key:0,class:"calendars-single-group-container"},Vs={class:"calendars-service-menu-group-name"}
2,As={class:"cal_servicemenu_widgets--services",style:{gap:"15px"}},Os=Z({__name:"ListServiceMenus",props:{groups:null,businessName:{type:String,default:""},businessAddress:{type:String,default:""},updateSelectedService:Function},setup(a){const{t:f}=Ee(),u=a,g=["id","name","description","calendar_cover_image"],y=N(""),i=N(),o=N(""),_=N(),h=N([]),w=N([]),I=N(!1),R=N(!1),S=N(!1),M=N();ie(()=>{o.value=u.groups.length>1?u.groups[1]?.calendarProviderName:u.groups[0]?.calendarProviderName,_.value=u.groups.length>1?u.groups[1]:u.groups[0],e.totalRoomCapacity||st();const d=x();w.value=d,h.value=d});const x=()=>{const E=(e.serviceMenuDetails?.menu).filter(F=>F.calendarProviderName!=="All").flatMap(F=>F.calendars.map(A=>({...A,groupId:F.id}))),$=(F,A)=>{const re=F.order??-1/0,ve=A.order??-1/0;return re-ve};return E.sort($),E},P=()=>{const d=M.value;if(d){const v=d.scrollLeft<250?d.scrollLeft:250;d.scrollBy({left:-v,behavior:"smooth"}),j()}},oe=()=>{const d=M.value;if(d){const v=d.scrollWidth-d.clientWidth-d.scrollLeft,E=v<250?v:250;S.value=v>250,d.scrollBy({left:E,behavior:"smooth"})}},j=()=>{const d=M.value;if(d){const v=d.scrollWidth>d.clientWidth;R.value=v&&d.scrollLeft>0,S.value=v&&d.scrollLeft<d.scrollWidth-d.clientWidth-1}},q=D(()=>e.serviceMenuDetails?.serviceMenu?.description),b=D(()=>e.serviceMenuDetails?.serviceMenu&&q.value?St(q.value,{length:310}):""),le=D(()=>(e.isMobileVersion||e.isTabletVersion)&&Q()),ce=D(()=>!e.isMobileVersion&&!e.isTabletVersion&&Q()),se=D(()=>!Q()),ye=()=>{const d=y.value,v=_e.value.filter(E=>E.name.toLowerCase().includes(d.toLowerCase()));h.value=v},fe=d=>{const v=document.getElementById(d);if(v){const E={behavior:"auto"};Q()&&(E.block="nearest",E.inline="start"),v.scrollIntoView(E)}},K=d=>h.value?.some(v=>v.provider_id===d),de=d=>{i.value=d;const v=L.value;Ie(v,!0),e.calendarServiceSlug=d,e.selectedService=d;const E=e.currentStep===p.ADD_SERVICE||e.currentStep===p.INITIAL?"self":"guest",$={...v,calendarId:d,userId:"",bookingFor:E};ge.value?(e.selectedServices.push($),e.resetServicesSelectedStaff&&(e.selectedServices=e.selectedServices.map(F=>(F.userId="",F)))):e.selectedServices[e.addGuestServiceIndex]=$,e.showStaffSelection=v?.enable_staff_selection,e.staffMemberCount=v?.team_members?.length??0,e.services=l.value,e.currentStep===p.INITIAL?e.currentStep=Ot.value?p.BOOKING:Pt.value?p.SHOW_SELECTED_SERVICES:p.SELECT_USERS:e.currentStep===p.SELECT_GUEST_SERVICES&&(e.currentStep=p.ADD_GUEST_SERVICES)},ue=(d,v)=>d===v?.provider_id,_e=D(()=>w.value),l=D(()=>_.value?.calendars),m=d=>{_.value=d,o.value=d.calendarProviderName,fe(d.id)},L=D(()=>{const d=u.groups[0].calendars;return d?d.find(v=>v.id===i.value):void 0}),V=d=>(e.selectedServices.findIndex($=>$.id===d)+1).toString(),k=d=>e.selectedServices?.some(v=>v.id===d),B=d=>e.selectedServices.length&&!e.selectedUser.value.includes("Me")?f("book"):k(d.id)?V(d.id):e.selectedServices.length?f("add"):f("book"),J=d=>e.selectedServices.length&&!e.selectedUser.value.includes("Me")?!1:e.selectedServices.length===5?!0:k(d.id),Y=d=>e.selectedServices.filter(E=>E.calendarId===d).length,H=d=>{const{id:v,team_members:E}=d,$=E?.length,F=Y(v),A=W(),re=hs(E,A,"user_id"),ve=e.selectedServices?.filter(Te=>Te.calendarId!==""),ft=Ce(d),_t=E?.some(Te=>ve?.some(Le=>Le.team_members?.length<=Y(Le.id)&&Le.team_members?.some(gt=>gt.user_id===Te.user_id)));return ft?ge.value?$<F:re.length>0?!1:_t:!0},W=()=>e.selectedServices.filter(E=>E.enable_staff_selection).flatMap(E=>E.team_members)?.reduce((E,$)=>(E?.find(A=>A?.user_id===$?.user_id)||E.push($),E),[]),Ce=d=>{let v=!0,E=!0;const $=d?.resources||[];for(const F of $)if(F.calendar_id===d.id){const A=F.resource.id,re=F.resource.resource_type;if(re==="rooms")if(e.totalRoomCapacity[A]<=0){let ve=e.selectedServices.length>0||e.totalRoomCapacity[A]===0;v=ge.value?ve:!1}else v=!0;else if(re==="equipments"){let ve=e.selectedServices.length>0||e.totalRoomCapacity[A]===0;e.totalEquipmentCapacity[A]<=0&&(E=ge.value?ve:!1)}}return v&&E},ne=()=>{j(),me()};ie(async()=>{M.value?.addEventListener("scroll",j),window.addEventListener("resize",ne,{passive:!0}),await $e(),j(),me()}),Qe(()=>{window.removeEventListener("resize",ne),M.value?.removeEventListener("scroll",j)});const me=()=>{j();const d=window?.innerWidth;e.clientWidth=d};return(d,v)=>{const E=Cs;return n(),r("div",ks,[s("div",{class:U(["cal_servicemenu_widgets--calendar-service-menu-header-search-container",{"iframe-embed":t(le),"iframe-embed-desktop":t(ce),"native-widget":t(se)}])},[s("div",Ms,[s("div",Ds,c(t(e).serviceMenuDetails?.serviceMenu?.name),1),s("div",Es,[(d._.provides[yt]||d.$route).query?.rwg_token?(n(),pe(E,{key:0,"business-name":u.businessName,"business-address":u.businessAddress},null,8,["business-name","business-address"])):C("",!0)])]),t(q)&&t(e).
2currentStep===t(p).INITIAL?(n(),r("div",{key:0,class:U(["service-description",{"show-more":t(I)}]),onMouseleave:v[1]||(v[1]=$=>I.value=!1),onBlur:v[2]||(v[2]=$=>I.value=!1),role:"region"},[z(c(t(I)?t(q):t(b))+" ",1),t(q).length>310?(n(),r("span",{key:0,class:"show-more-description",onClick:v[0]||(v[0]=$=>I.value=!t(I))},c(t(I)?t(f)("show_less"):t(f)("show_more")),1)):C("",!0)],34)):C("",!0),v[7]||(v[7]=s("hr",null,null,-1)),t(_e)?.length?(n(),r("div",$s,[v[4]||(v[4]=s("img",{src:ws,alt:"search",class:"avatar_img",style:{width:"15px",height:"18px",marginRight:"0px"}},null,-1)),Xe(s("input",{id:"service-menu-search",class:"border-none outline-none focus:ring-0 focus:border-white hover:border-white",type:"text",placeholder:d.$t("search"),"onUpdate:modelValue":v[3]||(v[3]=$=>bt(y)?y.value=$:null),name:"searchQuery",onInput:ye},null,40,Is),[[et,t(y)]])])):C("",!0),s("div",xs,[t(R)?(n(),r("div",{key:0,class:"arrow left-arrow",onClick:P},v[5]||(v[5]=[s("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M15 18L9 12L15 6",stroke:"var(--cal_servicemenu_widgets-primary-color)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):C("",!0),a.groups.length>1?(n(),r("div",{key:1,class:"calendars-service-menu-list-groups",ref_key:"scrollContainer",ref:M},[(n(!0),r(X,null,ae(a.groups,($,F)=>(n(),r("div",{key:F,"data-group-id":$.id,class:"calendars-service-menu-list-container"},[$.id!=="all"?(n(),r("div",{key:0,class:U(["calendars-service-menu-tab",{"calendars-selected-service-menu-tab":t(_)?.id===$.id}]),style:G({display:$.id==="All"?"none":"block"}),onClick:A=>m($)},c($.calendarProviderName),15,Ls)):C("",!0)],8,Ts))),128))],512)):C("",!0),s("div",{class:"arrow right-arrow",onClick:oe,style:G({visibility:t(S)?"visible":"hidden"})},v[6]||(v[6]=[s("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M9 18L15 12L9 6",stroke:"var(--cal_servicemenu_widgets-primary-color)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),4)])],2),s("div",{class:U({"calendars-service-menu-main-list-embed":t(le),"calendars-service-menu-main-list-embed-desktop":t(ce),"calendars-service-menu-main-list":t(se)}),style:G({padding:"0px 10px 100px 10px",height:t(e).isMobileVersion||t(e).isTabletVersion?t(Q)()?"500px":"65dvh":"700px"})},[(n(!0),r(X,null,ae(a.groups,($,F)=>(n(),r("section",{id:$.id,style:G({scrollMarginTop:t(q)?"250px":"200px",paddingBottom:F===a.groups.length-1&&t(e).isMobileVersion?"100px":"0px"}),key:F,class:U({"calendars-service-menu-groups-list-embed":t(le),"calendars-service-menu-groups-list-embed-desktop":t(ce),"calendars-service-menu-groups-list":t(se)})},[$.id!=="all"&&K($.id)?(n(),r("div",Fs,[s("div",Vs,c($.calendarProviderName),1),s("div",As,[(n(!0),r(X,null,ae(t(h),(A,re)=>(n(),r(X,null,[ue($.id,A)?(n(),pe(Zt,{key:re,data:A,"on-card-click":de,keys:g,"show-action-button":!0,"is-calendar-service":!0,"enable-card-click":!1,"is-action-button-disabled":J(A),"action-button-text":B(A),"is-card-disabled":H(A),source:"servicemenus",class:U(t(e).clientWidth<=1194&&t(e).currentStep===t(p).ADD_SERVICE?"responsive":"")},null,8,["data","is-action-button-disabled","action-button-text","is-card-disabled","class"])):C("",!0)],64))),256))])])):C("",!0)],14,Rs))),128))],6)])}}}),Ps=Object.assign(Os,{__name:"PreviewElementsServiceMenusListServiceMenus"}),zs={class:"dropDownMainContainer"},Bs=["id"],Ys={class:"selectedOptionText"},Ns=["id","onClick"],Us=["id"],js={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},qs=Z({__name:"GuestDropDown",props:{value:Object,id:String,options:Array,label:String,handleChange:Function},setup(a){const f=a,u=N(!1),g=f.options?f.options:[{value:"OptionsUnavailable",label:"Options unavailable"}],y=N(null),i=()=>{u.value=!u.value},o=_=>{_!=="OptionsUnavailable"&&f.handleChange(_),u.value=!1};return ie(()=>{const _=h=>{y.value&&!y.value.contains(h.target)&&(u.value=!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}}),(_,h)=>(n(),r("div",zs,[s("div",{class:"dropDownMain",ref_key:"wrapperRef",ref:y},[s("div",{class:"selectedOption",onClick:i,id:a.id},[s("div",null,[s("p",Ys,c(a.value&&a.value.label?a.value.label:a.label),1)]),h[0]||(h[0]=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"#667085","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],8,Bs),s("ul",{class:U(u.value?"dropDownList":"hiddenDropDownList")},[(n(!0),r(X,null,ae(t(g),(w,I)=>(n(),r("li",{key:w.value+"-div"},[(n(),r("div",{id:w.value+"-drop-down-option",key:I,onClick:R=>o(w),class:"flex flex-row gap-2 items-center"},[w.icon?(n(),pe(wt(w.icon),{key:0,class:"w-4 h-4 text-gray-500"})):C("",!0),(n(),r("li",{id:a.id+"-"+w.value+"-drop-down-option-li",key:a.id+w+"-li",class:U("dropDownOption"+(a.value.value===w.value?" dropDownSelectedOption":""))},[z(c(w.label)+" ",1),a.value.value===w.value?(n(),r("svg",js,h[1]||(h[1]=[s("path",{d:"M16.6666 5L7.49992 14.1667L3.33325 10",stroke:"#155EEF","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):C("",!0)],10,Us))],8,Ns))]))),128))],2)],512)]))}}),Hs=Object.assign(qs,{__name:"PreviewElementsGuestDropDown"}),Ws=ee(()=>te(()=>import("./DgUpA0Df.js"),__vite__mapDeps([1,2,3]),import.meta.url).then(a=>a.default||a)),Gs={class:"calendars-service-menu-select-users"},Zs={class:"service-header"},Ks={key:1},Js={class:"calendars-guests-label"},Qs={key:0,class:"calendars-guests-info"},Xs={class:"calendars-guests-info",style:{color:"red"}},en=Z({__name:"SelectUsers",setup(a){const f=["id","name","description","calendar_cover_image"],u=i=>{e.maxGuestError="",e.selectedUser=i;const o=parseInt(i.value)-1;if(i.value.includes("Me"))for(;e.selectedServices.length>1;)e.selectedServices.pop();else if(!isNaN(o)&&o>0){for(;e.selectedServices.length>1;)e.selectedServices.pop();for(let _=0;_<o;_++)e.selectedServices.push({calendarId:"",userId:"",bookingFor:"guest"})}st(),Ie(e.selectedServices[0],!0)},g=D(()=>e.selectedUser.value.includes("Me")?0:parseInt(e.selectedUser.value)),y=D(()=>e.serviceMenuDetails?.serviceMenu?.enableAddGuests??!0);return(i,o)=>{const _=Ws;return n(),r("div",Gs,[s("div",Zs,c(i.$t("selected_services")),1),o[0]||(o[0]=s("hr",{style:{marginBottom:"30px"}},null,-1)),t(e).selectedServices.length?(n(),pe(_,{key:0,data:t(e).selectedServices[0],keys:f,"show-action-button":!1,"is-calendar-service":!0,"enable-card-click":!1,source:"servicemenus"},null,8,["data"])):C("",!0),o[1]||(o[1]=s("hr",{style:{marginTop:"20px"}},null,-1)),t(y)?(n(),r("div",Ks,[s("div",Js,c(i.$t("guest_label")),1),O(Hs,{id:"service-menu-guest-dropdown",value:t(e).selectedUser,options:t(e).guestDropDownOptions,"handle-change":u,label:"Guests"}
2,null,8,["value","options"]),t(g)>1?(n(),r("div",Qs,c(i.$t("service_menu_guest_description",{guestCount:t(g)-1})),1)):C("",!0)])):C("",!0),s("div",Xs,c(t(e).maxGuestError),1)])}}}),tn=Object.assign(en,{__name:"PreviewElementsServiceMenusSelectUsers"}),sn={class:"calendars-service-menu-select-guest-service"},nn={class:"service-header"},rn={class:"calendars-service-menu-select-service-container"},an={class:"calendars-select-guest-name",style:{padding:"5px 0px"}},on={key:0},ln={class:"calendars-select-guest-service-name"},cn={key:1},dn=["onClick"],un=["onClick"],mn=Z({__name:"SelectGuestServices",setup(a){const f=g=>{e.currentStep=p.SELECT_GUEST_SERVICES,e.addGuestServiceIndex=g},u=g=>{e.serviceMenuDetails?.serviceMenu?.enableAddMultipleServices?(Ie(e.selectedServices[g],!1),e.selectedServices[g]={calendarId:"",userId:"",bookingFor:g===0?"self":"guest"}):e.selectedServices.length===1?(e.selectedServices?.splice(g,1),e.currentStep=p.INITIAL,e.addGuestServiceIndex=0,e.selectStaffIndex=0):e.selectedServices.splice(g,1)};return(g,y)=>(n(),r("div",sn,[s("div",nn,c(g.$t("selected_services")),1),y[1]||(y[1]=s("hr",{style:{marginBottom:"10px"}},null,-1)),(n(!0),r(X,null,ae(t(e).selectedServices,(i,o)=>(n(),r("div",{key:o},[s("div",rn,[s("div",null,[s("div",an,c(g.$t("guest_title",{count:o+1,title:o===0?"(You)":""})),1),i.calendarId?(n(),r("div",on,[s("div",ln,c(i.name),1)])):(n(),r("div",cn,[s("div",{class:"calendars-select-guest-service",onClick:_=>f(o)},c(g.$t("choose_service")),9,dn)]))]),s("div",null,[s("img",{onClick:_=>u(o),src:lt,alt:"close",id:"hourglass-img",style:{width:"30px",height:"30px",cursor:"pointer",marginRight:"20px"}},null,8,un)])]),y[0]||(y[0]=s("hr",{style:{marginBottom:"10px"}},null,-1))]))),128))]))}}),vn=Object.assign(mn,{__name:"PreviewElementsServiceMenusSelectGuestServices"}),pn="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.0002%2017.5C10.3017%2017.5%207.01275%2019.2857%204.91881%2022.057C4.46814%2022.6534%204.2428%2022.9516%204.25018%2023.3547C4.25587%2023.666%204.45141%2024.0589%204.69641%2024.2511C5.01354%2024.5%205.453%2024.5%206.33192%2024.5H21.6684C22.5473%2024.5%2022.9868%2024.5%2023.3039%2024.2511C23.5489%2024.0589%2023.7444%2023.666%2023.7501%2023.3547C23.7575%2022.9516%2023.5322%2022.6534%2023.0815%2022.057C20.9876%2019.2857%2017.6986%2017.5%2014.0002%2017.5Z'%20stroke='%23155EEF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.0002%2014C16.8996%2014%2019.2502%2011.6495%2019.2502%208.75C19.2502%205.8505%2016.8996%203.5%2014.0002%203.5C11.1007%203.5%208.75015%205.8505%208.75015%208.75C8.75015%2011.6495%2011.1007%2014%2014.0002%2014Z'%20stroke='%23155EEF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",dt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='13'%20viewBox='0%200%2018%2013'%20fill='none'%20%3e%3cpath%20d='M17%201L6%2012L1%207'%20stroke='%23004eeb'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e",ut="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.3163%2019.4384C5.92462%2018.0052%207.34492%2017%209%2017H15C16.6551%2017%2018.0754%2018.0052%2018.6837%2019.4384M16%209.5C16%2011.7091%2014.2091%2013.5%2012%2013.5C9.79086%2013.5%208%2011.7091%208%209.5C8%207.29086%209.79086%205.5%2012%205.5C14.2091%205.5%2016%207.29086%2016%209.5ZM22%2012C22%2017.5228%2017.5228%2022%2012%2022C6.47715%2022%202%2017.5228%202%2012C2%206.47715%206.47715%202%2012%202C17.5228%202%2022%206.47715%2022%2012Z'%20stroke='%2398A2B3'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",fn={class:"calendar-service-staff-main-container appointment_service--list"},_n={class:"staff-header"},gn={key:0,class:"any-staff-available-container"},hn={class:"select-staff-single-container-user-details"},Sn={class:"select-staff-text-container"},yn={class:"select-staff-title"},bn={class:"select-staff-desc"},wn={key:0,src:dt,alt:"tick",class:"avatar_img",style:{width:"10px",height:"14px"}},Cn={key:1,class:"select-staff-button"},kn={class:"cal_servicemenu_widgets--select-staff",style:{paddingBottom:"50px",gap:"15p
2x"}},Mn={class:"select-staff-single-container-user-details"},Dn=["src","alt"],En={key:1,src:ut,alt:"close",class:"avatar_img"},$n={class:"staff-name"},In=["onClick"],xn={key:0},Tn={key:1,src:dt,alt:"tick",class:"avatar_img",style:{width:"10px",height:"14px"}},Ln=Z({__name:"SelectStaffMember",setup(a){const f=o=>{const _=e.teamMembers.filter(h=>h.user_id===o);e.selectedServices[e.selectStaffIndex].userId=o,e.selectedServices[e.selectStaffIndex].userName=_[0]?.full_name,e.selectedServices[e.selectStaffIndex].profilePhoto=_[0]?.profile_photo,e.currentStep=p.SHOW_SELECTED_SERVICES},u=o=>ge.value?!1:e.selectedServices.filter((h,w)=>w!==e.selectStaffIndex)?.some(h=>h.userId===o),g=D(()=>e.selectedServices[e.selectStaffIndex]?.userId),y=o=>g.value===o,i=D(()=>e.selectedServices[e.selectStaffIndex]?.userId==="");return(o,_)=>(n(),r("div",fn,[s("div",_n,c(o.$t("select_staff")),1),_[3]||(_[3]=s("hr",null,null,-1)),t(e).selectedServices[t(e).selectStaffIndex]?.team_members.length!==1?(n(),r("div",gn,[s("div",hn,[_[1]||(_[1]=s("div",{class:"staff-overlay-container"},[s("img",{src:pn,alt:"tick",class:"avatar_img",style:{width:"30px",height:"30px",marginRight:"0px"}})],-1)),s("div",Sn,[s("div",yn,c(o.$t("any_staff_header")),1),s("div",bn,c(o.$t("any_staff_description")),1)])]),s("div",{class:"select-staff-button",onClick:_[0]||(_[0]=h=>f(""))},[t(i)?(n(),r("img",wn)):(n(),r("div",Cn,c(o.$t("select")),1))])])):C("",!0),s("div",kn,[(n(!0),r(X,null,ae(t(e).teamMembers,(h,w)=>(n(),r("div",{key:w},[s("div",{class:U(["select-staff-single-container",{"select-staff-single-container-disabled":u(h.user_id)}])},[s("div",Mn,[h.profile_photo?(n(),r("img",{key:0,class:"avatar_img",src:h.profile_photo,alt:h.full_name},null,8,Dn)):(n(),r("img",En)),s("div",$n,c(h.full_name),1)]),s("div",{class:"select-staff-button",onClick:I=>f(h.user_id)},[y(h.user_id)?(n(),r("img",Tn)):(n(),r("div",xn,c(o.$t("select")),1))],8,In)],2),_[2]||(_[2]=s("hr",null,null,-1))]))),128))])]))}}),Rn=Object.assign(Ct(Ln,[["__scopeId","data-v-89aaecb0"]]),{__name:"PreviewElementsServiceMenusSelectStaffMember"}),mt="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5%208.83366H2.5M13.3333%202.16699V5.50033M6.66667%202.16699V5.50033M6.5%2018.8337H13.5C14.9001%2018.8337%2015.6002%2018.8337%2016.135%2018.5612C16.6054%2018.3215%2016.9878%2017.939%2017.2275%2017.4686C17.5%2016.9339%2017.5%2016.2338%2017.5%2014.8337V7.83366C17.5%206.43353%2017.5%205.73346%2017.2275%205.19868C16.9878%204.72828%2016.6054%204.34583%2016.135%204.10614C15.6002%203.83366%2014.9001%203.83366%2013.5%203.83366H6.5C5.09987%203.83366%204.3998%203.83366%203.86502%204.10614C3.39462%204.34583%203.01217%204.72828%202.77248%205.19868C2.5%205.73346%202.5%206.43353%202.5%207.83366V14.8337C2.5%2016.2338%202.5%2016.9339%202.77248%2017.4686C3.01217%2017.939%203.39462%2018.3215%203.86502%2018.5612C4.3998%2018.8337%205.09987%2018.8337%206.5%2018.8337Z'%20stroke='%2398A2B3'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",qe="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.0007%2010.5003L6.43991%207.53304C5.91087%207.09218%205.64635%206.87174%205.45618%206.60152C5.28769%206.3621%205.16256%206.09494%205.0865%205.81223C5.00065%205.49315%205.00065%205.14882%205.00065%204.46016V2.16699M10.0007%2010.5003L13.5614%207.53304C14.0904%207.09218%2014.355%206.87174%2014.5451%206.60152C14.7136%206.3621%2014.8387%206.09494%2014.9148%205.81223C15.0007%205.49315%2015.0007%205.14882%2015.0007%204.46016V2.16699M10.0007%2010.5003L6.43991%2013.4676C5.91087%2013.9085%205.64635%2014.1289%205.45618%2014.3991C5.28769%2014.6386%205.16256%2014.9057%205.0865%2015.1884C5.00065%2015.5075%205.00065%2015.8518%205.00065%2016.5405V18.8337M10.0007%2010.5003L13.5614%2013.4676C14.0904%2013.9085%2014.355%2014.1289%2014.5451%2014.3991C14.7136%2014.6386%2014.8387%2014.9057%2014.9148%2015.1884C15.0007%2015.5075%2015.0007%2015.8518%2015.0007%2016.5405V18.8337M3.33398%2
202.16699H16.6673M3.33398%2018.8337H16.6673'%20stroke='%2398A2B3'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",vt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20%3e%3cpath%20d='M9.99935%202.16602C12.0837%204.44798%2013.2683%207.40938%2013.3327%2010.4993C13.2683%2013.5893%2012.0837%2016.5507%209.99935%2018.8327M9.99935%202.16602C7.91495%204.44798%206.73039%207.40938%206.66602%2010.4993C6.73039%2013.5893%207.91495%2016.5507%209.99935%2018.8327M9.99935%202.16602C5.39698%202.16602%201.66602%205.89698%201.66602%2010.4993C1.66602%2015.1017%205.39698%2018.8327%209.99935%2018.8327M9.99935%202.16602C14.6017%202.16602%2018.3327%205.89698%2018.3327%2010.4993C18.3327%2015.1017%2014.6017%2018.8327%209.99935%2018.8327M2.0827%207.99935H17.916M2.08268%2012.9993H17.916'%20stroke='%2398A2B3'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e",Fn=ee(()=>te(()=>import("./Bvkk3Pow.js"),__vite__mapDeps([4,5,6,7,8,9,10,1,2,3,11,12,13]),import.meta.url).then(a=>a.default||a)),Vn=ee(()=>te(()=>import("./86aN41kG.js"),__vite__mapDeps([10,1,2,3,11,14,13]),import.meta.url).then(a=>a.default||a)),An=ee(()=>te(()=>import("./BeV1oA0v.js"),__vite__mapDeps([15]),import.meta.url).then(a=>a.default||a)),On={class:"service-menu-booking-form"},Pn={class:"text-info"},zn=["textContent"],Bn={key:0,style:{minHeight:"43rem"}},Yn={class:"service-menu-booking-form-right-top-container"},Nn={class:"service-menu-form-change-time-container"},Un={key:0,class:"service-menu-payment-info"},jn={class:"calendar-payments-container"},qn={class:"calendar-total-payment"},Hn=["innerHTML"],Wn={class:"details-container"},Gn={key:0,class:"calendar-deposit-payment"},Zn=["innerHTML"],Kn={class:"details-container"},Jn={class:"service-menu-booking-form-right-bottom-container"},Qn={key:2},Xn=Z({__name:"ServiceMenuInfo",setup(a){const{t:f}=Ee(),u=Ue(),g=Ne({formId:"",loc:"en",formData:void 0}),y=()=>{e.currentStep=p.BOOKING,e.fetchSlots=!1},i=D(()=>[{tag:"first_name",label:f("first_name"),active:!1,placeholder:f("first_name"),type:"text",required:!0,error:f("first_name_error")},{placeholder:f("last_name"),type:"text",required:!0,tag:"last_name",label:f("last_name"),active:!1,error:f("last_name_error")},{placeholder:f("phone"),type:"text",required:!0,tag:"phone",label:f("phone"),active:!1,error:f("phone_error")},{active:!1,type:"email",required:!0,placeholder:f("email"),tag:"email",label:f("email")},{active:!1,type:"textarea",required:!1,placeholder:f("anything_youd_like_to_know_before_appointment"),tag:"calendar_notes",label:f("additional_information")}]),o=D(()=>(g.loc,e.selectedTimezone));ie(()=>{_()});async function _(){if(e.serviceMenuDetails?.serviceMenu?.formId){g.formId=e.serviceMenuDetails?.serviceMenu?.formId;const S=await $fetch(u.public.FORMS_SERVICE_URL+"/forms/data/"+e.serviceMenuDetails.serviceMenu.formId);let M=S.form.fields;M.length>0&&(S.form.button={background:"#188bf6",color:"#fff",border:{border:0,padding:15,radius:4}},M=M.filter(x=>x.type!=="submit"&&x.type!=="payment"),Pe.value&&(S.form.payment=null,M.push({tag:"payment",label:"Payment",active:!1,placeholder:"",type:"payment",required:!0}))),S.form.style.marginTop="10px",S.form.width="auto",S.form.fields=M,g.formData=S}else g.formData=w()}function h(S){S&&S.error&&(e.submissionError=S.error),e.isLoading=!1}function w(){const S=e.serviceMenuDetails?.serviceMenu,M={},x=i.value;return M.form=[],S.enableConsentCheck&&x.push({type:"terms_and_conditions",label:"T & C",active:!1,tag:"terms_and_conditions",placeholder:S.consentLabel,required:!0}),Pe.value&&x.push({tag:"payment",label:f("payment"),active:!1,placeholder:"",type:"payment",required:!0}),M.form={width:"550",formLabelVisible:!0,fbPixelId:"",layout:!0,customStyle:"",stickyContact:e.selectedServices[0]?.sticky_contact,fields:x,align:"center"},M.country=S?.country,M.locationId=S?.locationId,M}const I=S=>{const M=e.serviceMenuDetails?.serviceMenu;$e(()=>{rs("track","Schedule",S?.fbEventId||"")}),window.parent.postMessage(["msgsndr-booking-complete",{fingerprint:S.fingerprint,calendarId:e.selectedServices[0]?.calendarId}],"*");const x=S.calendarThankYouUrl||M.formSubmitType==="RedirectURL"&&M.formSubmitRedirectUrl;
2if(x){let P=He(x,S.cookiePayload);P||(P=He(S.calendarThankYouUrl,S.cookiePayload)),window.top.location.href=P}else e.formThankyouMessage=kt(M.formSubmitThanksMessage,S.cookiePayload),e.locationAddress=S.event_address,e.isLoading=!1,e.currentStep=p.CONFIRMATION},R=D(()=>e.isMobileVersion||e.isTabletVersion);return(S,M)=>{const x=Fn,P=Vn,oe=An;return n(),r("div",On,[s("div",Pn,c(S.$t("enter_your_information")),1),M[4]||(M[4]=s("hr",{style:{width:"100%"}},null,-1)),s("div",{class:"service-menu-booking-form-info-container",style:G({flexDirection:t(R)?"column-reverse":"row"})},[s("div",{class:"service-menu-booking-form-inner",style:G({width:t(R)?"100%":"60%"})},[t(e).submissionError?(n(),r("div",{key:0,textContent:c(t(e).submissionError),class:"error appointment-error"},null,8,zn)):C("",!0),t(g).formData?(n(),pe(x,{key:1,style:{marginTop:"20px"},services:t(Yt),timezone:t(o),formId:t(g).formId,formData:t(g).formData,onStep:I,forCalendarV3:!0,calendar:t(Bt),class:"hl_widget-step2","show-calendar-submit-button":!1,"on-click-submit-form":t(zt),onProcessError:h},null,8,["services","timezone","formId","formData","calendar","on-click-submit-form"])):C("",!0)],4),!t(e).isMobileVersion&&!t(e).isTabletVersion?(n(),r("hr",Bn)):C("",!0),!t(e).isMobileVersion&&!t(e).isTabletVersion?(n(),r("div",{key:1,style:G({width:t(e).isMobileVersion&&t(e).isTabletVersion?"100%":"35%"})},[s("div",Yn,[s("div",null,[M[0]||(M[0]=s("img",{src:mt,alt:"close",id:"calendar-img"},null,-1)),z(" "+c(t(T)(t(e).selectedSlot).format("ddd, MMM D, YYYY")),1)]),s("div",Nn,[s("div",null,[M[1]||(M[1]=s("img",{src:je,alt:"close",id:"clock-img"},null,-1)),z(" "+c(t(T)(t(e).selectedSlot).format("h:mm A")),1)]),s("span",{onClick:y},c(S.$t("change_time")),1)]),s("div",null,[M[2]||(M[2]=s("img",{src:qe,alt:"close",id:"hourglass-img"},null,-1)),z(" "+c(t(xe)),1)]),s("div",null,[M[3]||(M[3]=s("img",{src:vt,alt:"close",id:"globe-img"},null,-1)),z(" "+c(t(e).selectedTimezone?.label),1)]),t(nt)?(n(),r("div",Un,[s("div",jn,[s("div",qn,[s("div",{innerHTML:t(Ke)({svgName:"card",color:"var(--cal_servicemenu_widgets-primary-color)"})},null,8,Hn),s("div",Wn,[s("div",null,c(t(f)("total_amount")),1),s("div",null,c(t(Se)(t(he)(t(we)),t(rt))),1)])]),t(at)?(n(),r("div",Gn,[s("div",{innerHTML:t(Ke)({svgName:"payNow",color:"var(--cal_servicemenu_widgets-primary-color)"})},null,8,Zn),s("div",Kn,[s("div",null,c(t(f)("pay_now")),1),s("div",null,c(t(Se)(t(he)(t(we)),t(it))),1)])])):C("",!0)])])):C("",!0)]),s("div",Jn,[O(P,{"is-card":!0,data:t(e).selectedServices},null,8,["data"])])],4)):(n(),r("div",Qn,[O(oe,{data:t(e).selectedServices},null,8,["data"])]))],4)])}}}),er=Object.assign(Xn,{__name:"PreviewElementsServiceMenusServiceMenuInfo"}),tr="data:image/svg+xml,%3csvg%20width='173'%20height='129'%20viewBox='0%200%20173%20129'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='86.5'%20cy='64.5'%20r='64'%20fill='%23EFF4FF'/%3e%3ccircle%20cx='20.5'%20cy='20.5'%20r='6'%20fill='%23D1E0FF'/%3e%3ccircle%20cx='17.5'%20cy='112.5'%20r='8'%20fill='%23D1E0FF'/%3e%3ccircle%20cx='160.5'%20cy='36.5'%20r='8'%20fill='%23D1E0FF'/%3e%3ccircle%20cx='149.5'%20cy='9.5'%20r='5'%20fill='%23D1E0FF'/%3e%3cpath%20d='M111.875%2058.25H60.125M111.875%2065.4375V54.8C111.875%2049.9695%20111.875%2047.5543%20110.935%2045.7093C110.108%2044.0864%20108.789%2042.767%20107.166%2041.9401C105.321%2041%20102.905%2041%2098.075%2041H73.925C69.0945%2041%2066.6793%2041%2064.8343%2041.9401C63.2114%2042.767%2061.892%2044.0864%2061.0651%2045.7093C60.125%2047.5543%2060.125%2049.9695%2060.125%2054.8V78.95C60.125%2083.7805%2060.125%2086.1957%2061.0651%2088.0407C61.892%2089.6636%2063.2114%2090.983%2064.8343%2091.8099C66.6793%2092.75%2069.0945%2092.75%2073.925%2092.75H86M97.5%2035.25V46.75M74.5%2035.25V46.75M93.1875%2084.125L98.9375%2089.875L111.875%2076.9375'%20stroke='%23155EEF'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",sr="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16%2018L18%2020L22%2016M22%2010H2M22%2012V8.2C22%207.0799%2022%206.51984%2021.782%206.09202C21.5903%205.7157%2021.2843%205.40974%2020.908%205.21799C20.4802%205%2019.9201%205%2018.8%205H5.2C4.0799%205%203.51984%205%203.09202%205.21799C2.7157%205.40973%202.40973%205.71569%202.21799%206.09202C2%206.51984%202%207.0799%202%208.2V15.8
2C2%2016.9201%202%2017.4802%202.21799%2017.908C2.40973%2018.2843%202.71569%2018.5903%203.09202%2018.782C3.51984%2019%204.0799%2019%205.2%2019H12'%20stroke='%2398A2B3'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",nr=ee(()=>te(()=>import("./86aN41kG.js"),__vite__mapDeps([10,1,2,3,11,14,13]),import.meta.url).then(a=>a.default||a)),rr={class:"service-menu-confirmation-container"},ar={class:"confirmation-header"},ir={class:"thank-you-message"},or={class:"list-booked-services-container"},lr={class:"service-menu-confirmation-appointment-details"},cr={key:0,style:{color:"#333333",fontWeight:"600"}},dr=Z({__name:"ServiceMenuConfirmation",setup(a){const f=D(()=>e.formThankyouMessage),u=D(()=>{const y=e.selectedServices;return e.bookAppointmentResponse.forEach((i,o)=>{const{success:_}=i;y[o]&&(y[o].disabled=!_)}),y}),g=D(()=>{const y=e.selectedServices?.reduce((i,o)=>{if(!o.disabled&&o.stripe&&o.stripe.amount){const h=Nt(o?.stripe)??o?.stripe?.amount;return i+h}return i},0);return Number(y)?.toFixed(2)});return(y,i)=>{const o=nr;return n(),r("div",rr,[i[4]||(i[4]=s("img",{src:tr,alt:"close",id:"confirmation-img"},null,-1)),s("div",ar,c(y.$t("your_appointment_has_been_scheduled")),1),s("div",ir,c(t(f)),1),i[5]||(i[5]=s("hr",{style:{marginBottom:"20px"}},null,-1)),s("div",or,[O(o,{"is-card":!0,data:t(u)},null,8,["data"])]),s("div",lr,[s("div",null,[i[0]||(i[0]=s("img",{src:mt,alt:"close",id:"calendar-img"},null,-1)),z(" "+c(t(T)(t(e).selectedSlot).format("ddd, MMM D, YYYY")),1)]),s("div",null,[i[1]||(i[1]=s("img",{src:je,alt:"close",id:"clock-img"},null,-1)),z(" "+c(t(T)(t(e).selectedSlot).format("h:mm A")),1)]),s("div",null,[i[2]||(i[2]=s("img",{src:qe,alt:"close",id:"hourglass-img"},null,-1)),z(" "+c(t(xe)),1)]),t(g)>0?(n(),r("div",cr,[i[3]||(i[3]=s("img",{src:sr,alt:"close",id:"hourglass-img",style:{marginRight:"5px"}},null,-1)),s("div",null,c(t(Se)(t(he)(t(we)),t(g))),1),s("span",null,"("+c(y.$t("paid"))+")",1)])):C("",!0)])])}}}),ur=Object.assign(dr,{__name:"PreviewElementsServiceMenusServiceMenuConfirmation"}),{addHeaderFromCookieForReferer:mr}=Dt(),vr=()=>{const a={channel:"APP",source:"WEB_USER",version:"2021-04-15",...Mt()},f=Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone;return f&&(a.timezone=f),mr(a),a},Me=a=>{const f=Ue();return $fetch.create({baseURL:f.public.REST_API_URLS,headers:vr()})},pt={getServiceMenuByIdOrSlug:a=>Me()("calendars/widget/service-menu",{method:"GET",params:a}),getFreeSlots:a=>Me()("calendars/get-service-calendars-free-slots",{method:"POST",body:a}),bookAppointment:a=>Me()("calendars/events/service-reservations",{method:"POST",body:a}),updatePaymentStatus:a=>Me()("calendars/events/service-reservations/payment-status",{method:"PUT",body:a})},pr=ee(()=>te(()=>import("./86aN41kG.js"),__vite__mapDeps([10,1,2,3,11,14,13]),import.meta.url).then(a=>a.default||a)),fr=ee(()=>te(()=>import("./BeV1oA0v.js"),__vite__mapDeps([15]),import.meta.url).then(a=>a.default||a)),_r={class:"cal_servicemenu_widgets--booking"},gr={class:"cal-row cal_servicemenu_widgets--container"},hr={key:0,class:"cal_servicemenu_widgets--service-menu-info"},Sr={class:"booking-widget-services-header"},yr={class:"booking-widget-services-duration"},br={class:"cal-sm-booking-widget-list-services"},wr={key:1,class:"cal_servicemenu_widgets--service-menu-info"},Cr={class:"cal-sm-booking-widget-list-services"},kr={key:0},Mr={key:0,class:"form-builder--item"},Dr={class:"h5",for:"cancellationNote"},Er={key:1},$r={key:1,class:"widgets-step-1"},Ir={class:"widgets-date-timezone-wrapper",style:{height:"100%"}},xr={key:0,class:"label-select-date"},Tr={key:1,class:"label-select-date"},Lr={class:"widgets-date-block"},Rr={key:0},Fr=["aria-label"],Vr={key:1,class:"datepick-info"},Ar={class:"loader"},Or={class:"widgets-timezone-picker"},Pr={class:"option__desc"},zr={class:"option__title"},Br={class:"option_sub_title"},Yr={key:0,class:"widgets-slot-block"},Nr={class:"widgets-time-slots"},Ur=["onClick"],jr=Z({__name:"BookingService",props:{calendarProvider:{type:Object,required:!1,default:()=>({})},calendarService:{type:Object,required:!1,default:()=>({})},calenderTimezone:{type:String,required:!0},isForSpecificService:{type:Boolean,required:!1,default:!1},calendarEvent:{type:Object,required:!1},calendarEventId:{type:String,required:!1},isForCancellation:{type:Boolean,required:!1,default:!1},isForReschedule:{type:Boolean,default:!1},redirect:{type:Boolean,default:!0},use24hFormat:{type:Boolean,default:!1},funnelPreview:{type:Boolean,default:!1},pageUrl:{type:String,default:void 0},baseReferrrer:{type:String,default:void 0}
2,urlParams:{type:Object,default:void 0},stickyContactData:{type:Object,default:void 0},stickyContactFingerprint:{type:String,default:void 0},selectedTeamMember:{type:String,default:void 0}},emits:["clear-calendar-service","on-submit","moveToNextMonth"],setup(a,{emit:f}){T.extend(is),T.extend(os),T.extend(ls),T.extend(Et),T.extend($t);const{t:u,locale:g,setLocale:y}=Ee();Ue().public;const i=N("en"),o=N(),_=a,h=D(()=>b.filterTimezone?b.availableTimezones.filter(l=>l.label.toLowerCase().includes(b.filterTimezone.toLowerCase())):b.availableTimezones),w=D(()=>{i.value;const m=[...T.weekdaysShort()];return m.push(m.shift()),m}),I=D(()=>(i.value,T.months())),R=D(()=>(i.value,e.serviceMenuDetails?.serviceMenu&&e.serviceMenuDetails?.serviceMenu?.disableContactTimezone)),S=D(()=>(i.value,R.value?_.calenderTimezone:e.selectedTimezone?.value)),M=D(()=>T(e.appointmentDate).tz(S.value)),x=D(()=>(i.value,_.use24hFormat?"HH:mm":"hh:mm A")),P=D(()=>It(e.daySlots,T(e.appointmentDate).format("YYYY-MM-DD")+".slots",[]).map(l=>T(l).tz(S.value))),oe=D(()=>{const l=e.serviceMenuDetails?.serviceMenu;return l&&l.startDayOfWeek}),j=D(()=>_.calendarService?_.calendarService.pixel_id:null),q=T.tz.guess(),b=Ne({timezone:q,calendarStartingDate:T().tz(q).format("YYYY-M-D"),calendarRange:{from:T().tz(q).format("YYYY-M-D")},availableTimezones:[],filterTimezone:"",formData:void 0,appointmentId:void 0,seqCall:0,isLoading:!1,isFetchingSlots:!1,isBackButtonDisabled:!1,isNextMonthDisabled:!1,submissionError:"",showNoDates:!1,loadingRecurringSlots:!1,currentCalendarStep:1,locationAddress:void 0,allSlots:[]});ie(async()=>{if(e.fetchSlots){if(g.value!=="en"){window.dayjs=T;const l=ze(g.value);await y(g.value),await xt(`unpkg.com/[email protected]/locale/${l}.js`,()=>{T.locale(l),i.value=g.value})}e.appointmentDate=void 0,ce(),R.value&&K(!0,!0,!0),!_.funnelPreview&&j.value!==void 0&&j.value!==""&&$e(()=>{as(j.value)})}}),Ae(()=>e.selectedTimezone,()=>{K(!0,e.isMobileVersion===!1,!0)}),Ae(()=>e.appointmentDate,l=>{l&&(e.selectedSlot=void 0)});const le=l=>{const m=T(l).utc().format("YYYY-MM-DDTHH:mm:ss[Z]");e.selectedSlot=l;const L=b.allSlots.find(k=>k[0]?.slot&&T(k[0].slot).utc().format("YYYY-MM-DDTHH:mm:ss[Z]")===m),V=e.selectedServices.map(k=>{const B=L?.find(Y=>Y.calendarId===k.calendarId),J=B?B.slot:l;return{userId:k.userId,calendarId:k.calendarId,slot:J}});e.selectedServicesSlots=V};function ce(){Re.includes(b.timezone)||Re.push(b.timezone),b.availableTimezones=Tt(Re.map(l=>{const m=T().tz(l);return{label:`GMT${m.format("Z")} ${l} (${m.format("z")})`,sortFormat:m.format("z"),value:l,currentTime:m.format(x.value),utcOffset:m.utcOffset()}}),"utcOffset"),e.selectedTimezone=b.availableTimezones.find(l=>l.value===(R.value?_.calenderTimezone:b.timezone))}function se({month:l,year:m}){b.isFetchingSlots||(b.calendarStartingDate=`${m}-${l+1}-1`,e.selectedSlot=void 0,(e.isMobileVersion||e.isTabletVersion)&&(e.appointmentDate=void 0),K(!0,!0))}function ye(){b.isFetchingSlots||(b.selectedSlot=void 0,K(!0,!0,!0))}function fe(l){b.isNextMonthDisabled=l}async function K(l=!1,m=!1,L=!1,V=0){try{b.isLoading=!0,b.isFetchingSlots=!0,l&&(e.daySlots={}),b.showNoDates=!1,b.seqCall++;const k=b.seqCall,B=T(b.calendarStartingDate,"YYYY-M-D"),J=B.clone().tz(S.value,!0).startOf("month"),Y=B.clone().tz(S.value,!0).endOf("month"),W={services:e.selectedServices.map(v=>({calendarId:v.calendarId,userId:v.userId,bookingFor:v.bookingFor})),locationId:e.serviceMenuDetails.serviceMenu.locationId,startDate:J.valueOf().toString(),endDate:Y.valueOf().toString(),timezone:S.value},Ce=await pt.getFreeSlots(W);b.allSlots=Ce.slots;const ne=b.allSlots?.map(v=>v[0].slot),me={};for(const v of ne){const E=v.split("T")[0];me[E]=me[E]||{slots:[]};const $=me[E].slots,F=$.findIndex(A=>v<A);F===-1?$.push(v):$.splice(F,0,v)}if(k!==b.seqCall)return;e.daySlots={...e.daySlots,...me},e.availableTimes=Object.keys(e.daySlots).map(v=>T(v).format("YYYY-M-D"));const d=ne;m&&d.length>0?T(d[0],"YYYY-M-D").isSame(T(b.calendarStartingDate,"YYYY-M-D"),"month")&&!e.isMobileVersion&&!e.isTabletVersion&&(e.appointmentDate=ne[0]):d.length===0&&L&&V<us?(b.calendarStartingDate=B.add(1,"month").format("YYYY-M-D"),o.value?.incrementMonth(1),await K(l,m,L,V+1)):d.length===0&&(b.showNoDates=!0),b.isLoading=!1,b.isFetchingSlots=!1}catch{b.showNoDates=!0,b.isLoading=!1,b.isFetchingSlots=!1}}function de(l){return l.getFullYear()+"-"+(l.getMonth()+1)+"-"+l.getDate()}function ue(l){let{to:m,from:L}=b.calendarRange,V=l;try{if(m&&(m=T(m,"YYYY-M-D")?.tz(S.value)),L=T(L,"YYYY-M-D")?.tz(S.value)?.hour(0),l=T(de(l),"YYYY-M-D").tz(S.value,!0),m&&l?.isAfter(m)||L&&l?.isBefore(L))return!0}catch{if(m&&new Date(de(l))>new Date(m)||L&&new Date(de(l))<new Date(L))return!0}return e.availableTimes.length>0?!e.availableTimes.includes(V.getFullYear()+"-"+(V.getMonth()+1)+"-"+V.getDate()):!0}function _e(){e.currentStep=p.FORM}return Pe.value&&Oe({script:[{src:"https://js.stripe.com/v3/",async:!0,type:"text/javascript"}]}),(l,m)=>{const L=pr,V=fr;return n(),r("div",_r,[s("div",gr,[!t(e).isMobileVersion&&!t(e).isTabletVersion?(n(),r("div",hr,[s("div",Sr,[s("span",null,c(l.$t("your_appointment")),1),s("div",yr,[m[4]||(m[4]=s("img",{src:qe,alt:"close",id:"hourglass-img"},null,-1)),z(" "+c(t(xe)),1)]),m[5]||(m[5]=s("hr",null,null,-1))]),s("div",br,[O(L,{data:t(e).selectedServices},null,8,["data"])])])):(n(),r("div",wr,[s("div",Cr,[O(V,{data:t(e).selectedServices},null,8,["data"])])])),s("div",{class:U([{"selected-date":t(e).appointmentDate&&!t(b).isLoading},{"step-form":t(b).currentCalendarStep===2},"cal_servicemenu_widgets--steps"])},[a.isForCancellation?(n(),r("div",kr,[t(b).isCancelled?(n(),r("h5",Er,c(t(u)("your_appointment_has_been_cancelled")),1)):(n(),r("div",Mr,[s("label",Dr,c(t(u)("cancellation_reason")),1),Xe(s("textarea",{id:"cancellationNote","onUpdate:modelValue":m[0]||(m[0]=k=>t(b).cancellationNote=k),class:"form-control",rows:"5",style:{resize:"none"}},null,512),[[et,t(b).cancellationNote]])]))])):t(b).currentCalendarStep===1?(n(),r("div",$r,[s("div",Ir,[t(e).isMobileVersion?(n(),r("h4",xr,c(t(e).appointmentDate?t(u)("choose_time_slot"):t(u)("select_a_date")),1)):(n(),r("h4",Tr,c(t(u)("select_a_date_and_time")),1)),s("div",Lr,[O(ds,{ref_key:"datePickerRef",ref:o,modelValue:t(e).appointmentDate,"onUpdate:modelValue":m[1]||(m[1]=k=>t(e).appointmentDate=k),format:"YYYY-MM-DD",displayFormat:"YYYY-MM-DD",hasInputElement:!1,showCalendarIcon:!1,isDateDisabled:ue,disablePerio
2dControl:!0,calendarRange:t(b).calendarRange,placeholder:t(u)("date_of_birth"),joinNextPreviousArrow:!0,onChangedMonth:se,onChangedYear:se,onDisableNextMonth:fe,weekdays:w.value,months:I.value,nextMonthCaption:t(u)("next_month"),prevMonthCaption:t(u)("previous_month"),class:"date-picker-calendar",startDayOfWeek:oe.value},null,8,["modelValue","calendarRange","placeholder","weekdays","months","nextMonthCaption","prevMonthCaption","startDayOfWeek"]),!t(b).isLoading&&t(b).showNoDates?(n(),r("div",{key:0,onClick:ye,class:"datepick-info"},[M.value?(n(),r("div",Rr,[z(c(t(u)("no_slot_available_this_month"))+" ",1),t(b).isNextMonthDisabled?C("",!0):(n(),r("a",{key:0,"aria-label":t(u)("go_to_next_month"),onClick:m[2]||(m[2]=k=>l.$emit("moveToNextMonth",1))},[z(c(t(u)("go_to_next_month"))+" ",1),m[6]||(m[6]=s("img",{src:ct,alt:"arrow-right",class:"avatar_img",style:{width:"15px",height:"18px",marginRight:"0px",marginLeft:"5px"}},null,-1))],8,Fr))])):C("",!0)])):C("",!0),t(b).isFetchingSlots?(n(),r("div",Vr,[s("div",Ar,c(t(u)("finding_open_available_slots")),1)])):C("",!0),s("div",Or,[R.value?C("",!0):(n(),pe(cs,{key:0,modelValue:t(e).selectedTimezone,"onUpdate:modelValue":m[3]||(m[3]=k=>t(e).selectedTimezone=k),closeOnSelect:!0,allowEmpty:!1,"show-labels":!1,options:h.value,label:"label",placeholder:t(u)("type_here_to_search_timezone"),class:"multi_select_calendar"},{singleLabel:ke(k=>[m[7]||(m[7]=s("img",{src:vt,alt:"close",id:"globe-img",style:{marginRight:"10px"}},null,-1)),z(" "+c(k.option.label),1)]),option:ke(k=>[s("div",Pr,[s("span",zr,c(k.option.label),1),s("span",Br,c(k.option.currentTime),1)])]),noResult:ke(()=>[z(c(t(u)("no_timezone_found")),1)]),_:1},8,["modelValue","options","placeholder"]))])])]),O(Lt,{name:t(e).isMobileVersion||t(e).isTabletVersion?"":"fade"},{default:ke(()=>[t(e).appointmentDate?(n(),r("div",Yr,[s("ul",Nr,[(n(!0),r(X,null,ae(P.value,(k,B)=>(n(),r("li",{class:U(["widgets-time-slot",{actived:t(e).selectedSlot&&t(e).selectedSlot.valueOf()===k.valueOf()}]),key:B,onClick:J=>le(k)},[s("span",null,c(k.format(x.value)),1),t(e).isMobileVersion||t(e).isTabletVersion?(n(),r("button",{key:0,class:"btn",onClick:_e},c(t(u)("select_time")),1)):C("",!0)],10,Ur))),128))])])):C("",!0)]),_:1},8,["name"])])):C("",!0)],2)])])}}}),qr=Object.assign(jr,{__name:"PreviewElementsServiceMenusBookingService"}),Hr="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.3332%2018V16.3333C18.3332%2014.7801%2017.2709%2013.4751%2015.8332%2013.105M12.9165%203.2423C14.1381%203.73679%2014.9998%204.93443%2014.9998%206.33333C14.9998%207.73224%2014.1381%208.92988%2012.9165%209.42437M14.1665%2018C14.1665%2016.4469%2014.1665%2015.6703%2013.9128%2015.0577C13.5745%2014.241%2012.9255%2013.592%2012.1088%2013.2537C11.4962%2013%2010.7196%2013%209.1665%2013H6.6665C5.11337%2013%204.3368%2013%203.72423%2013.2537C2.90747%2013.592%202.25855%2014.241%201.92024%2015.0577C1.6665%2015.6703%201.6665%2016.4469%201.6665%2018M11.2498%206.33333C11.2498%208.17428%209.75745%209.66667%207.9165%209.66667C6.07555%209.66667%204.58317%208.17428%204.58317%206.33333C4.58317%204.49238%206.07555%203%207.9165%203C9.75745%203%2011.2498%204.49238%2011.2498%206.33333Z'%20stroke='%23004EEB'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Wr={class:"calendars-selected-service"},Gr={key:0,class:"service-header"},Zr={key:1,style:{color:"#eaecf0"}},Kr={class:"calendars-selected-services-bottom-container"},Jr={class:"selected-services-name"},Qr={class:"selected-service-price-duration-container"},Xr={class:"selected-service-duration"},ea={class:"selected-service-price"},ta={key:0,class:"selected-services-team-member-container"},sa={key:0},na={key:1},ra=["src","alt"],aa={key:1,src:ut,alt:"close",class:"avatar_img"},ia={class:"selected-team-member"},oa=["onClick"],la=["onClick"],ca={key:0,class:"selected-services-total-container"},da={class:"total-label"},ua={class:"total-amount"},ma={key:1,class:"selected-services-total-container"},va={class:"total-label"},pa={class:"total-amount"},fa={key:2,class:"selected-services-total-container"},_a={class:"total-label"},ga={class:"total-amount"},ha=Z({__name:"SelectedServices",props:{showHeader:{default:!0,type:Boolean},showFooter:{default:!0,type:Boolean}},setup(a){const f=y=>{Ie(e.selectedServices[y],!1),e.selectedServices.length===1?(e.selectedServices?.splice(y,1),e.currentStep=p.INITIAL,e.addGuestServiceIndex=0,e.selectStaffIndex=0):e.selectedServices?.splice(y,1)},u=D(()=>e.currentStep!==p.ADD_SERVICE&&Be.value),g=y=>{e.currentStep=p.SELECT_STAFF,e.selectStaffIndex=y,e.teamMembers=e.selectedServices[y].team_members};return ie(()=>{e.selectedServices=e.selectedServices.map(y=>{const i=y.team_members;let o={};return i.length===1&&(o={userName:i[0].full_name,profilePhoto:i[0].profile_photo,userId:i[0].user_id}),{...y,...o}})}),(y,i)=>(n(),r("div",Wr,[a.showHeader?(n(),r("div",Gr,c(y.$t("selected_services")),1)):C("",!0),a.showHeader?(n(),r("hr",Zr)):C("",!0),s("div",Kr,[(n(!0),r(X,null,ae(t(e).selectedServices,(o,_)=>(n(),r("div",{key:_},[s("div",{class:U(["selected-service-single-container",{"selected-service-single-container-remove":!t(u)}])},[s("div",null,[s("div",Jr,c(_+1)+". "+c(o.name),1),s("div",Qr,[s("div",Xr,[i[0]||(i[0]=s("img",{src:je,alt:"close",id:"clock-img"},null,-1)),z(" "+c(t(Ut)(o.slot_duration)),1)]),s("div",ea,c(t(Se)(t(he)(o.stripe?.currency),o.stripe?.amount)),1)]),t(u)?(n(),r("div",ta,[o.userId===""?(n(),r("div",sa,c(y.$t("with_any_available_staff")),1)):(n(),r("div",na,[z(c(y.$t("with"))+" ",1),o.profilePhoto?(n(),r("img",{key:0,class:"avatar_img",src:o.profilePhoto,alt:o.userName},null,8,ra)):(n(),r("img",aa)),s("div",ia,[s("span",null,c(o?.userName),1)])]))])):C("",!0)]),t(u)?(n(),r("div",{key:0,class:"select-staff-container",onClick:h=>g(_)},[i[1]||(i[1]=s("img",{src:Hr,alt:"close",id:"hourglass-img"},null,-1)),z(" "+c(y.$t("select_staff")),1)],8,oa)):(n(),r("div",{key:1,onClick:h=>f(_)},i[2]||(i[2]=[s("img",{src:lt,alt:"close",id:"hourglass-img",style:{width:"30px",height:"30px",cursor:"pointer"}},null,-1)]),8,la))],2),i[3]||(i[3]=s("hr",null,null,-1))]))),128)),a.showFooter&&t(e).selectedServices.length?(n(),r("div",ca,[s("div",da,c(y.$t("duration")),1),s("div",ua,c(t(xe)),1)])):C("",!0),a.showFooter&&t(e).selectedServices.length&&t(nt)?(n(),r("div",ma,[s("div",va,c(y.$t("total")),1),s("div",pa,c(t(Se)(t(he)(t(we)),t(rt))),1)])):C("",!0),a.showFooter&&t(e).selectedServices.length&&t(at)?(n(),r("div",fa,[s("div",_a,c(y.$t("deposit_paid")),1),s("div",ga,c(t(Se)(t(he)(t(we)),t(it))),1)])):C("",!0)])]))}}),Ye=Object.assign(ha,{__name:"PreviewElementsServiceMenusSelectedServices"}),mi=Object.freeze(Object.defineProperty({__proto__:null,default:Ye},Symbol.toStringTag,{value:"Module"})),Sa=ee(()=>te(()=>import("./6oZ8K70-.js"),__vite__mapDeps([16]),import.meta.url).then(a=>a.default||a)),ya={key:0,class:"cal_servicemenu_widgets--subcontainer",style:{display:"flex",flexDirection:"row-reverse"}},ba={key:0,style:{width:"40%"}},wa={key:1,class:"cal_servicemenu_widgets--subcontainer"},Ca={key:2,class:"cal_servicemenu_widgets--subcontainer"},ka={key:3,class:"cal_servicemenu_widgets--subcontainer"},Ma={key:4,class:"cal_servicemenu_widgets--subcontainer"},Da={key:5,class:"cal_servicemenu_widgets--subcontainer"},Ea={key:6,class:"cal_servicemenu_widgets--subcontainer"},$a={key:7,class:"service-menu-loading-container"},Ia={class:"mt-2"},xa={key:0,class:"service-menu-error"},Ta={"aria-label":"Back"},La={class:"service-menu-widget-action-right-container"},Ra=["aria-label"],Fa={key:0,src:bs,alt:"calendar",id:"calendar-img",style:{marginRight:"5px"}},Va={"aria-label":"primaryButtonText()"},Aa={key:1,src:ct,alt:"arrow-right",class:"avatar_img",style:{width:"15px",height:"18px",marginRight:"0px"}}
2,Oa={key:1},Pa=Z({__name:"CalendarServicePageMenu",props:["calendarData","directWidget","redirect","funnelPreview","pageUrl","baseReferrrer","urlParams","stickyContactData","stickyContactFingerprint"],emits:["on-submit"],async setup(a,{emit:f}){let u,g;const{$bus:y}=Rt(),i=a,{t:o,locale:_,setLocale:h}=Ee(),w=tt(),I=Ft(),R=f,S=N(),M=D(()=>[{label:o("just_me"),value:"justMe"},{label:`2 ${o("people")}`,value:"2"},{label:`3 ${o("people")}`,value:"3"},{label:`4 ${o("people")}`,value:"4"},{label:`5 ${o("people")}`,value:"5"}]);Ae(()=>e.calendarServiceSlug,l=>{if(i.directWidget&&!e.isForSpecificService){const m=Object.assign({},w.params);let L=Object.assign({},w.query);m.service=l,I.push({params:m,query:L})}});const x=D(()=>e.currentStep),P=D(()=>{switch(e.currentStep){case p.BOOKING:return!e.selectedSlot;case p.FORM:return e.isLoading;default:return!1}}),oe=()=>{e.selectedStaffMember?(e.showStaffSelection=!0,e.selectedStaffMember=void 0):(e.calendarServiceSlug=void 0,e.selectedService=void 0,e.staffMemberCount=0),e.showNavigationFooter=!0},j=()=>{if(e.selectedServices.length>1){if(!b())return;Fe.value&&Be.value?e.currentStep=p.ADD_GUEST_SERVICES:e.currentStep=p.BOOKING;for(let m=1;m<e.selectedServices.length;m++){let L={...e.selectedServices[0],bookingFor:"guest",userId:""};e.selectedServices[m]={...e.selectedServices[m],...L}}}else Fe.value||Be.value?e.currentStep=p.SHOW_SELECTED_SERVICES:e.currentStep=p.BOOKING},q=()=>{switch(Ze(),e.currentStep){case p.INITIAL:e.currentStep=p.SELECT_USERS;break;case p.SELECT_USERS:j();break;case p.SELECT_GUEST_SERVICES:e.currentStep=p.ADD_GUEST_SERVICES;break;case p.ADD_GUEST_SERVICES:for(const l of e.selectedServices)if(!l.calendarId){e.guestServicesError=o("select_all_services_error");return}e.currentStep=p.SHOW_SELECTED_SERVICES;break;case p.ADD_SERVICE:e.currentStep=p.SHOW_SELECTED_SERVICES;break;case p.SHOW_SELECTED_SERVICES:e.currentStep=p.BOOKING;break;case p.BOOKING:e.currentStep=p.FORM;break;case p.FORM:y.$emit("submitCalendarForm",{isRecurring:!1});break}},b=()=>{const l=e.selectedServices.length,m=e.selectedServices[0];let L=!1,V=!1,k=0,B=0;const J=m?.resources||[];for(const H of J)if(H.resource.resource_type==="rooms"){L=!0;const W=H.resource.capacity||0;B+=W}else if(H.resource.resource_type==="equipments"){V=!0;const W=H.resource.out_of_service||0,ne=(H.resource.quantity||0)-W;k+=ne}const Y=m?.team_members?.length;if(V&&k<l||L&&B<l||Y<e.selectedServices.length){const H=Math.min(V?k:1/0,L?B:1/0,Y);return e.maxGuestError=o("max_guest_error",{count:H}),!1}return!0},le=D(()=>e.currentStep!==p.SELECT_STAFF),ce=D(()=>e.currentStep===p.SELECT_USERS&&Fe.value),se=()=>{Ze(),e.currentStep===p.SELECT_USERS&&(e.currentStep=ge.value?p.ADD_SERVICE:p.ADD_GUEST_SERVICES)},ye=D(()=>{const l=i.calendarData?.menu;return l?l.find(L=>L.id===K.value?.provider_id):void 0}),fe=D(()=>e.currentStep!=p.INITIAL&&e.currentStep!=p.CONFIRMATION),K=D(()=>e.services?e.services.find(l=>l.slug?.toLowerCase()===e.calendarServiceSlug||l.id===e.calendarServiceSlug):void 0);if(i.calendarData){e.serviceMenuDetails=i.calendarData,e.calendarProvider=i.calendarData.menu[0],e.timezone=i.calendarData.timezone,e.eventId=i.calendarData.eventId;const l=w.name==="booking-slug"||w.name==="widget-bookings-slug"||w.name==="widget-booking-slug-slug"||w.name==="widget-booking-id"||w.name==="appointment-service"||w.name==="cancel-appointment"||i.funnelPreview&&!i?.calendarData?.isTeamSelected,m=e.eventId&&w.path.endsWith("cancel"),L=e.eventId&&!m;e.isForSpecificService=l,e.isForCancellation=m,e.isForReschedule=L,e.pageUrl=i.pageUrl,e.baseReferrer=i.baseReferrrer,e.calendarEvent=i.calendarData.calendarEvent,e.services=([u,g]=De(async()=>Promise.all(i.calendarData.menu[0].calendars.map(async k=>{if(k.enable_recurring){const{booking_option:B,booking_overlap_default_status:J,...Y}=k.recurring,H={freq:Y.freq,count:Y.count,interval:Y.interval||1,monthDays:Y.month_days,weekDays:Y.week_days};try{const W=await Ht.generateRRuleText(H);k.recurringRule=(W[0].toUpperCase()+W.slice(1)).replace("time","occurrence")}catch{k.recurringRule="-"}}return k}))),u=await u,g(),u);const V=e.serviceMenuDetails?.serviceMenu;if(e.shouldCreateOrderForServices=V?.shouldCreateOrderForServices,e.use24hFormat=w.query.use24hFormat!==void 0||V?.use24hFormat,w.query.lang?(_.value=w.query.lang,[u,g]=De(()=>h(_.value)),await u,g(),T.locale(ze(w.query.lang))):_.value!==V?.language&&(_.value=V?.language||"en",[u,g]=De(()=>h(_.value)),await u,g(),T.locale(ze(_.value))),l)e.services&&e.services.length>0&&(e.calendarServiceSlug=e.services[0].slug?.toLowerCase());
2else{const k=w.params.service;e.calendarServiceSlug=k?.toLowerCase()}}ie(()=>{de(),e.guestDropDownOptions=M.value,e.selectedUser=M.value[0],ue(),window.addEventListener("resize",ue,{passive:!0})}),Qe(()=>{window.removeEventListener("resize",ue)});function de(){const l=jt(w.query.rwg_token);l&&I.replace({query:{...w.query,rwg_token:l}})}function ue(){{const l=S.value;l.clientWidth<726?e.isMobileVersion=!0:l.clientWidth<982?(e.isTabletVersion=!0,e.isMobileVersion=!1):(e.isTabletVersion=!1,e.isMobileVersion=!1),l.clientWidth>=1128?e.responsiveClass="cal_servicemenu_widgets-xl":l.clientWidth>=982?e.responsiveClass="cal_servicemenu_widgets-lg":l.clientWidth>=769?e.responsiveClass="cal_servicemenu_widgets-md":e.responsiveClass="cal_servicemenu_widgets-sm"}}function _e(l){R("on-submit",l)}return(l,m)=>{const L=Sa,V=At;return n(),r("div",{id:"cal_servicemenu_widgets",class:U(["hl-app",t(e).responsiveClass]),ref_key:"hlWidget",ref:S,style:G({paddingTop:t(e).isTabletVersion||t(Q)()?"1rem !important":t(e).isMobileVersion?"0rem":"4rem !important",paddingBottom:"1rem !important"})},[t(e).responsiveClass?(n(),r("div",{key:0,class:U(["cal_servicemenu_widgets--inner",{"direct-widget":a.directWidget!=!1,"cal_servicemenu_widgets--inner-wide":x.value===t(p).ADD_SERVICE}])},[x.value===t(p).INITIAL||x.value===t(p).ADD_SERVICE||x.value===t(p).SELECT_GUEST_SERVICES?(n(),r("div",ya,[!t(e).isMobileVersion&&!t(e).isTabletVersion&&x.value===t(p).ADD_SERVICE?(n(),r("div",ba,[O(Ye)])):C("",!0),m[1]||(m[1]=s("hr",{style:{borderLeft:"1px solid #EAECF0"}},null,-1)),s("div",{style:G({width:!t(e).isMobileVersion&&!t(e).isTabletVersion&&x.value===t(p).ADD_SERVICE?"70%":"100%"})},[O(Ps,{"calendar-provider":t(e).calendarProvider,"search-placeholder":"Search Service",groups:a.calendarData.menu,"business-name":a.calendarData.serviceMenu?.businessName,"business-address":a.calendarData.serviceMenu?.businessAddress},null,8,["calendar-provider","groups","business-name","business-address"])],4)])):x.value===t(p).SELECT_USERS?(n(),r("div",wa,[O(tn)])):x.value===t(p).SHOW_SELECTED_SERVICES?(n(),r("div",Ca,[O(Ye)])):x.value===t(p).ADD_GUEST_SERVICES?(n(),r("div",ka,[O(vn)])):x.value===t(p).SELECT_STAFF?(n(),r("div",Ma,[O(Rn)])):x.value===t(p).FORM?(n(),r("div",Da,[O(er)])):x.value===t(p).CONFIRMATION?(n(),r("div",Ea,[O(ur)])):C("",!0),t(e).isLoading?(n(),r("div",$a,[s("div",null,[m[2]||(m[2]=s("img",{src:ys,alt:"close",id:"calendar-img"},null,-1)),s("p",Ia,c(l.$t("scheduling_appointment")),1)])])):x.value===t(p).BOOKING?(n(),pe(qr,{key:8,isForSpecificService:t(e).isForSpecificService,calendarEvent:t(e).calendarEvent,calendarProvider:ye.value,calendarService:K.value,calenderTimezone:t(e).calendarProvider?.timezone,calendarEventId:t(e).eventId,isForCancellation:t(e).isForCancellation,isForReschedule:t(e).isForReschedule,isMobileVersion:t(e).isMobileVersion,isTabletVersion:t(e).isTabletVersion,use24hFormat:t(e).use24hFormat,redirect:a.redirect,funnelPreview:a.funnelPreview,pageUrl:a.pageUrl,urlParams:a.urlParams,baseReferrrer:a.baseReferrrer,stickyContactData:a.stickyContactData,stickyContactFingerprint:a.stickyContactFingerprint,onClearCalendarService:oe,onOnSubmit:_e,"selected-team-member":t(e).selectedStaffMember},null,8,["isForSpecificService","calendarEvent","calendarProvider","calendarService","calenderTimezone","calendarEventId","isForCancellation","isForReschedule","isMobileVersion","isTabletVersion","use24hFormat","redirect","funnelPreview","pageUrl","urlParams","baseReferrrer","stickyContactData","stickyContactFingerprint","selected-team-member"])):C("",!0),(t(e).isMobileVersion?t(e).currentStep!==t(p).ADD_SERVICE&&fe.value:fe.value)?(n(),r("footer",{key:9,class:"widgets-action-buttons service-menu-widget-action-container",style:G({position:t(e).isMobileVersion?t(Q)()?"static":"fixed":"static"})},[m[3]||(m[3]=s("hr",null,null,-1)),t(e).currentStep===t(p).ADD_GUEST_SERVICES&&t(e).guestServicesError?(n(),r("p",xa,c(t(e).guestServicesError),1)):C("",!0),s("div",null,[t(e).currentStep!==t(p).INITIAL&&t(e).currentStep!==t(p).CONFIRMATION?(n(),r("div",{key:0,class:"col-md-4 back-button-container",onClick:m[0]||(m[0]=(...k)=>t(We)&&t(We)(...k))},[s("a",Ta,c(l.$t("back")),1)])):C("",!0),s("div",La,[ce.value?(n(),r("div",{key:0,class:"col-md-4 back-button-container",onClick:se},[s("a",{"aria-label":t(Ge)(l.$t)},c(t(Ge)(l.$t)),9,Ra)])):C("",!0),le.value?(n(),r("div",{key:1,class:U(["col-md-4 continue-button-container",{"continue-button-container-disabled":P.value}]),onClick:q},[t(e).currentStep===t(p).FORM?(n(),r("img",Fa)):C("",!0),s("a",Va,c(t(qt)(l.$t)),1),t(e).currentStep!==t(p).FORM?(n(),r("img",Aa)):C("",!0)],2)):C("",!0)])])],4)):C("",!0),t(e).isMobileVersion&&t(e).
2currentStep===t(p).ADD_SERVICE?(n(),r("footer",{key:10,class:"widgets-action-buttons service-menu-widget-action-container",style:G({paddingBottom:"0rem",position:t(e).isMobileVersion?t(Q)()?"static":"fixed":"static"})},[O(L)],4)):C("",!0)],2)):(n(),r("div",Oa,[O(V)]))],6)}}}),za=Object.assign(Pa,{__name:"PreviewElementsServiceMenusCalendarServicePageMenu"}),Ba={key:0,class:"h-100"},Ya=Z({__name:"[service]",async setup(a){let f,u;const g=tt();let y=g.query.notrack;const{data:i}=([f,u]=De(async()=>Vt("calendarData",async h=>{try{const w=g.name==="appointment-service"||g.name==="cancel-appointment",I=g.query.event_id;if(w)throw be({statusCode:404,statusMessage:"Page not found"});let R;g.params.serviceMenuSlug?R={slug:g.params.serviceMenuSlug}:g.params.serviceMenuId&&(R={serviceMenuId:g.params.serviceMenuId});let S;try{S=await pt.getServiceMenuByIdOrSlug(R)}catch(P){throw be({statusCode:P?.response?.status||500,statusMessage:`Failed to get page data: ${P?.data?.msg||""}`})}const x={menu:Ss(S.menu,P=>({...P,calendars:Gt(P.calendars)})),serviceMenu:S.serviceMenu};if(S?.serviceMenu?.isActive===!1)throw be({statusCode:404,statusMessage:"Page not found"});if(S?.serviceMenu?.deleted===!0)throw be({statusCode:404,statusMessage:"Page not found"});return{calendarData:x}}catch(w){return{error:w}}})),f=await f,u(),f);if(i.value&&i.value.error)throw be({statusCode:404,statusMessage:`${i.value.error?.message}`,fatal:!0});ps(),Oe({script:[{src:"https://stcdn.leadconnectorhq.com/libphonenumber/1.12.41/libphonenumber-js.min.js",async:!0,type:"text/javascript"},{src:"https://stcdn.leadconnectorhq.com/intl-tel-input/17.0.12/js/utils.min.js",async:!0,type:"text/javascript"},{src:"https://stcdn.leadconnectorhq.com/intl-tel-input/intlTelInput.min.js",async:!0,type:"text/javascript"}],meta:[{name:"robots",content:"noindex"}]});const o=Ne({directWidget:!0,urlParams:void 0,url:void 0,referrer:void 0,stickyContactData:void 0,stickyContactFingerprint:void 0});Oe({script:[{src:"https://storage.googleapis.com/builder-preview/iframe/iframeResizer.contentWindow.min.js",async:!0,type:"text/javascript"},{src:"https://storage.googleapis.com/builder-preview/iframe/pixel.js",async:!0,type:"text/javascript"}],style:[{children:`:root { --appointment_widgets-primary-color: ${g.query.color||"#178af6"} !important }`,type:"text/css"}]}),ie(async()=>{vs().enableWebVitals(),await ms(),window.parent.postMessage(["fetch-query-params",window.name||"",i.value?.calendarData?.serviceMenu.locationId],"*"),i.value?.calendarData?.serviceMenu.locationId&&window.parent.postMessage(["fetch-sticky-contacts",i.value.calendarData.serviceMenu.locationId],"*"),o.directWidget=!window||window.self===window.top,y=Wt(g.query),y||(Q()?window.onmessage=h=>{h.data[0]=="query-params"?(_(h.data[2],h.data[3]),o.urlParams=h.data[1],o.url=h.data[2],o.referrer=h.data[3]):h.data[0]=="sticky-contacts"&&(o.stickyContactData=h.data[1],o.stickyContactFingerprint=h.data[2])}:_()),$e(()=>{if(i.value?.calendarData&&i.value?.calendarData.serviceMenu&&i.value?.calendarData.serviceMenu.codeBlock){const h=document.createRange();h.setStart(document.head,0),document.body.appendChild(h.createContextualFragment(i.value.calendarData.serviceMenu.codeBlock))}})});function _(h,w){let I,R;if(g.params.service){const S=i.value.calendarData.services.find(M=>M.slug?.toLowerCase()===g.params.service);S&&(I=S.id,R=S.name)}else I=i.value.calendarData.serviceMenu.id,R=i.value.calendarData.serviceMenu.name;Kt(i.value.calendarData.serviceMenu.locationId,"calendar",I,R,h,w),window.attribution={locationId:i.value.calendarData.serviceMenu.locationId,parentId:I,parentName:R,type:"calendar"}}return(h,w)=>{const I=za;return t(i)?.error?C("",!0):(n(),r("div",Ba,[O(I,{calendarData:t(i).calendarData,directWidget:t(o).directWidget,pageUrl:t(o).url,urlParams:t(o).urlParams,baseReferrrer:t(o).referrer,stickyContactData:t(o).stickyContactData,stickyContactFingerprint:t(o).stickyContactFingerprint},null,8,["calendarData","directWidget","pageUrl","urlParams","baseReferrrer","stickyContactData","stickyContactFingerprint"])]))}}}),vi=Object.freeze(Object.defineProperty({__proto__:null,default:Ya},Symbol.toStringTag,{value:"Module"}));
2export{pt as C,mi as S,ut as _,vi as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.