PageSourceSearch

https://cocoroam.com/_next/static/chunks/app/(marketing)/destinations/page-23065a728c60e67c.js

js cocoroam.com collected 2026-10-02 00:07:04 UTC 9,727 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[390],{1702:(e,t,s)=>{"use strict";var r=s(9962);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},2125:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(3656).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},2580:(e,t,s)=>{Promise.resolve().then(s.bind(s,6538)),Promise.resolve().then(s.bind(s,8158)),Promise.resolve().then(s.bind(s,9677)),Promise.resolve().then(s.t.bind(s,8197,23))},3656:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var r=s(1521);let a=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim()};var n={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 l=(0,r.forwardRef)((e,t)=>{let{color:s="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:u,iconNode:d,...m}=e;return(0,r.createElement)("svg",{ref:t,...n,width:l,height:l,stroke:s,strokeWidth:o?24*Number(i)/Number(l):i,className:a("lucide",c),...m},[...d.map(e=>{let[t,s]=e;return(0,r.createElement)(t,s)}),...Array.isArray(u)?u:[u]])}),i=(e,t)=>{let s=(0,r.forwardRef)((s,n)=>{let{className:i,...o}=s;return(0,r.createElement)(l,{ref:n,iconNode:t,className:a("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),i),...o})});return s.displayName="".concat(e),s}},6538:(e,t,s)=>{"use strict";s.d(t,{DestinationsBrowser:()=>c});var r=s(3365),a=s(1521),n=s(8197),l=s.n(n),i=s(2125);let o=["Europe","North America","Asia","Oceania","South America","Caribbean","Africa"];function c(e){let{countries:t}=e,s=(0,a.useMemo)(()=>{let e=new Set;return t.filter(t=>!e.has(t.isoCode)&&(e.add(t.isoCode),!0))},[t]),n=(0,a.useMemo)(()=>s.reduce((e,t)=>{let s=t.continent||"Other";return e[s]||(e[s]=[]),e[s].push(t),e},{}),[s]),c=(0,a.useMemo)(()=>Object.keys(n).sort((e,t)=>{let s=o.indexOf(e),r=o.indexOf(t);return -1===s&&-1===r?e.localeCompare(t):-1===s?1:-1===r?-1:s-r}),[n]);return(0,r.jsx)("div",{className:"space-y-12 sm:space-y-16",children:c.map(e=>(0,r.jsxs)("section",{children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between mb-6 pb-4 border-b border-black/5",children:[(0,r.jsx)("h2",{className:"text-2xl font-serif font-bold",children:e}),(0,r.jsxs)("span",{className:"text-[10px] font-bold uppercase tracking-widest text-black/30",children:[n[e].length," ",1===n[e].length?"country":"countries"]})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-3",children:n[e].slice().sort((e,t)=>e.name.localeCompare(t.name)).map(e=>(0,r.jsxs)(l(),{href:"/destinations/".concat(e.slug),className:"group flex items-center gap-3 p-4 rounded-xl border border-black/5 hover:border-black/15 hover:shadow-md transition-all bg-white",children:[e.flagUrl?(0,r.jsx)("img",{src:e.flagUrl,alt:e.name,className:"h-6 w-8 rounded object-cover flex-shrink-0"}):(0,r.jsx)("span",{className:"text-xl flex-shrink-0",children:"\uD83C\uDF0D"}),(0,r.jsx)("span",{className:"truncate text-sm font-medium group-hover:text-black transition-colors flex-grow",children:e.name}),(0,r.jsx)(i.A,{size:14,className:"text-black/15 group-hover:text-black/40 transition-colors flex-shrink-0"})]},e.slug))})]},e))})}},8158:(e,t,s)=>{"use strict";s.d(t,{DestinationsSearch:()=>m});var r=s(3365),a=s(1521),n=s(1702),l=s(8197),i=s.n(l),o=s(9279),c=s(2125),u=s(8248);let d=["japan","spain-esim","france","italy","thailand-esim","usa","uk-esim","indonesia"];
1function m(e){let{countries:t,variant:s="hero"}=e,l="panel"===s,m=(0,n.useSearchParams)().get("q")||"",[h,x]=(0,a.useState)(m),[f,p]=(0,a.useState)(!!m),b=(0,a.useRef)(null),g=(0,a.useRef)(null),k=(0,n.useRouter)();(0,a.useEffect)(()=>{let e=e=>{b.current&&!b.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let w=(0,a.useMemo)(()=>{let e=new Set;return t.filter(t=>!e.has(t.isoCode)&&(e.add(t.isoCode),!0))},[t]),v=(0,a.useMemo)(()=>{if(!h.trim())return[];let e=h.toLowerCase();return w.filter(t=>{var s;return t.name.toLowerCase().includes(e)||t.isoCode.toLowerCase().includes(e)||(null==(s=t.continent)?void 0:s.toLowerCase().includes(e))}).slice(0,7)},[w,h]),j=(0,a.useMemo)(()=>d.map(e=>w.find(t=>t.slug===e)).filter(Boolean),[w]),N=f&&(!!h.trim()||j.length>0);return(0,r.jsxs)("div",{ref:b,className:"relative w-full ".concat(l?"max-w-2xl mx-auto":"max-w-xl"),children:[(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let t=h.trim();if(!t){var s;null==(s=g.current)||s.focus();return}let r=w.find(e=>e.name.toLowerCase()===t.toLowerCase());if((0,u.sx)("destinations_search_submit",{query:t}),r){k.push("/destinations/".concat(r.slug)),p(!1);return}p(!0)},children:(0,r.jsxs)("div",{className:"relative flex items-center",children:[(0,r.jsx)(o.A,{size:l?20:18,className:"absolute top-1/2 -translate-y-1/2 text-black/35 pointer-events-none ".concat(l?"left-6":"left-5")}),(0,r.jsx)("input",{ref:g,type:"search",value:h,onChange:e=>{x(e.target.value),p(!0)},onFocus:()=>p(!0),placeholder:l?"Try a country or region — Japan, Europe, Bali…":"Search destinations","aria-label":"Search destinations","aria-expanded":N,"aria-autocomplete":"list",className:l?"w-full bg-white rounded-full py-5 sm:py-6 pl-16 pr-6 text-base font-medium shadow-lg shadow-black/5 focus:outline-none focus:shadow-xl focus:shadow-black/10 transition-shadow placeholder:text-black/35 text-black":"w-full bg-white/95 backdrop-blur rounded-full py-4 pl-12 pr-36 text-sm font-medium shadow-xl focus:outline-none placeholder:text-black/35 text-black"}),!l&&(0,r.jsx)("button",{type:"submit",className:"absolute right-2 top-1/2 -translate-y-1/2 px-5 py-2.5 bg-black text-white rounded-full text-xs font-bold uppercase tracking-widest hover:bg-black/85 transition",children:"Search"})]})}),N&&(0,r.jsx)("div",{className:"absolute top-full mt-2 left-0 right-0 bg-white rounded-2xl shadow-2xl overflow-hidden z-30",children:h.trim()?0===v.length?(0,r.jsxs)("p",{className:"px-5 py-4 text-sm text-black/45 text-center",children:["No destinations match “",h,"”."," ",(0,r.jsx)(i(),{href:"/regions",className:"underline underline-offset-2 hover:text-black",onClick:()=>p(!1),children:"Try a regional plan"}),"."]}):(0,r.jsxs)("ul",{className:"divide-y divide-black/[0.04]",children:[v.map(e=>(0,r.jsx)("li",{children:(0,r.jsxs)(i(),{href:"/destinations/".concat(e.slug),onClick:()=>{(0,u.sx)("destinations_search_result_click",{slug:e.slug}),p(!1),x("")},className:"flex items-center gap-4 px-5 py-3.5 hover:bg-black/[0.03] transition-colors",children:[e.flagUrl?(0,r.jsx)("img",{src:e.flagUrl,alt:e.name,className:"h-5 w-7 rounded object-cover flex-shrink-0"}):(0,r.jsx)("span",{className:"text-base flex-shrink-0",children:"\uD83C\uDF0D"}),(0,r.jsx)("span",{className:"flex-1 text-sm font-medium text-black",children:e.name}),(0,r.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-widest text-black/25",children:e.continent}),(0,r.jsx)(c.A,{size:13,className:"text-black/20 flex-shrink-0"})]})},e.slug)),(0,r.jsx)("li",{children:(0,r.jsxs)(i(),{href:"/destinations?q=".concat(encodeURIComponent(h)),onClick:()=>p(!1),className:"flex items-center justify-between px-5 py-3.5 text-xs font-bold text-black/60 hover:bg-black/[0.03] hover:text-black transition-colors",children:[(0,r.jsxs)("span",{children:["See all results for “",h,"”"]}),(0,r.jsx)(c.A,{size:13,className:"text-black/30"})]})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"px-5 pt-3.5 pb-1.5 text-[10px] font-bold uppercase tracking-widest text-black/35",children:"Popular destinations"}),(0,r.jsx)("ul",{className:"divide-y divide-black/[0.04] pb-1",children:j.map(e=>(0,r.jsx)("li",{children:(0,r.jsxs)(i(),{href:"/destinations/".concat(e.slug),onClick:()=>{(0,u.sx)("destinations_search_popular_click",{slug:e.slug}),p(!1)},className:"flex items-center gap-4 px-5 py-3 hover:bg-black/[0.03] transition-colors",children:[e.flagUrl?(0,r.jsx)("img",{src:e.flagUrl,alt:e.name,className:"h-5 w-7 rounded object-cover flex-shrink-0"}):(0,r.jsx)("span",{className:"text-base flex-shrink-0",children:"\uD83C\uDF0D"}),(0,r.jsx)("span",{className:"flex-1 text-sm font-medium text-black",children:e.name}),(0,r.jsx)(c.A,{size:13,className:"text-black/20 flex-shrink-0"})]})},e.slug))})]})})]})}},8248:(e,t,s)=>{"use strict";var r;s.d(t,{Kb:()=>a,nf:()=>l,sx:()=>n});
1let a=null!=(r=s(986).env.NEXT_PUBLIC_FACEBOOK_PIXEL_ID)?r:"1666780191266424";function n(e,t){window.gtag&&window.gtag("event",e,t)}function l(e,t,s){window.fbq&&(s?window.fbq("track",e,null!=t?t:{},{eventID:s}):window.fbq("track",e,null!=t?t:{}))}},9279:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(3656).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},9677:(e,t,s)=>{"use strict";s.d(t,{DarkHeader:()=>o,HeaderThemeProvider:()=>l,Y:()=>i});var r=s(3365),a=s(1521);let n=(0,a.createContext)({dark:!1,setDark:()=>{}});function l(e){let{children:t}=e,[s,l]=(0,a.useState)(!1);return(0,r.jsx)(n.Provider,{value:{dark:s,setDark:l},children:t})}function i(){return(0,a.useContext)(n)}function o(){let{setDark:e}=(0,a.useContext)(n),t=(0,a.useRef)(e);return t.current=e,(0,a.useEffect)(()=>(t.current(!0),()=>t.current(!1)),[]),null}}},e=>{e.O(0,[8197,2347,3131,7358],()=>e(e.s=2580)),_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.