PageSourceSearch

https://pofu.io/_next/static/chunks/pages/locate/upload-4ece19a58caa1d82.js

js pofu.io collected 2026-10-05 06:10:43 UTC 14,171 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7558],{19608:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/locate/upload",function(){return n(14905)}])},19245:function(e,t,n){"use strict";var r=n(85893),a=n(95854),i=n(70547),o=n(68409),l=(0,a.zo)(i.Z,{fontWeight:600,color:"$neutral800"});t.Z=function(e){var t=e.title,n=e.description,a=e.instructions;return(0,r.jsxs)(o.ZC,{css:{width:"95%",justifyContent:"center",margin:"0 auto"},children:[(0,r.jsx)(i.Z,{variant:"h5",isBold:!0,sx:{marginBottom:"$2"},children:t}),(0,r.jsx)(i.Z,{variant:"text",sx:{color:"$neutral700",marginBottom:"24px"},children:n}),(0,r.jsx)(l,{children:"Instructions"}),(0,r.jsx)(i.Z,{variant:"text",sx:{marginTop:"10px",marginLeft:"25px"},renderAs:"div",children:(0,r.jsx)("ul",{children:a.map((function(e){return(0,r.jsx)("li",{children:e},e)}))})})]})}},57894:function(e,t,n){"use strict";var r=n(34727),a=n(80969),i=n(70655),o=n(85893),l=n(87710),s=n(70547),c=n(3882),u=n(57460),d=n(67294),p=n(68409),f=n(81747);t.Z=function(e){var t=e.onFileUpload,n=e.onError,h=(0,d.useState)(!1),v=h[0],m=h[1],E=(0,d.useRef)(null),g=function(){var e=(0,r.Z)((function(e){var r,o,l,s,c;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return r=function(e){return e.length>1?"There are more than one file uploaded.":"text/csv"!==e[0].type&&"The file uploaded is not of type .csv"}(e),r?(n(r),[2]):(o=(0,a.Z)(e,1),[4,o[0].text()]);case 1:return l=i.sent(),c={},s=(0,u.parse)(l,(c.header=!0,c)),t(s),[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,o.jsxs)(l.Z,{alignItems:"center",css:{width:"100%",backgroundColor:v?"$primary300":"$neutral100",borderRadius:"$1",transition:"background-color 200ms ",padding:"$3",textAlign:"center",margin:"$3 0",minHeight:"150px"},justifyContent:"center",onDragOver:function(e){e.preventDefault()},onDrop:function(e){m(!1),e.preventDefault();var t=e.dataTransfer.files;g(t)},onDragEnter:function(){m(!0)},onDragLeave:function(){m(!1)},children:[(0,o.jsx)("input",{style:{display:"none"},ref:E,onChange:function(e){var t=e.target.files;g(t),e.target.value=""},type:"file",accept:".csv"}),(0,o.jsxs)(s.Z,{variant:"text",children:[(0,o.jsx)(p.Dr,{css:{fontSize:"25px",marginRight:"20px"},children:(0,o.jsx)(f.Z,{})}),"Drag and drop your CSV file or"," ",(0,o.jsx)(c.Z,{variant:"text",underline:"hover",onClick:function(){E.current.click()},children:"Browse"})," ","a file from your PC"]})]})}},14905:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return j},default:function(){return T}});var r=n(80969),a=n(69779),i=n(85893),o=n(8786),l=n(13065),s=n(38292),c=n(58942),u=n(11163),d=n(90057),p=n(40131),f=n(19245),h=n(57894),v=n(56141),m=n(49681),E=n(94613),g=n(68409),y=n(61796),R=n(24990),A=n(76034),C=n(18542),S=n(73781),Z=n(41334),b=n(14251),x=n(52875),I=n(70607),O=function(e){e.steps=structuredClone(I.b0),e.employees=null,e.currentState="INITIAL"};function D(e,t){var n=t.type,r=t.payload;switch(n){case"FILE_VALIDATION_SUCCESS":O(e);var a=(0,I.Yp)("File Validation");e.steps[a].state="SUCCESS",e.currentState="IN_PROGRESS";break;case"FILE_VALIDATION_ERROR":O(e);var i=(0,I.Yp)("File Validation");e.currentState="ERROR",e.steps[i]={title:"File Validation",description:"Checks the file type and file count.",state:"ERROR",type:"ERROR",error:{component:"FileValidationError",payload:r}};break;case"FIELDS_VALIDATION_SUCCESS":var o=(0,I.Yp)("Fields Validation");e.steps[o].state="SUCCESS";break;case"FIELDS_VALIDATION_ERROR":var l=(0,I.Yp)("Fields Validation");e.currentState="ERROR",e.steps[l]={title:"Fields Validation",description:"Checks whether the CSV has all fields.",type:"ERROR",state:"ERROR",error:{component:"FieldsMissing",payload:r}};break;case"DATA_VALIDATION_SUCCESS":var s,c=(0,I.Yp)("Data Validation");e.currentState="VALIDATED",e.steps[c].state="SUCCESS",(null===(s=r.warning)||void 0===s?void 0:s.length)&&(e.steps[c]={title:"Data Validation",description:"Validates the entire CSV file to create candidates and apply workflows.",type:"SUCCESS",state:"SUCCESS",info:{component:"InvalidAddressInfo",payload:r.warning}}
1);break;case"DATA_VALIDATION_ERROR_WITH_DATA":var u=(0,I.Yp)("Data Validation");e.currentState="ERROR",e.steps[u]={title:"Data Validation",description:"Validates the entire CSV file to create candidates and apply workflows.",type:"ERROR",state:"ERROR",error:{component:"DataValidation",payload:(0,x.Z)((0,b.Z)({},r),{title:"Data Validation Error"})}};break;case"API_ERROR":var d=r||{},p=d.stepName,f=d.data,h=(0,I.Yp)(p);e.currentState="ERROR",e.steps[h]=(0,x.Z)((0,b.Z)({},I.b0[h]),{type:"ERROR",error:{component:"APIError",payload:{title:"".concat(p," Error"),description:f}}});break;case"VALIDATED":e.employees=r;break;case"RESET_UPLOAD":O(e)}}var _=n(87527),V={currentState:"INITIAL",steps:I.b0,employees:null},j=!0,T=function(){var e=(0,u.useRouter)().push,t=(0,R.V6)(),n=t.showSuccessToast,b=t.showErrorToast,x=(0,A.M)().refetch,O=(0,y.Eu)().flags,j=(O||{}).isMapsAllowed,T=(0,r.Z)((0,d.C)(D,V),2),$=T[0],w=T[1],L=$.currentState,k=$.steps,N=$.employees;return(0,i.jsxs)(g.ZC,{children:[(0,i.jsx)(v.Z,{}),(0,i.jsx)(_.B$,{}),(0,i.jsx)(o.Z,{sx:{marginTop:"$4"}}),O?O&&!j?(0,i.jsx)(g.ZC,{css:{marginTop:"$5"},children:(0,i.jsx)(E.$,{actions:(0,i.jsx)(l.Z,{variant:"primary",href:"mailto:[email protected]",children:"Contact us"})})}):(0,i.jsxs)(p.F$,{children:[(0,i.jsxs)(p.Cz,{isBlurred:["IN_PROGRESS","VALIDATED"].includes(L),children:[(0,i.jsx)(f.Z,{title:"Add Employees",description:"Update a CSV file with employees data.",instructions:I.ed}),(0,i.jsx)(h.Z,{onFileUpload:function(e){w({type:"RESET_UPLOAD"}),w({type:"FILE_VALIDATION_SUCCESS"});var t=e.data,n=function(e){var t=(0,I.hm)(e);return t.length?(w({type:"FIELDS_VALIDATION_ERROR",payload:t}),!1):(w({type:"FIELDS_VALIDATION_SUCCESS"}),!0)}(e.meta.fields);if(n){var r=(0,I.kA)(t);(0,Z.gi)(r).then((function(e){var t,n=(null===(t=e.data)||void 0===t?void 0:t.data)||{},i=n.zipcodeCountryErrors,o=void 0===i?[]:i,l=n.errors,s=void 0===l?[]:l;w({type:"DATA_VALIDATION_SUCCESS",payload:{warning:(0,a.Z)(o).concat((0,a.Z)(s))}}),w({type:"VALIDATED",payload:r})})).catch((function(e){var t=e.response,n=t.status,r=t.data;w(422===n?{type:"DATA_VALIDATION_ERROR_WITH_DATA",payload:r.data}:{type:"API_ERROR",payload:{stepName:"Data Validation",data:(null===r||void 0===r?void 0:r.message)||e.message}})}))}},onError:function(e){w({type:"FILE_VALIDATION_ERROR",payload:e})}})]}),(0,i.jsx)(p.er,{}),(0,i.jsxs)(p.Cz,{isBlurred:"INITIAL"===L,children:[(0,i.jsx)(S.tg,{steps:k}),"VALIDATED"===L&&(0,i.jsx)(s.Z,{title:"".concat(null===N||void 0===N?void 0:N.length," Employees data validated successfully."),variant:"success",startIcon:null,onClose:function(){w({type:"RESET_UPLOAD"})},actions:[(0,i.jsx)(c.Z,{onClick:function(){(0,Z.t6)(N).then((function(t){var r=t.data.data.newEmployeesAdded;n({message:"".concat(r," Employees added successfully.")}),x(),e("/locate")})).catch((function(e){return(0,C.bo)(e,b)}))},children:"Confirm Upload"},"0")]})]})]}):(0,i.jsx)(m.Z,{})]})}},15024:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),a=n(70771),i=(0,n(95854).zo)(a.Z,{padding:"12px",backgroundColor:"$neutral50",br:"$1"});function o(e){var t=e.children;return r.createElement(i,{spacing:8},t)}},33489:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(67294),a=n(10837),i=n(70771),o=n(87462),l=n(4942),s=n(9471),c=n(28628),u=n(758),d=n(95854);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=(0,d.zo)("button",{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"$1",fontWeight:"$3",fontFamily:"$sans",height:"$5",minWidth:"$5",border:"1px solid $colors$neutral100",borderRadius:"$1",bgColor:"$baseWhite",color:"$neutral800","&:hover":{borderColor:"$neutral400"},"&:focus":{outline:"none"},"&[disabled]":{color:"$neutral800"},variants:{isActive:{true:{backgroundColor:"$neutral800",color:"$baseWhite",borderColor:"$neutral800","&:hover":{borderColor:"$neutral800"}}},isFocusVisible:{true:{outline:"1px solid $colors$secondary400","&:focus":{outline:"1px solid $colors$secondary400"}}},isEllipsis:{true:{"&:hover":{borderColor:"$neutral100"}}}}});var v=function(e){var t=e.item,n=e.onClick,a=e.isLink,i=e.isActive,l=r.createRef(),d="ellipsis"===t,p=(0,c.Fx)(),v=p.isFocusVisible,m=p.focusProps,E=(0,u.n)({onPress:n,elementType:"button"},l).linkProps,g=(0,s.U)({onPress:n,isDisabled:d},l).buttonProps,y=a?f(f({},E),{},{disabled:d}):g;return d?r.createElement("li",null,r.createElement(h,(0,o.Z)({isEllipsis:!0},g,m,{"aria-label":"ellipsis","aria-hidden":!0}),"...")):r.createElement("li",null,r.createElement(h,(0,o.Z)({isFocusVisible:v,isEllipsis:!1,isActive:i},y,m,{"aria-label":"Go to page ".concat(t),"aria-current":i}),t))},m=n(39415),E=(0,d.zo)(m.Z,{fontSize:"$3",color:"$neutral800",cursor:"pointer","&:hover":{color:"$neutral900"},"&[disabled]":{color:"$neutral100",cursor:"not-allowed","&:hover":{color:"$neutral100"}}});var g=function(e){return r.createElement("li",null,r.createElement(E,e))},y=n(69779),R=function(e,t){var n=t-e+1;return Array.from({length:n},(function(t,n){return e+n}))},A=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=Math.min(n,e),l=Math.max(e-n+1,n+1),s=R(1,o),c=R(l,e),u=t-i,d=e-n-2*i-1,p=t+i,f=n+2*i+2,h=Math.max(Math.min(u,d),o+2),v=Math.min(Math.max(p,f),c[0]-2),m=h>n+2,E=v<e-n-1,g=!m&&n+1<e-n,A=!E&&e-n>n,C=R(h,v),S=e>C.length,Z=(0,y.Z)(a?["prev"]:[]).concat((0,y.Z)(S?s:[]),(0,y.Z)(m?["ellipsis"]:[]),(0,y.Z)(g?[n+1]:[]),(0,y.Z)(C),(0,y.Z)(A?[e-n]:[]),(0,y.Z)(E?["ellipsis"]:[]),(0,y.Z)(S?c:[]),(0,y.Z)(r?["next"]:[]));return Z},C=(0,d.zo)(i.Z,{listStyle:"none",padding:"0",margin:0});function S(e){var t=e.currentPage,n=e.defaultPage,i=e.totalPages,o=e.siblingCount,l=e.boundaryCount,s=e.isLink,c=e.onCh
1ange,u=(0,r.useState)(n),d=u[0],p=u[1],f=t||d,h=t?c:p,m=A(i,f,l,!1,!1,o),E=r.createElement(a.Z,{style:{transform:"rotate(180deg)"}});return!i||i<=0?null:r.createElement("nav",null,r.createElement(C,{spacing:8,renderAs:"ul"},r.createElement(g,{icon:E,onClick:function(){f<=1||h(f-1)},disabled:f<=1,"aria-label":"prev"}),m.map((function(e,t){return r.createElement(v,{key:t,isActive:e===f,isLink:s,onClick:function(){h(e)},item:e})})),r.createElement(g,{icon:r.createElement(a.Z,null),onClick:function(){f>=i||h(f+1)},disabled:f>=i,"aria-label":"next"})))}S.defaultProps={defaultPage:1,siblingCount:1,boundaryCount:1,isLink:!1}},44644:function(e,t,n){"use strict";var r=n(87462),a=n(94334),i=n(45987),o=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,l=(0,i.Z)(e,["className"]);return l=(0,a.Z)({},l,{className:"".concat(n," ui-svg-icon")}),o.createElement("svg",(0,r.Z)({viewBox:"0 0 24 24",width:"1em",height:"1em"},l,{fill:"currentColor"}),o.createElement("path",{d:"M19 6H5c-.6 0-1 .4-1 1s.4 1 1 1h1v9c0 1.7 1.3 3 3 3h6c1.7 0 3-1.3 3-3V8h1c.6 0 1-.4 1-1s-.4-1-1-1zm-3 11c0 .6-.4 1-1 1H9c-.6 0-1-.4-1-1V8h8v9zM10 5h4c.6 0 1-.4 1-1s-.4-1-1-1h-4c-.6 0-1 .4-1 1s.4 1 1 1z"}))}},91838:function(e,t,n){"use strict";var r=n(87462),a=n(94334),i=n(45987),o=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,l=(0,i.Z)(e,["className"]);return l=(0,a.Z)({},l,{className:"".concat(n," ui-svg-icon")}),o.createElement("svg",(0,r.Z)({viewBox:"0 0 24 24",width:"1em",height:"1em"},l,{fill:"currentColor"}),o.createElement("path",{d:"M7 18H3c-.6 0-1-.4-1-1v-4c0-.3.1-.5.3-.7l11-11c.4-.4 1-.4 1.4 0l4 4c.4.4.4 1 0 1.4l-11 11c-.2.2-.4.3-.7.3zm-3-2h2.6l10-10L14 3.4l-10 10V16zm17 7H3c-.6 0-1-.4-1-1s.4-1 1-1h18c.6 0 1 .4 1 1s-.4 1-1 1z"}))}},15697:function(e,t,n){"use strict";var r=n(87462),a=n(94334),i=n(45987),o=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,l=(0,i.Z)(e,["className"]);return l=(0,a.Z)({},l,{className:"".concat(n," ui-svg-icon")}),o.createElement("svg",(0,r.Z)({width:"1em",height:"1em",viewBox:"0 0 22 18"},l,{fill:"currentColor"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.2 1.5c-.333 0-.643.125-.865.333a1.03 1.03 0 00-.335.75v12.834c0 .271.114.542.335.75.222.208.532.333.865.333h15.6c.333 0 .643-.125.865-.333a1.03 1.03 0 00.335-.75V5.333a1.03 1.03 0 00-.335-.75 1.265 1.265 0 00-.865-.333h-8.775a.75.75 0 01-.612-.316L7.687 1.5H3.2zM1.307.74A2.775 2.775 0 013.2 0h4.875a.75.75 0 01.612.316l1.726 2.434H18.8a2.77 2.77 0 011.893.74 2.53 2.53 0 01.807 1.843v10.084c0 .7-.296 1.362-.807 1.842-.51.48-1.191.741-1.893.741H3.2a2.765 2.765 0 01-1.893-.74A2.53 2.53 0 01.5 15.416V2.583c0-.7.296-1.362.8
107-1.842z"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 7.25a.75.75 0 01.75.75v6a.75.75 0 01-1.5 0V8a.75.75 0 01.75-.75z"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 11a.75.75 0 01.75-.75h6a.75.75 0 010 1.5H8a.75.75 0 01-.75-.75z"}))}},26204:function(e,t,n){"use strict";var r=n(87462),a=n(94334),i=n(45987),o=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,l=(0,i.Z)(e,["className"]);return l=(0,a.Z)({},l,{className:"".concat(n," ui-svg-icon")}),o.createElement("svg",(0,r.Z)({viewBox:"0 0 16 16",width:"1em",height:"1em"},l,{fill:"currentColor"}),o.createElement("path",{d:"M12.67 7.33h-4v-4a.67.67 0 00-1.34 0v4h-4a.67.67 0 000 1.34h4v4a.67.67 0 001.34 0v-4h4a.67.67 0 000-1.34z",fillRule:"evenodd"}))}}},function(e){e.O(0,[1255,342,7487,5675,527,1301,5361,9383,3781,8898,9774,2888,179],(function(){return t=19608,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.