PageSourceSearch

https://www.companyhero.com/_next/static/chunks/pages/admin/icp-174fd0fbcbbc7445.js

js companyhero.com collected 2026-09-24 09:05:51 UTC 14,264 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49776],{5789:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(38614);t.default=o.Col},89552:function(e,t,n){"use strict";var o=n(64836).default,i=n(75263).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(67294)),s=o(n(94184)),r=o(n(18475)),l=n(42189),c=n(47419);n(13594);var u=n(31929),d=o(n(9405)),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)0>t.indexOf(o[i])&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};let p=null,Spin=e=>{let{spinPrefixCls:t,spinning:n=!0,delay:o=0,className:i,rootClassName:d,size:m="default",tip:f,wrapperClassName:h,style:g,children:x,hashId:S}=e,y=__rest(e,["spinPrefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","hashId"]),[C,b]=a.useState(()=>n&&(!n||!o||!!isNaN(Number(o))));a.useEffect(()=>{if(n){let e=(0,l.debounce)(o,()=>{b(!0)});return e(),()=>{var t;null===(t=null==e?void 0:e.cancel)||void 0===t||t.call(e)}}b(!1)},[o,n]);let v=a.useMemo(()=>void 0!==x,[x]),{direction:w,spin:j}=a.useContext(u.ConfigContext),I=(0,s.default)(t,null==j?void 0:j.className,{[`${t}-sm`]:"small"===m,[`${t}-lg`]:"large"===m,[`${t}-spinning`]:C,[`${t}-show-text`]:!!f,[`${t}-rtl`]:"rtl"===w},i,d,S),_=(0,s.default)(`${t}-container`,{[`${t}-blur`]:C}),k=(0,r.default)(y,["indicator","prefixCls"]),P=Object.assign(Object.assign({},null==j?void 0:j.style),g),E=a.createElement("div",Object.assign({},k,{style:P,className:I,"aria-live":"polite","aria-busy":C}),function(e,t){let{indicator:n}=t,o=`${e}-dot`;return null===n?null:(0,c.isValidElement)(n)?(0,c.cloneElement)(n,{className:(0,s.default)(n.props.className,o)}):(0,c.isValidElement)(p)?(0,c.cloneElement)(p,{className:(0,s.default)(p.props.className,o)}):a.createElement("span",{className:(0,s.default)(o,`${e}-dot-spin`)},a.createElement("i",{className:`${e}-dot-item`,key:1}),a.createElement("i",{className:`${e}-dot-item`,key:2}),a.createElement("i",{className:`${e}-dot-item`,key:3}),a.createElement("i",{className:`${e}-dot-item`,key:4}))}(t,e),f&&v?a.createElement("div",{className:`${t}-text`},f):null);return v?a.createElement("div",Object.assign({},k,{className:(0,s.default)(`${t}-nested-loading`,h,S)}),C&&a.createElement("div",{key:"loading"},E),a.createElement("div",{className:_,key:"container"},x)):E},SpinFC=e=>{let{prefixCls:t}=e,{getPrefixCls:n}=a.useContext(u.ConfigContext),o=n("spin",t),[i,s]=(0,d.default)(o),r=Object.assign(Object.assign({},e),{spinPrefixCls:o,hashId:s});return i(a.createElement(Spin,Object.assign({},r)))};SpinFC.setDefaultIndicator=e=>{p=e},t.default=SpinFC},9405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(55943),i=n(98078),a=n(3184);let s=new o.Keyframes("antSpinMove",{to:{opacity:1}}),r=new o.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),genSpinStyle=e=>({[`${e.componentCls}`]:Object.assign(Object.assign({},(0,i.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${e.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${e.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-e.dotSize/2},[`${e.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(e.dotSize-e.fontSize)/2+2,textShadow:`0 1px 2px ${e.colorBgContainer}`,fontSize:e.fontSize},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.dotSize/2)-10},"&-sm":{[`${e.componentCls}-dot`]:{margin:-e.dotSizeSM/2},[`${e.componentCls}-text`]:{paddingTop:(e.dotSizeSM-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.dotSizeSM/2)-10}
1},"&-lg":{[`${e.componentCls}-dot`]:{margin:-(e.dotSizeLG/2)},[`${e.componentCls}-text`]:{paddingTop:(e.dotSizeLG-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.dotSizeLG/2)-10}}},[`${e.componentCls}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${e.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(e.dotSize-e.marginXXS/2)/2,height:(e.dotSize-e.marginXXS/2)/2,backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:s,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:r,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${e.componentCls}-dot`]:{fontSize:e.dotSizeSM,i:{width:(e.dotSizeSM-e.marginXXS/2)/2,height:(e.dotSizeSM-e.marginXXS/2)/2}},[`&-lg ${e.componentCls}-dot`]:{fontSize:e.dotSizeLG,i:{width:(e.dotSizeLG-e.marginXXS)/2,height:(e.dotSizeLG-e.marginXXS)/2}},[`&${e.componentCls}-show-text ${e.componentCls}-text`]:{display:"block"}})});t.default=(0,a.genComponentStyleHook)("Spin",e=>{let t=(0,a.mergeToken)(e,{spinDotDefault:e.colorTextDescription});return[genSpinStyle(t)]},e=>({contentHeight:400,dotSize:e.controlHeightLG/2,dotSizeSM:.35*e.controlHeightLG,dotSizeLG:e.controlHeight}))},2031:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/icp",function(){return n(63601)}])},63601:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return x}});var o=n(85893),i=n(4670),a=n(67294),s=n(4863),r=n(2307),l=n(53740),c=n(10149),u=n(55673),d=n(51024),p=n(5789),m=n(7136),f=n(90008);let{Title:h,Text:g}=l.default;function IcpIgnoreService(){let[e,t]=(0,a.useState)({}),[n,i]=(0,a.useState)(!1),[l,x]=(0,a.useState)(""),[S,y]=(0,a.useState)(!1),fetchData=async()=>{if(l)try{y(!0);let e=await f.ApiPrivate.getIcpInfos(l);t(e.data),e.data.company.length>0&&i(!0),y(!1)}catch(e){t([]),y(!1),i(!1)}},createAnswers=async()=>{if(l)try{y(!0);let e=await f.ApiPrivate.postIcpInfos(l);200==e.status&&fetchData(),y(!1)}catch(e){y(!1)}},C=[{title:"Perguntas",dataIndex:"question",key:"question",render:e=>(0,o.jsx)(g,{style:{display:"flex",alignItems:"center",flexWrap:"nowrap"},children:e})},{title:"Respostas",dataIndex:"answer",key:"answer",render:e=>(0,o.jsx)(g,{children:e})}],b=[{title:"id",dataIndex:"id",key:"id",render:e=>(0,o.jsx)(g,{style:{display:"flex",alignItems:"center",flexWrap:"nowrap"},children:e})},{title:"T\xedtulo",dataIndex:"title",key:"title",render:e=>(0,o.jsx)(g,{children:e})},{title:"CPF/CNPJ",dataIndex:"cpf_cnpj",key:"cpf_cnpj",render:e=>(0,o.jsx)(g,{children:e})}];return(0,o.jsxs)("section",{id:"1",style:{paddingBottom:"50px"},children:[(0,o.jsx)(h,{level:3,children:"For\xe7ar Respostas ICP - Tempor\xe1rio"}),(0,o.jsxs)(u.default,{type:"flex",justify:"space-between",style:{width:"30%",marginBottom:"40px"},children:[(0,o.jsx)(p.default,{children:(0,o.jsx)(d.default,{type:"text",value:l,onChange:e=>{x(e.target.value)},placeholder:"ID da Empresa"})}),(0,o.jsx)(p.default,{children:(0,o.jsx)(m.zx,{onClick:fetchData,children:"Procurar"})})]}),!1!==n?(null==e?void 0:e.icp_complete)?(0,o.jsx)(s.default,{className:"icp_complete",message:e.icp_msg,type:"success",showIcon:!0}):(0,o.jsx)(s.default,{className:"icp_incomplete",message:e.icp_msg,type:"error",showIcon:!0,action:(0,o.jsx)(m.zx,{size:"small",type:"text",onClick:createAnswers,children:"Completar Cadastro!"})}):null,(0,o.jsx)(u.default,{type:"flex",justify:"space-between",style:{width:"100%",marginBottom:"15px"}}),(0,o.jsx)(c.default,{active:!0,loading:S,paragraph:{rows:4},children:!S&&(0,o.jsx)(r.default,{columns:b,dataSource:e.company,loading:S,pagination:!1,className:"table-clean",size:"small",locale:{emptyText:"Sem dados de empresa"}})}),(0,o.jsx)(u.default,{type:"flex",justify:"space-between",style:{width:"100%",marginBottom:"40px"}}),(0,o.jsx)(c.default,{active:!0,loading:S,paragraph:{rows:4},children:!S&&(0,o.jsx)(r.default,{columns:C,dataSource:e.questions,loading:S,pagination:!1,className:"table-clean",size:"small",locale:{emptyText:"Nao h\xe1 respostas."}})})]},"section 1")}var x=(0,i.Xy)(()=>(0,o.jsx)("section",{className:"container notMobilePadding",style:{paddingTop:"32px"},children:(0,o.jsx)(IcpIgnoreService,{})}))},4670:function(e,t,n){"use strict";n.d(t,{FR:function(){return ProtectRoute}
1,Ko:function(){return ProtectRouteAndCheckIfHasRoleAccess},Qx:function(){return ProtectRouteAndCheckIfIsEnterprise},Xy:function(){return AdminRoute},cS:function(){return ProtectRouteAndVerifyAnsweredICP},jr:function(){return ProtectRouteAndCheckIfHasIndicationAccess}});var o=n(85893),i=n(67294),a=n(39691),s=n(11163),r=n(89552),l=n(47041);let SpinLoader=()=>(0,o.jsx)(r.default,{size:"large",style:{margin:"60px auto 0px",padding:"70px",height:"100px",display:"table",textAlign:"center"}}),ComponentView=e=>{let{Component:t,user:n,className:i,componentProps:a}=e;return(0,o.jsx)("div",{className:"loggedIn_layout ".concat(i),children:(0,o.jsx)(t,{...arguments,user:n,...a})})};function ProtectRoute(e){return t=>{let{user:n,userLoading:r,logout:l,answeredICPform:c,isRegisterICPFeatureOn:u}=(0,i.useContext)(a.S),d=(0,s.useRouter)();return((0,i.useEffect)(()=>{if(n||r||(l(),d.push("/login?logout=true&back=".concat(d.asPath,"&as=").concat(d.route))),n&&!r&&n.is_blocked){let redirectToBlocked=async()=>{await d.push("/blocked?from=".concat(d.asPath)),l()};redirectToBlocked()}},[r,n]),!n||r)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:n,componentProps:t})}}function AdminRoute(e){return()=>{let{user:t,userLoading:n,logout:r}=(0,i.useContext)(a.S),l=(0,s.useRouter)();return((0,i.useEffect)(()=>{t||n||(r(),l.push("/login?logout=true&back=".concat(l.asPath,"&as=").concat(l.route))),t&&!t.is_staff&&l.replace("/app/home")},[n,t]),!t||n||t&&!t.is_staff)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfIsEnterprise(e){return()=>{let{user:t,userLoading:n,defaultCompanyObject:r}=(0,i.useContext)(a.S),l=(0,s.useRouter)(),[c,u]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{t||n||l.push("/login?logout=true&back=".concat(l.asPath,"&as=").concat(l.route)),t&&r&&r.is_enterprise_customer&&l.push("/app/home"),r&&(r.access_roles.includes("legalizacao-b2b2b")||r.access_roles.includes("influencer")?u(!1):l.push("/app/home"))},[n,t,r]),c)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfHasIndicationAccess(e){return()=>{let{user:t,userLoading:n,defaultCompanyObject:r}=(0,i.useContext)(a.S),l=(0,s.useRouter)(),[c,u]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{t||n||l.push("/login?logout=true&back=".concat(l.asPath,"&as=").concat(l.route)),t&&r&&r.is_enterprise_customer&&l.push("/app/home"),r&&(r.access_roles.includes("dashboard-cad")||r.access_roles.includes("influencer")?u(!1):l.push("/app/home"))},[n,t,r,l]),c)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfHasRoleAccess(e){let{Component:t,roleList:n=[],logicalOperator:r="AND"}=e;return()=>{let{user:e,userLoading:l,defaultCompanyObject:c}=(0,i.useContext)(a.S),u=(0,s.useRouter)(),[d,p]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{if(e||l||u.push("/login?logout=true&back=".concat(u.asPath,"&as=").concat(u.route)),e&&c&&c.is_enterprise_customer&&u.push("/app/home"),c){let e=n.map(e=>c.access_roles.includes(e)),t="AND"===r?e.every(e=>!!e):e.some(e=>!!e);t?p(!1):u.push("/app/home")}},[l,e,c,u]),d)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:t,user:e})}}function ProtectRouteAndVerifyAnsweredICP(e){return t=>{let{user:n,userLoading:r,logout:c,answeredICPform:u}=(0,i.useContext)(a.S);(0,l.getCookie)("_aicpf");let d=(0,s.useRouter)();return((0,i.useEffect)(()=>{if(n||r||(c(),d.push("/login?logout=true&back=".concat(d.asPath,"&as=").concat(d.route))),n&&!r&&n.is_blocked){let redirectToBlocked=async()=>{await d.push("/blocked?from=".concat(d.asPath)),c()};redirectToBlocked()}},[r,n]),!n||r)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:n,componentProps:t})}}},42189:function(e,t){"use strict";function throttle(e,t,n){var o,i=n||{},a=i.noTrailing,s=void 0!==a&&a,r=i.noLeading,l=void 0!==r&&r,c=i.debounceMode,u=void 0===c?void 0:c,d=!1,p=0;function clearExistingTimeout(){o&&clearTimeout(o)}function wrapper(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];var r=this,c=Date.now()-p;function exec(){p=Date.now(),t.apply(r,i)}function clear(){o=void 0}!d&&(l||!u||o||exec(),clearExistingTimeout(),void 0===u&&c>e?l?(p=Date.now(),s||(o=setTimeout(u?clear:exec,e))):exec():!0!==s&&(o=setTimeout(u?clear:exec,void 0===u?e-c:e)))}return wrapper.cancel=function(e){var t=(e||{}).upcomingOnly;clearExistingTimeout(),d=!(void 0!==t&&t)},wrapper}
1Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t,n){var o=(n||{}).atBegin;return throttle(e,t,{debounceMode:!1!==(void 0!==o&&o)})},t.throttle=throttle}},function(e){e.O(0,[69843,12386,48301,64713,39517,2307,49774,92888,40179],function(){return e(e.s=2031)}),_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.