PageSourceSearch

https://stcdn.leadconnectorhq.com/_preview/BSFb6GKZ.js

js leadconnectorhq.com collected 2026-09-24 07:25:38 UTC 18,005 bytes, 1 lines download raw bytes

1import{a1 as ge,cw as _e,r as k,af as ve,c3 as he,c,eE as fe,eG as we,c_ as x,cF as Ce,a3 as be,cE as C,D as ke,a4 as ye,cC as Me,a0 as xe,Y as Le,M as s,N as r,ag as i,ai as h,ah as e,aA as Te,a5 as l,al as d,am as q,an as De,az as G,aC as He,aE as Ee,aJ as Fe,f as ze,R as Ve,g as Se,_ as Re}from"./CqWH0BZP.js";/* empty css        *//* empty css        */import{s as Ae}from"./DFiheZjC.js";import{a2 as Ie,a3 as Be,a4 as We,i as Ne,a5 as U,j as $e,a as Oe,s as Y,c as Z,C as L}from"./C7_QE1jR.js";import{g as f}from"./RrNCYXFM.js";import{u as Pe,b as je}from"./4smSzVNP.js";import{i as qe,r as Ge}from"./BPzZT6qn.js";import"./DRNKrJGC.js";import"./BoA7liN9.js";import"./D1OHNg6k.js";import"./C3e4t58V.js";import"./DpGxo2Of.js";import"./CRPoBB0N.js";import"./DKeuBCMA.js";const Ue="data:image/svg+xml,%3csvg%20width='88'%20height='70'%20viewBox='0%200%2088%2070'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='42.6455'%20cy='35.168'%20r='34.668'%20fill='%23FFFAEB'/%3e%3ccircle%20cx='6.89368'%20cy='11.3341'%20r='3.25012'%20fill='%23FFF1F3'/%3e%3ccircle%20cx='5.26904'%20cy='61.1694'%20r='4.3335'%20fill='%23FFF1F3'/%3e%3ccircle%20cx='82.73'%20cy='20.0005'%20r='4.3335'%20fill='%23FFF1F3'/%3e%3ccircle%20cx='76.7719'%20cy='5.37543'%20r='2.70844'%20fill='%23FFF1F3'/%3e%3cpath%20d='M47.0466%2044.2408H56.3907M56.3907%2034.1181V29.9132C56.3907%2027.2966%2056.3907%2025.9883%2055.8815%2024.9889C55.4336%2024.1098%2054.7188%2023.3951%2053.8397%2022.9472C52.8403%2022.4379%2051.532%2022.4379%2048.9154%2022.4379H35.8337C33.2171%2022.4379%2031.9088%2022.4379%2030.9094%2022.9472C30.0303%2023.3951%2029.3155%2024.1098%2028.8676%2024.9889C28.3584%2025.9883%2028.3584%2027.2966%2028.3584%2029.9132V42.995C28.3584%2045.6116%2028.3584%2046.9199%2028.8676%2047.9193C29.3155%2048.7984%2030.0303%2049.5131%2030.9094%2049.961C31.9088%2050.4702%2033.2171%2050.4702%2035.8337%2050.4702H43.1532M56.3907%2031.782H28.3584M48.604%2019.3232V25.5526M36.1451%2019.3232V25.5526'%20stroke='%23E62E05'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ye={id:"appointment-widgets-booking--revamp",class:h(["appointment_widgets--revamp--booking"])},Ze={key:0},Ke={key:1,class:"cal-row appointment_widgets--revamp--container"},Je={key:0,class:"appointment_widgets--revamp--info"},Qe={class:"appointment_widgets--revamp--service-info"},Xe=["src"],et={key:1,class:"provider-branding"},tt=["textContent"],nt=["textContent"],ot={class:"appointment_widgets--revamp--booking-info"},it={class:"p-b booking-info--duration"},at={class:"booking-info-value"},st={class:"p-b booking-info--datetime"},rt=["innerHTML"],lt={class:"booking-info-value text-capitalize strike-through"},dt={key:0,class:"p-b booking-info--location"},ct=["innerHTML"],pt={class:"booking-info--location strike-through"},ut={key:1,class:"p-b booking-info--timezone"},mt=["innerHTML"],gt={key:0,class:"booking-info-value strike-through"},_t={key:2,class:"p-b booking-info--description"},vt=["innerHTML"],ht=["innerHTML"],ft=["aria-label"],wt={key:3,class:"p-b booking-info--staff"},Ct={class:"booking-info-value cancel-booking-staff-selection-text"},bt=["innerHTML"],kt={key:0,class:"hl_calendar_widget-cancellation-inner-padding",id:"appointment-widgets--cancellation"},yt={key:0,class:"hl_widget-wrapper"},Mt={key:0,class:"hl_widget-form"},xt={class:"hl_widget-step2"},Lt={class:"hl_form-group"},Tt={class:"cancel-meeting-text"},Dt={for:"cancel-reason-textarea"},Ht={class:"hl_form-name"},Et=["placeholder","aria-label"],Ft={key:1},zt={key:0,class:"appointment_widgets--revamp--booking appointment_widgets--revamp--confirmation"},Vt={class:"widgets-confirmation-icon text-center"},St=["alt"],Rt={class:"confirmation-message"},At={class:"show-all-details appointment_widgets--revamp--booking-info"},It={key:0,class:"p-b booking-info--staff"},Bt=["innerHTML"],Wt={class:"booking-info-value"},Nt={class:"p-b booking-info--duration"},$t={class:"booking-info-value"},Ot={class:"p-b booking-info--datetime"},Pt=["innerHTML"],jt={class:"booking-info-value text-capitalize strike-through"},qt={key:1,class:"p-b booking-info--location"},Gt=["aria-label"],Ut=["innerHTML"],Yt={class:"booking-info--location strike-through"},Zt={key:2,class:"p-b booking-info--timezone"},Kt=["innerHTML"],Jt={key:0,class:"booking-info-value strike-through"},Qt={key:1,class:"cal-row widgets-action-buttons"},Xt=["disabled"],en={key:0,class:"appointment_widgets--revamp--booking appointment--widgets-loading-container"},tn=["innerHTML"],nn=ge({__name:"cancel-bookingV2",async setup(on){let T,A;Pe(je);const w=_e(),I=ze();k();const g=k(!1),K=k(null),B=k(!1);let W;const{t:p,locale:an,setLocale:J}=ve(),Q=k("en"),b=k(!0),t=he({step:1,cancelReason:"",eventId:void 0,isMobileVersion:!0,isTabletVersion:!1,responsiveClass:"",selectedStaffMember:void 0,appointment:{},widgetConfiguration:{showCalendarTitle:!0,showCalendarDescription:!0,showCalendarDetails:!0},calendar:{widget_logo:{url:""},name:"calendar-name"},calendarProvider:{},showAllBookingDetails:!0}),E=k(),F=()=>{const o=document.querySelector("#calendar-widget-desc");if(o){const n=o.scrollHeight>o.clientHeight;B.value=n}},X=c(()=>qe(w.query)),ee=c(()=>fe(we.map(o=>{const n=x().tz(o);return{label:`GMT${n.format("Z")} ${o} (${n.format("z")})`,sortFormat:`GMT${n.format("Z")}`,value:o,currentTime:n.format(ae.value),utcOffset:n.utcOffset()}}),"utcOffset")),te=c(()=>["appointment_widgets--revamp--steps default-form",{"selected-date":!b.value},{"full-width":!D.value}]),_=c(()=>{const o=t.calendar?.widget_config;return o?{...o?.primarySettings,default:o?.default??!0}:{}}),D=c(()=>t.step===2?!1:Ce(_.value)?!0:_.value?.showCalendarTitle||_.value?.showCalendarDescription&&t.calendar?.description||_.value?.showCalendarDetails),ne=c(()=>!!t.calendar?.widget_logo?.url),oe=c(()=>t.appointment?x(t.appointment.start_time).tz(t.appointment.selected_timezone).format("ddd, MMMM D, hh:mm A"):""),ie=c(()=>t.appointment?x(t.appointment.end_time).tz(t.appointment.selected_timezone).format("ddd, MMMM D, hh:mm A"):""),H=c(()=>t.appointment?.address==="generating gmeet link"?"":t.appointment?.address),y=c(()=>ee.value.find(o=>
1o.value===t.appointment.selected_timezone)),ae=c(()=>t.calendar?.use24hFormat?"HH:mm":"hh:mm A"),N=c(()=>!t.isTabletVersion&&!t.isMobileVersion),se=c(()=>_?.value?.showCalendarDescription?N.value&&_.value?.showCalendarDescription&&t.calendar.description:!1),re=c(()=>_?.value?.showCalendarDescription?!N.value&&_.value?.showCalendarDescription&&t.calendar.description:!1),le=c(()=>{const o=t.calendar?.team_members?.filter(n=>n.full_name).map(n=>({text:n.full_name,value:n.user_id,img:n.profile_photo||"",profileColor:Ie(n.full_name)}));return o?.length===1?o:[{text:p("choose_any_staff"),value:-1}].concat(o)}),z=c(()=>t.calendar.enable_staff_selection),$=c(()=>{const o=t.appointment?.end_time;if(o)return x(o).format("ddd, MMM D, YYYY")}),O=c(()=>{const o=Be(oe.value,ie.value,t.calendar?.use24hFormat);return!o||!$.value?"":`${o}, ${$.value}`}),P=()=>{F()};be(async()=>{await Ae(),t.appointment=u.value?.calendarEvent||{},t.appointment.start_time=j(t.appointment.start_time),t.appointment.end_time=j(t.appointment.end_time);const o=t.appointment?.calendar_id;if(o===void 0)throw C({statusCode:404,statusMessage:"Calendar Id not found"});try{const a=await ce(o);t.calendar=a[o]?.calendar,t.calendarProvider=a[o]?.provider?._data||{},delete a[o].calendar}catch{}t.selectedStaffMember=le.value?.find(a=>
1a?.value===t.appointment.assigned_user_id),b.value=!1,Q.value=u.value?.locale,pe(),V(),window.addEventListener("resize",V);const n=u.value?.locale||"en";await J(n),ke(()=>{const a=document.querySelector("#calendar-widget-desc");a&&(F(),W=new MutationObserver(F),W.observe(a,{childList:!0,subtree:!0,characterData:!0})),window.addEventListener("resize",P)})}),ye(()=>{window.removeEventListener("resize",V),window.removeEventListener("resize",P)});function j(o){return typeof o=="object"&&o?._seconds?x.unix(o._seconds):x(o)}function de(){const o=Ve(),n=!!o&&!0;return{...Se(),...n?{origin:o}:{}}}async function ce(o){const n=`${I.public.newBaseURL}/appointment/widget?calendarId=${o}`;return await $fetch(n)}function V(){{const o=E.value;o.clientWidth<726?t.isMobileVersion=!0:o.clientWidth<982?(t.isTabletVersion=!0,t.isMobileVersion=!1):(t.isTabletVersion=!1,t.isMobileVersion=!1),o.clientWidth>=1128?t.responsiveClass="appointment_widgets-xl--revamp":o.clientWidth>=982?t.responsiveClass="appointment_widgets-lg--revamp":o.clientWidth>=726?t.responsiveClass="appointment_widgets-md--revamp":t.responsiveClass="appointment_widgets-sm--revamp"}}function pe(){const o=E.value;if(o){const n=parseInt(o.scrollHeight);window.parent.postMessage(["highlevel.setHeight",{height:n>500?n+50:560,id:"msgsndr-calendar"}],"*")}}const{data:u}=([T,A]=Me(async()=>xe("cancelData",async o=>{if(!w.query.event_id)throw C({statusCode:404,statusMessage:"Appointment Id not found"});try{let n={},a;const v=w.query.eventId||w.query.event_id;if(!v)throw C({statusCode:500,statusMessage:"Event not found"});try{if(a=await $fetch(I.public.REST_API_URLS+"/calendars/appointment/"+v,{headers:de()}),a?.deleted??a?._data?.deleted)throw C({statusCode:404,statusMessage:"Failed to get event details"});const m=We(a);if(Ne({start_time:m.start_time,selected_timezone:m.selected_timezone},m.cancellationPreference))throw C({statusCode:404,statusMessage:"Cancellation Link Expired",fatal:!0,data:{errorMessage:"Cancellations are not allowed at this time. Contact us for assistance."}})}catch(m){throw m?.statusCode===404?C({statusCode:404,statusMessage:m?.message,data:m?.data}):C({statusCode:m?.response?.status||500,statusMessage:`Failed to get appointment data: ${m?.data?.msg||""}`,data:m?.data})}return a&&(a._id||Object.keys(a).length>0)&&(n=a._id?{id:a._id||v,...a._data,isLoading:!1}:{id:v,...a,selected_timezone:a.selected_timezone??a.timezone,isLoading:!1}),{isLoading:!1,calendarEvent:n,locale:a?.locale}}catch(n){return{error:n}}})),T=await T,A(),T);if(u.value&&u.value.error)throw C({statusCode:404,statusMessage:`${u.value.error?.message}`,fatal:!0,data:u.value.error?.data});t.eventId=w.query.event_id,t.popup=w.query.popup;async function ue(){b.value=!0;const o=u.value?.calendarEvent?.id||t.eventId||w.query?.event_id;try{await $e.cancelEvent(o,t.cancelReason,Ge(w.query,"booking_widget")),t.step++,b.value=!1}catch{b.value=!1}}const me=o=>{let n;const a=o?.widget_config;a&&(n={...a?.primarySettings,default:a?.default});const v=o?.feature_flags?.revampedWidgetDesign,m=n?.default??!0,S=document?.documentElement;if(n&&!m){const R=Oe(n?.backgroundColor);let M=Z(R?v?L.DARK:L.DARK_OLD:v?L.LIGHT:L.LIGHT_OLD);v&&(n?.primaryColor.length===9&&(M.lightPrimaryColor=n?.primaryColor.substring(0,n?.primaryColor.length-2)+"12"),n?.backgroundColor.length===7&&(M.blurColor=n?.backgroundColor+"b3"),n?.backgroundColor.length===9&&(M.blurColor=n?.backgroundColor.substring(0,n?.backgroundColor.length-2)+"b3")),M.primaryColor=n?.primaryColor,M.backgroundColor=n?.backgroundColor,Y(M,S,v,!0)}else{let R=Z(v?L.DEFAULT:L.DEFAULT_OLD);Y(R,S,!0,!0)}};return Le(()=>t.calendar,o=>{o&&me(o)}),(o,n)=>(s(),r(Fe,null,[i("div",{id:"appointment_widgets--revamp",class:h(["hl-app",[e(t).responsiveClass,{"appointment_widgets--revamp--client-portal":e(X)}]]),ref_key:"hlWidget",ref:E},[i("div",{class:h(["appointment_widgets--revamp--inner direct-widget",{overflow:e(z)}])},[i("div",Ye,[e(b)?(s(),r("div",Ze)):(s(),r("div",Ke,[i("div",{class:h(["appointment_widgets--revamp--info-container",{show:e(D)}])},[i("div",{class:h(["appointment_widgets--revamp--navigation-container",{"full-width":!e(D)}])},null,2),e(D)?(s(),r("div",Je,[i("div",Qe,[e(ne)?(s(),r("img",{key:0,class:"appointment_widgets--revamp--neo-calendar-logo",src:e(t).calendar.widget_logo.url||"",alt:"Calendar logo",style:Te(e(t).calendar?.widget_logo?.shape==="round"?{borderRadius:"50%"}:"")},null,12,Xe)):l("",!0),e(t)?.calendarProvider?.calendar_provider_name?(s(),r("div",et,[i("h6",{class:"provider-name",textContent:d(e(t)?.calendarProvider?.calendar_provider_name||e(t)?.calendarProvider?.calendarProviderName||"")},null,8,tt)])):l("",!0),e(_)?.showCalendarTitle??!0?(s(),r("h4",{key:2,class:"widgets--service-name",textContent:d(e(t).calendar?.name)},null,8,nt)):l("",!0)]),i("div",null,[i("div",{class:h(["appointment-widgets-service-booking-info",{"show-detail
1s-container":e(t)?.showAllBookingDetails,hide:!e(_)?.showCalendarDetails}])},[i("div",ot,[i("div",it,[n[4]||(n[4]=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 25 25",fill:"none"},[i("path",{d:"M12.5 6.5V12.5L16.5 14.5M22.5 12.5C22.5 18.0228 18.0228 22.5 12.5 22.5C6.97715 22.5 2.5 18.0228 2.5 12.5C2.5 6.97715 6.97715 2.5 12.5 2.5C18.0228 2.5 22.5 6.97715 22.5 12.5Z",stroke:"var(--appointment_widgets-light-text-color)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),i("div",at,d(e(U)(e(t).calendar.slot_duration)),1)]),i("div",st,[i("div",{class:"calendar-meeting-icon",innerHTML:e(f)({svgName:"calendar",color:"var(--appointment_widgets-light-text-color)"})},null,8,rt),i("div",lt,[i("span",null,d(e(O)),1)])]),e(H)?(s(),r("div",dt,[i("div",{class:"calendar-meeting-icon",innerHTML:e(f)({svgName:"meetingLocation",color:"var(--appointment_widgets-light-text-color)"})},null,8,ct),i("div",pt,d(e(H)),1)])):l("",!0),e(y)?(s(),r("div",ut,[i("div",{class:"calendar-meeting-icon",innerHTML:e(f)({svgName:"timezone",color:"var(--appointment_widgets-light-text-color)"})},null,8,mt),e(u)?.calendarEvent?.selected_timezone?(s(),r("div",gt,d(e(y).value)+" ("+d(e(y).sortFormat)+") ",1)):l("",!0)])):l("",!0),e(re)?(s(),r("div",_t,[i("div",{innerHTML:e(f)({svgName:"description",color:"var(--appointment_widgets-light-text-color)"})},null,8,vt),i("div",{class:h(["calendar-description",{"show-more":!e(g)}])},[i("div",{innerHTML:e(t).calendar.description,ref_key:"descriptionContainer",ref:K,id:"calendar-widget-desc",class:h({description:!e(g)})},null,10,ht),e(B)?(s(),r("div",{key:0,class:"show-more-description",role:"button",tabindex:"0","aria-label":e(g)?e(p)("show_less"):e(p)("show_more"),onClick:n[0]||(n[0]=a=>g.value=!e(g)),onKeydown:[n[1]||(n[1]=q(a=>g.value=!e(g),["enter"])),n[2]||(n[2]=q(De(a=>g.value=!e(g),["prevent"]),["space"]))]},d(e(g)?e(p)("show_less"):e(p)("show_more")),41,ft)):l("",!0)],2)])):l("",!0),e(z)?(s(),r("div",wt,[n[5]||(n[5]=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 25 25",fill:"none"},[i("path",{d:"M20.5 21.5C20.5 20.1044 20.5 19.4067 20.3278 18.8389C19.94 17.5605 18.9395 16.56 17.6611 16.1722C17.0933 16 16.3956 16 15 16H10C8.60444 16 7.90665 16 7.33886 16.1722C6.06045 16.56 5.06004 17.5605 4.67224 18.8389C4.5 19.4067 4.5 20.1044 4.5 21.5M17 8C17 10.4853 14.9853 12.5 12.5 12.5C10.0147 12.5 8 10.4853 8 8C8 5.51472 10.0147 3.5 12.5 3.5C14.9853 3.5 17 5.51472 17 8Z",stroke:"var(--appointment_widgets-primary-color)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),i("div",Ct,d(e(t).selectedStaffMember?.text),1)])):l("",!0)])],2)]),e(se)?(s(),r("div",{key:0,class:h(["widgets--service-description"]),innerHTML:e(t).calendar.description},null,8,bt)):l("",!0)])):l("",!0)],2),i("div",{class:h(e(te))},[e(t).step===1?(s(),r("div",kt,[e(u)?.isLoading?l("",!0):(s(),r("div",yt,[Object.keys(e(u)?.calendarEvent??{}).length?(s(),r("div",Mt,[G(i("div",xt,[i("div",Lt,[i("div",Tt,d(e(p)("cancel_meeting")),1),i("label",Dt,d(e(p)("cancellation_reason")),1),i("div",Ht,[G(i("textarea",{id:"cancel-reason-textarea","onUpdate:modelValue":n[3]||(n[3]=a=>e(t).cancelReason=a),class:"hl_cancellation_textarea",rows:"5",style:{resize:"none"},placeholder:e(p)("cancellation_reason_placeholder"),"aria-label":e(p)("cancellation_reason")},null,8,Et),[[Ee,e(t).cancelReason]])])])],512),[[He,e(t).step===1]])])):(s(),r("div",Ft,d(e(p)("no_calendar_event_found")),1))]))])):l("",!0)],2),e(t).step===2?(s(),r("div",zt,[i("div",null,[i("div",Vt,[i("div",null,[i("img",{src:Ue,alt:e(p)("cancellation")||"Cancellation"},null,8,St)])]),i("h5",Rt,d(e(p)("your_appointment_has_been_cancelled")),1),i("div",At,[e(z)?(s(),r("div",It,[i("div",{innerHTML:e(f)({svgName:"staff",color:"var(--appointment_widgets-light-text-color)"})},null,8,Bt),i("div",Wt,d(e(t).selectedStaffMember?.text),1)])):l("",!0),i("div",Nt,[n[6]||(n[6]=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 25 25",fill:"none"},[i("path",{d:"M12.5 6.5V12.5L16.5 14.5M22.5 12.5C22.5 18.0228 18.0228 22.5 12.5 22.5C6.97715 22.5 2.5 18.0228 2.5 12.5C2.5 6.97715 6.97715 2.5 12.5 2.5C18.0228 2.5 22.5 6.97715 22.5 12.5Z",stroke:"var(--appointment_widgets-light-text-color)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),i("div",$t,d(e(U)(e(t).calendar.slot_duration)),1)]),i("div",Ot,[i("div",{innerHTML:e(f)({svgN
1ame:"calendar",color:"var(--appointment_widgets-light-text-color)"})},null,8,Pt),i("div",jt,[i("span",null,d(e(O)),1)])]),e(H)?(s(),r("div",qt,[i("div",{class:"booking-info--label",role:"img","aria-label":e(p)("meeting_location")||"Meeting location"},[i("div",{innerHTML:e(f)({svgName:"meetingLocation",color:"var(--appointment_widgets-light-text-color)"})},null,8,Ut)],8,Gt),i("div",Yt,d(e(H)),1)])):l("",!0),e(y)?(s(),r("div",Zt,[i("div",{innerHTML:e(f)({svgName:"timezone",color:"var(--appointment_widgets-light-text-color)"})},null,8,Kt),e(u)?.calendarEvent?.selected_timezone?(s(),r("div",Jt,d(e(y).value)+" ("+d(e(y).sortFormat)+") ",1)):l("",!0)])):l("",!0)])])])):l("",!0),e(t).step==1?(s(),r("footer",Qt,[i("button",{id:"cancel-appointment-button",class:"hl_button cancel-booking-action-btn",disabled:e(u)?.isLoading||!e(t).cancelReason,onClick:ue},d(e(p)("cancel_appointment")),9,Xt)])):l("",!0)]))])],2)],2),e(b)?(s(),r("div",en,[i("div",{class:"calendar-cancellation-ellipsis-loader",innerHTML:e(f)({svgName:"ellipsisLoader",color:"var(--appointment_widgets-text-color)"})},null,8,tn)])):l("",!0)],64))}}),bn=Re(nn,[["__scopeId","data-v-f31d8ae6"]]);export{bn as default};

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.