PageSourceSearch

https://www.travafa.com/_next/static/chunks/app/(content)/blog/page-43974c2b8a6978c2.js

js travafa.com collected 2026-10-09 04:49:21 UTC 5,799 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22678],{20063:(e,t,a)=>{"use strict";var l=a(47260);a.o(l,"notFound")&&a.d(t,{notFound:function(){return l.notFound}}),a.o(l,"useParams")&&a.d(t,{useParams:function(){return l.useParams}}),a.o(l,"usePathname")&&a.d(t,{usePathname:function(){return l.usePathname}}),a.o(l,"useRouter")&&a.d(t,{useRouter:function(){return l.useRouter}}),a.o(l,"useSearchParams")&&a.d(t,{useSearchParams:function(){return l.useSearchParams}})},37382:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,3792,23)),Promise.resolve().then(a.t.bind(a,52619,23)),Promise.resolve().then(a.bind(a,6563)),Promise.resolve().then(a.bind(a,4477)),Promise.resolve().then(a.bind(a,64384))},64384:(e,t,a)=>{"use strict";a.d(t,{default:()=>m});var l=a(95155),s=a(52619),r=a.n(s),n=a(20063),o=a(12115);function i(e){return!!e.sort&&"newest"!==e.sort}function c(e){let t=Array.isArray(e)?e:e?[e]:[],a=new Set;for(let e of t){let t=(null!=e?e:"").trim();t&&a.add(t)}return[...a].sort()}function u(e){var t,a;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={type:e.type,tags:null!=(t=e.tags)?t:[],themes:null!=(a=e.themes)?a:[],tagq:e.tagq,q:e.q,sort:i(e)?e.sort:void 0,cursor:void 0,...l},r=new URLSearchParams;for(let e of(s.type&&r.set("type",s.type),c(s.tags)))r.append("tag",e);for(let e of c(s.themes))r.append("theme",e);s.tagq&&r.set("tagq",s.tagq),s.q&&r.set("q",s.q),s.sort&&r.set("sort",s.sort),s.cursor&&r.set("cursor",s.cursor);let n=r.toString();return n?"/blog/?".concat(n):"/blog/"}let h=["Travel companions","Occasion & vibe","Destination type","Experiences","Travel style","Quick breaks","Other"];function m(e){let{types:t=[],selected:a=[],tagQuery:s="",view:m={},truncated:g=!1}=e,p=(0,n.useRouter)(),[f,b]=(0,o.useState)(!1);(0,o.useEffect)(()=>b(!0),[]);let[_,w]=(0,o.useState)(t),[y,v]=(0,o.useState)(s),[x,j]=(0,o.useState)(!1),[N,S]=(0,o.useState)(g);(0,o.useEffect)(()=>{w(t),S(g)},[t,g]),(0,o.useEffect)(()=>v(s),[s]);let q=(0,o.useRef)(0);(0,o.useEffect)(()=>{if(!f||y===s)return;let e=++q.current,t=setTimeout(async()=>{j(!0);try{let t=await fetch("/api/blog/types/?limit=".concat(d,"&q=").concat(encodeURIComponent(y.trim())),{headers:{Accept:"application/json"}}),a=t.ok?await t.json():null;if(e!==q.current)return;let l=Array.isArray(null==a?void 0:a.types)?a.types:[];w(l),S(l.length>=d)}catch(t){e===q.current&&S(!1)}finally{e===q.current&&j(!1)}},200);return()=>clearTimeout(t)},[y,s,f]);let P=(0,o.useMemo)(()=>new Set(c(a)),[a]),k=(0,o.useRef)(new Map);for(let e of _)k.current.set(e.code,e.label);for(let e of t)k.current.set(e.code,e.label);let E=(0,o.useMemo)(()=>{let e=new Map;for(let t of _)e.set(t.code,t);let t=[];for(let l of P)if(!e.has(l)){var a;t.push({code:l,label:null!=(a=k.current.get(l))?a:function(e){let t=String(e).replace(/_/g," ").trim();return t?t.charAt(0).toUpperCase()+t.slice(1):e}(l),published:null})}return[...t,..._]},[_,P]),C=(0,o.useCallback)((e,t)=>{let a=t?[...P,e]:[...P].filter(t=>t!==e);p.push(u({...m,themes:a,tagq:y},{type:void 0}),{scroll:!1})},[P,p,m,y]),R=P.size,[A,M]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),t=()=>M(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,l.jsxs)("details",{className:"tw-blog__raildisc",open:A||void 0,children:[(0,l.jsx)("summary",{className:"tw-blog__railsummary",children:(0,l.jsxs)("span",{className:"tw-blog__railsummarytext",children:["Filter by tag",R>0?(0,l.jsx)("span",{className:"tw-blog__railcount",children:R}):null]})}),(0,l.jsxs)("form",{className:"tw-blog__railform",method:"get",action:"/blog/",children:[m.q?(0,l.jsx)("input",{type:"hidden",name:"q",value:m.q}):null,i(m)?(0,l.jsx)("input",{type:"hidden",name:"sort",value:m.sort}):null,(0,l.jsxs)("div",{className:"tw-blog__railhead",children:[(0,l.jsx)("h2",{className:"tw-blog__railtitle",children:"Tags"}),R>0?(0,l.jsx)(r(),{className:"tw-blog__railclear",href:u({...m,themes:[],tagq:y},{type:void 0}),prefetch:!1,children:"Clear all"}):null]}),(0,l.jsx)("label",{className:"tw-sr-only",htmlFor:"blog-tag-search",children:"Search tags"}),(0,l.jsx)("input",{id:"blog-tag-search",className:"tw-blog__railsearch",type:"search",name:"tagq",value:y,onChange:e=>v(e.target.value),placeholder:"Search tags",maxLength:80,autoComplete:"off"}),(0,l.jsx)("div",{className:"tw-blog__railstatus","aria-live":"polite",children:x?"Searching…":0===E.length?"No tags match that.":null}),E.length>0?(function(e){let t=new Map;for(let a of e){let e=a.group||"Other";t.has(e)||t.set(e,[]),t.get(e).push(a)}return[...h.filter(e=>t.has(e)),...[...t.keys()].filter(e=>!h.includes(e)).sort()].map(e=>[e,t.get(e)])})(E).map(e=>
1{let[t,a]=e;return(0,l.jsxs)("section",{className:"tw-blog__railgroup",children:[(0,l.jsx)("h3",{className:"tw-blog__railgrouphead",children:t}),(0,l.jsx)("ul",{className:"tw-blog__raillist",children:a.map(e=>{let t=P.has(e.code);return(0,l.jsx)("li",{className:"tw-blog__railitem",children:(0,l.jsxs)("label",{className:"tw-blog__railoption",children:[(0,l.jsx)("input",{type:"checkbox",className:"tw-blog__railbox",name:"tag",value:e.code,checked:t,onChange:t=>C(e.code,t.target.checked)}),(0,l.jsx)("span",{className:"tw-blog__raillabel",children:e.label}),"number"==typeof e.published?(0,l.jsx)("span",{className:"tw-blog__railnum",children:e.published}):null]})},e.code)})})]},t)}):null,N?(0,l.jsxs)("p",{className:"tw-blog__railmore",children:["Showing the first ",d,". Search to narrow them."]}):null,(0,l.jsx)("button",{className:"tw-blog__railapply",type:"submit",hidden:f,children:"Apply filters"})]})]})}let d=50}},e=>{e.O(0,[95619,52266,72399,75563,19740,26286,4767,39210,16932,1213,81356,59313,42143,23298,89580,90721,56390,28441,43029,77358],()=>e(e.s=37382)),_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.