Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kartverket/geonorge-web-components

Package Overview
Dependencies
Maintainers
2
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kartverket/geonorge-web-components - npm Package Compare versions

Comparing version 0.1.42 to 0.1.43

2

MainMenu.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geonorge=t():(e.geonorge=e.geonorge||{},e.geonorge.MainMenu=t())}(self,(function(){return(()=>{var e={4667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(3062),o=n.n(i),r=n(7638),a=n.n(r)()(o());a.push([e.id,"*{box-sizing:border-box}button.menu-toggle-button{border:none;background:transparent;background-color:#7d746d;border-radius:2px;color:#fff;cursor:pointer;width:40px;height:32px;margin-left:4px}@media(min-width: 37.5em){button.menu-toggle-button{width:45px;height:37px}}@media(min-width: 992px){button.menu-toggle-button{width:95px;background-color:#7d746d;color:#fff}}button.menu-toggle-button.open{background-color:#414042}button.menu-toggle-button span{font-size:1.2em;font-weight:700;padding:2px;vertical-align:middle}button.menu-toggle-button span.menu-title{display:none}@media(min-width: 992px){button.menu-toggle-button span.menu-title{display:inline-block}}button.menu-toggle-button span.hidden{display:none}button.menu-toggle-button svg{height:24px;width:24px;padding:2px;vertical-align:middle}@media(min-width: 37.5em){button.menu-toggle-button svg{height:29px;width:29px}}.menu-wrapper{position:absolute;left:0;width:100%}.menu-wrapper .menu-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;box-sizing:border-box;width:100%;background-color:#dfdcda;margin:auto;position:relative;top:57px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:14px}}@media(min-width: 768px){.menu-wrapper .menu-container{width:750px}}@media(min-width: 992px){.menu-wrapper .menu-container{width:970px}}@media(min-width: 1200px){.menu-wrapper .menu-container{width:1170px}}@media print{.menu-wrapper .menu-container{display:none}}.menu-wrapper .menu-container.open{-webkit-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);-moz-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);box-shadow:0 5px 5px -2px rgba(0,0,0,.26);height:auto}.menu-wrapper .menu-container .menu-item-list-container{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;overflow:hidden;max-height:0}.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px;overflow:auto}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:450px}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList{list-style:none;margin:15px;color:#414042}.menu-wrapper .menu-container .menu-item-list-container .menuItemList:first-child{padding:15px 0 0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a{color:#414042;text-decoration:none}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0{display:flex;flex-wrap:wrap}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 100%}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 50%}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>a{border-bottom:1px solid #b6afa8;font-weight:700;padding-bottom:.75em;margin-bottom:.75em;display:block}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul{padding:0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul li{margin-bottom:12px}.menu-wrapper .menu-container .menu-actions-row{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;text-align:right;background-color:#d2cecb;max-height:0;overflow:hidden}.menu-wrapper .menu-container .menu-actions-row.open{max-height:56px}.menu-wrapper .menu-container .menu-actions-row a,.menu-wrapper .menu-container .menu-actions-row span{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row span:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row span:not(:first-child){border-left:1px solid #b6afa8}","",{version:3,sources:["webpack://./custom-elements/main-navigation/main-menu/main-menu.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,0BACI,WAAA,CACA,sBAAA,CACA,wBAAA,CACA,iBAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CCDI,0BDRR,0BAWQ,UAAA,CACA,WAAA,CAAA,CCZA,yBAAA,0BDeA,UAAA,CACA,wBAAA,CACA,UAAA,CAAA,CAEJ,+BACI,wBAAA,CAEJ,+BACI,eAAA,CACA,eAAA,CACA,WAAA,CACA,qBAAA,CACA,0CACI,YAAA,CC5BJ,yBD2BA,0CAGQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI,WAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CCjCA,0BD6BJ,8BAMQ,WAAA,CACA,UAAA,CAAA,CAIZ,cACI,iBAAA,CACA,MAAA,CACA,UAAA,CAEA,8BE1DF,iCF2D6B,CE1D7B,yBF0D6B,CACvB,qBAAA,CACA,UAAA,CACA,wBAAA,CACA,WAAA,CACA,iBAAA,CACA,QAAA,CCpDA,0BD6CJ,8BASQ,QAAA,CAAA,CC1DJ,yBDiDJ,8BAaQ,WAAA,CAAA,CClEJ,yBDqDJ,8BAgBQ,WAAA,CAAA,CCzEJ,0BDyDJ,8BAmBQ,YAAA,CAAA,CAEJ,aArBJ,8BAsBQ,YAAA,CAAA,CAGJ,mCGnFJ,iDHoFQ,CGnFR,8CHmFQ,CGlFR,yCHkFQ,CACA,WAAA,CAEJ,wDIvFJ,0CJwFQ,CIvFR,wCJuFQ,CItFR,6CJsFQ,CIrFR,qCJqFQ,CACA,eAAA,CACA,YAAA,CACA,6DACI,gBAAA,CACA,aAAA,CChFR,0BD8EI,6DAIQ,gBAAA,CAAA,CC1FZ,yBDsFI,6DAOQ,gBAAA,CAAA,CAIR,sEACI,eAAA,CACA,WAAA,CACA,aAAA,CACA,kFACI,gBAAA,CAEJ,wEACI,aAAA,CACA,oBAAA,CACA,8EACI,yBAAA,CAGR,wFACI,YAAA,CACA,cAAA,CACA,2FACI,aAAA,CC3GhB,0BD0GY,2FAGQ,YAAA,CAAA,CCrHpB,yBDkHY,2FAMQ,MAAA,CAAA,CAEJ,6FACI,+BAAA,CACA,eAAA,CACA,oBAAA,CACA,mBAAA,CACA,aAAA,CAEJ,8FACI,SAAA,CACA,iGACI,kBAAA,CAOxB,gDIhJJ,0CJiJQ,CIhJR,wCJgJQ,CI/IR,6CJ+IQ,CI9IR,qCJ8IQ,CACA,gBAAA,CACA,wBAAA,CACA,YAAA,CACA,eAAA,CACA,qDACI,eAAA,CAEJ,uGACI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,aAAA,CACA,cAAA,CACA,mHACI,yBAAA,CAEJ,2IACI,6BAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nbutton.menu-toggle-button {\n border: none;\n background: transparent;\n background-color: rgb(125, 116, 109);\n border-radius: 2px;\n color: rgb(255, 255, 255);\n cursor: pointer;\n width: 40px;\n height: 32px;\n margin-left: 4px;\n @include breakpoint(phablet) {\n width: 45px;\n height: 37px;\n }\n @include breakpoint(laptop) {\n width: 95px;\n background-color: rgb(125, 116, 109);\n color: #fff;\n }\n &.open {\n background-color: #414042;\n }\n span {\n font-size: 1.2em;\n font-weight: 700;\n padding: 2px;\n vertical-align: middle;\n &.menu-title {\n display: none;\n @include breakpoint(laptop) {\n display: inline-block;\n }\n }\n &.hidden {\n display: none;\n }\n }\n svg {\n height: 24px;\n width: 24px;\n padding: 2px;\n vertical-align: middle;\n @include breakpoint(phablet) {\n height: 29px;\n width: 29px;\n }\n }\n}\n.menu-wrapper {\n position: absolute;\n left: 0;\n width: 100%;\n\n .menu-container {\n @include border-radius(0 0 3px 3px);\n box-sizing: border-box;\n width: 100%;\n background-color: #dfdcda;\n margin: auto;\n position: relative;\n top: 57px;\n @include breakpoint(phablet) {\n top: 14px;\n }\n\n @include breakpoint(tablet) {\n width: 750px;\n }\n @include breakpoint(laptop) {\n width: 970px;\n }\n @include breakpoint(desktop) {\n width: 1170px;\n }\n @media print {\n display: none;\n }\n\n &.open {\n @include box-shadow(0 5px 5px -2px rgba(0, 0, 0, 0.26));\n height: auto;\n }\n .menu-item-list-container {\n @include transition(max-height 0.3s ease-in-out);\n overflow: hidden;\n max-height: 0;\n &.open {\n max-height: 300px;\n overflow: auto;\n @include breakpoint(phablet) {\n max-height: 450px;\n }\n @include breakpoint(laptop) {\n max-height: 300px;\n }\n }\n\n .menuItemList {\n list-style: none;\n margin: 15px;\n color: #414042;\n &:first-child {\n padding: 15px 0 0;\n }\n a {\n color: #414042;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n &.hierarchy-level-0 {\n display: flex;\n flex-wrap: wrap;\n > li {\n flex: 1 0 100%;\n @include breakpoint(phablet) {\n flex: 1 0 50%;\n }\n @include breakpoint(laptop) {\n flex: 1;\n }\n > a {\n border-bottom: 1px solid #b6afa8;\n font-weight: 700;\n padding-bottom: 0.75em;\n margin-bottom: 0.75em;\n display: block;\n }\n > ul {\n padding: 0;\n li {\n margin-bottom: 12px;\n }\n }\n }\n }\n }\n }\n .menu-actions-row {\n @include transition(max-height 0.3s ease-in-out);\n text-align: right;\n background-color: #d2cecb;\n max-height: 0;\n overflow: hidden;\n &.open {\n max-height: 56px;\n }\n a, span {\n display: inline-block;\n padding: 0.25em 1em 0.25em 1.1em;\n margin: 15px 0;\n text-decoration: none;\n color: #414042;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n &:not(:first-child) {\n border-left: 1px solid #b6afa8;\n }\n }\n }\n }\n}\n',"@mixin breakpoint($point) {\n @if $point == desktop {\n @media (min-width: $screen-desktop) {\n @content;\n }\n } @else if $point == laptop {\n @media (min-width: $screen-laptop) {\n @content;\n }\n } @else if $point == tablet {\n @media (min-width: $screen-tablet) {\n @content;\n }\n } @else if $point == phablet {\n @media (min-width: $screen-phablet) {\n @content;\n }\n }\n}\n","@mixin border-radius($radius) {\n -webkit-border-radius: $radius;\n border-radius: $radius;\n}\n\n// Single side border-radius\n\n@mixin border-top-radius($radius) {\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}\n@mixin border-right-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n}\n@mixin border-bottom-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n}\n@mixin border-left-radius($radius) {\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n","\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const s=a},2287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const i='<template>\n <button id="menu-toggle-button" class="menu-toggle-button">\n <span id="menu-title" class="menu-title">\n Meny\n </span>\n <span id="menu-icon"></span>\n <span id="close-icon"></span>\n </button>\n <div id="menu-wrapper" class="menu-wrapper">\n <div id="menu-container" class="menu-container open">\n <div id="menu-item-list-container" class="menu-item-list-container"></div>\n <div id="menu-actions-row" class="menu-actions-row"></div>\n </div>\n </div>\n</template>'},7638:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);i&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},3062:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.exports=function(e){var n,i,o=(i=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){o=!0,r=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}}(n,i)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(n,i)||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.")}()),r=o[1],a=o[3];if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),c="/*# ".concat(u," */"),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[r].concat(l).concat([c]).join("\n")}return[r].join("\n")}},1397:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(5969),r=n(5773),a=n(3804);t.Component=e=>t=>{var n;const s=e.tag||a.toKebabCase(t.prototype.constructor.name),u=((n=class extends t{constructor(){super(),this.props={},this.showShadowRoot=null==e.shadow||e.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((e=>a.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,i=!0){if(t!=n){i&&(this[a.toCamelCase(e)]=n);const o=this.constructor.watchAttributes;if(o&&o[e]){const i=o[e];this.__connected&&"function"==typeof this[i]&&this[i]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return i(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,o.addEventListeners(this),r.initializeProps(this)}))}render(){return i(this,void 0,void 0,(function*(){if(this.__connected)return;const t=document.createElement("template");t.innerHTML=yield this.getStyle(),e.template instanceof Promise?t.content.appendChild(yield this.getExternalTemplate()):"string"==typeof e.template&&(t.innerHTML+=e.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(t.content.cloneNode(!0))}))}getExternalTemplate(){return i(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),n=document.createRange().createContextualFragment(t);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return i(this,void 0,void 0,(function*(){let t;return e.style instanceof Promise?t=(yield e.style).default.toString():"string"==typeof e.style&&(t=e.style),t?`<style>${t}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((e,t)=>e(!0))),n);return customElements.get(s)||customElements.define(s,u),u}},985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=n},265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRootElement=t.getElement=void 0,t.getElement=e=>document.querySelector(e),t.getShadowRootElement=(e,t)=>e.shadowRoot.querySelector(t)},406:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1397),t),o(n(985),t),o(n(265),t),o(n(5969),t),o(n(5773),t),o(n(4271),t),o(n(9766),t),o(n(4938),t)},5969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const i=n(3804);t.Listen=(e,t)=>(n,i)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[i]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const i=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;i&&i.addEventListener(n.eventName,(t=>{n.handler.call(e,t)}))}}},t.Dispatch=e=>(t,n)=>{Object.defineProperty(t,n,{get:function(){const t=this;return{emit(o){const r=e||i.toDotCase(n);t.dispatchEvent(new CustomEvent(r,o))}}}})}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const i=n(3804);t.Prop=()=>(e,t)=>{const n=i.toKebabCase(t);e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return this.props[t]?this.props[t]:this.getAttribute(n)},set:function(e){if(this.__connected){const o=this.props[t];this.props[t]=i.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,o,e,!1)}else this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let n of(e=>{const t=e.constructor.watchAttributes,n=Object.assign({},t);Object.keys(n).forEach((e=>n[e]=""));const i=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(i)})(e)){if(t)if(null==t[i.toKebabCase(n)])t[i.toKebabCase(n)]="";else{const o=e.props[n]||e.getAttribute(i.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:o})}e.constructor.propsInit[n]&&(e.hasAttribute(i.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},4271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const i=n(3804);t.Toggle=()=>(e,t)=>{e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return(e=>{if(this.hasAttribute(e)){const t=this.getAttribute(e);return!!/^(true|false|^$)$/.test(t)&&("true"==t||""==t)}return!1})(t)},set:function(e){const n=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`),e=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`}this.__connected?(this.props[t]=e||!1,""!==n&&null!==n?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},9766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryParseInt=t.toDotCase=t.toCamelCase=t.toKebabCase=void 0,t.toKebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),t.toCamelCase=e=>e.toLowerCase().replace(/(\-\w)/g,(e=>e[1].toUpperCase())),t.toDotCase=e=>e.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),t.tryParseInt=e=>parseInt(e)==e&&NaN!==parseFloat(e)?parseInt(e):e},4938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const i=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[i.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},5854:e=>{e.exports='<svg aria-labelledby="svg-inline--fa-title-DQErafiATQyz" data-prefix="fas" data-icon="times" class="__2_2taji__svg-inline--fa __2_2taji__fa-times __2_2taji__fa-w-11 __2_2taji__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><title id="svg-inline--fa-title-DQErafiATQyz">Vis meny</title><path fill="#fff" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path></svg>'},7291:e=>{e.exports='<svg aria-labelledby="svg-inline--fa-title-rqezCtUcjPlp" data-prefix="fas" data-icon="bars" class="__1-Ii6EJ__svg-inline--fa __1-Ii6EJ__fa-bars __1-Ii6EJ__fa-w-14 __1-Ii6EJ__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title id="svg-inline--fa-title-rqezCtUcjPlp">Vis meny</title><path fill="#fff" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>'},4709:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainMenu=void 0;const u=n(406),c=s(n(7291)),l=s(n(5854)),d=n(9480);let p=class extends u.CustomElement{constructor(){super(),this.hideMenuContainer=()=>{this.showmenu=!1},this.renderMenuItems=(e,t=0,n=1)=>{const i=e.map((e=>{const i=e.SubMenuItem&&e.SubMenuItem.length?e.SubMenuItem:null;return`<li><a href="${e.Url}">${e.Name}</a>${i&&t+1<=n?this.renderMenuItems(i,t+1,n):""}</li>`})).join("");return`<ul class="menuItemList hierarchy-level-${t}">${i}</ul>`},this.clickOutsideMenuContainer=this.clickOutsideMenuContainer.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.menuButton=u.getShadowRootElement(this,"#menu-toggle-button"),this.menuTitle=u.getShadowRootElement(this,"#menu-title"),this.menuIcon=u.getShadowRootElement(this,"#menu-icon"),this.closeIcon=u.getShadowRootElement(this,"#close-icon"),this.menuContainer=u.getShadowRootElement(this,"#menu-container"),this.menuItemListContainer=u.getShadowRootElement(this,"#menu-item-list-container"),this.menuActionsRow=u.getShadowRootElement(this,"#menu-actions-row"),this.menuIcon.innerHTML=c.default,this.closeIcon.innerHTML=l.default,this.showmenu?this.menuIcon.classList.add("hidden"):this.closeIcon.classList.add("hidden"),d.fetchMenuItems(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.signinurl&&this.signouturl&&this.addAuthenticationLinks(),this.englishurl&&this.norwegianurl&&this.addLanguageSelectLinks(),document.addEventListener("click",this.clickOutsideMenuContainer)}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideMenuContainer)}clickOutsideMenuContainer(e){const t=e.composedPath()[0];t.closest("#menu-container"),t.closest("#menu-container")||t.closest("#menu-toggle-button")||this.hideMenuContainer()}addAuthenticationLinks(e=!1){let t;if(!(this.signouturl&&this.signinurl||e))return"";e?(t=document.createElement("span"),t.addEventListener("click",(()=>{this.isloggedin?this.onSignOutClick.emit():this.onSignInClick.emit()}))):(t=document.createElement("a"),t.href=this.isloggedin?this.signouturl:this.signinurl);const n="en"===this.language?"Log in":"Logg inn",i="en"===this.language?"Log out":"Logg ut";t.innerText=this.isloggedin?i:n,t.id="authentication-toggle-element";for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.menuActionsRow.appendChild(t)}addLanguageSelectLinks(e=!1){let t;if(!(this.norwegianurl&&this.englishurl||e))return"";e?(t=document.createElement("span"),t.addEventListener("click",(()=>{"en"===this.language?this.onNorwegianLanguageSelect.emit():this.onEnglishLanguageSelect.emit()}))):(t=document.createElement("a"),t.href="en"===this.language?this.norwegianurl:this.englishurl),t.innerText="en"===this.language?"Norsk":"English",t.id="language-toggle-element";for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.menuActionsRow.appendChild(t)}buttonClicked(e){this.showmenu=!this.showmenu}hasAuthenticationFunctionChanged(){this.hasAuthenticationFunction&&this.addAuthenticationLinks(!0)}isLoggedInChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction)}hasLanguageSelectFunctionsChanged(){this.hasLanguageSelectFunctions&&this.addLanguageSelectLinks(!0)}languageChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction),this.addLanguageSelectLinks(this.hasLanguageSelectFunctions),d.fetchMenuItems(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny")}showMenuChanged(){this.showmenu?this.menuContainer.classList.add("open"):this.menuContainer.classList.remove("open"),this.showmenu?this.menuButton.classList.add("open"):this.menuButton.classList.remove("open"),this.showmenu?this.menuItemListContainer.classList.add("open"):this.menuItemListContainer.classList.remove("open"),this.showmenu?this.menuActionsRow.classList.add("open"):this.menuActionsRow.classList.remove("open"),this.showmenu?this.menuIcon.classList.add("hidden"):this.menuIcon.classList.remove("hidden"),this.showmenu?this.closeIcon.classList.remove("hidden"):this.closeIcon.classList.add("hidden")}menuItemsChanged(){this.menuitems&&this.menuitems.length&&(this.menuItemListContainer.innerHTML=this.renderMenuItems(this.menuitems))}static setup(e,t){const n=u.getElement(e);t.onClick&&n.addEventListener("menuButtonClick",t.onClick),t.active&&(n.showmenu=t.active)}};p.elementSelector="main-menu",r([u.Prop()],p.prototype,"id",void 0),r([u.Prop()],p.prototype,"language",void 0),r([u.Prop()],p.prototype,"environment",void 0),r([u.Prop()],p.prototype,"signinurl",void 0),r([u.Prop()],p.prototype,"signouturl",void 0),r([u.Prop()],p.prototype,"norwegianurl",void 0),r([u.Prop()],p.prototype,"englishurl",void 0),r([u.Toggle()],p.prototype,"isloggedin",void 0),r([u.Toggle()],p.prototype,"showmenu",void 0),r([u.Toggle()],p.prototype,"hasAuthenticationFunction",void 0),r([u.Toggle()],p.prototype,"hasLanguageSelectFunctions",void 0),r([u.Prop()],p.prototype,"menuitems",void 0),r([u.Dispatch("onSignInClick")],p.prototype,"onSignInClick",void 0),r([u.Dispatch("onSignOutClick")],p.prototype,"onSignOutClick",void 0),r([u.Dispatch("onNorwegianLanguageSelect")],p.prototype,"onNorwegianLanguageSelect",void 0),r([u.Dispatch("onEnglishLanguageSelect")],p.prototype,"onEnglishLanguageSelect",void 0),r([u.Listen("click","#menu-toggle-button")],p.prototype,"buttonClicked",null),r([u.Watch("hasauthenticationfunction")],p.prototype,"hasAuthenticationFunctionChanged",null),r([u.Watch("isloggedin")],p.prototype,"isLoggedInChanged",null),r([u.Watch("haslanguageselectfunctions")],p.prototype,"hasLanguageSelectFunctionsChanged",null),r([u.Watch("language")],p.prototype,"languageChanged",null),r([u.Watch("showmenu")],p.prototype,"showMenuChanged",null),r([u.Watch("menuitems")],p.prototype,"menuItemsChanged",null),p=r([u.Component({tag:"main-menu",template:Promise.resolve().then((()=>a(n(2287)))),style:Promise.resolve().then((()=>a(n(4667))))})],p),t.MainMenu=p},9480:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchDropdownSearchResults=t.fetchMenuItems=t.getGeonorgeMenuUrl=t.getKartkatalogApiUrl=void 0,t.getKartkatalogApiUrl=e=>`https://kartkatalog.${"dev"===e||"test"===e?e+".":""}geonorge.no/api`,t.getGeonorgeMenuUrl=(e,t)=>`https://www.${"dev"===t||"test"===t?"test.":""}geonorge.no/${"en"===e?"en/":""}api/menu/get?omitLinks=1`,t.fetchMenuItems=(e="no",n="")=>{const i=t.getGeonorgeMenuUrl(e,n);return fetch(i).then((e=>e.json())).then((e=>e))},t.fetchDropdownSearchResults=(e="",i="no",o="")=>n(void 0,void 0,void 0,(function*(){const r={dataset:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=dataset`,series:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=series`,service:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=service`,servicelayer:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=servicelayer`,software:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=software`,articles:`articles?text=${e}`},a={headers:new Headers({"Accept-Language":i})};return e&&e.length?yield Promise.all(Object.keys(r).map((e=>n(void 0,void 0,void 0,(function*(){const n=t.getKartkatalogApiUrl(o);return fetch(`${n}/${r[e]}&limit=5`,a).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))}},t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={id:i,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(4709)})()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geonorge=t():(e.geonorge=e.geonorge||{},e.geonorge.MainMenu=t())}(self,(function(){return(()=>{var e={4667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(3062),o=n.n(i),r=n(7638),a=n.n(r)()(o());a.push([e.id,"*{box-sizing:border-box}button.menu-toggle-button{border:none;background:transparent;background-color:#7d746d;border-radius:2px;color:#fff;cursor:pointer;width:40px;height:32px;margin-left:4px}@media(min-width: 37.5em){button.menu-toggle-button{width:45px;height:37px}}@media(min-width: 992px){button.menu-toggle-button{width:98px;background-color:#7d746d;color:#fff}}button.menu-toggle-button.open{background-color:#414042}button.menu-toggle-button span{font-size:1.2em;font-weight:700;padding:2px 1px;vertical-align:middle}button.menu-toggle-button span.menu-title{display:none}@media(min-width: 992px){button.menu-toggle-button span.menu-title{display:inline-block}}button.menu-toggle-button span.hidden{display:none}button.menu-toggle-button svg{height:24px;width:24px;padding:2px;vertical-align:middle}@media(min-width: 37.5em){button.menu-toggle-button svg{height:29px;width:29px}}.menu-wrapper{position:absolute;left:0;width:100%}.menu-wrapper .menu-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;box-sizing:border-box;width:100%;background-color:#dfdcda;margin:auto;position:relative;top:57px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:14px}}@media(min-width: 768px){.menu-wrapper .menu-container{width:750px}}@media(min-width: 992px){.menu-wrapper .menu-container{width:970px}}@media(min-width: 1200px){.menu-wrapper .menu-container{width:1170px}}@media print{.menu-wrapper .menu-container{display:none}}.menu-wrapper .menu-container.open{-webkit-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);-moz-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);box-shadow:0 5px 5px -2px rgba(0,0,0,.26);height:auto}.menu-wrapper .menu-container .menu-item-list-container{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;overflow:hidden;max-height:0}.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px;overflow:auto}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:450px}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList{list-style:none;margin:15px;color:#414042}.menu-wrapper .menu-container .menu-item-list-container .menuItemList:first-child{padding:15px 0 0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a{color:#414042;text-decoration:none}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0{display:flex;flex-wrap:wrap}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 100%}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 50%}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>a{border-bottom:1px solid #b6afa8;font-weight:700;padding-bottom:.75em;margin-bottom:.75em;display:block}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul{padding:0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul li{margin-bottom:12px}.menu-wrapper .menu-container .menu-actions-row{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;text-align:right;background-color:#d2cecb;max-height:0;overflow:hidden}.menu-wrapper .menu-container .menu-actions-row.open{max-height:56px}.menu-wrapper .menu-container .menu-actions-row a,.menu-wrapper .menu-container .menu-actions-row span{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row span:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row span:not(:first-child){border-left:1px solid #b6afa8}","",{version:3,sources:["webpack://./custom-elements/main-navigation/main-menu/main-menu.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,0BACI,WAAA,CACA,sBAAA,CACA,wBAAA,CACA,iBAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CCDI,0BDRR,0BAWQ,UAAA,CACA,WAAA,CAAA,CCZA,yBAAA,0BDeA,UAAA,CACA,wBAAA,CACA,UAAA,CAAA,CAEJ,+BACI,wBAAA,CAEJ,+BACI,eAAA,CACA,eAAA,CACA,eAAA,CACA,qBAAA,CACA,0CACI,YAAA,CC5BJ,yBD2BA,0CAGQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI,WAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CCjCA,0BD6BJ,8BAMQ,WAAA,CACA,UAAA,CAAA,CAIZ,cACI,iBAAA,CACA,MAAA,CACA,UAAA,CAEA,8BE1DF,iCF2D6B,CE1D7B,yBF0D6B,CACvB,qBAAA,CACA,UAAA,CACA,wBAAA,CACA,WAAA,CACA,iBAAA,CACA,QAAA,CCpDA,0BD6CJ,8BASQ,QAAA,CAAA,CC1DJ,yBDiDJ,8BAaQ,WAAA,CAAA,CClEJ,yBDqDJ,8BAgBQ,WAAA,CAAA,CCzEJ,0BDyDJ,8BAmBQ,YAAA,CAAA,CAEJ,aArBJ,8BAsBQ,YAAA,CAAA,CAGJ,mCGnFJ,iDHoFQ,CGnFR,8CHmFQ,CGlFR,yCHkFQ,CACA,WAAA,CAEJ,wDIvFJ,0CJwFQ,CIvFR,wCJuFQ,CItFR,6CJsFQ,CIrFR,qCJqFQ,CACA,eAAA,CACA,YAAA,CACA,6DACI,gBAAA,CACA,aAAA,CChFR,0BD8EI,6DAIQ,gBAAA,CAAA,CC1FZ,yBDsFI,6DAOQ,gBAAA,CAAA,CAIR,sEACI,eAAA,CACA,WAAA,CACA,aAAA,CACA,kFACI,gBAAA,CAEJ,wEACI,aAAA,CACA,oBAAA,CACA,8EACI,yBAAA,CAGR,wFACI,YAAA,CACA,cAAA,CACA,2FACI,aAAA,CC3GhB,0BD0GY,2FAGQ,YAAA,CAAA,CCrHpB,yBDkHY,2FAMQ,MAAA,CAAA,CAEJ,6FACI,+BAAA,CACA,eAAA,CACA,oBAAA,CACA,mBAAA,CACA,aAAA,CAEJ,8FACI,SAAA,CACA,iGACI,kBAAA,CAOxB,gDIhJJ,0CJiJQ,CIhJR,wCJgJQ,CI/IR,6CJ+IQ,CI9IR,qCJ8IQ,CACA,gBAAA,CACA,wBAAA,CACA,YAAA,CACA,eAAA,CACA,qDACI,eAAA,CAEJ,uGACI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,aAAA,CACA,cAAA,CACA,mHACI,yBAAA,CAEJ,2IACI,6BAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nbutton.menu-toggle-button {\n border: none;\n background: transparent;\n background-color: rgb(125, 116, 109);\n border-radius: 2px;\n color: rgb(255, 255, 255);\n cursor: pointer;\n width: 40px;\n height: 32px;\n margin-left: 4px;\n @include breakpoint(phablet) {\n width: 45px;\n height: 37px;\n }\n @include breakpoint(laptop) {\n width: 98px;\n background-color: rgb(125, 116, 109);\n color: #fff;\n }\n &.open {\n background-color: #414042;\n }\n span {\n font-size: 1.2em;\n font-weight: 700;\n padding: 2px 1px;\n vertical-align: middle;\n &.menu-title {\n display: none;\n @include breakpoint(laptop) {\n display: inline-block;\n }\n }\n &.hidden {\n display: none;\n }\n }\n svg {\n height: 24px;\n width: 24px;\n padding: 2px;\n vertical-align: middle;\n @include breakpoint(phablet) {\n height: 29px;\n width: 29px;\n }\n }\n}\n.menu-wrapper {\n position: absolute;\n left: 0;\n width: 100%;\n\n .menu-container {\n @include border-radius(0 0 3px 3px);\n box-sizing: border-box;\n width: 100%;\n background-color: #dfdcda;\n margin: auto;\n position: relative;\n top: 57px;\n @include breakpoint(phablet) {\n top: 14px;\n }\n\n @include breakpoint(tablet) {\n width: 750px;\n }\n @include breakpoint(laptop) {\n width: 970px;\n }\n @include breakpoint(desktop) {\n width: 1170px;\n }\n @media print {\n display: none;\n }\n\n &.open {\n @include box-shadow(0 5px 5px -2px rgba(0, 0, 0, 0.26));\n height: auto;\n }\n .menu-item-list-container {\n @include transition(max-height 0.3s ease-in-out);\n overflow: hidden;\n max-height: 0;\n &.open {\n max-height: 300px;\n overflow: auto;\n @include breakpoint(phablet) {\n max-height: 450px;\n }\n @include breakpoint(laptop) {\n max-height: 300px;\n }\n }\n\n .menuItemList {\n list-style: none;\n margin: 15px;\n color: #414042;\n &:first-child {\n padding: 15px 0 0;\n }\n a {\n color: #414042;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n &.hierarchy-level-0 {\n display: flex;\n flex-wrap: wrap;\n > li {\n flex: 1 0 100%;\n @include breakpoint(phablet) {\n flex: 1 0 50%;\n }\n @include breakpoint(laptop) {\n flex: 1;\n }\n > a {\n border-bottom: 1px solid #b6afa8;\n font-weight: 700;\n padding-bottom: 0.75em;\n margin-bottom: 0.75em;\n display: block;\n }\n > ul {\n padding: 0;\n li {\n margin-bottom: 12px;\n }\n }\n }\n }\n }\n }\n .menu-actions-row {\n @include transition(max-height 0.3s ease-in-out);\n text-align: right;\n background-color: #d2cecb;\n max-height: 0;\n overflow: hidden;\n &.open {\n max-height: 56px;\n }\n a, span {\n display: inline-block;\n padding: 0.25em 1em 0.25em 1.1em;\n margin: 15px 0;\n text-decoration: none;\n color: #414042;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n &:not(:first-child) {\n border-left: 1px solid #b6afa8;\n }\n }\n }\n }\n}\n',"@mixin breakpoint($point) {\n @if $point == desktop {\n @media (min-width: $screen-desktop) {\n @content;\n }\n } @else if $point == laptop {\n @media (min-width: $screen-laptop) {\n @content;\n }\n } @else if $point == tablet {\n @media (min-width: $screen-tablet) {\n @content;\n }\n } @else if $point == phablet {\n @media (min-width: $screen-phablet) {\n @content;\n }\n }\n}\n","@mixin border-radius($radius) {\n -webkit-border-radius: $radius;\n border-radius: $radius;\n}\n\n// Single side border-radius\n\n@mixin border-top-radius($radius) {\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}\n@mixin border-right-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n}\n@mixin border-bottom-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n}\n@mixin border-left-radius($radius) {\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n","\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const s=a},2287:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const i='<template>\n <button id="menu-toggle-button" class="menu-toggle-button">\n <span id="menu-title" class="menu-title">\n Meny\n </span>\n <span id="menu-icon"></span>\n <span id="close-icon"></span>\n </button>\n <div id="menu-wrapper" class="menu-wrapper">\n <div id="menu-container" class="menu-container open">\n <div id="menu-item-list-container" class="menu-item-list-container"></div>\n <div id="menu-actions-row" class="menu-actions-row"></div>\n </div>\n </div>\n</template>'},7638:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);i&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},3062:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.exports=function(e){var n,i,o=(i=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){o=!0,r=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return n}}(n,i)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(n,i)||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.")}()),r=o[1],a=o[3];if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),c="/*# ".concat(u," */"),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[r].concat(l).concat([c]).join("\n")}return[r].join("\n")}},1397:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(5969),r=n(5773),a=n(3804);t.Component=e=>t=>{var n;const s=e.tag||a.toKebabCase(t.prototype.constructor.name),u=((n=class extends t{constructor(){super(),this.props={},this.showShadowRoot=null==e.shadow||e.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((e=>a.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,i=!0){if(t!=n){i&&(this[a.toCamelCase(e)]=n);const o=this.constructor.watchAttributes;if(o&&o[e]){const i=o[e];this.__connected&&"function"==typeof this[i]&&this[i]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return i(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,o.addEventListeners(this),r.initializeProps(this)}))}render(){return i(this,void 0,void 0,(function*(){if(this.__connected)return;const t=document.createElement("template");t.innerHTML=yield this.getStyle(),e.template instanceof Promise?t.content.appendChild(yield this.getExternalTemplate()):"string"==typeof e.template&&(t.innerHTML+=e.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(t.content.cloneNode(!0))}))}getExternalTemplate(){return i(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),n=document.createRange().createContextualFragment(t);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return i(this,void 0,void 0,(function*(){let t;return e.style instanceof Promise?t=(yield e.style).default.toString():"string"==typeof e.style&&(t=e.style),t?`<style>${t}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((e,t)=>e(!0))),n);return customElements.get(s)||customElements.define(s,u),u}},985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=n},265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRootElement=t.getElement=void 0,t.getElement=e=>document.querySelector(e),t.getShadowRootElement=(e,t)=>e.shadowRoot.querySelector(t)},406:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1397),t),o(n(985),t),o(n(265),t),o(n(5969),t),o(n(5773),t),o(n(4271),t),o(n(9766),t),o(n(4938),t)},5969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const i=n(3804);t.Listen=(e,t)=>(n,i)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[i]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const i=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;i&&i.addEventListener(n.eventName,(t=>{n.handler.call(e,t)}))}}},t.Dispatch=e=>(t,n)=>{Object.defineProperty(t,n,{get:function(){const t=this;return{emit(o){const r=e||i.toDotCase(n);t.dispatchEvent(new CustomEvent(r,o))}}}})}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const i=n(3804);t.Prop=()=>(e,t)=>{const n=i.toKebabCase(t);e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return this.props[t]?this.props[t]:this.getAttribute(n)},set:function(e){if(this.__connected){const o=this.props[t];this.props[t]=i.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,o,e,!1)}else this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let n of(e=>{const t=e.constructor.watchAttributes,n=Object.assign({},t);Object.keys(n).forEach((e=>n[e]=""));const i=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(i)})(e)){if(t)if(null==t[i.toKebabCase(n)])t[i.toKebabCase(n)]="";else{const o=e.props[n]||e.getAttribute(i.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:o})}e.constructor.propsInit[n]&&(e.hasAttribute(i.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},4271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const i=n(3804);t.Toggle=()=>(e,t)=>{e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return(e=>{if(this.hasAttribute(e)){const t=this.getAttribute(e);return!!/^(true|false|^$)$/.test(t)&&("true"==t||""==t)}return!1})(t)},set:function(e){const n=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`),e=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`}this.__connected?(this.props[t]=e||!1,""!==n&&null!==n?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},9766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryParseInt=t.toDotCase=t.toCamelCase=t.toKebabCase=void 0,t.toKebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),t.toCamelCase=e=>e.toLowerCase().replace(/(\-\w)/g,(e=>e[1].toUpperCase())),t.toDotCase=e=>e.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),t.tryParseInt=e=>parseInt(e)==e&&NaN!==parseFloat(e)?parseInt(e):e},4938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const i=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[i.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},5854:e=>{e.exports='<svg aria-labelledby="svg-inline--fa-title-DQErafiATQyz" data-prefix="fas" data-icon="times" class="__2_2taji__svg-inline--fa __2_2taji__fa-times __2_2taji__fa-w-11 __2_2taji__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><title id="svg-inline--fa-title-DQErafiATQyz">Vis meny</title><path fill="#fff" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path></svg>'},7291:e=>{e.exports='<svg aria-labelledby="svg-inline--fa-title-rqezCtUcjPlp" data-prefix="fas" data-icon="bars" class="__1-Ii6EJ__svg-inline--fa __1-Ii6EJ__fa-bars __1-Ii6EJ__fa-w-14 __1-Ii6EJ__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title id="svg-inline--fa-title-rqezCtUcjPlp">Vis meny</title><path fill="#fff" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>'},4709:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainMenu=void 0;const u=n(406),c=s(n(7291)),l=s(n(5854)),d=n(9480);let p=class extends u.CustomElement{constructor(){super(),this.hideMenuContainer=()=>{this.showmenu=!1},this.renderMenuItems=(e,t=0,n=1)=>{const i=e.map((e=>{const i=e.SubMenuItem&&e.SubMenuItem.length?e.SubMenuItem:null;return`<li><a href="${e.Url}">${e.Name}</a>${i&&t+1<=n?this.renderMenuItems(i,t+1,n):""}</li>`})).join("");return`<ul class="menuItemList hierarchy-level-${t}">${i}</ul>`},this.clickOutsideMenuContainer=this.clickOutsideMenuContainer.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.menuButton=u.getShadowRootElement(this,"#menu-toggle-button"),this.menuTitle=u.getShadowRootElement(this,"#menu-title"),this.menuIcon=u.getShadowRootElement(this,"#menu-icon"),this.closeIcon=u.getShadowRootElement(this,"#close-icon"),this.menuContainer=u.getShadowRootElement(this,"#menu-container"),this.menuItemListContainer=u.getShadowRootElement(this,"#menu-item-list-container"),this.menuActionsRow=u.getShadowRootElement(this,"#menu-actions-row"),this.menuIcon.innerHTML=c.default,this.closeIcon.innerHTML=l.default,this.showmenu?this.menuIcon.classList.add("hidden"):this.closeIcon.classList.add("hidden"),d.fetchMenuItems(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.signinurl&&this.signouturl&&this.addAuthenticationLinks(),this.englishurl&&this.norwegianurl&&this.addLanguageSelectLinks(),document.addEventListener("click",this.clickOutsideMenuContainer)}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideMenuContainer)}clickOutsideMenuContainer(e){const t=e.composedPath()[0];t.closest("#menu-container"),t.closest("#menu-container")||t.closest("#menu-toggle-button")||this.hideMenuContainer()}addAuthenticationLinks(e=!1){let t;if(!(this.signouturl&&this.signinurl||e))return"";e?(t=document.createElement("span"),t.addEventListener("click",(()=>{this.isloggedin?this.onSignOutClick.emit():this.onSignInClick.emit()}))):(t=document.createElement("a"),t.href=this.isloggedin?this.signouturl:this.signinurl);const n="en"===this.language?"Log in":"Logg inn",i="en"===this.language?"Log out":"Logg ut";t.innerText=this.isloggedin?i:n,t.id="authentication-toggle-element";for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.menuActionsRow.appendChild(t)}addLanguageSelectLinks(e=!1){let t;if(!(this.norwegianurl&&this.englishurl||e))return"";e?(t=document.createElement("span"),t.addEventListener("click",(()=>{"en"===this.language?this.onNorwegianLanguageSelect.emit():this.onEnglishLanguageSelect.emit()}))):(t=document.createElement("a"),t.href="en"===this.language?this.norwegianurl:this.englishurl),t.innerText="en"===this.language?"Norsk":"English",t.id="language-toggle-element";for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.menuActionsRow.appendChild(t)}buttonClicked(e){this.showmenu=!this.showmenu}hasAuthenticationFunctionChanged(){this.hasAuthenticationFunction&&this.addAuthenticationLinks(!0)}isLoggedInChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction)}hasLanguageSelectFunctionsChanged(){this.hasLanguageSelectFunctions&&this.addLanguageSelectLinks(!0)}languageChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction),this.addLanguageSelectLinks(this.hasLanguageSelectFunctions),d.fetchMenuItems(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny")}showMenuChanged(){this.showmenu?this.menuContainer.classList.add("open"):this.menuContainer.classList.remove("open"),this.showmenu?this.menuButton.classList.add("open"):this.menuButton.classList.remove("open"),this.showmenu?this.menuItemListContainer.classList.add("open"):this.menuItemListContainer.classList.remove("open"),this.showmenu?this.menuActionsRow.classList.add("open"):this.menuActionsRow.classList.remove("open"),this.showmenu?this.menuIcon.classList.add("hidden"):this.menuIcon.classList.remove("hidden"),this.showmenu?this.closeIcon.classList.remove("hidden"):this.closeIcon.classList.add("hidden")}menuItemsChanged(){this.menuitems&&this.menuitems.length&&(this.menuItemListContainer.innerHTML=this.renderMenuItems(this.menuitems))}static setup(e,t){const n=u.getElement(e);t.onClick&&n.addEventListener("menuButtonClick",t.onClick),t.active&&(n.showmenu=t.active)}};p.elementSelector="main-menu",r([u.Prop()],p.prototype,"id",void 0),r([u.Prop()],p.prototype,"language",void 0),r([u.Prop()],p.prototype,"environment",void 0),r([u.Prop()],p.prototype,"signinurl",void 0),r([u.Prop()],p.prototype,"signouturl",void 0),r([u.Prop()],p.prototype,"norwegianurl",void 0),r([u.Prop()],p.prototype,"englishurl",void 0),r([u.Toggle()],p.prototype,"isloggedin",void 0),r([u.Toggle()],p.prototype,"showmenu",void 0),r([u.Toggle()],p.prototype,"hasAuthenticationFunction",void 0),r([u.Toggle()],p.prototype,"hasLanguageSelectFunctions",void 0),r([u.Prop()],p.prototype,"menuitems",void 0),r([u.Dispatch("onSignInClick")],p.prototype,"onSignInClick",void 0),r([u.Dispatch("onSignOutClick")],p.prototype,"onSignOutClick",void 0),r([u.Dispatch("onNorwegianLanguageSelect")],p.prototype,"onNorwegianLanguageSelect",void 0),r([u.Dispatch("onEnglishLanguageSelect")],p.prototype,"onEnglishLanguageSelect",void 0),r([u.Listen("click","#menu-toggle-button")],p.prototype,"buttonClicked",null),r([u.Watch("hasauthenticationfunction")],p.prototype,"hasAuthenticationFunctionChanged",null),r([u.Watch("isloggedin")],p.prototype,"isLoggedInChanged",null),r([u.Watch("haslanguageselectfunctions")],p.prototype,"hasLanguageSelectFunctionsChanged",null),r([u.Watch("language")],p.prototype,"languageChanged",null),r([u.Watch("showmenu")],p.prototype,"showMenuChanged",null),r([u.Watch("menuitems")],p.prototype,"menuItemsChanged",null),p=r([u.Component({tag:"main-menu",template:Promise.resolve().then((()=>a(n(2287)))),style:Promise.resolve().then((()=>a(n(4667))))})],p),t.MainMenu=p},9480:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function s(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchDropdownSearchResults=t.fetchMenuItems=t.getGeonorgeMenuUrl=t.getKartkatalogApiUrl=void 0,t.getKartkatalogApiUrl=e=>`https://kartkatalog.${"dev"===e||"test"===e?e+".":""}geonorge.no/api`,t.getGeonorgeMenuUrl=(e,t)=>`https://www.${"dev"===t||"test"===t?"test.":""}geonorge.no/${"en"===e?"en/":""}api/menu/get?omitLinks=1`,t.fetchMenuItems=(e="no",n="")=>{const i=t.getGeonorgeMenuUrl(e,n);return fetch(i).then((e=>e.json())).then((e=>e))},t.fetchDropdownSearchResults=(e="",i="no",o="")=>n(void 0,void 0,void 0,(function*(){const r={dataset:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=dataset`,series:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=series`,service:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=service`,servicelayer:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=servicelayer`,software:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=software`,articles:`articles?text=${e}`},a={headers:new Headers({"Accept-Language":i})};return e&&e.length?yield Promise.all(Object.keys(r).map((e=>n(void 0,void 0,void 0,(function*(){const n=t.getKartkatalogApiUrl(o);return fetch(`${n}/${r[e]}&limit=5`,a).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))}},t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={id:i,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(4709)})()}));
//# sourceMappingURL=MainMenu.js.map
{
"name": "@kartverket/geonorge-web-components",
"version": "0.1.42",
"version": "0.1.43",
"description": "Geonorge Web Components",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc