1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4072],{84979:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var n=i(91373);let a=(0,n.Z)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},68835:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var n=i(91373);let a=(0,n.Z)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]])},5097:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var n=i(91373);let a=(0,n.Z)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},92896:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var n=i(91373);let a=(0,n.Z)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]])},94933:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var n=i(91373);let a=(0,n.Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},38714:function(t,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/onboarding",function(){return i(76842)}])},18953:function(t,e,i){"use strict";i.d(e,{_:function(){return u}});var n=i(85893),a=i(67294),r=i(99489),s=i(12003),o=i(34416);let l=(0,s.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),u=a.forwardRef(({className:t,...e},i)=>(0,n.jsx)(r.f,{ref:i,className:(0,o.cn)(l(),t),...e}));u.displayName=r.f.displayName},76842:function(t,e,i){"use strict";i.r(e),i.d(e,{__N_SSP:function(){return f},default:function(){return g}});var n=i(85893),a=i(24908),r=i(67294),s=i(4525),o=i(30202),l=i(98029),u=i(9663),c=i(40293),d=i(18953),DashboardPage_Onboarding=()=>{let[t,e]=(0,r.useState)("org-name"),[i,a]=(0,r.useState)(""),[h,m]=(0,r.useState)(null),[p,f]=(0,r.useState)(""),[g,v]=(0,r.useState)(""),[x,b]=(0,r.useState)(""),[y,w]=(0,r.useState)(!1),j=function(t,e={}){let{method:i="POST",invalidateKeys:n,onSuccess:a,...r}=e,u=(0,o.NL)(),c=(0,l.D)({mutationFn:async e=>{let n=await (0,s.Z)({url:t,method:i,headers:{"Content-Type":"application/json"},data:e});if(!n.data.success)throw Error(n.data.error?.message||"Unknown error occurred");let a=n.data.data;if(null==a)throw Error("Empty response payload");return a},...r,onSuccess:async(...t)=>{n?.length&&await Promise.all(n.map(t=>u.invalidateQueries({queryKey:t}))),await a?.(...t)}});return c}("/api/org/self-create",{onSuccess:t=>{m(t.orgId),e("company-details")}}),finishOnboarding=()=>{window.location.assign("/dashboard/billing")},saveCompanyDetails=async()=>{if(!h){finishOnboarding();return}w(!0);try{let t={orgId:h,billingLegalName:p.trim()||i.trim(),taxRegistrationNumber:g.trim()||null,additionalTaxId:x.trim()||null,billingAddress:null};await s.Z.put("/api/orgadmin/org/billing",t),finishOnboarding()}catch(t){console.error(t)}finally{w(!1)}};return"company-details"===t?(0,n.jsxs)("div",{className:"mx-auto flex max-w-md flex-col gap-6 pt-24",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold",children:"Company details"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Optional invoicing metadata. You can update this later in Settings â Billing."})]}),(0,n.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:t=>{t.preventDefault(),saveCompanyDetails()},children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(d._,{htmlFor:"billingLegalName",children:"Legal name"}),(0,n.jsx)(c.I,{id:"billingLegalName",value:p,onChange:t=>f(t.target.value),placeholder:i||"Acme Corp"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(d._,{htmlFor:"taxRegistrationNumber",children:"Tax registration number"}),(0,n.jsx)(c.I,{id:"taxRegistrationNumber",value:g,onChange:t=>v(t.target.value)})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(d._,{htmlFor:"additionalTaxId",children:"Additional tax ID"}),(0,n.jsx)(c.I,{id:"additionalTaxId",value:x,onChange:t=>b(t.target.value)})]}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(u.z,{type:"submit",disabled:y,children:y?"Savingâ¦":"Continue"}),(0,n.jsx)(u.z,{type:"button",variant:"ghost",onClick:finishOnboarding,children:"Skip for now"})]})]})]}):(0,n.jsxs)("div",{className:"mx-auto flex max-w-md flex-col gap-6 pt-24",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold",children:"Name your organization"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Your workspaces, team, and billing live under your organization. You can rename it later."})]}),(0,n.jsxs)("form",{onSubmit:t=>{t.preventDefault(),j.mutate({orgName:i})},className:"flex flex-col gap-4",children:[(0,n.jsx)(c.I,{value:i,onChange:t=>a(t.target.value),placeholder:"e.g. Acme Corp",maxLength:64}),j.isError?(0,n.jsx)("p",{className:"text-sm text-chichi",children:j.error.message}):null,(0,n.jsx)(u.z,{type:"submit",disabled:i.trim().length<2||j.isPending,children:j.isPending?"Creatingâ¦":"Continue"})]})]})},h=i(94656),m=i(50540);let p={pagetype:"dashboard",headInfo:{keywords:"onboarding, organization, workspace",description:"Set up your organization",url:"/dashboard/onboarding",image:"https://neverinstall.com/cdn-cgi/imagedelivery/AvFws3zK3WPu5k1TtWLA1A/images/og/main-og-image.png/public"},title:"Neverinstall | Set up your organization",responsive:!0,fullwidth:!0,nofooter:!0,withSidebar:!1,noheader:!0,pagecolor:""};var f=!0,g=(0,h.Z)((0,m.Z)(()=>
1(0,n.jsx)(a.Z,{...p,skipSidebar:!0,children:(0,n.jsx)(DashboardPage_Onboarding,{})})))},99489:function(t,e,i){"use strict";i.d(e,{f:function(){return l}});var n=i(67294);i(73935);var a=i(88426),r=i(85893),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,e)=>{let i=(0,a.Z8)(`Primitive.${e}`),s=n.forwardRef((t,n)=>{let{asChild:a,...s}=t,o=a?i:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(o,{...s,ref:n})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{}),o=n.forwardRef((t,e)=>(0,r.jsx)(s.label,{...t,ref:e,onMouseDown:e=>{let i=e.target;i.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));o.displayName="Label";var l=o},12072:function(t,e,i){"use strict";i.d(e,{f:function(){return c}});var n=i(67294);i(73935);var a=i(88426),r=i(85893),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,e)=>{let i=(0,a.Z8)(`Primitive.${e}`),s=n.forwardRef((t,n)=>{let{asChild:a,...s}=t,o=a?i:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(o,{...s,ref:n})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{}),o="horizontal",l=["horizontal","vertical"],u=n.forwardRef((t,e)=>{let{decorative:i,orientation:n=o,...a}=t,u=l.includes(n)?n:o;return(0,r.jsx)(s.div,{"data-orientation":u,...i?{role:"none"}:{"aria-orientation":"vertical"===u?u:void 0,role:"separator"},...a,ref:e})});u.displayName="Separator";var c=u},98029:function(t,e,i){"use strict";i.d(e,{D:function(){return useMutation}});var n=i(67294),a=i(59289),r=i(27037),s=i(7506),o=i(24139),l=class extends s.l{#t;#e=void 0;#i;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#r(t)}getCurrentResult(){return this.#e}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#a(),this.#r()}mutate(t,e){return this.#n=e,this.#i?.removeObserver(this),this.#i=this.#t.getMutationCache().build(this.#t,this.options),this.#i.addObserver(this),this.#i.execute(t)}#a(){let t=this.#i?.state??(0,a.R)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#r(t){r.Vr.batch(()=>{if(this.#n&&this.hasListeners()){let e=this.#e.variables,i=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#n.onSuccess?.(t.data,e,i,n)}catch(t){Promise.reject(t)}try{this.#n.onSettled?.(t.data,null,e,i,n)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#n.onError?.(t.error,e,i,n)}catch(t){Promise.reject(t)}try{this.#n.onSettled?.(void 0,t.error,e,i,n)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},u=i(30202);function useMutation(t,e){let i=(0,u.NL)(e),[a]=n.useState(()=>new l(i,t));n.useEffect(()=>{a.setOptions(t)},[a,t]);let s=n.useSyncExternalStore(n.useCallback(t=>a.subscribe(r.Vr.batchCalls(t)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=n.useCallback((t,e)=>{a.mutate(t,e).catch(o.ZT)},[a]);if(s.error&&(0,o.L3)(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}}},function(t){t.O(0,[6515,4144,8574,8535,50,4444,765,2345,1691,1488,6405,2993,6932,7460,9004,5456,6274,5530,4656,9422,9774,2888,179],function(){return t(t.s=38714)}),_N_E=t.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.