PageSourceSearch

https://nordreskoyenhovedgard.no/_next/static/chunks/2596-b7e7107bcb0f3f1f.js

js nordreskoyenhovedgard.no collected 2026-10-08 16:56:09 UTC 9,968 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2f5251f4-e8ff-44cc-8900-4ede771f21a6",e._sentryDebugIdIdentifier="sentry-dbid-2f5251f4-e8ff-44cc-8900-4ede771f21a6")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2596],{72786:function(e,t,l){l.d(t,{i:function(){return a}});var s=l(31549),i=l(34602);function a(e){let{className:t,children:l}=e;return(0,s.jsx)("div",{className:(0,i.tw)("w-full","h-[1px]","bg-borderColor","my-4",t),children:l})}},42596:function(e,t,l){l.d(t,{I:function(){return V}});var s=l(31549),i=l(11797),a=l(7504),o=l(71419),n=l(11970),r=l(20974),d=l(49679),c=l(6082),u=l(71992),p=l.n(u),x=l(44194),m=l(26672),v=l(19860),f=l(34602),b=l(64700),w=l(46786),y=l(61216),h=l(66817),g=l(76480),N=l(98241),C=l(94108),j=l(46937),E=l(17144),I=l(35756),T=l(59114),A=l(37671),P=l(72786),O=l(25977),S=l(95228),F=l(52483),k=l(22752),L=l(65671),R=l(17116);function _(e){var t;let{bookingOptions:l,product:i,closeModal:o}=e,d=(0,k.useRouter)(),[c]=(0,j.a)(),{selectedLanguage:u}=(0,r.Z)(),p=(0,x.useMemo)(()=>{var e;return null!==(e=null==l?void 0:l.map(e=>({value:e,id:e.itemRelationsId.toString(),label:(0,v.F)(e.name,u),key:"bookingId-".concat(e.bookingId)})))&&void 0!==e?e:[]},[l,u]),[m,b]=(0,x.useState)(1),[w,y]=(0,F.A)(null===(t=p[0])||void 0===t?void 0:t.value),[h,g]=(0,x.useState)(null),N=(0,x.useMemo)(()=>null==l?void 0:l.find(e=>e.itemRelationsId===w.itemRelationsId),[w,l]),[C,_]=(0,x.useState)(null),U=p.length>0,D=async()=>{try{_(null),c||await (0,I.VC)();let e=Object.freeze({...N,name:(0,v.F)(N.name,u),quantity:m,type:i.type,totalPrice:i.price}),t=await (0,T.Ug)(i.id,e);if(!t.success)throw Error(t.message);await (0,E.JG)(S.Kb),o&&o(),d.push("/".concat(a.t.ORDER))}catch(e){_(e.message),console.error(e)}};if(!U)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Text,{className:(0,f.tw)("text-[12px]"),staticTextKey:"modal.BOOK_FIRST"}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(P.i,{}),(0,s.jsx)(A.zx,{className:"w-full",disabled:!0,cssType:"primary",label:"modal.INCLUDE"})]})]});let V=(null==N?void 0:N.productAvailability)<1;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:(0,f.tw)("flex","justify-between","align-center","mt-8"),children:[(0,s.jsx)(n.Text,{className:(0,f.tw)("mt-4 text-[14px]"),staticTextKey:"modal.QUANTITY"}),(0,s.jsx)(L.F,{quantity:m,setQuantity:b,minQuantity:1,maxQuantity:null==N?void 0:N.productAvailability,disabled:V,className:(0,f.tw)("!w-[160px]","h-[55px]","text-[14px]"),useNumberInput:!0,setQuantityError:g})]}),(0,s.jsx)(O.B,{message:h,isSecondary:!0,className:"w-full"}),(0,s.jsx)("div",{className:(0,f.tw)("flex","justify-between","align-center","my-3"),children:(0,s.jsx)(R.o,{value:w,onChange:y,options:p,id:"delivery-options",className:"min-w-[200px]",label:"modal.DELIVERY",valueKey:"itemRelationsId"})}),C||V&&(0,s.jsx)(O.B,{className:(0,f.tw)("my-1","w-full"),message:C||V&&"tools_page.NOT_AVAILABLE"}),(0,s.jsx)(A.zx,{className:(0,f.tw)("w-full"),onClick:D,cssType:"primary",label:"modal.INCLUDE",disabled:V})]})}var U=l(14403);function D(e){let{product:t,isOpen:l,onClose:i,accessoryClasses:a}=e,[o]=(0,j.a)(),{data:n}=(0,E.ZP)(o&&(0,g.Jz)(g.y$.getBookingOptions(t.id,t.type)),N.ZP);return l&&t?(0,s.jsx)(C.u,{classes:{card:(0,f.tw)("lg:w-full lg:max-w-[795px]")},onClose:i,children:(0,s.jsx)(U.l,{accessory:t,actions:(0,s.jsx)(_,{product:t,bookingOptions:n,closeModal:i}),accessoryClasses:a})}):null}function V(e){var t,l,u,C,j,I,T,A,P,O,S,L,R,_;let{product:U,currentLayout:V,cardType:M,productImageRatioClass:B,productImageClass:K="rounded-[5px]",index:z,showProductAvailability:G,openInNewTab:Z=!1}=e,Q=(0,d.r)("shop.products.priceForTotalPeriodEnabled"),J=(0,d.r)("shop.products.priceFinalInclAddOnsEnabled"),{selectedLanguage:Y}=(0,r.Z)(),{query:$}=(0,k.useRouter)(),{productCard:q}=(0,c.S)(),{availability:X,setProductOrder:H}=(0,h.e)(),[W,ee]=(0,x.useState)(!1),[et,el]=(0,F.A)(U.price),[es,ei]=(0,F.A)(U.priceExclVat),[ea,eo]=(0,x.useState)(void 0),[en,er]=(0,x.useState)(!1),[ed,ec]=(0,x.useState)(!1),eu=(0,x.useMemo)(()=>{let e=$.locations;return Array.isArray(e)?[...e].sort().join(","):"string"==typeof e&&""!==e.trim()?e:""},[$.locations]),ep=(0,v.m)(U,Y),ex=(0,d.r)("shop.products.firstAvailableDateEnabled"),{data:em}=(0,E.ZP)(ex&&U.isUnavailable&&(0,g.Jz)(g.y$.getProductNextAvailableDate(U.id,eu)),N.ZP);(0,x.useEffect)(()=>{er(U.isUnavailable&&ex)},[U.isUnavailable,ex]),(0,x.useEffect)(()=>
1{if(ex&&!0===U.isUnavailable&&em){let e;em.date&&(e=(0,m.u)(em.date)),H(e?10:20),eo(e),er(!1)}},[U.isUnavailable,em,H,ex]),(0,x.useEffect)(()=>{ec(G&&void 0===U.isUnavailable||en)},[G,U.isUnavailable,en]),(0,x.useEffect)(()=>{!J||(null==X?void 0:X.product)||(el(U.priceInclAddOns),ei(U.priceInclAddOnsExclVat)),Q&&(null==X?void 0:X.product)&&(J&&X.product.priceFinalInclAddOns?el(X.product.priceFinalInclAddOns):X.product.priceFinal&&el(X.product.priceFinal),J&&X.product.priceFinalInclAddOnsExclVat?ei(X.product.priceFinalInclAddOnsExclVat):X.product.priceFinalExclVat&&ei(X.product.priceFinalExclVat))},[X,U,Q,J,el,ei]);let ev="accessory"===U.sortType||"consumable"===U.sortType&&!U.salesProduct,ef=ev?"button":p(),{cardTypeClass:eb}=(0,b.S)(M,B)||{},ew=(0,x.useMemo)(()=>{var e,t;let l=V===i.j.LIST?(0,f.tw)("flex flex-row border-[2px] border-transparent hover:rounded-btnRound","group hover:border-primary","overflow-hidden",{"border-t-borderColor":z>0,"animate-pulse":ed},ev&&"w-full",null==q?void 0:null===(e=q.list)||void 0===e?void 0:e.containerClassName):(0,f.tw)("overflow-hidden","border-[1px] hover:border-primary","w-full relative","md:max-w-[348px] lg:max-w-[412px]",eb,{"animate-pulse":ed},null==q?void 0:null===(t=q.grid)||void 0===t?void 0:t.containerClassName);return ev?{onClick:()=>ee(!0),className:l,role:"button"}:{href:(U.salesProduct?a.t.getConsumable:a.t.getProduct)(U.id,U.slug),target:Z?"_blank":void 0,className:l,role:"a"}},[V,z,U.salesProduct,U.id,U.slug,null==q?void 0:null===(t=q.list)||void 0===t?void 0:t.containerClassName,null==q?void 0:null===(l=q.grid)||void 0===l?void 0:l.containerClassName,eb,ev,Z,ed]),ey=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return ea?(0,s.jsxs)("div",{className:(0,f.tw)("bg-calendarPartiallyAvailable text-whiteColor","h-fit py-1 px-2 w-fit md:text-[14px]",e?"text-[12px] md:ml-6 rounded-[4px]":"text-[14px] absolute top-4 right-0 rounded-l-[4px]"),children:[(0,s.jsx)(n.Text,{staticTextKey:"tools_page.AVAILABLE_FROM",className:"text-whiteColor",variant:"span",fallbackText:"Available from"}),(0,s.jsx)("span",{className:"ms-1",children:ea})]}):(U.isUnavailable||!ev&&U.productAvailability<1)&&(0,s.jsx)(n.Text,{staticTextKey:"tools_page.NOT_AVAILABLE",className:(0,f.tw)("bg-iconColor text-whiteColor h-fit py-1 px-2","rounded-l-[4px] w-fit absolute top-4 right-0","md:text-[14px]",e?"text-[12px]":"text-[14px]")})},eh=(0,f.tw)({"opacity-50":!ea&&(U.isUnavailable||!ev&&U.productAvailability<1)}),eg=U.perDay&&(U.subscriptionProduct||!Q||!(null==X?void 0:X.product)),eN=V===i.j.GRID?(0,s.jsx)(w.n,{product:U,cardType:M,unavailableTag:ey(!1),unavailableClass:eh,showOneProductOnXSMobile:!1}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:(0,f.tw)("my-auto p-3"),children:(0,s.jsxs)("div",{className:(0,f.tw)("h-[90px] w-[90px] relative overflow-hidden",{"border-[1px] border-borderColor":U.isUnavailable},B),children:[(0,s.jsx)(o.ImageRenderer,{imgPath:U.images[0].link,altText:U.images[0].heading,className:(0,f.tw)("cursor-pointer rounded object-contain mr-minor-section h-full w-full mx-auto",K,eh),sizes:"90px",width:90,height:90}),!ea&&ey()]})}),(0,s.jsxs)("div",{className:(0,f.tw)("flex flex-col text-left justify-center items-start	px-4 py-2.5 self-stretch","md:flex-row md:items-center md:px-6 md:py-6 w-full lg:gap-10",null==q?void 0:null===(C=q.textClasses)||void 0===C?void 0:null===(u=C.list)||void 0===u?void 0:u.textBoxClassName,eh),children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,s.jsx)("label",{className:(0,f.tw)("cursor-pointer text-[14px] md:text-[18px] font-medium md:ml-6",{"break-all":0>ep.indexOf(" ")||ep.indexOf(" ")>30},null==q?void 0:null===(I=q.textClasses)||void 0===I?void 0:null===(j=I.list)||void 0===j?void 0:j.productNameClassName),children:ep}),ea&&ey()]}),(0,s.jsx)("div",{className:(0,f.tw)("text-left sm:text-right sm:mr-4 relative w-full md:max-w-[200px] xl:max-w-none",null==q?void 0:null===(A=q.textClasses)||void 0===A?void 0:null===(T=A.list)||void 0===T?void 0:T.priceClassName),children:(0,s.jsx)(y.t,{price:U.subscriptionProduct?U.subscriptionMonthlyPrice:et,priceExlVat:U.subscriptionProduct?U.subscriptionMonthlyPriceExclVat:es,perDay:eg,customListPrice:U.customListPrice,className:(0,f.tw)("text-[18px] md:text-[20px] font-medium text-priceColor","block whitespace-nowrap overflow-hidden text-ellipsis",null==q?void 0:null===(O=q.textClasses)||void 0===O?void 0:null===(P=O.list)||void 0===P?void 0:P.priceClassName),containerClassName:(0,f.tw)("block mt-input sm:mt-0 whitespace-nowrap overflow-hidden text-ellipsis",null==q?void 0:null===(L=q.textClasses)||void 0===L?void 0:null===(S=L.list)||void 0===S?void 0:S.containerClassName),VATClassName:null==q?void 0:null===(_=q.textClasses)||void 0===_?void 0:null===(R=_.list)||void 0===R?void 0:R.VATClassName,isSubscription:U.subscriptionProduct})})]})]});return(0,s.jsxs)(s.Fragment,{children:[(0,x.createElement)(ef,ew,eN),ev&&W&&(0,s.jsx)(D,{product:U,isOpen:W,onClose:()=>ee(!1),accessoryClasses:null==q?void 0:q.accessoryClasses},"product-popup-".concat(U.id))]})}},11797:function(e,t,l){var s,i;l.d(t,{j:function(){return s}}),(i=s||(s={})).CAROUSEL="CAROUSEL",i.GRID="GRID",i.LIST="LIST",i.TEMPLATE_SETTINGS="TEMPLATE_SETTINGS"}}]);
2//# sourceMappingURL=2596-b7e7107bcb0f3f1f.js.map

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.