PageSourceSearch

https://www.stoppeddown.studio/_next/static/immutable/chunks/0cg4athjywbzm.js

js stoppeddown.studio collected 2026-10-07 04:42:59 UTC 118,209 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,532658,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(618566);let i="https://meet.google.com/pbf-qqzt-tdn";var r=e.i(451982),n=e.i(888860),l=e.i(61103),o=e.i(940327),d=e.i(959796),c=e.i(700616);let u=[{value:"photography",label:"Photography",desc:"Session questions?",icon:"📷"},{value:"personal",label:"Personal",desc:"Hiii!",icon:"☕"},{value:"something_else",label:"Something Else",desc:"What you got?",icon:"🤔"}],h=["Su","Mo","Tu","We","Th","Fr","Sa"],m="sds_schedule";function p(){localStorage.removeItem(m)}function f(e){let[a,t]=e.split(":").map(Number);return`${0===a?12:a>12?a-12:a}:${String(t).padStart(2,"0")} ${a>=12?"PM":"AM"}`}function g(e){let[a,t,s]=e.split("-").map(Number);return new Date(a,t-1,s).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}e.s(["default",0,function({initialName:e,initialEmail:b,initialMeetingType:y,isModal:v=!1,onComplete:x}={}){let j=(0,s.useSearchParams)(),N="privacy"===j.get("type"),k=(0,t.useRef)(!1),w=(0,t.useRef)(!1),C=(0,t.useRef)(!1),[S,_]=(0,t.useState)(y?"date":"type"),[I,P]=(0,t.useState)(y||null),[D,T]=(0,t.useState)(30),[F,E]=(0,t.useState)(new Set),[$,L]=(0,t.useState)(!1),[A,R]=(0,t.useState)(null),[M,O]=(0,t.useState)([]),[K,U]=(0,t.useState)(!1),[B,q]=(0,t.useState)(null),[Y,G]=(0,t.useState)(()=>{let e=new Date;return{year:e.getFullYear(),month:e.getMonth()}}),[W,H]=(0,t.useState)(0),[V,z]=(0,t.useState)(e||""),[J,Z]=(0,t.useState)(b||""),[Q,X]=(0,t.useState)(""),[ee,ea]=(0,t.useState)(""),[et,es]=(0,t.useState)(""),[ei,er]=(0,t.useState)({}),[en,el]=(0,t.useState)(!1),[eo,ed]=(0,t.useState)(""),[ec,eu]=(0,t.useState)(null),[eh,em]=(0,t.useState)(""),ep=(0,t.useRef)(Date.now());(0,t.useEffect)(()=>{let a=function(){try{let e=localStorage.getItem(m);if(!e)return null;let a=JSON.parse(e);if(Date.now()-a.savedAt>864e5||"confirmed"===a.step)return localStorage.removeItem(m),null;return a}catch{return null}}();if(a&&!y&&!e&&!b){if(k.current=!0,a.step&&_(a.step),a.meetingType&&P(a.meetingType),a.duration&&T(a.duration),a.selectedDate){R(a.selectedDate);let[e,t]=a.selectedDate.split("-").map(Number);G({year:e,month:t-1})}a.selectedSlot&&q(a.selectedSlot),a.maxStep&&H(a.maxStep),a.name&&z(a.name),a.email&&Z(a.email),a.phone&&X(a.phone),a.note&&es(a.note)}},[]),(0,t.useEffect)(()=>{if(w.current)return;let e=j.get("type");"privacy"===e?(w.current=!0,p(),P("privacy"),_("info")):"photography"!==e||y||C.current||(C.current=!0,P("photography"),_("date"))},[j,y]);let ef="privacy"===I?"type"===S?0:"info"===S?1:2:"type"===S?0:"date"===S?1:"info"===S?2:3;(0,t.useEffect)(()=>{H(e=>Math.max(e,ef))},[ef]),(0,t.useEffect)(()=>{if(v)return;if("confirmed"===S)return void p();let e={meetingType:I,duration:D,selectedDate:A,selectedSlot:B,name:V,email:J,phone:Q,note:et,step:S,maxStep:W,savedAt:Date.now()};localStorage.setItem(m,JSON.stringify(e))},[v,S,I,D,A,B,V,J,Q,et,W]);let eg=(0,t.useCallback)(async(e,a)=>{L(!0);try{let t=(await (0,l.getChatDates)(e)).dates||[];E(new Set(t)),a&&t.includes(a)?R(a):t.length>0&&R(t[0])}catch{E(new Set)}L(!1)},[]);function eb(e){_(e),v||window.scrollTo({top:0,behavior:"smooth"})}function ey(e){P(e),eb("privacy"===e?"info":"date")}function ev(e){return(0,d.isValidEmail)(e)}function ex(e){return(0,c.stripPhoneDigits)(e).length>=10}async function ej(){if(function(){let e={};if((!V.trim()||V.trim().length<2)&&(e.name="Name is required"),"privacy"===I){let a=ee.trim();a&&(ev(a)||ex(a))||(e.contact="Valid email or phone number is required")}else J.trim()&&ev(J.trim())||(e.email="Valid email is required"),(0,c.stripPhoneDigits)(Q).length<10&&(e.phone="Valid phone number is required");return et.length>500&&(e.note="Note must be under 500 characters"),er(e),0===Object.keys(e).length}()&&I&&("privacy"===I||A&&B)){el(!0),ed("");try{let e;try{e=await (0,l.chatBook)({meetingType:I,duration:"privacy"===I?0:D,date:A||void 0,time:B||void 0,name:V.trim(),email:"privacy"===I?ev(ee.trim())?ee.trim():void 0:J.trim(),phone:"privacy"===I?ex(ee.trim())?ee.trim():void 0:Q.trim(),note:et.trim()||null,website:eh,loadTime:ep.current})}catch(e){if(e instanceof o.ApiError){let a=e.body;ed(a?.error||"Something went wrong. Please try again."),el(!1);return}throw e}eu(e.scheduledAt||null),x?x():eb("confirmed")}catch{ed("Something went wrong. Please try again.")}finally{el(!1)}}}(0,t.useEffect)(()=>{"date"===S&&(k.current?(k.current=!1,eg(D,A)):eg(D))},[S,D,eg]),(0,t.useEffect)(()=>{A&&(U(!0),(0,l.getChatSlots)(A,D).then(e=>{let a=e.slots||[];O(a),q(e=>e&&a.includes(e)?e:null)}
1).catch(()=>O([])).finally(()=>U(!1)))},[A,D]);let eN="privacy"===I?["type","info"]:["type","date","info"];if("confirmed"===S){if("privacy"===I)return(0,a.jsx)("div",{className:"schedule-container",children:(0,a.jsxs)("div",{className:"schedule-confirmation",children:[(0,a.jsx)("div",{className:"schedule-confirmation-icon",children:"✓"}),(0,a.jsx)("h2",{children:(0,a.jsx)(r.default,{contentKey:"chat.privacy.confirmed.heading",page:"chat",children:"Got it"})}),(0,a.jsx)("p",{className:"schedule-confirmation-details",children:(0,a.jsx)(r.default,{contentKey:"chat.privacy.confirmed.body",page:"chat",children:"I’ll review your request and be in touch shortly."})}),ev(ee.trim())&&(0,a.jsxs)("p",{className:"schedule-confirmation-note",children:[(0,a.jsx)(r.default,{contentKey:"chat.confirmed.confirmationSent",page:"chat",children:"A confirmation was sent to"})," ",ee.trim(),"."]})]})});let e=u.find(e=>e.value===I)?.label||"Meeting",t=encodeURIComponent(`${e} Meeting\u2014Adam Rubinstein`),s=ec?new Date(ec):new Date,n=new Date(s.getTime()+6e4*D),l=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),o=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${t}&dates=${l(s)}/${l(n)}&location=${encodeURIComponent(i)}&details=${encodeURIComponent(`Google Meet: ${i}`)}`;return(0,a.jsx)("div",{className:"schedule-container",children:(0,a.jsxs)("div",{className:"schedule-confirmation",children:[(0,a.jsx)("div",{className:"schedule-confirmation-icon",children:"✓"}),(0,a.jsx)("h2",{children:(0,a.jsx)(r.default,{contentKey:"chat.confirmed.heading",page:"chat",children:"You’re all set"})}),(0,a.jsxs)("div",{className:"schedule-confirmation-details",children:[(0,a.jsxs)("strong",{children:[e," meeting"]}),(0,a.jsx)("br",{}),A&&g(A),(0,a.jsx)("br",{}),B&&f(B)," · ",D," minutes"]}),(0,a.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"schedule-confirmation-meet",children:(0,a.jsx)(r.default,{contentKey:"chat.confirmed.meetLink",page:"chat",children:"Google Meet Link"})}),(0,a.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"schedule-confirmation-calendar",children:(0,a.jsx)(r.default,{contentKey:"chat.confirmed.addCalendar",page:"chat",children:"Add to Google Calendar"})}),(0,a.jsxs)("p",{className:"schedule-confirmation-note",children:[(0,a.jsx)(r.default,{contentKey:"chat.confirmed.confirmationSent",page:"chat",children:"A confirmation was sent to"})," ",J.trim(),"."]})]})})}return(0,a.jsxs)("div",{className:"schedule-container",children:[!v&&("privacy"===I||N?(0,a.jsx)("h1",{className:"schedule-heading",children:"Data & Privacy"},"privacy"):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"schedule-heading",children:(0,a.jsx)(r.default,{contentKey:"chat.page.heading",page:"chat",children:"Hit me up"})},"default"),(0,a.jsx)("p",{className:"schedule-subheading",children:(0,a.jsx)(r.default,{contentKey:"chat.page.subheading",page:"chat",children:"Pick a time and I’ll send you a Google Meet link."})})]})),"type"===S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"schedule-duration",children:(0,a.jsxs)("div",{className:"schedule-duration-toggle",children:[(0,a.jsx)("button",{type:"button",className:`schedule-duration-btn${15===D?" active":""}`,onClick:()=>T(15),children:(0,a.jsx)(r.default,{contentKey:"chat.duration.15min",page:"chat",children:"15 min"})}),(0,a.jsx)("button",{type:"button",className:`schedule-duration-btn${30===D?" active":""}`,onClick:()=>T(30),children:(0,a.jsx)(r.default,{contentKey:"chat.duration.30min",page:"chat",children:"30 min"})})]})}),(0,a.jsx)("div",{className:"schedule-type-cards",children:u.map(e=>(0,a.jsxs)("button",{type:"button",className:"schedule-type-card",onClick:()=>ey(e.value),children:[(0,a.jsx)("span",{className:"schedule-type-icon",children:e.icon}),(0,a.jsx)("div",{className:"schedule-type-name",children:e.desc})]},e.value))}),(0,a.jsx)("button",{type:"button",className:"schedule-privacy-card",onClick:()=>ey("privacy"),children:(0,a.jsx)(r.default,{contentKey:"chat.privacy.cardLabel",page:"chat",children:"Questions about your data? Get in touch."})})]}),(0,a.jsx)("div",{className:"schedule-steps",children:eN.map((e,t)=>{let s=t<=W&&t!==ef;return(0,a.jsx)("button",{type:"button",className:`schedule-step-dot${t===ef?" active":""}${t<ef?" completed":""}${s?" clickable":""}`,onClick:()=>s&&void(t!==ef&&!(t>W)&&eb(eN[t])),"aria-label":`Step ${t+1}${s?" (click to go back)":""}`,tabIndex:s?0:-1},t)}
1)}),"date"===S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"schedule-pair",children:[$?(0,a.jsx)("div",{className:"schedule-slots-loading",children:(0,a.jsx)(r.default,{contentKey:"chat.date.loadingAvailability",page:"chat",children:"Loading availability…"})}):(0,a.jsx)("div",{className:"date-picker",children:function(){let{year:e,month:t}=Y,s=new Date(e,t,1).getDay(),i=new Date(e,t+1,0).getDate(),r=new Date,n=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,l=new Date(e,t).toLocaleDateString("en-US",{month:"long",year:"numeric"}),o=new Date,d=e>o.getFullYear()||e===o.getFullYear()&&t>o.getMonth(),c=new Date(o.getTime()+26784e5),u=e<c.getFullYear()||e===c.getFullYear()&&t<c.getMonth(),m=[];for(let e=0;e<s;e++)m.push(null);for(let a=1;a<=i;a++){let s=`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`;m.push({day:a,dateStr:s,available:F.has(s),isToday:s===n})}return(0,a.jsxs)("div",{className:"schedule-calendar",children:[(0,a.jsxs)("div",{className:"schedule-calendar-header",children:[(0,a.jsx)("span",{className:"schedule-calendar-month",children:l}),(0,a.jsxs)("div",{className:"schedule-calendar-nav",children:[(0,a.jsx)("button",{type:"button",disabled:!d,onClick:()=>G(e=>{let a=new Date(e.year,e.month-1);return{year:a.getFullYear(),month:a.getMonth()}}),"aria-label":"Previous month",children:"‹"}),(0,a.jsx)("button",{type:"button",disabled:!u,onClick:()=>G(e=>{let a=new Date(e.year,e.month+1);return{year:a.getFullYear(),month:a.getMonth()}}),"aria-label":"Next month",children:"›"})]})]}),(0,a.jsx)("div",{className:"schedule-weekdays",children:h.map(e=>(0,a.jsx)("span",{children:e},e))}),(0,a.jsx)("div",{className:"schedule-days",children:m.map((e,t)=>{if(!e)return(0,a.jsx)("span",{className:"schedule-day empty"},`empty-${t}`);let s=["schedule-day",e.available?"available":"",e.dateStr===A?"selected":"",e.isToday?"today":""].filter(Boolean).join(" ");return(0,a.jsx)("button",{type:"button",className:s,disabled:!e.available,onClick:()=>e.available&&R(e.dateStr),"aria-label":`${e.available?"Available":"Unavailable"}: ${g(e.dateStr)}`,children:e.day},e.dateStr)})})]})}()}),(0,a.jsx)("div",{className:"time-slot-picker",children:A?K?(0,a.jsx)("div",{className:"schedule-slots-loading",children:(0,a.jsx)(r.default,{contentKey:"chat.date.loadingTimes",page:"chat",children:"Loading times…"})}):0===M.length?(0,a.jsx)("div",{className:"schedule-no-slots",children:(0,a.jsx)(r.default,{contentKey:"chat.date.noSlots",page:"chat",children:"Already full up, sorry."})}):(0,a.jsx)("div",{className:"schedule-slots-grid",children:M.map(e=>(0,a.jsx)("button",{type:"button",className:`schedule-slot${B===e?" selected":""}`,onClick:()=>q(e),children:f(e)},e))}):(0,a.jsx)("p",{className:"time-slot-empty text-muted",children:(0,a.jsx)(r.default,{contentKey:"chat.date.selectDatePrompt",page:"chat",children:"Select a date to see available times"})})})]}),(0,a.jsxs)("div",{className:"schedule-nav",children:[(0,a.jsx)("button",{type:"button",className:"btn-ghost small",onClick:()=>eb("type"),children:(0,a.jsx)(r.default,{contentKey:"chat.nav.back",page:"chat",children:"Back"})}),(0,a.jsx)("button",{type:"button",className:"btn-primary small",disabled:!A||!B,onClick:function(){A&&B&&eb("info")},children:(0,a.jsx)(r.default,{contentKey:"chat.nav.next",page:"chat",children:"Next"})})]})]}),"info"===S&&(0,a.jsxs)(a.Fragment,{children:["privacy"!==I&&(0,a.jsx)("div",{className:"schedule-summary",children:(0,a.jsxs)("div",{className:"schedule-summary-inner",children:[(0,a.jsxs)("div",{className:"schedule-summary-row",children:[(0,a.jsx)("span",{className:"schedule-summary-label",children:(0,a.jsx)(r.default,{contentKey:"chat.summary.whatsUp",page:"chat",children:"What’s up"})}),(0,a.jsx)("span",{className:"schedule-summary-value",children:u.find(e=>e.value===I)?.label})]}),(0,a.jsxs)("div",{className:"schedule-summary-row",children:[(0,a.jsx)("span",{className:"schedule-summary-label",children:(0,a.jsx)(r.default,{contentKey:"chat.summary.date",page:"chat",children:"Date"})}),(0,a.jsx)("span",{className:"schedule-summary-value",children:A&&g(A)})]}),(0,a.jsxs)("div",{className:"schedule-summary-row",children:[(0,a.jsx)("span",{className:"schedule-summary-label",children:(0,a.jsx)(r.default,{contentKey:"chat.summary.time",page:"chat",children:"Time"})}),(0,a.jsxs)("span",{className:"schedule-summary-value",children:[B&&f(B)," · ",D," min"]})]})]})}),"privacy"===I&&(0,a.jsx)("div",{className:"schedule-privacy-context",children:(0,a.jsx)(r.default,{contentKey:"chat.privacy.context",page:"chat",tag:"div",children:(0,a.jsx)("p",{children:"I take data privacy very seriously and what’s yours is yours. If you need to access, correct, or delete your data, please reach out below and I’ll respond as quickly as possible. If you’re an existing client, include the email or phone associated with your account so I can locate your records."})})}),(0,a.jsxs)("div",{className:"schedule-form",children:[(0,a.jsxs)("div",{className:"schedule-field",children:[(0,a.jsxs)("label",{htmlFor:"schedule-name",children:[(0,a.jsx)(r.default,{contentKey:"chat.form.nameLabel",page:"chat",children:"Name"})," ",(0,a.jsx)("span",{className:"schedule-required",children:"*"})]}),(0,a.jsx)("input",{id:"schedule-name",type:"text",value:V,onChange:e=>{z(e.target.value),er(e=>({...e,name:""}))},"aria-invalid":!!ei.name,"aria-describedby":ei.name?"schedule-name-error":void 0,autoComplete:"name",required:!0}),ei.name&&(0,a.jsx)("div",{id:"schedule-name-error",className:"schedule-field-error",children:ei.name})]}),"privacy"===I?(0,a.jsxs)("div",{className:"schedule-field",children:[(0,a.jsxs)("label",{htmlFor:"schedule-contact",children:[(0,a.jsx)(r.default,{contentKey:"chat.privacy.contactLabel",page:"chat",children:"Phone or Email"})," ",(0,a.jsx)("span",{className:"schedule-required",children:"*"})]}),(0,a.jsx)("input",{id:"schedule-contact",type:"text",value:ee,onChange:e=>{ea(e.target.value),er(e=>({...e,contact:""}))},"aria-invalid":!!ei.contact,"aria-describedby":ei.contact?"schedule-contact-error":void 0,autoComplete:"email",required:!0}),ei.contact&&(0,a.jsx)("div",{id:"schedule-contact-error",className:"schedule-field-error",children:ei.contact})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"schedule-field",children:[(0,a.jsxs)("label",{htmlFor:"schedule-phone",children:[(0,a.jsx)(r.default,{contentKey:"chat.form.phoneLabel",page:"chat",children:"Phone"})," ",(0,a.jsx)("span",{className:"schedule-required",children:"*"})]}),(0,a.jsx)("input",{id:"schedule-phone",type:"tel",value:Q,onChange:e=>{X((0,n.formatPhoneNumber)(e.target.value)),er(e=>({...e,phone:""}))},"aria-invalid":!!ei.phone,"aria-describedby":ei.phone?"schedule-phone-error":void 0,autoComplete:"tel",required:!0}),ei.phone&&(0,a.jsx)("div",{id:"schedule-phone-error",className:"schedule-field-error",children:ei.phone})]}),(0,a.jsxs)("div",{className:"schedule-field",children:[(0,a.jsxs)("label",{htmlFor:"schedule-email",children:[(0,a.jsx)(r.default,{contentKey:"chat.form.emailLabel",page:"chat",children:"Email"})," ",(0,a.jsx)("span",{className:"schedule-required",children:"*"})]}),(0,a.jsx)("input",{id:"schedule-email",type:"email",value:J,onChange:e=>{Z(e.target.value),er(e=>({...e,email:""}))},"aria-invalid":!!ei.email,"aria-describedby":ei.email?"schedule-email-error":void 0,autoComplete:"email",required:!0}),ei.email&&(0,a.jsx)("div",{id:"schedule-email-error",className:"schedule-field-error",children:ei.email})]})]}),(0,a.jsxs)("div",{className:"schedule-field",children:[(0,a.jsx)("label",{htmlFor:"schedule-note",children:"privacy"===I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.default,{contentKey:"chat.privacy.messageLabel",page:"chat",children:"Message"})," ",(0,a.jsx)("span",{className:"schedule-required",children:"*"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.default,{contentKey:"chat.form.noteLabel",page:"chat",children:"Note"})," ",(0,a.jsx)("span",{className:"text-muted",children:(0,a.jsx)(r.default,{contentKey:"chat.form.optional",page:"chat",children:"(optional)"})})]})}),(0,a.jsx)("textarea",{id:"schedule-note",value:et,onChange:e=>{es(e.target.value),er(e=>({...e,note:""}))},placeholder:"privacy"===I?void 0:"Anything you want me to know?","aria-invalid":!!ei.note,rows:3}),ei.note&&(0,a.jsx)("div",{className:"schedule-field-error",children:ei.note})]}),(0,a.jsxs)("div",{className:"schedule-hp","aria-hidden":"true",children:[(0,a.jsx)("label",{htmlFor:"schedule-website",children:"Website"}),(0,a.jsx)("input",{id:"schedule-website",type:"text",value:eh,onChange:e=>em(e.target.value),tabIndex:-1,autoComplete:"off"})]})]}),eo&&(0,a.jsx)("p",{className:"msg msg-error",children:eo}),(0,a.jsxs)("div",{className:"schedule-nav",children:[(0,a.jsx)("button",{type:"button",className:"btn-ghost small",onClick:()=>eb("privacy"===I?"type":"date"),children:(0,a.jsx)(r.default,{contentKey:"chat.nav.backFromInfo",page:"chat",children:"Back"})}),(0,a.jsx)("button",{type:"button",className:"btn-primary small",disabled:en,onClick:ej,children:en?"privacy"===I?"Sending…":(0,a.jsx)(r.default,{contentKey:"chat.form.submitting",page:"chat",children:"Booking…"}):"privacy"===I?(0,a.jsx)(r.default,{contentKey:"chat.privacy.submitButton",page:"chat",children:"Send Request"}):(0,a.jsx)(r.default,{contentKey:"chat.form.submitButton",page:"chat",children:"Book Meeting"})})]})]})]})}],532658)},610260,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(873658),i=e.i(54352),r=e.i(470473),n=e.i(334164),l=e.i(522016);e.s(["default",0,function({invoice:e,token:o,cancelled:d}){let[c,u]=(0,t.useState)(!1),[h,m]=(0,t.useState)(null),p=e.status===i.INVOICE_STATUS.PAID,f=e.split_payment,g=e.total_cents,b=null,y=g,v="Pay";f&&(e.installment_1_paid_at?e.installment_2_paid_at||(b=2,y=e.installment_2_amount_cents||0,v="Pay Remaining"):(b=1,y=e.installment_1_amount_cents||0,v="Pay Now"));let x=async()=>{u(!0),m(null);try{let a={invoice_id:e.id,token:o};b&&(a.installment=b);let t=await (0,r.payInvoice)(a);t.checkout_url?.startsWith("https://")&&(window.location.href=t.checkout_url)}catch(t){m((0,a.jsxs)(a.Fragment,{children:["I’m so sorry—the payment couldn’t be processed. I’ve been notified and will look into it. If you need help right away, please ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"error-link",children:"reach out"}),"."]}
1)),(0,s.logClientError)("invoice:payment",t instanceof Error?t.message:"Invoice payment failed",{token:o,bookingId:e.booking_id||null,flowLabel:"Paying an invoice"}),u(!1)}};return p||f&&e.installment_1_paid_at&&e.installment_2_paid_at?(0,a.jsxs)("div",{className:"paid-full",children:[(0,a.jsx)("div",{className:"paid-full-label",children:"Paid in Full"}),(0,a.jsx)("div",{className:"paid-full-link",children:(0,a.jsx)(l.default,{href:"/dashboard",children:"Get your images"})})]}):0===g?(0,a.jsx)("div",{className:"invoice-no-payment",children:"No payment due"}):(0,a.jsxs)("div",{className:"pay-area",children:[d&&(0,a.jsxs)("div",{className:"invoice-decline-notice",children:[(0,a.jsx)("h3",{children:"Payment wasn’t processed"}),(0,a.jsx)("p",{children:"No worries—this happens sometimes. You can try again below with a different card, or feel free to reply to any of my emails and I’ll sort it out."})]}),h&&(0,a.jsx)("p",{className:"warning-box invoice-error",children:h}),(0,a.jsx)("button",{type:"button",className:"btn-primary invoice-pay-btn",onClick:x,disabled:c,children:c?"Redirecting to payment...":`${v} ${(0,n.formatCentsToDollars)(y)}`})]})}])},885786,889642,e=>{"use strict";var a=e.i(843476);let t="Use this on",s="Session",i="Images";e.s(["OFFER_USE_FAILED_MESSAGE",0,"I couldn’t move that offer just now—please try again.","OFFER_USE_IMAGES_LABEL",0,i,"OFFER_USE_PROMPT",0,t,"OFFER_USE_SESSION_LABEL",0,s],889642);var r=e.i(961987);function n({label:e,useOn:l,disabled:o=!1,onPick:d,className:c}){let u=[c,"offer-use-pick"].filter(Boolean).join(" ");return(0,a.jsxs)("span",{className:u,role:"group","aria-label":`${e}—${t}`,children:[(0,a.jsx)("span",{className:"offer-use-pick__prompt","aria-hidden":"true",children:t}),(0,a.jsx)(r.SegmentedToggle,{active:"session"===l,disabled:o,onClick:()=>{"session"!==l&&d("session")},children:s}),(0,a.jsx)(r.SegmentedToggle,{active:"photos"===l,disabled:o,onClick:()=>{"photos"!==l&&d("photos")},children:i})]})}let l={summary:{row:"info-row summary-row",label:"summary-label",value:"summary-value"},detail:{row:"detail-row",label:"detail-label",value:"detail-value"}};e.s(["OfferUsePickRow",0,function({choices:e,variant:t,disabled:s=!1,onPick:i}){if(!i||!e||0===e.length)return null;let r=l[t];return(0,a.jsx)(a.Fragment,{children:e.map(e=>(0,a.jsxs)("div",{className:r.row,children:[(0,a.jsx)("span",{className:r.label,children:e.line}),(0,a.jsx)(n,{label:e.line,useOn:e.useOn,disabled:s,onPick:a=>i(e.couponId,a),className:r.value})]},e.couponId))})}],885786)},75214,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(255508),i=e.i(99008),r=e.i(871583),n=e.i(451982),l=e.i(873658),o=e.i(334164),d=e.i(38698),c=e.i(940327),u=e.i(708801),h=e.i(317896);function m(e,a){return new Date((0,h.addDaysToTodayKey)((0,h.getHomeAnchorZone)(),a,new Date(e))+"T12:00:00")}function p(e,a){return e?a?e>a?e:a:e:a}function f(e,a){return e?a?e<a?e:a:e:a}e.s(["default",0,function({booking:e,client:g,studioAddress:b,locationFeeCents:y,imagePriceCents:v,excludeEventIds:x,planningToShootMinDays:j,canRelocate:N,unpaidFeeInvoice:k=!1,feeCashCents:w=null,referralSource:C,initialMode:S,noShowMode:_=!1,onBack:I,onSuccess:P}){let D={bookingId:e.id,clientId:g?.id??null,email:g?.email??null,firstName:g?.first_name??null,lastName:g?.last_name??null,flowLabel:"Dashboard rescheduling session"},T="portrait"===e.type&&!!e.planning_call_at,F=`sds_change_${e.id}`,E=w??e.location_fee_cents,$=v>0?Math.floor(E/v):0,L=_&&e.is_on_location,[A,R]=(0,t.useState)("relocate"===S||L),[M,O]=(0,t.useState)("reschedule"===S),[K,U]=(0,t.useState)(()=>L?"change_address":e.is_on_location?"studio":"on_location"),[B,q]=(0,t.useState)(L&&e.on_location_address||""),[Y,G]=(0,t.useState)("stripe"),W=$>0?Y:"stripe",[H,V]=(0,t.useState)(()=>"relocate"===S||L?"location":N&&"reschedule"!==S?"options":T?"choose":"schedule1"),[z,J]=(0,t.useState)(T?"planning_call":"shoot"),[Z,Q]=(0,t.useState)(!1),[X,ee]=(0,t.useState)(!1),[ea,et]=(0,t.useState)(!1),[es,ei]=(0,t.useState)(!1),[er,en]=(0,t.useState)(null),[el,eo]=(0,t.useState)(null),[ed,ec]=(0,t.useState)(null),[eu,eh]=(0,t.useState)(null),[em,ep]=(0,t.useState)(null),[ef,eg]=(0,t.useState)(!1),[eb]=(0,t.useState)(u.newRequestId);(0,t.useEffect)(()=>{try{localStorage.removeItem(`sds_reschedule_${e.id}`)}catch{}let a=function(e){try{let a=localStorage.getItem(`sds_change_${e}`);if(!a)return null;let t=JSON.parse(a);if(Date.now()-t.savedAt>36e5||"success"===t.step)return localStorage.removeItem(`sds_change_${e}`),null;return t}catch{return null}}(e.id);if(!a)return;let t="submitting"===a.step?"confirm":a.step,s=a.newDate1||null,i=a.newTime1||null,r=a.newDate2||null,n=a.newTime2||null;s&&(0,o.isDateInPast)(s)?(s=null,i=null,r=null,n=null,t="schedule1"):r&&(0,o.isDateInPast)(r)&&(r=null,n=null,"confirm"===t&&(t="schedule2")),V(t),void 0!==a.wantLocation&&R(a.wantLocation),void 0!==a.wantReschedule&&O(a.wantReschedule),a.relocateType&&U(a.relocateType),void 0!==a.relocateAddress&&q(a.relocateAddress),a.relocateRefundMethod&&G(a.relocateRefundMethod),a.eventType&&J(a.eventType),Q(!!a.cascadeNeeded),ee(!!a.rescheduleBoth),et(!!a.choosePlanning),ei(!!a.chooseShoot),en(s),eo(i),ec(r),eh(n)},[]),(0,t.useEffect)(()=>
1{if("success"===H){try{localStorage.removeItem(F)}catch{}return}try{localStorage.setItem(F,JSON.stringify({step:H,wantLocation:A,wantReschedule:M,relocateType:K,relocateAddress:B,relocateRefundMethod:Y,eventType:z,cascadeNeeded:Z,rescheduleBoth:X,choosePlanning:ea,chooseShoot:es,newDate1:er,newTime1:el,newDate2:ed,newTime2:eu,savedAt:Date.now()}))}catch{}},[F,H,A,M,K,B,Y,z,Z,X,ea,es,er,el,ed,eu]);let ey="planning_call"===z?"planning":e.type,ev="planning_call"===z?e.type:"planning",ex=C?.bookableFrom?new Date(C.bookableFrom+"T12:00:00"):void 0,ej=C?.bookableUntil?new Date(C.bookableUntil+"T12:00:00"):void 0,{minDate1:eN,maxDate1:ek,minDate2:ew,maxDate2:eC}=(0,t.useMemo)(()=>{let a={};return T&&("planning_call"===z?(X||(a.maxDate1=m(e.shoot_at,-j)),el&&(a.minDate2=m(el,j))):(!X&&e.planning_call_at&&(a.minDate1=m(e.planning_call_at,j)),el&&(a.maxDate2=m(el,-j)))),"shoot"!==z&&T?(a.minDate2=p(a.minDate2,ex),a.maxDate2=f(a.maxDate2,ej)):(a.minDate1=p(a.minDate1,ex),a.maxDate1=f(a.maxDate1,ej)),a},[T,z,e.shoot_at,e.planning_call_at,j,el,X,ex,ej]),eS=async()=>{eg(!0),ep(null),V("submitting");try{if(A)try{await (0,d.relocateBooking)({booking_id:e.id,new_location_type:"change_address"===K?"on_location":K,new_address:"studio"!==K?B:void 0,refund_method:"studio"!==K||k?void 0:W,refund_request_id:eb})}catch(t){ep((0,a.jsxs)(a.Fragment,{children:["I’m so sorry—the change couldn’t be saved. I’ve been notified and will look into it. If you need help right away, please ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"error-link",children:"reach out"}),"."]}));let e=t instanceof c.ApiError?t.body:null;(0,l.logClientError)("dashboard:relocate",e?.error||(t instanceof Error?t.message:"Relocate API error"),D),V("confirm"),eg(!1);return}if(M){let t={booking_id:e.id};"planning_call"===z?(t.planning_call_at=el,Z&&eu&&(t.shoot_at=eu)):(t.shoot_at=el,Z&&eu&&(t.planning_call_at=eu));try{await (0,d.rescheduleBooking)(t)}catch(i){let e=i instanceof c.ApiError?i.status:0,t=i instanceof c.ApiError?i.body:null,s=A?"Location updated, but reschedule failed: ":"";429!==e&&(0,l.logClientError)("dashboard:reschedule",t?.error||(i instanceof Error?i.message:"Reschedule API error"),D),ep(429===e?`${s}You recently rescheduled this session. Please wait at least an hour before rescheduling again.`:(0,a.jsxs)(a.Fragment,{children:[s,"I’m so sorry—the change couldn’t be saved. I’ve been notified and will look into it. If you need help right away, please ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"error-link",children:"reach out"}),"."]})),V("confirm"),eg(!1);return}}eg(!1),V("success")}catch(e){ep((0,a.jsxs)(a.Fragment,{children:["I’m so sorry—something unexpected happened. I’ve been notified and will look into it. If you need help right away, please ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"error-link",children:"reach out"}),"."]})),(0,l.logClientError)("dashboard:change-session",e instanceof Error?e.message:"Network error",D),V("confirm"),eg(!1)}},e_="planning_call"===z?"Planning Call":"Shoot",eI="planning_call"===z?e.planning_call_at:e.shoot_at,eP="planning_call"===z?e.shoot_at:e.planning_call_at,eD="planning_call"===z?el:Z&&eu?eu:e.planning_call_at,eT="planning_call"===z?Z&&eu?eu:e.shoot_at:el,eF="planning_call"===z||Z,eE="shoot"===z||Z,e$="studio"===K||!!B,eL=e.is_on_location?(0,o.formatAddressParts)(e.on_location_address||"").street||"On-location":"Studio",eA="studio"===K?`Studio \u2014 ${(0,o.formatAddressParts)(b).street}`:(0,o.formatAddressParts)(B).street||B,eR=A&&M,eM=ef?"Processing…":eR?"Confirm Changes":A?"Confirm Location Change":"Confirm Reschedule",eO=eR?"Your session has been updated!":A?"Location changed successfully!":"Your session has been rescheduled!",eK=eR?"session":A?"location":"schedule";return(0,a.jsxs)("div",{className:"dashboard-reschedule",children:["options"===H&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[(0,a.jsx)("p",{className:"dashboard-reschedule-prompt",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.options-prompt",page:"dashboard",children:"What would you like to change?"})}),(0,a.jsxs)("div",{className:"dashboard-reschedule-choices",children:[N&&(0,a.jsxs)("label",{className:"dashboard-reschedule-choice",children:[(0,a.jsx)("input",{type:"checkbox",checked:A,onChange:e=>R(e.target.checked)}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"dashboard-reschedule-choice-label",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.change-location-label",page:"dashboard",children:"Change Location"})}),(0,a.jsxs)("span",{className:"dashboard-reschedule-choice-current",children:["Currently: ",eL]}),!e.is_on_location&&(0,a.jsxs)("span",{className:"dashboard-reschedule-choice-note",children:["On-location adds a ",(0,o.formatCents)(y)," fee"]})]})]}),(0,a.jsxs)("label",{className:"dashboard-reschedule-choice",children:[(0,a.jsx)("input",{type:"checkbox",checked:M,onChange:e=>O(e.target.checked)}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"dashboard-reschedule-choice-label",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.reschedule-label",page:"dashboard",children:"Reschedule Date & Time"})}),(0,a.jsxs)("span",{className:"dashboard-reschedule-choice-current",children:["Shoot: ",(0,o.formatDateCompact)(e.shoot_at)," at ",(0,o.formatTimeLower)(e.shoot_at)]})]})]})]}),(0,a.jsx)("button",{className:"btn-primary change-session-submit",disabled:!A&&!M,onClick:()=>{A?V("location"):M&&V(T?"choose":"schedule1")},children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.continue-btn",page:"dashboard",children:"Continue"})})]}),"location"===H&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[(0,a.jsx)("p",{className:"dashboard-reschedule-prompt",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.location-prompt",page:"dashboard",children:"Change your session location"})}),L&&(0,a.jsx)("p",{className:"msg msg-muted dashboard-relocate-note",children:(0,a.jsx)(n.default,{contentKey:"reschedule.location_fee_forfeited.body",page:"reschedule",children:"Your original location fee for the missed session isn’t refundable—I’ve already made the trip. If you rebook at a location, a fresh location fee will apply. Choosing the studio means no additional location fee."})}),e.is_on_location?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"dashboard-relocate-options",children:[(0,a.jsxs)("label",{className:"dashboard-relocate-radio",children:[(0,a.jsx)("input",{type:"radio",name:"relocateType",checked:"studio"===K,onChange:()=>U("studio")}
1),(0,a.jsx)(n.default,{contentKey:"dashboard.change.move-to-studio",page:"dashboard",children:"Move to studio"})]}),(0,a.jsxs)("label",{className:"dashboard-relocate-radio",children:[(0,a.jsx)("input",{type:"radio",name:"relocateType",checked:"change_address"===K,onChange:()=>U("change_address")}),(0,a.jsx)(n.default,{contentKey:"dashboard.change.change-address",page:"dashboard",children:"Change address"})]})]}),"studio"===K&&k&&(0,a.jsxs)("p",{className:"dashboard-relocate-note",children:["Your ",(0,o.formatCents)(e.location_fee_cents)," location fee hasn’t been paid yet—moving to the studio simply cancels it."]}),"studio"===K&&!k&&E>0&&(0,a.jsxs)("div",{className:"dashboard-relocate-refund",children:[(0,a.jsxs)("p",{className:"dashboard-relocate-note",children:["How would you like your ",(0,o.formatCents)(E)," location fee handled?"]}),(0,a.jsxs)("div",{className:"dashboard-relocate-options",children:[(0,a.jsxs)("label",{className:"dashboard-relocate-radio",children:[(0,a.jsx)("input",{type:"radio",name:"refundMethod",checked:"stripe"===W,onChange:()=>G("stripe")}),(0,a.jsx)(n.default,{contentKey:"dashboard.change.refund-stripe",page:"dashboard",children:"Refund to original payment method"})]}),$>0&&(0,a.jsxs)("label",{className:"dashboard-relocate-radio",children:[(0,a.jsx)("input",{type:"radio",name:"refundMethod",checked:"credits"===Y,onChange:()=>G("credits")}),"Convert to image credits (",$," images)"]})]})]}),"change_address"===K&&(0,a.jsx)("div",{className:"dashboard-relocate-address",children:(0,a.jsx)(r.default,{value:B,onChange:e=>q(e),placeholder:"Enter new address",className:"dashboard-relocate-input"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"dashboard-relocate-note",children:["Enter your on-location address (a ",(0,o.formatCents)(y)," fee will be invoiced)"]}),(0,a.jsx)("div",{className:"dashboard-relocate-address",children:(0,a.jsx)(r.default,{value:B,onChange:e=>q(e),placeholder:"Enter on-location address",className:"dashboard-relocate-input"})})]}),(0,a.jsx)("button",{className:"btn-primary change-session-submit-sm",disabled:!e$,onClick:()=>{M?V(T?"choose":"schedule1"):V("confirm")},children:M?"Continue":"Review"})]}),"choose"===H&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[(0,a.jsx)("p",{className:"dashboard-reschedule-prompt",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.choose-prompt",page:"dashboard",children:"Which would you like to reschedule?"})}),(0,a.jsxs)("div",{className:"dashboard-reschedule-choices",children:[(0,a.jsxs)("label",{className:"dashboard-reschedule-choice",children:[(0,a.jsx)("input",{type:"checkbox",checked:ea,onChange:e=>et(e.target.checked)}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"dashboard-reschedule-choice-label",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.planning-call-label",page:"dashboard",children:"Planning Call"})}),(0,a.jsxs)("span",{className:"dashboard-reschedule-choice-current",children:["Currently: ",(0,o.formatDateCompact)(e.planning_call_at)," at ",(0,o.formatTimeLower)(e.planning_call_at)]})]})]}),(0,a.jsxs)("label",{className:"dashboard-reschedule-choice",children:[(0,a.jsx)("input",{type:"checkbox",checked:es,onChange:e=>ei(e.target.checked)}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"dashboard-reschedule-choice-label",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.photo-shoot-label",page:"dashboard",children:"Photo Shoot"})}),(0,a.jsxs)("span",{className:"dashboard-reschedule-choice-current",children:["Currently: ",(0,o.formatDateCompact)(e.shoot_at)," at ",(0,o.formatTimeLower)(e.shoot_at)]})]})]})]}),(0,a.jsx)("button",{className:"btn-primary change-session-submit",disabled:!ea&&!es,onClick:()=>{let e=ea&&es;J(ea?"planning_call":"shoot"),ee(e),Q(!1),en(null),eo(null),ec(null),eh(null),V("schedule1")},children:"Continue"})]}),"schedule1"===H&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[(0,a.jsxs)("p",{className:"dashboard-reschedule-prompt",children:["Pick a new date for your ",e_.toLowerCase()]}),(0,a.jsxs)("p",{className:"text-muted change-session-current-info",children:["Currently: ",(0,o.formatDateCompact)(eI)," at ",(0,o.formatTimeLower)(eI)]}),(0,a.jsxs)("div",{className:"schedule-pair",children:[(0,a.jsx)(s.default,{selectedDate:er,onSelectDate:e=>{en(e),eo(null)},sessionType:ey,minDate:eN,maxDate:ek,excludeEventIds:x,excludeBookingId:e.id}),er?(0,a.jsx)(i.default,{date:er,sessionType:ey,selectedTime:el,onSelectTime:a=>{eo(a);let t=(a=>{if(!T)return!1;if(X)return!0;let t=(0,h.getHomeAnchorZone)();
1return"planning_call"===z?(0,h.calendarDaysBetweenInZone)(a,e.shoot_at,t)<j:!!e.planning_call_at&&(0,h.calendarDaysBetweenInZone)(e.planning_call_at,a,t)<j})(a);Q(t),t?(ec(null),eh(null),V("schedule2")):V("confirm")},excludeEventIds:x,excludeBookingId:e.id,onStaleDate:()=>{en(null),eo(null)}}):(0,a.jsx)("div",{className:"time-slot-picker",children:(0,a.jsx)("p",{className:"time-slot-empty text-muted",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.select-date-hint",page:"dashboard",children:"Select a date to see available times"})})})]})]}),"schedule2"===H&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[!X&&(0,a.jsxs)("p",{className:"dashboard-reschedule-cascade",children:["Your ","planning_call"===z?"shoot":"planning call"," also needs to be rescheduled to maintain the ",j,"-day gap between planning and shoot."]}),(0,a.jsxs)("p",{className:"dashboard-reschedule-prompt",children:["Pick a new date for your ","planning_call"===z?"shoot":"planning call"]}),(0,a.jsxs)("p",{className:"text-muted change-session-current-info",children:["Currently: ",(0,o.formatDateCompact)(eP)," at ",(0,o.formatTimeLower)(eP)]}),(0,a.jsxs)("div",{className:"schedule-pair",children:[(0,a.jsx)(s.default,{selectedDate:ed,onSelectDate:e=>{ec(e),eh(null)},sessionType:ev,minDate:ew,maxDate:eC,excludeEventIds:x,excludeBookingId:e.id}),ed?(0,a.jsx)(i.default,{date:ed,sessionType:ev,selectedTime:eu,onSelectTime:e=>{eh(e),V("confirm")},excludeEventIds:x,excludeBookingId:e.id,onStaleDate:()=>{ec(null),eh(null)}}):(0,a.jsx)("div",{className:"time-slot-picker",children:(0,a.jsx)("p",{className:"time-slot-empty text-muted",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.select-date-hint",page:"dashboard",children:"Select a date to see available times"})})})]})]}),("confirm"===H||"submitting"===H)&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[(0,a.jsx)("p",{className:"dashboard-reschedule-prompt",children:eR?"Confirm your changes":A?"Confirm location change":"Confirm your new schedule"}),(0,a.jsxs)("div",{className:"dashboard-reschedule-summary",children:[A&&(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Location"}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-old",children:eL}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-arrow",children:"→"}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-new",children:eA})]}),A&&!e.is_on_location&&(0,a.jsxs)("p",{className:"dashboard-change-fee-note text-muted",children:[(0,o.formatCents)(y)," location fee will be invoiced"]}),A&&"studio"===K&&(k||E>0)&&(0,a.jsxs)("p",{className:"dashboard-change-fee-note text-muted",children:[(0,o.formatCents)(k?e.location_fee_cents:E)," ",k?"location fee cancelled":"credits"===W?`converted to ${$} image credits`:"refunded to original payment method"]}),M&&T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Planning Call"}),eF?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-old",children:[(0,o.formatDateCompact)(e.planning_call_at)," at ",(0,o.formatTimeLower)(e.planning_call_at)]}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-arrow",children:"→"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-new",children:[(0,o.formatDateCompact)(eD)," at ",(0,o.formatTimeLower)(eD)]})]}):(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-unchanged",children:[(0,o.formatDateCompact)(e.planning_call_at)," at ",(0,o.formatTimeLower)(e.planning_call_at)]})]}),(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Shoot"}),eE?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-old",children:[(0,o.formatDateCompact)(e.shoot_at)," at ",(0,o.formatTimeLower)(e.shoot_at)]}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-arrow",children:"→"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-new",children:[(0,o.formatDateCompact)(eT)," at ",(0,o.formatTimeLower)(eT)]})]}):(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-unchanged",children:[(0,o.formatDateCompact)(e.shoot_at)," at ",(0,o.formatTimeLower)(e.shoot_at)]})]})]}),M&&!T&&(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Shoot"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-old",children:[(0,o.formatDateCompact)(e.shoot_at)," at ",(0,o.formatTimeLower)(e.shoot_at)]}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-arrow",children:"→"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-new",children:[(0,o.formatDateCompact)(el)," at ",(0,o.formatTimeLower)(el)]})]})]}),em&&(0,a.jsx)("p",{role:"alert",className:"msg msg-error",children:em}),(0,a.jsx)("div",{className:"dashboard-reschedule-actions",children:(0,a.jsx)("button",{className:"btn-primary",onClick:eS,disabled:ef,children:eM})})]}),"success"===H&&(0,a.jsxs)("div",{className:"dashboard-reschedule-step",children:[(0,a.jsx)("div",{className:"msg-box msg-box-lg msg-box-success",children:(0,a.jsx)("p",{children:eO})}),(0,a.jsxs)("div",{className:"dashboard-reschedule-summary",children:[A&&(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Location"}),(0,a.jsx)("span",{className:"dashboard-reschedule-summary-new",children:eA})]}),M&&T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Planning Call"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-new",children:[(0,o.formatDateCompact)(eD)," at ",(0,o.formatTimeLower)(eD)]})]}),(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Shoot"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-new",children:[(0,o.formatDateCompact)(eT)," at ",(0,o.formatTimeLower)(eT)]})]})]}),M&&!T&&(0,a.jsxs)("div",{className:"dashboard-reschedule-summary-row",children:[(0,a.jsx)("span",{className:"dashboard-reschedule-summary-label",children:"Shoot"}),(0,a.jsxs)("span",{className:"dashboard-reschedule-summary-new",children:[(0,o.formatDateCompact)(el)," at ",(0,o.formatTimeLower)(el)]})]})]}),(0,a.jsx)("p",{className:"text-muted change-session-confirmation-note",children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.confirmation-note",page:"dashboard",children:"You'll receive a confirmation email with your updated details."})}),(0,a.jsx)("button",{className:"btn-primary change-session-done",onClick:P,children:(0,a.jsx)(n.default,{contentKey:"dashboard.change.back-to-dashboard",page:"dashboard",children:"Back to Dashboard"})})]}),"success"!==H&&"options"!==H&&(0,a.jsx)("div",{className:"dashboard-reschedule-cancel",children:(0,a.jsxs)("button",{className:"dashboard-reschedule-cancel-btn",onClick:()=>{try{localStorage.removeItem(F)}catch{}I()},children:["Cancel and keep original ",eK]})})]})}])},84933,e=>{"use strict";var a=e.i(271645),t=e.i(38698);e.s(["default",0,function(){return(0,a.useEffect)(()=>{(0,t.clearDashboardCookie)().catch(()=>{});try{localStorage.removeItem("sds_dashboard_token")}catch{}},[]),null}])},682130,e=>{"use strict";var a=e.i(843476),t=e.i(657688),s=e.i(74206);e.s(["default",0,function({imageUrl:e,firstName:i,size:r="sm"}){let n="lg"===r?320:64;return(0,a.jsx)("span",{className:`client-avatar client-avatar-${r}`,children:(0,a.jsx)("span",{className:"client-avatar-inner",children:e?(0,a.jsx)(t.default,{src:e,alt:"",width:n,height:n,unoptimized:(0,s.isDoorwayPhotoAddress)(e)}):(0,a.jsx)("span",{className:"client-avatar-initial",children:i?.charAt(0)||"?"})})})}])},68855,e=>{"use strict";var a=e.i(843476),t=e.i(198033);e.s(["default",0,function(){return(0,a.jsx)("footer",{className:"dashboard-footer",children:(0,a.jsxs)("div",{className:"dashboard-footer-contact",children:[(0,a.jsx)("a",{href:`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(t.BOOKING_CONFIG.studioAddress)}`,target:"_blank",rel:"noopener noreferrer",children:t.BOOKING_CONFIG.studioAddress}),(0,a.jsx)("span",{className:"dashboard-footer-sep","aria-hidden":"true",children:"·"}),(0,a.jsx)("a",{href:`mailto:${t.STUDIO_CONTACT.email}`,children:t.STUDIO_CONTACT.email}),(0,a.jsx)("span",{className:"dashboard-footer-sep","aria-hidden":"true",children:"·"}),(0,a.jsx)("a",{href:t.STUDIO_CONTACT.phoneTel,children:t.STUDIO_CONTACT.phone})]})})}])},703702,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(873658),i=e.i(38698),r=e.i(940327);e.s(["default",0,function({next:e,resendToken:n,resendLabel:l}){let[o,d]=(0,t.useState)(""),[c,u]=(0,t.useState)(!1),[h,m]=(0,t.useState)(null),p=!!n,f=async a=>{if(a.preventDefault(),c||!p&&!o.trim())return;u(!0),m(null);let t={email:p?null:o.trim(),flowLabel:p?"Dashboard resending magic link from a dead link":"Dashboard requesting magic link"};try{p?(await (0,i.requestDashboardLink)({token:n,next:e}),m({type:"success",text:"Sent. Check the inbox you booked with—the new link should land within a minute. If you don’t see it, check your spam."})):(await (0,i.requestDashboardLink)({email:o.trim(),next:e}),m({type:"success",text:"If that email is on file you’ll get a dashboard link shortly. If you don’t see it within a minute, check your spam."}),d(""))}catch(e){if(m({type:"error",text:"I’m so sorry—couldn’t send the link. I’ve been notified and will look into it. If you need help right away, please email [email protected]."}),e instanceof r.ApiError){let a=e.body;
1(0,s.logClientError)("dashboard:request-link",a?.error||"Request link API error",t)}else(0,s.logClientError)("dashboard:request-link",e instanceof Error?e.message:"Network error",t)}finally{u(!1)}};return p&&h?.type==="success"?(0,a.jsx)("p",{className:"msg msg-success",children:h.text}):(0,a.jsxs)("form",{onSubmit:f,className:"gallery-request-form",children:[!p&&(0,a.jsx)("input",{type:"email",placeholder:"[email protected]",value:o,onChange:e=>d(e.target.value),className:"gallery-request-input",required:!0,autoComplete:"email"}),(0,a.jsx)("button",{type:"submit",className:"btn-primary",disabled:c||!p&&!o.trim(),children:c?"Sending...":p?l||"Send Me a New Link":"Send Dashboard Link"}),h&&(0,a.jsx)("p",{className:`msg ${"success"===h.type?"msg-success":"msg-error"}`,children:h.text})]})}])},447853,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(522016),i=e.i(38698),r=e.i(334164),n=e.i(159213),l=e.i(991844),o=e.i(289646);let d=(0,t.forwardRef)(function(e,t){let{level:s="primary",active:i=!1,icon:r,className:n,children:l,...d}=e,c=["dashboard-sidebar-nav-item","secondary"===s?"dashboard-sidebar-nav-item--secondary":"dashboard-sidebar-nav-item--primary",i?"dashboard-sidebar-nav-item--active":"",n||""].filter(Boolean).join(" ");return(0,a.jsxs)(o.PolymorphicButton,{ref:t,className:c,...d,children:[r?(0,a.jsx)("span",{className:"dashboard-sidebar-nav-item__icon","aria-hidden":!0,children:r}):null,(0,a.jsx)("span",{className:"dashboard-sidebar-nav-item__label",children:l})]})});var c=e.i(606137);function u({progress:e}){let t=Math.max(0,Math.min(1,e)),s=2*t*Math.PI,i=7+6*Math.sin(s),r=7-6*Math.cos(s),n=t>=.999?"M 7 1 A 6 6 0 1 1 6.999 1 Z":t<=.001?"":`M 7 7 L 7 1 A 6 6 0 ${+(t>.5)} 1 ${i} ${r} Z`;return(0,a.jsx)("span",{className:"dashboard-sidebar-download-pie","aria-hidden":"true",children:(0,a.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",children:[(0,a.jsx)("circle",{cx:7,cy:7,r:6,fill:"var(--color-white)",stroke:"var(--color-gray-300)",strokeWidth:"1"}),n&&(0,a.jsx)("path",{d:n,fill:"var(--color-accent)"})]})})}function h({onClick:e,busy:t}){return(0,a.jsx)(l.default,{label:"Download finals",children:(0,a.jsx)(c.default,{size:"md",tone:"accent",ringed:!0,onClick:e,disabled:t,"aria-label":"Download finals",children:(0,a.jsx)(n.IconDownload,{size:14})})})}function m(){return(0,a.jsx)("div",{className:"dashboard-sidebar-cascade-headsup",children:"Your browser may ask to allow multiple downloads—please click Allow."})}function p({note:e}){return(0,a.jsx)("div",{className:"dashboard-sidebar-cascade-finalnote",children:e})}e.s(["default",0,function({navItems:e,activeNavId:n,onNavSelect:l,sessions:o,onSessionSelect:c,accountSubItems:f,activeAccountSubId:g,onAccountSubSelect:b,markedAccountSubIds:y,markedNavIds:v,onProfileClick:x,onColorblindnessClick:j,onEmailsPrivacyClick:N,onRebook:k,onGiftSession:w,onDownloadFinals:C,downloadFinalsBusy:S=!1,cascadeFinalNote:_,cascadeFailureNote:I,afterNav:P,simpleNav:D,teamBookings:T}){let F=o&&o.length>0,E=f&&f.length>0&&"account"===n,$=e.filter(e=>"emails-privacy"!==e.id&&"account"!==e.id),L=e.find(e=>"account"===e.id);if(D){let t=T&&T.length>1;return(0,a.jsxs)("aside",{className:"site-layout-sidebar dashboard-sidebar",children:[t&&(0,a.jsx)("div",{className:"dashboard-sidebar-booking-switcher",children:T.map(e=>(0,a.jsxs)(d,{as:s.default,href:`/dashboard/teams/${e.galleryToken}`,level:"secondary",active:e.isCurrent,children:[(0,r.formatDate)(e.shootAt),e.dayCount>1?` \xb7 ${e.dayCount} days`:""]},e.groupId))}),(0,a.jsx)("nav",{className:"dashboard-sidebar-nav",children:e.map((e,t)=>{let s=(0,a.jsx)(d,{level:"primary",active:n===e.id,onClick:()=>l(e.id),children:e.label},e.id);return t>0||!C?s:(0,a.jsxs)("div",{className:"dashboard-sidebar-nav-group",children:[(0,a.jsxs)("div",{className:"dashboard-sidebar-sessions-header",children:[s,(0,a.jsx)(h,{onClick:C,busy:S})]}),S&&(0,a.jsx)(m,{}),!S&&_&&(0,a.jsx)(p,{note:_}),!S&&I&&(0,a.jsx)("div",{className:"msg-box msg-box-neutral dashboard-sidebar-session-notice",children:I})]},e.id)})}),P,(0,a.jsxs)("div",{className:"dashboard-sidebar-secondary",children:[x&&(0,a.jsx)(d,{level:"secondary",onClick:x,children:"Profile"}),j&&(0,a.jsx)(d,{level:"secondary",onClick:j,children:"Colorblindness & Dark Mode"}),N&&(0,a.jsx)(d,{level:"secondary",onClick:N,children:"Emails & Privacy"}),w&&(0,a.jsx)(d,{level:"secondary",onClick:w,children:"Gift a Session"}),k&&(0,a.jsx)(d,{level:"secondary",onClick:k,children:"Book a New Session"}),(0,a.jsx)(d,{level:"secondary",onClick:async()=>{await (0,i.clearDashboardCookie)(),window.location.href="/"},children:"Log Out"})]})]})}return(0,a.jsxs)("aside",{className:"site-layout-sidebar dashboard-sidebar",children:[(0,a.jsxs)("nav",{className:"dashboard-sidebar-nav",children:[(0,a.jsxs)("div",{className:"dashboard-sidebar-nav-group",children:[(0,a.jsxs)("div",{className:"dashboard-sidebar-sessions-header",children:[(0,a.jsx)(d,{level:"primary",active:"home"===n,onClick:()=>l("home"),children:"Sessions"}
1),C&&(0,a.jsx)(h,{onClick:C,busy:S})]}),S&&!o?.some(e=>"downloading"===e.cascadeState||"done"===e.cascadeState||"failed"===e.cascadeState)&&(0,a.jsx)(m,{}),!S&&_&&(0,a.jsx)(p,{note:_}),F&&o.map(e=>{let s="packaging"===e.cascadeState||"downloading"===e.cascadeState,i="downloading"===e.cascadeState?Math.max(.95,e.cascadeProgress??0):e.cascadeProgress??0;return(0,a.jsxs)(t.Fragment,{children:[(0,a.jsx)("div",{className:"dashboard-sidebar-nav-sub-row",children:(0,a.jsx)(d,{level:"secondary",active:e.active,onClick:()=>c?.(e.id),children:(0,a.jsxs)("span",{className:"dashboard-sidebar-nav-label",children:[e.label,s&&(0,a.jsx)(u,{progress:i})]})})}),"failed"===e.cascadeState&&e.cascadeError&&(0,a.jsx)("div",{className:"msg-box msg-box-neutral dashboard-sidebar-session-notice",children:e.cascadeError})]},e.id)})]}),$.filter(e=>["favorites"].includes(e.id)).map(e=>{let t=v?.includes(e.id);return(0,a.jsx)(d,{level:"primary",active:n===e.id,onClick:()=>l(e.id),children:(0,a.jsxs)("span",{className:"dashboard-sidebar-nav-label",children:[e.label,(0,a.jsx)("span",{className:`dashboard-sidebar-nav-dot${t?" dashboard-sidebar-nav-dot--visible":""}`,"aria-hidden":!t,"aria-label":"Something needs your attention"})]})},e.id)}),L&&(0,a.jsxs)("div",{className:"dashboard-sidebar-nav-group",children:[(0,a.jsx)(d,{level:"primary",active:"account"===n,onClick:()=>l("account"),children:(0,a.jsxs)("span",{className:"dashboard-sidebar-nav-label",children:[L.label,y&&y.length>0&&(0,a.jsx)("span",{className:"dashboard-sidebar-nav-dot","aria-label":"Something needs your attention"})]})}),E&&f.map(e=>{let t=y?.includes(e.id);return(0,a.jsx)("div",{className:"dashboard-sidebar-nav-sub-row",children:(0,a.jsx)(d,{level:"secondary",active:g===e.id,onClick:()=>b?.(e.id),children:(0,a.jsxs)("span",{className:"dashboard-sidebar-nav-label",children:[e.label,t&&(0,a.jsx)("span",{className:"dashboard-sidebar-nav-dot","aria-label":"Something needs your attention"})]})})},e.id)})]}),$.filter(e=>"favorites"!==e.id).map(e=>(0,a.jsx)(d,{level:"primary",active:n===e.id,onClick:()=>l(e.id),children:e.label},e.id))]}),P,(0,a.jsxs)("div",{className:"dashboard-sidebar-secondary",children:[x&&(0,a.jsx)(d,{level:"secondary",onClick:x,children:"Profile"}),j&&(0,a.jsx)(d,{level:"secondary",onClick:j,children:"Colorblindness & Dark Mode"}),N&&(0,a.jsx)(d,{level:"secondary",onClick:N,children:"Emails & Privacy"}),w&&(0,a.jsx)(d,{level:"secondary",onClick:w,children:"Gift a Session"}),k&&(0,a.jsx)(d,{level:"secondary",onClick:k,children:"Book a New Session"}),(0,a.jsx)(d,{level:"secondary",onClick:async()=>{await (0,i.clearDashboardCookie)(),window.location.href="/"},children:"Log Out"})]})]})}],447853)},509239,828276,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(451982),i=e.i(873658);e.s(["default",0,function({questions:e,clientName:r,onSubmit:n,logScope:l="dashboard-survey",defaultSubmitted:o=!1}){let[d,c]=(0,t.useState)({}),[u,h]=(0,t.useState)({}),[m,p]=(0,t.useState)(!1),[f,g]=(0,t.useState)(o),[b,y]=(0,t.useState)(null),v=e.every(e=>void 0!==d[e.id]),x=async()=>{if(!v||m||f)return;p(!0),y(null);let a=e.map(e=>({questionId:e.id,rating:d[e.id],comment:u[e.id]?.trim()||null}));try{await n(a),g(!0)}catch(a){let e=a instanceof Error?a.message:"";"SURVEY_ALREADY_SUBMITTED"===e?g(!0):(y("I’m so sorry—your feedback couldn’t be submitted. I’ve been notified and will look into it."),(0,i.logClientError)(`survey:submit:${l}`,e||"Survey submit failed",{firstName:r||null,flowLabel:"Submitting survey response"}))}finally{p(!1)}};return f?(0,a.jsxs)("div",{className:"dashboard-survey survey-thankyou",children:[(0,a.jsxs)("h3",{children:["Thank you",r?`, ${r}`:"","!"]}),(0,a.jsx)("p",{children:"Your feedback has been received. It means a lot and helps me improve the experience for everyone."})]}):(0,a.jsxs)("div",{className:"dashboard-survey",children:[(0,a.jsx)("div",{className:"dashboard-survey-header",children:(0,a.jsx)("p",{children:(0,a.jsx)(s.default,{contentKey:"dashboard.gallery.survey-prompt",page:"dashboard",children:"How did your session go? I'd love to hear from you."})})}),(0,a.jsxs)("div",{className:"survey-form",children:[e.map(e=>(0,a.jsxs)("div",{className:"survey-question",children:[(0,a.jsx)("p",{className:"survey-question-text",children:e.text}),(0,a.jsxs)("div",{className:"survey-rating-row",children:[(0,a.jsx)("span",{className:"survey-label-low",children:e.lowLabel}),(0,a.jsx)("div",{className:"survey-rating-buttons",children:[1,2,3,4,5].map(t=>(0,a.jsx)("button",{type:"button",className:`survey-rating-btn${d[e.id]===t?" active":""}`,onClick:()=>{c(a=>({...a,[e.id]:t}))},children:t},t))}),(0,a.jsx)("span",{className:"survey-label-high",children:e.highLabel})]}),e.showFollowUp&&void 0!==d[e.id]&&d[e.id]<5&&(0,a.jsx)("div",{className:"survey-followup",children:(0,a.jsx)("textarea",{placeholder:"What could be better?",value:u[e.id]??"",onChange:a=>{let t=a.target.value;h(a=>({...a,[e.id]:t}))},rows:2,maxLength:1e3})})]},e.id)),b&&(0,a.jsx)("p",{className:"msg msg-error",children:b}),(0,a.jsx)("button",{type:"button",className:"btn-primary small survey-submit",onClick:x,disabled:!v||m,children:m?"Submitting...":(0,a.jsx)(s.default,{contentKey:"dashboard.gallery.survey-btn",page:"dashboard",children:"Share Your Feedback"})})]})]})}],509239);var r=e.i(38698),n=e.i(118133);let l=["Bug","Confusing","Looks Wrong","Suggestion"],o=[];{let e=console.error;console.error=(...a)=>{e.apply(console,a);let t=a.map(e=>e instanceof Error?e.stack||e.message:String(e)).join(" ");o.push(t.slice(0,1e3)),o.length>10&&o.shift()}}e.s(["default",0,function({clientName:e,clientEmail:i,currentTab:d,token:c}){let[u,h]=(0,t.useState)(!1),[m,p]=(0,t.useState)(""),[f,g]=(0,t.useState)(null),[b,y]=(0,t.useState)(!1),[v,x]=(0,t.useState)(!1),[j,N]=(0,t.useState)(0),k=(0,t.useRef)(null),w=(0,t.useRef)(null);(0,t.useEffect)(()=>{u&&requestAnimationFrame(()=>w.current?.focus())},[u]);let{markWithin:C,pressedWithin:S}=(0,n.usePressWithin)();(0,t.useEffect)(()=>
1{if(u)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){S(e)||!k.current||k.current.contains(e.target)||h(!1)}},[u,S]);let _=(0,t.useCallback)(async()=>{let a=m.trim();if(a&&!b){y(!0),x(!1);try{await (0,r.sendFeedback)({token:c||void 0,clientName:e,clientEmail:i,message:a,issueType:f||void 0,tab:d,userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,scrollY:Math.round(window.scrollY),consoleErrors:o.length>0?o.slice():void 0}),p(""),g(null),N(e=>e+1),x(!0),setTimeout(()=>x(!1),2500),requestAnimationFrame(()=>w.current?.focus())}catch{}finally{y(!1)}}},[m,b,e,i,d,f,c]);return(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsxs)("div",{className:"dashboard-feedback-popover",onMouseDownCapture:C,children:[(0,a.jsxs)("div",{className:"dashboard-feedback-popover-header",children:[(0,a.jsx)("span",{className:"dashboard-feedback-popover-title",children:(0,a.jsx)(s.default,{contentKey:"dashboard.feedback.title",page:"dashboard",children:"Report a Problem"})}),(0,a.jsx)("button",{className:"dashboard-feedback-popover-close",onClick:()=>h(!1),"aria-label":"Close feedback",children:"×"})]}),(0,a.jsxs)("p",{className:"dashboard-feedback-context",children:["Page: ",d]}),(0,a.jsx)("div",{className:"dashboard-feedback-chips",children:l.map(e=>(0,a.jsx)("button",{className:`dashboard-feedback-chip${f===e?" active":""}`,onClick:()=>g(f===e?null:e),children:e},e))}),(0,a.jsx)("textarea",{ref:w,className:"dashboard-feedback-textarea",rows:4,placeholder:"Describe what happened...",value:m,onChange:e=>p(e.target.value),"aria-label":"Describe what happened",onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&_()}}),(0,a.jsx)("button",{className:"btn-primary small feedback-submit-btn",onClick:_,disabled:!m.trim()||b,children:b?"Logging...":(0,a.jsx)(s.default,{contentKey:"dashboard.feedback.submit-btn",page:"dashboard",children:"Log Issue"})}),v&&(0,a.jsxs)("p",{className:"dashboard-feedback-logged",children:[(0,a.jsx)(s.default,{contentKey:"dashboard.feedback.logged",page:"dashboard",children:"Logged!"}),j>1&&` (${j} total)`]})]}),(0,a.jsxs)("button",{ref:k,className:"dashboard-feedback-btn",onClick:()=>h(e=>!e),"aria-label":"Report an issue",children:[(0,a.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),j>0&&(0,a.jsx)("span",{className:"dashboard-feedback-badge",children:j})]})]})}],828276)},168960,e=>{"use strict";var a=e.i(843476),t=e.i(991844),s=e.i(159213);e.s(["default",0,function({onClick:e,busy:i}){return(0,a.jsx)(t.default,{label:"Download all finals",children:(0,a.jsx)("button",{type:"button",className:"phase-card-action-icon",onClick:e,disabled:i,"aria-label":"Download all finals",children:(0,a.jsx)(s.IconDownload,{size:18})})})}])},403605,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(625874),i=e.i(936016),r=e.i(620110),n=e.i(873658),l=e.i(38698),o=e.i(567206);function d({mutual:e}){return(0,a.jsx)("span",{className:`other-favorites-heart-mark${e?" is-mutual":""}`,"aria-label":e?"You both made this a favorite":"favorite",children:(0,a.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})})}function c({rows:e,generalNotes:t,onOpen:i,clientFavoriteIds:r}){return(0,a.jsxs)("div",{className:"other-favorites-imagefirst",children:[t.length>0&&(0,a.jsxs)("div",{className:"other-favorites-general-notes",children:[(0,a.jsx)("h4",{className:"other-favorites-subheading",children:"General notes"}),(0,a.jsx)("ul",{className:"other-favorites-general-list",children:t.map(e=>(0,a.jsxs)("li",{className:"other-favorites-general-note",children:[(0,a.jsx)("span",{className:"other-favorites-author",children:e.visitorName}),(0,a.jsx)("span",{className:"other-favorites-note-body",children:e.body})]},e.id))})]}),(0,a.jsx)("ul",{className:"other-favorites-rows",children:e.map(e=>{let t=e.feedback.filter(e=>e.hearted).length;return(0,a.jsxs)("li",{className:`other-favorites-row tier-${e.tier}`,children:[(0,a.jsx)("button",{type:"button",className:"other-favorites-row-thumb",onClick:()=>i(e.picture.id),"aria-label":`Open picture #${e.picture.position}`,children:(0,a.jsx)(s.default,{src:e.picture.thumbnailUrl||e.picture.url,alt:"",width:300,height:300,sizes:"(max-width: 950px) 30vw, 180px",onContextMenu:e=>e.preventDefault(),draggable:!1})}),(0,a.jsxs)("div",{className:"other-favorites-row-body",children:[t>0&&(0,a.jsx)("div",{className:"other-favorites-row-meta",children:(0,a.jsxs)("span",{className:"other-favorites-row-favcount",children:[t," ",1===t?"favorite":"favorites"]})}),(0,a.jsx)("ul",{className:"other-favorites-feedback-list",children:e.feedback.map(t=>{let s=t.hearted&&(r?.has(e.picture.id)??!1);return(0,a.jsxs)("li",{className:`other-favorites-feedback-line${s?" is-mutual":""}`,children:[(0,a.jsxs)("span",{className:"other-favorites-feedback-name",children:[t.hearted&&(0,a.jsx)(d,{mutual:s}),s?`You and ${t.visitorName} agree on this one`:t.visitorName]}),t.noteBody&&(0,a.jsx)("span",{className:"other-favorites-feedback-note",children:t.noteBody})]},t.visitorId)})})]})]},e.picture.id)})})]})}function u({sections:e,onOpen:t,clientFavoriteIds:i}){return(0,a.jsx)("div",{className:"other-favorites-reviewerfirst",children:e.map(e=>(0,a.jsxs)("section",{className:"other-favorites-reviewer-section",children:[(0,a.jsx)("h4",{className:"other-favorites-reviewer-name",children:e.visitorName}
1),e.generalNote&&(0,a.jsx)("p",{className:"other-favorites-reviewer-general",children:e.generalNote}),(0,a.jsx)("ul",{className:"other-favorites-rows",children:e.pictureFeedback.map(r=>{let n=r.hearted&&(i?.has(r.picture.id)??!1);return(0,a.jsxs)("li",{className:`other-favorites-row${n?" is-mutual":""}`,children:[(0,a.jsx)("button",{type:"button",className:"other-favorites-row-thumb",onClick:()=>t(r.picture.id),"aria-label":`Open picture #${r.picture.position}`,children:(0,a.jsx)(s.default,{src:r.picture.thumbnailUrl||r.picture.url,alt:"",width:300,height:300,sizes:"(max-width: 950px) 30vw, 180px",onContextMenu:e=>e.preventDefault(),draggable:!1})}),(0,a.jsxs)("div",{className:"other-favorites-row-body",children:[(0,a.jsxs)("div",{className:"other-favorites-row-meta",children:[r.hearted&&(0,a.jsx)(d,{mutual:n}),n&&(0,a.jsxs)("span",{className:"other-favorites-mutual-line",children:["You and ",e.visitorName," agree on this one"]})]}),r.noteBody&&(0,a.jsx)("p",{className:"other-favorites-feedback-note",children:r.noteBody})]})]},r.picture.id)})})]},e.visitorId))})}e.s(["default",0,function({bookingId:e,variant:s="client",clientFavoriteIds:d,onOpenImage:h,onSessionImagesLoaded:m,onVisibilityChange:p,onAddAllToBag:f}){let[g,b]=(0,t.useState)({kind:"loading"}),[y,v]=(0,t.useState)("image");(0,t.useEffect)(()=>{let a=!1;return async function(){try{let t="admin"===s?(0,o.adminGetPublicGalleryShareData)(e):(0,l.getPublicGalleryShareData)(e),i="admin"===s?(0,o.getSessionImages)(e):(0,l.getDashboardImages)(e),[r,n]=await Promise.all([t,i]);if(a)return;let d=r.data;if(!d)return void b({kind:"absent"});let c=[];if("admin"===s){let e=0;for(let a of n.images)a.url&&(e+=1,c.push({id:a.id,url:a.url,thumbnailUrl:a.url,filename:a.original_filename,position:e,isPurchased:!1,awaitingPayment:!1,is_retouched:!1,color_tag:null,focal_x:50,focal_y:50,site_function_data:{}}))}else{let e=new Set,a=0,t=n.ordered.map(e=>({img:e,purchased:!0,awaiting:!1})),s=(n.awaitingPayment??[]).map(e=>({img:e,purchased:!1,awaiting:!0})),i=n.wanted.map(e=>({img:e,purchased:!1,awaiting:!1}));for(let{img:r,purchased:n,awaiting:l}of[...t,...s,...i]){if(e.has(r.id))continue;e.add(r.id);let t=r.url,s=r.thumbnailUrl??r.url;t&&s&&(a+=1,c.push({id:r.id,url:t,thumbnailUrl:s,filename:r.original_filename,position:a,isPurchased:n,awaitingPayment:l,is_retouched:!!r.is_retouched,color_tag:r.color_tag??null,focal_x:r.focal_x??50,focal_y:r.focal_y??50,site_function_data:r.site_function_data??{}}))}}let u=d.notes??[];if(!(d.favoritesByVisitor.length>0||u.length>0))return void b({kind:"absent"});b({kind:"ready",data:{images:c,visitors:d.visitors,favoritesByVisitor:d.favoritesByVisitor,notes:u}})}catch(e){if(a)return;(0,n.logClientError)("dashboard:other-favorites",e instanceof Error?e.message:"Failed to load"),b({kind:"error"})}}(),()=>{a=!0}},[e,s]);let x=(0,t.useMemo)(()=>{if("ready"!==g.kind)return[];let{images:e,favoritesByVisitor:a,notes:t}=g.data,s=new Map;for(let e of a)for(let a of e.imageIds){let t=s.get(a)??new Set;t.add(e.visitorId),s.set(a,t)}let i=new Map;for(let e of t){if(null===e.sessionImageId)continue;let a=i.get(e.sessionImageId)??[];a.push(e),i.set(e.sessionImageId,a)}let r=new Map;for(let e of g.data.visitors)r.set(e.id,e.name);for(let e of a)r.has(e.visitorId)||r.set(e.visitorId,e.visitorName);for(let e of t)r.has(e.visitorId)||r.set(e.visitorId,e.visitorName);let n=e.filter(e=>{let a=(s.get(e.id)?.size??0)>0,t=(i.get(e.id)?.length??0)>0;return a||t}).map(e=>{let a=s.get(e.id)??new Set,t=i.get(e.id)??[],n=new Set;a.forEach(e=>n.add(e)),t.forEach(e=>n.add(e.visitorId));let l=[];n.forEach(e=>{let s=t.find(a=>a.visitorId===e);l.push({visitorId:e,visitorName:r.get(e)??"Anonymous visitor",hearted:a.has(e),noteBody:s?s.body:null})}),l.sort((e,a)=>!!e.noteBody!=!!a.noteBody?e.noteBody?-1:1:e.visitorName.localeCompare(a.visitorName));let o=a.size>0,d=t.length>0,c=4;return o&&d?c=1:d?c=2:o&&(c=3),{picture:e,feedback:l,tier:c}});return n.sort((e,a)=>e.tier!==a.tier?e.tier-a.tier:e.picture.position-a.picture.position),n},[g]),j=(0,t.useMemo)(()=>"ready"!==g.kind?[]:g.data.notes.filter(e=>null===e.sessionImageId),[g]),N=(0,t.useMemo)(()=>
1{if("ready"!==g.kind)return[];let{images:e,visitors:a,favoritesByVisitor:t,notes:s}=g.data,i=new Map;for(let a of e)i.set(a.id,a);let r=new Set;for(let e of t)r.add(e.visitorId);for(let e of s)r.add(e.visitorId);let n=new Map;for(let e of a)n.set(e.id,e);let l=[];return r.forEach(e=>{let a=n.get(e),r=t.find(a=>a.visitorId===e),o=s.filter(a=>a.visitorId===e),d=o.find(e=>null===e.sessionImageId),c=o.filter(e=>null!==e.sessionImageId),u=new Set;r?.imageIds.forEach(e=>u.add(e)),c.forEach(e=>e.sessionImageId&&u.add(e.sessionImageId));let h=Array.from(u).map(e=>{let a=i.get(e);if(!a)return null;let t=c.find(a=>a.sessionImageId===e);return{picture:a,hearted:r?.imageIds.includes(e)??!1,noteBody:t?t.body:null}}).filter(e=>null!==e).sort((e,a)=>e.picture.position-a.picture.position);l.push({visitorId:e,visitorName:a?.name??r?.visitorName??"Anonymous visitor",generalNote:d?.body??null,pictureFeedback:h,lastSeenAt:a?.last_seen_at??null})}),l.sort((e,a)=>{let t=e.lastSeenAt?new Date(e.lastSeenAt).getTime():0;return(a.lastSeenAt?new Date(a.lastSeenAt).getTime():0)-t}),l},[g]),k=(0,t.useMemo)(()=>"ready"!==g.kind?[]:"image"===y?x.map(e=>e.picture):N.flatMap(e=>e.pictureFeedback.map(e=>e.picture)),[g,y,x,N]),{lightboxIndex:w,openLightbox:C,closeLightbox:S,goToPrev:_,goToNext:I}=(0,r.useLightbox)(k.length),P=(0,t.useCallback)(e=>{if(h)return void h(e);let a=k.findIndex(a=>a.id===e);a>=0&&C(a)},[k,C,h]);(0,t.useEffect)(()=>{"ready"===g.kind&&m&&m(e,g.data.images.map(e=>({id:e.id,url:e.url,thumbnailUrl:e.thumbnailUrl,original_filename:e.filename,isPurchased:e.isPurchased,awaitingPayment:e.awaitingPayment,is_retouched:e.is_retouched,color_tag:e.color_tag,focal_x:e.focal_x,focal_y:e.focal_y,site_function_data:e.site_function_data})))},[g,e,m]);let D=(0,t.useId)(),T=`${D}-tab-image`,F=`${D}-tab-reviewer`,E=`${D}-panel-image`,$=`${D}-panel-reviewer`;if((0,t.useEffect)(()=>{p?.("ready"===g.kind)},[g.kind,p]),"absent"===g.kind||"loading"===g.kind||"error"===g.kind)return null;let L=g.data.favoritesByVisitor.length>0||g.data.notes.length>0,A=(()=>{let e=new Set;for(let a of x)e.add(a.picture.id);for(let a of N)for(let t of a.pictureFeedback)e.add(t.picture.id);return Array.from(e)})();return(0,a.jsxs)("section",{className:"admin"===s?"other-favorites other-favorites-admin":"other-favorites",children:[(0,a.jsxs)("div",{className:"other-favorites-top",children:[(0,a.jsx)("h3",{className:"other-favorites-heading",children:"Other People’s Favorites"}),f&&A.length>0&&(0,a.jsx)("button",{type:"button",className:"btn-ghost small other-favorites-add-all",onClick:()=>f(A),children:"Add all to bag"}),L&&(0,a.jsxs)("div",{className:"other-favorites-viewswitch",role:"tablist","aria-label":"View mode",children:[(0,a.jsx)("button",{type:"button",role:"tab",id:T,"aria-selected":"image"===y,"aria-controls":E,tabIndex:"image"===y?0:-1,className:`other-favorites-viewswitch-btn${"image"===y?" is-active":""}`,onClick:()=>v("image"),onKeyDown:e=>{("ArrowRight"===e.key||"ArrowDown"===e.key)&&(e.preventDefault(),v("reviewer"))},children:"By image"}),(0,a.jsx)("button",{type:"button",role:"tab",id:F,"aria-selected":"reviewer"===y,"aria-controls":$,tabIndex:"reviewer"===y?0:-1,className:`other-favorites-viewswitch-btn${"reviewer"===y?" is-active":""}`,onClick:()=>v("reviewer"),onKeyDown:e=>{("ArrowLeft"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),v("image"))},children:"By reviewer"})]})]}),L?"image"===y?(0,a.jsx)("div",{role:"tabpanel",id:E,"aria-labelledby":T,children:(0,a.jsx)(c,{rows:x,generalNotes:j,onOpen:P,clientFavoriteIds:d})}):(0,a.jsx)("div",{role:"tabpanel",id:$,"aria-labelledby":F,children:(0,a.jsx)(u,{sections:N,onOpen:P,clientFavoriteIds:d})}):(0,a.jsx)("p",{className:"other-favorites-empty",children:"Nobody else has favorited any of these yet."}),!h&&null!==w&&k[w]&&(0,a.jsx)(i.default,{src:k[w].url,alt:k[w].filename,onClose:S,onPrev:k.length>1?_:void 0,onNext:k.length>1?I:void 0,neighbors:(0,r.lightboxNeighbors)(k,w,e=>e.url?{src:e.url,alt:e.filename}:null)})]})}])},654028,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(625874),i=e.i(451982),r=e.i(682130),n=e.i(380259),l=e.i(312567),o=e.i(961827),d=e.i(38698),c=e.i(940327);function u({label:e,value:t,onSave:s,inputType:i="text",required:r=!1}){return(0,a.jsxs)("div",{className:"dashboard-profile-field",children:[(0,a.jsx)("span",{className:"profile-field-label",children:e}),(0,a.jsx)(n.default,{value:t,onSave:async e=>{let a=await s(e);return a?{ok:!1,error:a}:{ok:!0}},inputType:i,required:r,emptyLabel:"Not set",ariaLabel:e})]})}function h({value:e,onSave:s}){let[i,r]=(0,t.useState)(null),n=(0,t.useCallback)(async e=>{r(null);let a=await s(e);a&&r(a)},[s]);return(0,a.jsxs)("div",{className:"dashboard-profile-field",children:[(0,a.jsx)("span",{className:"profile-field-label",id:"profile-birthday-label",children:"Birthday"}),(0,a.jsxs)("div",{className:"dashboard-profile-birthday-control",children:[(0,a.jsx)(l.default,{value:e,onCh
1ange:n,placeholder:"March 4, 1988",ariaLabelledBy:"profile-birthday-label",twoDigitYear:"past",requireYear:!0}),e&&(0,a.jsx)(o.CloseButton,{size:"sm",onClick:()=>n(""),"aria-label":"Clear birthday"})]}),i&&(0,a.jsx)("p",{role:"alert",className:"msg msg-error dashboard-profile-birthday-error",children:i})]})}let m="Peek can’t change the client’s real details — they edit this themselves from their dashboard.";e.s(["default",0,function({onPhotoChange:e,fallbackPhotoUrl:n=null,isAdminView:l=!1,previewProfile:o=null}={}){let[p,f]=(0,t.useState)(l?o:null),[g,b]=(0,t.useState)(!l),[y,v]=(0,t.useState)(null),[x,j]=(0,t.useState)(null),[N,k]=(0,t.useState)([]),[w,C]=(0,t.useState)(!1),[S,_]=(0,t.useState)(null),[I,P]=(0,t.useState)(null),[D,T]=(0,t.useState)(null),[F,E]=(0,t.useState)(!1);(0,t.useEffect)(()=>{if(l)return void j(o?.profilePhotoUrl??null);let e=!1;return async function(){try{let a=await (0,d.getProfile)();e||(f(a),j(a.profilePhotoUrl))}catch{e||v("Couldn’t load your profile. Please refresh the page.")}finally{e||b(!1)}}(),()=>{e=!0}},[l,o]),(0,t.useEffect)(()=>{if(l||!p||0===p.bookingIds.length)return;let e=!1;return async function(){C(!0);let a=[];for(let e of p.bookingIds)try{for(let t of(await (0,d.getDashboardImages)(e)).ordered||[])a.push({id:t.id,url:t.url})}catch{}e||(k(a),C(!1))}(),()=>{e=!0}},[p]);let $=(0,t.useCallback)(async(e,a)=>{if(l)return m;try{let t=await (0,d.saveProfileFields)({[e]:a});return f(e=>e?{...e,firstName:t.firstName,lastName:t.lastName,email:t.email,phone:t.phone??e.phone,birthday:"birthday"in t?t.birthday??null:e.birthday,instagram:t.instagram??e.instagram,linkedin:t.linkedin??e.linkedin,department:t.department??e.department,title:t.title??e.title}:e),null}catch(e){if(e instanceof c.ApiError){let a=e.body;return a?.error||"Update failed. Please try again."}return"Update failed. Please try again."}},[l]),L=(0,t.useCallback)(e=>$("name",e),[$]),A=(0,t.useCallback)(e=>$("email",e),[$]),R=(0,t.useCallback)(e=>$("phone",e),[$]),M=(0,t.useCallback)(e=>$("birthday",e),[$]),O=(0,t.useCallback)(e=>$("instagram",e),[$]),K=(0,t.useCallback)(e=>$("linkedin",e),[$]),U=(0,t.useCallback)(e=>$("department",e),[$]),B=(0,t.useCallback)(e=>$("title",e),[$]),q=(0,t.useCallback)(async a=>{if(l)return void P(m);_(a),P(null),T(null);try{let t=await (0,d.pickProfilePhotoFromGallery)({session_image_id:a});j(t.url),e?.(t.url),T("Profile photo updated"),E(!1)}catch{P("Couldn’t set your profile photo—please give it another try.")}finally{_(null)}},[e,l]);if(g)return(0,a.jsx)("div",{className:"dashboard-profile-tab",children:(0,a.jsx)("p",{className:"text-muted",children:(0,a.jsx)(i.default,{contentKey:"dashboard.profile.loading",page:"dashboard",children:"Loading profile…"})})});if(y||!p)return(0,a.jsx)("div",{className:"dashboard-profile-tab",children:(0,a.jsx)("p",{role:"alert",className:"msg msg-error",children:y||(0,a.jsx)(i.default,{contentKey:"dashboard.profile.fetchError",page:"dashboard",children:"Couldn't load your profile."})})});let Y=N.length>0;return(0,a.jsxs)("div",{className:"dashboard-profile-tab",children:[(0,a.jsx)("h1",{className:"dashboard",children:(0,a.jsx)(i.default,{contentKey:"dashboard.profile.title",page:"dashboard",children:"Profile"})}),(0,a.jsxs)("div",{className:"dashboard-profile-row",children:[(0,a.jsxs)("div",{className:"dashboard-profile-avatar-col",children:[Y?(0,a.jsx)("button",{type:"button",className:`dashboard-profile-current dashboard-profile-current--interactive${F?" is-open":""}`,onClick:()=>E(e=>!e),"aria-expanded":F,"aria-controls":"profile-gallery-tray",children:(0,a.jsx)(r.default,{imageUrl:x??n,firstName:p.firstName,size:"lg"})}):(0,a.jsx)("div",{className:"dashboard-profile-current",children:(0,a.jsx)(r.default,{imageUrl:x??n,firstName:p.firstName,size:"lg"})}),I&&(0,a.jsx)("p",{role:"alert",className:"msg msg-error",children:I}),D&&(0,a.jsx)("p",{className:"msg msg-success",children:D})]}),(0,a.jsxs)("div",{className:"dashboard-profile-fields",children:[(0,a.jsx)(u,{label:"Name",value:`${p.firstName}${p.lastName?` ${p.lastName}`:""}`,onSave:L,required:!0}),(0,a.jsx)(u,{label:"Email",value:p.email,onSave:A,inputType:"email",required:!0}),(0,a.jsx)(u,{label:"Phone",value:p.phone,onSave:R,inputType:"tel"})]})]}),(0,a.jsxs)("div",{className:"dashboard-profile-fields",children:[(0,a.jsx)(h,{value:p.birthday??"",onSave:M}),(0,a.jsx)("p",{className:"dashboard-profile-birthday-hint",children:"Only give me this if you’d like a happy birthday text."})]}),(0,a.jsxs)("div",{className:"dashboard-profile-fields",children:[(0,a.jsx)(u,{label:"Instagram",value:p.instagram,onSave:O}),(0,a.jsx)(u,{label:"LinkedIn",value:p.linkedin,onSave:K})]}),(0,a.jsx)("div",{className:"dashboard-profile-fields",children:(0,a.jsxs)("div",{className:"dashboard-profile-inline-row",children:[(0,a.jsx)(u,{label:"Dept",value:p.department,onSave:U}),(0,a.jsx)(u,{label:"Title",value:p.title,onSave:B})]})}),Y&&(0,a.jsx)("div",{id:"profile-gallery-tray",className:`dashboard-profile-gallery-tray${F?" is-open":""}`,"aria-hidden":!F,children:(0,a.jsx)("div",{className:"dashboard-profile-gallery-tray-inner",children:(0,a.jsx)("div",{className:"dashboard-profile-gallery-grid",children:N.map(e=>(0,a.jsxs)("button",{type:"button",className:"dashboard-profile-gallery-item",onClick:a=>{a.stopPropagation(),q(e.id)},disabled:null!==S||!F,tabIndex:F?0:-1,children:[(0,a.jsx)(s.default,{src:e.url,alt:"Purchased image",onContextMenu:e=>e.preventDefault(),draggable:!1,width:900,height:600,sizes:"(max-width: 950px) 100v
1w, 50vw"}),S===e.id&&(0,a.jsx)("span",{className:"dashboard-profile-gallery-picking",children:(0,a.jsx)(i.default,{contentKey:"dashboard.profile.setting",page:"dashboard",children:"Setting…"})})]},e.id))})})}),w&&(0,a.jsx)("p",{className:"text-muted",children:(0,a.jsx)(i.default,{contentKey:"dashboard.profile.loadingImages",page:"dashboard",children:"Loading your images…"})})]})}])},184244,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(927905),i=e.i(193589),r=e.i(97161),n=e.i(848087);function l({children:e,screenCount:t,currentIndex:s,maxReachedIndex:i,isComplete:r,screenLabels:o,goBack:d,goForward:c,goTo:u}){return(0,a.jsx)(n.BookingKitProvider,{value:{screenCount:t,currentIndex:s,maxReachedIndex:i,isComplete:r,origin:"site",screenLabels:o,exit:()=>{},goBack:d,goForward:c,goTo:u},children:e})}let o="sds-gift-flow",d={items:[],sessionType:null,senderName:"",senderEmail:"",recipientFirstName:"",recipientLastName:"",recipientEmail:"",deliveryMethod:"email",scheduledDate:"",message:""},c=["sessionType","items"];var u=e.i(729471),h=e.i(657688),m=e.i(451982);let p={session_headshot:{title:"Headshot Session",openerImage:"/images/headshot/Headshot-Meka.jpg",openerAlt:"Professional headshot example",description:"A full headshot session — 45 minutes of shooting, professional lighting, and real-time direction. Your giftee gets the session itself. Finished images are purchased 
1separately afterward, so they choose exactly the ones they love.",carouselImages:[{src:"/images/headshot/Headshot-Kaitlyn.webp",alt:"Headshot — Kaitlyn"},{src:"/images/headshot/Headshot-Damien.jpg",alt:"Headshot — Damien"},{src:"/images/headshot/Headshot-Natalie.jpg",alt:"Headshot — Natalie"},{src:"/images/headshot/Headshot-Julian.jpg",alt:"Headshot — Julian"},{src:"/images/headshot/Headshot-Sam.jpg",alt:"Headshot — Sam"}]},session_portrait:{title:"Portrait Session",openerImage:"/images/portrait/Portrait-Kaitlyn.jpg",openerAlt:"Creative portrait example",description:"A full portrait session — up to 2 hours, multiple looks and locations, creative direction throughout. Your giftee gets the session itself. Finished images are purchased separately afterward, so they choose their favorites.",carouselImages:[{src:"/images/portrait/Portrait-Kaitlyn.jpg",alt:"Portrait — Kaitlyn"},{src:"/images/portrait/Portrait-Celine.jpg",alt:"Portrait — Celine"},{src:"/images/portrait/Portrait-Eric.jpg",alt:"Portrait — Eric"},{src:"/images/portrait/Portrait-Jessica.jpg",alt:"Portrait — Jessica"},{src:"/images/portrait/Portrait-Sydnei.jpg",alt:"Portrait — Sydnei"}]},image_credits:{title:"Image Credits",openerImage:"/images/gift/Credits-headshots.jpg",openerAlt:"Image credits — sample work",description:"Each credit is redeemable for one finished, retouched high-resolution image from any session. Perfect as an add-on to a session gift, or on its own for someone who already has a session booked.",carouselImages:[{src:"/images/gift/Credits-headshots.jpg",alt:"Image credits — headshots"},{src:"/images/gift/Credits-portraits.jpg",alt:"Image credits — portraits"}]}};var f=e.i(334164);function g({headshotCents:e,portraitCents:t,imageCents:s,selectedItems:i,sessionType:r,onSelectionChange:n,onSessionTypeChange:l,onNext:o}){function d(a){return"session_headshot"===a?e:"session_portrait"===a?t:s}function c(e){l(e),n([{type:e,creditQuantity:"image_credits"===e?3:void 0,priceCents:"image_credits"===e?3*s:d(e)},...i.filter(a=>a.type!==e&&a.type!==r)]),o()}return(0,a.jsx)("div",{className:"gift-selection",children:(0,a.jsx)("div",{className:"gift-opener",children:(0,a.jsx)("div",{className:"gift-opener-grid",children:["session_headshot","session_portrait","image_credits"].map(e=>{let t=p[e];return(0,a.jsxs)("div",{className:"gift-opener-card",onClick:()=>c(e),role:"button",tabIndex:0,onKeyDown:a=>{("Enter"===a.key||" "===a.key)&&(a.preventDefault(),c(e))},children:[(0,a.jsx)("div",{className:`gift-opener-image${"image_credits"===e?" gift-opener-image--credits":""}`,children:(0,a.jsx)(h.default,{src:t.openerImage,alt:t.openerAlt,width:600,height:400,sizes:"(max-width: 950px) 100vw, 33vw"})}),(0,a.jsx)("p",{className:"gift-opener-title",children:t.title}),(0,a.jsx)("p",{className:"gift-opener-price",children:"image_credits"===e?`${(0,f.formatCents)(s)}/image`:(0,f.formatCents)(d(e))}),(0,a.jsx)(m.default,{contentKey:`gift.opener.${e}.copy`,page:"gift",tag:"div",className:"gift-opener-copy",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."})]},e)})})})})}function b({quantity:e,onChange:t}){return(0,a.jsx)("div",{className:"gift-credit-stepper-wrap",onClick:e=>e.stopPropagation(),children:(0,a.jsxs)("div",{className:"gift-stepper",children:[(0,a.jsx)("button",{type:"button",className:"gift-stepper-btn",onClick:()=>t(Math.max(1,e-1)),disabled:e<=1,"aria-label":"Remove one credit",children:"−"}),(0,a.jsx)("span",{className:"gift-stepper-value",children:e}),(0,a.jsx)("button",{type:"button",className:"gift-stepper-btn",onClick:()=>t(Math.min(20,e+1)),disabled:e>=20,"aria-label":"Add one credit",children:"+"})]})})}function y({onPrev:e,onNext:t}){return(0,a.jsxs)("div",{className:"gift-config-left-nav",children:[(0,a.jsx)("button",{type:"button",onClick:e,"aria-label":"Previous image",children:(0,a.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,a.jsx)("button",{type:"button",onClick:t,"aria-label":"Next image",children:(0,a.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("polyline",{points:"9 18 15 12 9 6"})})})]})}function v({headshotCents:e,portraitCents:s,imageCents:i,onLocationCents:r,selectedItems:n,onSelectionChange:l,onNext:o}){let[d,c]=(0,t.useState)(()=>n.find(e=>"image_credits"===e.type)?.creditQuantity??3),[,u]=(0,t.useState)(0),[g,x]=(0,t.useState)(0),[j,N]=(0,t.useState)(()=>n[0]?.type??"session_headshot"),[k,w]=(0,t.useState)(null),C=k??j,[S,_]=(0,t.useState)(C);C!==S&&(_(C),x(0));let I=(0,t.useRef)(null),P=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=I.current,a=P.current;if(!e||!a)return;let t=e=>{let t=getComputedStyle(a).overflowY;if("auto"!==t&&"scroll"!==t)return;let{scrollTop:s,scrollHeight:i,clientHeight:r}=a;if(i<=r||e.deltaY>0&&s+r>=i-1||e.deltaY<0&&s<=0)return;e.preventDefault();let n=0===e.deltaMode?e.deltaY:1===e.deltaMode?40*e.deltaY:e.deltaY*r;a.scrollTop+=n};return e.addEventListener("wheel",t,{passive:!1,capture:!0}),()=>e.removeEventListener("wheel",t,{capture:!0})},[]);let D=(0,t.useRef)([]);(0,t.useEffect)(()=>{let e=D.current.filter(Boolean),a=P.current;if(0===e.length||!a)return;let t=new Float64Array(e.length),s=new IntersectionObserver(a=>{a.forEach(a=>{let s=e.indexOf(a.target);-1!==s&&(t[s]=a.intersectionRatio)});let s=0,i=0;for(let e=0;e<t.length;e++)t[e]>i&&(i=t[e],s=e);i>0&&u(s)},{threshold:[0,.1,.25,.5,.75,1],root:a});
1return e.forEach(e=>s.observe(e)),()=>s.disconnect()},[]);let T=(0,t.useCallback)((a,t)=>"session_headshot"===a?e:"session_portrait"===a?s:"image_credits"===a?i*(t??d):"on_location"===a?r:0,[e,s,i,r,d]),F=(0,t.useCallback)(e=>n.some(a=>a.type===e),[n]),E=(0,t.useCallback)(e=>{N(e),F(e)?l(n.filter(a=>a.type!==e)):l([...n,{type:e,creditQuantity:"image_credits"===e?d:void 0,priceCents:T(e)}])},[F,n,d,T,l]),$=(0,t.useCallback)(e=>{c(e),l(n.map(a=>"image_credits"===a.type?{...a,creditQuantity:e,priceCents:i*e}:a))},[n,i,l]),[L,A]=(0,t.useState)(!1),R=F("on_location"),M=(0,t.useCallback)(e=>{A(!0),e&&N("on_location"),e&&!R?l([...n,{type:"on_location",priceCents:r}]):!e&&R&&l(n.filter(e=>"on_location"!==e.type))},[n,R,r,l]),O="session_headshot"===C||"session_portrait"===C||"image_credits"===C,K=O?p[C].carouselImages:p.session_headshot.carouselImages,U=O?p[C].description:"Some of the best sessions happen away from the studio — at a home, an office, or somewhere that means something to the person being photographed. This option lets your giftee decide where they want to shoot.",B=n.reduce((e,a)=>e+a.priceCents,0);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"gift-configurator",ref:I,children:[(0,a.jsxs)("div",{className:"gift-config-left",children:[(0,a.jsxs)("div",{className:"gift-config-left-image-area",children:[(0,a.jsx)(h.default,{src:K[g]?.src??"",alt:K[g]?.alt??"",fill:!0,className:"gift-config-left-img",sizes:"(max-width: 950px) 0vw, 45vw"},`${C}-${g}`),K.length>1&&(0,a.jsx)(y,{onPrev:()=>x(e=>Math.max(0,e-1)),onNext:()=>x(e=>Math.min(K.length-1,e+1))})]}),K.length>1&&(0,a.jsx)("div",{className:"gift-config-left-dots",children:K.map((e,t)=>(0,a.jsx)("span",{className:`gift-config-left-dot${t===g?" active":""}`},t))}),(0,a.jsx)(m.default,{contentKey:`gift.configurator.${C}.description`,page:"gift",tag:"div",className:"gift-config-left-desc",children:U},`desc-${C}`)]}),(0,a.jsxs)("div",{className:"gift-config-right",ref:P,children:[(0,a.jsxs)("div",{ref:e=>{D.current[0]=e},className:"gift-config-section",children:[(0,a.jsxs)("h3",{className:"gift-config-section-heading",children:["Your Gift ",(0,a.jsx)("span",{className:"gift-config-section-hint",children:"Choose any or all"})]}),(0,a.jsxs)("div",{className:"gift-config-tiles",children:[["session_headshot","session_portrait","image_credits"].map(e=>(0,a.jsxs)("button",{type:"button",className:`booking-kit-choice gift-config-tile${F(e)?" selected":""}`,onClick:()=>E(e),onMouseEnter:()=>w(e),onMouseLeave:()=>w(null),children:[(0,a.jsx)("span",{className:"gift-tile-name",children:p[e].title}),(0,a.jsx)("span",{className:"gift-tile-price",children:"image_credits"===e?`${(0,f.formatCents)(i)}/image`:(0,f.formatCents)(T(e))})]},e)),F("image_credits")&&(0,a.jsx)("div",{className:"gift-config-tile-stepper",children:(0,a.jsx)(b,{quantity:d,onChange:$})})]})]}),(0,a.jsxs)("div",{ref:e=>{D.current[1]=e},className:"gift-config-section",children:[(0,a.jsx)("h3",{className:"gift-config-section-heading",children:"Work on Location"}),(0,a.jsxs)("div",{className:"gift-config-tiles",children:[(0,a.jsx)("button",{type:"button",className:`booking-kit-choice gift-config-tile${L&&!R?" selected":""}`,onClick:()=>M(!1),children:(0,a.jsx)("span",{className:"gift-tile-name",children:"No, thanks"})}),(0,a.jsxs)("button",{type:"button",className:`booking-kit-choice gift-config-tile${R?" selected":""}`,onClick:()=>M(!0),onMouseEnter:()=>w("on_location"),onMouseLeave:()=>w(null),children:[(0,a.jsx)("span",{className:"gift-tile-name",children:"Let them choose"}),(0,a.jsx)("span",{className:"gift-tile-price",children:(0,f.formatCents)(r)})]})]})]}),(0,a.jsx)("div",{className:"gift-config-continue",children:(0,a.jsxs)("button",{type:"button",className:"btn-primary small",onClick:o,children:["Continue — ",(0,f.formatCents)(B)]})})]})]}),(0,a.jsx)("div",{className:"gift-mobile-bar",children:(0,a.jsxs)("button",{type:"button",className:"btn-primary small",onClick:o,children:["Continue — ",(0,f.formatCents)(B)]})})]})}function x({senderName:e,senderEmail:s,onUpdate:i,onNext:r}){let n=(0,t.useId)(),l=(0,t.useId)(),o=(0,t.useId)(),d=(0,t.useId)(),[c,u]=(0,t.useState)({});return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"booking-kit-prompt",children:"Who’s this gift from?"}),(0,a.jsxs)("div",{className:"booking-kit-fields",children:[(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{htmlFor:n,children:"Your Name"}),(0,a.jsx)("input",{id:n,type:"text",autoComplete:"name",required:!0,"aria-required":"true","aria-invalid":!!c.name,"aria-describedby":c.name?o:void 0,value:e,onCh
1ange:e=>{i({senderName:e.target.value}),c.name&&u(e=>({...e,name:void 0}))}}),c.name&&(0,a.jsx)("p",{id:o,role:"alert",className:"field-error",children:c.name})]}),(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{htmlFor:l,children:"Your Email"}),(0,a.jsx)("input",{id:l,type:"email",autoComplete:"email",required:!0,"aria-required":"true","aria-invalid":!!c.email,"aria-describedby":c.email?d:void 0,value:s,onChange:e=>{i({senderEmail:e.target.value}),c.email&&u(e=>({...e,email:void 0}))}}),c.email&&(0,a.jsx)("p",{id:d,role:"alert",className:"field-error",children:c.email})]})]}),(0,a.jsx)("div",{className:"booking-kit-nav",children:(0,a.jsx)("button",{type:"button",className:"btn-primary small",onClick:function(){let a={};(e.trim()||(a.name="Please enter your name."),s.trim()?s.includes("@")||(a.email="Please enter a valid email."):a.email="Please enter your email.",Object.keys(a).length>0)?u(a):(u({}),r())},children:"Continue"})})]})}function j({recipientFirstName:e,recipientLastName:s,recipientEmail:i,onUpdate:r,onNext:n}){let l=(0,t.useId)(),o=(0,t.useId)(),d=(0,t.useId)(),c=(0,t.useId)(),u=(0,t.useId)(),h=(0,t.useId)(),[m,p]=(0,t.useState)({});return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"booking-kit-prompt",children:"Who are you gifting?"}),(0,a.jsxs)("div",{className:"booking-kit-fields",children:[(0,a.jsxs)("div",{className:"booking-kit-field-row",children:[(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{htmlFor:l,children:"First Name"}),(0,a.jsx)("input",{id:l,type:"text",autoComplete:"given-name",required:!0,"aria-required":"true","aria-invalid":!!m.first,"aria-describedby":m.first?c:void 0,value:e,onChange:e=>{r({recipientFirstName:e.target.value}),m.first&&p(e=>({...e,first:void 0}))}}),m.first&&(0,a.jsx)("p",{id:c,role:"alert",className:"field-error",children:m.first})]}),(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{htmlFor:o,children:"Last Name"}),(0,a.jsx)("input",{id:o,type:"text",autoComplete:"family-name",required:!0,"aria-required":"true","aria-invalid":!!m.last,"aria-describedby":m.last?u:void 0,value:s,onChange:e=>{r({recipientLastName:e.target.value}),m.last&&p(e=>({...e,last:void 0}))}}),m.last&&(0,a.jsx)("p",{id:u,role:"alert",className:"field-error",children:m.last})]})]}),(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{htmlFor:d,children:"Their Email"}),(0,a.jsx)("input",{id:d,type:"email",autoComplete:"off",required:!0,"aria-required":"true","aria-invalid":!!m.email,"aria-describedby":m.email?h:void 0,value:i,onChange:e=>{r({recipientEmail:e.target.value}),m.email&&p(e=>({...e,email:void 0}))}}),m.email&&(0,a.jsx)("p",{id:h,role:"alert",className:"field-error",children:m.email})]})]}),(0,a.jsx)("div",{className:"booking-kit-nav",children:(0,a.jsx)("button",{type:"button",className:"btn-primary small",onClick:function(){let a={};(e.trim()||(a.first="Please enter their first name."),s.trim()||(a.last="Please enter their last name."),i.trim()?i.includes("@")||(a.email="Please enter a valid email."):a.email="Please enter their email.",Object.keys(a).length>0)?p(a):(p({}),n())},children:"Continue"})})]})}var N=e.i(312567);function k({deliveryMethod:e,scheduledDate:s,onUpdate:i,onNext:r}){let n,l,o,d,c=(0,t.useId)(),[u,h]=(0,t.useState)(""),m=(l=(n=new Date).getFullYear(),o=String(n.getMonth()+1).padStart(2,"0"),d=String(n.getDate()).padStart(2,"0"),`${l}-${o}-${d}`);return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"booking-kit-prompt",children:"How should I deliver it?"}),(0,a.jsxs)("div",{className:"booking-kit-choices",role:"radiogroup","aria-label":"Delivery method",children:[(0,a.jsx)("button",{type:"button",role:"radio","aria-checked":"email"===e,className:`booking-kit-choice${"email"===e?" selected":""}`,onClick:()=>{i({deliveryMethod:"email"}),h("")},children:"Send it for me"}),(0,a.jsx)("button",{type:"button",role:"radio","aria-checked":"self"===e,className:`booking-kit-choice${"self"===e?" selected":""}`,onClick:()=>{i({deliveryMethod:"self",scheduledDate:""}),h("")},children:"I’ll deliver it myself"})]}),"email"===e&&(0,a.jsx)("div",{className:"booking-kit-fields",style:{marginTop:24},children:(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{id:c,children:"Send on (leave blank to send immediately)"}),(0,a.jsx)(N.default,{value:s,onChange:e=>i({scheduledDate:e}
1),minDate:m,placeholder:"Send immediately",twoDigitYear:"future",ariaLabelledBy:c})]})}),u&&(0,a.jsx)("p",{role:"alert",className:"field-error",style:{textAlign:"center",marginTop:12},children:u}),(0,a.jsx)("div",{className:"booking-kit-nav",children:(0,a.jsx)("button",{type:"button",className:"btn-primary small",onClick:function(){e?(h(""),r()):h("Please choose a delivery method.")},children:"Continue"})})]})}function w({items:e,senderName:s,recipientFirstName:i,recipientLastName:r,deliveryMethod:n,scheduledDate:l,message:o,onUpdate:d,onAddToBag:c}){let u=(0,t.useId)(),h=e.reduce((e,a)=>e+a.priceCents,0);return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"booking-kit-prompt",children:"Review your gift"}),(0,a.jsxs)("div",{className:"booking-kit-summary-card",children:[e.map((e,t)=>(0,a.jsxs)("div",{className:"booking-kit-summary-row",style:{cursor:"default"},children:[(0,a.jsx)("span",{className:"booking-kit-summary-label",children:function(e){switch(e.type){case"session_headshot":return"Headshot Session";case"session_portrait":return"Portrait Session";case"image_credits":return`Image Credits (\u00d7${e.creditQuantity??1})`;case"on_location":return"Work on Location"}}(e)}),(0,a.jsx)("span",{className:"booking-kit-summary-value",children:(0,f.formatCents)(e.priceCents)})]},`${e.type}-${t}`)),(0,a.jsxs)("div",{className:"booking-kit-summary-row",style:{cursor:"default"},children:[(0,a.jsx)("span",{className:"booking-kit-summary-label",children:"From"}),(0,a.jsx)("span",{className:"booking-kit-summary-value",children:s})]}),(0,a.jsxs)("div",{className:"booking-kit-summary-row",style:{cursor:"default"},children:[(0,a.jsx)("span",{className:"booking-kit-summary-label",children:"For"}),(0,a.jsxs)("span",{className:"booking-kit-summary-value",children:[i," ",r]})]}),(0,a.jsxs)("div",{className:"booking-kit-summary-row",style:{cursor:"default"},children:[(0,a.jsx)("span",{className:"booking-kit-summary-label",children:"Delivery"}),(0,a.jsx)("span",{className:"booking-kit-summary-value",children:function(){if("self"===n)return"You’ll deliver it";if(l){let e=new Date(l+"T12:00:00");return`Email on ${e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`}return"Email immediately"}()})]}),(0,a.jsxs)("div",{className:"booking-kit-summary-row",style:{borderTop:"1.5px solid var(--color-text)",marginTop:8,paddingTop:12,cursor:"default"},children:[(0,a.jsx)("span",{className:"booking-kit-summary-label",style:{fontWeight:400},children:"Total"}),(0,a.jsx)("span",{className:"booking-kit-summary-value",style:{fontWeight:400},children:(0,f.formatCents)(h)})]})]}),(0,a.jsx)("div",{className:"booking-kit-fields",style:{marginTop:24},children:(0,a.jsxs)("div",{className:"booking-kit-field",children:[(0,a.jsx)("label",{htmlFor:u,children:"Personal message (optional)"}),(0,a.jsx)("textarea",{id:u,placeholder:"Add a note to include with the gift...",rows:3,value:o,onChange:e=>d({message:e.target.value})})]})}),(0,a.jsx)("div",{className:"booking-kit-nav",children:(0,a.jsxs)("button",{type:"button",className:"btn-primary small",onClick:c,children:["Add to Bag — ",(0,f.formatCents)(h)]})})]})}e.s(["GiftFlow",0,function({headshotCents:e,portraitCents:n,imageCents:h,onLocationCents:m,senderInfo:p}){let{state:f,update:b,clearStorage:y,resetState:N}=function(){let e=(0,t.useRef)(!1),[a,s]=(0,t.useState)(()=>{try{let e=sessionStorage.getItem(o);if(e){let a=JSON.parse(e),t={...d,...a};for(let e of c)t[e]=d[e];return t}}catch{}return{...d}});(0,t.useEffect)(()=>{e.current=!0},[]),(0,t.useEffect)(()=>{if(e.current)try{sessionStorage.setItem(o,JSON.stringify(a))}catch{}},[a]);let i=(0,t.useCallback)(e=>{s(a=>({...a,...e}))},[]);return{state:a,update:i,clearStorage:(0,t.useCallback)(()=>{try{sessionStorage.removeItem(o)}catch{}},[]),resetState:(0,t.useCallback)(()=>{s({...d})},[])}}(),C=(0,u.useGiftCart)(),S=(0,t.useRef)(!1),_=(0,t.useRef)(C.clearInProgress),I=(0,t.useRef)(null);(0,t.useEffect)(()=>{p&&!S.current&&(S.current=!0,b({senderName:p.name,senderEmail:p.email}))},[p,b]);let P=!!p,D=P?5:6,{currentIndex:T,maxReachedIndex:F,isComplete:E,goNext:$,goBack:L,goForward:A,goTo:R,resetNavigation:M}=(0,s.useFlowNavigation)(D,e=>b(e),y);(0,t.useEffect)(()=>{_.current=C.clearInProgress}),(0,t.useEffect)(()=>{T>0&&window.scrollTo({top:0,behavior:"instant"})},[T]),(0,t.useEffect)(()=>
1{if(1===T)return document.body.classList.add("gift-configurator-active"),()=>document.body.classList.remove("gift-configurator-active")},[T]),(0,t.useEffect)(()=>{if(1===T){let e=f.items.reduce((e,a)=>e+a.priceCents,0);C.setInProgress(e,!0)}else C.clearInProgress()},[T,f.items,C.setInProgress,C.clearInProgress]),(0,t.useEffect)(()=>()=>{_.current()},[]);let O=(0,t.useCallback)(()=>{let e={id:crypto.randomUUID(),items:f.items,recipient:{firstName:f.recipientFirstName,lastName:f.recipientLastName,email:f.recipientEmail},sender:{name:f.senderName,email:f.senderEmail},delivery:{method:f.deliveryMethod,scheduledDate:f.scheduledDate||void 0},message:f.message,totalCents:f.items.reduce((e,a)=>e+a.priceCents,0)};C.addPackage(e),y(),N(),M()},[f,C,y,N,M]),K=(0,t.useMemo)(()=>{let t=[];return t.push((0,a.jsx)(g,{headshotCents:e,portraitCents:n,imageCents:h,selectedItems:f.items,sessionType:f.sessionType,onSelectionChange:e=>b({items:e}),onSessionTypeChange:e=>b({sessionType:e}),onNext:$},"selection")),t.push((0,a.jsx)(v,{headshotCents:e,portraitCents:n,imageCents:h,onLocationCents:m,selectedItems:f.items,onSelectionChange:e=>b({items:e}),onNext:$},"configurator")),P||t.push((0,a.jsx)(x,{senderName:f.senderName,senderEmail:f.senderEmail,onUpdate:b,onNext:$},"sender")),t.push((0,a.jsx)(j,{recipientFirstName:f.recipientFirstName,recipientLastName:f.recipientLastName,recipientEmail:f.recipientEmail,onUpdate:b,onNext:$},"recipient")),t.push((0,a.jsx)(k,{deliveryMethod:f.deliveryMethod,scheduledDate:f.scheduledDate,onUpdate:b,onNext:$},"delivery")),t.push((0,a.jsx)(w,{items:f.items,senderName:f.senderName,senderEmail:f.senderEmail,recipientFirstName:f.recipientFirstName,recipientLastName:f.recipientLastName,recipientEmail:f.recipientEmail,deliveryMethod:f.deliveryMethod,scheduledDate:f.scheduledDate,message:f.message,onUpdate:b,onAddToBag:O},"summary")),t},[e,n,h,m,P,f,b,$,O]);if(0===T)return(0,a.jsx)(l,{screenCount:D,currentIndex:T,maxReachedIndex:F,isComplete:E,screenLabels:["Gift","Configure",...P?[]:["Your Info"],"Recipient","Delivery","Summary"],goBack:L,goForward:A,goTo:R,children:(0,a.jsx)(i.BookingKitScreen,{children:K[0]},0)});let U={screenCount:D,currentIndex:T,maxReachedIndex:F,isComplete:E,screenLabels:["Gift","Configure",...P?[]:["Your Info"],"Recipient","Delivery","Summary"],goBack:L,goForward:A,goTo:R},B=(0,a.jsx)("button",{className:"booking-kit-exit",onClick:()=>R(0),"aria-label":"Go back",children:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("polyline",{points:"15 18 9 12 15 6"})})});return 1===T?(0,a.jsx)(l,{...U,children:(0,a.jsxs)("div",{className:"gift-flow-full",children:[B,K[1]]})}):(0,a.jsxs)("div",{ref:I,className:"booking-kit-takeover open",children:[B,(0,a.jsx)(l,{...U,children:(0,a.jsxs)("div",{className:"booking-kit-content",children:[(0,a.jsx)(i.BookingKitScreen,{children:K[T]},T),(0,a.jsx)(r.BookingKitDots,{})]})})]})}],184244)},625874,e=>{"use strict";var a=e.i(843476),t=e.i(657688);e.s(["default",0,function({src:e,alt:s,...i}){return(0,a.jsx)(t.default,{src:e,alt:s,unoptimized:!0,...i})}])},38698,e=>{"use strict";var a=e.i(940327);e.s(["addBagFavorite",0,function(e,t){return(0,a.apiFetch)("/api/dashboard/bag",{method:"PATCH",body:{booking_id:e,action:"add_favorite",image_id:t}})},"applyCancelCredit",0,function(e){return(0,a.apiFetch)("/api/dashboard/apply-cancel-credit",{method:"POST",body:{booking_id:e}})},"buildDeliverySession",0,function(e){return(0,a.apiFetch)(`/api/dashboard/delivery/session/${encodeURIComponent(e)}/build`,{method:"POST"})},"cancelImagePurchaseSelfService",0,function(e,t,s={}){return(0,a.apiFetch)("/api/dashboard/session-images/cancel-purchase",{method:"POST",body:{bookingId:e,imageIds:t},keepalive:s.keepalive})},"cancelVotingRound",0,function(e){return(0,a.apiFetch)("/api/dashboard/voting-rounds/cancel",{method:"POST",body:{booking_id:e}})},"chooseImageReturn",0,function(e){return(0,a.apiFetch)("/api/dashboard/image-returns/choose",{method:"POST",body:e})},"clearDashboardCookie",0,function(){return(0,a.apiFetch)("/api/dashboard/clear-cookie",{method:"POST"})},"clearServerBag",0,function(e){return(0,a.apiFetch)("/api/dashboard/bag",{method:"PATCH",body:{booking_id:e,action:"clear"}})},"createPublicGalleryShare",0,function(e){return(0,a.apiFetch)("/api/dashboard/gallery/create",{method:"POST",body:{bookingId:e}})},"createVotingToken",0,function(e){return(0,a.apiFetch)("/api/dashboard/voting-token",{method:"POST",body:e})},"dismissNudge",0,function(e){return(0,a.apiFetch)("/api/dashboard/dismiss-nudge",{method:"POST",body:{nudge:e}})},"dismissWelcome",0,function(){return(0,a.apiFetch)("/api/dashboard/dismiss-welcome",{method:"POST"})},"dropBagAwaitingPick",0,function(e,t){return(0,a.apiFetch)("/api/dashboard/bag",{method:"PATCH",body:{booking_id:e,action:"drop_awaiting_pick",image_id:t}}
1)},"getDashboardImages",0,function(e){return(0,a.apiFetch)(`/api/dashboard/images?booking_id=${encodeURIComponent(e)}`)},"getDeliveryDownload",0,function(e){return(0,a.apiFetch)(`/api/dashboard/delivery/${encodeURIComponent(e)}`,{retry:!1})},"getDeliveryManifest",0,function(e){let t=e?.clientIdForPeek?`?client=${encodeURIComponent(e.clientIdForPeek)}`:"";return(0,a.apiFetch)(`/api/dashboard/delivery/manifest${t}`)},"getFavorites",0,function(e){let t=e?.clientIdForPeek?`?client=${encodeURIComponent(e.clientIdForPeek)}`:"";return(0,a.apiFetch)(`/api/dashboard/favorites${t}`)},"getGroupGalleryImages",0,function(e,t){return(0,a.apiFetch)(`/api/dashboard/team-images?group_id=${encodeURIComponent(e)}&token=${encodeURIComponent(t)}`)},"getPrepGuide",0,function(e){return(0,a.apiFetch)(`/api/dashboard/prep-guide?booking_id=${encodeURIComponent(e)}`)},"getProfile",0,function(){return(0,a.apiFetch)("/api/dashboard/profile")},"getPublicGalleryShareData",0,function(e){return(0,a.apiFetch)(`/api/dashboard/gallery/data?bookingId=${encodeURIComponent(e)}`)},"getReturnsAwaitingChoice",0,function(){return(0,a.apiFetch)("/api/dashboard/image-returns")},"getSessionPickerData",0,function(e,t){let s=new URLSearchParams({surface:e});return t&&s.set("active",t),(0,a.apiFetch)(`/api/dashboard/session-picker?${s.toString()}`)},"getVotingResults",0,function(e){return(0,a.apiFetch)(`/api/dashboard/voting-results?booking_id=${encodeURIComponent(e)}`)},"getVotingRounds",0,function(e){return(0,a.apiFetch)(`/api/dashboard/voting-rounds?booking_id=${encodeURIComponent(e)}`)},"openVotingRound",0,function(e){return(0,a.apiFetch)("/api/dashboard/voting-rounds",{method:"POST",body:e})},"paySessionFee",0,function(e){return(0,a.apiFetch)("/api/dashboard/pay-session-fee",{method:"POST",body:e})},"pickProfilePhotoFromGallery",0,function(e){return(0,a.apiFetch)("/api/dashboard/profile-photo",{method:"POST",body:e})},"quoteBagPurchase",0,function(e,t,s){return(0,a.apiFetch)("/api/dashboard/purchase",{method:"POST",body:{booking_id:e,image_ids:t,quote_only:!0},signal:s?.signal,retry:!0})},"recordDeliveryCascadeOutcome",0,function(e,t,s){let i=s?.clientIdForPeek?`?client=${encodeURIComponent(s.clientIdForPeek)}`:"";return(0,a.apiFetch)(`/api/dashboard/delivery/cascade-complete${i}`,{method:"POST",body:{outcome:e,rows:t}})},"relocateBooking",0,function(e){return(0,a.apiFetch)("/api/dashboard/relocate",{method:"POST",body:e})},"removeBagFavorite",0,function(e,t){return(0,a.apiFetch)("/api/dashboard/bag",{method:"PATCH",body:{booking_id:e,action:"remove_favorite",image_id:t}})},"requestAccountDeletion",0,function(e){return(0,a.apiFetch)("/api/dashboard/request-deletion",{method:"POST",body:e})},"requestBookingCancel",0,function(e){return(0,a.apiFetch)("/api/dashboard/request-cancel",{method:"POST",body:e})},"requestDashboardLink",0,function(e){return(0,a.apiFetch)("/api/dashboard/request-link",{method:"POST",body:e})},"requestGroupCancel",0,function(e){return(0,a.apiFetch)("/api/dashboard/team-cancel-request",{method:"POST",body:e})},"requestImagePurchaseCancellation",0,function(e,t,s){return(0,a.apiFetch)("/api/dashboard/session-images/request-cancellation",{method:"POST",body:{bookingId:e,imageIds:t,reason:s}})},"rescheduleBooking",0,function(e){return(0,a.apiFetch)("/api/dashboard/reschedule",{method:"POST",body:e})},"resetVoting",0,function(e,t={}){let s=t.resetCounter?"&reset_counter=true":"";return(0,a.apiFetch)(`/api/dashboard/voting-rounds?booking_id=${encodeURIComponent(e)}${s}`,{method:"DELETE"})},"resetWelcome",0,function(){return(0,a.apiFetch)("/api/dashboard/dismiss-welcome",{method:"DELETE"})},"saveProfileFields",0,function(e){return(0,a.apiFetch)("/api/dashboard/profile",{method:"PUT",body:e})},"sendFeedback",0,function(e){return(0,a.apiFetch)("/api/dashboard/feedback",{method:"POST",body:e})},"sendReviewNudgeAction",0,function(e){return(0,a.apiFetch)("/api/dashboard/review-nudge",{method:"POST",body:e})},"setDashboardCookie",0,function(e){return(0,a.apiFetch)("/api/dashboard/set-cookie",{method:"POST",body:e})},"setFavorite",0,function(e){return(0,a.apiFetch)("/api/dashboard/set-favorite",{method:"POST",body:e})},"submitDashboardSurvey",0,function(e){return(0,a.apiFetch)("/api/dashboard/survey",{method:"POST",body:e})},"submitPocSurvey",0,function(e){return(0,a.apiFetch)("/api/dashboard/poc-survey",{method:"POST",body:e})},"submitPurchase",0,function(e){return(0,a.apiFetch)("/api/dashboard/purchase",{method:"POST",body:e})},"toggleFavorite",0,function(e){return(0,a.apiFetch)("/api/dashboard/favorites/toggle",{method:"POST",body:e})},"updateEmailPreferences",0,function(e){return(0,a.apiFetch)("/api/dashboard/email-preferences",{method:"PUT",body:e})},"updatePublicGalleryShare",0,function(e){return(0,a.apiFetch)("/api/dashboard/gallery/update",{method:"POST",body:e})},"withdrawImageReturn",0,function(e){return(0,a.apiFetch)("/api/dashboard/image-returns/withdraw",{method:"POST",body:e})}])},66570,e=>{"use strict";var a=e.i(940327);e.s(["buildTwoAndMoreDelivery",0,function(e){return(0,a.apiFetch)("/api/two-and-more/delivery",{method:"POST",body:e})},"checkoutTwoAndMore",0,function(e){return(0,a.apiFetch)("/api/two-and-more/checkout",{method:"POST",body:e})},"confirmFreeTwoAndMore",0,function(e){return(0,a.apiFetch)("/api/two-and-more/confirm-free",{method:"POST",body:e})},"fetchTwoAndMoreVoting",0,function(e,t){return(0,a.apiFetch)(`/api/two-and-more/voting?token=${encodeURIComponent(e)}`,{method:"GET",signal:t,retry:!1})},"pointTwoAndMoreOfferAt",0,function(e){return(0,a.apiFetch)("/api/two-and-more/offer-use",{method:"POST",body:e})},"pullOutTwoAndMore",0,function(e){return(0,a.apiFetch)("/api/two-and-more/pull-out",{method:"POST",body:e})},"recordTwoAndMoreDeliveryOutcome",0,function(e){return(0,a.apiFetch)("/api/two-and-more/delivery/outcome",{method:"POST",body:e})},"signTwoAndMoreContract",0,function(e){return(0,a.apiFetch)("/api/two-and-more/sign-contract",{method:"POST",body:e})},"signTwoAndMoreContractFromToken",0,function(e){return(0,a.apiFetch)("/api/two-and-more/sign-contract-from-token",{method:"POST",body:e})},"toggleTwoAndMoreColorVote",0,function(e){return(0,a.apiFetch)("/api/two-and-more/color-vote",{method:"POST",body:e})}])},384037,e=>{"use strict";var a=e.i(38698),t=e.i(66570),s=e.i(940327);let i="There's a problem packaging your photos. I've been notified and will email them to you directly while I work on it. You can re-download them here any time after it's fixed.";async function r(e){let{url:t}=await (0,a.getDeliveryDownload)(e);return!!(t?.startsWith("https://")||t?.startsWith("http://"))&&(window.location.href=t,!0)}function n(e){let a=document.createElement("a");a.href=e,a.rel="noopener",a.download="",document.body.appendChild(a),a.click(),a.remove()}function l(e){return new Promise(a=>setTimeout(a,e))}function o(e,a,t){let r=!1,n=a.delay??l,o=e.map(e=>({sessionBookingId:e.sessionBookingId,label:e.label,state:"queued"}));function d(){t.onUpdate(o.map(e=>({...e})))}return async function(){for(let e of o){if(r)return;e.state="packaging",d();let t=null,l=null,o=!1;for(let i=0;i<=2;i++){if(i>0&&(await n(3e3),r))return;try{t=await a.buildSession(e.sessionBookingId),l=null,o=!1;break}catch(e){if(r)return;if(l=e,o=!0,!function(e){if(e instanceof s.ApiError){let a=e.body&&"object"==typeof e.body?e.body.retryable:void 0;return!1!==a&&(e.status>=500||0===e.status||!0===a)}return!0}(e))break}}if(r)return;if(o){!function(e,a){let t=null;if(a instanceof s.ApiError&&a.body&&"object"==typeof a.body){let e=a.body.error;"string"==typeof e&&e.length>0&&(t=e)}e.state="failed",e.errorMessage=t??i}(e,l),d();continue}if(!t){e.state="failed",e.errorMessage=i,d();continue}e.state="downloading",d(),a.triggerDownload(t),e.state="done",d()}r||t.onFinish(o.map(e=>({...e})))}(),{cancel:()=>{r=!0}}}function d(e){return"string"==typeof e&&(e.startsWith("https://")||e.startsWith("http://"))?e:null}e.s(["navigateToDeliveryZip",0,r,"startDeliveryCascade",0,function(e,t){return o(e,{buildSession:async e=>d((await (0,a.buildDeliverySession)(e)).url),triggerDownload:n},t)},"startGroupSittingDownload",0,function(e,a,s){return o([a],{buildSession:async()=>d((await (0,t.buildTwoAndMoreDelivery)({token:e})).url),triggerDownload:n},s)}],384037)},522755,e=>{"use strict";var a=e.i(38698),t=e.i(470473),s=e.i(940327),i=e.i(205925);function r(e,a){return(0,i.buildReturnLine)(e,a)||"Your return is done."}async function n(e,t,s={}){let i=await (0,a.cancelImagePurchaseSelfService)(e,t,s),l=i?.awaitingChoice??[];return{waiting:l,line:l.length>0?"":r(i?.refundedCents??0,i?.creditsReturned??0)}}async function l(e,t){let s=await (0,a.chooseImageReturn)({returnId:e,choice:t});return r(s.refundedCents,s.creditsReturned)}async function o(e){return await (0,a.withdrawImageReturn)({returnId:e.returnId}),(0,i.keptLine)(e.imageIds.length)}async function d(e){let t=await (0,a.getReturnsAwaitingChoice)();return(t?.returns??[]).filter(a=>a.bookingId===e)}function c(e,a){if(e instanceof s.ApiError){let a=e.body;if(a?.error&&"IMAGES_DELIVERED"!==a.error)return a.error}return a}
1async function u(e,a,n){try{if("keep"===a){let s=await (0,t.submitReturnChoice)({token:e,choice:a});return{kind:"kept",line:(0,i.keptLine)(s.imageIds?.length??n?.imageCount??1)}}let s=await (0,t.submitReturnChoice)({token:e,choice:a});return{kind:"done",line:r(s.refundedCents,s.creditsReturned)}}catch(a){if(a instanceof s.ApiError&&409===a.status)return m(e);if(n)return{...n,error:c(a,"Couldn’t finish your return—please give it another try.")};return{kind:"invalid"}}}async function h(e){return m(e)}async function m(e){let a;try{a=await (0,t.getReturnChoice)(e)}catch{return{kind:"invalid"}}switch(a.status){case"awaiting_choice":if(!a.options)return{kind:"invalid"};return{kind:"ask",imageCount:a.imageCount,firstName:a.clientFirstName,options:a.options};case"completed":return{kind:"done",line:r(a.refundedCents,a.creditsReturned)};case"withdrawn":if(a.kept)return{kind:"kept",line:(0,i.keptLine)(a.imageCount)};return{kind:"withdrawn",imageCount:a.imageCount};case"completing":return{kind:"completing"};default:return{kind:"invalid"}}}e.s(["isDeliveredRefusal",0,function(e){if(!(e instanceof s.ApiError)||409!==e.status)return!1;let a=e.body;return a?.error==="IMAGES_DELIVERED"},"keepReturn",0,o,"loadWaitingReturns",0,d,"pickReturn",0,l,"resolveReturnChoiceLanding",0,h,"returnErrorMessage",0,c,"returnImagesSelfService",0,n,"submitLandingPick",0,u])},300695,e=>{"use strict";e.s(["contractIsSigned",0,function(e){return null!=e.contract_signed_at||null!=e.contract_signed_elsewhere_at}])},959796,e=>{"use strict";let a=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;e.s(["isValidEmail",0,function(e){return!!e&&a.test(e.trim())}])},205925,e=>{"use strict";var a=e.i(334164);function t(e){return 1===e?"your image":`your ${e} images`}function s(e){return 1===e?"an image credit":`${e} image credits`}e.s(["DEFAULT_IMAGE_RETURN_REMINDER_HOURS",0,2,"buildReturnLine",0,function(e,t){let s=e>0?(0,a.formatCentsToDollars)(e):"";if(s&&t>0){let e=1===t?"one image credit is":`${t} image credits are`;return`${s} is on its way back to your card, and ${e} back on your account.`}if(s)return`${s} is on its way back to your card—it usually shows up in 5–10 business days.`;if(t>0){let e=1===t?"One image credit is":`${t} image credits are`;return`${e} back on your account, ready whenever you’d like to pick another.`}return""},"choiceLabel",0,function(e,t){let i=e.refundCents>0?(0,a.formatCentsToDollars)(e.refundCents):"";if("credit"===t){let a=`Give me ${s(Math.max(e.credits,1))}`;return i?`${a} and ${i} back to my card`:a}let r=i?`Refund ${i} to my card`:"Refund my card";return e.credits>0?`${r} and give me ${s(e.credits)}`:r},"imagePhrase",0,t,"keepLabel",0,function(e){return 1===e?"Keep my photo":"Keep my photos"},"keepPrompt",0,function(e){return`Would you rather keep ${1===e?"it":"them"}? Nothing is refunded.`},"keptLine",0,function(e){return`I’ve called off the return of ${t(e)}—nothing was refunded, and your gallery stays just as it was.`}])},397321,e=>{"use strict";var a=e.i(54352),t=e.i(317896);function s(e){return e===a.INVOICE_STATUS.SENT||e===a.INVOICE_STATUS.DRAFT}e.s(["applyImageCreditsToLineItems",0,function(e,a){let t=e.map(e=>({...e}));if(a<=0)return{lineItems:t,creditsUsed:0};let s=a;for(let e of t){if(s<=0)break;e.image_id&&!e.comped&&!e.addon_for_image_id&&(e.comped=!0,e.original_amount_cents=e.amount_cents,e.amount_cents=0,s--)}return{lineItems:t,creditsUsed:a-s}},"applyOffersToLineItems",0,function(e,a){return{lineItems:e.map(e=>({...e})),appliedOfferIds:[]}},"findOldestUnpaidInvoice",0,function(e){for(let a=e.length-1;a>=0;a--){let t=e[a];if(s(t.status)&&!t.paid_at)return t}return null},"findReusableSittingFeeInvoice",0,function(e){return e.find(e=>s(e.status)&&e.charges_for_the_sitting&&!e.is_location_fee)??null},"invoiceCreditLines",0,function(e,a){let t=[];for(let a of e){if(!a.comped||!a.original_amount_cents)continue;let e=a.addon_for_image_id?"Add-on credit":a.image_id?"Image credit":a.description;t.push({kind:"comped",label:e,cents:a.original_amount_cents*a.quantity})}let s=Math.max(0,a.referral_credit_cents_applied??0);s>0&&t.push({kind:"referral",label:"Referral credit",cents:s});let i=Math.max(0,a.discount_cents??0);for(let s of(i>0&&t.push({kind:"discount",label:a.discount_reason||"Discount",cents:i}),e))s.comped||s.amount_cents>=0||t.push({kind:"credit_row",label:s.quantity>1?`${s.description} \u00d7 ${s.quantity}`:s.description,cents:-s.amount_cents*s.quantity});return t},"isUnpaidInvoiceStatus",0,s,"sortLineItemsCompedFirst",0,function(e){let a=e.filter(e=>!e.addon_for_image_id),t=e.filter(e=>e.addon_for_image_id),s=[...a.filter(e=>e.comped),...a.filter(e=>!e.comped)],i=[];for(let e of s)if(i.push(e),e.image_id){let a=t.filter(a=>a.addon_for_image_id===e.image_id);i.push(...a)}return i},"splitIntoInstallments",0,function(e,a){let s=Math.ceil(e/2);return{installment1:{amount_cents:s,due_at:a},installment2:{amount_cents:e-s,due_at:(0,t.shiftYmd)(a,14)}}},"sumCreditCents",0,function(e){return e.reduce((e,a)=>e+a.cents,0)}])},188594,e=>{"use strict";var a=e.i(54352),t=e.i(397321),s=e.i(990960);function i(e){let a=(e??[]).filter(e=>e.amount_cents>0);return a.length>0&&a.every(e=>e.amount_cents>0&&e.description.startsWith("Location fee"))}e.s(["findPaidLocationFeeInvoice",0,function(e){return e.find(e=>e.status===a.INVOICE_STATUS.PAID&&i(e.line_items))??null},"findUnpaidLocationFeeInvoice",0,function(e){return e.find(e=>(0,t.isUnpaidInvoiceStatus)(e.status)&&i(e.line_items))??null},"locationFeeCashCents",0,function(e){let a=Math.max(0,e.locationFeeCents);if(e.hasOwnFeeInvoice)return a;let{feeDiscountCents:t}=(0,s.priceSettledBooking)({basePriceCents:e.basePriceCents,locationFeeCents:a,discountCents:e.discountCents,discountDescription:e.discountDescription,discountLines:e.discountLines});return Math.max(0,a-t)}],188594)},708801,e=>{"use strict";let a=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function t(){return crypto.randomUUID()}e.s(["clickRequestIds",0,function(){let e=new Map;return{idFor(a){let s=e.get(a);return s||(s=t(),e.set(a,s)),s},landed(a){e.delete(a)}}},"newRequestId",0,t,"readRequestId",0,function(e){return"string"==typeof e&&a.test(e)?e:null}],708801)}]);

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.