1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2660],{18508:(e,t,a)=>{a.d(t,{FeedbackProblemButton:()=>l});var r=a(84002),n=a(5457),o=a(89412),s=a(89387);function l(e){let{rfpId:t,surface:a,errorRef:l,source:i="error",label:c="Report this problem",compact:d=!1}=e,{openFeedback:u}=(0,s.useFeedback)();return(0,o.rD)()?(0,r.jsxs)("button",{type:"button",onClick:()=>u({category:"problem",source:i,rfpId:t,surface:a,errorRef:null!=l?l:(0,o.RA)()}),className:d?"inline-flex items-center gap-1 text-[11px] font-medium text-rose-700 underline decoration-rose-300 underline-offset-2 hover:text-rose-900":"inline-flex items-center gap-1.5 rounded-md border border-rose-200 bg-white px-3 py-1.5 text-xs font-medium text-rose-700 transition-colors hover:bg-rose-50",children:[(0,r.jsx)(n.A,{size:d?12:14,"aria-hidden":"true"}),c]}):null}},62660:(e,t,a)=>{a.d(t,{F:()=>n.FeedbackProblemButton,j8:()=>r.useFeedback});var r=a(89387),n=a(18508)},89387:(e,t,a)=>{a.d(t,{FeedbackProvider:()=>p,useFeedback:()=>b});var r=a(84002),n=a(34666),o=a(91634),s=a(40943),l=a(42384),i=a(43353),c=a(82720),d=a(78124);let u=[{value:"problem",label:"Problem"},{value:"idea",label:"Idea"},{value:"question",label:"Question"},{value:"other",label:"Other"}];function m(e){let{open:t,request:a,onOpenChange:m}=e,x=(0,c.usePathname)(),[h,p]=(0,n.useState)(a.category),[b,f]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[y,j]=(0,n.useState)(!1),[w,k]=(0,n.useState)(null),[N,C]=(0,n.useState)(null);async function _(e){if(e.preventDefault(),b.trim()&&!y){j(!0),k(null);try{let e=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({category:h,source:a.source,message:b,...x?{page_path:x}:{},...a.rfpId?{rfp_id:a.rfpId}:{},...a.surface?{surface:a.surface}:{},...a.errorRef?{error_ref:a.errorRef}:{},client_context:function(){let e={},t=d.env.NEXT_PUBLIC_APP_VERSION;t&&(e.appVersion=t.slice(0,100)),e.viewport={width:Math.max(1,Math.round(window.innerWidth)),height:Math.max(1,Math.round(window.innerHeight))},"undefined"!=typeof navigator&&(navigator.language&&(e.locale=navigator.language.slice(0,35)),e.online=navigator.onLine);try{let t=Intl.DateTimeFormat().resolvedOptions().timeZone;t&&(e.timezone=t.slice(0,100))}catch(e){}return e}(),contact_allowed:g})}),r=await e.json().catch(()=>null);if(!e.ok||!(null==r?void 0:r.reference)){var t;throw Error(null!=(t=null==r?void 0:r.error)?t:"We couldn't send your feedback. Please try again.")}C(r.reference)}catch(e){k(e instanceof Error?e.message:"We couldn't send your feedback. Please try again.")}finally{j(!1)}}}return(0,n.useEffect)(()=>{t&&(p(a.category),f(""),v(!1),j(!1),k(null),C(null))},[t,a.nonce,a.category]),(0,r.jsx)(o.bL,{open:t,onOpenChange:m,children:(0,r.jsxs)(o.ZL,{children:[(0,r.jsx)(o.hJ,{className:"fixed inset-0 z-[100] bg-slate-950/40 backdrop-blur-[1px]"}),(0,r.jsxs)(o.UC,{className:"fixed left-1/2 top-1/2 z-[101] max-h-[calc(100vh-2rem)] w-[calc(100vw-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-xl border border-slate-200 bg-white p-6 shadow-2xl focus:outline-none",children:[(0,r.jsx)(o.bm,{asChild:!0,children:(0,r.jsx)("button",{type:"button","aria-label":"Close feedback dialog",className:"absolute right-4 top-4 roun
1ded-md p-1.5 text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-teal-700",children:(0,r.jsx)(s.A,{size:18})})}),N?(0,r.jsxs)("div",{className:"py-5 text-center",role:"status","aria-live":"polite",children:[(0,r.jsx)(l.A,{className:"mx-auto h-10 w-10 text-emerald-600"}),(0,r.jsx)(o.hE,{className:"mt-4 text-lg font-semibold text-slate-950",children:"Thanks for the feedback"}),(0,r.jsxs)(o.VY,{className:"mt-2 text-sm text-slate-600",children:["Your report was received as"," ",(0,r.jsx)("span",{className:"font-mono font-semibold text-slate-900",children:N}),"."]}),(0,r.jsx)(o.bm,{asChild:!0,children:(0,r.jsx)("button",{type:"button",className:"mt-6 rounded-md px-4 py-2 text-sm font-semibold text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-teal-700 focus-visible:ring-offset-2",style:{backgroundColor:"var(--deep-teal)"},children:"Done"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.hE,{className:"pr-8 text-lg font-semibold text-slate-950",children:"Send feedback"}),(0,r.jsx)(o.VY,{className:"mt-1 text-sm text-slate-600",children:"Tell us what is not working, ask a question, or share an idea."}),(0,r.jsxs)("form",{className:"mt-5 space-y-4",onSubmit:_,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"feedback-category",className:"block text-sm font-medium text-slate-800",children:"Type"}),(0,r.jsx)("select",{id:"feedback-category",value:h,onChange:e=>p(e.target.value),className:"mt-1.5 w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 focus:border-teal-700 focus:outline-none focus:ring-2 focus:ring-teal-700/20",children:u.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"feedback-message",className:"block text-sm font-medium text-slate-800",children:"header"===a.source?"What would you like us to know?":"What were you trying to do?"}),(0,r.jsx)("textarea",{id:"feedback-message",value:b,onChange:e=>f(e.target.value),maxLength:4e3,required:!0,rows:6,autoFocus:!0,placeholder:"Include the steps you took and what you expected to happen.",className:"mt-1.5 w-full resize-y rounded-md border border-slate-300 px-3 py-2 text-sm text-slate-900 placeholder:text-slate-400 focus:border-teal-700 focus:outline-none focus:ring-2 focus:ring-teal-700/20"}),(0,r.jsxs)("div",{className:"mt-1 text-right text-xs text-slate-500",children:[b.length.toLocaleString()," / 4,000"]})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-2.5 text-sm text-slate-700",children:[(0,r.jsx)("input",{type:"checkbox",checked:g,onChange:e=>v(e.target.checked),className:"mt-0.5 h-4 w-4 rounded border-slate-300 text-teal-700 focus:ring-teal-700"}),(0,r.jsx)("span",{children:"You can contact me about this feedback."})]}),(0,r.jsx)("div",{className:"rounded-md bg-slate-50 px-3 py-2.5 text-xs leading-5 text-slate-600",children:"To help us investigate, we'll include basic details about your device and the page you're on. We won't attach files, screenshots, or conversation content."}),w?(0,r.jsx)("p",{className:"text-sm text-rose-700",role:"alert",children:w}):null,(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-1",children:[(0,r.jsx)(o.bm,{asChild:!0,children:(0,r.jsx)("button",{type:"button",disabled:y,className:"rounded-md border border-slate-300 px-4 py-2 text-sm font-medium text-slate-700 transition-colors hover:bg-slate-50 disabled:opacity-50",children:"Cancel"})}),(0,r.jsxs)("button",{type:"submit",disabled:y||!b.trim(),className:"inline-flex min-w-24 items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-semibold text-white transition-opacity disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundColor:"var(--deep-teal)"},children:[y?(0,r.jsx)(i.A,{size:16,className:"animate-spin"}):null,y?"Sendingâ¦":"Send feedback"]})]})]})]})]})]})})}let x=(0,n.createContext)(null),h={nonce:0,category:"other",source:"header"};function p(e){let{children:t}
1=e,[a,o]=(0,n.useState)(!1),[s,l]=(0,n.useState)(h),i=(0,n.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(t=>{var a,r;return{nonce:t.nonce+1,category:null!=(a=e.category)?a:"other",source:null!=(r=e.source)?r:"header",...e.rfpId?{rfpId:e.rfpId}:{},...e.surface?{surface:e.surface}:{},...e.errorRef?{errorRef:e.errorRef}:{}}}),o(!0)},[]),c=(0,n.useMemo)(()=>({openFeedback:i}),[i]);return(0,r.jsxs)(x.Provider,{value:c,children:[t,(0,r.jsx)(m,{open:a,request:s,onOpenChange:o})]})}function b(){let e=(0,n.useContext)(x);if(!e)throw Error("useFeedback must be used inside FeedbackProvider");return e}},89412:(e,t,a)=>{a.d(t,{RA:()=>c,rD:()=>i});var r=a(33477),n=a(78124);let o=r.string().trim().min(1).max(100).regex(/^[A-Za-z0-9._:-]+$/),s=r.object({appVersion:r.string().trim().min(1).max(100).optional(),browser:r.string().trim().min(1).max(100).optional(),os:r.string().trim().min(1).max(100).optional(),viewport:r.object({width:r.number().int().min(1).max(1e5),height:r.number().int().min(1).max(1e5)}).strict().optional(),locale:r.string().trim().min(1).max(35).optional(),timezone:r.string().trim().min(1).max(100).optional(),online:r.boolean().optional()}).strict(),l=r.string().trim().max(2048).transform(function(e){var t;return null!=(t=e.trim().split(/[?#]/,1)[0])?t:""}).pipe(r.string().min(1).max(500).startsWith("/"));function i(){return"false"!==n.env.NEXT_PUBLIC_FEEDBACK_V1}function c(){return"ERR-".concat(crypto.randomUUID().replace(/-/g,"").slice(0,8).toUpperCase())}r.object({category:r.enum(["problem","idea","question","other"]),source:r.enum(["header","error","error_boundary"]),message:r.string().trim().min(1).max(4e3),page_path:l.optional(),rfp_id:o.optional(),surface:r.string().trim().min(1).max(64).regex(/^[a-z0-9][a-z0-9_-]*$/).optional(),error_ref:o.optional(),client_context:s.optional(),contact_allowed:r.boolean().default(!1)}).strict()}}]);
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.