1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{87314:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(11971)}])},11971:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSG:function(){return M}});var r=t(52322),n=t(86085),s=t(63946),o=t(46955),l=t(91528),i=t(77205),c=t(331),d=t(88043),m=t(84238),u=t(70784),h=t(38391),x=t(9483),g=t(31891),p=t(36874),y=t(76290),b=t(46096),f=t(28663),v=t(27254),w=t(36234),j=t(25237),k=t.n(j),N=t(96577),_=t.n(N);let Z=k()(()=>Promise.all([t.e(5587),t.e(5964),t.e(8506),t.e(7394),t.e(3854)]).then(t.bind(t,22710)),{loadableGenerated:{webpack:()=>[22710]},ssr:!1}),Ranking=e=>{let{ranks:a}=e,{t,i18n:s}=(0,y.$)(),o=x._Q[s.language];return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:a.map(e=>(0,r.jsx)(l.Z,{href:e.id,children:(0,r.jsxs)(h.Z,{className:"border-outline hover:border-outlineHover hover:bg-background dark:hover:bg-washed-dark/50 dark:border-washed-dark dark:hover:border-outlineHover-dark group w-full space-y-2 rounded-xl border p-3 transition-colors",children:[(0,r.jsxs)("div",{className:"relative flex items-center gap-3",children:[(0,r.jsx)(v.BS,{agency:e.agency_abbr,className:"h-6 w-6"}),(0,r.jsx)("p",{className:"text-dim text-sm",children:t("agencies:".concat(e.agency_abbr,".abbr"))}),(0,r.jsx)(n.Z,{className:"text-dim absolute right-2 h-5 w-5 opacity-0 transition-[opacity_transform] duration-0 group-hover:translate-x-2 group-hover:opacity-100 group-hover:duration-300"})]}),(0,r.jsxs)("div",{className:"relative overflow-hidden",children:[(0,r.jsx)("p",{className:"truncate font-medium dark:text-white",title:e["name_".concat(o)],children:e["name_".concat(o)]}),(0,r.jsx)("p",{className:"text-dim transition-transform group-hover:translate-y-6",children:"".concat((0,p.ZI)(e.count,"compact")," ").concat(t("common:common.views",{count:e.count}))}),(0,r.jsx)("p",{className:"text-primary dark:text-primary-dark absolute -bottom-6 whitespace-nowrap transition-transform group-hover:-translate-y-6 group-hover:duration-300",children:t("common:components.click_to_explore")})]})]})},e.id))})})};var M=!0;a.default=e=>{let{timeseries:a,timeseries_callouts:t,analytics:n}=e,{t:h}=(0,y.$)(),v=Math.ceil(Math.abs(w.ou.fromSeconds(a.data.x[a.data.x.length-1]/1e3).minus({years:1}).diff(w.ou.fromSeconds(a.data.x[a.data.x.length-1]/1e3),["days"]).days)),{data:j,setData:k}=(0,b.e)({minmax:[a.data.x.length-v,a.data.x.length-1],tabs_section_1:0,tabs_section_2:0}),{coordinate:N}=(0,f.M)(a.data,j.minmax),yieldPrefix=e=>e>=0?"+":"-",yieldCallout=e=>[{title:h("common:home.section_3.daily"),value:yieldPrefix(t.data[e].callout1)+(0,p.ZI)(t.data[e].callout1,"standard")},{title:h("common:home.section_3.total"),value:(0,p.ZI)(t.data[e].callout2,"standard")}],M=[{name:h("common:home.section_2.past_24h"),data:n.today},{name:h("common:home.section_2.all_time"),data:n.all_time}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{keywords:"data.gov.my data malaysia election prices harga"}),(0,r.jsx)(o.Z,{background:"gray",category:[h("common:home.category"),"text-primary dark:text-primary-dark"],header:[h("common:home.title")],description:[h("common:home.description"),"text-dim"],className:"relative",action:(0,r.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,r.jsx)(l.Z,{className:"btn-primary shadow-button text-sm",href:"/dashboard",enableIcon:!0,children:h("common:nav.dashboards")}),(0,r.jsx)(l.Z,{className:"btn btn-border active:bg-washed shadow-button bg-white px-3 py-1.5 text-sm text-black",href:"/data-catalogue",enableIcon:!0,children:h("common:nav.catalogue")}),(0,r.jsx)(l.Z,{className:"btn px-3 py-1.5 text-sm",href:"https://developer.data.gov.my",enableIcon:!0,external:!0,children:h("common:nav.api_docs")}),(0,r.jsx)("div",{className:"pointer-events-none absolute bottom-0 right-0 max-lg:hidden",children:(0,r.jsx)(_(),{src:"/static/images/header/hero-motif.svg",className:"opacity-100 xl:h-[230px]",width:315,height:250,alt:"Datagovmy hero motif"})})]}),agencyBadge:(0,r.jsx)(i.Z,{agency:"govt"})}),(0,r.jsxs)(c.Z,{className:"min-h-screen",children:[(0,r.jsx)(d.Z,{title:h("common:home.section_1.title"),description:h("common:home.section_1.description"),date:n.data_as_of,menu:(0,r.jsx)(m.ZP.List,{options:M.map(e=>e.name),current:j.tabs_section_1,onChange:e=>k("tabs_section_1",e)}),children:(0,r.jsx)(m.ZP,{hidden:!0,current:j.tabs_section_1,onChange:e=>k("tabs_section_1",e),children:M.map((e,a)=>(0,r.jsx)(m.ZP.Panel,{name:e.name,children:(0,r.jsx)(Ranking,{ranks:e.data.dashboard})},a))})}),(0,r.jsx)(d.Z,{title:h("common:home.section_2.title"),description:h("common:home.section_2.description"),date:n.data_as_of,menu:(0,r.jsx)(m.ZP.List,{options:M.map(e=>e.name),current:j.tabs_section_2,onChange:e=>k("tabs_section_2",e)}),children:(0,r.jsx)(m.ZP,{hidden:!0,current:j.tabs_section_2,onChange:e=>k("tabs_section_2",e),children:M.map((e,a)=>(0,r.jsx)(m.ZP.Panel,{name:e.name,children:(0,r.jsx)(Ranking,{ranks:e.data.dataset})},a))})}),(0,r.jsx)(d.Z,{title:h("common:home.section_3.title"),date:a.data_as_of,children:(0,r.jsx)(g.Y,{children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-12 lg:grid-cols-3",children:[(0,r.jsx)(Z,{className:"h-[300px] w-full",title:h("common:home.keys.views"),enableAnimation:!e,data:{labels:N.x,datasets:[{type:"line",data:N.views,borderColor:x.Tv.PRIMARY,label:h("common:home.keys.views"),borderWidth:1.5,backgroundColor:x.Tv.PRIMARY_H,fill:!0}]},stats:yieldCallout("views")}),(0,r.jsx)(Z,{className:"h-[300px] w-full",title:h("common:home.keys.users"),enableAnimation:!e,data:{labels:N.x,datasets:[{type:"line",data:N.users,borderColor:x.Tv.PRIMARY,borderWidth:1.5,label:h("common:home.keys.users"),backgroundColor:x.Tv.PRIMARY_H,fill:!0}]},stats:yieldCallout("users")}),(0,r.jsx)(Z,{className:"h-[300px] w-full",title:h("common:home.keys.downloads"),enableAnimation:!e,data:{labels:N.x,datasets:[{type:"line",data:N.downloads,borderColor:x.Tv.PRIMARY,label:h("common:home.keys.downloads"),backgroundColor:x.Tv.PRIMARY_H,fill:!0,borderWidth:1.5}]},stats:yieldCallout("downloads")})]}),(0,r.jsx)(u.Z,{type:"range",value:j.minmax,data:a.data.x,onChange:e=>k("minmax",e)})]})})})]})]})}},38391:function(e,a,t){"use strict";var r=t(52322),n=t(36874);a.Z=e=>{let{children:a,className:t,onClick:s}=e;return(0,r.jsx)("div",{className:(0,n.L1)("border-outline dark:border-washed-dark rounded-xl border transition",s&&"cursor-pointer transition",t),tabIndex:s?0:-1,onClick:s,children:a})}},88043:function(e,a,t){"use strict";var r=t(52322),n=t(36874),s=t(76290),o=t(2784),l=t(36234);let i=(0,o.forwardRef)((e,a)=>{let{title:t,className:i="py-8 lg:py-12",description:c,children:d,date:m,menu:u}=e,{t:h,i18n:x}=(0,s.$)(),g=(0,o.useMemo)(()=>null==m?"":"string"!=typeof m||(l.ou.fromSQL(m).isValid||l.ou.fromFormat(m,"yyyy-'Q'q").isValid)&&m.length>4?(0,n.ZU)(m,"dd MMM yyyy, HH:mm",x.language):m,[m,x.language]);return(0,r.jsx)("section",{className:i,ref:a,children:(0,r.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-8",children:[t||m||c?(0,r.jsxs)("div",{className:"flex flex-col gap-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col flex-wrap items-start gap-2 lg:flex-row lg:items-center lg:justify-between",children:[t&&"string"==typeof t?(0,r.jsx)("h4",{children:t}):t,m&&null!==m&&(0,r.jsx)("span",{className:"text-dim text-right text-sm",children:h("common:common.data_of",{date:g})})]}),(c||u)&&(0,r.jsxs)("div",{className:(0,n.L1)("text-dim flex w-full flex-wrap justify-between gap-y-3 md:flex-nowrap md:items-start",c&&u?"gap-x-6":""),children:[c&&"string"==typeof c?(0,r.jsx)("p",{className:["whitespace-pre-line text-base",u?"md:max-w-[70%]":""].join(" "),children:c}):c,u&&(0,r.jsx)("div",{className:"flex w-full gap-3 md:w-auto md:justify-end",children:u})]})]}):(0,r.jsx)(r.Fragment,{}),(0,r.jsx)("div",{children:d})]})})});i.displayName="Section",a.Z=i},70784:function(e,a,t){"use strict";var r=t(52322),n=t(2784),s=t(31142),o=t(95280),l=t(76290),i=t(64880),c=t(36874),d=t(70830),m=t(31891);let SliderTooltip=e=>{let{play:a,children:t}=e;
1return(0,r.jsxs)("div",{className:(0,c.L1)("absolute bottom-8 left-1/2 flex -translate-x-1/2 transform flex-col items-center opacity-0 group-hover:flex group-hover:opacity-100","transition-opacity delay-300 duration-300 group-hover:delay-0 max-lg:group-focus-within:opacity-100",a?"opacity-100":"opacity-0"),children:[(0,r.jsx)("span",{className:"shadow-floating relative z-10 whitespace-nowrap rounded-lg bg-black px-3 py-1.5 text-sm text-white dark:bg-white dark:text-black",children:t}),(0,r.jsx)("div",{className:"absolute -bottom-1 h-2 w-2 rotate-45 bg-black dark:bg-white"})]})},u=[16586208e5,16587072e5,16594848e5,16595712e5];a.Z=e=>{let{className:a="pt-8",type:t,onChange:h,step:x,value:g,data:p=u,period:y="auto",parseAsDate:b=!0,enablePlayer:f=!0}=e,{t:v,i18n:w}=(0,l.$)("common"),{play:j,setPlaying:k}=(0,n.useContext)(m.y),N=(0,n.useRef)(null),[_,Z]=(0,n.useState)(g),M={auto:"dd MMM yyyy",day:"dd MMM yyyy",month:"MMM yyyy",quarter:"".concat("ms-MY"===w.language?"'ST'":"","q").concat("ms-MY"===w.language?"":"Q"," yyyy"),year:"yyyy",hour:"dd MMM yy HH:mm "};if((0,i.q)(()=>{"single"!==t&&N.current&&cancelTimer()},[p]),(0,i.q)(()=>{"single"!==t&&Z(g)},[g]),(0,i.q)(()=>{p&&"range"===t&&(Z(g),h(g))},[y]),"single"===t)return(0,r.jsxs)("div",{className:(0,c.L1)("group flex w-full items-center gap-x-3",a),children:[(0,r.jsx)("p",{className:"text-dim text-sm",children:b?(0,c.ZU)(p[0],"yyyy",w.language):p[0]}),(0,r.jsxs)(d.fC,{className:"group relative flex h-5 w-full touch-none select-none items-center",value:[_],max:p.length-1,step:x,onValueChange:e=>Z(e),onValueCommit:e=>h(e),children:[(0,r.jsx)(d.fQ,{className:"dark:bg-washed-dark bg-outline relative z-0 h-2 grow rounded-full",children:(0,r.jsx)(d.e6,{className:"max-lg:group-focus-within:bg-primary dark:max-lg:group-focus-within:bg-primary-dark group-hover:bg-primary dark:group-hover:bg-primary absolute z-0 h-full rounded-xl bg-[#A1A1AA]"})}),(0,r.jsx)(d.bU,{className:"max-lg:group-focus-within:border-primary max-lg:group-focus-within:ring-primary group-hover:border-primary group-hover:ring-primary shadow-button block h-5 w-5 cursor-pointer rounded-full border-2 border-[#A1A1AA] bg-white group-hover:ring-4 max-lg:group-focus-within:ring-4",children:(0,r.jsx)(SliderTooltip,{children:b?(0,c.ZU)(p[_],M[y],w.language):p[_]})})]}),(0,r.jsx)("p",{className:"text-dim text-sm",children:b?(0,c.ZU)(p[p.length-1],"yyyy",w.language):p[p.length-1]})]});let startTimer=()=>{k(!0);let e=g[1]>=p.length-1?g[0]:g[1];N.current=setInterval(()=>{e>=p.length-1?cancelTimer():h([g[0],++e])},150)},cancelTimer=()=>{k(!1),N.current&&clearInterval(N.current),N.current=null};return(0,r.jsxs)("div",{className:(0,c.L1)("group flex w-full items-center gap-x-3",a),children:[f&&(0,r.jsx)("button",{type:"button","aria-label":v(j?"common:common.pause":"common:common.play"),title:v(j?"common:common.pause":"common:common.play"),className:"w-fit",onClick:()=>{N.current?cancelTimer():startTimer()},children:j?(0,r.jsx)(s.Z,{className:"h-4 w-4 text-black dark:text-white"}):(0,r.jsx)(o.Z,{className:"h-4 w-4 text-black dark:text-white"})}),(0,r.jsx)("p",{className:"text-dim text-sm",children:b?(0,c.ZU)(p[0],"yyyy",w.language):p[0]}),(0,r.jsxs)(d.fC,{className:"group relative flex h-5 w-full touch-none select-none items-center",value:_,min:0,max:p.length-1,onValueChange:e=>{N.current&&cancelTimer(),Z(e)},onValueCommit:e=>{N.current&&cancelTimer(),h(e)},minStepsBetweenThumbs:1,children:[(0,r.jsx)(d.fQ,{className:"dark:bg-washed-dark bg-outline relative z-0 h-2 grow rounded-full",children:(0,r.jsx)(d.e6,{className:"max-lg:group-focus-within:bg-primary dark:max-lg:group-focus-within:bg-primary-dark group-hover:bg-primary dark:group-hover:bg-primary absolute z-0 h-full rounded-xl bg-[#A1A1AA]"})}),(0,r.jsx)(d.bU,{className:"max-lg:group-focus-within:border-primary max-lg:group-focus-within:ring-primary group-hover:border-primary group-hover:ring-primary shadow-button block h-5 w-5 cursor-col-resize rounded-full border-2 border-[#A1A1AA] bg-white group-hover:ring-4 max-lg:group-focus-within:ring-4",children:(0,r.jsx)(SliderTooltip,{play:j,children:b?(0,c.ZU)(p[Math.max(0,_[0])],M[y],w.language):p[_[0]]})}),(0,r.jsx)(d.bU,{className:"max-lg:group-focus-within:border-primary max-lg:group-focus-within:ring-primary group-hover:border-primary group-hover:ring-primary shadow-button block h-5 w-5 cursor-col-resize rounded-full border-2 border-[#A1A1AA] bg-white group-hover:ring-4 max-lg:group-focus-within:ring-4",children:(0,r.jsx)(SliderTooltip,{play:j,children:b?(0,c.ZU)(p[Math.min(_[1],p.length-1)],M[y],w.language):p[_[1]]})})]}),(0,r.jsx)("p",{className:"text-dim text-sm",children:b?(0,c.ZU)(p[p.length-1],"yyyy",w.language):p[p.length-1]})]})}},84238:function(e,a,t){"use strict";t.d(a,{aV:function(){return List},s_:function(){return Panel}});var r=t(52322),n=t(2784),s=t(62671),o=t(36874);let Panel=e=>{let{children:a,className:t,name:n}=e;return(0,r.jsx)("div",{className:t,children:a})},List=e=>{let{options:a,current:t,onChange:n,icons:s,className:l}=e;return(0,r.jsx)("ul",{className:(0,o.L1)("flex flex-wrap",l),children:a.map((e,a)=>(0,r.jsxs)("li",{className:(0,o.L1)("flex cursor-pointer select-none self-center whitespace-nowrap rounded-full px-2.5 py-1 text-sm outline-none transition-colors",t===a?"bg-outline dark:bg-washed-dark font-medium text-black dark:text-white":"text-dim bg-transparent hover:text-black dark:hover:text-white"),onClick:()=>n(a),children:[s&&s[a],e]},e))})},Tabs=e=>{let{className:a="",hidden:t,children:l,title:i,controls:c,current:d,menu:m,onCh
1ange:u=()=>{}}=e,h=(0,n.useMemo)(()=>Array.isArray(l)?l:[l],[l]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(s.O.Group,{selectedIndex:d,onChange:u,children:[(0,r.jsxs)("div",{className:(0,o.L1)("flex flex-wrap items-end justify-between gap-3",a),children:[(0,r.jsx)("div",{children:i&&"string"==typeof i?(0,r.jsx)("span",{className:"text-base font-bold",children:i}):i}),(0,r.jsxs)(s.O.List,{className:(0,o.L1)("flex flex-wrap items-center justify-between gap-2.5",t&&"hidden"),children:[c,(0,r.jsx)("div",{className:"flex flex-wrap",children:h.map((e,a)=>{let{props:{name:t,icon:n}}=e;return(0,r.jsxs)(s.O,{className:e=>{let{selected:a}=e;return(0,o.L1)("group flex flex-row rounded-full px-[10px] py-1 text-sm outline-none transition-colors",a?"bg-outline dark:bg-washed-dark font-medium text-black dark:text-white":"text-dim bg-transparent hover:text-black dark:hover:text-white")},children:[n,t]},a)})}),m&&(0,r.jsx)("div",{children:m})]})]}),(0,r.jsx)(s.O.Panels,{className:"w-full",children:h.map((e,a)=>{let{props:{children:t}}=e;return(0,r.jsx)(s.O.Panel,{className:"overflow-visible",children:t},a)})})]})})};Tabs.Panel=Panel,Tabs.List=List,a.ZP=Tabs},31891:function(e,a,t){"use strict";t.d(a,{Y:function(){return SliderProvider},y:function(){return s}});var r=t(52322),n=t(2784);let s=(0,n.createContext)({play:!1,setPlaying:()=>{}}),SliderProvider=e=>{let{children:a}=e,[t,o]=(0,n.useState)(!1);return(0,r.jsx)(s.Provider,{value:{play:t,setPlaying:o},children:a(t)})}},46096:function(e,a,t){"use strict";t.d(a,{e:function(){return useData}});var r=t(2784);let useData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.useRef)(e);let[a,t]=(0,r.useReducer)((e,a)=>{switch(a.type){case"SET":return Object.assign({},e,{[a.payload.key]:a.payload.value});case"RESET":return Object.assign({},e,a.payload);default:throw Error("Unrecognized dispatch command")}},e);return{data:a,setData:(e,a)=>{t({type:"SET",payload:{key:e,value:a}})},reset:a=>{a?t({type:"RESET",payload:a}):t({type:"RESET",payload:e})}}}},28663:function(e,a,t){"use strict";t.d(a,{M:function(){return useSlice}});var r=t(2784);let useSlice=(e,a)=>{let t=(0,r.useMemo)(()=>Object.entries(e).map(e=>{let[t,r]=e;return[t,r.slice(a?a[0]:0,a?a[1]+1:r.length-1)]}),[e,a]);return{coordinate:Object.fromEntries(t)}}},64880:function(e,a,t){"use strict";t.d(a,{q:function(){return useWatch}});var r=t(2784);let useWatch=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=(0,r.useRef)(!0);(0,r.useEffect)(()=>{if(!t&&n.current){n.current=!1;return}e()},a)}}},function(e){e.O(0,[3130,1368,1331,7234,9774,2888,179],function(){return e(e.s=87314)}),_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.