/*! For license information please see critical.js.LICENSE.txt */
!function(){var t={7119:function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e=e.parentElement}})},7571:function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},1184:function(){Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}},2613:function(){"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){"use strict";if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0})},4199:function(){Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r})},3336:function(t){"use strict";t.exports=$}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=n(3336),e=n.n(t),r={no:{date:{days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Sun","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I dag",clear:"Fjern valg",dateFormat:"mm/dd/yyyy",timeFormat:"hh:ii aa",firstDay:1},guide:{file:"lydfiler",minutes:"min",hours:"t",works:"Alle verk"},visit:{showMore:"Vis mer",showLess:"Vis mindre"},imageCredits:{btnText:"info"},videoPlay:{pause:"Pause",play:"Spill av"}},en:{date:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"mm/dd/yyyy",timeFormat:"hh:ii aa",firstDay:0},guide:{file:"audio files",minutes:"min",hours:"h",works:"All works"},visit:{showMore:"Show more",showLess:"Show less"},imageCredits:{btnText:"info"},videoPlay:{pause:"Pause",play:"Play"}}},o=n(3336);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function c(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(){s=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),u=new D(r||[]);return o(a,"_invoke",{value:_(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function w(){}function b(){}function x(){}var k={};d(k,u,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(I([])));S&&S!==n&&r.call(S,u)&&(k=S);var M=x.prototype=w.prototype=Object.create(k);function L(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,a,u,c){var l=f(t[o],t,a);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==i(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(d).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function _(e,n,r){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=T(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?v:y,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=v,r.method="throw",r.arg=l.arg)}}}function T(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=x,o(M,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=d(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,d(t,l,"GeneratorFunction")),t.prototype=Object.create(M),t},e.awrap=function(t){return{__await:t}},L(O.prototype),d(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(h(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(M),d(M,l,"Generator"),d(M,u,(function(){return this})),d(M,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=I,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function d(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){d(i,r,o,a,u,"next",t)}function u(t){d(i,r,o,a,u,"throw",t)}a(void 0)}))}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=r.key,a=void 0,a=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===i(a)?a:String(a)),r)}var o,a}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,i,c;return n=t,i=[{key:"getPageType",value:function(){return e()("body").data("page-type")}},{key:"getHeaderHeight",value:function(){return e()("header.header").outerHeight()}},{key:"getFooterHeight",value:function(){return e()("footer.footer").outerHeight()}},{key:"getElementHeight",value:function(t){return e()(t).outerHeight()}},{key:"getViewportHeight",value:function(){return Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},{key:"getViewportWidth",value:function(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)}},{key:"getLanguage",value:function(){return e()("#lng").val()||"no"}},{key:"getLocalization",value:function(){return r[this.getLanguage()]}},{key:"getElementWidth",value:function(t){return e()(t).width()}},{key:"isMinWidth",value:function(t){return"matchMedia"in window?window.matchMedia("(min-width: ".concat(t,"px)")).matches:e()(window).width()>=t}},{key:"isXxs",value:function(){return"matchMedia"in window?window.matchMedia("(max-width: 320px)").matches:e()(window).width()<=320}},{key:"isMobile",value:function(){return"matchMedia"in window?window.matchMedia("(max-width: 575px)").matches:e()(window).width()<=576}},{key:"isTablet",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 576px) and (max-width: 767px)").matches:e()(window).width()<=768}},{key:"isSmallDesktop",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 768px) and (max-width: 991px)").matches:e()(window).width()<=992}},{key:"isLargeDesktop",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 992px) and (max-width: 1199px)").matches:e()(window).width()<=1200}},{key:"isExtraLargeDesktop",value:function(){return"matchMedia"in window?window.matchMedia("(min-width: 1200px)").matches:e()(window).width()<=1200}},{key:"isHiDPI",value:function(){return"matchMedia"in window&&window.matchMedia("(-webkit-min-device-pixel-ratio: 2),\n                                (min--moz-device-pixel-ratio: 2),\n                                (-o-min-device-pixel-ratio: 2/1),\n                                (min-device-pixel-ratio: 2),\n                                (min-resolution: 192dpi),\n                                (min-resolution: 2dppx)").matches}},{key:"isCollection",value:function(){return null!==document.querySelector("body[data-page-region='collection']")}},{key:"isPortrait",value:function(){return"matchMedia"in window&&window.matchMedia("(orientation: portrait)").matches}},{key:"isLandscape",value:function(){return"matchMedia"in window&&window.matchMedia("(orientation: landscape)").matches}},{key:"isIE",value:function(t){var e=t||window.navigator.userAgent;return/MSIE|Trident/.test(e)}},{key:"isInViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;void 0!==o&&el instanceof o&&(el=el[0]);var n=t.getBoundingClientRect();return n.top>=e&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}},{key:"isPartiallyInViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;void 0!==o&&t instanceof o&&(t=t[0]);var n=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,a=n.top<=r-e&&n.top+n.height>=e,u=n.left<=i&&n.left+n.width>=0;return a&&u}},{key:"hasLocalStorage",value:function(){return this.isStorageAvailable("localStorage")}},{key:"isStorageAvailable",value:function(t){var e;try{e=window[t];var n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&e&&0!==e.length}}},{key:"reduceMotion",value:function(){return!("matchMedia"in window)||window.matchMedia("(prefers-reduced-motion)").matches}},{key:"scrollTo",value:function(t){this.reduceMotion()?window.scrollTo(0,t):e()("html, body").animate({scrollTop:t},300)}},{key:"elHasClass",value:function(t,e){if(!t)return!1;var n=t.getAttribute("class");return!!n&&n.split(" ").indexOf(e)>-1}},{key:"uuid",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}},{key:"stringIsHtml",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new RegExp(/<[a-z/][\s\S]*>/i).test(t)}},{key:"isEmpty",value:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}},{key:"getUrlParameter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];e||(e=location.href),t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");for(var r=new RegExp(t+"=([^&#]+)","ig");;){var o=r.exec(e);if(!o||!o[1])break;n.push(o[1])}return n.length?1==n.length?decodeURIComponent(n[0]):decodeURIComponent(n):null}},{key:"getUrlParameters",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=t;return null===t&&(e=window.location.search),e.substring(1).split("&").reduce((function(t,e){var n=e.split("=");return n[0]&&(t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])),t}),{})}},{key:"getTransitionEndEvent",value:function(){var t,e=document.createElement("fakeelement"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(n.hasOwnProperty(t)&&void 0!==e.style[t])return n[t];return!1}},{key:"getAnimationEndEvent",value:function(){var t,e=document.createElement("fakeelement"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in n)if(n.hasOwnProperty(t)&&void 0!==e.style[t])return n[t];return!1}},{key:"luminanace",value:function(t,e,n){var r=[t,e,n].map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]}},{key:"contrast",value:function(t,e){return(this.luminanace(t[0],t[1],t[2])+.05)/(this.luminanace(e[0],e[1],e[2])+.05)}},{key:"hexToRgb",value:function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}},{key:"getImageColor",value:function(t,e){var n=this;return new Promise((function(r,o){if(n.isIE())return o();t.dispatch("scripts/load",{name:"ColorThief"}).then((function(){var t=new Image;t.crossOrigin="Anonymous",t.addEventListener("load",(function(){var e=new ColorThief,n=document.createElement("canvas"),o=n.getContext("2d"),i=document.createElement("div"),a=document.createElement("img");n.width=t.width,n.height=t.height,o.drawImage(t,0,0),i.appendChild(n),i.appendChild(a);var u=n.toDataURL("image/png");a.setAttribute("src",u),a.complete?r(e.getColor(a)):a.addEventListener("load",(function(){r(e.getColor(a))}))}),!1),t.src=e}))}))}},{key:"ajaxRequest",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(o,i){return e().ajax({type:n,url:t,beforeSend:function(n){-1===t.indexOf("https://")&&n.setRequestHeader("RequestVerificationToken",e()("#aft").val())},data:r,success:function(t){o(t)},error:function(t){i(t)}})}))}},{key:"loadScriptAsync",value:function(t){return new Promise((function(e,n){var r=document.createElement("script");r.src=t,r.async=!0,r.onload=function(t){e(t)};var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}))}},{key:"decodeHtml",value:function(t){return decodeURIComponent(t).replace(/\+/g," ")}},{key:"compareDateDays",value:function(t,e){return!(!t&&e||t&&!e)&&t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}},{key:"toInternalDateStr",value:function(t){var e=new Date(t),n=""+(e.getMonth()+1),r=""+e.getDate(),o=e.getFullYear();return n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),[o,n,r].join("-")}},{key:"parseDate",value:function(t){var e=t.split(/\D/);return new Date(e[0],--e[1],e[2])}},{key:"toShortDateString",value:function(t){var e=this.getLanguage(),n=t.getDate(),r=t.getMonth(),o=t.getFullYear();return"no"===e?"".concat(n<10?"0".concat(n):n,".").concat(++r<10?"0".concat(r):r,".").concat(o):"".concat(++r<10?"0".concat(r):r,"/").concat(n<10?"0".concat(n):n,"/").concat(o)}},{key:"toDateString",value:function(t){var e=this.getLanguage(),n=this.getLocalization(e).date.months,r=t.getDate(),o=n[t.getMonth()],i=t.getFullYear();return"no"===e?r+". "+o+" "+i:r+" "+o+" "+i}},{key:"toLocaleNumberString",value:function(t){if(isNaN(parseInt(t)))return t;var e=t.toLocaleString("en");return"no"!==this.getLanguage()?e:e.replace(/,/g," ")}},{key:"transformedPrice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=n||",-";return"number"!=typeof t||isNaN(t)||0===t?0===t?"0".concat(r):t:e?Math.round(t).toString()+r:t.toFixed(2).replace(".",",")}},{key:"isValidEmail",value:function(t){return/^[ÆØÅæøåA-Za-z0-9._%+-]+@(?:[ÆØÅæøåA-Za-z0-9-]+\.)+[A-Za-z]{2,6}$/.test(t)}},{key:"elementInView",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.getBoundingClientRect(),r=n.top,o=n.left,i=n.bottom,a=n.right,u=window,c=u.innerHeight,l=u.innerWidth;return e?(r>0&&r<c||i>0&&i<c)&&(o>0&&o<l||a>0&&a<l):r>=0&&o>=0&&i<=c&&a<=l}},{key:"noScrollBody",value:function(t){t?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}},{key:"handleQuantityChanged",value:function(t,e,n,r,o,i,a,c){var l=Array.isArray(t),d=function(){var t=h(s().mark((function t(i){var a,u,l,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={method:0===e?"DELETE":"PUT",headers:n,body:JSON.stringify({cartItem:{qty:e,quote_id:i}})},u=(0===e?r:o).replace("#itemId#",i).replace("#cartId#",c),t.prev=3,t.next=6,fetch(u,a);case 6:return l=t.sent,t.next=9,l.json();case 9:return d=t.sent,t.abrupt("return",d);case 13:return t.prev=13,t.t0=t.catch(3),console.log("Error modifying cart item:",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(e){return t.apply(this,arguments)}}(),f=function(){var e=h(s().mark((function e(){var n,r,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=25;break}n=u(t),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=14;break}return o=r.value,e.next=8,d(o);case 8:if(null!==e.sent){e.next=12;break}return a(),e.abrupt("return");case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),n.e(e.t0);case 19:return e.prev=19,n.f(),e.finish(19);case 22:i(),e.next=29;break;case 25:return e.next=27,d(t);case 27:e.sent?i():a();case 29:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}();f()}},{key:"toKebabCase",value:function(t){return t.replace(/[A-Z]/g,(function(t,e){return 0===e?t.toLowerCase():"-".concat(t.toLowerCase())}))}},{key:"formatTime",value:function(t){return new Date(1e3*t).toLocaleTimeString("en-GB",{timeZone:"Europe/Oslo",hour:"2-digit",minute:"2-digit"})}},{key:"validateBirthday",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0,o=!1,i="";if(/^(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.\d{4}$/.test(t)){var a=new Date(this.changeDateFormat(t)),u=new Date;if(null!==e){var c=new Date;c.setFullYear(c.getFullYear()-e),a>u||a<c?(i=n,o=!1):(o=!0,i="")}else a>u?(i=r,o=!1):(o=!0,i="")}else i=r,o=!1;return{birthdayIsValid:o,birthdayError:i}}},{key:"changeDateFormat",value:function(t){var e=t.split(".");if(3===e.length){var n=a(e,3),r=n[0],o=n[1],i=n[2];return"".concat(i,"-").concat(o,"-").concat(r)}return t}},{key:"formattedDate",value:function(t){if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return console.error("Invalid date format. Expected format: yyyy-mm-dd"),t;var e=new Date(t),n=String(e.getDate()).padStart(2,"0"),r=String(e.getMonth()+1).padStart(2,"0"),o=e.getFullYear(),i="".concat(n,".").concat(r,".").concat(o);return i}}],i&&f(n.prototype,i),c&&f(n,c),Object.defineProperty(n,"prototype",{writable:!1}),t}(),y=new p;n(7119),n(7571),n(2613),n(4199),n(1184);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}!function(t){var e=-1,n=-1,r=function(t){return parseFloat(t)||0},o=function(e){var n=t(e),o=null,i=[];return n.each((function(){var e=t(this),n=e.offset().top-r(e.css("margin-top")),a=i.length>0?i[i.length-1]:null;null===a?i.push(e):Math.floor(Math.abs(o-n))<=1?i[i.length-1]=a.add(e):i.push(e),o=n})),i},i=function(e){var n={byRow:!0,property:"height",target:null,remove:!1};return"object"===m(e)?t.extend(n,e):("boolean"==typeof e?n.byRow=e:"remove"===e&&(n.remove=!0),n)},a=t.fn.matchHeight=function(e){var n=i(e);if(n.remove){var r=this;return this.css(n.property,""),t.each(a._groups,(function(t,e){e.elements=e.elements.not(r)})),this}return this.length<=1&&!n.target||(a._groups.push({elements:this,options:n}),a._apply(this,n)),this};a.version="0.7.2",a._groups=[],a._throttle=80,a._maintainScroll=!1,a._beforeUpdate=null,a._afterUpdate=null,a._rows=o,a._parse=r,a._parseOptions=i,a._apply=function(e,n){var u=i(n),c=t(e),l=[c],s=t(window).scrollTop(),d=t("html").outerHeight(!0),h=c.parents().filter(":hidden");return h.each((function(){var e=t(this);e.data("style-cache",e.attr("style"))})),h.css("display","block"),u.byRow&&!u.target&&(c.each((function(){var e=t(this),n=e.css("display");"inline-block"!==n&&"flex"!==n&&"inline-flex"!==n&&(n="block"),e.data("style-cache",e.attr("style")),e.css({display:n,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})})),l=o(c),c.each((function(){var e=t(this);e.attr("style",e.data("style-cache")||"")}))),t.each(l,(function(e,n){var o=t(n),i=0;if(u.target)i=u.target.outerHeight(!1);else{if(u.byRow&&o.length<=1)return void o.css(u.property,"");o.each((function(){var e=t(this),n=e.attr("style"),r=e.css("display");"inline-block"!==r&&"flex"!==r&&"inline-flex"!==r&&(r="block");var o={display:r};o[u.property]="",e.css(o),e.outerHeight(!1)>i&&(i=e.outerHeight(!1)),n?e.attr("style",n):e.css("display","")}))}o.each((function(){var e=t(this),n=0;u.target&&e.is(u.target)||("border-box"!==e.css("box-sizing")&&(n+=r(e.css("border-top-width"))+r(e.css("border-bottom-width")),n+=r(e.css("padding-top"))+r(e.css("padding-bottom"))),e.css(u.property,i-n+"px"))}))})),h.each((function(){var e=t(this);e.attr("style",e.data("style-cache")||null)})),a._maintainScroll&&t(window).scrollTop(s/d*t("html").outerHeight(!0)),this},a._applyDataApi=function(){var e={};t("[data-match-height], [data-mh]").each((function(){var n=t(this),r=n.attr("data-mh")||n.attr("data-match-height");e[r]=r in e?e[r].add(n):n})),t.each(e,(function(){this.matchHeight(!0)}))};var u=function(e){a._beforeUpdate&&a._beforeUpdate(e,a._groups),t.each(a._groups,(function(){a._apply(this.elements,this.options)})),a._afterUpdate&&a._afterUpdate(e,a._groups)};a._update=function(r,o){if(o&&"resize"===o.type){var i=t(window).width();if(i===e)return;e=i}r?-1===n&&(n=setTimeout((function(){u(o),n=-1}),a._throttle)):u(o)},t(a._applyDataApi);var c=t.fn.on?"on":"bind";t(window)[c]("load",(function(t){a._update(!1,t)})),t(window)[c]("resize orientationchange",(function(t){a._update(!0,t)}))}(n(3336)),window.museet=window.museet||{},window.museet.util=y,e()("html").removeClass("no-js"),e()("noscript").remove(),window.onload=function(){y.loadScriptAsync(window.museet.bundles.main)}}()}();
