1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4882],{67:(e,t,s)=>{"use strict";s.d(t,{$:()=>c});var r=s(7876);s(4232);var a=s(8230),i=s.n(a),o=s(6823);let n={primary:"bg-[#00A057] text-white rounded-xl shadow-[0_8px_24px_-6px_rgba(0,160,87,0.6)] hover:bg-[#00b562] hover:-translate-y-0.5 hover:shadow-[0_12px_28px_-6px_rgba(0,160,87,0.7)] focus:ring-[#00A057]/40",secondary:"bg-[#E5F5EE] text-[#00A057] hover:bg-[#E5F5EE]",tab:"bg-[#F7F7F7] text-[#756282] hover:bg-[#EDEDED]",pure:"bg-white text-[#756282] border border-purple-200 hover:bg-[#EDEDED]",outline:"border border-gray-300 text-gray-700 hover:bg-gray-100 ",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 ",glass:"rounded-xl bg-white/55 text-gray-700 border border-white/50 backdrop-blur hover:bg-white/75 dark:bg-white/5 dark:text-gray-100 dark:border-white/15 dark:hover:bg-white/10 focus:ring-[#00A057]/30"},l={sm:"px-3 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg"},c=({as:e="button",href:t,variant:s="primary",size:a="md",loading:c=!1,icon:u,children:d,className:h,...m})=>{let p=(0,o.cn)("inline-flex items-center justify-center font-raleway rounded-md cursor-pointer font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 active:scale-[0.98] disabled:active:scale-100",n[s],l[a],c&&"opacity-60 cursor-not-allowed",h);return"link"===e&&t?(0,r.jsxs)(i(),{href:t,className:p,children:[u&&(0,r.jsx)("span",{className:"mr-2",children:u}),d]}):(0,r.jsx)("button",{className:p,disabled:c||m.disabled,...m,children:c?"Loading . . ":(0,r.jsxs)(r.Fragment,{children:[u&&(0,r.jsx)("span",{className:"mr-2",children:u}),d]})})}},97:(e,t,s)=>{"use strict";s.d(t,{n:()=>u});var r=s(4232),a=s(3788),i=s(388),o=s(89),n=s(7149),l=class extends o.Q{#e;#t=void 0;#s;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,n.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.EN)(t.mutationKey)!==(0,n.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,a.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){i.jG.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context;e?.type==="success"?(this.#r.onSuccess?.(e.data,t,s),this.#r.onSettled?.(e.data,null,t,s)):e?.type==="error"&&(this.#r.onError?.(e.error,t,s),this.#r.onSettled?.(void 0,e.error,t,s))}this.listeners.forEach(e=>{e(this.#t)})})}},c=s(7768);function u(e,t){let s=(0,c.jE)(t),[a]=r.useState(()=>new l(s,e));r.useEffect(()=>{a.setOptions(e)},[a,e]);let o=r.useSyncExternalStore(r.useCallback(e=>a.subscribe(i.jG.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=r.useCallback((e,t)=>{a.mutate(e,t).catch(n.lQ)},[a]);if(o.error&&(0,n.GU)(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}},352:(e,t,s)=>{"use strict";s.d(t,{Q:()=>r,x:()=>a});let r=[{label:"Billing",value:"billing"},{label:"Technical",value:"technical"},{label:"Account",value:"account"},{label:"Device",value:"device"},{label:"Other",value:"other"}],a=[{label:"Open",value:"open"},{label:"Awaiting response",value:"awaiting_response"},{label:"Resolved",value:"resolved"},{label:"Closed",value:"closed"}]},5805:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(7876),a=s(4232),i=s(5041);let o=({label:e,error:t,type:s="text",className:o="",floating:n=!1,icon:l,id:c,...u})=>{let[d,h]=(0,a.useState)(!1),m=(0,a.useId)(),p=c??m,x="password"===s,b=x&&d?"text":s;if(n){let s=!!t;return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsxs)("div",{className:`auth-anim relative flex items-center rounded-xl border-2 bg-transparent transition-all 2 ${s?"border-red-500 focus-within:border-red-500":"border-gray-300/70 dark:border-white/15 focus-glow"}`,children:[l&&(0,r.jsx)("span",{className:"pl-3 text-gray-400 dark:text-gray-500",children:l}),(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsx)("input",{id:p,type:b,placeholder:" ",className:`peer glass-input h-14 w-full bg-transparent px-4 pr-10 pt-4 text-black outline-none 3 dark:text-white ${l?"pl-3":""} rounded-tr-xl rounded-br-xl ${o}`,...u}),e&&(0,r.jsx)("label",{htmlFor:p,className:`auth-anim pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 transition-all 4 peer-focus:top-3 peer-focus:text-[11px] peer-focus:font-medium peer-focus:text-[#00A057] 5 peer-[:not(:placeholder-shown)]:top-3 peer-[:not(:placeholder-shown)]:text-[11px] 6 peer-[:not(:placeholder-shown)]:font-medium 7 ${l?"left-3":""}`,children:e})]}),x&&(0,r.jsx)("button",{type:"button",onClick:()=>h(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 cursor-pointer","aria-label":d?"Hide password":"Show password",children:d?(0,r.jsx)(i.mx3,{size:18}):(0,r.jsx)(i.Ny1,{size:18})})]}),"string"==typeof t&&t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-500",children:t})]})}return(0,r.jsxs)("div",{className:"w-full",children:[e&&(0,r.jsx)("label",{className:"block mb-1 text-sm font-medium text-gray-700",children:e}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:b,className:`w-full px-4 py-2 pr-10 border rounded-md outline-none transition-all 8 ${t?"border-red-500 focus:border-red-500":"border-2 border-gray-300 focus:border-[#00A057]"} 9 placeholder:text-[#00140B80] dark:placeholder:text-white text-black dark:text-white 10 ${o}`,...u}),x&&(0,r.jsx)("button",{type:"button",onClick:()=>h(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 cursor-pointer",children:d?(0,r.jsx)(i.mx3,{size:18}):(0,r.jsx)(i.Ny1,{size:18})})]}),"string"==typeof t&&t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-500",children:t})]})}},6010:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var r=s(7876),a=s(9099),i=s(8992),o=s(7281),n=s(5153),l=s(7709),c=s(67),u=s(5805),d=s(6487),h=s(8065),m=s(8369),p=s(352);let x=()=>{let e=(0,a.useRouter)(),t=(0,m.Gs)(),{register:s,handleSubmit:x,watch:b,formState:{errors:g}}=(0,i.mN)({defaultValues:{subject:"",category:"",description:""}}),y=b("description")||"";return(0,r.jsx)(n.A,{Breadcrumbs:[{name:"help & feedback",link:"/help-and-feedback"},{name:"support",link:"/support"},{name:"new ticket"}],children:(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-2xl flex-col gap-6 lg:p-2",children:[(0,r.jsx)(l.A,{title:"New support ticket",subtitle:"Tell us what's going on and we'll get back to you.",icon:(0,r.jsx)(o.tjz,{size:20})}),(0,r.jsxs)("form",{onSubmit:x(s=>{t.mutate({subject:s.subject.trim(),category:s.category,description:s.description.trim(),attachmentUrls:[]},{onSuccess:t=>
10{t?.success&&t.data?.id?e.push(`/support/${t.data.id}`):t?.success&&e.push("/support")}})}),className:"surface-1 flex flex-col gap-5 rounded-2xl p-5 lg:p-6",noValidate:!0,children:[(0,r.jsx)("div",{children:(0,r.jsx)(u.A,{label:"Subject",placeholder:"Briefly summarise your issue",maxLength:150,error:g.subject?.message,...s("subject",{required:"Subject is required",maxLength:{value:150,message:"Subject must be 150 characters or fewer"}})})}),(0,r.jsx)("div",{children:(0,r.jsx)(d.A,{label:"Category",error:g.category?.message,options:[{label:"Select a category",value:""},...p.Q],...s("category",{required:"Please choose a category"})})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.A,{label:"Description",rows:6,placeholder:"Describe your issue in as much detail as possibleâ¦",maxLength:2e3,error:g.description?.message,...s("description",{required:"Description is required",minLength:{value:10,message:"Please provide at least 10 characters"},maxLength:{value:2e3,message:"Description must be 2000 characters or fewer"}})}),(0,r.jsxs)("p",{className:"mt-1 text-right text-xs text-[var(--text-muted)]",children:[y.length,"/",2e3]})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(c.$,{type:"button",variant:"ghost",onClick:()=>e.back(),children:"Cancel"}),(0,r.jsx)(c.$,{type:"submit",loading:t.isPending,children:"Create ticket"})]})]})]})})}},6487:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(7876);s(4232);let a=({label:e,error:t,options:s,className:a="",...i})=>(0,r.jsxs)("div",{className:"w-full",children:[e&&(0,r.jsx)("label",{className:"block mb-1 text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("select",{className:`w-full px-4 py-2.5 border rounded-xl outline-none appearance-none bg-[var(--surface)] transition-all 11 ${t?"border-red-500 focus:border-red-500":"border border-[var(--border)] focus:border-[#00A057] focus:ring-2 focus:ring-[#00A057]/20"} 12 text-[var(--text)] 13 ${a} 14 `,...i,children:s.map(e=>(0,r.jsx)("option",{value:e.value,className:"text-black dark:text-white",children:e.label},e.value))}),(0,r.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-gray-500 dark:text-gray-300",children:"â¼"})]}),"string"==typeof t&&t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-500",children:t})]})},7709:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var r=s(7876);s(4232);var a=s(6823);let i=({title:e,subtitle:t,icon:s,actions:i,className:o})=>(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",o),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[s&&(0,r.jsx)("span",{className:"icon-chip-accent flex h-10 w-10 items-center justify-center rounded-xl",children:s}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-[var(--text)] sm:text-2xl",children:e}),t&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-[var(--text-muted)]",children:t})]})]}),i&&(0,r.jsx)("div",{className:"flex items-center gap-2",children:i})]})},8065:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(7876);s(4232);let a=({label:e,error:t,className:s="",...a})=>(0,r.jsxs)("div",{className:"w-full",children:[e&&(0,r.jsx)("label",{className:"block mb-1 text-sm font-medium text-gray-700",children:e}),(0,r.jsx)("textarea",{className:`w-full px-4 py-2.5 border rounded-xl outline-none transition-all bg-[var(--surface)] 15 ${t?"border-red-500 focus:border-red-500":"border border-[var(--border)] focus:border-[#00A057] focus:ring-2 focus:ring-[#00A057]/20"} 16 placeholder:text-[var(--text-muted)] text-[var(--text)] 17 ${s}`,...a}),"string"==typeof t&&t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-red-500",children:t})]})},8369:(e,t,s)=>{"use strict";s.d(t,{Gs:()=>g,Sy:()=>y,yS:()=>b,dS:()=>x});var r=s(7914),a=s(7768),i=s(97),o=s(6586),n=s(6823),l=s(8528);async function c(e={}){try{let t={};e.page&&(t.page=e.page),e.limit&&(t.limit=e.limit),e.status&&(t.status=e.status),e.category&&(t.category=e.category);let s=await (0,l.A)("customer-support",{method:"GET",query:t,protect:!0});return{success:(0,n.oJ)(s.code),message:s.message,data:s.data}}catch(e){return console.error("error:",e),{success:!1,message:e?.message||"Unable to load tickets.",data:null}}}async function u(e){try{let t=await (0,l.A)(`customer-support/${e}`,{method:"GET",protect:!0});return{success:(0,n.oJ)(t.code),message:t.message,data:t.data}}catch(e){return console.error("error:",e),{success:!1,message:e?.message||"Unable to load ticket.",data:null}}}async function d(e){try{let t=await (0,l.A)("customer-support",{method:"POST",body:e,protect:!0});return{success:(0,n.oJ)(t.code),message:t.message,data:t.data}}catch(e){return console.error("error:",e),{success:!1,message:e?.message||"Unable to create ticket.",data:null}}}async function h(e,t){try{let s=await (0,l.A)(`customer-support/${e}/messages`,{method:"POST",body:t,protect:!0});return{success:(0,n.oJ)(s.code),message:s.message,data:s.data}}catch(e){return console.error("error:",e),{success:!1,message:e?.message||"Unable to send reply.",data:null}}}let m=["tickets"],p=e=>["ticket",e];function x(e){return(0,r.I)({queryKey:["tickets",e],queryFn:async()=>{let t=await c(e);if(!t.success)throw Error(t.message||"Failed to load tickets");return t.data},retry:!1})}function b(e){return(0,r.I)({queryKey:p(e),queryFn:async()=>{let t=await u(e);if(!t.success)throw Error(t.message||"Failed to load ticket");return t.data?.ticket},enabled:!!e,retry:!1})}function g(){let e=(0,a.jE)();return(0,i.n)({mutationFn:e=>d(e),onSuccess:t=>
17{t?.success?(o.o.success(t.message||"Ticket created"),e.invalidateQueries({queryKey:m})):o.o.error(t?.message||"Unable to create ticket")},onError:e=>{o.o.error(e?.message||"Something went wrong")}})}function y(e){let t=(0,a.jE)();return(0,i.n)({mutationFn:t=>h(e,t),onMutate:async s=>{await t.cancelQueries({queryKey:p(e)});let r=t.getQueryData(p(e));if(r){let a={...r,messages:[...r.messages??[],{id:`optimistic-${Date.now()}`,body:s.body,senderRole:"user",createdAt:new Date().toISOString()}]};t.setQueryData(p(e),a)}return{previous:r}},onSuccess:e=>{e?.success?o.o.success(e.message||"Reply sent"):o.o.error(e?.message||"Unable to send reply")},onError:(s,r,a)=>{a?.previous&&t.setQueryData(p(e),a.previous),o.o.error(s?.message||"Something went wrong")},onSettled:()=>{t.invalidateQueries({queryKey:p(e)}),t.invalidateQueries({queryKey:m})}})}},9364:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/support/new",function(){return s(6010)}])}},e=>{e.O(0,[4938,713,5711,9756,289,2768,1869,2846,8992,5153,636,6593,8792],()=>e(e.s=9364)),_N_E=e.O()}]);
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.