1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7776],{35280:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(92809),o=(r(67294),r(86244)),l=r(85893);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e){var t=function(e,t){return e?t:""};return(0,l.jsx)("button",a(a({},e),{},{className:(0,o.Z)("btn","btn-"+e.variant,t(e.block,"btn-block"),t(e.rounded,"rounded"),t(e.outline,"btn-outline"),e.className),children:e.children}))}},70576:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(92809),o=(r(67294),r(86244)),l=r(85893);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e){var t=e.variant,r=e.label,n=e.children,i=e.className,s=e.disabled,c=function(e,t){return e?t:""};return(0,l.jsx)("button",a(a({},e),{},{className:(0,o.Z)("text-sm px-4 py-2 rounded-lg font-bold",c(!t||"basic"===t,"rounded-none bg-[#ffffff] text-[#181A1E]"),c("default"===t,"bg-[#ffffff] hover:bg-[#181A1E] text-[#181A1E] hover:text-[#ffffff]"),c("primary"===t,"bg-gradient-to-r from-[#A8E200] hover:from-[#000000] to-[#55C787] hover:to-[#000000] text-[#000000] hover:text-[#A8E200]"),c("outline-default"===t,"border-2 border-solid border-[#ffffff] bg-transparent hover:bg-[#ffffff] text-[#ffffff] hover:text-[#000000]"),c("outline-primary"===t,"border-2 border-solid border-[#A8E200] bg-gradient-to-r from-transparent hover:from-[#A8E200] to-transparent hover:to-[#55C787] text-[#A8E200] hover:text-[#000000]"),c("outline-secondary"===t,"border-2 border-solid border-[#A8E200] bg-gradient-to-r from-transparent to-transparent text-[#000000] hover:text-[#000000]"),c("orange"===t,"bg-[#EB9B00] hover:bg-[#e39600] text-white"),c(s,"opacity-50 cursor-not-allowed"),i),children:r||n}))}},91161:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(92809),o=r(80318),l=r(67294),i=r(36187),a=r(85893);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e){var t,r=(0,i.Z)().tl,n=l.useState(!1),s=(0,o.Z)(n,2),u=s[0],d=s[1];return(0,a.jsxs)("div",{className:"form-textarea"+(e.className?" "+e.className:""),children:[e.labelFloat?(0,a.jsx)("label",c(c({},e.labelProps),{},{className:"form-text-label"+(u?" input-has-value text-sm bg-white px-2":" top-50"),children:e.label})):(0,a.jsx)("label",{className:"text-gray-600",children:e.label}),(0,a.jsx)("textarea",c(c({},e.textareaProps),{},{className:"form-text-input"+(null!==(t=e.textareaProps)&&void 0!==t&&t.className?" "+e.textareaProps.className:""),name:e.name,onChange:function(t){d(t.target.value.length>0),e.onChange&&e.onChange(t)}
1,disabled:e.disabled,readOnly:e.readonly,value:e.value})),e.error&&e.touched&&(0,a.jsx)("div",{id:"errorField",className:"text-red-500 text-sm",children:r(e.error.toString())})]})}},59509:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(92809),o=(r(67294),r(86244)),l=r(36187),i=r(85893);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e){var t,r=(0,l.Z)().tl;return(0,i.jsxs)("div",{className:"block w-full",children:[(0,i.jsxs)("div",{className:(0,o.Z)("form-text",e.className),"data-field-name":e.name,"data-field-error":e.error?"error":"noerror",children:[(0,i.jsxs)("label",s(s({className:(0,o.Z)("block text-volta-text mb-2")},e.labelProps),{},{children:[e.label,e.required?(0,i.jsx)("span",{className:"text-volta-normal",children:" * "}):null,e.superText?(0,i.jsxs)("sup",{className:"text-volta-normal",children:[" ",e.superText," "]}):null]})),(0,i.jsx)("input",s(s({},e.inputProps),{},{className:(0,o.Z)("form-text-input",null===(t=e.inputProps)||void 0===t?void 0:t.className),name:e.name,value:e.value,onChange:function(t){e.onChange&&e.onChange(t)},disabled:e.disabled,readOnly:e.readonly}))]}),e.error&&e.touched&&(0,i.jsx)("div",{id:"errorField",className:"text-red-500 text-sm",children:r(e.error.toString())})]})}},91671:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return D}});var n=r(30266),o=r(809),l=r.n(o),i=r(67294),a=r(59138),s=r(70576),c=r(68216),u=r(25997),d=r(14695),f=r(13444),v=r(30268),p=r(92953),h=r(92809),m=r(10005),b=r(86244),g=r(85893);function x(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,p.Z)(e);if(t){var o=(0,p.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,v.Z)(this,r)}}i.Component;var j=r(59509),y=(r(91161),r(35280));function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,h.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,p.Z)(e);if(t){var o=(0,p.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,v.Z)(this,r)}}var P=function(e){(0,f.Z)(r,e);var t=N(r);function r(){return(0,c.Z)(this,r),t.apply(this,arguments)}return(0,u.Z)(r,[{key:"render",value:function(){return(0,g.jsxs)("div",{className:"block","data-field-error":this.props.error?"error":"noerror",children:[this.props.label?(0,g.jsxs)("label",{className:"block text-volta-text mb-2",children:[this.props.label,this.props.required?(0,g.jsx)("span",{className:"text-volta-normal",children:" * "}):null,this.props.superText?(0,g.jsxs)("sup",{className:"text-volta-normal",children:[" ",this.props.superText," "]}):null]}):null,(0,g.jsx)("div",{className:"form-fieldgroup",children:this.props.children}),this.props.error&&this.props.touched&&(0,g.jsx)("div",{id:"errorField",className:"text-red-500 text-sm",children:m.Z.t(this.props.error.toString())})]})}}]),r}(i.Component);(0,h.Z)(P,"Addons",(function(e){return(0,g.jsx)("div",w(w({},e),{},{className:(0,b.Z)("form-fieldgroup-addons",e.className),children:e.children}))})),(0,h.Z)(P,"Button",(function(e){return(0,g.jsx)(y.Z,w(w({},e),{},{rounded:!1,children:e.children}))}));r(65988),r(66229),r(36187);var Z=r(9669),E=r.n(Z),k=r(37054),S=r(34155);function C(){var e=window;
1return{width:e.innerWidth,height:e.innerHeight}}function D(e){var t,r=e.selectTab,o=e.categoryTab,c=(0,i.useState)([]),u=c[0],d=c[1],f=(0,i.useState)({}),v=f[0],p=f[1],h=(0,i.useState)(),m=h[0],b=h[1],x=(0,i.useState)(),y=x[0],O=x[1],w=(0,i.useState)([]),N=w[0],P=w[1],Z=(0,i.useState)(),D=Z[0],_=Z[1],A=(0,i.useState)({lat:.7893,lng:113.9213}),T=A[0],R=A[1],B=(0,i.useState)(5),L=B[0],F=B[1],z=(0,i.useState)(""),G=z[0],q=z[1],M=(0,i.useState)(!1),K=M[0],V=M[1],W=(0,i.useState)(C()),J=W[0],X=W[1],H={zoomControl:!1,minZoom:5,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,center:T},U=[{code:"dealer",label:"Dealer"},{code:"sgb",label:"SGB"},{code:"showroom",label:"Showroom"}];function Y(){return(Y=(0,n.Z)(l().mark((function e(){var t,r,n,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://master-production.voltaindonesia.com/v1/",t={category:null===v||void 0===v?void 0:v.code},r={"x-api-key":"R@h4s!a"},e.next=5,E().request({baseURL:"https://master-production.voltaindonesia.com/v1/",url:"/public/locations",method:"get",params:t,headers:r});case 5:n=e.sent,o=n.data,b(o),O(o);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){q(e),function(e,r,n){var o=n||{},l=o.leading,i=void 0!==l&&l,a=o.trailing,s=void 0===a||a;if(t){if(i||s||e(),!s)return;clearTimeout(t),t=void 0}i&&!t&&e(),t=setTimeout(s?e:function(){clearTimeout(t),t=void 0},r)}((function(){var t=null===m||void 0===m?void 0:m.filter((function(t){var r,n;return(null===t||void 0===t||null===(r=t.address)||void 0===r?void 0:r.toLowerCase().includes(e))||(null===t||void 0===t||null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e))}));e?(null===e||void 0===e?void 0:e.length)>2&&t?O(t):O([]):O(m),P([!1]),_(void 0)}),1e3)}function Q(){return(Q=(0,n.Z)(l().mark((function e(){var t,n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[!0],n={code:"dealer",label:"Dealer"},d(r||t),p(o||n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,i.useEffect)((function(){!function(){Q.apply(this,arguments)}()}),[]),(0,i.useEffect)((function(){!function(){Y.apply(this,arguments)}()}),[v]),(0,i.useEffect)((function(){return window.addEventListener("resize",(function(){return X(C())})),function(){window.removeEventListener("resize",(function(){return X(C())}))}}),[]),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(a.Z,{type:"default",seo:{title:"Volta - Location",description:"meta desc"},header:"light",footer:!1,children:(0,g.jsx)("div",{className:"bg-volta-normal font-sarala",children:(0,g.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-12 pt-20 relative lg:static",children:[(0,g.jsxs)("div",{className:"order-1 lg:col-span-3 p-6 bg-volta-normal w-full absolute lg:static z-10 lg:z-0 top-[90px] lg:top-0",children:[(0,g.jsx)("div",{className:"text-center",children:(null===U||void 0===U?void 0:U.length)>0&&(null===U||void 0===U?void 0:U.map((function(e,t){return(0,g.jsx)(s.Z,{className:"bg-transparent hover:bg-volta-btn-grad-1a rounded-lg px-4 m-1"+(u[t]?" bg-volta-btn-grad-1a text-white":""),variant:"default",onClick:function(){return function(e,t){var r=[];r[t]=!0,d(r),p(e),P([!1]),_(void 0),R({lat:.7893,lng:113.9213}),F(5),q("")}(e,t)},children:null===e||void 0===e?void 0:e.label},t)})))}),(0,g.jsxs)("div",{className:"mt-4",children:[(0,g.jsx)("div",{className:"mb-4",children:(0,g.jsx)(j.Z,{value:G,label:(0,g.jsxs)("div",{className:"flex justify-between",children:[(0,g.jsxs)("p",{className:"text-xl font-bold",children:["Lokasi ",null===v||void 0===v?void 0:v.label]}),(null===J||void 0===J?void 0:J.width)<=1024&&(0,g.jsx)("img",{src:"/images/icons/close.svg",alt:"Close Popover",className:"w-2.5"+(K?" cursor-pointer":" opacity-50 cursor-not-allowed"),onClick:function(){return V(!1)}})]}),className:"text-volta-black",inputProps:{placeholder:"Cari..",className:"bg-volta-gray-6",onFocus:function(){return V((null===J||void 0===J?void 0:J.width)<=1024)}},onChange:function(e){return I(e.target.value)}})}),((null===J||void 0===J?void 0:J.width)>=1024||(null===J||void 0===J?void 0:J.width)<=1024&&K)&&(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"h-screen lg:h-[58vh] xxl:h-screen overflow-auto",children:(null===y||void 0===y?void 0:y.length)>0?null===y||void 0===y?void 0:y.map((function(e,t){return(0,g.jsxs)("div",{className:"border border-volta-black rounded-lg cursor-pointer p-2 my-2 hover:bg-volta-black hover:text-volta-normal"+(N[t]?" bg-volta-black text-volta-normal":""),onClick:function(){return function(e,t){var r=[];r[t]=!0;var n=null!==r&&void 0!==r&&r.includes(!0)?e:void 0,o={lat:null===e||void 0===e?void 0:e.latitude,lng:null===e||void 0===e?void 0:e.longitude};P(r),_(n),R(o),F(15),V(!1)}(e,t)},children:[(0,g.jsxs)("div",{className:"flex",children:[(0,g.jsx)("img",{src:"/images/icons/pin-location.svg",alt:"Pin Location Dealer Volta",className:"w-3.5 mx-2"}),(0,g.jsx)("p",{className:"text-base font-bold",children:null===e||void 0===e?void 0:e.name})]}),(0,g.jsx)("div",{className:"ml-7",children:(0,g.jsx)("p",{className:"text-sm",children:null===e||void 0===e?void 0:e.address})})]},t)})):(0,g.jsx)("div",{className:"text-center",children:(0,g.jsx)("p",{className:"my-6",children:"Tidak ada data."})})})})]})]}),(0,g.jsx)("div",{className:"order-2 lg:col-span-9 h-screen lg:h-[88vh] xxl:h-screen w-full",children:(0,g.jsx)(k.KJ,{googleMapsApiKey:S.env.GOOGLE_MAPS_KEY,children:(0,g.jsx)(k.b6,{mapContainerStyle:{width:"100%",height:"100%"},options:H,zoom:L,center:T,children:null===y||void 0===y?void 0:y.map((function(e,t){var r,n;return(0,g.jsx)(k.Jx,{position:{lat:null===e||void 0===e?void 0:e.latitude,lng:null===e||void 0===e?void 0:e.longitude},icon:null!==v&&void 0!==v&&null!==(r=v.code)&&void 0!==r&&r.includes("dealer")||null!==v&&void 0!==v&&null!==(n=v.code)&&void 0!==n&&n.includes("showroom")?"/images/icons/dealer-location.svg":"/images/icons/battery-location.svg",children:N[t]&&(0,g.jsx)(k.nx,{options:{maxWidth:(null===J||void 0===J?void 0:J.width)<=1024&&344,minWidth:(null===J||void 0===J?void 0:J.width)<=1024&&344},position:{lat:null===D||void 0===D?void 0:D.latitude,lng:null===D||void 0===D?void 0:D.longitude},onCloseClick:function(){return function(e){var t=[];t[e]=!1,P(t),_(void 0),R({lat:.7893,lng:113.9213}),F(5)}(t)},children:(0,g.jsxs)("div",{className:"bg-volta-normal rounded-lg rounded-tl-none p-3 w-80 hover:cursor-default",children:[(0,g.jsxs)("div",{className:"mb-5",children:[(0,g.jsx)("div",{className:"flex justify-between",children:(0,g.jsx)("p",{className:"text-[16px] font-bold",children:null===D||void 0===D?void 0:D.name})}),(0,g.jsx)("p",{className:"text-sm mt-2",children:null===D||void 0===D?void 0:D.address})]}),(0,g.jsx)("div",{className:"mt-5 w-48",children:(0,g.jsx)("a",{href:"https://maps.google.com/?q=".concat(null===D||void 0===D?void 0:D.latitude,", ").concat(null===D||void 0===D?void 0:D.longitude),target:"_blank",className:"rounded-lg focus-visible:outline-none",children:(0,g.jsx)("div",{className:"bg-gradient-to-tr from-volta-google-orange via-volta-google-red via-volta-google-green to-volta-google-blue rounded-lg p-px",children:(0,g.jsx)(s.Z,{className:"w-full hover:bg-transparent",variant:"default",children:(0,g.jsxs)("div",{className:"flex",children:[(0,g.jsx)("img",{src:"/images/icons/gmap-pin.svg",alt:"Google Maps Pin",className:"w-3.5 mx-2"}),(0,g.jsx)("p",{children:"Buka Google Maps"})]})})})})})]})})},t)}))})})})]})})})})}},86244:function(e,t,r){"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((function(e){return"string"===typeof e})).join(" ").trim()}r.d(t,{Z:function(){return n}})},25895:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/location/index_old",function(){return r(91671)}])}},function(e){e.O(0,[1255,1828,9830,3128,9138,9774,2888,179],(function(){return t=25895,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.