PageSourceSearch

https://firstcamp.se/_next/static/chunks/4226-b05cc7bf51e6b29c.js

js firstcamp.se collected 2026-09-24 09:58:48 UTC 16,811 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4226],{18843:(e,n,t)=>{"use strict";t.d(n,{Ay:()=>p,U2:()=>g});var a=t(37876),l=t(67994),s=t(53776),i=t(96427),r=t(79350);function o(){let e=(0,i._)(["\n  query queryArchiveCabins(\n    $where: RootQueryToCabinConnectionWhereArgs = {}\n    $imageSize: MediaItemSizeEnum = LARGE\n    $first: Int!\n  ) {\n    cabins(where: $where, first: $first) {\n      edges {\n        node {\n          id\n          databaseId\n          slug\n          title\n          excerpt\n          featuredImage {\n            node {\n              altText\n              sourceUrl(size: $imageSize)\n            }\n          }\n          acfCabin {\n            campaign\n            cabinPriceMin\n            cabinPriceMax\n            cabinObjectId\n            cabinAccommodation\n            cabinLivingspace\n            cabinRooms\n            cabinBeds\n            ctaListing {\n              ctaListingText\n              ctaListingBgColor\n            }\n          }\n          destination {\n            edges {\n              node {\n                slug\n                databaseId\n                title\n                acfDestination {\n                  destinationSiteId\n                }\n                destinationTypes {\n                  edges {\n                    node {\n                      databaseId\n                      name\n                    }\n                  }\n                }\n              }\n            }\n          }\n          destSortType\n          amenities {\n            edges {\n              node {\n                slug\n                name\n                databaseId\n              }\n            }\n          }\n        }\n      }\n      pageInfo {\n        hasNextPage\n        offsetPagination {\n          total\n        }\n      }\n    }\n  }\n"]);return o=function(){return e},e}let c=(0,r.J1)(o());var d=t(89099),u=t(14232),h=t(75072);function m(){let e=(0,i._)(["\n  query queryCabinDestinationIds($where: RootQueryToCabinConnectionWhereArgs = {}) {\n    cabins(where: $where, first: 200) {\n      pageInfo {\n        hasNextPage\n        offsetPagination {\n          total\n        }\n      }\n      edges {\n        node {\n          acfCabin {\n            parentDestinationId\n          }\n        }\n      }\n    }\n  }\n"]);return m=function(){return e},e}let v=(0,r.J1)(m()),f=(0,u.createContext)(void 0);function g(){let e=(0,u.useContext)(f);if(void 0===e)throw Error("useFilter must be used within a FilterCabinProvider");return e}function p(e){var n;let{children:t,destinations:i,sortOrder:r}=e,o=(0,d.useRouter)(),m=null==(n=o.locale)?void 0:n.toUpperCase(),{query:g}=o,{cr:p,cb:x,clmin:b,clmax:w,page:y,d:j,am:N,dt:A,ar:C,act:k,av:E,cl:L,dty:I,ds:R}=g,M=(0,l.m)(),[T,P]=(0,u.useState)([]),[_,S]=(0,u.useState)(),[Q,U]=(0,u.useState)(!0),[B,D]=(0,u.useState)([]),F=(0,u.useMemo)(()=>!!(p||x||b||w||N||A||C||k||E||L||I||R||j),[p,x,b,w,N,A,C,k,E,L,I,R,j]),O=(0,u.useCallback)(async e=>{let n=new Set,t=0,a=!0,l=0;for(;a&&l<5;){var s,i,r,o,c,d,u;let h=await M.query({query:v,variables:{where:{...e,offsetPagination:{offset:t,size:100}}}});(null!=(d=null==h||null==(i=h.data)||null==(s=i.cabins)?void 0:s.edges)?d:[]).forEach(e=>{var t,a;if(null==e||null==(a=e.node)||null==(t=a.acfCabin)?void 0:t.parentDestinationId){let t=Number(e.node.acfCabin.parentDestinationId);isNaN(t)||n.add(t)}}),a=null!=(u=null==h||null==(c=h.data)||null==(o=c.cabins)||null==(r=o.pageInfo)?void 0:r.hasNextPage)&&u,l++,a&&l<5&&(t+=100)}return n},[M]),q=(0,u.useCallback)(()=>{if(!o.isReady)return;U(!0);let e={where:{language:null==m?void 0:m.toUpperCase(),offsetPagination:{offset:0,size:s.nn},metaQuery:{relation:"AND",metaArray:[]}}};y&&(e.where.offsetPagination.offset=(0,s.PI)(Number(y)));let n=i.filter(e=>!e.node.slug.includes("okno")).map(e=>e.node.databaseId),t=Array.isArray(j)?j.flatMap(e=>String(e).split(",").map(e=>Number(e))):j?String(j).split(",").map(e=>Number(e)):[],a=t.length>0?n.filter(e=>t.includes(e)):n;if(0===a.length){P([]),S({offsetPagination:{total:0}}),D([]),U(!1);return}if(e.where.metaQuery.metaArray.push({compare:"IN",key:"destination_id",type:"NUMERIC",value:a.join(",")}),N&&(e.where.taxQuery={relation:"AND",taxArray:[{taxonomy:"AMENITY",terms:Array.isArray(N)?N:[N],operator:"AN
1D",includeChildren:!1}]}),x){let n=Array.isArray(x)?x.includes("5"):"5"===x;e.where.metaQuery.metaArray.push({compare:n?"GREATER_THAN_OR_EQUAL_TO":"IN",key:"cabin_beds_int",type:"NUMERIC",value:Array.isArray(x)?x.map(e=>e).join(","):x})}if(p){let n=Array.isArray(p)?p.includes("5"):"5"===p;e.where.metaQuery.metaArray.push({compare:n?"GREATER_THAN_OR_EQUAL_TO":"IN",key:"cabin_rooms",type:"NUMERIC",value:Array.isArray(p)?p.map(e=>e).join(","):p})}b&&w&&e.where.metaQuery.metaArray.push({compare:"BETWEEN",key:"cabin_livingspace",type:"NUMERIC",value:"".concat(b,",").concat(w)}),r&&(e.where.orderby=(0,h.n)(r)),Promise.all([M.query({query:c,variables:{where:{language:null==m?void 0:m.toUpperCase()},...e,imageSize:"LARGE",first:36}}),F?O({language:null==m?void 0:m.toUpperCase(),metaQuery:e.where.metaQuery,taxQuery:e.where.taxQuery}):Promise.resolve(new Set)]).then(e=>{var n,t,a,l,s;let[r,o]=e,c=null!=(s=null==r||null==(t=r.data)||null==(n=t.cabins)?void 0:n.edges)?s:[],d=null==r||null==(l=r.data)||null==(a=l.cabins)?void 0:a.pageInfo;P(c),S(d);let u=i.filter(e=>o.has(e.node.databaseId));D(F?u:i),U(!1)}).catch(()=>U(!1))},[o.isReady,m,y,i,j,x,p,b,w,N,M,k,I,E,L,A,C,F,O,r]);(0,u.useEffect)(()=>{q()},[q]);let z=(0,u.useMemo)(()=>({fetchCabins:q,cabins:T,pagination:_,loading:Q,filteredDestinations:i,allCabinDestination:B}),[q,T,Q,i,_,B]);return(0,a.jsx)(f.Provider,{value:z,children:t})}},24465:(e,n,t)=>{"use strict";t.d(n,{A:()=>r});var a=t(37876);t(14232);var l=t(89368),s=t(89099),i=t(53776);function r(e){var n,t;let{count:r,total:o,title:c=null}=e;(0,l.useTranslations)("Filter");let d=(0,s.useRouter)(),u=(null==d||null==(n=d.query)?void 0:n.page)?parseInt(null==d||null==(t=d.query
1)?void 0:t.page):1,h=(0,i.nE)(u,o);return(0,a.jsxs)("div",{className:"w-full py-5",children:[c&&(0,a.jsx)("h1",{className:"mb-2 text-2xl font-semibold sm:text-3xl",children:c}),(0,a.jsx)("p",{className:"text-base",children:"Visar ".concat(h.start," - ").concat(h.end," av ").concat(h.total)})]})}},39047:(e,n,t)=>{"use strict";t.d(n,{A:()=>d});var a=t(37876),l=t(14232),s=t(62443),i=t.n(s),r=t(792),o=t(28497),c=t(80589);function d(e){let{id:n,label:t,openedFilter:s,amenities:d,selectedAmenities:u,onClose:h,resetSelection:m,switchOpeningFilter:v,onAddToList:f,onRemoveFromList:g}=e,p=(0,l.useRef)(null),x=(null==u?void 0:u.length)>0?"".concat(t," \xb7 ").concat(null==u?void 0:u.length):t,b=s===n;return(0,l.useEffect)(()=>{let e=e=>{"Escape"===e.key&&b&&h(n)};return b&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[b,h,n]),(0,a.jsxs)("div",{className:"relative block xl:inline-block",children:[(0,a.jsxs)(r.A,{label:x,id:n,isOpen:b,switchOpeningFilter:v,ariaControls:"".concat(n,"-panel"),children:[" ",(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation",focusable:"false",className:"mr-1 text-red-600",children:[(0,a.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M1.917 13.833 12 3.75l10.083 10.083"}),(0,a.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.022 10.737V20.82h13.965V10.737M12 20.82v-6.21"})]})]}),b&&(0,a.jsxs)("div",{ref:p,id:"".concat(n,"-panel"),role:"region","aria-labelledby":"".concat(n,"-button"),className:i().filter,children:[(0,a.jsx)("div",{className:"flex max-h-96 flex-col gap-y-1 overflow-y-auto p-5 sm:p-6",children:d.edges.filter(e=>e.node.acfAmenities.showInFilter).map(e=>(0,a.jsx)(c.A,{filter:n,selectedIds:u,onAddToList:f,onRemoveFromList:g,id:e.node.databaseId,title:e.node.name},e.node.databaseId))}),(0,a.jsx)(o.A,{id:n,onClose:h,resetSelection:m,switchOpeningFilter:v,filterSelected:(null==u?void 0:u.length)>0})]})]})}},52958:(e,n,t)=>{"use strict";t.d(n,{A:()=>d});var a=t(37876),l=t(17218),s=t(68638),i=t(37441),r=t(14232);let o=r.forwardRef(function(e,n){let{title:t,titleId:a,...l}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},l),t?r.createElement("title",{id:a},t):null,r.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))});var c=t(89368);function d(e){let{sortBy:n="",setSortBy:t}=e,d=(0,c.useTranslations)("Destination.Cabins"),u=[{value:"default",label:d("Default")},{value:"price-asc",label:d("PriceAscending")},{value:"price-desc",label:d("PriceDescending")}],h=u.find(e=>e.value===n)||u[0];return(0,a.jsx)(l.WF,{value:n,onChange:t,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"hidden md:block",children:[d("Sortera"),":"]}),(0,a.jsxs)(l.go,{className:"relative w-full cursor-default rounded-lg border border-gray-300 bg-white py-2 pl-3 pr-9 text-left focus:outline-none  focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300 sm:text-sm md:min-w-[150px]",children:[(0,a.jsx)("span",{className:"block truncate ",children:h.label}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:(0,a.jsx)(i.A,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]})]}),(0,a.jsx)(s.e,{as:r.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(l.wh,{className:"absolute z-[11] mt-1 max-h-60 w-full overflow-auto rounded-md border border-gray-300 bg-white py-1 text-base shadow-lg  ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:u.map(e=>(0,a.jsx)(l.h7,{className:e=>{let{focus:n}=e;return"relative cursor-default select-none py-2 pl-10 pr-4 ".concat(n?"bg-red-100 text-red-900":"text-gray-900")},value:e.value,children:n=>{let{selected:t}=n;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"block truncate ".concat(t?"font-medium":"font-normal"),children:e.label}),t?(0,a.jsx)("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-red-600",children:(0,a.jsx)(o,{className:"h-5 w-5","aria-hidden":"true"})}):null]})}},e.value))})})]})})}},53776:(e,n,t)=>{"use strict";t.d(n,{PI:()=>s,eG:()=>r,ht:()=>a,nE:()=>i,nn:()=>l,ut:()=>o});let a=36,l=36,s=e=>{let n=Number(e);return 1===n?0:a+(n-2)*l},i=(e,n)=>1===e?{start:n>=1?1:n,end:n>a?a:n,total:n}
1:{start:0!==n?a*e-(a-1):n,end:a*e>n?n:a*e,total:n},r=()=>{window.scrollTo({top:0,behavior:"smooth"})},o=(e,n)=>{let t=[],a=0;return!n&&1>=n||(0<e-2&&t.push(e-2),0<e-1&&t.push(e-1),t.push(e),n>=e+1&&t.push(e+1),n>=e+2&&t.push(e+2),1<t[0]-1&&(t.unshift("..."),a+=1),2<n-t[t.length-(2-a)]&&t.push("..."),-1===t.indexOf(1)&&t.unshift(1),-1===t.indexOf(n)&&t.push(n)),t}},62443:e=>{e.exports={filter:"Availabilities_filter__rpHky"}},91050:(e,n,t)=>{"use strict";t.d(n,{A:()=>p});var a=t(37876),l=t(14232),s=t(48230),i=t.n(s),r=t(54587),o=t.n(r),c=t(89368),d=t(15039),u=t.n(d),h=t(46872),m=t(97373),v=t(49948),f=t(45162),g=t(89099);let p=l.memo(e=>{var n,t,s,r;let{slug:d,title:p,excerpt:x,details:b,featuredImage:w,destination:y}=e,j=(0,c.useTranslations)("Destination.Cabins"),{getRoute:N}=(0,h.fi)(),{locale:A}=(0,g.useRouter)(),[C]=(0,v.lT)(["fcLanguageCurrency"]),{currency:k}=(0,f.f)(A||""),E=(null==C?void 0:C.fcLanguageCurrency)&&(null==C?void 0:C.fcLanguageCurrency)!=="null"?null==C?void 0:C.fcLanguageCurrency:k,[L,I]=(0,l.useState)(!0),R="".concat(N("destinationer"),"/").concat(null==y||null==(n=y.node)?void 0:n.slug,"/").concat(N("stugor"));return(0,a.jsx)("div",{className:"group col-auto",children:(0,a.jsxs)("div",{className:"group text-sm",children:[(0,a.jsxs)(i(),{href:"".concat(R,"/").concat(d),className:"relative",prefetch:!1,children:[(()=>{var e,n,t,l;switch(null==y||null==(l=y.node)||null==(t=l.destinationTypes)||null==(n=t.edges[0])||null==(e=n.node)?void 0:e.name){case"Easy":return(0,a.jsx)("img",{alt:"Easy",className:"absolute left-3 top-3 z-10 w-[30vw] md:w-[18vw] lg:w-[6vw]",src:"/images/Easy.svg"});case"Resort":return(0,a.jsx)("img",{className:"absolute left-3 top-3 z-10 w-[30vw] md:w-[18vw] lg:w-[6vw]",alt:"Resort",src:"/images/Resort.svg"});default:return null}})(),(null==b?void 0:b.ctaListing.ctaListingText)&&(0,a.jsx)(m.A,{text:null==b?void 0:b.ctaListing.ctaListingText,bgColor:null==b?void 0:b.ctaListing.ctaListingBgColor}),(0,a.jsx)("div",{className:"aspect-h-2 aspect-w-3 mb-3 w-full overflow-hidden rounded-lg bg-gray-100 group-hover:opacity-75",children:(null==w||null==(t=w.node)?void 0:t.sourceUrl)&&(0,a.jsx)(o(),{width:"292",height:"195",src:w.node.sourceUrl,alt:w.node.altText,className:u()("h-full w-full object-cover object-center duration-700 ease-in-out group-hover:opacity-75",L?"scale-110 blur-2xl":"scale-100 blur-0"),onLoad:()=>I(!1)})})]}),(0,a.jsx)(i(),{href:"".concat(R,"/").concat(d),prefetch:!1,children:(0,a.jsx)("h3",{className:"text-lg",children:p})}),(0,a.jsx)(i(),{href:"".concat(N("destinationer"),"/").concat(null==y||null==(s=y.node)?void 0:s.slug),className:"underline",children:(0,a.jsx)("h4",{className:"text-sm",children:(null==y||null==(r=y.node)?void 0:r.title)||""})}),x&&(0,a.jsx)("div",{className:"line-clamp-2 min-h-10 text-sm",dangerouslySetInnerHTML:{__html:x}}),(0,a.jsxs)("div",{className:"mt-3 flex w-full justify-items-start space-x-3 text-sm",children:[(null==b?void 0:b.cabinLivingspace)&&(0,a.jsxs)("div",{className:"inline-flex text-neutral-900",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 15",width:"17",height:"15",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M16.233 9.161a.694.694 0 0 1-.492-.2L8.462 1.682 1.186 8.957a.7.7 0 0 1-.984 0 .7.7 0 0 1 0-.984L7.973.203a.7.7 0 0 1 .984 0l7.771 7.77a.7.7 0 0 1 0 .984.7.7 0 0 1-.495.204Z"}),(0,a.jsx)("path",{d:"M13.841 14.541H3.082a.7.7 0 0 1-.7-.7v-7.77a.7.7 0 1 1 1.4 0v7.074h9.36V6.07a.7.7 0 0 1 1.4 0v7.771a.7.7 0 0 1-.7.7Z"}),(0,a.jsx)("path",{d:"M8.462 14.538a.7.7 0 0 1-.7-.7V9.056a.7.7 0 1 1 1.4 0v4.782a.7.7 0 0 1-.7.7Z"})]})}),(0,a.jsxs)("span",{className:"ml-1",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[b.cabinLivingspace,j("SquareMeter")]})," ",j("Area")]})]}),(null==b?void 0:b.cabinBeds)&&(0,a.jsxs)("div",{className:"inline-flex text-neutral-900",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 15",width:"13",height:"15",children:(0,a.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",transform:"translate(.745 .748)",children:[(0,a.jsx)("rect",{width:"10.613",height:"12.544",rx:"1.51"}),(0,a.jsx)("path",{d:"M7.726 0v2.9h-4.83V0M0 5.306h10.613"})]})}),(0,a.jsxs)("span",{className:"ml-1",children:[(0,a.jsx)("span",{className:"font-semibold",children:b.cabinBeds})," ",j("Beds")]})]}),(null==b?void 0:b.cabinRooms)&&(0,a.jsxs)("div",{className:"inline-flex text-neutral-900",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 15",width:"11",height:"15",children:(0,a.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M.745.748h8.848v12.776H.745zm5.408 6.88h.984"})}),(0,a.jsxs)("span",{className:"ml-1",children:[(0,a.jsx)("span",{className:"font-semibold",children:b.cabinRooms})," ",j("Room")]})]})]}),(null==b?void 0:b.cabinPriceMin)&&(null==b?void 0:b.cabinPriceMin)!=="0"&&Number(null==b?void 0:b.cabinPriceMin)>0&&(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("div",{className:"w-full text-end font-bold",children:(0,a.jsx)("span",{className:"text-black",children:j("FromPrice",{price:"".concat(null==b?void 0:b.cabinPriceMin," ").concat(E)})})})})]})})})},95912:(e,n,t)=>{"use strict";t.d(n,{A:()=>l});var a=t(14232);let l=a.forwardRef(function(e,n){let{title:t,titleId:l,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},s),t?a.createElement("title",{id:l},t):null,a.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))})}}]);

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.