From 252e91fc77b3ed3b7d4afd9c256706d4f6a374c9 Mon Sep 17 00:00:00 2001 From: omkieit Date: Wed, 25 Sep 2024 19:56:38 +0530 Subject: [PATCH] done --- ef-ui/dist/assets/{index-xG9H_uK3.js => index-D1RcI06_.js} | 2 +- ef-ui/dist/index.html | 2 +- ef-ui/src/redux/features/propertySlice.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename ef-ui/dist/assets/{index-xG9H_uK3.js => index-D1RcI06_.js} (99%) diff --git a/ef-ui/dist/assets/index-xG9H_uK3.js b/ef-ui/dist/assets/index-D1RcI06_.js similarity index 99% rename from ef-ui/dist/assets/index-xG9H_uK3.js rename to ef-ui/dist/assets/index-D1RcI06_.js index 9276092..b383be5 100644 --- a/ef-ui/dist/assets/index-xG9H_uK3.js +++ b/ef-ui/dist/assets/index-D1RcI06_.js @@ -50,7 +50,7 @@ Error generating stack: `+o.message+` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[dd]=this[dd]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Dr(a);r[s]||(Q0(i,a),r[s]=!0)}return R.isArray(t)?t.forEach(o):o(t),this}}qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(qe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});R.freezeMethods(qe);function ma(e,t){const n=this||bi,r=t||n,i=qe.from(r.headers);let o=r.data;return R.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function jm(e){return!!(e&&e.__CANCEL__)}function Er(e,t,n){G.call(this,e??"canceled",G.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Er,G,{__CANCEL__:!0});function wm(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function G0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function J0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[o];a||(a=u),n[i]=c,r[i]=u;let p=o,g=0;for(;p!==i;)g+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-a{n=d,i=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-n;p>=r?a(u,d):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},r-p)))},()=>i&&a(i)]}const Xo=(e,t,n=3)=>{let r=0;const i=J0(50,250);return X0(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,c=a-r,u=i(c),d=a<=s;r=a;const p={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&d?(s-a)/u:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(p)},n)},fd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},pd=e=>(...t)=>R.asap(()=>e(...t)),Z0=We.hasStandardBrowserEnv?function(){const t=We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=R.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),e1=We.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function t1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function n1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nm(e,t){return e&&!t1(t)?n1(e,t):t}const md=e=>e instanceof qe?{...e}:e;function Ln(e,t){t=t||{};const n={};function r(u,d,p){return R.isPlainObject(u)&&R.isPlainObject(d)?R.merge.call({caseless:p},u,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function i(u,d,p){if(R.isUndefined(d)){if(!R.isUndefined(u))return r(void 0,u,p)}else return r(u,d,p)}function o(u,d){if(!R.isUndefined(d))return r(void 0,d)}function a(u,d){if(R.isUndefined(d)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function s(u,d,p){if(p in t)return r(u,d);if(p in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,d)=>i(md(u),md(d),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=c[d]||i,g=p(e[d],t[d],d);R.isUndefined(g)&&p!==s||(n[d]=g)}),n}const Em=e=>{const t=Ln({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=qe.from(a),t.url=ym(Nm(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(R.isFormData(n)){if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...d]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(We.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Z0(t.url))){const u=i&&o&&e1.read(o);u&&a.set(i,u)}return t},r1=typeof XMLHttpRequest<"u",i1=r1&&function(e){return new Promise(function(n,r){const i=Em(e);let o=i.data;const a=qe.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,d,p,g,j,y;function w(){j&&j(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function h(){if(!x)return;const f=qe.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),N={data:!s||s==="text"||s==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:f,config:e,request:x};wm(function(k){n(k),w()},function(k){r(k),w()},N),x=null}"onloadend"in x?x.onloadend=h:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(h)},x.onabort=function(){x&&(r(new G("Request aborted",G.ECONNABORTED,e,x)),x=null)},x.onerror=function(){r(new G("Network Error",G.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const N=i.transitional||gm;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new G(v,N.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,x)),x=null},o===void 0&&a.setContentType(null),"setRequestHeader"in x&&R.forEach(a.toJSON(),function(v,N){x.setRequestHeader(N,v)}),R.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),s&&s!=="json"&&(x.responseType=i.responseType),u&&([g,y]=Xo(u,!0),x.addEventListener("progress",g)),c&&x.upload&&([p,j]=Xo(c),x.upload.addEventListener("progress",p),x.upload.addEventListener("loadend",j)),(i.cancelToken||i.signal)&&(d=f=>{x&&(r(!f||f.type?new Er(null,e,x):f),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const m=G0(i.url);if(m&&We.protocols.indexOf(m)===-1){r(new G("Unsupported protocol "+m+":",G.ERR_BAD_REQUEST,e));return}x.send(o||null)})},o1=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,s();const d=u instanceof Error?u:this.reason;r.abort(d instanceof G?d:new Er(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,o(new G(`timeout ${t} of ms exceeded`,G.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>R.asap(s),c}},l1=function*(e,t){let n=e.byteLength;if(!t||n{const i=a1(e,t);let o=0,a,s=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){s(),c.close();return}let p=d.byteLength;if(n){let g=o+=p;n(g)}c.enqueue(new Uint8Array(d))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},Pl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Sm=Pl&&typeof ReadableStream=="function",c1=Pl&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),km=(e,...t)=>{try{return!!e(...t)}catch{return!1}},u1=Sm&&km(()=>{let e=!1;const t=new Request(We.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),vd=64*1024,Ns=Sm&&km(()=>R.isReadableStream(new Response("").body)),Zo={stream:Ns&&(e=>e.body)};Pl&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Zo[t]&&(Zo[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new G(`Response type '${t}' is not supported`,G.ERR_NOT_SUPPORT,r)})})})(new Response);const d1=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(We.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await c1(e)).byteLength},f1=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??d1(t)},p1=Pl&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:g}=Em(e);u=u?(u+"").toLowerCase():"text";let j=o1([i,o&&o.toAbortSignal()],a),y;const w=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let x;try{if(c&&u1&&n!=="get"&&n!=="head"&&(x=await f1(d,r))!==0){let N=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(R.isFormData(r)&&(E=N.headers.get("content-type"))&&d.setContentType(E),N.body){const[k,S]=fd(x,Xo(pd(c)));r=hd(N.body,vd,k,S)}}R.isString(p)||(p=p?"include":"omit");const h="credentials"in Request.prototype;y=new Request(t,{...g,signal:j,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:h?p:void 0});let m=await fetch(y);const f=Ns&&(u==="stream"||u==="response");if(Ns&&(s||f&&w)){const N={};["status","statusText","headers"].forEach(O=>{N[O]=m[O]});const E=R.toFiniteNumber(m.headers.get("content-length")),[k,S]=s&&fd(E,Xo(pd(s),!0))||[];m=new Response(hd(m.body,vd,k,()=>{S&&S(),w&&w()}),N)}u=u||"text";let v=await Zo[R.findKey(Zo,u)||"text"](m,e);return!f&&w&&w(),await new Promise((N,E)=>{wm(N,E,{data:v,headers:qe.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:y})})}catch(h){throw w&&w(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,e,y),{cause:h.cause||h}):G.from(h,h&&h.code,e,y)}}),Es={http:b0,xhr:i1,fetch:p1};R.forEach(Es,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yd=e=>`- ${e}`,m1=e=>R.isFunction(e)||e===null||e===!1,_m={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : `+o.map(yd).join(` `):" "+yd(o[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Es};function ha(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Er(null,e)}function gd(e){return ha(e),e.headers=qe.from(e.headers),e.data=ma.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_m.getAdapter(e.adapter||bi.adapter)(e).then(function(r){return ha(e),r.data=ma.call(e,e.transformResponse,r),r.headers=qe.from(r.headers),r},function(r){return jm(r)||(ha(e),r&&r.response&&(r.response.data=ma.call(e,e.transformResponse,r.response),r.response.headers=qe.from(r.response.headers))),Promise.reject(r)})}const Cm="1.7.7",Ac={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ac[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xd={};Ac.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Cm+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new G(i(a," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!xd[a]&&(xd[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function h1(e,t,n){if(typeof e!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],c=s===void 0||a(s,o,e);if(c!==!0)throw new G("option "+o+" must be "+c,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+o,G.ERR_BAD_OPTION)}}const Ss={assertOptions:h1,validators:Ac},Ut=Ss.validators;class bn{constructor(t){this.defaults=t,this.interceptors={request:new ud,response:new ud}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ln(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ss.assertOptions(r,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:Ss.assertOptions(i,{encode:Ut.function,serialize:Ut.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&R.merge(o.common,o[n.method]);o&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=qe.concat(a,o);const s=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,s.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let d,p=0,g;if(!c){const y=[gd.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,u),g=y.length,d=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Er(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Mc(function(i){t=i}),cancel:t}}}function v1(e){return function(n){return e.apply(null,n)}}function y1(e){return R.isObject(e)&&e.isAxiosError===!0}const ks={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ks).forEach(([e,t])=>{ks[t]=e});function bm(e){const t=new bn(e),n=om(bn.prototype.request,t);return R.extend(n,bn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return bm(Ln(e,i))},n}const ae=bm(bi);ae.Axios=bn;ae.CanceledError=Er;ae.CancelToken=Mc;ae.isCancel=jm;ae.VERSION=Cm;ae.toFormData=bl;ae.AxiosError=G;ae.Cancel=ae.CanceledError;ae.all=function(t){return Promise.all(t)};ae.spread=v1;ae.isAxiosError=y1;ae.mergeConfig=Ln;ae.AxiosHeaders=qe;ae.formToJSON=e=>xm(R.isHTMLForm(e)?new FormData(e):e);ae.getAdapter=_m.getAdapter;ae.HttpStatusCode=ks;ae.default=ae;const g1="http://67.225.129.127:3002",hn=ae.create({baseURL:g1});hn.interceptors.request.use(e=>(localStorage.getItem("profile")&&(e.headers.Authorization=`Bearer ${JSON.parse(localStorage.getItem("profile")).token}`),e));const x1=e=>hn.post("/users/signup",e),j1=e=>hn.post("/users/signin",e),w1=(e,t,n)=>hn.get(`/users/${e}/verify/${t}`,n),N1=e=>hn.post("/properties",e),E1=(e,t,n)=>hn.get(`/properties/user/${e}?page=${t}&limit=${n}`,e),S1=e=>hn.get(`/properties/${e}`,e),k1=(e,t)=>hn.put(`/properties/${e}`,t),ho=_t("auth/login",async({formValue:e,navigate:t},{rejectWithValue:n})=>{try{const r=await j1(e);return t("/dashboard"),r.data}catch(r){return n(r.response.data)}}),vo=_t("auth/register",async({formValue:e,navigate:t,toast:n},{rejectWithValue:r})=>{try{const i=await x1(e);return n.success("Register Successfully"),t("/registrationsuccess"),i.data}catch(i){return r(i.response.data)}}),va=_t("auth/updateUser",async({id:e,data:t},{rejectWithValue:n})=>{try{return(await(void 0)(t,e)).data}catch(r){return n(r.response.data)}}),Pm=Tc({name:"auth",initialState:{user:null,error:"",loading:!1},reducers:{setUser:(e,t)=>{e.user=t.payload},setLogout:e=>{localStorage.clear(),e.user=null},setUserDetails:(e,t)=>{e.user=t.payload}},extraReducers:e=>{e.addCase(ho.pending,t=>{t.loading=!0}).addCase(ho.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(ho.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(vo.pending,t=>{t.loading=!0}).addCase(vo.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(vo.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(va.pending,t=>{t.loading=!0}).addCase(va.fulfilled,(t,n)=>{t.loading=!1,t.user=n.payload}).addCase(va.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message})}}),{setUser:Qj,setLogout:_1,setUserDetails:Gj}=Pm.actions,C1=Pm.reducer,ya=_t("user/showUser",async({id:e,data:t},{rejectWithValue:n})=>{try{const r=await(void 0)(t,e);return console.log("dsdsdsds22",r),r.data}catch(r){return n(r.response.data)}}),yo=_t("user/verifyEmail",async({id:e,token:t,data:n},{rejectWithValue:r})=>{try{return(await w1(e,t,n)).data.message}catch(i){return r(i.response.data)}}),b1=Tc({name:"user",initialState:{users:[],error:"",loading:!1,verified:!1},reducers:{},extraReducers:e=>{e.addCase(ya.pending,t=>{t.loading=!0}).addCase(ya.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.users=Array.isArray(n.payload)?n.payload:[]}).addCase(ya.rejected,(t,n)=>{t.loading=!1,t.error=n.payload}).addCase(yo.pending,t=>{t.loading=!0,t.error=null}).addCase(yo.fulfilled,(t,n)=>{t.loading=!1,t.verified=n.payload==="Email verified successfully"}).addCase(yo.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message})}}),P1=b1.reducer,go=_t("property/submitProperty",async(e,{rejectWithValue:t})=>{try{return(await N1(e)).data}catch(n){return t(n.response.data)}}),xo=_t("property/fetchUserProperties",async({userId:e,page:t,limit:n},{rejectWithValue:r})=>{try{return(await E1(e,t,n)).data}catch(i){return r(i.response.data)}}),Qr=_t("property/fetchPropertyById",async(e,{rejectWithValue:t})=>{try{return(await S1(e)).data}catch(n){return t(n.response.data)}}),jo=_t("property/updateProperty",async({id:e,propertyData:t},{rejectWithValue:n})=>{try{return(await k1(e,t)).data}catch(r){return n(r.response.data)}}),wo=_t("property/getProperties",async()=>(await ae.get("http://localhost:3002/properties")).data),O1=Tc({name:"property",initialState:{property:{},status:"idle",error:null,userProperties:[],selectedProperty:null,totalPages:0,currentPage:1,loading:!1,properties:[]},reducers:{},extraReducers:e=>{e.addCase(go.pending,t=>{t.status="loading"}).addCase(go.fulfilled,(t,n)=>{t.status="succeeded",t.property=n.payload}).addCase(go.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(xo.pending,t=>{t.loading=!0}).addCase(xo.fulfilled,(t,{payload:n})=>{t.loading=!1,t.userProperties=n.properties,t.totalPages=n.totalPages,t.currentPage=n.currentPage}).addCase(xo.rejected,(t,{payload:n})=>{t.loading=!1,t.error=n}).addCase(Qr.pending,t=>{t.status="loading"}).addCase(Qr.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(Qr.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(jo.pending,t=>{t.status="loading"}).addCase(jo.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(jo.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(wo.pending,t=>{t.loading=!0}).addCase(wo.fulfilled,(t,n)=>{t.loading=!1,t.properties=n.payload}).addCase(wo.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message})}}),T1=O1.reducer,R1=Eg({reducer:{auth:C1,user:P1,property:T1}});/** +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ln(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ss.assertOptions(r,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:Ss.assertOptions(i,{encode:Ut.function,serialize:Ut.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&R.merge(o.common,o[n.method]);o&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=qe.concat(a,o);const s=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,s.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let d,p=0,g;if(!c){const y=[gd.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,u),g=y.length,d=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Er(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Mc(function(i){t=i}),cancel:t}}}function v1(e){return function(n){return e.apply(null,n)}}function y1(e){return R.isObject(e)&&e.isAxiosError===!0}const ks={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ks).forEach(([e,t])=>{ks[t]=e});function bm(e){const t=new bn(e),n=om(bn.prototype.request,t);return R.extend(n,bn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return bm(Ln(e,i))},n}const ae=bm(bi);ae.Axios=bn;ae.CanceledError=Er;ae.CancelToken=Mc;ae.isCancel=jm;ae.VERSION=Cm;ae.toFormData=bl;ae.AxiosError=G;ae.Cancel=ae.CanceledError;ae.all=function(t){return Promise.all(t)};ae.spread=v1;ae.isAxiosError=y1;ae.mergeConfig=Ln;ae.AxiosHeaders=qe;ae.formToJSON=e=>xm(R.isHTMLForm(e)?new FormData(e):e);ae.getAdapter=_m.getAdapter;ae.HttpStatusCode=ks;ae.default=ae;const g1="http://67.225.129.127:3002",hn=ae.create({baseURL:g1});hn.interceptors.request.use(e=>(localStorage.getItem("profile")&&(e.headers.Authorization=`Bearer ${JSON.parse(localStorage.getItem("profile")).token}`),e));const x1=e=>hn.post("/users/signup",e),j1=e=>hn.post("/users/signin",e),w1=(e,t,n)=>hn.get(`/users/${e}/verify/${t}`,n),N1=e=>hn.post("/properties",e),E1=(e,t,n)=>hn.get(`/properties/user/${e}?page=${t}&limit=${n}`,e),S1=e=>hn.get(`/properties/${e}`,e),k1=(e,t)=>hn.put(`/properties/${e}`,t),ho=_t("auth/login",async({formValue:e,navigate:t},{rejectWithValue:n})=>{try{const r=await j1(e);return t("/dashboard"),r.data}catch(r){return n(r.response.data)}}),vo=_t("auth/register",async({formValue:e,navigate:t,toast:n},{rejectWithValue:r})=>{try{const i=await x1(e);return n.success("Register Successfully"),t("/registrationsuccess"),i.data}catch(i){return r(i.response.data)}}),va=_t("auth/updateUser",async({id:e,data:t},{rejectWithValue:n})=>{try{return(await(void 0)(t,e)).data}catch(r){return n(r.response.data)}}),Pm=Tc({name:"auth",initialState:{user:null,error:"",loading:!1},reducers:{setUser:(e,t)=>{e.user=t.payload},setLogout:e=>{localStorage.clear(),e.user=null},setUserDetails:(e,t)=>{e.user=t.payload}},extraReducers:e=>{e.addCase(ho.pending,t=>{t.loading=!0}).addCase(ho.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(ho.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(vo.pending,t=>{t.loading=!0}).addCase(vo.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.user=n.payload}).addCase(vo.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message}).addCase(va.pending,t=>{t.loading=!0}).addCase(va.fulfilled,(t,n)=>{t.loading=!1,t.user=n.payload}).addCase(va.rejected,(t,n)=>{t.loading=!1,t.error=n.payload.message})}}),{setUser:Qj,setLogout:_1,setUserDetails:Gj}=Pm.actions,C1=Pm.reducer,ya=_t("user/showUser",async({id:e,data:t},{rejectWithValue:n})=>{try{const r=await(void 0)(t,e);return console.log("dsdsdsds22",r),r.data}catch(r){return n(r.response.data)}}),yo=_t("user/verifyEmail",async({id:e,token:t,data:n},{rejectWithValue:r})=>{try{return(await w1(e,t,n)).data.message}catch(i){return r(i.response.data)}}),b1=Tc({name:"user",initialState:{users:[],error:"",loading:!1,verified:!1},reducers:{},extraReducers:e=>{e.addCase(ya.pending,t=>{t.loading=!0}).addCase(ya.fulfilled,(t,n)=>{t.loading=!1,localStorage.setItem("profile",JSON.stringify({...n.payload})),t.users=Array.isArray(n.payload)?n.payload:[]}).addCase(ya.rejected,(t,n)=>{t.loading=!1,t.error=n.payload}).addCase(yo.pending,t=>{t.loading=!0,t.error=null}).addCase(yo.fulfilled,(t,n)=>{t.loading=!1,t.verified=n.payload==="Email verified successfully"}).addCase(yo.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message})}}),P1=b1.reducer,go=_t("property/submitProperty",async(e,{rejectWithValue:t})=>{try{return(await N1(e)).data}catch(n){return t(n.response.data)}}),xo=_t("property/fetchUserProperties",async({userId:e,page:t,limit:n},{rejectWithValue:r})=>{try{return(await E1(e,t,n)).data}catch(i){return r(i.response.data)}}),Qr=_t("property/fetchPropertyById",async(e,{rejectWithValue:t})=>{try{return(await S1(e)).data}catch(n){return t(n.response.data)}}),jo=_t("property/updateProperty",async({id:e,propertyData:t},{rejectWithValue:n})=>{try{return(await k1(e,t)).data}catch(r){return n(r.response.data)}}),wo=_t("property/getProperties",async()=>(await ae.get("http://67.225.129.127:3002/properties")).data),O1=Tc({name:"property",initialState:{property:{},status:"idle",error:null,userProperties:[],selectedProperty:null,totalPages:0,currentPage:1,loading:!1,properties:[]},reducers:{},extraReducers:e=>{e.addCase(go.pending,t=>{t.status="loading"}).addCase(go.fulfilled,(t,n)=>{t.status="succeeded",t.property=n.payload}).addCase(go.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(xo.pending,t=>{t.loading=!0}).addCase(xo.fulfilled,(t,{payload:n})=>{t.loading=!1,t.userProperties=n.properties,t.totalPages=n.totalPages,t.currentPage=n.currentPage}).addCase(xo.rejected,(t,{payload:n})=>{t.loading=!1,t.error=n}).addCase(Qr.pending,t=>{t.status="loading"}).addCase(Qr.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(Qr.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(jo.pending,t=>{t.status="loading"}).addCase(jo.fulfilled,(t,n)=>{t.status="succeeded",t.selectedProperty=n.payload}).addCase(jo.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(wo.pending,t=>{t.loading=!0}).addCase(wo.fulfilled,(t,n)=>{t.loading=!1,t.properties=n.payload}).addCase(wo.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message})}}),T1=O1.reducer,R1=Eg({reducer:{auth:C1,user:P1,property:T1}});/** * @remix-run/router v1.19.1 * * Copyright (c) Remix Software Inc. diff --git a/ef-ui/dist/index.html b/ef-ui/dist/index.html index 47e81a5..38b46fc 100644 --- a/ef-ui/dist/index.html +++ b/ef-ui/dist/index.html @@ -45,7 +45,7 @@ - + diff --git a/ef-ui/src/redux/features/propertySlice.js b/ef-ui/src/redux/features/propertySlice.js index f67c411..0017981 100644 --- a/ef-ui/src/redux/features/propertySlice.js +++ b/ef-ui/src/redux/features/propertySlice.js @@ -65,7 +65,7 @@ export const updateProperty = createAsyncThunk( ); export const getProperties = createAsyncThunk("property/getProperties", async () => { - const response = await axios.get("http://localhost:3002/properties"); // Backend endpoint + const response = await axios.get(`${import.meta.env.VITE_REACT_APP_SECRET}/properties`); // Backend endpoint return response.data; });