PageSourceSearch

https://www.ulifestyle.com.hk/community/_next/static/chunks/74-35cc7c1373887098.js

js ulifestyle.com.hk collected 2026-09-24 08:39:58 UTC 10,306 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[74],{66967:function(e,t,l){var a=l(57437),s=l(27648),r=l(22835);t.Z=e=>{let{href:t,classes:l,onClick:n,children:i}=e,o=(0,r.cn)("rounded-full text-white font-medium",l),c={backgroundImage:"linear-gradient(115deg, #4badd6, #00cc8f)"};return t?(0,a.jsx)(s.default,{href:t,className:o,style:c,target:"_blank",onClick:n,children:i}):(0,a.jsx)("button",{className:o,style:c,onClick:n,children:i})}},33223:function(e,t,l){l.d(t,{default:function(){return v}});var a=l(57437),s=l(2265),r=l(38264),n=l.n(r),i=l(60579),o=l(25468),c=l(84833),d=l(20653),u=l(33145),x=l(28962),m=l(66967),f=e=>{let{authorId:t,isBookmark:l,text:s}=e,{loggedUserId:r}=(0,x.a)();return l?(0,a.jsx)("div",{className:"relative h-[245px] md:h-[485px]",children:(0,a.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 top-[30px] md:top-[150px]",children:[(0,a.jsx)(u.default,{src:"/images/bookmark_empty.svg",width:"160",height:"160",alt:"empty bookmark"}),(0,a.jsx)("div",{className:"text-base text-[#999] text-nowrap text-center",children:"未有任何收藏"})]})}):t&&t===r?(0,a.jsx)("div",{className:"relative h-[328px] md:h-[485px]",children:(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 top-10 md:top-[130px]",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,a.jsx)(u.default,{className:"pb-2",src:"/images/comm_theme_empty.webp",width:"156",height:"116",alt:"empty post"}),(0,a.jsx)("div",{className:"text-base text-[#999] text-nowrap text-center",children:"分享您的第一個帖文,儲Point 升Level!"}),(0,a.jsx)(m.Z,{classes:"py-2 px-4",href:"https://www.ulifestyle.com.hk/res/app/index.html?utm_source=button&utm_medium=comm_myprofile",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(d.pOD,{width:"16",height:"16"}),(0,a.jsx)("span",{className:"text-lg font-medium",children:"分享帖文"})]})})]})})}):(0,a.jsx)("div",{className:"relative h-[298px] md:h-[546px]",children:(0,a.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 top-[57px] md:top-[181px]",children:[(0,a.jsx)(u.default,{src:"/images/post_empty.svg",width:"160",height:"160",alt:"empty post"}),(0,a.jsx)("div",{className:"text-base text-[#999] text-nowrap text-center",children:null!=s?s:"未有任何發表"})]})})},h=l(31501),p=l(75969),g=l(92551);let w={default:5,1023:4,767:2};var v=e=>{let{fetchUrl:t,className:l,newTab:r,addOnSearchParams:d,authorId:u,isBookmark:x,segment:m,size:v,onItemsChange:N,isUserList:b,TitleWrapperTag:j,ga4PvText:y,emptyListText:C,pageurl:k,ga4PostTapText:_}=e,[S,z]=(0,s.useState)([]),[I,E]=(0,s.useState)(0),[O,P]=(0,s.useState)(!0),R=v||12;(0,s.useEffect)(()=>{z([]),E(0),P(!1)},[t,JSON.stringify(d)]),(0,s.useEffect)(()=>{N&&N(S)},[S.map(e=>e.postId).join(",")]);let Z=async()=>{let e={page:I.toString(),size:R.toString()};d&&Object.assign(e,...d);let l=new URLSearchParams(e);return await (0,c.S)("".concat(t,"?").concat(l,"\n      ")).then(e=>{let{list:t}=e;return t}).catch(e=>{throw Error("fetch post error")})},T=async()=>{if(!O&&null!==I){P(!0);try{let e=await Z();z(t=>[...t,...e]),I>0&&e.length>0&&((0,o.YT)({pageview_event_name:"infinite_scroll",text:y}),(0,o.YT)({pageview_event_name:"infinite_scroll",text:y})),E(t=>null===t||0===e.length?null:t+1)}catch(e){console.error(e),E(null)}finally{P(!1)}}},A=null!==I,L=O&&0===S.length?(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-x-[8px] md:gap-x-[1rem]",children:[...Array(R)].map((e,t)=>(0,a.jsx)(p.Z,{className:"mb-6 break-inside-avoid"},t))},0):(0,a.jsx)(g.Z,{},I);return(0,a.jsxs)(n(),{className:l,loadMore:T,hasMore:A,loader:L,children:[!A&&0===S.length&&(0,a.jsx)(f,{authorId:u,isBookmark:x,text:C}),S.length>0&&(0,a.jsx)(i.Z,{breakpointCols:w,className:"flex gap-[8px] md:gap-[1rem]",columnClassName:"max-w-[calc(50%-4px)] min-w-0",children:S.map((e,t)=>(0,a.jsx)(h.Z,{post:e,className:"mb-6 break-inside-avoid",newTab:r,segment:m,isUserList:b,row:t+1,TitleWrapperTag:j,pageurl:k,ga4PostTapText:_},e.postId))})]})}},75969:function(e,t,l){var a=l(57437),s=l(47778),r=l(22835);t.Z=e=>{let{className:t,darkTheme:l,hideActionButton:n}=e;return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-2",t),children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",style:{width:"inherit"},children:[(0,a.jsx)(s.O,{className:(0,r.cn)("rounded-xl aspect-[4/5]",l?"bg-white/25":"")}),(0,a.jsxs)("div",{className:"h-10",children:[(0,a.jsx)(s.O,{className:(0,r.cn)("w-full h-[18px]",l?"bg-white/25":"")}),(0,a.jsx)(s.O,{className:(0,r.cn)("w-2/5 h-[18px] mt-1",l?"bg-white/25":"")})]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center gap-1",children:[(0,a.jsxs)("div",{className:"flex gap-1 min-w-0",children:[(0,a.jsx)(s.O,{className:(0,r.cn)("w-4 h-4",l?"bg-white/25":"")}),(0,a.jsx)(s.O,{className:(0,r.cn)("w-[100px]",l?"bg-white/25":"")})]}),!n&&(0,a.jsx)(s.O,{className:(0,r.cn)("w-3.5 h-3.5",l?"bg-white/25":"")})]})]})}},31517:function(e,t,l){var a=l(57437),s=l(22835),r=l(92595);t.Z=e=>{let{selected:t,text:l,onClick:n,WrapperTag:i="span",isSquare:o=!1}=e;return(0,a.jsx)(r.z,{className:(0,s.cn)(o?"border border-[#768883] rounded bg-white h-7 py-1 px-[18px] font-normal":"rounded-full bg-[#f2f2f2] h-[34px] py-[7px] md:py-2 px-4 font-normal",{[o?"bg-[#f3f4f4] font-medium":"bg-[#0f172a] font-medium"]:t}),variant:!t||o?"ghost":void 0,onClick:n,children:(0,a.jsx)(i,{className:"text-nowrap",children:l})})}},17751:function(e,t,l){l.d(t,{A0:function(){return p},Carousel:function(){return u},CarouselContent:function(){return x},CarouselItem:function(){return m},Pz:function(){return h},am:function(){return f},fA:function(){return g}});var a=l(57437),s=l(2265),r=l(33145),n=l(9467),i=l(22835),o=l(92595);
1let c=s.createContext(null);function d(){let e=s.useContext(c);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let u=s.forwardRef((e,t)=>{let{orientation:l="horizontal",opts:r,setApi:o,plugins:d,className:u,children:x,...m}=e,[f,h]=(0,n.Z)({...r,axis:"horizontal"===l?"x":"y"},d),[p,g]=s.useState(!1),[w,v]=s.useState(!1),N=s.useCallback(e=>{e&&(g(e.canScrollPrev()),v(e.canScrollNext()))},[]),b=s.useCallback(()=>{null==h||h.scrollPrev()},[h]),j=s.useCallback(()=>{null==h||h.scrollNext()},[h]),y=s.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),j())},[b,j]);return s.useEffect(()=>{h&&o&&o(h)},[h,o]),s.useEffect(()=>{if(h)return N(h),h.on("reInit",N),h.on("select",N),()=>{null==h||h.off("select",N)}},[h,N]),(0,a.jsx)(c.Provider,{value:{carouselRef:f,api:h,opts:r,orientation:l||((null==r?void 0:r.axis)==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:j,canScrollPrev:p,canScrollNext:w},children:(0,a.jsx)("div",{ref:t,onKeyDownCapture:y,className:(0,i.cn)("relative",u),role:"region","aria-roledescription":"carousel",...m,children:x})})});u.displayName="Carousel";let x=s.forwardRef((e,t)=>{let{className:l,overflowClassName:s,...r}=e,{carouselRef:n,orientation:o}=d();return(0,a.jsx)("div",{ref:n,className:s||"overflow-hidden",children:(0,a.jsx)("div",{ref:t,className:(0,i.cn)("flex","horizontal"===o?"-ml-4":"-mt-4 flex-col",l),...r})})});x.displayName="CarouselContent";let m=s.forwardRef((e,t)=>{let{className:l,...s}=e,{orientation:r}=d();return(0,a.jsx)("div",{ref:t,role:"group","aria-roledescription":"slide",className:(0,i.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===r?"pl-4":"pt-4",l),...s})});m.displayName="CarouselItem";let f=s.forwardRef((e,t)=>{let{className:l,variant:s="outline",size:n="icon",onClick:c,...u}=e,{orientation:x,scrollPrev:m,canScrollPrev:f}=d();return(0,a.jsxs)(o.z,{ref:t,variant:s,size:n,className:(0,i.cn)("absolute h-8 w-8 rounded-full","horizontal"===x?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!f,onClick:c||m,...u,children:[(0,a.jsx)(r.default,{className:"h-5 w-[9px]",src:"default"===s?"/images/icons/left_arrow_white.svg":"/images/icons/left_arrow.svg",alt:"left arrow",width:9,height:20}),(0,a.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});f.displayName="CarouselPrevious";let h=s.forwardRef((e,t)=>{let{className:l,variant:s="outline",size:n="icon",onClick:c,...u}=e,{orientation:x,scrollNext:m,canScrollNext:f}=d();return(0,a.jsxs)(o.z,{ref:t,variant:s,size:n,className:(0,i.cn)("absolute h-8 w-8 rounded-full","horizontal"===x?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!f,onClick:c||m,...u,children:[(0,a.jsx)(r.default,{className:"h-5 w-[9px]",src:"default"===s?"/images/icons/right_arrow_white.svg":"/images/icons/right_arrow.svg",alt:"right arrow",width:9,height:20}),(0,a.jsx)("span",{className:"sr-only",children:"Next slide"})]})});h.displayName="CarouselNext";let p=s.forwardRef((e,t)=>{let{isCampaign:l,...r}=e,{api:n}=d(),[c,u]=s.useState(!1),x=s.useCallback(()=>u(e=>!e),[]);s.useEffect(()=>{if(n)return n.on("select",x),n.on("reInit",x),()=>{n.off("select",x),n.off("reInit",x)}},[n,x]);let m=(null==n?void 0:n.scrollSnapList().length)||0,f=(null==n?void 0:n.selectedScrollSnap())||0;return m>1?(0,a.jsx)("div",{ref:t,className:(0,i.cn)("flex justify-center",r.className),children:Array.from({length:m},(e,t)=>(0,a.jsx)(o.z,{className:"rounded-full p-0 \n              ".concat(l?"h-2 w-2 mx-[3px] shadow-none":"h-[5px] w-[5px] mx-1"," \n              ").concat(t===f?l?"bg-[#999] hover:bg-[#999]":"scale-125 transform bg-[#00c891] hover:bg-[#00c891]":"bg-[#d8d8d8] hover:bg-[#d8d8d8]"),"aria-label":"Go to slide ".concat(t+1),onClick:()=>null==n?void 0:n.scrollTo(t)},t))}):(0,a.jsx)(a.Fragment,{})});p.displayName="CarouselDots";let g=s.forwardRef((e,t)=>{let{api:l}=d(),[r,n]=s.useState(!1),o=s.useCallback(()=>n(e=>!e),[]);s.useEffect(()=>{if(l)return l.on("select",o),l.on("reInit",o),()=>{l.off("select",o),l.off("reInit",o)}},[l,o]);let c=(null==l?void 0:l.scrollSnapList().length)||0,u=(null==l?void 0:l.selectedScrollSnap())||0;return c>1?(0,a.jsx)("div",{ref:t,className:(0,i.cn)("absolute right-3 top-3 rounded-xl bg-black/80 flex",e.className),children:(0,a.jsxs)("span",{className:"text-xs text-white font-medium py-0.5 px-1.5",children:[u+1,"/",c]})}):(0,a.jsx)(a.Fragment,{})});
1g.displayName="CarouselIndicator"}}]);

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.