PageSourceSearch

https://samugiken.com/_next/static/chunks/pages/our-partners-caa51f3e3cddce08.js

js samugiken.com collected 2026-10-07 01:51:25 UTC 12,200 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8737],{8024:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/our-partners",function(){return a(76058)}])},69741:function(e,t,a){"use strict";var l=a(52676),s=a(75271),r=a(24480),n=a(33561),i=a(63309);t.Z=s.memo(e=>{let{titles:t,items:a,className:c,containerClassName:o,homeTitle:d="Home",homeHref:u="/"}=e,m=(0,n.useRouter)(),x=(0,s.useMemo)(()=>Array.isArray(t)?t.filter(Boolean):t?[t]:[],[t]),p=(0,s.useMemo)(()=>a?a.filter(e=>e.title):x.map(e=>({title:e})),[a,x]);if(0===p.length)return null;let h=(e,t,a)=>t?(0,l.jsx)("span",{role:"link",tabIndex:0,onClick:t,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},className:(0,i.cn)(a,"cursor-pointer"),children:e}):e;return(0,l.jsx)("div",{className:(0,i.cn)("px-4 py-4 mx-auto maxContainer md:px-6",o),children:(0,l.jsx)(r.Z,{className:c,items:[{title:h(d,()=>m.push(u))},...p.map(e=>{var t;let a=e.href,l=null!==(t=e.onClick)&&void 0!==t?t:a?()=>m.push(a):void 0;return{title:h(e.title,l,e.className)}})]})})})},17327:function(e,t,a){"use strict";var l,s;a.d(t,{w:function(){return l}}),(s=l||(l={})).BABY_AND_MUMMY="BABY_AND_MUMMY",s.KITCHEN_APPLIANCES="KITCHEN_APPLIANCES",s.HOME_APPLIANCES="HOME_APPLIANCES",s.BEAUTY_AND_HEALTH="BEAUTY_AND_HEALTH"},57418:function(e,t,a){"use strict";var l,s,r,n,i,c,o,d,u,m;a.d(t,{Cw:function(){return l},RL:function(){return i},TT:function(){return s},bR:function(){return n},e_:function(){return r}}),(c=l||(l={})).BABY_AND_MUMMY="BABY_AND_MUMMY",c.KITCHEN_APPLIANCES="KITCHEN_APPLIANCES",c.HOME_APPLIANCES="HOME_APPLIANCES",c.BEAUTY_AND_HEALTH="BEAUTY_AND_HEALTH",(o=s||(s={})).LAZADA="LAZADA",o.SHOPEE="SHOPEE",o.WOW_SHOP="WOW_SHOP",o.WEBSITE="WEBSITE",o.TIK_TOK="TIK_TOK",o.PG_MALL="PG_MALL",o.ZALORA="ZALORA",o.OFFLINE_DEALER="OFFLINE_DEALER",o.EXPO_FAIR_WH_SALES="EXPO_FAIR_WH_SALES",o.WALK_IN="WALK_IN",(d=r||(r={})).COMMENT="COMMENT",d.STATUS_CHANGE="STATUS_CHANGE",(u=n||(n={})).USER="USER",u.ADMIN="ADMIN",(m=i||(i={})).PENDING="PENDING",m.IN_PROCESSING="IN_PROCESSING",m.RESOLVED="RESOLVED",m.CLOSED="CLOSED"},22047:function(e,t,a){"use strict";a.d(t,{U$:function(){return n},rp:function(){return s},z2:function(){return r}});var l=a(57418);let s=e=>({[l.RL.PENDING]:"Pending",[l.RL.IN_PROCESSING]:"In Processing",[l.RL.RESOLVED]:"Resolved",[l.RL.CLOSED]:"Closed"})[e],r=e=>({[l.RL.PENDING]:"orange",[l.RL.IN_PROCESSING]:"blue",[l.RL.RESOLVED]:"green",[l.RL.CLOSED]:"default"})[e],n=e=>e.toLowerCase().replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).replace(/ And /g," & ")},76058:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return M}});var l=a(52676),s=a(69741),r=a(46980),n=a(27026),i=a.n(n),c=a(22047),o=a(40974),d=a(19676),u=a(22127),m=e=>{let{partner:t,onSelect:a,isSelected:s}=e,r=[t.addressLine1,t.addressLine2,t.city,t.state,t.postcode].filter(Boolean).join(", ");return(0,l.jsxs)("div",{onClick:a,className:"flex py-4 px-5 flex-col text-sm gap-3 bg-white border border-[#F3F3F3] cursor-pointer hover:bg-gray-50 border-l-4 ".concat(s?"border-l-[#FB233B] bg-red-50":"border-l-transparent"),children:[(0,l.jsx)("div",{className:"font-bold text-base",children:t.name}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(o.Z,{color:"#FB233B",className:"shrink-0",size:18}),r]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(d.Z,{color:"#FB233B",className:"shrink-0",size:18}),t.phone]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(u.Z,{color:"#FB233B",className:"shrink-0",size:18}),t.categories.map(c.U$).join(", ")]}),(0,l.jsx)("div",{children:(0,l.jsx)(i(),{target:"_blank",className:"flex w-fit h-fit no-underline cursor-pointer",href:"https://www.google.com/maps/dir/?api=1&destination=".concat(t.lat,",").concat(t.lng),onClick:e=>e.stopPropagation(),children:(0,l.jsx)("button",{className:"rounded-sm bg-[#FB233B] px-4 py-3 text-md font-bold text-white border-none",children:"DIRECTIONS"})})})]})},x=a(17327),p=a(52385),h=a(94170),g=a(7638),N=a(69834),f=a(18060),b=a(29350),j=a(77471),E=a(21844),v=a(4948),A=a(40150),S=a(89120),C=a.n(S),_=a(30746),L=a(75271),y=a(65998),P=a.n(y),I=a(85212),w=a(62609),O=a(57065),Z=a(46035),F=e=>{let{form:t,search:a,onSearchChange:s,partnerLabelOptions:r,states:n,cities:i,stateValue:o}=e;return(0,l.jsxs)(f.Z,{layout:"vertical",form:t,children:[(0,l.jsx)(f.Z.Item,{label:"Search Location",children:(0,l.jsx)(E.default,{placeholder:"Enter a Location",value:a,onChange:e=>s(e.target.value)})}),(0,l.jsx)(f.Z.Item,{label:"Category",name:"category",children:(0,l.jsx)(v.default,{className:"w-full",placeholder:"All Categories",mode:"multiple",options:r.map(e=>({label:(0,c.U$)(e),value:e}))})}),(0,l.jsx)(f.Z.Item,{label:"State",name:"state",initialValue:null,children:(0,l.jsx)(v.default,{showSearch:!0,options:[{label:"All States",value:null},...n.map(e=>({label:e,value:e}))],onChange:()=>{t.setFieldValue("city",void 0)}})}),(0,l.jsx)(f.Z.Item,{label:"City",name:"city",children:(0,l.jsx)(v.default,{showSearch:!0,options:i.map(e=>({label:e,value:e})),disabled:!o})})]})};let B=P()(()=>Promise.all([a.e(3476),a.e(3560)]).then(a.bind(a,73560)),{loadableGenerated:{webpack:()=>[73560]},ssr:!1}),k=Object.values(x.w);var M=e=>{var t,a,n,i;let{user:d}
1=e,[u,x]=(0,L.useState)(""),[S,y]=(0,L.useState)(""),[P,M]=(0,L.useState)("list"),[D,T]=(0,L.useState)(!1),[R,H]=(0,L.useState)(null),[U,z]=(0,L.useState)(null),[G]=f.Z.useForm(),K=f.Z.useWatch("category",G),W=f.Z.useWatch("state",G),V=f.Z.useWatch("city",G),Y=(0,_.Pz)(),q=(0,_.MC)(W),[X,$]=(0,L.useState)(null),Q=(0,L.useMemo)(()=>C()(e=>{y(e)},300),[]);(0,L.useEffect)(()=>()=>{Q.cancel()},[Q]);let J=(0,L.useCallback)(e=>{x(e),Q(e)},[Q]),ee=(0,g.N)({queryKey:["our-partners","public",S,K,W,V],initialPageParam:1,queryFn:async e=>{let{pageParam:t}=e;return await (0,p.V5)({page:t,pageSize:10,sortField:"createdAt",sortOrder:h.As.DESC,search:S,category:K,state:W,city:V})},getNextPageParam:(e,t)=>{let a=e.data.total;return t.reduce((e,t)=>e+t.data.rows.length,0)<a?t.length+1:void 0}}),et=(0,L.useMemo)(()=>{var e,t;return null!==(t=null===(e=ee.data)||void 0===e?void 0:e.pages.flatMap(e=>e.data.rows))&&void 0!==t?t:[]},[null===(t=ee.data)||void 0===t?void 0:t.pages]),ea=(0,N.a)({queryKey:["our-partners","map-locations",S,K,W,V],queryFn:async()=>await (0,p.V5)({page:1,pageSize:500,sortField:"createdAt",sortOrder:h.As.DESC,search:S,category:K,state:W,city:V})}),el=(0,L.useMemo)(()=>{var e,t;return(null!==(t=null===(e=ea.data)||void 0===e?void 0:e.data.rows)&&void 0!==t?t:[]).map(e=>({lat:Number(e.lat),lng:Number(e.lng)}))},[ea.data]);return(0,L.useEffect)(()=>{if(!X)return;let e=()=>{X.scrollTop+X.clientHeight>=X.scrollHeight-50&&ee.hasNextPage&&!ee.isFetchingNextPage&&ee.fetchNextPage()};return X.addEventListener("scroll",e),()=>X.removeEventListener("scroll",e)},[X,ee]),(0,l.jsxs)(r.Z,{user:d,children:[(0,l.jsx)(Z.PB,{title:"Our Partners",description:"Tips, updates, and guides from Samu Giken.",canonical:"".concat("https://samugiken.com","/our-partners")}),(0,l.jsx)("div",{className:"pt-4",children:(0,l.jsx)(s.Z,{titles:"Our Partners"})}),(0,l.jsx)("section",{className:"px-4 mx-auto md:px-6 maxContainer",children:(0,l.jsxs)("div",{className:"md:bg-[#F3F3F3]",children:[(0,l.jsx)("div",{className:"hidden pt-6 mx-4 md:block",children:(0,l.jsx)(f.Z,{layout:"vertical",form:G,children:(0,l.jsxs)(b.Z,{gutter:[16,16],children:[(0,l.jsx)(j.Z,{xs:24,sm:24,md:12,lg:6,children:(0,l.jsx)(f.Z.Item,{label:"Search Location",children:(0,l.jsx)(E.default,{placeholder:"Enter a Location",value:u,onChange:e=>J(e.target.value)})})}),(0,l.jsx)(j.Z,{xs:24,sm:24,md:12,lg:6,children:(0,l.jsx)(f.Z.Item,{label:"Category",name:"category",children:(0,l.jsx)(v.default,{className:"w-full",placeholder:"All Categories",mode:"multiple",options:[...k.map(e=>({label:(0,c.U$)(e),value:e}))]})})}),(0,l.jsx)(j.Z,{xs:24,sm:24,md:12,lg:6,children:(0,l.jsx)(f.Z.Item,{label:"State",name:"state",initialValue:null,children:(0,l.jsx)(v.default,{showSearch:!0,options:[{label:"All States",value:null},...Y.map(e=>({label:e,value:e}))],onChange:()=>{G.setFieldValue("city",void 0)}})})}),(0,l.jsx)(j.Z,{xs:24,sm:24,md:12,lg:6,children:(0,l.jsx)(f.Z.Item,{label:"City",name:"city",children:(0,l.jsx)(v.default,{showSearch:!0,options:q.map(e=>({label:e,value:e})),disabled:!W})})})]})})}),(0,l.jsxs)("div",{className:"flex flex-col pb-4 space-y-4 md:hidden",children:[(0,l.jsxs)("div",{onClick:()=>T(!0),className:"flex items-center justify-center w-full px-4 py-3 space-x-2 bg-white border border-gray-200 rounded-lg",children:[(0,l.jsx)(I.Z,{size:20}),(0,l.jsx)("span",{className:"text-sm",children:"Filter Partners"})]}),(0,l.jsxs)("div",{className:"flex bg-white border border-gray-200 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex-1 py-3 text-center flex items-center justify-center space-x-2 rounded-l-lg ".concat("list"===P?"bg-[#FB233B] text-white":"bg-white"),onClick:()=>M("list"),children:[(0,l.jsx)(w.Z,{size:20}),(0,l.jsxs)("span",{className:"text-sm",children:["List (",et.length,")"]})]}),(0,l.jsxs)("div",{className:"flex-1 py-3 text-center flex items-center justify-center space-x-2 rounded-r-lg ".concat("map"===P?"bg-[#FB233B] text-white":"bg-white"),onClick:()=>M("map"),children:[(0,l.jsx)(o.Z,{size:20}),(0,l.jsx)("span",{className:"text-sm",children:"Map"})]})]})]}),(0,l.jsxs)("div",{className:"md:grid md:grid-cols-4 md:h-[calc(100vh-100px)]",children:[(0,l.jsxs)("div",{ref:$,className:"bg-[#F3F3F3] md:overflow-auto md:h-full ".concat("list"===P?"block":"hidden md:block"),children:[(0,l.jsxs)("div",{className:"bg-[#FB233B] font-bold py-3 px-5 text-white text-sm sticky top-0 z-10",children:["Number Of Shops: ",null!==(i=null===(n=ee.data)||void 0===n?void 0:null===(a=n.pages[0])||void 0===a?void 0:a.data.total)&&void 0!==i?i:0]}),et.map(e=>(0,l.jsx)(m,{partner:e,isSelected:U===e.refId,onSelect:()=>{z(e.refId),H({lat:Number(e.lat),lng:Number(e.lng)}),M("map")}},e.refId)),ee.isFetchingNextPage&&(0,l.jsx)("div",{className:"py-4 text-center",children:"Loading more..."})]}),(0,l.jsxs)("div",{className:"relative h-[calc(100vh-220px)] md:h-full md:col-span-3 ".concat("map"===P?"block":"hidden md:block"),children:["map"===P&&(0,l.jsx)("div",{className:"fixed left-0 right-0 z-40 px-4 top-4 md:hidden",children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsxs)("div",{onClick:()=>T(!0),className:"flex items-center justify-center flex-1 px-4 py-3 space-x-2 bg-white border border-gray-200 rounded-lg",children:[(0,l.jsx)(I.Z,{size:20}),(0,l.jsx)("span",{className:"text-sm",children:"Filter Partners"})]}),(0,l.jsx)("button",{onClick:()=>M("list"),className:"p-3 bg-white border border-gray-200 rounded-lg",children:(0,l.jsx)(O.Z,{size:20})})]})}),(0,l.jsx)("div",{className:"absolute inset-0",children:(0,l.jsx)(B,{locations:el,selectedLocation:R})})]})]}),(0,l.jsxs)(A.Z,{title:"Filter Partners",placement:"bottom",height:"85%",open:D,onClose:()=>T(!1),className:"md:hidden",children:[(0,l.jsx)(F,{form:G,search:u,onSearchChange:J,partnerLabelOptions:k,states:Y,cities:q,stateValue:W}),(0,l.jsxs)("div",{className:"mt-6 space-y-3",children:[(0,l.jsx)("button",{onClick:()=>{G.submit(),T(!1)},className:"w-full bg-[#FB233B] text-white py-3 rounded-lg font-medium border-none",children:"Apply Filters"}),(0,l.jsx)("button",{onClick:()=>{G.resetFields(),T(!1)},className:"w-full py-3 font-medium text-gray-700 bg-gray-200 border-none rounded-lg",children:"Clear Filters"})]})]})]})})]})}},52385:function(e,t,a){"use strict";a.d(t,{A0:function(){return n},Cj:function(){return c},IP:function(){return i},V5:function(){return o},cQ:function(){return r},gA:function(){return s}});var l=a(5409);let s=e=>l.Z.get("admin/our-partners/geocode",{params:{address:e}}),r=e=>l.Z.get("/admin/our-partners",{params:e}),n=e=>l.Z.post("/admin/our-partners",e),i=e=>l.Z.put("/admin/our-partners/".concat(e.id),e),c=e=>l.Z.delete("/admin/our-partners/".concat(e.id)),o=e=>l.Z.get("/public/our-partners",{params:e})}},function(e){e.O(0,[5989,4237,7610,8174,9834,8051,9513,4540,928,4298,4190,6631,6220,9575,7444,150,1887,8060,9830,388,4962,6980,2888,9774,179],function(){return e(e.s=8024)}),_N_E=e.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.