1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f4e086c8-1353-40c1-9b07-a7f386832aa1",e._sentryDebugIdIdentifier="sentry-dbid-f4e086c8-1353-40c1-9b07-a7f386832aa1")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1764],{44250:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/minside/old.klippekort",function(){return t(92e3)}])},4970:function(e,n,t){"use strict";var r=t(52322),i=t(38035),o=t(77533),l=t(28535);t(2784);var a=t(73337),s=t(66825);n.Z=e=>{let{feature:{current_balance:n=0,max_balance:t=0,name:d=""}}=e,c=n>0;return(0,r.jsx)(i.k,{backgroundColor:c&&"blue.900",alignItems:"center",justifyContent:"space-between",borderRadius:"22px",border:!c&&"1px",borderColor:!c&&"gray.300",mb:6,whiteSpace:"normal",children:(0,r.jsxs)(a.Z,{my:6,maxWidth:"100%",width:"100%",children:[(0,r.jsxs)(s.Z,{colSpan:[12,12],alignSelf:"start",textAlign:["center"],children:[(0,r.jsx)(o.x,{fontWeight:"bold",fontSize:["2xl","2xl","3xl"],color:c?"white":"gray.900",fontFamily:"body",children:d}),(0,r.jsx)(o.x,{fontSize:"sm",color:c?"white":"gray.900",mt:2,children:"Gjelder alle spisesteder. Tilbudet registreres automatisk n\xe5r du scanner QR koden i kassa."})]}),(0,r.jsx)(s.Z,{colSpan:[12,12],mt:[8,8,0],children:(0,r.jsx)(i.k,{flexDirection:"column",textAlign:["center"],children:(0,r.jsx)(l.xu,{children:c&&(0,r.jsxs)(l.xu,{children:[(0,r.jsx)(o.x,{lineHeight:[1,1,2],fontWeight:"bold",fontFamily:"body",color:"blue.200",as:"span",fontSize:["5xl","5xl","4xl"],children:n}),(0,r.jsxs)(o.x,{lineHeight:[1,1,2],fontWeight:"bold",fontFamily:"body",as:"span",color:"blue.500",fontSize:["5xl","5xl","4xl"],children:["/",t]}),(0,r.jsx)(o.x,{lineHeight:[2],fontWeight:"bold",fontFamily:"body",as:"span",color:"blue.500",fontSize:["xl","xl","2xl"],ml:2,children:"klipp"})]})})})})]})},d)}},92e3:function(e,n,t){"use strict";t.r(n),t.d(n,{JOIN_LOYALTY_PROGRAM:function(){return R},__N_SSG:function(){return P},default:function(){return F}});var r=t(52322),i=t(28535),o=t(81540),l=t(47443),a=t(80877),s=t(74444),d=t(19563),c=t(60228),u=t(73337),f=t(66825),x=t(41476),v=t(44574),m=t(15469),p=t(92390),h=t(5632),g=t(2784),y=t(90437),b=t(85545),j=t(89357),k=t(16948),S=t(4970),_=t(38035),w=t(77533),Z=t(62614),E=t(64188),I=t(51286),N=e=>{var n,t,i;let{token:o}=e,{data:l}=(0,I.ZP)("\n query getUser {\n loyaltyPrograms {\n id\n name\n slug\n customer {\n webshop_token\n }\n }\n }\n",{revalidateOnFocus:!0});return(0,r.jsx)(_.k,{alignItems:"center",justifyContent:"space-between",borderRadius:"lg",border:"1px",borderColor:"gray.300",mb:6,children:(0,r.jsxs)(u.Z,{my:12,maxWidth:"100%",width:"100%",children:[(0,r.jsxs)(f.Z,{colSpan:[12,12,6,4],alignSelf:"start",textAlign:["center","center","left"],children:[(0,r.jsx)(w.x,{fontWeight:"bold",fontSize:["lg","xl"],color:"gray.900",fontFamily:"body",children:"Spar penger med klippekort"}),(0,r.jsx)(w.x,{fontSize:"sm",color:"gray.900",mt:2,children:"Kj\xf8per du klippekort f\xe5r du varen litt billigere. Kj\xf8p ditt klippekort i dag."})]}),(0,r.jsx)(f.Z,{colSpan:[12,12,6,4],colStart:[1,1,7,9],mt:[8,8,0],children:(0,r.jsx)(_.k,{textAlign:"right",justifyContent:["center","center","flex-end"],children:(null==l?void 0:l.loyaltyPrograms)&&(0,r.jsx)(Z.z,{as:"a",leftIcon:(0,r.jsx)(E.wpV,{}),color:"blue.900",colorScheme:"blue",backgroundColor:"blue.400",fontSize:"sm",href:"https://nas.rshosting.no?authToken=".concat(null==l?void 0:null===(i=l.loyaltyPrograms)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:null===(n=t.customer)||void 0===n?void 0:n.webshop_token),target:"_blank",rel:"noopener noreferrer",children:"Kj\xf8p klippekort"})})})]})})},C=t(32690),P=!0;let R="\n mutation joinLoyaltyProgram($id: ID!) {\n joinLoyaltyProgram(id: $id) {\n id\n }\n }\n";var F=e=>{var n,t,_,w,Z,E,I,P,F,$,D;let[L,M]=(0,g.useState)(!0),O=(0,h.useRouter)(),{fetcher:T}=(0,y.Uh)(),{data:z,error:W,mutate:A}=(0,v.Z)();(0,g.useEffect)(()=>{var e,n;if(W||(null==z?void 0:null===(e=z.loyaltyPrograms)||void 0===e?void 0:e.find(e=>e.customer))){M(!1);return}null==z||null===(n=z.loyaltyPrograms)||void 0===n||n.map(e=>{if(!e.customer){var n;return(null==z?void 0:null===(n=z.services)||void 0===n?void 0:n.find(e=>e.type===(0,j.B)(b.Z.Services.FoodAndBeverage)&&!e.consent))?null:G(e)}})},[z]);let G=async e=>{try{await T.request(R,{id:e.id}),await A(!0),M(!1),O.push("/minside/fordeler?onboarding=1","/minside/fordeler?onboarding=1",{shallow:!0})}catch(e){M(!1),console.error(e)}};return(0,r.jsx)(d.Z,{children:(0,r.jsxs)(p.Z,{title:"".concat(m.Z.myPrepaid," â ").concat(m.Z.myPage),footerMenu:null===(n=e.data)||void 0===n?void 0:n.footerMenu,mainMenu:null===(t=e.data)||void 0===t?void 0:t.mainMenu,contactInfo:null===(_=e.data)||void 0===_?void 0:_.contactInfo,children:[(0,r.jsx)(C.Z,{currentPage:m.Z.prepaid}),(0,r.jsxs)(i.xu,{backgroundColor:"white",mb:[4,8,12],children:[(0,r.jsx)(u.Z,{maxWidth:"full",children:(0,r.jsxs)(f.Z,{colStart:1,colSpan:12,mt:[4,8,12],children:[(0,r.jsx)(x.Z,{}),(0,r.jsx)(k.Z,{})]})}),(0,r.jsx)(c.Z,{service:b.Z.Services.FoodAndBeverage,children:(0,r.jsx)(u.Z,{mt:[4,8,12],mb:[4,8,12],maxWidth:["full","3xl"],children:(0,r.jsxs)(f.Z,{colSpan:12,children:[L?(0,r.jsx)(o.$,{}):null==z?void 0:null===(w=z.loyaltyPrograms)||void 0===w?void 0:w.map(e=>{var n,t;return(0,r.jsx)(i.xu,{children:null===(t=e.customer)||void 0===t?void 0:null===(n=t.features)||void 0===n?void 0:n.filter(e=>e.current_balance>1).map(e=>{if("Prepaid"===e.type)return(0,r.jsx)(S.Z,{feature:e},e.name)})},e.id)}),(null==z?void 0:null===(I=z.loyaltyPrograms)||void 0===I?void 0:null===(E=I[0])||void 0===E?void 0:null===(Z=E.customer)||void 0===Z?void 0:Z.webshop_token)&&(0,r.jsx)(N,{token:null==z?void 0:null===($=z.loyaltyPrograms)||void 0===$?void 0:null===(F=$[0])||void 0===F?void 0:null===(P=F.customer)||void 0===P?void 0:P.webshop_token}),z&&!(null==z?void 0:null===(D=z.loyaltyPrograms)||void 0===D?void 0:D.length)&&(0,r.jsxs)(l.b,{status:"info",flexDirection:"column",alignItems:"start",children:[(0,r.jsx)(a.C,{children:m.Z.noLoyaltyCard}),(0,r.jsx)(s.X,{children:m.Z.weFoundNoLoyaltyCard})]}),W&&(0,r.jsx)(l.b,{status:"error",flexDirection:"column",alignItems:"start",children:(0,r.jsx)(s.X,{children:W.toString()})})]})})})]})]})})}},80169:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(2784),i={};function o(e,n){if(void 0===n&&(n=void 0!==t.g&&t.g.localStorage?t.g.localStorage:"undefined"!=typeof globalThis&&globalThis.localStorage?globalThis.localStorage:"undefined"!=typeof window&&window.localStorage?window.localStorage:"undefined"!=typeof localStorage?localStorage:null),n){var o,l=(o=n,{get:function(e,n){var t=o.getItem(e);return null==t?"function"==typeof n?n():n:JSON.parse(t)},set:function(e,n){o.setItem(e,JSON.stringify(n))}});return function(n){var o,a,s,d,c,u,f,x,v,m,p,h,g,y,b;return o=l.get,a=l.set,s=(0,r.useRef)(null),c=(d=(0,r.useState)(function(){return o(e,n)}))[0],u=d[1],f="storage",x=function(n){if(n.key===e){var t=JSON.parse(n.newValue);c!==t&&u(t)}},void 0===v&&(v=t.g),void 0===m&&(m={}),p=(0,r.useRef)(),h=m.capture,g=m.passive,y=m.once,(0,r.useEffect)(function(){p.current=x},[x]),(0,r.useEffect)(function(){if(v&&v.addEventListener){var e=function(e){return p.current(e)},n={capture:h,passive:g,once:y};return v.addEventListener(f,e,n),function(){v.removeEventListener(f,e,n)}}},[f,v,h,g,y]),(0,r.useEffect)(function(){return s.current=(i[e]||(i[e]={callbacks:[],value:n}),i[e].callbacks.push(u),{deregister:function(){var n=i[e].callbacks,t=n.indexOf(u);t>-1&&n.splice(t,1)},emit:function(n){i[e].value!==n&&(i[e].value=n,i[e].callbacks.forEach(function(e){u!==e&&e(n)}))}}),function(){s.current.deregister()}},[n,e]),b=(0,r.useCallback)(function(n){var t="function"==typeof n?n(c):n;a(e,t),u(t),s.current.emit(n)},[c,a,e]),[c,b]}}return r.useState}},55199:function(e,n,t){"use strict";t.d(n,{h:function(){return g}});var r=t(94496),i=t(41914),o=t(31053),l=t(16634),a=t(72245),s=t(2784),d=t(52322),c={initial:"initial",animate:"enter",exit:"exit",variants:{initial:({offsetX:e,offsetY:n,transition:t,transitionEnd:r,delay:o})=>{var l;return{opacity:0,x:e,y:n,transition:null!=(l=null==t?void 0:t.exit)?l:i.p$.exit(i.Sh.exit,o),transitionEnd:null==r?void 0:r.exit}},enter:({transition:e,transitionEnd:n,delay:t})=>{var r;return{opacity:1,x:0,y:0,transition:null!=(r=null==e?void 0:e.enter)?r:i.p$.enter(i.Sh.enter,t),transitionEnd:null==n?void 0:n.enter}},exit:({offsetY:e,offsetX:n,transition:t,transitionEnd:r,reverse:o,delay:l})=>{var a;let s={x:n,y:e};return{opacity:0,transition:null!=(a=null==t?void 0:t.exit)?a:i.p$.exit(i.Sh.exit,l),...o?{...s,transitionEnd:null==r?void 0:r.exit}:{transitionEnd:{...s,...null==r?void 0:r.exit}}}}}};(0,s.forwardRef)(function(e,n){let{unmountOnExit:t,in:r,reverse:i=!0,className:s,offsetX:u=0,offsetY:f=8,transition:x,transitionEnd:v,delay:m,...p}=e,h=!t||r&&t,g=r||t?"enter":"exit",y={offsetX:u,offsetY:f,reverse:i,transition:x,transitionEnd:v,delay:m};return(0,d.jsx)(l.M,{custom:y,children:h&&(0,d.jsx)(a.E.div,{ref:n,className:(0,o.cx
1)("chakra-offset-slide",s),custom:y,...c,animate:g,...p})})}).displayName="SlideFade";var u={initial:"exit",animate:"enter",exit:"exit",variants:{exit:({reverse:e,initialScale:n,transition:t,transitionEnd:r,delay:o})=>{var l;return{opacity:0,...e?{scale:n,transitionEnd:null==r?void 0:r.exit}:{transitionEnd:{scale:n,...null==r?void 0:r.exit}},transition:null!=(l=null==t?void 0:t.exit)?l:i.p$.exit(i.Sh.exit,o)}},enter:({transitionEnd:e,transition:n,delay:t})=>{var r;return{opacity:1,scale:1,transition:null!=(r=null==n?void 0:n.enter)?r:i.p$.enter(i.Sh.enter,t),transitionEnd:null==e?void 0:e.enter}}}};(0,s.forwardRef)(function(e,n){let{unmountOnExit:t,in:r,reverse:i=!0,initialScale:s=.95,className:c,transition:f,transitionEnd:x,delay:v,...m}=e,p=!t||r&&t,h=r||t?"enter":"exit",g={initialScale:s,reverse:i,transition:f,transitionEnd:x,delay:v};return(0,d.jsx)(l.M,{custom:g,children:p&&(0,d.jsx)(a.E.div,{ref:n,className:(0,o.cx)("chakra-offset-slide",c),...u,animate:h,custom:g,...m})})}).displayName="ScaleFade";var f={slideInBottom:{...c,custom:{offsetY:16,reverse:!0}},slideInRight:{...c,custom:{offsetX:16,reverse:!0}},slideInTop:{...c,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...c,custom:{offsetX:-16,reverse:!0}},scale:{...u,custom:{initialScale:.95,reverse:!0}},none:{}},x=(0,r.m)(a.E.section),v=e=>f[e||"none"],m=(0,s.forwardRef)((e,n)=>{let{preset:t,motionProps:r=v(t),...i}=e;return(0,d.jsx)(x,{ref:n,...r,...i})});m.displayName="ModalTransition";var p=t(77676),h=t(14738),g=(0,t(29058).G)((e,n)=>{let{className:t,children:i,containerProps:l,motionProps:a,...s}=e,{getDialogProps:c,getDialogContainerProps:u}=(0,h.vR)(),f=c(s,n),x=u(l),v=(0,o.cx)("chakra-modal__content",t),g=(0,h.I_)(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:j}=(0,h.vR)();return(0,d.jsx)(p.M,{children:(0,d.jsx)(r.m.div,{...x,className:"chakra-modal__content-container",tabIndex:-1,__css:b,children:(0,d.jsx)(m,{preset:j,motionProps:a,className:v,...f,__css:y,children:i})})})});g.displayName="ModalContent"},50250:function(e,n,t){"use strict";t.d(n,{m:function(){return s}});var r=t(14738),i=t(31053),o=t(29058),l=t(94496),a=t(52322),s=(0,o.G)((e,n)=>{let{className:t,...o}=e,s=(0,i.cx)("chakra-modal__footer",t),d={display:"flex",alignItems:"center",justifyContent:"flex-end",...(0,r.I_)().footer};return(0,a.jsx)(l.m.footer,{ref:n,...o,__css:d,className:s})});s.displayName="ModalFooter"},67109:function(e,n,t){"use strict";t.d(n,{O:function(){return h}});var r=t(2784),i=t(31053),o=t(94496),l=t(84586),a=t(28165),s=t(29058),d=t(91982),c=t(48929),u=t(52322),f=(0,o.m)("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),x=(0,l.gJ)("skeleton-start-color"),v=(0,l.gJ)("skeleton-end-color"),m=(0,a.F4)({from:{opacity:0}
1,to:{opacity:1}}),p=(0,a.F4)({from:{borderColor:x.reference,background:x.reference},to:{borderColor:v.reference,background:v.reference}}),h=(0,s.G)((e,n)=>{let t={...e,fadeDuration:"number"==typeof e.fadeDuration?e.fadeDuration:.4,speed:"number"==typeof e.speed?e.speed:.8},a=(0,d.mq)("Skeleton",t),s=function(){let e=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{e.current=!1},[]),e.current}(),{startColor:h="",endColor:g="",isLoaded:y,fadeDuration:b,speed:j,className:k,fitContent:S,..._}=(0,l.Lr)(t),[w,Z]=(0,c.dQ)("colors",[h,g]),E=function(e){let n=(0,r.useRef)();return(0,r.useEffect)(()=>{n.current=e},[e]),n.current}(y),I=(0,i.cx)("chakra-skeleton",k),N={...w&&{[x.variable]:w},...Z&&{[v.variable]:Z}};if(y){let e=s||E?"none":`${m} ${b}s`;return(0,u.jsx)(o.m.div,{ref:n,className:I,__css:{animation:e},..._})}return(0,u.jsx)(f,{ref:n,className:I,..._,__css:{width:S?"fit-content":void 0,...a,...N,_dark:{...a._dark,...N},animation:`${j}s linear infinite alternate ${p}`}})});h.displayName="Skeleton"}},function(e){e.O(0,[2976,8138,2390,3512,2888,9774,179],function(){return e(e.s=44250)}),_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.