1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[909],{3638:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>w});var n=l(37876),o=l(56090),a=l(14232),i=l(85278),r=l(75246),s=l(58827),d=l(20052),c=l(57574),u=l(97815),m=l(31418);function p(e){let{searchKeyword:t,onChangeSearchStore:l,clearKeyword:o,getCurrentLocation:a}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.DZ,{as:"h1",variant:"display-gen-semibold-l",children:"Toko"}),(0,n.jsxs)(m.so,{dir:"column",gap:2,className:"w-full",children:[(0,n.jsx)(m.xM,{id:"lokasi-toko",variant:"primary",className:"ring-0 flex items-center align-middle !font-normal text-black focus:bg-white text-sm h-9 w-full py-2 pr-4 pl-11 rounded-[32px] placeholder:text-gray-20 placeholder:!font-normal hover:bg-gray-40 bg-gray-50 appearance-none focus:outline-none focus:ring-0",placeholder:"Masukkan kota atau nama toko",value:t,onChange:l,onClick:o}),(0,n.jsxs)(m.$n,{type:"button",variant:"text",onClick:a,children:[(0,n.jsx)(m.FI,{name:"map-pin",size:"large"}),"Gunakan lokasi saya"]})]})]})}let h=(0,a.memo)(function(e){let{isLoading:t,isShowTotalResultSearch:l,isShowTotalNearestStore:o,isShowEmptyState:a,listStoreLength:i,debounceSearchKeyword:r,range:s,setRange:d}=e;return(0,n.jsxs)(m.so,{dir:"row",justify:"between",items:"center",className:"w-full pb-4 border-b",children:[t?(0,n.jsx)(m.nh,{height:"14px",width:"120px",isRounded:!0}):a?(0,n.jsx)(m.so,{dir:"column",gap:4,children:(0,n.jsx)(m.EY,{variant:"label-l-regular-gen",className:"text-gray-20",children:0===r.length?"Tidak ada toko terdekat":'Tidak ada hasil toko untuk "'.concat(r,'"')})}):(0,n.jsxs)(m.so,{dir:"column",gap:4,children:[l&&(0,n.jsxs)(m.EY,{variant:"label-l-regular-gen",className:"text-gray-20",children:[i,' hasil terdekat "',r,'"']}),o&&(0,n.jsxs)(m.EY,{variant:"label-l-regular-gen",className:"text-gray-20",children:[i," toko terdekat"]}),t&&(0,n.jsx)(m.nh,{height:"14px",width:"120px",isRounded:!0})]}),(0,n.jsx)(m.ms,{variant:"outline",defaultSelect:s?"".concat(s," km"):"Semua toko",options:[{label:"Semua toko",onSelect:()=>d("")},{label:"5 km",onSelect:()=>d("5")},{label:"10 km",onSelect:()=>d("10")},{label:"30 km",onSelect:()=>d("30")},{label:"50 km",onSelect:()=>d("50")},{label:"100 km",onSelect:()=>d("100")}],className:"min-w-[138px]"})]})});var g=l(48230),x=l.n(g),v=l(16843),j=l(85090);let y=(0,a.memo)(e=>{var t;let{store:l,isMyStore:o,isSelected:a,selectStore:i,submitStore:r}=e,{latitude:s,longitude:d,stores_id:c,city_name:u,distance:p,region_name:h,store_address:g,store_name:y,bu_code:b,store_attributes:f}=l;return(0,n.jsxs)(m.so,{dir:"column",className:(0,v.cn)("w-full outline outline-1 outline-gray-30 rounded-lg hover:outline-1 hover:outline-primary transition-all cursor-pointer gap-[2px]",{"outline-1 outline-primary":a}),onClick:()=>i({id:(null==l?void 0:l.stores_id)||"",latitude:(null==l?void 0:l.latitude)||0,longitude:(null==l?void 0:l.longitude)||0,store_attributes:null==l?void 0:l.store_attributes}),"aria-label":"toko ".concat(name),children:[o&&(0,n.jsx)(m.az,{className:"bg-primary p-2 rounded-tl-lg rounded-br-lg",children:(0,n.jsx)(m.EY,{asParagraph:!0,variant:"label-l-semibold-gen",className:"text-white",children:"Toko saya"})}),(0,n.jsxs)(m.so,{dir:"column",gap:4,className:"w-full p-4 pb-8",children:[(0,n.jsxs)(m.so,{dir:"column",gap:3,className:"w-full",children:[(0,n.jsxs)(m.so,{dir:"row",justify:"between",className:"w-full",children:[(0,n.jsxs)(m.so,{dir:"column",gap:2,items:"start",children:[(0,n.jsx)(m.EY,{asParagraph:!0,variant:"headline-gen-semibold-s",children:null==l?void 0:l.store_name}),(0,n.jsxs)(m.EY,{asParagraph:!0,variant:"body-s-regular-gen",children:[(null==l?void 0:l.city_name)?"".concat(null==l?void 0:l.city_name,","):""," ",null==l?void 0:l.region_name]})]}),(0,n.jsxs)(m.EY,{variant:"label-l-regular-gen",className:"text-nowrap",children:[parseFloat((null==l?void 0:l.distance)||"0").toFixed(2)," km"]})]}),(0,n.jsxs)(m.so,{dir:"column",gap:1,children:[(0,n.jsxs)(m.so,{dir:"row",gap:1,items:"start",className:"w-full",children:[(0,n.jsx)(m.EY,{variant:"body-s-regular-gen",children:"Alamat:"}),(0,n.jsx)(m.az,{"aria-label":"buka map",className:"text-primary font-semibold text-sm hover:text-primary-hover hover:underline",onClick:()=>(0,j.X)(null==l?void 0:l.store_name),children:null==l?void 0:l.store_address})]}),(0,n.jsx)(m.EY,{variant:"body-s-regular-gen",children:"Jam operasional: 10.00 - 22.00"})]}),(null==f||null==(t=f.store_services)?void 0:t.length)>0&&(0,n.jsx)(m.nD,{title:"Lihat Layanan Toko",titleVariant:"body-s-semibold-gen",containerTitleClassName:"flex gap-1 py-0 items-center justify-start text-primary",titleClassName:"group-hover/summary:no-underline",withBorderTop:!1,withBorderBottom:!1,children:(0,n.jsx)("ul",{className:"pl-1 pt-2 list-inside list-disc",children:null==f?void 0:f.store_services.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsx)(x(),{className:"text-primary text-sm",href:e.link,children:e.label})},t))})})]}),!o&&(0,n.jsx)(m.$n,{type:"button",variant:"secondary",className:"w-full",onClick:()=>{r({latitude:s,longitude:d,stores_id:c,city_name:u,distance:p||"0",region_name:h,store_address:g,store_name:y,bu_code:b,store_attributes:f})},children:"Pilih jadi toko saya"})]})]})}),b=(0,a.memo)(function(e){let{listStore:t,selectedStore:l,isLoading:o,isShowEmptyState:r,isShowMyStore:s,setSelectedStore:d}=e,[c,p]=(0,i.fp)(u.B$),h=(0,a.useRef)(null),g=(0,a.useMemo)(()=>null==t?void 0:t.map(e=>({...e,stores_id:e.id,store_name:e.name,distance:e.distance||"0",bu_code:e.buco
1de})),[t]),x=(0,a.useMemo)(()=>g.find(e=>e.stores_id===(null==c?void 0:c.stores_id)),[g,null==c?void 0:c.stores_id]),v=(0,a.useMemo)(()=>g.filter(e=>e.stores_id!==(null==c?void 0:c.stores_id)),[g,null==c?void 0:c.stores_id]),j=e=>{var t;p(e),null==h||null==(t=h.current)||t.scrollTo({top:0,behavior:"smooth"}),window.scrollTo({top:0,behavior:"smooth"})};return((0,a.useEffect)(()=>{var e,t,l,n;let o=c?null==c?void 0:c.stores_id:null==(e=v[0])?void 0:e.stores_id,a=c?null==c?void 0:c.latitude:null==(t=v[0])?void 0:t.latitude,i=c?null==c?void 0:c.longitude:null==(l=v[0])?void 0:l.longitude,r=c?null==c?void 0:c.store_attributes:null==(n=v[0])?void 0:n.store_attributes;o&&a&&i&&r&&d({id:o,latitude:a,longitude:i,store_attributes:r})},[v,c,d]),o)?[,,,,].fill(0).map((e,t)=>(0,n.jsx)(m.nh,{width:"100%",height:"232px",isRounded:!0},t)):r?null:(0,n.jsxs)(m.so,{ref:h,dir:"column",gap:4,className:"w-full max-h-[1024px] overflow-y-auto p-1 pr-3",children:[c&&s&&(0,n.jsx)(y,{isMyStore:!0,isSelected:!!l&&l.id===(null==c?void 0:c.stores_id),selectStore:e=>{let{id:t,latitude:l,longitude:n,store_attributes:o}=e;return d({id:t,latitude:l,longitude:n,store_attributes:o})},submitStore:j,store:c}),x&&!s&&(0,n.jsx)(y,{isMyStore:!0,isSelected:!!l&&l.id===(null==x?void 0:x.stores_id),selectStore:e=>{let{id:t,latitude:l,longitude:n,store_attributes:o}=e;return d({id:t,latitude:l,longitude:n,store_attributes:o})},submitStore:j,store:x}),v.map(e=>(0,n.jsx)(y,{selectStore:e=>{let{id:t,latitude:l,longitude:n,store_attributes:o}=e;return d({id:t,latitude:l,longitude:n,store_attributes:o})},isSelected:!!l&&l.id===e.stores_id,submitStore:j,store:e},e.stores_id))]})}),f=function(){let{location:e}=(0,d.aL)(),[t,l]=(0,a.useState)({lat:(null==e?void 0:e.latitude)||0,lng:(null==e?void 0:e.longitude)||0}),o=(0,i.md)(u.B$),[g,x]=(0,i.fp)(u.xR),[v,j]=(0,a.useState)(null),[y,f]=(0,a.useState)(""),[w]=(0,d.d7)(y),[_,k]=(0,a.useState)(""),{data:S,isLoading:N}=(0,r.V2)({lat:t.lat,lng:t.lng,store:s.dr,range:_}),{data:A,isLoading:E}=(0,c.uq)(w.trim(),{enabled:w.length>=3}),C=(0,a.useMemo)(()=>(null==S?void 0:S.data)||[],[null==S?void 0:S.data]),P=(0,a.useMemo)(()=>({id:(null==o?void 0:o.stores_id)||"",name:(null==o?void 0:o.store_name)||"",center:{lat:(null==o?void 0:o.latitude)||0,lng:(null==o?void 0:o.longitude)||0},city_name:(null==o?void 0:o.city_name)||"",region_name:(null==o?void 0:o.region_name)||"",store_address:(null==o?void 0:o.store_address)||""}),[o]),L=(0,a.useMemo)(()=>[...C.map(e=>({center:{lat:e.latitude,lng:e.longitude},...e}))],[C]),T=()=>{if(!g)return x(!0);f(""),l({lat:(null==e?void 0:e.latitude)||0,lng:(null==e?void 0:e.longitude)||0})};(0,a.useEffect)(()=>{if(!A||!A.data)return;let{lat:e,lng:t}=A.data[0].geometry.location;l({lat:e,lng:t})},[A]),(0,a.useEffect)(()=>{(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)&&l({lat:null==e?void 0:e.latitude,lng:null==e?void 0:e.longitude})},[e]);let O=E||N,R=0===C.length||!(null==A?void 0:A.data)&&w.length>=3;return(0,n.jsxs)(m.so,{className:"w-full flex-row",gap:10,children:[(0,n.jsxs)(m.so,{dir:"column",gap:6,className:"w-full md:max-w-[400px]",children:[(0,n.jsx)(p,{searchKeyword:y,onChangeSearchStore:e=>{let t=e.target.value;f(t),""===t&&T()},getCurrentLocation:T,clearKeyword:()=>{f(""),T()}}),(0,n.jsx)(h,{isLoading:O,isShowTotalResultSearch:!O&&!!(null==A?void 0:A.data)&&y.length>=3,isShowTotalNearestStore:0===y.length,isShowEmptyState:R,listStoreLength:C.length,debounceSearchKeyword:w,range:_,setRange:k}),(0,n.jsx)(m.so,{className:"size-full flex md:hidden",children:(0,n.jsx)(m.ho,{isStandAlone:!1,apiKey:"AIzaSyCVO8Q9ler-2bFEeNA14HzKpCK0NhxkIH4&_=1592898834967",center:{lat:v?null==v?void 0:v.latitude:s._7.lat,lng:v?null==v?void 0:v.longitude:s._7.lng},width:"100%",zoomLevel:16,height:"286px",markers:[...L,{...P}]})}),(0,n.jsx)(b,{listStore:C,selectedStore:v,isLoading:O,isShowEmptyState:R,isShowMyStore:0===w.length&&""===_,setSelectedStore:j})]}),(0,n.jsx)(m.so,{className:"size-full hidden md:flex",children:(0,n.jsx)(m.ho,{isStandAlone:!1,apiKey:"AIzaSyCVO8Q9ler-2bFEeNA14HzKpCK0NhxkIH4&_=1592898834967",center:{lat:v?null==v?void 0:v.latitude:s._7.lat,lng:v?null==v?void 0:v.longitude:s._7.lng},width:"100%",zoomLevel:16,height:"1200px",markers:[...L,{...P}]})})]})};function w(){return(0,n.jsxs)(m.aq,{className:"py-16 max-w-[1220px] px-5 xl
1:px-0",children:[(0,n.jsx)(o.A,{title:"Lokasi toko"}),(0,n.jsx)(f,{})]})}},30473:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/lokasi-toko",function(){return l(3638)}])},55068:(e,t,l)=>{"use strict";l.d(t,{HY:()=>h,Jv:()=>x,KA:()=>m,M9:()=>g,i4:()=>p,iO:()=>j,sL:()=>v});var n=l(4633),o=l(79629),a=l(37968),i=l(76757),r=l(58827);let s=(0,n.Ay)({baseURL:"".concat("https://jeanne.eraspace.com/shippings","/v2")}),d=(0,n.Ay)({baseURL:"".concat("https://jeanne.eraspace.com/shippings","/v2"),config:{includeXSource:!0}}),c=(0,n.Ay)({baseURL:"".concat("https://jeanne.eraspace.com/shippings","/v2"),config:{isAuth:!0,includeXSource:!0}}),u=(0,n.Ay)({baseURL:"".concat("https://jeanne.eraspace.com/dcm-carts","/v1/shipping"),config:{isAuth:!0,includeXSource:!0,includeSource:!0}}),m=async e=>{let t=(0,a.EH)(e);return(0,o.A)(()=>s.get("/store/".concat(t)))},p=e=>{let t={store:r.dr,...e},l=i.stringify(t);return(0,o.A)(()=>d.get("/o2o/store?".concat(l)),{throwErrorObject:!0})},h=e=>(0,o.A)(()=>u.post("/address",{id:e})),g=()=>(0,o.A)(()=>u.get("/address")),x=e=>(0,o.A)(()=>u.post("/rate-set",e),{throwErrorObject:!0}),v=e=>(0,o.A)(()=>u.post("/rate",e),{throwErrorObject:!0}),j=e=>(0,o.A)(()=>c.post("/o2o/store/check-stock",e))},56090:(e,t,l)=>{"use strict";l.d(t,{A:()=>u});var n=l(37876),o=l(77328),a=l.n(o),i=l(89099),r=l(14232);let s="json-ld",d={title:"iBox Official Store - Apple Authorized Reseller Indonesia",description:"Temukan Produk Apple Authorized Reseller Indonesia Original & Garansi Resmi di iBox! Belanja iPhone, iPad, Apple Watch, Mac Gratis Ongkir!",keywords:"iBox, iPhone iBox, iPad iBox, Apple Watch iBox",url:"https://ibox.co.id",imageUrl:"".concat("https://ibox.co.id","/logo/ibox-logo-revamp-black.svg")},c=e=>{let{titleWithSuffix:t,url:l,customSchema:o,type:i="ProductCollection",description:d,price:c,originalPrice:u,customJsonLd:m,asPath:p}=e,h={"@context":"http://schema.org","@type":i,name:t,url:l},g={...h,about:d},x={...h,potentialAction:{"@type":"SearchAction",target:"https://www.ibox.co.id/catalogsearch?{search_term_string}","query-input":"required q=search_term_string"}},v={ProductCollection:g,Product:{...h,description:d,offers:{"@type":"Offer",price:c,priceCurrency:"IDR",availability:"https://schema.org/InStock",seller:{"@type":"Organization",name:"iBox Online Store"},additionalProperty:[{"@type":"PropertyValue",name:"Original Price",value:u}]}},WebSite:x},j=null!=o?o:JSON.stringify(m||(null==v?void 0:v[i]));return(0,r.useEffect)(()=>{document.querySelectorAll("script#".concat(s,', script[data-json-ld="page"]')).forEach(e=>e.remove());let e=document.createElement("script");e.id=s,e.type="application/ld+json",e.setAttribute("data-json-ld","page"),e.textContent=j,document.head.appendChild(e)},[j,p]),(0,n.jsx)(a(),{children:(0,n.jsx)("script",{id:s,type:"application/ld+json","data-json-ld":"page",dangerouslySetInnerHTML:{__html:j}},"".concat(s,"-").concat(p))})},u=e=>{var t;let{asPath:l}=(0,i.useRouter)(),{type:o="ProductCollection",displayedTitle:r,title:s,description:u,keywords:m,url:p,imageUrl:h,price:g,originalPrice:x,canonicalUrl:v,customJsonLd:j,withMonthYearSuffix:y=!1,customSchema:b}=e,f=y?"".concat(new Date().toLocaleString("id-ID",{month:"long",year:"numeric"})," | iBox Online Store"):"| iBox Online Store",w=null!=(t=null!=s?s:r)?t:d.title,_=null!=u?u:d.description,k=null!=m?m:d.keywords,S=null!=p?p:"".concat(d.url).concat(l),N=null!=h?h:d.imageUrl,A="".concat(w," ").concat(f);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a(),{children:[(0,n.jsx)("meta",{charSet:"UTF-8"}),(0,n.jsx)("meta",{name:"application-name",content:"ibox.co.id"}),(0,n.jsx)("title",{children:A}),(0,n.jsx)("meta",{name:"title",content:A}),(0,n.jsx)("meta",{name:"description",content:_}),(0,n.jsx)("meta",{name:"keywords",content:k}),(0,n.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/icon/favicon-32x32.png"}),(0,n.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/icon/favicon-16x16.png"}),(0,n.jsx)("link",{rel:"apple-touch-icon",type:"image/png",sizes:"180x180",href:"/icon/apple-touch-icon.png"}),(0,n.jsx)("link",{rel:"shortcut icon",href:"/favicon.ico"}),(0,n.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,n.jsx)("meta",{property:"og:site_name",content:"iBox.co.id - Apple Premium Reseller"}),(0,n.jsx)("meta",{name:"googlebot",content:"index, follow, follow"}),(0,n.jsx)("meta",{name:"robots",content:"index, follow"}),(0,n.jsx)("meta",{name:"page-type",content:"productdetailpage"}),(0,n.jsx)("meta",{property:"product:price:currency",content:"Rp"}),(0,n.jsx)("meta",{property:"og:image",content:N}),(0,n.jsx)("meta",{property:"og:title",content:w}),(0,n.jsx)("meta",{property:"og:url",content:S}),(0,n.jsx)("meta",{property:"og:description",content:_}),(0,n.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,n.jsx)("meta",{name:"twitter:title",content:w}),(0,n.jsx)("meta",{name:"twitter:description",content:_}),(0,n.jsx)("meta",{name:"twitter:image",content:N}),(0,n.jsx)("meta",{name:"twitter:image:alt",content:w}),(0,n.jsx)("meta",{name:"twitter:site:id",content:"@iboxindonesia"}),(0,n.jsx)("meta",{name:"viewport",content:"initial-scale=1, minimum-scale=1, maximum-scale=5, width=device-width"}),"Product"===o&&g&&(0,n.jsx)("meta",{property:"price:amount",content:null==g?void 0:g.toString()}),v&&(0,n.jsx)("link",{rel:"canonical",href:v})]}),(0,n.jsx)(c,{type:o,titleWithSuffix:A,url:S,description:_,customSchema:b,price:g,originalPrice
1:x,customJsonLd:j,asPath:l},l)]})}},75246:(e,t,l)=>{"use strict";l.d(t,{QL:()=>c,i4:()=>n.i4,rA:()=>r,D4:()=>d,V2:()=>s,DN:()=>u});var n=l(55068),o=l(62298),a=l(74359),i=l(85278);let r=e=>["o2o-list-store",e],s=(e,t)=>(0,a.I)({queryKey:["store",e],queryFn:()=>(0,n.KA)(e),staleTime:1/0,enabled:null==t?void 0:t.enabled,...t}),d=(e,t)=>(0,a.I)({queryKey:r(e),queryFn:()=>(0,n.i4)(e),staleTime:1/0,enabled:null==t?void 0:t.enabled,...t}),c=["quote","dcm-carts","shipping","address"];function u(e){var t;let l=(0,i.md)(o.YS);return(0,a.I)({queryKey:c,queryFn:n.M9,...e,gcTime:0,enabled:!!l&&(null==(t=null==e?void 0:e.enabled)||t)})}},77328:(e,t,l)=>{e.exports=l(29269)}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=30473)),_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.