PageSourceSearch

https://halodish.com/_next/static/chunks/pages/i18n-demo-f568614a3ad9bffd.js

js halodish.com collected 2026-09-24 13:05:48 UTC 8,262 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5241],{95305:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/i18n-demo",function(){return r(3081)}])},82801:function(e,t,r){"use strict";r.d(t,{W:function(){return o},T:function(){return d}});var s=r(52322),n=r(2784),a=r(5632),i=r(77282);let l=["en","ja","id","ms","zh-Hant"],c={en:"English",ja:"日本語",id:"Bahasa Indonesia",ms:"Bahasa Malaysia","zh-Hant":"繁體中文"},o=e=>{let{className:t=""}=e,r=(0,a.useRouter)(),o=r.locale||"en",[d,m]=n.useState(!1),h=e=>{let{pathname:t,asPath:s,query:n}=r;r.replace({pathname:t,query:n},s,{locale:e}),m(!1)};return n.useEffect(()=>{if(!d)return;let e=e=>{var t;(null===(t=e.target)||void 0===t?void 0:t.closest(".language-switcher-dropdown"))||m(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[d]),(0,s.jsxs)("div",{className:"relative inline-block text-left ".concat(t," language-switcher-dropdown"),children:[(0,s.jsx)("button",{type:"button","aria-label":"Select language",className:"flex items-center justify-center rounded-md p-2 hover:bg-gray-100 focus:outline-none",onClick:()=>m(e=>!e),children:(0,s.jsx)(i.Z,{className:"h-5 w-5 text-gray-700"})}),d&&(0,s.jsx)("div",{className:"absolute right-0 z-10 mt-2 w-36 rounded-md border border-gray-200 bg-white shadow-lg",children:(0,s.jsx)("ul",{className:"py-1",children:l.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)("button",{className:"w-full px-4 py-2 text-left text-sm hover:bg-gray-100 ".concat(o===e?"font-semibold text-green-600":"text-gray-700"),onClick:()=>h(e),"aria-label":"Switch to ".concat(c[e]),children:c[e]})},e))})})]})},d=e=>{let{className:t=""}=e,r=(0,a.useRouter)(),n=r.locale||"en",i=e=>{let{pathname:t,asPath:s,query:n}=r;r.push({pathname:t,query:n},s,{locale:e})};return(0,s.jsx)("div",{className:"flex space-x-2 ".concat(t),children:l.map(e=>(0,s.jsx)("button",{onClick:()=>i(e),className:"rounded-md px-3 py-1 text-xs font-medium transition-colors ".concat(n===e?"bg-green-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"),"aria-label":"Switch to ".concat(c[e]),children:e.toUpperCase()},e))})}},3081:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return o},default:function(){return d}});var s=r(52322);r(2784);var n=r(39097),a=r.n(n),i=r(5632),l=r(15254),c=r(82801),o=!0;function d(){let e=(0,i.useRouter)(),t=(0,l.T_)("common"),r=(0,l.T_)("homepage"),n=(0,l.T_)("errors");return(0,s.jsx)("div",{className:"min-h-screen bg-gray-50 px-4 py-12 sm:px-6 lg:px-8",children:(0,s.jsx)("div",{className:"mx-auto max-w-3xl",children:(0,s.jsxs)("div",{className:"rounded-lg bg-white p-8 shadow-lg",children:[(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h1",{className:"mb-4 text-3xl font-bold text-gray-900",children:t("meta.title")}),(0,s.jsx)("p",{className:"text-lg text-gray-600",children:t("meta.description")}),(0,s.jsxs)("div",{className:"mt-4 flex items-center space-x-4",children:[(0,s.jsxs)("span",{className:"text-sm text-gray-500",children:["Current locale: ",e.locale]}),(0,s.jsx)(c.W,{})]})]}),(0,s.jsxs)("div",{className:"mb-8 rounded-lg border border-gray-200 p-4",children:[(0,s.jsx)("h2",{className:"mb-4 text-xl font-semibold text-gray-800",children:"Language Switchers"}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-md mb-2 font-medium text-gray-700",children:"Dropdown Switcher:"}),(0,s.jsx)(c.W,{})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-md mb-2 font-medium text-gray-700",children:"Button Switcher:"}),(0,s.jsx)(c.T,{})]})]})]}),(0,s.jsxs)("div",{className:"mb-8 rounded-lg border border-gray-200 p-4",children:[(0,s.jsxs)("h2",{className:"mb-4 text-xl font-semibold text-gray-800",children:[t("navigation.home")," - Navigation Translations"]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-md mb-2 font-medium text-gray-700",children:"Navigation:"}),(0,s.jsxs)("ul",{className:"space-y-2 text-sm",children:[(0,s.jsxs)("li",{children:["• ",t("navigation.home")]}),(0,s.jsxs)("li",{children:["• ",t("navigation.explore")]}),(0,s.jsxs)("li",{children:["• ",t("navigation.about")]}),(0,s.jsxs)("li",{children:["• ",t("navigation.features")]}),(0,s.jsxs)("li",{children:["• ",t("navigation.faq")]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-md mb-2 font-medium text-gray-700",children:"Actions:"}),(0,s.jsxs)("ul",{className:"space-y-2 text-sm",children:[(0,s.jsxs)("li",{children:["• ",t("actions.search")]}),(0,s.jsxs)("li",{children:["• ",t("actions.loading")]}),(0,s.jsxs)("li",{children:["• ",t("actions.submit")]}),(0,s.jsxs)("li",{children:["• ",t("actions.save")]}),(0,s.jsxs)("li",{children:["• ",t("actions.back")]})]})]})]})]}),(0,s.jsxs)("div",{className:"mb-8 rounded-lg border border-gray-200 p-4",children:[(0,s.jsx)("h2",{className:"mb-4 text-xl font-semibold text-gray-800",children:"Homepage Content"}),(0,s.jsx)("div",{className:"space-y-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-medium text-green-600",children:r("hero.title")}),(0,s.jsx)("p",{className:"text-gray-600",children:r("hero.subtitle")}),(0,s.jsx)("button",{className:"mt-2 rounded bg-green-600 px-4 py-2 font-medium text-white hover:bg-green-700",children:r("hero.cta")})]})})]}),(0,s.jsxs)("div",{className:"mb-8 rounded-lg border border-gray-200 p-4",children:[(0,s.jsx)("h2",{className:"mb-4 text-xl font-semibold text-gray-800",children:"Error Messages"}),(0,s.jsxs)("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[(0,s.jsx)("h3",{className:"text-lg font-medium text-red-800",children:n("404.title")}),(0,s.jsx)("p",{className:"mt-1 text-red-600",children:n("404.description")}),(0,s.jsx)("button",{className:"mt-2 rounded bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700",children:n("404.goHome")})]})]}),(0,s.jsxs)("div",{className:"flex space-x-4",children:[(0,s.jsxs)(a(),{href:"/",className:"font-medium text-green-600 hover:text-green-800",children:["← ",t("navigation.home")]}),(0,s.jsxs)(a(),{href:"/about-us",className:"font-medium text-green-600 hover:text-green-800",children:[t("navigation.about")," →"]})]})]})})})}},62244:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var s=r(2784);let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),i=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,s.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:d="",children:m,iconNode:h,...x}=e;return(0,s.createElement)("svg",{ref:t,...o,width:n,height:n,stroke:r,strokeWidth:i?24*Number(a)/Number(n):a,className:l("lucide",d),...!m&&!c(x)&&{"aria-hidden":"true"},...x},[...h.map(e=>{let[t,r]=e;return(0,s.createElement)(t,r)}),...Array.isArray(m)?m:[m]])}),m=(e,t)=>
1{let r=(0,s.forwardRef)((r,a)=>{let{className:c,...o}=r;return(0,s.createElement)(d,{ref:a,iconNode:t,className:l("lucide-".concat(n(i(e))),"lucide-".concat(e),c),...o})});return r.displayName=i(e),r}},77282:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(62244).Z)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]])},15254:function(e,t,r){"use strict";r.d(t,{T_:function(){return a}});var s=r(66231);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let a=n(0,s.T_);n(0,s.Gb)}},function(e){e.O(0,[9097,2888,9774,179],function(){return e(e.s=95305)}),_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.