PageSourceSearch

https://static.apination.com/_next/static/chunks/pages/companies/[teamId]/subaccount-7064645f8ae103f5.js

js apination.com collected 2026-09-28 13:28:36 UTC 8,539 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99910],{40028:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/companies/[teamId]/subaccount",function(){return n(267)}])},68272:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var i=n(85893),a=n(67294),s=n(78718),r=n.n(s),l=n(84677),o=n(32576),c=n(6897),d=n(40492),u=n(94184),m=n.n(u),h=n(95611);function v(e){let{onChange:t,name:n,label:a,value:s,errors:r,disabled:l=!1,type:o,icon:u=null}=e,v=m()("team-info__input",{_invalid:!!r[n]}),p={};return u&&(p.startAdornment=(0,i.jsx)(h.Z,{position:"start",children:(0,i.jsx)(u,{})})),(0,i.jsx)(c.Z,{className:v,variant:"outlined",style:{width:"100%"},children:(0,i.jsx)(d.Z,{...e,type:o,color:"primary",label:a,name:n,value:s,variant:"outlined",style:{width:"100%"},onChange:t,disabled:l,InputProps:p})})}var p=n(52079),b=n(48209),f=n(46700),x=n(31410),g=n(81350),Z=n(38905);let j=e=>{let{message:t}=e;return t?(0,i.jsx)("div",{style:{margin:"-2.8rem 0 2.8rem"},children:(0,i.jsx)(g.Bc,{message:t})}):null},_=e=>t=>(0,Z.Y)(e,{type:"fieldChange",fieldName:t.target.name,value:t.target.value});function w(e){let{team:t,isUpdating:n,onSubmit:s,submitButtonTitle:c,canEdit:d=!0,initialValues:u={},titleFieldLabel:m="Company name",emailFieldLabel:h="Company email"}=e,[g,w]=a.useState(u),[C,y]=a.useState({});a.useEffect(()=>(w({...g,...r()(t,["title","email","website","phone"])}),()=>{clearTimeout(null)}),[t]);let S=t?"Companies: Action":"Create company: Action",E=a.useCallback(e=>{let t={...g,[e.target.name]:e.target.value};w(t),clearTimeout(null),setTimeout(()=>{y((0,o.gc)(t))},400)},[g]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{onBlur:_(S),name:"title",label:m,value:g.title||"",onChange:E,errors:C,disabled:!d,icon:p.Z}),(0,i.jsx)(j,{message:C.title}),(0,i.jsx)(v,{onBlur:_(S),name:"email",label:h,value:g.email||"",onChange:E,errors:C,disabled:!d,icon:x.Z}),(0,i.jsx)(j,{message:C.email}),(0,i.jsx)(v,{onBlur:_(S),name:"website",label:"Website",value:g.website||"",onChange:E,errors:C,disabled:!d,icon:b.Z}),(0,i.jsx)(j,{message:C.website}),(0,i.jsx)(v,{onBlur:_(S),name:"phone",label:"Phone",value:g.phone||"",onChange:E,errors:C,disabled:!d,icon:f.Z}),(0,i.jsx)(j,{message:C.phone}),(0,i.jsx)("div",{className:"team-info__save-block",children:(0,i.jsx)(l.Z,{color:"primary",className:"workflow-v2__save-block__button",variant:"contained",disabled:n||!(0,o.JY)(g)||!d,onClick:e=>{(0,Z.Y)(S,{type:"submitClick"}),e.stopPropagation(),e.preventDefault(),s(g)},children:c||"Save changes"})})]})}},32576:function(e,t,n){"use strict";function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!Object.keys(s(e)).length}function a(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}function s(e){var t;let n={};return e.title||(n.title="Title is required"),e.email&&!a(e.email)&&(n.email="Email is invalid"),e.phone&&(t=e.phone,!/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im.test(t))&&(n.phone="Phone is invalid"),n}n.d(t,{JY:function(){return i},gc:function(){return s},oH:function(){return a}})},52079:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var a=i(n(33651)),s=n(85893);t.Z=(0,a.default)((0,s.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group")},48209:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var a=i(n(33651)),s=n(85893);t.Z=(0,a.default)((0,s.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link")},46700:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var a=i(n(33651)),s=n(85893);t.Z=(0,a.default)((0,s.jsx)("path",{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.
167-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02z"}),"Phone")},95611:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var i,a=n(63366),s=n(87462),r=n(67294),l=n(8780),o=n(94780),c=n(66643),d=n(96788),u=n(92276),m=n(57280),h=n(77527),v=n(1588),p=n(34867);function b(e){return(0,p.ZP)("MuiInputAdornment",e)}let f=(0,v.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var x=n(44001),g=n(85893);let Z=["children","className","component","disablePointerEvents","disableTypography","position","variant"],j=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:i,position:a,size:s,variant:r}=e,l={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,c.Z)(a)),r,i&&"hiddenLabel",s&&"size".concat((0,c.Z)(s))]};return(0,o.Z)(l,b,t)},_=(0,h.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t["position".concat((0,c.Z)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,s.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(f.positionStart,"&:not(.").concat(f.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})});var w=r.forwardRef(function(e,t){let n=(0,x.i)({props:e,name:"MuiInputAdornment"}),{children:o,className:c,component:h="div",disablePointerEvents:v=!1,disableTypography:p=!1,position:b,variant:f}=n,w=(0,a.Z)(n,Z),C=(0,m.Z)()||{},y=f;f&&C.variant,C&&!y&&(y=C.variant);let S=(0,s.Z)({},n,{hiddenLabel:C.hiddenLabel,size:C.size,disablePointerEvents:v,position:b,variant:y}),E=j(S);return(0,g.jsx)(u.Z.Provider,{value:null,children:(0,g.jsx)(_,(0,s.Z)({as:h,ownerState:S,className:(0,l.Z)(E.root,c),ref:t},w,{children:"string"!=typeof o||p?(0,g.jsxs)(r.Fragment,{children:["start"===b?i||(i=(0,g.jsx)("span",{className:"notranslate",children:"​"})):null,o]}):(0,g.jsx)(d.Z,{color:"text.secondary",children:o})}))})})},267:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var i=n(85893),a=n(67294),s=n(10616),r=n(70418),l=n(9366),o=n(31956),c=n(48929),d=n(58130),u=n(96881),m=n(68272),h=n(37417),v=n(81350),p=n(24351),b=n(91500),f=n(89458),x=n(21630),g=n(26335),Z=n(16468),j=n.n(Z),_=n(56233);let w=e=>{let t=String(e).match(/error:(.*)$/);return t?t[1]:e};var C=(0,s.Z)(h.Z,(0,c.Z)(),(0,u.CG)({ssr:!1}))(e=>{let{apolloClient:t}=e,[n,s]=a.useState(null),c=(0,l.xJ)(),[u,h]=(0,o.lh)(),[Z]=(0,o.LP)(),C=u.find(e=>e._id===Z),[y,S]=a.useState(!1),[E,N]=a.useState(null);return h?(0,i.jsx)(r.Z,{title:"Loading",children:(0,i.jsx)(d.DW,{})}):C&&(0,_.iW)(C,"create_subaccounts")?(0,i.jsx)(r.Z,{title:"Company information",noBootstrap:!0,additionalCssClass:"_with-sidebar _wide _flex-stretch _tall _max-width-1200 team-info",children:(0,i.jsxs)("div",{className:"content-with-sidebar teams",children:[(0,i.jsx)(b.YE,{children:(0,i.jsx)(f.Z,{current:(0,p.av)(C._id)})}),(0,i.jsx)("div",{className:"sidebar-content",children:(0,i.jsxs)("div",{className:"bordered-block _no-padding _small _normal _no-header",children:[(0,i.jsx)(g.Z,{}),(0,i.jsxs)("div",{className:"bordered-block__body",children:[!!n&&(0,i.jsx)("div",{style:{margin:"2rem 0 -1rem 2.5rem"},children:(0,i.jsx)(v.Bc,{message:w(n)})}),(0,i.jsx)("div",{className:j()["team__form-container"],children:(0,i.jsx)(m.Z,{titleFieldLabel:"Sub account name",emailFieldLabel:"Sub account email",initialValues:{email:c.email,website:c.website,phone:c.phone},submitButtonTitle:"Create sub account",isUpdating:y,onSubmit:e=>{e.parentId=Z,u.find(t=>t.title.trim().toLowerCase()===e.title.trim().toLowerCase())?s("Team with this name already exists"):(S(!0),t.mutate({mutation:x.gb,variables:{team:e}}).then(e=>{N(null);let{_id:t}=e.data.createTeam;setTimeout(()=>window.location.href=(0,p.cz)(t),40)}).catch(e=>{console.error("ERROR",e),N(e)}).finally(()=>S(!1)))}})})]})]})})]})}):null})}},function(e){e.O(0,[3401,41288,69944,92888,49774,40179],function(){return e(e.s=40028)}),_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.