-
Notifications
You must be signed in to change notification settings - Fork 0
/
p__Home__index.async.js
1 lines (1 loc) · 11.8 KB
/
p__Home__index.async.js
1
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[371],{19848:function(W,x,t){t.d(x,{Z:function(){return k}});var p=t(76388),s=t(68136),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},j=a,l=t(16518),i=function(e,h){return s.createElement(l.Z,(0,p.Z)({},e,{ref:h,icon:j}))},k=s.forwardRef(i)},25796:function(W,x,t){t.d(x,{Z:function(){return k}});var p=t(76388),s=t(68136),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},j=a,l=t(16518),i=function(e,h){return s.createElement(l.Z,(0,p.Z)({},e,{ref:h,icon:j}))},k=s.forwardRef(i)},86209:function(W,x,t){t.d(x,{Z:function(){return e}});var p=t(68136),s=t(3303),a=t.n(s),j=t(51724),l={container:"container___hIX9Z",isListHover:"isListHover___B_O7Y",markerEle:"markerEle___mqH4h",markerEleText:"markerEleText___Cr1hu"},i=t(33130),k=function(d){var F=d.text,N=d.uid,K=d.price,Y=d.mouseoverId,M=d.setMouseoverId,Q=d.mouseClickedId,X=d.setMouseClickedId,J=N===Y,b=N===Q,w=function(U){U.preventDefault(),M&&M(N)},q=function(U){U.preventDefault(),M&&M("")},ee=function(U){U.preventDefault(),X&&X(function(te){return te===N?"":N})};return(0,i.jsx)("div",{className:a()(l.container,(J||b)&&l.isListHover),onClick:ee,onMouseOver:w,onMouseLeave:q,children:(0,i.jsx)("div",{className:a()(l.markerEle,(J||b)&&l.isListHover),children:(0,i.jsx)("div",{className:l.markerEleText,children:(0,j.G)(K)})})})},f=k,e=f},51724:function(W,x,t){t.d(x,{G:function(){return p},U:function(){return a}});var p=function(l){return"".concat(l?"$".concat(l,"/\u6708"):"\u4EF7\u683C\u5F85\u8BAE")},s=[{val:1e3*60*1,text:"\u521A\u521A"},{val:1e3*60*60,text:"\u5206\u949F\u524D"},{val:1e3*60*60*24,text:"\u5C0F\u65F6\u524D"},{val:1e3*60*60*24*30,text:"\u5929\u524D"},{val:1e3*60*60*24*365,text:"\u4E2A\u6708\u524D"},{val:1e3*60*60*24*365,text:"\u5E74\u524D"}].reverse(),a=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Date,k=new Date(l).getTime(),f=new Date(i).getTime(),e=f-k,h="",d="";return s.some(function(F){if(h=F.text,d="".concat(Math.floor(e/F.val)),F.val<e)return F.val===1e3*60*1&&(d=""),!0}),"".concat(d," ").concat(h)}},39070:function(W,x,t){t.r(x),t.d(x,{default:function(){return Ee}});var p=t(37066),s=t.n(p),a=t(68136),j=t(80063),l=t(22029),i=t.n(l),k=t(86209),f={container:"container___ZV6Fu",loading:"loading___HRQ2V",mapContainer:"mapContainer___cv8F1"},e=t(33130),h=function(n){var o=n.loading,r=n.listData,u=n.mouseoverId,A=n.setMouseoverId,g=n.mouseClickedId,L=n.setMouseClickedId,Z={center:{lat:37.52666,lng:-122.08106},zoom:10.4},G=r.map(function(I){var S=i()(I,"uid",""),P=i()(I,"title",""),v=i()(I,"price",""),m=i()(I,"location_lat",0),V=i()(I,"location_lng",0);return(0,e.jsx)(k.Z,{text:P,lat:m,lng:V,price:v,uid:S,mouseoverId:u,setMouseoverId:A,mouseClickedId:g,setMouseClickedId:L},S)}),B=function(S){S.preventDefault(),A("")};return(0,e.jsxs)("div",{className:f.container,children:[o&&(0,e.jsx)("div",{className:f.loading,children:"Loading"}),!o&&(0,e.jsx)("div",{className:f.mapContainer,onMouseLeave:B,children:(0,e.jsx)(j.ZP,{bootstrapURLKeys:{key:"AIzaSyBMhjUXTNWE8oMeKFSOojf4FhBbbFRgS10"},defaultCenter:Z.center,defaultZoom:Z.zoom,children:G})})]})},d=h,F=d,N=t(23368),K=t.n(N),Y=t(3303),M=t.n(Y),Q=t(51724),X=t(76388),J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888.3 757.4h-53.8c-4.2 0-7.7 3.5-7.7 7.7v61.8H197.1V197.1h629.8v61.8c0 4.2 3.5 7.7 7.7 7.7h53.8c4.2 0 7.7-3.4 7.7-7.7V158.7c0-17-13.7-30.7-30.7-30.7H158.7c-17 0-30.7 13.7-30.7 30.7v706.6c0 17 13.7 30.7 30.7 30.7h706.6c17 0 30.7-13.7 30.7-30.7V765.1c0-4.3-3.5-7.7-7.7-7.7zm18.6-251.7L765 393.7c-5.3-4.2-13-.4-13 6.3v76H438c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"export",theme:"outlined"},b=J,w=t(16518),q=function(n,o){return a.createElement(w.Z,(0,X.Z)({},n,{ref:o,icon:b}))},ee=a.forwardRef(q),C={container:"container___BETZf",hLink:"hLink___TtKQx",onHover:"onHover___e4V8G",gridContainer:"gridContainer___IfRHA",picContainer:"picContainer___M7Fbs",img:"img___KheDm",title:"title___G2dlm",locationAndDate:"locationAndDate___G43SS",pricingAndLink:"pricingAndLink___HRudK",pricing:"pricing___kIbFj"},U=function(n){var o=n.list,r=o===void 0?{}:o,u=n.uid,A=n.mouseoverId,g=n.setMouseoverId,L=n.mouseClickedId,Z=n.setMouseClickedId,G=i()(r,"name","--"),B=i()(r,"content","--"),I=i()(r,"price","--"),S=i()(r,"addressCity","--"),P=i()(r,"lastUpdated",""),v=P?(0,Q.U)(P):"--",m=i()(r,"imageIds[0]",""),V=m?"http://res.cloudinary.com/xinbenlv/image/upload/c_fill,g_north,w_400,h_300,g_center/".concat(m,".jpg"):"",$=u===A,R=u===L,E=function(c){c.preventDefault(),g(u)},z=function(c){c.preventDefault(),g("")},y=function(c){c.preventDefault(),Z(function(_){return _===u?"":u})},D=function(c){return function(_){_.preventDefault(),window.location.href="/client-react-io/home-detail/".concat(c)}};return(0,e.jsxs)("div",{className:M()(C.container,($||R)&&C.onHover),onMouseOver:E,onMouseLeave:z,onClick:y,"list-uid":u,children:[(0,e.jsxs)("div",{className:C.gridContainer,children:[(0,e.jsx)("div",{className:C.title,children:B}),(0,e.jsxs)("div",{className:C.locationAndDate,children:[S," ",v]}),(0,e.jsxs)("div",{className:C.pricingAndLink,children:[(0,e.jsx)("div",{className:C.pricing,children:(0,Q.G)(I)}),(0,e.jsx)("div",{className:C.hLink,children:(0,e.jsx)(ee,{onClick:D(u)})})]})]}),(0,e.jsx)("div",{className:C.picContainer,children:m&&(0,e.jsx)("img",{className:C.img,src:V,alt:"img"})})]})},te=U,le=te,ce=t(45631),de={title:"title___VK2Df"},ue=function(n){var o=n.scrollRef,r=function(){o&&(o.scrollTop=0)};return(0,e.jsx)("div",{className:de.title,onClick:r,children:(0,e.jsx)(ce.Z,{})})},ve=ue,me=ve,ne={container:"container____MpL6",listContainer:"listContainer___a4C7h",loading:"loading___A9OBG"},He=function(n){return n.scrollHeight-n.scrollTop===n.clientHeight},fe=function(n){var o=n.name,r=n.loading,u=n.listData,A=n.mouseoverId,g=n.setMouseoverId,L=n.mouseClickedId,Z=n.setMouseClickedId,G=n.onScrollBottom,B=(0,a.useRef)(),I=u.map(function(v){var m=i()(v,"uid","--");return(0,e.jsx)(le,{list:v,uid:m,mouseoverId:A,setMouseoverId:g,mouseClickedId:L,setMouseClickedId:Z},m)}),S=function(m){m.preventDefault(),g("")},P=K()(function(v){var m=v.clientY,V=v.pageY,$=v.target;if(B.current){var R,E,z,y,D,O,c=((R=v.target)===null||R===void 0||(E=R.parentElement)===null||E===void 0||(z=E.parentElement)===null||z===void 0?void 0:z.getAttribute("list-uid"))||((y=v.target)===null||y===void 0||(D=y.parentElement)===null||D===void 0?void 0:D.getAttribute("list-uid"))||((O=v.target)===null||O===void 0?void 0:O.getAttribute("list-uid"));c&&G(c)}},100);return(0,e.jsxs)("div",{className:ne.container,children:[r&&(0,e.jsx)("div",{className:ne.loading,children:"Loading"}),!r&&(0,e.jsxs)("div",{className:ne.listContainer,onMouseLeave:S,onWheel:P,ref:B,children:[I,(0,e.jsx)(me,{scrollRef:B.current})]})]})},he=fe,Ce=he,Ie=t(13367),xe=t(25796),ae={title:"title____ozcv",plusIcon:"plusIcon_____WUh",searchBox:"searchBox___VFJqr"},Me=function(n){var o=n.name;return(0,e.jsxs)("div",{className:ae.title,children:[(0,e.jsx)("div",{className:ae.plusIcon,children:(0,e.jsx)(xe.Z,{})}),(0,e.jsx)("div",{className:ae.searchBox,children:(0,e.jsx)(Ie.Z,{placeholder:"\u641C\u7D22 \u533A\u57DF/\u57CE\u5E02"})})]})},ge=Me,Le=ge,je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M839.6 433.8L749 150.5a9.24 9.24 0 00-8.9-6.5h-77.4c-4.1 0-7.6 2.6-8.9 6.5l-91.3 283.3c-.3.9-.5 1.9-.5 2.9 0 5.1 4.2 9.3 9.3 9.3h56.4c4.2 0 7.8-2.8 9-6.8l17.5-61.6h89l17.3 61.5c1.1 4 4.8 6.8 9 6.8h61.2c1 0 1.9-.1 2.8-.4 2.4-.8 4.3-2.4 5.5-4.6 1.1-2.2 1.3-4.7.6-7.1zM663.3 325.5l32.8-116.9h6.3l32.1 116.9h-71.2zm143.5 492.9H677.2v-.4l132.6-188.9c1.1-1.6 1.7-3.4 1.7-5.4v-36.4c0-5.1-4.2-9.3-9.3-9.3h-204c-5.1 0-9.3 4.2-9.3 9.3v43c0 5.1 4.2 9.3 9.3 9.3h122.6v.4L587.7 828.9a9.35 9.35 0 00-1.7 5.4v36.4c0 5.1 4.2 9.3 9.3 9.3h211.4c5.1 0 9.3-4.2 9.3-9.3v-43a9.2 9.2 0 00-9.2-9.3zM416 702h-76V172c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v530h-76c-6.7 0-10.5 7.8-6.3 13l112 141.9a8 8 0 0012.6 0l112-141.9c4.1-5.2.4-13-6.3-13z"}}]},name:"sort-ascending",theme:"outlined"},ke=je,Se=function(n,o){return a.createElement(w.Z,(0,X.Z)({},n,{ref:o,icon:ke}))},De=a.forwardRef(Se),Oe=t(85219),ie={title:"title___b5ztX",sort:"sort___td5oV",condition:"condition___i7XL2"},pe=function(n){var o=n.name;return(0,e.jsxs)("div",{className:ie.title,children:[(0,e.jsxs)("div",{className:ie.sort,children:["\u6392\u5E8F",(0,e.jsx)(De,{})]}),(0,e.jsxs)("div",{className:ie.condition,children:["\u7B5B\u9009\u6761\u4EF6",(0,e.jsx)(Oe.Z,{})]})]})},Fe=pe,Ne=Fe,Te=t(30587),H={container:"container___ulS8A",searchContainer:"searchContainer___lfrVI",filterContainer:"filterContainer___nI45l",mapContainer:"mapContainer___Onay6",listContainer:"listContainer___r5KiT",actionContainer:"actionContainer___tnjK7",contentContainer:"contentContainer___vqT1m",mouseActionInfo:"mouseActionInfo___c2nxp"},Ae=!0,re=function(n,o){var r=n.sort(function(u,A){var g=i()(u,"lastUpdated",""),L=i()(A,"lastUpdated","");return new Date(g).getTime()<new Date(L).getTime()?1:-1});return[r.slice(0,o),r.slice(o)]},Be=function(){var n=(0,a.useState)(!1),o=s()(n,2),r=o[0],u=o[1],A=(0,a.useState)([]),g=s()(A,2),L=g[0],Z=g[1],G=(0,a.useState)([]),B=s()(G,2),I=B[0],S=B[1],P=(0,a.useState)(""),v=s()(P,2),m=v[0],V=v[1],$=(0,a.useState)(""),R=s()($,2),E=R[0],z=R[1];(0,a.useEffect)(function(){u(!0),fetch(Te.I).then(function(D){return D.json()}).then(function(D){Z(re(D,0)[1]);var O=re(D,100),c=s()(O,2),_=c[0],se=c[1];S(_),u(!1)})},[]);var y=function(O){var c=L.findIndex(function(oe){return(oe==null?void 0:oe.uid)===O}),_=[];if(c){if(c>50){var se=Math.max(0,c-50),_e=Math.min(c+50,L.length);_=L.slice(se,_e)}else _=L.slice(0,100);S(_)}};return(0,e.jsxs)("div",{className:H.container,children:[Ae&&(0,e.jsxs)("div",{className:H.mouseActionInfo,children:["---",!!m&&"Mouse Over @ ".concat(m),"---",!!E&&"Mouse Click @ ".concat(E),"---"]}),(0,e.jsxs)("div",{className:H.actionContainer,children:[(0,e.jsx)("div",{className:H.searchContainer,children:(0,e.jsx)(Le,{name:"Search"})}),(0,e.jsx)("div",{className:H.filterContainer,children:(0,e.jsx)(Ne,{name:"Filter"})})]}),(0,e.jsxs)("div",{className:H.contentContainer,children:[(0,e.jsx)("div",{className:H.mapContainer,children:(0,e.jsx)(F,{name:"MapContainer",loading:r,listData:I,mouseoverId:m,setMouseoverId:V,mouseClickedId:E,setMouseClickedId:z})}),(0,e.jsx)("div",{className:H.listContainer,children:(0,e.jsx)(Ce,{name:"List",loading:r,listData:I,mouseoverId:m,setMouseoverId:V,mouseClickedId:E,setMouseClickedId:z,onScrollBottom:y})})]})]})},Ee=Be},6006:function(W,x,t){t.d(x,{RV:function(){return i},Rk:function(){return k},Ux:function(){return e},aM:function(){return f},q3:function(){return j},qI:function(){return l}});var p=t(31068),s=t(31833),a=t(68136);const j=a.createContext({labelAlign:"right",vertical:!1,itemRef:()=>{}}),l=a.createContext(null),i=h=>{const d=(0,s.Z)(h,["prefixCls"]);return a.createElement(p.RV,Object.assign({},d))},k=a.createContext({prefixCls:""}),f=a.createContext({}),e=h=>{let{children:d,status:F,override:N}=h;const K=(0,a.useContext)(f),Y=(0,a.useMemo)(()=>{const M=Object.assign({},K);return N&&delete M.isFormItemInput,F&&(delete M.status,delete M.hasFeedback,delete M.feedbackIcon),M},[F,N,K]);return a.createElement(f.Provider,{value:Y},d)}}}]);