1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8144],{98098:function(e,t,a){a.d(t,{Z:function(){return u}});var n=a(57437),r=a(36760),i=a.n(r),l=a(2265),s=a(20138),o=a(95804),c=a(18406);class u extends l.PureComponent{blur(){var e;null===(e=this.inputRef.current)||void 0===e||e.blur()}focus(){var e;null===(e=this.inputRef.current)||void 0===e||e.focus()}render(){let{children:e,className:t,disabled:a,error:r,hideClear:l,id:u,ignoreDirty:d,inputClassName:m,multiline:f=!1,name:p,readOnly:h,submitting:b,value:x,...y}=this.props,{dirty:g}=this.state;return(0,n.jsxs)("div",{className:i()("relative flex flex-row items-center justify-start",t),children:[f?(0,n.jsx)("textarea",{...y,ref:this.inputRef,className:i()("textarea",m,(g||d)&&r&&"error"),disabled:a||b,id:u||p,name:p,readOnly:h,value:x,onBlur:this.handleBlur,onInput:this.handleChange}):(0,n.jsx)("input",{...y,ref:this.inputRef,className:i()("input",m,(g||d)&&r&&"error"),disabled:a||b,id:u||p,name:p,readOnly:h,value:x,onBlur:this.handleBlur,onInput:this.handleChange}),e,!l&&!!x&&!h&&!b&&(0,n.jsx)(o.Z,{"aria-label":"Clear",className:i()("clear-button btn-transparent btn-icon-small absolute",f?"bottom-2 right-2":"right-4 top-1/2 -translate-y-1/2"),type:"button",onClick:this.handleClear,children:(0,n.jsx)(s.Z,{className:"size-6 fill-gray-500"})}),b&&(0,n.jsx)(c.Z,{className:"absolute right-6 top-1/2 -translate-y-1/2 scale-50"}),(g||d)&&r&&(0,n.jsx)("div",{className:"absolute inset-x-4 top-full z-10 -mt-px flex translate-y-px flex-row items-center justify-start rounded-b-lg bg-background-layer-3 px-2 py-1 text-xs text-white",children:r})]})}constructor(...e){super(...e),this.inputRef=l.createRef(),this.state={dirty:!1},this.handleChange=e=>{this.props.onInput(e.target.value)},this.handleBlur=()=>{this.setState({dirty:!0})},this.handleClear=()=>{this.props.onInput("")}}}},14922:function(e,t,a){a.d(t,{Z:function(){return d}});
1var n=a(57437),r=a(61896),i=a(36760),l=a.n(i),s=a(2265),o=a(48202),c=a(20138),u=a(95804);function d(e){let{children:t,className:a,closeClass:i,closeButtonClass:d,customPosition:m,dialog:f,hideClose:p,id:h,onClose:b,open:x,openClass:y,overlay:g,...v}=e,[k,N]=(0,s.useState)(!1),[j,w]=(0,s.useState)(!0),E=(0,s.createRef)();return(f||(0,o.Z)({element:E,onClose:b,open:!j}),(0,s.useEffect)(()=>{let e;return x?(w(!1),e=setTimeout(()=>{requestAnimationFrame(()=>{N(!0)})},100)):(N(!1),e=setTimeout(()=>w(!0),300)),()=>{clearTimeout(e)}},[x]),j)?null:(0,n.jsxs)(r.ll,{children:[g&&(0,n.jsx)("div",{className:l()("modal-overlay fixed inset-0 z-50 bg-black/50 backdrop-blur transition-opacity",!k&&"opacity-0"),onScroll:e=>e.stopPropagation()}),(0,n.jsxs)("div",{ref:E,...v,className:l()("modal max-size-full fixed z-50 flex flex-col overflow-auto rounded-2xl",!m&&"left-1/2 top-1/2 -translate-x-1/2","transform-gpu transition-[opacity,transform] lg:shadow-[0_0_10px_rgba(0,0,0,0.5)]",!m&&(k?null!=y?y:"-translate-y-1/2":null!=i?i:"translate-y-[calc(-50%-30px)]"),!k&&"opacity-0",a),id:h,role:"dialog",onScroll:e=>e.stopPropagation(),children:[t,!p&&(0,n.jsx)(u.Z,{"aria-label":"Close Modal",className:l()("btn-secondary btn-icon-small absolute right-2 top-2",d),onClick:e=>{e.stopPropagation(),b()},children:(0,n.jsx)(c.Z,{className:"size-4"})})]})]})}},98144:function(e,t,a){a.d(t,{default:function(){return o}});var n=a(57437),r=a(27648),i=a(2265),l=a(14922),s=a(61824);function o(){let[e,t]=(0,i.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{"aria-label":"Open Feedback",className:"link",onClick:e=>{t(!0),e.stopPropagation()},children:"Leave Feedback"}),(0,n.jsx)(l.Z,{overlay:!0,"aria-label":"Let us know what happened",className:"max-w-modal bg-white text-background",id:"error-feedback-modal",open:e,onClose:()=>{t(!1)},children:(0,n.jsx)(s.Z,{open:e,onClose:()=>t(!1),children:(0,n.jsx)(r.default,{"aria-label":"Complete Feedback",className:"link-primary",href:"/",prefetch:!1,children:"Go Home"})})})]})}},61824:function(e,t,a){a.d(t,{Z:function(){return h}});var n=a(57437),r=a(2265),i=a(44984),l=a(85518),s=a(4374),o=a(26474),c=a(95804),u=a(98098),d=a(36760),m=a.n(d);function f(e){let{active:t,image:a,onClick:r,title:i}=e;return(0,n.jsxs)("button",{className:m()("group flex w-[66px] flex-col items-center justify-center gap-2 opacity-40 hover:opacity-100",t&&"!opacity-100"),type:"button",onClick:r,children:[(0,n.jsx)("img",{alt:i,className:m()("transition-[opacity,transform] duration-100 group-hover:scale-105",t&&"!scale-105"),height:"61",loading:"lazy",src:a,width:"61"}),(0,n.jsx)("span",{className:m()("text-xs opacity-0 transition-opacity duration-100 group-hover:opacity-100",t&&"!opacity-100"),children:i})]})}let p={NONE:-1,TERRIBLE:1,FINE:2,WONDERFUL:3};function h(e){let{children:t,onClose:a,open:d}=e,[m,h]=(0,r.useState)(),[b,x]=(0,r.useState)(p.NONE),[y,g]=(0,r.useState)(""),[v,k]=(0,r.useState)(!1),[N,j]=(0,r.useState)(""),[w,E]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!1),{addToast:Z}=(0,l.e)(),F=(0,r.useRef)(null),R=(0,r.useRef)(null),{loggedIn:z,user:O}=(0,i.a)();(0,r.useEffect)(()=>{b!==p.NONE&&requestAnimationFrame(()=>{var e;null===(e=F.current)||void 0===e||e.focus()})},[b]);let T=()=>{h(void 0),x(p.NONE),g(""),j(""),E(!1),k(!1),S(!1)};async function I(e){if(e.preventDefault(),!C){if(!y){var t;k(!0),null===(t=F.current)||void 0===t||t.focus();return}k(!1),S(!0);try{let e=await (0,s.Z)("/api/".concat(z?"feedback":"feedback-anonymous"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comments:{experience:y},email:null==O?void 0:O.email,userId:null==O?void 0:O.id,sentiment:b,url:window.location.href})}),t=await e.json();h(t),E(!!(null==O?void 0:O.email))}catch(e){console.error(e),Z({type:"error",message:"Sorry, we're feeling bad right now and can't take your feedback. Keep going, you got it!"})}finally{S(!1)}}}async function L(e){if(e.preventDefault(),m&&!C){if(!N){var t;k(!0),null===(t=R.current)||void 0===t||t.focus();return}S(!0),k(!1);try{let e=await (0,s.Z)("/api/".concat(z?"feedback":"feedback-anonymous","/").concat(m.id),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...m,email:N})}),t=await e.json();h(t),E(!0)}catch(e){console.error(e),Z({type:"error",message:"Sorry, we're feeling bad right now and can't take your feedback. Keep going, you got it!"})}finally{S(!1)}}}(0,r.useEffect)(()=>{w&&m&&!d&&T()},[m,w,d]);let P="flex flex-col justify-center items-center text-center w-full min-h-[325px] bg-white rounded-lg text-background pt-12 pb-8 px-8 gap-4";return(0,n.jsxs)(n.Fragment,{children:[!m&&(0,n.jsxs)("form",{action:"#",className:P,onSubmit:I,children:[b===p.NONE&&(0,n.jsx)("div",{className:"p-2 text-lg",children:"How would you rate your experience?"}),(0,n.jsxs)("div",{className:"flex w-full flex-row items-center justify-between p-4",children:[(0,n.jsx)(f,{active:b===p.TERRIBLE,image:"/feedback/terrible.svg",title:"Terrible",onClick:()=>x(p.TERRIBLE)}),(0,n.jsx)(f,{active:b===p.FINE,image:"/feedback/fine.svg",title:"Fine",onClick:()=>x(p.FINE)}),(0,n.jsx)(f,{active:b===p.WONDERFUL,image:"/feedback/wonderful.svg",title:"Wonderful",onClick:()=>x(p.WONDERFUL)})]}),b!==p.NONE&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Z,{ref:F,multiline:!0,"aria-label":"Your Experience",autoComplete:"off",className:"mb-4 h-[95px] min-h-0 w-full",error:!y&&"Please add some details about your experience.",ignoreDirty:v,inputClassName:"bg-white border-background-layer-3 text-background",name:"experience",placeholder:"Tell us about your experience...",value:y,onInput:g}),(0,n.jsx)("div",{className:"flex flex-row items-center justify-center",children:(0,n.jsx)(c.Z,{"aria-label":"Submit Feedback",className:"btn-primary btn-medium",submitting:C,type:"submit",children:"Submit"})})]})]}),m&&!w&&(0,n.jsxs)("form",{action:"#",className:P,onSubmit:L,children:[(0,n.jsx)("div",{className:"p-2 text-lg",children:"Thanks! We might have some more questions. Enter your email if it's okay for us to reach out to you for more details."}),(0,n.jsx)(u.Z,{ref:R,"aria-label":"Email",className:"mb-4 grow-0",error:!(0,o.Z)(N)&&"Please enter a valid email.",ignoreDirty:v,inputClassName:"bg-white border-background-layer-3 text-background",name:"email",placeholder:"[email protected]",type:"email",value:N,onInput:j}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-center gap-4",children:[(0,n.jsx)("button",{"aria-label":"Skip",className:"link-primary",onClick:e=>{e.stopPropagation(),E(!0)},children:"Skip"}),(0,n.jsx)(c.Z,{"aria-label":"Submit Email",className:"btn-primary btn-medium",submitting:C,type:"submit",children:"Submit"})]})]}),m&&w&&(0,n.jsxs)("div",{className:P,children:[(0,n.jsx)("img",{alt:"Thank y
1ou for your feedback!",loading:"lazy",src:"/feedback/thanks.svg"}),(0,n.jsx)("div",{className:"p-2 text-lg",children:"For your feedback thank you!"}),(0,n.jsx)("div",{className:"flex flex-row items-center justify-center gap-4",children:t||(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{"aria-label":"Start over",className:"link-primary",onClick:e=>{e.stopPropagation(),T()},children:"Start over"}),(0,n.jsx)(c.Z,{"aria-label":"Close Feedback",className:"btn-primary btn-medium",onClick:a,children:"Close"})]})})]})]})}},48202:function(e,t,a){a.d(t,{Z:function(){return i}});var n=a(2265),r=a(67138);function i(e){let{element:t,onClose:a,open:i}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,n.useEffect)(()=>{function e(e){if((0,r.E)(e)||!t.current||!i)return;let n=e.target;for(;n;){if(n===t.current||"svg"===n.nodeName.toLowerCase())return;n=n.parentNode}a()}function n(e){"Escape"===e.key&&a()}return i&&(document.addEventListener("click",e),document.addEventListener("keyup",n)),()=>{document.removeEventListener("click",e),document.removeEventListener("keyup",n)}},l.concat(t,a,i))}},67138:function(e,t,a){a.d(t,{E:function(){return n}});function n(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}},26474:function(e,t,a){a.d(t,{Z:function(){return r}});let n=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function r(e){return n.test(e)}}}]);
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.