PageSourceSearch

https://landlord-home.ephome.org/_next/static/chunks/pages/landlor…/add-61b680982e1b21a6.js

js ephome.org collected 2026-10-09 03:23:13 UTC 11,128 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5707],{37132:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/landlord/manage-my-documents/add",function(){return t(62663)}])},85037:function(n,e,t){"use strict";t.d(e,{Me:function(){return a},UZ:function(){return i},WP:function(){return o},XF:function(){return u}});var r=t(20743);let o=async()=>{let{data:n}=await r.o.get("LandLord/Disclosure/get-doc-types");return n},i=async n=>{let{data:e}=await r.o.post("LandLord/RFTA/SaveDocument",n,{headers:{"Content-Type":"multipart/form-data"}});return e},a=async n=>{let{data:e}=await r.o.get("LandLord/Documents/DownloadAutoDocument/".concat(n),{responseType:"blob"});return e},u=async n=>{let{data:e}=await r.o.get("LandLord/Documents/DownloadDocumentForLandLord/".concat(n),{responseType:"blob"});return e}},38516:function(n,e,t){"use strict";t.d(e,{g7:function(){return c},qu:function(){return l},uN:function(){return s},yZ:function(){return d}});var r=t(43686),o=t(92114),i=t(73921),a=t(58005),u=t(85037);let l=()=>(0,r.a)(["docTypes"],()=>(0,u.WP)(),{staleTime:1/0}),s=(n,e)=>{let t=(0,o.NL)();return(0,i.D)({mutationFn:async n=>{let{rftaId:e,document:t}=n;return t.append("rftaId","".concat(e)),await (0,u.UZ)(t)},onError:()=>{e()},onSuccess:async()=>{await t.invalidateQueries({queryKey:["allDocuments"]}),n()}})},c=n=>{let{filename:e,onSuccess:t,onError:o}=n;return(0,r.a)(["document",e],async()=>await (0,u.Me)(e),{enabled:!1,onError:n=>{if((0,a.IZ)(n)){var e;o(null===(e=n.response)||void 0===e?void 0:e.data.description);return}o()},onSuccess:n=>{t&&t(n)}})},d=n=>{let{filename:e,onSuccess:t,onError:o}=n;return(0,r.a)(["dashboardDocument",e],async()=>await (0,u.XF)(e),{enabled:!1,onError:n=>{if((0,a.IZ)(n)){var e;o(null===(e=n.response)||void 0===e?void 0:e.data.description);return}o()},onSuccess:n=>{t&&t(n)}})}},25002:function(n,e,t){"use strict";t.d(e,{_:function(){return c},Y:function(){return s}});var r=t(92114),o=t(73921),i=t(58005),a=t(20743);let u=async n=>{let{data:e}=await a.o.post("Landlord/Documents/SaveDocumentForLandlord",n,{headers:{"Content-Type":"multipart/form-data"}});return e},l=async n=>{let{data:e}=await a.o.post("LandLord/RFTA/SaveContractDocument",n,{headers:{"Content-Type":"multipart/form-data"}});return e},s=n=>{let{onError:e,onSuccess:t}=n,a=(0,r.NL)();return(0,o.D)({mutationFn:n=>u(n),async onSuccess(){await a.invalidateQueries({queryKey:["allLandlordDocuments"]}),t()},onError(n){if((0,i.IZ)(n)){var t;e(null===(t=n.response)||void 0===t?void 0:t.data.description);return}e()}})},c=n=>{let e=(0,r.NL)();return(0,o.D)({mutationFn:async n=>{let{document:e}=n;return await l(e)},onSuccess:async t=>{await e.invalidateQueries({queryKey:["all_rftas"]}),n(t)}})}},58178:function(n,e,t){"use strict";var r=t(15311);t(20132);var o=t(81215);e.Z=function(n){return(0,r.jsx)(o.Z,{multiline:!0,height:"auto",...n})}},64289:function(n,e,t){"use strict";var r=t(3247),o=t(15311),i=t(64344);function a(){let n=(0,r._)(["\n  width: 100%;\n  height: 100vh;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]);return a=function(){return n},n}let u=(0,t(84819).ZP)("div")(a());e.Z=function(){return(0,o.jsx)(u,{children:(0,o.jsx)(i.Z,{})})}},75442:function(n,e,t){"use strict";t.d(e,{a:function(){return r},y:function(){return o}});let r=["application/pdf","image/png","image/jpeg"],o=["application/pdf","image/png","image/jpeg"]},62025:function(n,e,t){"use strict";t.d(e,{u:function(){return a}});var r=t(33659),o=t(68102),i=t(20132);let a=()=>{let{data:n}=(0,r.v$)();(0,i.useEffect)(()=>{if(n){if("1"===n.locale){localStorage.setItem("lang","en"),(0,o.Z)("en");return}localStorage.setItem("lang","es"),(0,o.Z)("es")}},[n])}},44571:function(n,e,t){"use strict";t.d(e,{z:function(){return O},K9:function(){return s},zr:function(){return L},vV:function(){return R},MQ:function(){return E},KI:function(){return A},eN:function(){return g}});var r=t(15311),o=t(23262),i=t(84819);let a=(0,i.ZP)("span")(n=>{let{}=n;return{display:"block",maxWidth:"897px",fontSize:"24px"}}),u=(0,i.ZP)("span")(n=>{let{}=n;return{display:"block",fontSize:"16px",lineHeight:"22px",color:"#333"}}),l=(0,i.ZP)("span")(n=>{let{}=n;return{fontSize:"17px",display:"block",color:"#333"}});var s=n=>{let{icon:e,mainText:t,secondaryText:i,smallText:s,nextButton:c,previousButton:d,children:f,setStep:p}=n;return(0,r.jsx)(o.Df,{children:(0,r.jsx)(o.RA,{images:e,setStep:p,title:(0,r.jsx)(a,{children:t}),buttons:(0,r.jsxs)(r.Fragment,{children:[d&&d,c&&c]}),children:(0,r.jsxs)(r.Fragment,{children:[i&&(0,r.jsx)(u,{children:i}),s&&(0,r.jsx)(l,{children:s}),f&&f]})})})},c=t(3247),d=t(80185);function f(){let n=(0,c._)(["\n  font-size: 27px;\n  font-weight: 500;\n  color: ",";\n"]);return f=function(){return n},n}function p(){let n=(0,c._)(["\n  margin: 10px 0;\n  font-weight: bold;\n  font-size: 21px;\n"]);return p=function(){return n},n}function m(){let n=(0,c._)(["\n  font-size: 17px;\n  font-weight: 500;\n  color: ",";\n"]);return m=function(){return n},n}function x(){let n=(0,c._)(["\n  font-size: 17px;\n  font-weight: 700;\n  color: ",";\n"]);return x=function(){return n},n}function D(){let n=(0,c._)(["\n  font-size: 21px;\n  font-weight: 500;\n  color: ",";\n"]);return D=function(){return n},n}function _(){let n=(0,c._)(["\n  font-size: 17px;\n  font-weight: 500;\n  color: ",";\n"]);return _=function(){return n},n}function y(){let n=(0,c._)(["\n  font-size: 13px;\n  font-weight: 500;\n  padding: 0 28px;\n  color: ",";\n\n  "," {\n    padding: 0;\n    max-width: 283px;\n  }\n"]);return y=function(){return n},n}function h(){let n=(0,c._)(["\n  font-size: 24px;\n  font-weight: 500;\n  color: ",";\n"]);return h=function(){return n},n}let L=(0,i.ZP)(d.Z)(f(),n=>{let{theme:e}=n;return e.palette.secondary.dark}),O=(0,i.ZP)(d.Z)(p()),A=(0,i.ZP)(d.Z)(m(),n=>{let{theme:e}=n;return e.palette.secondary.dark});(0,i.ZP)("span")(x(),n=>{let{theme:e}=n;return e.palette.secondary.dark});let E=(0,i.ZP)(d.Z)(D(),n=>{let{theme:e}=n;return e.palette.secondary.dark});(0,i.ZP)(d.Z)(_(),n=>{let{theme:e}=n;return e.palette.secondary.pale});let R=(0,i.ZP)(d.Z)(y(),n=>{let{theme:e}=n;return e.palette.error.dark},n=>{let{theme:e}=n;return e.breakpoints.down("mobile")}),g=(0,i.ZP)(d.Z)(h(),n=>{let{theme:e}=n;return e.palette.primary.dark})},62663:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSP:function(){return U},default:function(){return k}});
1var r,o,i=t(15311),a=t(33659),u=t(64289),l=t(62025),s=t(23262),c=t(88207),d=t(36809),f=t(44571),p=t(3247),m=t(38516);(r=o||(o={})).AGREEMENT="Agreements",r.DISCLOSURE="Disclosures",r.W9="W-9",r.FORM_1009="1099 Form",r.FORM_1009_MISC="1099 MISC",r.ATTACHMENT="Attachment",r.COI="COI",r.MBWBE="MBWBE",r.OTHER="Other",r.SERVICE_CONTRACT="Service Contract",r.VENDOR_AGREEMENT="Vendor Agreement";var x=t(26662),D=t(9912);let _=D.Ry({documentType:D.jb(o),notes:D.Z_().max(100).nonempty((0,x.L)("COMMON:VALIDATION_REQUIRED")),file:D.PG(n=>n instanceof File)});var y=t(25002),h=t(72155),L=t(58178),O=t(91054),A=t(63161),E=t(75442),R=t(57017),g=t(84819),Z=t(37637),j=t(54001),T=t(64344),N=t(28500),S=t(20132),v=t(17723),w=t(8487);function b(){let n=(0,p._)(["\n  height: 440px;\n\n  "," {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n  }\n"]);return b=function(){return n},n}let M=(0,g.ZP)("form")(b(),n=>{let{theme:e}=n;return e.breakpoints.down("mobile")});var C=n=>{let{rftaId:e,onSuccessCallback:t}=n,{data:r,isLoading:o,isSuccess:a}=(0,m.qu)(),{control:u,register:l,watch:s,setValue:c,reset:d,getValues:f,handleSubmit:p,formState:{errors:x}}=(0,v.cI)({resolver:(0,R.F)(_),reValidateMode:"onSubmit"}),{ref:D,...g}=l("file"),b=(0,S.useRef)(null),[C,F]=(0,S.useState)(null),{mutate:I,isLoading:P}=(0,m.uN)(()=>{F(null),d()},()=>w.Am.error((0,i.jsx)(O.Z,{text:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:RFTA_ERROR_ON_UPLOAD"})}))),{mutate:U,isLoading:k}=(0,y.Y)({onError:n=>n?w.Am.error((0,i.jsx)(O.Z,{text:n})):w.Am.error((0,i.jsx)(O.Z,{text:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:DASHBOARD_MY_DOCUMENTS_UPLOAD_ERROR"})})),onSuccess:()=>{t&&t()}}),z=()=>{b.current&&b.current.click()},K=s("file");return(0,i.jsxs)(M,{onSubmit:p(()=>{let{documentType:n,file:t,notes:r}=f(),o=new FormData;if(o.append("file",t),o.append("notes",r),o.append("documentType",n),e){I({rftaId:e,document:o});return}U(o)}),children:[o||!a?(0,i.jsx)(h.RG,{customlabel:"LANDLORD:RFTA_LOADING_DOC_TYPES",disabled:!0,defaultValue:""}):(0,i.jsx)(v.Qr,{name:"documentType",control:u,defaultValue:r[0].name,render:n=>{let{field:e}=n;return(0,i.jsx)(h.RG,{customlabel:"LANDLORD:RFTA_SELECT_DOCUMENT",...e,children:r.map(n=>{let{id:e,name:t}=n;return(0,i.jsx)(Z.Z,{value:t,children:t},e)})})}}),(0,i.jsx)(v.Qr,{name:"notes",control:u,render:n=>{var e;let{field:t}=n;return(0,i.jsx)(L.Z,{customlabel:"LANDLORD:RFTA_UPLOAD_NOTES",placeholder:"Type here",sx:{maxWidth:"500px",marginBottom:"12px",width:"500px"},labelsx:{height:"fit-content"},minRows:4,...t,error:!!x.notes,helperText:null===(e=x.notes)||void 0===e?void 0:e.message})}}),(0,i.jsx)("p",{children:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:DASHBOARD_MY_DOCUMENTS_FILE_TYPES"})}),(0,i.jsx)("p",{children:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:DASHBOARD_MY_DOCUMENTS_MAX_SIZE"})}),(0,i.jsxs)(j.ZP,{display:"flex",flexDirection:"column",height:"75px",alignItems:{xs:"center",mobile:"flex-start"},children:[(0,i.jsx)(h.MG,{styletype:"Secondary",size:"small",onClick:()=>z(),sx:{width:"fit-content",marginTop:"24px"},children:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:RFTA_CHOOSE_FILE"})}),!!C&&(0,i.jsx)("a",{target:"_blank",href:C,children:"Preview: ".concat(K.name)})]}),!!(null==K?void 0:K.name)&&(0,i.jsx)(h.MG,{styletype:"Primary",size:"small",type:"submit",endIcon:(P||k)&&(0,i.jsx)(T.Z,{style:{color:"white"},size:20}),sx:{width:"fit-content",margin:"24px 0"},children:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:RFTA_ADD_FILE"})}),(0,i.jsx)("input",{type:"file",hidden:!0,...g,ref:n=>{D(n),b.current=n},onChange:n=>{let e=n.target.files;if(e&&e[0]){if(!E.a.includes(e[0].type)){w.Am.error((0,i.jsx)(O.Z,{text:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:RFTA_FILE_EXTENSION_NOT_SUPPORTED"})}));return}if(e[0].size>A.Tb){w.Am.error((0,i.jsx)(O.Z,{text:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:RFTA_FILE_SIZE_TOO_BIG"})}));return}let n=new Blob([e[0]],{type:e[0].type});F(URL.createObjectURL(n)),c("file",e[0])}}})]})},F=t(5762),I=()=>{let n=(0,F.useRouter)();return(0,i.jsxs)(s._U,{navigation:(0,i.jsx)(c.X,{}),children:[(0,i.jsx)(f.zr,{marginBottom:2,children:(0,i.jsx)(N.Z,{i18nKey:"LANDLORD:DASHBOARD_MY_DOCUMENTS_ADD_NEW_DOCUMENT"})}),(0,i.jsx)(C,{onSuccessCallback:()=>n.push(d.default.LANDLORD_MY_DOCUMENTS.ROUTE)})]})},P=t(5724),U=!0,k=()=>{let{isLoading:n,isError:e}=(0,a.v$)();(0,l.u)();let{t}=(0,P.Z)();return n?(0,i.jsx)(u.Z,{}):e?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:t("LANDLORD:DASHBOARD_MY_DOCUMENTS_ADD_NEW_DOCUMENT")}),(0,i.jsx)(s.Nm,{children:(0,i.jsx)(I,{})})]})}},26662:function(n,e,t){"use strict";t.d(e,{L:function(){return r}});let r=(n,e)=>JSON.stringify({translationKey:n,...e})}},function(n){n.O(0,[6637,8753,9912,7017,3707,608,2888,9774,179],function(){return n(n.s=37132)}),_N_E=n.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.