PageSourceSearch

https://bookings.arcpilates.studio/chunk-WOUDX2G7.js

js arcpilates.studio collected 2026-10-08 02:22:11 UTC 10,115 bytes, 1 lines download raw bytes

1import{a as y}from"./chunk-L6ZDGO35.js";import{c as V,e as A,f as N}from"./chunk-3OBFKMOS.js";import{$a as o,Ib as b,Ka as E,Kb as x,T as h,Ta as d,Ua as m,Xa as v,Y as _,Ya as M,Z as f,Za as S,Zb as T,_a as i,dc as R,eb as C,gb as g,ib as s,ja as u,pb as I,rb as l,sb as p,tb as P,ub as w,vb as O,za as a}from"./chunk-EKCYRXZ4.js";import"./chunk-7CGTOI24.js";var D=(t,r)=>r.id,L=(t,r)=>r.date,$=(t,r)=>r.time+r.instructorId;function F(t,r){t&1&&(i(0,"h2"),l(1,"Appointment updated"),o(),i(2,"p"),l(3,"Your appointment has been moved to the new time. We've emailed you a confirmation."),o())}function B(t,r){t&1&&(i(0,"h2"),l(1,"Request sent"),o(),i(2,"p"),l(3,"Your instructor needs to approve this change before it's confirmed. We'll email you as soon as they respond \u2014 your original appointment stays as-is until then."),o())}function j(t,r){if(t&1){let e=C();i(0,"div",1),d(1,F,4,0)(2,B,4,0),i(3,"button",4),g("click",function(){_(e);let c=s();return f(c.backToDashboard())}),l(4,"Back to dashboard"),o()()}if(t&2){let e=s();a(),m(e.outcome()==="confirmed"?1:2)}}function W(t,r){t&1&&(i(0,"p",2),l(1,"Loading available times\u2026"),o())}function q(t,r){if(t&1&&(i(0,"p",3),l(1),o()),t&2){let e=s();a(),p(e.error())}}function U(t,r){if(t&1){let e=C();i(0,"button",15),g("click",function(){let c=_(e).$implicit,k=s(3);return f(k.selectInstructor(c.id))}),l(1),o()}if(t&2){let e=r.$implicit,n=s(3);I("instructor-pill--selected",n.selectedInstructorId()===e.id),S("disabled",n.loading()),a(),w(" ",e.firstName," ",e.lastName," ")}}function Y(t,r){if(t&1){let e=C();i(0,"div",11)(1,"div",12),l(2,"With"),o(),i(3,"div",13),v(4,U,2,5,"button",14,D),i(6,"button",15),g("click",function(){_(e);let c=s(2);return f(c.selectInstructor(c.ALL))}),l(7," Any teacher "),o()()()}if(t&2){let e=s(2);a(4),M(e.info().eligibleInstructors),a(2),I("instructor-pill--selected",e.isAllSelected()),S("disabled",e.loading())}}function H(t,r){if(t&1&&(i(0,"p",3),l(1),o()),t&2){let e=s(2);a(),p(e.error())}}function G(t,r){t&1&&(i(0,"p",2),l(1,"Loading available times\u2026"),o())}function J(t,r){t&1&&(i(0,"p",2),l(1,"No available times found near this appointment. Please contact the studio to reschedule."),o())}function K(t,r){if(t&1&&(i(0,"span",24),l(1),o()),t&2){let e=s().$implicit;a(),p(e.instructorName)}}function Q(t,r){if(t&1){let e=C();i(0,"button",22),g("click",function(){let c=_(e).$implicit,k=s(4);return f(k.selectSlot(c))}),i(1,"span",23),l(2),b(3,"date"),o(),d(4,K,2,1,"span",24),o()}if(t&2){let e=r.$implicit,n=s(4);I("slot-btn--selected",n.isSlotSelected(e)),a(2),p(x(3,4,e.time,"h:mm a")),a(2),m(n.isAllSelected()?4:-1)}}function X(t,r){if(t&1&&(i(0,"div",17)(1,"div",19),l(2),b(3,"date"),o(),i(4,"div",20),v(5,Q,5,7,"button",21,$),o()()),t&2){let e=r.$implicit;a(2),p(x(3,1,e.date+"T00:00:00","EEEE d MMM")),a(3),M(e.slots)}}function Z(t,r){if(t&1&&(l(0," with "),i(1,"strong"),l(2),o()),t&2){let e=s();a(2),p(e.instructorName)}}function ee(t,r){if(t&1){let e=C();i(0,"div",18)(1,"span"),l(2," Move appointment to "),i(3,"strong"),l(4),b(5,"date"),o(),d(6,Z,3,1),l(7,"? "),o(),i(8,"button",25),g("click",function(){_(e);let c=s(3);return f(c.confirm())}),l(9),o()()}if(t&2){let e=s(3);a(4),p(x(5,4,r.time,"EEE d MMM, h:mm a")),a(2),m(e.isAllSelected()?6:-1),a(2),S("disabled",e.submitting()),a(),P(" ",e.submitting()?"Confirming\u2026":"Confirm change"," ")}}function te(t,r){if(t&1&&(i(0,"div",16),v(1,X,7,4,"div",17,L),o(),d(3,ee,10,7,"div",18)),t&2){let e,n=s(2);a(),M(n.info().days),a(2),m((e=n.selectedSlot())?3:-1,e)}}function ne(t,r){if(t&1&&(i(0,"div",5)(1,"h2",6),l(2,"Change appointment"),o(),i(3,"a",7),l(4,"Cancel"),o()(),i(5,"div",8)(6,"div",9),l(7,"Currently"),o(),i(8,"div",10),l(9),b(10,"date"),o()(),d(11,Y,8,3,"div",11),d(12,H,2,1,"p",3),d(13,G,2,0,"p",2)(14,J,2,0,"p",2)(15,te,4,1)),t&2){let e=s();a(9),O(" ",e.info().sessionTypeName," with ",e.info().instructorName," \xB7 ",x(10,6,e.info().currentStartsAt,"EEE d MMM, h:mm a")," "),a(2),m(e.info().eligibleInstructors.length>1?11:-1),a(),m(e.error()?12:-1),a(),m(e.loading()?13:e.info().days.length===0?14:15)}}var z="ALL",de=(()=>{class t{http=h(R);route=h(V);router=h(A);ALL=z;bookingId="";loading=u(!0);error=u(null);info=u(null);selectedInstructorId=u("");selectedSlot=u(null);submitting=u(!1);outcome=u(null);
1ngOnInit(){this.bookingId=this.route.snapshot.paramMap.get("bookingId")??"",this.load()}load(e){this.loading.set(!0),this.error.set(null),this.selectedSlot.set(null);let n={};e&&(n.instructorId=e),this.http.get(`${y.apiUrl}/client-portal/bookings/${this.bookingId}/reschedule-slots`,{params:n}).subscribe({next:c=>{this.info.set(c),this.selectedInstructorId()||this.selectedInstructorId.set(c.currentInstructorId),this.loading.set(!1)},error:c=>{this.error.set(c?.error?.message??"This appointment can't be rescheduled online right now."),this.loading.set(!1)}})}selectInstructor(e){this.selectedInstructorId()!==e&&(this.selectedInstructorId.set(e),this.load(e))}isAllSelected(){return this.selectedInstructorId()===z}selectSlot(e){let n=this.selectedSlot();this.selectedSlot.set(n?.time===e.time&&n?.instructorId===e.instructorId?null:e)}isSlotSelected(e){let n=this.selectedSlot();return!!n&&n.time===e.time&&n.instructorId===e.instructorId}confirm(){let e=this.selectedSlot();!e||this.submitting()||(this.submitting.set(!0),this.error.set(null),this.http.post(`${y.apiUrl}/client-portal/bookings/${this.bookingId}/reschedule`,{newStartsAt:e.time,instructorId:e.instructorId}).subscribe({next:n=>{this.submitting.set(!1),this.outcome.set(n.requiresApproval?"pending":"confirmed")},error:n=>{this.submitting.set(!1),this.error.set(n?.error?.message??"That slot is no longer available \u2014 please pick another."),this.selectedSlot.set(null),this.load(this.selectedInstructorId())}}))}backToDashboard(){this.router.navigate(["/client/dashboard"])}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=E({type:t,selectors:[["app-client-reschedule"]],decls:5,vars:1,consts:[[1,"reschedule-page"],[1,"outcome-card"],[1,"state-msg"],[1,"state-msg","error"],[1,"btn-primary",3,"click"],[1,"reschedule-header"],[1,"reschedule-heading"],["routerLink","/client/dashboard",1,"btn-secondary"],[1,"current-summary"],[1,"current-label"],[1,"current-value"],[1,"instructor-picker"],[1,"instructor-picker-label"],[1,"instructor-pills"],[1,"instructor-pill",3,"instructor-pill--selected","disabled"],[1,"instructor-pill",3,"click","disabled"],[1,"day-list"],[1,"day-group"],[1,"confirm-bar"],[1,"day-heading"],[1,"slot-grid"],[1,"slot-btn",3,"slot-btn--selected"],[1,"slot-btn",3,"click"],[1,"slot-time"],[1,"slot-instructor"],[1,"btn-primary",3,"click","disabled"]],template:function(n,c){n&1&&(i(0,"div",0),d(1,j,5,1,"div",1)(2,W,2,0,"p",2)(3,q,2,1,"p",3)(4,ne,16,9),o()),n&2&&(a(),m(c.outcome()?1:c.loading()&&!c.info()?2:c.error()&&!c.info()?3:c.info()?4:-1))},dependencies:[N,T],styles:[".reschedule-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}.reschedule-heading[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:#111827}.state-msg[_ngcontent-%COMP%]{color:#6b7280;margin:0}.state-msg.error[_ngcontent-%COMP%]{color:#dc2626}.current-summary[_ngcontent-%COMP%]{background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px;padding:.875rem 1rem;margin-bottom:1.5rem}.current-label[_ngcontent-%COMP%]{font-size:.7rem;text-transform:uppercase;letter-spacing:.03em;color:#9ca3af;font-weight:600;margin-bottom:.2rem}.current-value[_ngcontent-%COMP%]{font-size:.9rem;color:#111827}.instructor-picker[_ngcontent-%COMP%]{margin-bottom:1.5rem}.instructor-picker-label[_ngcontent-%COMP%]{font-size:.7rem;text-transform:uppercase;letter-spacing:.03em;color:#9ca3af;font-weight:600;margin-bottom:.4rem}.instructor-pills[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.instructor-pill[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;padding:.4rem .85rem;border:1px solid #d1d5db;border-radius:999px;background:#fff;font-size:.85rem;color:#374151;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.instructor-pill[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#6366f1;background:#eef2ff;color:#4338ca}.instructor-pill--selected[_ngcontent-%COMP%]{background:#6366f1;border-color:#6366f1;color:#fff}.instructor-pill--selected[_ngcontent-%COMP%]   .instructor-pill-tag[_ngcontent-%COMP%]{color:#ffffffbf}.instructor-pill[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.instructor-pill-tag[_ngcontent-%COMP%]{font-size:.7rem;color:#9ca3af}.day-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem;margin-bottom:5rem}.day-heading[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:#374151;margin-bottom:.5rem}.slot-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.slot-btn[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:.1rem;padding:.4rem .85rem;border:1px solid #d1d5db;border-radius:6px;background:#fff;font-size:.85rem;color:#374151;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.slot-btn[_ngcontent-%COMP%]:hover{border-color:#6366f1;background:#eef2ff;color:#4338ca}.slot-btn--selected[_ngcontent-%COMP%]{background:#6366f1;border-color:#6366f1;color:#fff}.slot-btn--selected[_ngcontent-%COMP%]   .slot-instructor[_ngcontent-%COMP%]{color:#ffffffbf}.slot-instructor[_ngcontent-%COMP%]{font-size:.7rem;color:#9ca3af}.confirm-bar[_ngcontent-%COMP%]{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:.875rem 1rem;box-shadow:0 -2px 12px #0000000f;font-size:.875rem;color:#374151}.outcome-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:1.5rem;text-align:center}.outcome-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1.1rem;color:#111827}.outcome-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#4b5563;font-size:.9rem;margin:0 0 1.25rem}"]})}return t})();export{de as ClientRescheduleComponent};

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.