PageSourceSearch

https://toddlervacation.com/_next/static/chunks/4690-0bff02ccbd1d1ff5.js

js toddlervacation.com collected 2026-10-09 00:30:05 UTC 13,751 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4690],{21371:function(e,t,r){r.d(t,{FavoriteButton:function(){return c}});var n=r(57437),a=r(2265),o=r(88997),i=r(12381),s=r(93448),l=r(35592);function c(e){let{hotel:t,variant:r="default",size:c="md",className:u}=e,[d,f]=(0,a.useState)(!1),g=e=>{e.preventDefault(),e.stopPropagation();try{let e={...t,tripadvisor_rating:t.tripadvisor_rating||0},r=(0,l.mN)(e);f(r),window.dispatchEvent(new Event("favorites-changed"))}catch(e){console.error("Error handling favorites:",e)}};(0,a.useEffect)(()=>{try{let e=!!t.id&&(0,l.Dq)(t.id);f(e)}catch(e){console.error("Error checking favorites:",e)}},[t.id]);let m={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},h={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return"floating"===r?(0,n.jsx)(i.z,{onClick:g,size:"sm",variant:"secondary",className:(0,s.cn)("absolute top-3 right-3 z-10 rounded-full bg-white/90 backdrop-blur-sm hover:bg-white border-0 shadow-md",m[c],u),children:(0,n.jsx)(o.Z,{className:(0,s.cn)(h[c],d?"fill-red-500 text-red-500":"text-gray-600")})}):(0,n.jsx)(i.z,{onClick:g,variant:"outline",size:"md"===c?"default":"lg"===c?"lg":"sm",className:(0,s.cn)("rounded-full border-gray-300 hover:border-red-300",m[c],u),children:(0,n.jsx)(o.Z,{className:(0,s.cn)(h[c],d?"fill-red-500 text-red-500":"text-gray-600")})})}},14690:function(e,t,r){r.d(t,{HotelCard:function(){return h}});var n=r(57437),a=r(2265),o=r(33145),i=r(27648),s=r(83774),l=r(69174),c=r(79820),u=r(21371),d=r(82957).lW;function f(e){if(!e)return[];if(Array.isArray(e))return e.filter(e=>e&&"string"==typeof e&&g(e));if("string"==typeof e){let t=e.trim();if("[]"===t||"["===t||"]"===t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return e.filter(e=>e&&"string"==typeof e&&g(e))}catch(e){}if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(/[,;]/).map(e=>e.trim()).filter(e=>e&&g(e)):[]}if(t.includes(",")||t.includes(";"))return t.split(/[,;]/).map(e=>e.trim()).filter(e=>e&&g(e));if(g(t))return[t]}return[]}function g(e){if(!e||"string"!=typeof e)return!1;let t=e.trim();if(!t)return!1;try{let e=new URL(t);if("https:"!==e.protocol)return!1;let r=e.pathname.toLowerCase(),n=["images.trvl-media.com","trvl-media.com","darrehof.at","rastbichlhof.at","hotelstern.at","pirkers.bio","hausamwatt.de","duinrell.com","legoland.dk","sangulisalou.com","booking.com","agoda.com","expedia.com","hotels.com","unsplash.com","pexels.com","supabase.co","cloudflare.com","amazonaws.com","googleusercontent.com","imgur.com"].some(t=>e.hostname.includes(t)),a=[".jpg",".jpeg",".png",".webp",".gif",".bmp",".svg"].some(e=>r.includes(e)),o=e.search.includes("impolicy=")||e.search.includes("format=")||e.search.includes("resize")||e.search.includes("crop");return n||a||o}catch(e){return t.startsWith("https://")&&(t.includes(".jpg")||t.includes(".jpeg")||t.includes(".png")||t.includes(".webp")||t.includes(".gif"))}}var m=r(37941);function h(e){var t;let{hotel:r,loading:g="lazy"}=e,[h,p]=(0,a.useState)(!1),[x,v]=(0,a.useState)(0),[y,b]=(0,a.useState)(!0),[w,D]=(0,a.useState)(0),N=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{N.current&&clearTimeout(N.current)},[]);let j=(0,m.E1)(r.country)||"unknown",C=(0,m.E1)(r.region)||"unknown",E=r.slug||"",k="/hotels/".concat(j,"/").concat(C,"/").concat(E),_=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=function(e){let t=f(e);return t.length>0?t[0]:"/logo.png"}(e),a=f(e);return{src:n,alt:t,sizes:"(max-width: 640px) 100vw, (max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw",quality:75,loading:r?"eager":"lazy",placeholder:"blur",blurDataURL:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r='\n<svg width="'.concat(e,'" height="').concat(t,'" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n  <rect width="').concat(e,'" height="').concat(t,'" fill="#EFEAE0" />\n  <rect id="r" width="').concat(e,'" height="').concat(t,'" fill="#F5F0E6" />\n  <animate xlink:href="#r" attributeName="opacity" from="1" to="0.6" dur="2s" repeatCount="indef
1inite" />\n</svg>');return"data:image/svg+xml;base64,".concat(d.from(r).toString("base64"))}(),fallbackImages:a.slice(1),isExternal:!n.startsWith("/")}}(r.image_gallery,r.hotel_name,"eager"===g),F=(0,a.useCallback)(()=>{let e=f(r.image_gallery);return e.length>x&&!h?e[x]:"/logo.png"},[r.image_gallery,x,h])(),A="/logo.png"===F,S=r.vacation_type||"Hotel",z=S.charAt(0).toUpperCase()+S.slice(1),R=r.price,L=0,I=0===(t="number"==typeof R?R:parseFloat(String(R||"0").replace(/[^0-9.]/g,""))||0)?"Contact for pricing":t<100?"Under $100":t>=100&&t<200?"$100-200":t>=200&&t<300?"$200-300":t>=300?"$300+":"Contact for pricing";return(0,n.jsx)(i.default,{href:k,className:"block",children:(0,n.jsxs)(c.Zb,{className:"group overflow-hidden border-0 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-lg bg-white cursor-pointer h-full flex flex-col",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("div",{className:"relative h-32 w-full overflow-hidden rounded-t-lg bg-gray-100",children:[y&&!A&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gradient-to-br from-[#EADEA0] to-[#F3F4F6]",children:(0,n.jsx)("div",{className:"w-6 h-6 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"})}),(0,n.jsx)(o.default,{src:F,alt:function(e){let t=e.vacation_type?e.vacation_type.toLowerCase():"family";return"".concat(e.hotel_name," - Toddler-friendly ").concat(t," hotel in ").concat(e.city,", ").concat(e.country)}(r),fill:!0,loading:g,className:"transition-transform duration-300 group-hover:scale-105 ".concat(A?"object-contain bg-gradient-to-br from-[#EADEA0] to-[#F3F4F6] p-6":"object-cover"),sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",placeholder:"blur",blurDataURL:_.blurDataURL,onError:(0,a.useCallback)(()=>{console.log("Image load error for hotel: ".concat(r.hotel_name,", retry count: ").concat(w));let e=f(r.image_gallery);N.current&&clearTimeout(N.current),x+1<e.length&&w<3?N.current=setTimeout(()=>{v(e=>e+1),p(!1),D(e=>e+1)},200):(p(!0),b(!1))},[r.hotel_name,r.image_gallery,x,w]),onLoad:(0,a.useCallback)(()=>{b(!1),D(0)},[]),onLoadStart:(0,a.useCallback)(()=>{b(!0)},[])})]}),(0,n.jsx)("div",{className:"absolute top-2 left-2",children:(0,n.jsx)(l.C,{className:"".concat((e=>{let t=e.toLowerCase();return t.includes("beach")||t.includes("water")||t.includes("pool")?"bg-[#BDEAF3] text-gray-800":t.includes("nature")||t.includes("outdoor")||t.includes("mountain")||t.includes("countryside")?"bg-[#CDEABA] text-gray-800":t.includes("city")||t.includes("cultural")||t.includes("urban")?"bg-[#F59A8E] text-white":"bg-[#EADEA0] text-gray-800"})(S)," px-2 py-1 text-xs font-medium rounded-full border-0"),children:z})}),(0,n.jsx)("div",{className:"absolute top-2 right-2",onClick:e=>e.stopPropagation(),children:(0,n.jsx)(u.FavoriteButton,{hotel:r})})]}),(0,n.jsxs)(c.aY,{className:"p-3 flex flex-col flex-grow",children:[(0,n.jsx)("div",{className:"mb-2 h-10 flex items-start",children:(0,n.jsx)("h3",{className:"font-bold text-sm text-gray-900 leading-tight line-clamp-2",children:r.hotel_name})}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1 text-gray-600 flex-shrink min-w-0",children:[(0,n.jsx)(s.Z,{className:"h-3 w-3 flex-shrink-0"}),(0,n.jsx)("span",{className:"text-xs font-medium truncate",children:r.city}),"Portugal"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDF5\uD83C\uDDF9"}),"Spain"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDEA\uD83C\uDDF8"}),"Turkey"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDF9\uD83C\uDDF7"}),"Greece"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDEC\uD83C\uDDF7"}),"Italy"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDEE\uD83C\uDDF9"}),"France"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDEB\uD83C\uDDF7"}),"Croatia"===r.country&&(0,n.jsx)("span",{className:"text-sm",children:"\uD83C\uDDED\uD83C\uDDF7"})]}),(0,n.jsx)("div",{className:"w-px h-4 bg-gray-300 flex-shrink-0"}),(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,n.jsx)("span",{className:"text-sm font-bold text-gray-900",children:I}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"per night"})]})]}),(0,n.jsx)("div",{className:"mt-auto",children:(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-full px-3 py-2 text-sm font-semibold text-gray-800 bg-[#EADEA0] rounded-lg group-hover:bg-[#
1E5D99A] transition-colors duration-200",children:"View Details"})})]})]})})}},69174:function(e,t,r){r.d(t,{C:function(){return s}});var n=r(57437);r(2265);var a=r(90535),o=r(93448);let i=(0,a.j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s(e){let{className:t,variant:r,...a}=e;return(0,n.jsx)("div",{className:(0,o.cn)(i({variant:r}),t),...a})}},12381:function(e,t,r){r.d(t,{z:function(){return c}});var n=r(57437),a=r(2265),o=r(37053),i=r(90535),s=r(93448);let l=(0,i.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=a.forwardRef((e,t)=>{let{className:r,variant:a,size:i,asChild:c=!1,...u}=e,d=c?o.g7:"button";return(0,n.jsx)(d,{className:(0,s.cn)(l({variant:a,size:i,className:r})),ref:t,...u})});c.displayName="Button"},79820:function(e,t,r){r.d(t,{Ol:function(){return s},SZ:function(){return c},Zb:function(){return i},aY:function(){return u},ll:function(){return l}});var n=r(57437),a=r(2265),o=r(93448);let i=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("rounded-xl border bg-card text-card-foreground shadow",r),...a})});i.displayName="Card";let s=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",r),...a})});s.displayName="CardHeader";let l=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("font-semibold leading-none tracking-tight",r),...a})});l.displayName="CardTitle";let c=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",r),...a})});c.displayName="CardDescription";let u=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("p-6 pt-0",r),...a})});u.displayName="CardContent",a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("flex items-center p-6 pt-0",r),...a})}).displayName="CardFooter"},35592:function(e,t,r){r.d(t,{D:function(){return l},Dq:function(){return i},_l:function(){return a},_p:function(){return o},mN:function(){return s}});let n="toddler-vacation-favorites";function a(){try{let e=localStorage.getItem(n);return e?JSON.parse(e):[]}catch(e){return console.error("Error reading favorites from localStorage:",e),[]}}function o(e){try{let t=a(),r=t.findIndex(t=>t.id===e.id);if(-1===r){let r={id:e.id||"",hotel_name:e.hotel_name,country:e.country,region:e.region,city:e.city,slug:e.slug,price:e.price,image_gallery:e.image_gallery,tripadvisor_rating:e.tripadvisor_rating,vacation_type:e.vacation_type,favorited_at:"2024-01-01T00:00:00.000Z"};t.unshift(r),localStorage.setItem(n,JSON.stringify(t))}}catch(e){console.error("Error adding to favorites:",e)}}function i(e){try{return a().some(t=>t.id===e)}catch(e){return console.error("Error checking if hotel is favorite:",e),!1}}function s(e){let t=i(e.id||"");return t?function(e){try{let t=a().filter(t=>t.id!==e);localStorage.setItem(n,JSON.stringify(t))}catch(e){console.error("Error removing from favorites:",e)}}(e.id||""):o(e),!t}function l(){return a().length}},37941:function(e,t,r){r.d(t,{E1:function(){return n}});function n(e){return e?(function(e){try{return decodeURIComponent(e)}catch(t){return e}})(String(e)).toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/&|%26/g,"and").replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/(^-|-$)/g,""):""}},93448:function(e,t,r){r.d(t,{cn:function(){return o}});var n=r(61994),a=r(53335);function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m6)((0,n.W)(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.