@kartverket/geonorge-web-components
Advanced tools
Comparing version 0.1.54 to 0.1.55
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.DataTable=e())}(self,(function(){return(()=>{"use strict";var t={5741:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(3062),r=n.n(o),i=n(7638),a=n.n(i)()(r());a.push([t.id,"div#data-table table{border-collapse:collapse;width:100%}div#data-table table thead tr th{border-bottom:2px solid #fe5000;color:#3767c7;font-weight:normal;height:27px;line-height:20px;text-align:left;text-transform:uppercase;padding:8px 8px 0}div#data-table table tbody tr td{padding:8px;border-bottom:1px solid #d8d8d8;line-height:20px}div#data-table table img,div#data-table table svg{max-height:20px}div#data-table table.hoverable tbody tr{-moz-transition:background-color .15s ease-in-out;-o-transition:background-color .15s ease-in-out;-webkit-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}div#data-table table.hoverable tbody tr:hover{background-color:rgba(0,0,0,.05)}","",{version:3,sources:["webpack://./custom-elements/data-table/data-table.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAGE,qBACE,wBAAA,CACA,UAAA,CAGI,iCACE,+BAAA,CACA,aCIK,CDHL,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,eAAA,CACA,wBAAA,CACA,iBAAA,CAMF,iCACE,WAAA,CACA,+BAAA,CACA,gBAAA,CAIN,kDAEE,eAAA,CAIE,wCElCJ,iDFmCM,CElCN,+CFkCM,CEjCN,oDFiCM,CEhCN,4CFgCM,CACA,8CACE,gCCpCO",sourcesContent:['@import "../../style/all";\n\ndiv#data-table {\n table {\n border-collapse: collapse;\n width: 100%;\n thead {\n tr {\n th {\n border-bottom: 2px solid $primary-brand;\n color: $primary-text;\n font-weight: normal;\n height: 27px;\n line-height: 20px;\n text-align: left;\n text-transform: uppercase;\n padding: 8px 8px 0;\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 8px;\n border-bottom: 1px solid $default-border;\n line-height: 20px;\n }\n }\n }\n img,\n svg {\n max-height: 20px;\n }\n &.hoverable {\n tbody {\n tr {\n @include transition(background-color 0.15s ease-in-out);\n &:hover {\n background-color: $hover-background;\n }\n }\n }\n }\n }\n}\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\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},7061:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div id="data-table"></div>\n</div>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},3062:t=>{function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n,o,r=(o=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(i.push(o.value),!e||i.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}}(n,o)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(n,o)||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.")}()),i=r[1],a=r[3];if(!a)return i;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),l="/*# ".concat(c," */"),d=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[i].concat(d).concat([l]).join("\n")}return[i].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),i.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5641:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.DataTable=void 0;const s=n(406);let c=class extends s.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.querySelectorAll("table"),this.childNodes.forEach((t=>{this.appendChild(t)})),this.dataTableElement=this.querySelector("table"),this.dataTableTemplateElement=(0,s.getShadowRootElement)(this,"#data-table"),this.hoverable&&this.dataTableElement.classList.add("hoverable"),this.dataTableTemplateElement.appendChild(this.dataTableElement)}static setup(t,e){(0,s.getElement)(t)}};c.elementSelector="data-table",i([(0,s.Prop)()],c.prototype,"id",void 0),i([(0,s.Toggle)()],c.prototype,"hoverable",void 0),c=i([(0,s.Component)({tag:"data-table",template:Promise.resolve().then((()=>a(n(7061)))),style:Promise.resolve().then((()=>a(n(5741))))})],c),e.DataTable=c}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(5641)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.DataTable=e())}(self,(()=>(()=>{"use strict";var t={5741:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(4663),r=n.n(o),i=n(7638),a=n.n(i)()(r());a.push([t.id,"div#data-table table{border-collapse:collapse;width:100%}div#data-table table thead tr th{border-bottom:2px solid #fe5000;color:#3767c7;font-weight:normal;height:27px;line-height:20px;text-align:left;text-transform:uppercase;padding:8px 8px 0}div#data-table table tbody tr td{padding:8px;border-bottom:1px solid #d8d8d8;line-height:20px}div#data-table table img,div#data-table table svg{max-height:20px}div#data-table table.hoverable tbody tr{-moz-transition:background-color .15s ease-in-out;-o-transition:background-color .15s ease-in-out;-webkit-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}div#data-table table.hoverable tbody tr:hover{background-color:rgba(0,0,0,.05)}","",{version:3,sources:["webpack://./custom-elements/data-table/data-table.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAGE,qBACE,wBAAA,CACA,UAAA,CAGI,iCACE,+BAAA,CACA,aCIK,CDHL,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,eAAA,CACA,wBAAA,CACA,iBAAA,CAMF,iCACE,WAAA,CACA,+BAAA,CACA,gBAAA,CAIN,kDAEE,eAAA,CAIE,wCElCJ,iDFmCM,CElCN,+CFkCM,CEjCN,oDFiCM,CEhCN,4CFgCM,CACA,8CACE,gCCpCO",sourcesContent:['@import "../../style/all";\n\ndiv#data-table {\n table {\n border-collapse: collapse;\n width: 100%;\n thead {\n tr {\n th {\n border-bottom: 2px solid $primary-brand;\n color: $primary-text;\n font-weight: normal;\n height: 27px;\n line-height: 20px;\n text-align: left;\n text-transform: uppercase;\n padding: 8px 8px 0;\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 8px;\n border-bottom: 1px solid $default-border;\n line-height: 20px;\n }\n }\n }\n img,\n svg {\n max-height: 20px;\n }\n &.hoverable {\n tbody {\n tr {\n @include transition(background-color 0.15s ease-in-out);\n &:hover {\n background-color: $hover-background;\n }\n }\n }\n }\n }\n}\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\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},7061:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div id="data-table"></div>\n</div>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},4663:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([i]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),i.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5641:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.DataTable=void 0;const s=n(406);let c=class extends s.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.querySelectorAll("table"),this.childNodes.forEach((t=>{this.appendChild(t)})),this.dataTableElement=this.querySelector("table"),this.dataTableTemplateElement=(0,s.getShadowRootElement)(this,"#data-table"),this.hoverable&&this.dataTableElement.classList.add("hoverable"),this.dataTableTemplateElement.appendChild(this.dataTableElement)}static setup(t,e){(0,s.getElement)(t)}};c.elementSelector="data-table",i([(0,s.Prop)()],c.prototype,"id",void 0),i([(0,s.Toggle)()],c.prototype,"hoverable",void 0),c=i([(0,s.Component)({tag:"data-table",template:Promise.resolve().then((()=>a(n(7061)))),style:Promise.resolve().then((()=>a(n(5741))))})],c),e.DataTable=c}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(5641)})())); | ||
//# sourceMappingURL=DataTable.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.DownloadItem=e())}(self,(function(){return(()=>{var t={9474:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(3062),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([t.id,"*{box-sizing:border-box}.download-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:transparent;color:#7d746d;padding:0;cursor:pointer}@media(min-width: 37.5em){.download-items-container .icon-toggle-button{padding:0 4px}}.download-items-container .icon-toggle-button.open{color:#414042}.download-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}.download-items-container .icon-toggle-button .counter.hidden{display:none}.download-items-container .icon-toggle-button .download-icon svg{width:45px;height:32px}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .download-icon svg{width:52px;height:37px}}.download-items-container .download-item-list-wrapper{position:absolute}.download-items-container .download-item-list-wrapper .download-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){.download-items-container .download-item-list-wrapper .download-item-list-container{right:245px;width:300px}}@media print{.download-items-container .download-item-list-wrapper .download-item-list-container{display:none}}.download-items-container .download-item-list-wrapper .download-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}.download-items-container .download-item-list-wrapper .download-item-list-container ul{list-style:none;padding:0;margin:0}.download-items-container .download-item-list-wrapper .download-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.download-items-container .download-item-list-wrapper .download-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}","",{version:3,sources:["webpack://./custom-elements/main-navigation/download-items/download-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAIA,8CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,sBAAA,CACA,aAAA,CACA,SAAA,CAIA,cAAA,CEFA,0BFPJ,8CAOQ,aAAA,CAAA,CAGJ,mDACI,aAAA,CAEJ,uDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,uDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,8DACI,YAAA,CAIJ,iEACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,iEAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,sDACI,iBAAA,CACA,oFItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,oFAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,oFAgBQ,YAAA,CAAA,CAEJ,yFKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,uGACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,6GACI,yBAAA,CACA,aG7EA,CHgFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCGxGL,CH0GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aGrFd,CHsFc,UAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\n.download-items-container {\n .icon-toggle-button {\n @include transition(all 0.1s ease-in-out);\n border: none;\n background: transparent;\n color: #7d746d;\n padding: 0;\n @include breakpoint(phablet) {\n padding: 0 4px;\n }\n cursor: pointer;\n &.open {\n color: #414042;\n }\n .counter {\n background-color: $primary-brand;\n border-radius: 50%;\n color: #fff;\n margin-top: -0.25em;\n margin-left: -0.2em;\n position: absolute;\n text-align: center;\n width: 1.4em;\n line-height: 1.4;\n height: 1.4em;\n font-size: 0.9em;\n @include breakpoint(phablet) {\n height: 1.5em;\n width: 1.5em;\n line-height: 1.5;\n font-size: 1em;\n }\n &.hidden {\n display: none;\n }\n }\n .download-icon {\n svg {\n width: 45px;\n height: 32px;\n @include breakpoint(phablet) {\n width: 52px;\n height: 37px;\n }\n }\n }\n }\n .download-item-list-wrapper {\n position: absolute;\n .download-item-list-container {\n @include border-radius(0 0 3px 3px);\n @include transition(all 0.1s ease-in-out);\n box-sizing: border-box;\n overflow: hidden;\n max-height: 0;\n position: relative;\n top: 10px;\n background-color: #fbfcfd;\n right: 205px;\n width: 260px;\n @include breakpoint(phablet) {\n right: 245px;\n width: 300px;\n }\n @media print {\n display: none;\n }\n &.open {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n height: auto;\n max-height: 300px;\n overflow: auto;\n }\n .page-link-element {\n display: block;\n text-align: center;\n padding: 8px 16px;\n color: $primary-text;\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n color: $primary-text-hover;\n }\n }\n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n li {\n @include transition(all 0.15s ease-in-out);\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n &:hover {\n background-color: $hover-background;\n }\n .list-icon {\n margin-left: 8px;\n cursor: pointer;\n background: none;\n border: none;\n svg {\n color: $danger-text;\n width: 20px;\n }\n }\n }\n }\n }\n }\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","@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","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\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"],sourceRoot:""}]);const s=a},1942:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div class="download-items-container">\n <button id="download-toggle-button" class="icon-toggle-button">\n <span id="download-toggle-button-counter" class="counter"></span>\n <span id="download-toggle-button-icon" class="download-icon"></span>\n </button>\n <div class="download-item-list-wrapper">\n <div id="download-item-list-container" class="download-item-list-container"></div>\n </div>\n </div>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var d=[].concat(t[s]);o&&i[d[0]]||(n&&(d[2]?d[2]="".concat(n," and ").concat(d[2]):d[2]=n),e.push(d))}},e}},3062:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n,o,i=(o=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(n,o)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(n,o)||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=i[1],a=i[3];if(!a)return r;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),d="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),l="/*# ".concat(d," */"),c=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[r].concat(c).concat([l]).join("\n")}return[r].join("\n")}},1397:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{d(o.next(t))}catch(t){r(t)}}function s(t){try{d(o.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}d((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const i=n(5969),r=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),d=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const i=this.constructor.watchAttributes;if(i&&i[t]){const o=i[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,i.addEventListeners(this),r.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,d),d}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1397),e),i(n(985),e),i(n(265),e),i(n(5969),e),i(n(5773),e),i(n(4271),e),i(n(9766),e),i(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(i){const r=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(r,i))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const i=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,i,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const i=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:i})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5195:t=>{t.exports='<svg viewBox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1.000000, -9.000000)" fill="currentColor" class="__176tcrb__downloads__cloud "><path d="M25,9 C19.22,9 14.2,12.28 11.7,17.08 C5.68,17.72 1,22.82 1,29 C1,35.62 6.38,41 13,41 L39,41 C44.52,41 49,36.52 49,31 C49,25.72 44.9,21.44 39.7,21.08 C38.34,14.18 32.28,9 25,9 Z M35,27 L25,37 L15,27 L21,27 L21,19 L29,19 L29,27 L35,27 L35,27 Z" id="Shape"></path></g></g></svg>'},2374:t=>{t.exports='<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="trash" class="__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"></path></svg>'},3075:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadItems=void 0;const d=n(406),l=s(n(5195)),c=s(n(2374)),u=n(9399),p=n(1406);let g=class extends d.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showList=!1},this.renderDownloadItems=t=>{const e=t.map((t=>{if(t){const e=document.createElement("span");e.innerText=t.name;const n=document.createElement("button");return n.classList.add("list-icon"),n.innerHTML=c.default,n.dataset.downloadItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.name} from downloads`:`Fjern ${t.name} fra kurv`),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("span"),n.addEventListener("click",(()=>{this.onOpenEmptyDownloadItemsList.emit()}))):(n=document.createElement("a"),n.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`),n.innerText="en"===this.language?"Go to download":"Til nedlasting",n.classList.add("page-link-element"),this.downloadItemListContainer.innerHTML=`<ul>${e}</ul>`,this.downloadItemListContainer.prepend(n)},this.clickOutsideDownloadItemsContainer=this.clickOutsideDownloadItemsContainer.bind(this),this.updateDomElements=this.updateDomElements.bind(this),this.getUpdatedDownloadItems=this.getUpdatedDownloadItems.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.downloadButton=(0,d.getShadowRootElement)(this,"#download-toggle-button"),this.downloadIcon=(0,d.getShadowRootElement)(this,"#download-toggle-button-icon"),this.downloadIconCounter=(0,d.getShadowRootElement)(this,"#download-toggle-button-counter"),this.downloadItemListContainer=(0,d.getShadowRootElement)(this,"#download-item-list-container"),this.getUpdatedDownloadItems(),this.downloadIcon.innerHTML=l.default,this.renderDownloadItemsCounter(),document.addEventListener("click",this.clickOutsideDownloadItemsContainer),document.addEventListener("downloadItemsChanged",this.updateDomElements)}updateDomElements(){this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter()}getUpdatedDownloadItems(){const t=(0,u.getDownloadItems)();this.downloadItems=t.map((t=>(0,u.getDownloadItemMetadata)(t))).filter((t=>t))}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideDownloadItemsContainer)}clickOutsideDownloadItemsContainer(t){const e=t.composedPath()[0];e.closest("#download-item-list-container")||e.closest("#download-toggle-button")||this.hideListContainer()}renderDownloadItemsCounter(){const t=(0,u.getDownloadItemsCount)();t?(this.downloadIconCounter.innerHTML=t.toString(),this.downloadIconCounter.classList.remove("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Show download item list":"Vis liste med elementer til nedlasting")):(this.downloadIconCounter.innerHTML="",this.downloadIconCounter.classList.add("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Go to download page":"Gå til nedlastingsside"))}buttonClicked(t){this.downloadItems&&this.downloadItems.length?this.showList=!this.showList:(this.showList=!1,this.preventRedirect?this.onOpenEmptyDownloadItemsList.emit():window.location.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`)}removeDownloadItemClicked(t){const e=t.composedPath()[0];e.closest("#menu-container");const n=e.closest("button");if(n){const e=n.dataset&&n.dataset.downloadItem?JSON.parse(n.dataset.downloadItem):null;e&&(t.stopPropagation(),(0,u.removeDownloadItem)(e),this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter(),this.downloadItems&&this.downloadItems.length||(this.showList=!1))}}showMenuChanged(){this.showList?this.downloadItemListContainer.classList.add("open"):this.downloadItemListContainer.classList.remove("open"),this.showList?this.downloadButton.classList.add("open"):this.downloadButton.classList.remove("open")}downloadItemsChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}languageChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}preventRedirectChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}static setup(t,e){const n=(0,d.getElement)(t);e.active&&(n.showList=e.active)}};g.elementSelector="download-items",r([(0,d.Prop)()],g.prototype,"id",void 0),r([(0,d.Prop)()],g.prototype,"environment",void 0),r([(0,d.Prop)()],g.prototype,"language",void 0),r([(0,d.Toggle)()],g.prototype,"showList",void 0),r([(0,d.Toggle)()],g.prototype,"preventRedirect",void 0),r([(0,d.Dispatch)("onOpenEmptyDownloadItemsList")],g.prototype,"onOpenEmptyDownloadItemsList",void 0),r([(0,d.Listen)("click","#download-toggle-button")],g.prototype,"buttonClicked",null),r([(0,d.Listen)("click","#download-item-list-container")],g.prototype,"removeDownloadItemClicked",null),r([(0,d.Watch)("showlist")],g.prototype,"showMenuChanged",null),r([(0,d.Watch)("downloadItems")],g.prototype,"downloadItemsChanged",null),r([(0,d.Watch)("language")],g.prototype,"languageChanged",null),r([(0,d.Watch)("preventredirect")],g.prototype,"preventRedirectChanged",null),g=r([(0,d.Component)({tag:"download-items",template:Promise.resolve().then((()=>a(n(1942)))),style:Promise.resolve().then((()=>a(n(9474))))})],g),e.DownloadItems=g},4724:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguage=e.getLanguage=e.setCookie=e.getCookie=void 0,e.getCookie=t=>{const e=`${t}=`,n=decodeURIComponent(document.cookie).split(";");for(var o=0;o<n.length;o++){let t=n[o];for(;" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf(e))return t.substring(e.length,t.length)}return""},e.setCookie=(t,e,n)=>{let o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);const i=`expires=${o.toUTCString()}`,r="localhost"===window.location.hostname?"":"domain=-geonorge.no";document.cookie=`${t}=${e};${i};path=/;${r}`},e.getLanguage=()=>(0,e.getCookie)("_culture"),e.setLanguage=t=>{(0,e.setCookie)("_culture",t,7)}},9399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDownloadItem=e.getDownloadItemMetadata=e.getDownloadItemsCount=e.getDownloadItems=void 0;const o=n(4724);e.getDownloadItems=()=>localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems).filter((t=>t)):[],e.getDownloadItemsCount=()=>{if(-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"))return(0,e.getDownloadItems)().length;{const t=parseInt((0,o.getCookie)("orderItems"));return t&&!isNaN(t)?t:0}},e.getDownloadItemMetadata=t=>localStorage[t+".metadata"]?JSON.parse(localStorage[t+".metadata"]):null,e.removeDownloadItem=t=>{let e=localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems):[];localStorage.orderItems=JSON.stringify(e.filter((e=>e!==t.uuid))),localStorage.removeItem(t.uuid+".metadata")}},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,i,r,a)=>"articles"===n?`<a onClick="${o(i,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(i,a)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(3075)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.DownloadItem=e())}(self,(()=>(()=>{var t={9474:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([t.id,"*{box-sizing:border-box}.download-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:rgba(0,0,0,0);color:#7d746d;padding:0;cursor:pointer}@media(min-width: 37.5em){.download-items-container .icon-toggle-button{padding:0 4px}}.download-items-container .icon-toggle-button.open{color:#414042}.download-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}.download-items-container .icon-toggle-button .counter.hidden{display:none}.download-items-container .icon-toggle-button .download-icon svg{width:45px;height:32px}@media(min-width: 37.5em){.download-items-container .icon-toggle-button .download-icon svg{width:52px;height:37px}}.download-items-container .download-item-list-wrapper{position:absolute}.download-items-container .download-item-list-wrapper .download-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){.download-items-container .download-item-list-wrapper .download-item-list-container{right:245px;width:300px}}@media print{.download-items-container .download-item-list-wrapper .download-item-list-container{display:none}}.download-items-container .download-item-list-wrapper .download-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}.download-items-container .download-item-list-wrapper .download-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}.download-items-container .download-item-list-wrapper .download-item-list-container ul{list-style:none;padding:0;margin:0}.download-items-container .download-item-list-wrapper .download-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.download-items-container .download-item-list-wrapper .download-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}.download-items-container .download-item-list-wrapper .download-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}","",{version:3,sources:["webpack://./custom-elements/main-navigation/download-items/download-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAIA,8CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,SAAA,CAIA,cAAA,CEFA,0BFPJ,8CAOQ,aAAA,CAAA,CAGJ,mDACI,aAAA,CAEJ,uDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,uDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,8DACI,YAAA,CAIJ,iEACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,iEAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,sDACI,iBAAA,CACA,oFItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,oFAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,oFAgBQ,YAAA,CAAA,CAEJ,yFKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,uGACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,6GACI,yBAAA,CACA,aG7EA,CHgFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCGxGL,CH0GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aGrFd,CHsFc,UAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\n.download-items-container {\n .icon-toggle-button {\n @include transition(all 0.1s ease-in-out);\n border: none;\n background: transparent;\n color: #7d746d;\n padding: 0;\n @include breakpoint(phablet) {\n padding: 0 4px;\n }\n cursor: pointer;\n &.open {\n color: #414042;\n }\n .counter {\n background-color: $primary-brand;\n border-radius: 50%;\n color: #fff;\n margin-top: -0.25em;\n margin-left: -0.2em;\n position: absolute;\n text-align: center;\n width: 1.4em;\n line-height: 1.4;\n height: 1.4em;\n font-size: 0.9em;\n @include breakpoint(phablet) {\n height: 1.5em;\n width: 1.5em;\n line-height: 1.5;\n font-size: 1em;\n }\n &.hidden {\n display: none;\n }\n }\n .download-icon {\n svg {\n width: 45px;\n height: 32px;\n @include breakpoint(phablet) {\n width: 52px;\n height: 37px;\n }\n }\n }\n }\n .download-item-list-wrapper {\n position: absolute;\n .download-item-list-container {\n @include border-radius(0 0 3px 3px);\n @include transition(all 0.1s ease-in-out);\n box-sizing: border-box;\n overflow: hidden;\n max-height: 0;\n position: relative;\n top: 10px;\n background-color: #fbfcfd;\n right: 205px;\n width: 260px;\n @include breakpoint(phablet) {\n right: 245px;\n width: 300px;\n }\n @media print {\n display: none;\n }\n &.open {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n height: auto;\n max-height: 300px;\n overflow: auto;\n }\n .page-link-element {\n display: block;\n text-align: center;\n padding: 8px 16px;\n color: $primary-text;\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n color: $primary-text-hover;\n }\n }\n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n li {\n @include transition(all 0.15s ease-in-out);\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n &:hover {\n background-color: $hover-background;\n }\n .list-icon {\n margin-left: 8px;\n cursor: pointer;\n background: none;\n border: none;\n svg {\n color: $danger-text;\n width: 20px;\n }\n }\n }\n }\n }\n }\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","@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","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\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"],sourceRoot:""}]);const s=a},1942:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div class="download-items-container">\n <button id="download-toggle-button" class="icon-toggle-button">\n <span id="download-toggle-button-counter" class="counter"></span>\n <span id="download-toggle-button-icon" class="download-icon"></span>\n </button>\n <div class="download-item-list-wrapper">\n <div id="download-item-list-container" class="download-item-list-container"></div>\n </div>\n </div>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var d=this[s][0];null!=d&&(a[d]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);o&&a[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},4663:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([r]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{d(o.next(t))}catch(t){r(t)}}function s(t){try{d(o.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}d((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const i=n(5969),r=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),d=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const i=this.constructor.watchAttributes;if(i&&i[t]){const o=i[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,i.addEventListeners(this),r.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,d),d}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1397),e),i(n(985),e),i(n(265),e),i(n(5969),e),i(n(5773),e),i(n(4271),e),i(n(9766),e),i(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(i){const r=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(r,i))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const i=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,i,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const i=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:i})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5195:t=>{t.exports='<svg viewBox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1.000000, -9.000000)" fill="currentColor" class="__176tcrb__downloads__cloud "><path d="M25,9 C19.22,9 14.2,12.28 11.7,17.08 C5.68,17.72 1,22.82 1,29 C1,35.62 6.38,41 13,41 L39,41 C44.52,41 49,36.52 49,31 C49,25.72 44.9,21.44 39.7,21.08 C38.34,14.18 32.28,9 25,9 Z M35,27 L25,37 L15,27 L21,27 L21,19 L29,19 L29,27 L35,27 L35,27 Z" id="Shape"></path></g></g></svg>'},2374:t=>{t.exports='<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="trash" class="__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"></path></svg>'},3075:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadItems=void 0;const d=n(406),l=s(n(5195)),c=s(n(2374)),u=n(9399),p=n(1406);let g=class extends d.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showList=!1},this.renderDownloadItems=t=>{const e=t.map((t=>{if(t){const e=document.createElement("span");e.innerText=t.name;const n=document.createElement("button");return n.classList.add("list-icon"),n.innerHTML=c.default,n.dataset.downloadItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.name} from downloads`:`Fjern ${t.name} fra kurv`),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("span"),n.addEventListener("click",(()=>{this.onOpenEmptyDownloadItemsList.emit()}))):(n=document.createElement("a"),n.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`),n.innerText="en"===this.language?"Go to download":"Til nedlasting",n.classList.add("page-link-element"),this.downloadItemListContainer.innerHTML=`<ul>${e}</ul>`,this.downloadItemListContainer.prepend(n)},this.clickOutsideDownloadItemsContainer=this.clickOutsideDownloadItemsContainer.bind(this),this.updateDomElements=this.updateDomElements.bind(this),this.getUpdatedDownloadItems=this.getUpdatedDownloadItems.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.downloadButton=(0,d.getShadowRootElement)(this,"#download-toggle-button"),this.downloadIcon=(0,d.getShadowRootElement)(this,"#download-toggle-button-icon"),this.downloadIconCounter=(0,d.getShadowRootElement)(this,"#download-toggle-button-counter"),this.downloadItemListContainer=(0,d.getShadowRootElement)(this,"#download-item-list-container"),this.getUpdatedDownloadItems(),this.downloadIcon.innerHTML=l.default,this.renderDownloadItemsCounter(),document.addEventListener("click",this.clickOutsideDownloadItemsContainer),document.addEventListener("downloadItemsChanged",this.updateDomElements)}updateDomElements(){this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter()}getUpdatedDownloadItems(){const t=(0,u.getDownloadItems)();this.downloadItems=t.map((t=>(0,u.getDownloadItemMetadata)(t))).filter((t=>t))}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideDownloadItemsContainer)}clickOutsideDownloadItemsContainer(t){const e=t.composedPath()[0];e.closest("#download-item-list-container")||e.closest("#download-toggle-button")||this.hideListContainer()}renderDownloadItemsCounter(){const t=(0,u.getDownloadItemsCount)();t?(this.downloadIconCounter.innerHTML=t.toString(),this.downloadIconCounter.classList.remove("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Show download item list":"Vis liste med elementer til nedlasting")):(this.downloadIconCounter.innerHTML="",this.downloadIconCounter.classList.add("hidden"),this.downloadButton.setAttribute("aria-label","en"===this.language?"Go to download page":"Gå til nedlastingsside"))}buttonClicked(t){this.downloadItems&&this.downloadItems.length?this.showList=!this.showList:(this.showList=!1,this.preventRedirect?this.onOpenEmptyDownloadItemsList.emit():window.location.href=`${(0,p.getKartkatalogUrl)(this.environment)}/nedlasting`)}removeDownloadItemClicked(t){const e=t.composedPath()[0];e.closest("#menu-container");const n=e.closest("button");if(n){const e=n.dataset&&n.dataset.downloadItem?JSON.parse(n.dataset.downloadItem):null;e&&(t.stopPropagation(),(0,u.removeDownloadItem)(e),this.getUpdatedDownloadItems(),this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter(),this.downloadItems&&this.downloadItems.length||(this.showList=!1))}}showMenuChanged(){this.showList?this.downloadItemListContainer.classList.add("open"):this.downloadItemListContainer.classList.remove("open"),this.showList?this.downloadButton.classList.add("open"):this.downloadButton.classList.remove("open")}downloadItemsChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}languageChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}preventRedirectChanged(){this.downloadItems&&this.downloadItems.length&&(this.renderDownloadItems(this.downloadItems),this.renderDownloadItemsCounter())}static setup(t,e){const n=(0,d.getElement)(t);e.active&&(n.showList=e.active)}};g.elementSelector="download-items",r([(0,d.Prop)()],g.prototype,"id",void 0),r([(0,d.Prop)()],g.prototype,"environment",void 0),r([(0,d.Prop)()],g.prototype,"language",void 0),r([(0,d.Toggle)()],g.prototype,"showList",void 0),r([(0,d.Toggle)()],g.prototype,"preventRedirect",void 0),r([(0,d.Dispatch)("onOpenEmptyDownloadItemsList")],g.prototype,"onOpenEmptyDownloadItemsList",void 0),r([(0,d.Listen)("click","#download-toggle-button")],g.prototype,"buttonClicked",null),r([(0,d.Listen)("click","#download-item-list-container")],g.prototype,"removeDownloadItemClicked",null),r([(0,d.Watch)("showlist")],g.prototype,"showMenuChanged",null),r([(0,d.Watch)("downloadItems")],g.prototype,"downloadItemsChanged",null),r([(0,d.Watch)("language")],g.prototype,"languageChanged",null),r([(0,d.Watch)("preventredirect")],g.prototype,"preventRedirectChanged",null),g=r([(0,d.Component)({tag:"download-items",template:Promise.resolve().then((()=>a(n(1942)))),style:Promise.resolve().then((()=>a(n(9474))))})],g),e.DownloadItems=g},4724:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguage=e.getLanguage=e.setCookie=e.getCookie=void 0,e.getCookie=t=>{const e=`${t}=`,n=decodeURIComponent(document.cookie).split(";");for(var o=0;o<n.length;o++){let t=n[o];for(;" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf(e))return t.substring(e.length,t.length)}return""},e.setCookie=(t,e,n)=>{let o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);const i=`expires=${o.toUTCString()}`,r="localhost"===window.location.hostname?"":"domain=-geonorge.no";document.cookie=`${t}=${e};${i};path=/;${r}`},e.getLanguage=()=>(0,e.getCookie)("_culture"),e.setLanguage=t=>{(0,e.setCookie)("_culture",t,7)}},9399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDownloadItem=e.getDownloadItemMetadata=e.getDownloadItemsCount=e.getDownloadItems=void 0;const o=n(4724);e.getDownloadItems=()=>localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems).filter((t=>t)):[],e.getDownloadItemsCount=()=>{if(-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"))return(0,e.getDownloadItems)().length;{const t=parseInt((0,o.getCookie)("orderItems"));return t&&!isNaN(t)?t:0}},e.getDownloadItemMetadata=t=>localStorage[t+".metadata"]?JSON.parse(localStorage[t+".metadata"]):null,e.removeDownloadItem=t=>{let e=localStorage.orderItems&&Array.isArray(JSON.parse(localStorage.orderItems))?JSON.parse(localStorage.orderItems):[];localStorage.orderItems=JSON.stringify(e.filter((e=>e!==t.uuid))),localStorage.removeItem(t.uuid+".metadata")}},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,i,r,a)=>"articles"===n?`<a onClick="${o(i,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(i,a)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(3075)})())); | ||
//# sourceMappingURL=DownloadItem.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GeonorgeFooter=e())}(self,(function(){return(()=>{var t={1325:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(3062),r=n.n(o),i=n(7638),a=n.n(i)()(r());a.push([t.id,'*{box-sizing:border-box}footer{font-family:"Open Sans",sans-serif;border-top:solid 8px #fe5000;font-size:14px}footer .content-container{padding:40px 15px;margin:auto;justify-content:space-between}@media(min-width: 768px){footer .content-container{width:750px}}@media(min-width: 992px){footer .content-container{width:970px;display:flex}}@media(min-width: 1200px){footer .content-container{width:1170px}}footer .content-container>div{flex:1}footer .content-container>div:not(:first-child):before{border-bottom:solid #fe5000 2px;content:"";margin-top:18px;margin-bottom:6px;position:relative;width:50px;display:block}@media(min-width: 992px){footer .content-container>div:not(:first-child):before{border-bottom:none;margin:0}}footer .content-container>div h2{font-family:"Open Sans",sans-serif;font-size:14pt;font-weight:600;color:#2f3940;margin-top:0;text-transform:uppercase}footer .content-container>div p{color:#2f3940;font-family:"Open Sans",sans-serif;font-size:12pt;font-weight:400;line-height:22pt;color:#2f3940;margin:0 0 10px}@media(min-width: 992px){footer .content-container>div p{font-size:14pt;line-height:24pt}}footer .content-container>div a{color:#3767c7;text-decoration:none}footer .content-container>div a:hover{text-decoration:underline}footer .content-container>div hr{margin:20px 0;border-top-color:#d8d8d8}footer .content-container>div ul.link-list{list-style:none;margin:0;padding:0}footer .content-container>div ul.link-list li{margin-left:0;background-position:0 10px;background-repeat:no-repeat;background-size:10px 10px;font-family:"Open Sans",sans-serif;font-style:italic;font-size:12pt;line-height:24pt}@media(min-width: 992px){footer .content-container>div ul.link-list li{font-size:14pt}}footer .content-container>div ul.link-list li:before{content:"";width:6px;height:0px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:10px solid #2f3940;display:inline-block}@media(min-width: 992px){footer .content-container>div ul.link-list li:before{width:8px;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:12px solid #2f3940}}footer .content-container>div #version-text{display:block;color:#404041;font-size:13px;text-align:right;max-width:230px}footer .content-container>div #geonorge-logo{max-width:230px}footer .content-container>div #kartverket-logo{max-width:195px}',"",{version:3,sources:["webpack://./custom-elements/geonorge-footer/geonorge-footer.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,OACI,kCCPW,CDQX,4BAAA,CACA,cAAA,CACA,0BACI,iBAAA,CACA,WAAA,CACA,6BAAA,CEHA,yBAAA,0BFKI,WAAA,CAAA,CETJ,yBFIJ,0BAQQ,WAAA,CACA,YAAA,CAAA,CEjBJ,0BFQJ,0BAYQ,YAAA,CAAA,CAEJ,8BACI,MAAA,CACA,uDACI,+BAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CE3BR,yBFoBI,uDASQ,kBAAA,CACA,QAAA,CAAA,CAGR,iCACI,kCCxCD,CDyCC,cAAA,CACA,eAAA,CACA,aGpCF,CHqCE,YAAA,CACA,wBAAA,CAEJ,gCACI,aGzCF,CH0CE,kCCjDD,CDkDC,cAAA,CACA,eAAA,CACA,gBAAA,CACA,aG9CF,CH+CE,eAAA,CEhDR,yBFyCI,gCASQ,cAAA,CACA,gBAAA,CAAA,CAGR,gCACI,aG/CD,CHgDC,oBAAA,CACA,sCACI,yBAAA,CAGR,iCACI,aAAA,CACA,wBGlEC,CHoEL,2CACI,eAAA,CACA,QAAA,CACA,SAAA,CACA,8CACI,aAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CACA,kCAAA,CACA,iBAAA,CACA,cAAA,CACA,gBAAA,CE7EZ,yBFqEQ,8CAUQ,cAAA,CAAA,CAEJ,qDACI,UAAA,CACA,SAAA,CACA,UAAA,CACA,gCAAA,CACA,mCAAA,CACA,8BAAA,CACA,oBAAA,CExFhB,yBFiFY,qDASQ,SAAA,CACA,gCAAA,CACA,mCAAA,CACA,8BAAA,CAAA,CAKhB,4CACI,aAAA,CACA,aAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CAEJ,6CACI,eAAA,CAEJ,+CACI,eAAA",sourcesContent:['@import "../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nfooter {\n font-family: $default-font;\n border-top: solid 8px $primary-brand;\n font-size: 14px;\n .content-container {\n padding: 40px 15px;\n margin: auto;\n justify-content: space-between;\n @include breakpoint(tablet) {\n width: 750px;\n }\n @include breakpoint(laptop) {\n width: 970px;\n display: flex;\n }\n @include breakpoint(desktop) {\n width: 1170px;\n }\n > div {\n flex: 1;\n &:not(:first-child):before {\n border-bottom: solid #fe5000 2px;\n content: "";\n margin-top: 18px;\n margin-bottom: 6px;\n position: relative;\n width: 50px;\n display: block;\n @include breakpoint(laptop) {\n border-bottom: none;\n margin: 0;\n }\n }\n h2 {\n font-family: $default-font;\n font-size: 14pt;\n font-weight: 600;\n color: $default-text;\n margin-top: 0;\n text-transform: uppercase;\n }\n p {\n color: $default-text;\n font-family: $default-font;\n font-size: 12pt;\n font-weight: 400;\n line-height: 22pt;\n color: $default-text;\n margin: 0 0 10px;\n @include breakpoint(laptop) {\n font-size: 14pt;\n line-height: 24pt;\n }\n }\n a {\n color: $primary-text;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n hr {\n margin: 20px 0;\n border-top-color: $default-border;\n }\n ul.link-list {\n list-style: none;\n margin: 0;\n padding: 0;\n li {\n margin-left: 0;\n background-position: 0 10px;\n background-repeat: no-repeat;\n background-size: 10px 10px;\n font-family: "Open Sans", sans-serif;\n font-style: italic;\n font-size: 12pt;\n line-height: 24pt;\n @include breakpoint(laptop) {\n font-size: 14pt;\n }\n &:before {\n content: "";\n width: 6px;\n height: 0px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 10px solid $default-text;\n display: inline-block;\n @include breakpoint(laptop) {\n width: 8px;\n border-top: 7px solid transparent;\n border-bottom: 7px solid transparent;\n border-left: 12px solid $default-text;\n }\n }\n }\n }\n #version-text {\n display: block;\n color: #404041;\n font-size: 13px;\n text-align: right;\n max-width: 230px;\n }\n #geonorge-logo {\n max-width: 230px;\n }\n #kartverket-logo {\n max-width: 195px;\n }\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"@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","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},8259:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <footer id="geonorge-footer">\n <div class="content-container">\n <div>\n <div id="geonorge-logo"></div>\n <span id="version-text"></span>\n </div>\n <div>\n <h2 id="about-site-header">Om nettstedet:</h2>\n <ul id="link-list" class="link-list">\n <li>\n <a id="aboutGeonorgeLink" href="/aktuelt/om-geonorge/">Om Geonorge</a>\n </li>\n <li>\n <a id="cookieInfoLink" href="/aktuelt/Nyheter/annet/personvern-og-bruk-av-cookies/">Personvern\n og bruk av cookies</a>\n </li>\n </ul>\n </div>\n <div>\n <h2 id="contact-header">Kontakt:</h2>\n <p id="contact-info-text">Telefon: 32 11 80 00<br><a title="post@norgedigitalt.no"\n href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br>Org. nr.: 971 040 238</p>\n <hr>\n <p id="a-solution-by-text">En løsning fra</p>\n <a href="http://www.kartverket.no">\n <div id="kartverket-logo"></div>\n </a>\n </div>\n </div>\n </footer>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);o&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},3062:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n,o,r=(o=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(i.push(o.value),!e||i.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}}(n,o)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(n,o)||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.")}()),i=r[1],a=r[3];if(!a)return i;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),c="/*# ".concat(l," */"),p=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[i].concat(p).concat([c]).join("\n")}return[i].join("\n")}},1397:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),l=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),i.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,l),l}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},93:t=>{t.exports='<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 55"><defs><style>.__2RF-ozW__cls-1{fill:#4d4d4f;}.__2RF-ozW__cls-2{fill:#a6a8ab;}.__2RF-ozW__cls-3{fill:#bbbdbf;}.__2RF-ozW__cls-4{fill:#6d6e70;}.__2RF-ozW__cls-5{fill:#929497;}.__2RF-ozW__cls-6{fill:#fe5000;}.__2RF-ozW__cls-7{fill:#404041;}</style></defs><title>Artboard 1</title><polygon class="__2RF-ozW__cls-1 " points="20.9 30.4 20.9 54.5 0 42.4 20.9 30.4"></polygon><polygon class="__2RF-ozW__cls-2 " points="20.9 6.3 20.9 30.4 0 18.3 20.9 6.3"></polygon><polyline class="__2RF-ozW__cls-3 " points="20.9 30.4 41.8 42.4 41.8 18.3 20.9 30.4"></polyline><polyline class="__2RF-ozW__cls-4 " points="20.9 30.4 0 42.4 0 18.3 20.9 30.4"></polyline><polyline class="__2RF-ozW__cls-5 " points="20.9 30.4 20.9 54.5 41.8 42.4 20.9 30.4"></polyline><path class="__2RF-ozW__cls-6 " d="M24.5,9.1a8.08,8.08,0,0,1,1.2-4.7,8.78,8.78,0,0,1,15.2,8.8,9.49,9.49,0,0,1-3.5,3.4L24.5,24Zm13,2.1a4.8,4.8,0,0,0-1.8-6.7A4.93,4.93,0,0,0,29,6.3a4.84,4.84,0,0,0-.7,2.6A5,5,0,0,0,30.8,13a4.84,4.84,0,0,0,4.8.1A3.9,3.9,0,0,0,37.5,11.2Z"></path><path class="__2RF-ozW__cls-7 " d="M274.2,48.7h4.6c.2,0,.3-.2.4-.3s.1-.2,0-.2c-.8-1.6-5.2-10.2-6.6-12.8l-.1-.3.3-.1a9.48,9.48,0,0,0,2.7-1.7,11,11,0,0,0,3.3-5.8,12.47,12.47,0,0,0,.1-4.7,10.29,10.29,0,0,0-4.1-6.7,9.75,9.75,0,0,0-5.1-1.9H253.3c-.6,0-.7.1-.7.7v33c0,.6.1.7.7.7h5c.6,0,.7-.1.7-.7V35.8h5.7a.87.87,0,0,1,.9.5c.1.2.9,1.7,1.8,3.6,1.3,2.6,3.1,6.1,4.1,8a1.16,1.16,0,0,0,1.2.8ZM259,29.9V20h9.2a4.27,4.27,0,0,1,4.1,3.3,6.65,6.65,0,0,1-.2,4.2,3.84,3.84,0,0,1-3.6,2.5h0Z"></path><path class="__2RF-ozW__cls-7 " d="M104.6,14.2c-.6,0-.7.1-.7.7v33c0,.6.1.7.7.7H127c.6,0,.7-.1.7-.7V43.6c0-.6-.1-.7-.7-.7H110.3V34.2h13.3c.6,0,.7-.1.7-.7V29.4c0-.6-.1-.7-.7-.7H110.3V20H127c.6,0,.7-.1.7-.7V15c0-.6-.1-.7-.7-.7H104.6Z"></path><path class="__2RF-ozW__cls-7 " d="M326.9,14.2c-.6,0-.7.1-.7.7v33c0,.6.1.7.7.7h22.4c.6,0,.7-.1.7-.7V43.6c0-.6-.1-.7-.7-.7H332.6V34.2h13.3c.6,0,.7-.1.7-.7V29.4c0-.6-.1-.7-.7-.7H332.6V20h16.7c.6,0,.7-.1.7-.7V15c0-.6-.1-.7-.7-.7H326.9Z"></path><path class="__2RF-ozW__cls-7 " d="M149.7,13.8a17.7,17.7,0,1,0,17.6,17.7A17.65,17.65,0,0,0,149.7,13.8Zm0,29.5c-6.2,0-11.2-5.3-11.2-11.9s5-11.9,11.2-11.9,11.2,5.3,11.2,11.9S155.9,43.3,149.7,43.3Z"></path><path class="__2RF-ozW__cls-7 " d="M228.2,13.8a17.7,17.7,0,1,0,17.6,17.7A17.65,17.65,0,0,0,228.2,13.8Zm0,29.5C222,43.3,217,38,217,31.5s5-11.9,11.2-11.9,11.2,5.3,11.2,11.9S234.4,43.3,228.2,43.3Z"></path><path class="__2RF-ozW__cls-7 " d="M80.2,13.8A17.7,17.7,0,1,0,97.8,31.5V29.4c0-.6-.1-.7-.7-.7H79.6c-.6,0-.7.1-.7.7v4.1c0,.3,0,.5.1.6s.3.1.6.1H91.1l-.1.6a11.38,11.38,0,0,1-10.8,8.5C74.1,43.3,69,38,69,31.5s5-11.9,11.2-11.9a10.91,10.91,0,0,1,7.3,2.8c.5.5.7.5,1.1,0l3.2-3.2c.5-.5.5-.6,0-1.1A17.53,17.53,0,0,0,80.2,13.8Z"></path><path class="__2RF-ozW__cls-7 " d="M302.6,13.8a17.7,17.7,0,1,0,17.6,17.7V29.4c0-.6-.1-.7-.7-.7H302c-.6,0-.7.1-.7.7v4.1c0,.3,0,.5.1.6s.3.1.6.1h11.5l-.1.6a11.38,11.38,0,0,1-10.8,8.5c-6.2,0-11.2-5.3-11.2-11.9s5-11.9,11.2-11.9a10.91,10.91,0,0,1,7.3,2.8c.5.5.7.5,1.1,0l3.2-3.2c.5-.5.5-.6,0-1.1A18.16,18.16,0,0,0,302.6,13.8Z"></path><path class="__2RF-ozW__cls-7 " d="M180.9,26c.1,0,.1,0,.2.1,2.2,1.4,12.7,8.3,15.6,10.2a1.25,1.25,0,0,1,.6,1.1V48.1c0,.6.1.7.7.7h5c.6,0,.7-.1.7-.7v-33c0-.6-.1-.7-.7-.7h-5c-.6,0-.7.1-.7.7V29.3L174.8,14.1a.76.76,0,0,0-.4-.1.52.52,0,0,0-.2.4V48.1c0,.6.1.7.7.7h5c.6,0,.7-.1.7-.7V26Z"></path></svg>'},7856:t=>{t.exports='<svg id="kartverket-logo-large" viewBox="0 0 140.014 46.115"><path d="M289.088,131.643H291v15.841h-1.917Zm8.105,0h2.425l-6.373,7.435,6.327,8.405h-2.425L291.1,139.1Z" transform="translate(-248.927 -108.916)" fill="#1a1818"></path><path d="M338.919,150.077a8.664,8.664,0,0,1,4.826-1.547,3.124,3.124,0,0,1,3.187,1.8,6.822,6.822,0,0,1,.254,2.54l-.092,3.787c-.046,1.871.069,2.355.924,2.817l-.924,1.293a2.361,2.361,0,0,1-1.57-1.686,4.3,4.3,0,0,1-3.325,1.547c-2.84,0-3.695-1.732-3.695-3.279,0-2.609,2.24-4.133,6.1-4.133.485,0,.808.023.808.023v-.808c0-1.016-.046-1.432-.37-1.8a1.888,1.888,0,0,0-1.547-.624,6.365,6.365,0,0,0-3.672,1.363Zm6.443,4.411c-.3-.023-.577-.046-.9-.046-2.909,0-3.949.993-3.949,2.748,0,1.362.67,2.1,1.986,2.1a3.154,3.154,0,0,0,2.794-1.8Z" transform="translate(-286.517 -121.761)" fill="#1a1818"></path><path d="M390.227,148.867l1.8-.485a4.153,4.153,0,0,1,.369,1.87,4.167,4.167,0,0,1,3.233-1.917,2.166,2.166,0,0,1,.624.116l-.739,1.963a1.537,1.537,0,0,0-.508-.092,2.741,2.741,0,0,0-1.917.831,2.071,2.071,0,0,0-.67,1.824v7.2h-1.8v-8.867a5.811,5.811,0,0,0-.393-2.448" transform="translate(-325.864 -121.614)" fill="#1a1818"></path><path d="M428.012,139.213l-.554,1.362h-2.4v7.413c0,1.27.346,1.709,1.478,1.709a2.291,2.291,0,0,0,1.132-.231l.254,1.155a4.261,4.261,0,0,1-2.032.462,3.348,3.348,0,0,1-1.5-.323c-.808-.393-1.108-1.131-1.108-2.286v-7.9h-1.5v-1.362h1.5c0-1.108.185-2.909.185-2.909l1.894-.416a31,31,0,0,0-.231,3.325Z" transform="translate(-349.864 -112.145)" fill="#1a1818"></path><path d="M451.691,148.923l1.847-.393,2.678,7.921c.324.947.554,1.963.554,1.963h.046a16.2,16.2,0,0,1,.554-1.94L460,148.83h1.917L457.6,160.445h-1.778Z" transform="translate(-372.619 -121.761)" fill="#1a1818"></path><path d="M509.008,158l.693,1.155a5.745,5.745,0,0,1-3.88,1.432c-3.187,0-5.1-2.309-5.1-6.119a6.141,6.141,0,0,1,1.386-4.341,4.516,4.516,0,0,1,6.558-.346c.993,1.016,1.27,2.1,1.316,4.849v.254H502.8v.277a4.588,4.588,0,0,0,.531,2.517,3.252,3.252,0,0,0,2.863,1.409A3.96,3.96,0,0,0,509.008,158m-6.212-4.48h5.265a4.936,4.936,0,0,0-.531-2.563,2.447,2.447,0,0,0-2.078-1.016c-1.639,0-2.563,1.2-2.656,3.579" transform="translate(-409.914 -121.761)" fill="#1a1818"></path><path d="M552.345,148.867l1.8-.485a4.155,4.155,0,0,1,.37,1.87,4.167,4.167,0,0,1,3.233-1.917,2.167,2.167,0,0,1,.624.116l-.739,1.963a1.54,1.54,0,0,0-.508-.092,2.741,2.741,0,0,0-1.917.831,2.071,2.071,0,0,0-.67,1.824v7.2h-1.8v-8.867a5.811,5.811,0,0,0-.393-2.448" transform="translate(-449.186 -121.614)" fill="#1a1818"></path><path d="M585.83,127.647l1.8-.346a10.115,10.115,0,0,1,.3,2.725v14.155h-1.8V130a7.771,7.771,0,0,0-.3-2.355m6.558,5.034h2.263l-4.526,4.988,5.565,6.512h-2.4L588,137.669Z" transform="translate(-474.658 -105.613)" fill="#1a1818"></path><path d="M640.826,158l.693,1.155a5.745,5.745,0,0,1-3.88,1.432c-3.187,0-5.1-2.309-5.1-6.119a6.141,6.141,0,0,1,1.386-4.341,4.516,4.516,0,0,1,6.558-.346c.993,1.016,1.27,2.1,1.316,4.849v.254h-7.182v.277a4.588,4.588,0,0,0,.531,2.517,3.252,3.252,0,0,0,2.863,1.409A3.959,3.959,0,0,0,640.826,158m-6.212-4.48h5.265a4.932,4.932,0,0,0-.531-2.563,2.446,2.446,0,0,0-2.078-1.016c-1.64,0-2.563,1.2-2.656,3.579" transform="translate(-510.188 -121.761)" fill="#1a1818"></path><path d="M686.537,139.213l-.554,1.362h-2.4v7.413c0,1.27.347,1.709,1.478,1.709a2.292,2.292,0,0,0,1.132-.231l.254,1.155a4.261,4.261,0,0,1-2.032.462,3.347,3.347,0,0,1-1.5-.323c-.808-.393-1.108-1.131-1.108-2.286v-7.9h-1.5v-1.362h1.5c0-1.108.185-2.909.185-2.909l1.894-.416a30.991,30.991,0,0,0-.231,3.325Z" transform="translate(-546.523 -112.145)" fill="#1a1818"></path><path d="M150.431,36.669H123.694a2.431,2.431,0,0,0-2.43,2.431V55.5c2.1-1.6,4.725-3.829,9.462-2.66,4.083,1.007,4.973,4.154,11.43,7.729,3.953,2.189,7.662.5,10.705-1.268V39.1a2.431,2.431,0,0,0-2.431-2.431" transform="translate(-121.264 -36.669)" fill="#00973d"></path><path d="M144.245,141.048a7.677,7.677,0,0,1-3.386-1.283c-2.263-1.4-4.432-3.68-9.045-6.075-3.675-1.786-7.26-.424-10.545,1.448l0,0v18.383a2.431,2.431,0,0,0,2.43,2.43h26.736a2.431,2.431,0,0,0,2.431-2.43V138.535c-2.854,1.636-5.594,2.965-8.618,2.513" transform="translate(-121.265 -109.837)" fill="#00509c"></path><path d="M142.156,110.918c-6.458-3.575-7.348-6.722-11.43-7.729-4.737-1.169-7.364,1.063-9.462,2.66l0,3.308v3.166c3.285-1.872,6.919-3.33,10.545-1.448,4.614,2.395,6.783,4.678,9.045,6.075a8.661,8.661,0,0,0,3.386,1.283c3.025.452,5.765-.877,8.618-2.513l-.007-2.925.007-3.145c-3.043,1.768-6.752,3.457-10.705,1.268" transform="translate(-121.264 -87.023)" fill="#fff"></path></svg>'},7329:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GeonorgeFooter=void 0;const l=n(406),c=n(1406),p=s(n(93)),d=s(n(7856));let h=class extends l.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}getLinkList(t,e){return"en"===t?`<li><a href="${(0,c.getGeonorgeUrl)(t,e)}about/what-is-geonorge/">What is Geonorge</a></li>`:`\n <li><a href="${(0,c.getGeonorgeUrl)(t,e)}aktuelt/om-geonorge/">Om Geonorge</a></li>\n <li><a href="${(0,c.getGeonorgeUrl)(t,e)}aktuelt/Nyheter/annet/personvern-og-bruk-av-cookies/">Personvern og bruk av cookies</a></li>\n `}getContactInfoText(t,e){return"en"===t?'\n <p>\n Telephone: +47 32 11 80 00<br>\n <a title="post@norgedigitalt.no" href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br>\n Org. nr.: 971 040 238\n </p>\n ':'\n <p>\n Telefon: 32 11 80 00<br>\n <a title="post@norgedigitalt.no" href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br>\n Org. nr.: 971 040 238\n </p>\n '}connectedCallback(){var t;this.geonorgeFooterElement=(0,l.getShadowRootElement)(this,"#geonorge-footer"),this.versionTextElement=(0,l.getShadowRootElement)(this,"#version-text"),this.geonorgeLogoElement=(0,l.getShadowRootElement)(this,"#geonorge-logo"),this.kartverketLogoElement=(0,l.getShadowRootElement)(this,"#kartverket-logo"),this.linkListElement=(0,l.getShadowRootElement)(this,"#link-list"),this.aboutSiteHeader=(0,l.getShadowRootElement)(this,"#about-site-header"),this.contactHeader=(0,l.getShadowRootElement)(this,"#contact-header"),this.aSolutionByText=(0,l.getShadowRootElement)(this,"#a-solution-by-text"),this.contactInfoText=(0,l.getShadowRootElement)(this,"#contact-info-text"),this.geonorgeFooterElement.setAttribute("environment",this.environment),(null===(t=this.version)||void 0===t?void 0:t.length)&&(this.versionTextElement.innerText="en"===this.language?`Version ${this.version}`:`Versjon ${this.version}`),this.geonorgeLogoElement.innerHTML=p.default,this.kartverketLogoElement.innerHTML=d.default,this.linkListElement.innerHTML=this.getLinkList(this.language,this.environment),this.contactInfoText.innerHTML=this.getContactInfoText(this.language,this.environment),this.aboutSiteHeader.innerText="en"===this.language?"About":"Om nettstedet",this.contactHeader.innerText="en"===this.language?"Contact":"Kontakt",this.aSolutionByText.innerText="en"===this.language?"A solution by":"Kontakt"}languageChanged(){var t;this.linkListElement.innerHTML=this.getLinkList(this.language,this.environment),this.contactInfoText.innerHTML=this.getContactInfoText(this.language,this.environment),this.aboutSiteHeader.innerText="en"===this.language?"About":"Om nettstedet",this.contactHeader.innerText="en"===this.language?"Contact":"Kontakt",this.aSolutionByText.innerText="en"===this.language?"A solution by":"En løsning fra",(null===(t=this.version)||void 0===t?void 0:t.length)&&(this.versionTextElement.innerText="en"===this.language?`Version ${this.version}`:`Versjon ${this.version}`)}};h.elementSelector="geonorge-footer",i([(0,l.Prop)()],h.prototype,"id",void 0),i([(0,l.Prop)()],h.prototype,"environment",void 0),i([(0,l.Prop)()],h.prototype,"version",void 0),i([(0,l.Prop)()],h.prototype,"language",void 0),i([(0,l.Watch)("language")],h.prototype,"languageChanged",null),h=i([(0,l.Component)({tag:"geonorge-footer",template:Promise.resolve().then((()=>a(n(8259)))),style:Promise.resolve().then((()=>a(n(1325))))})],h),e.GeonorgeFooter=h},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,r,i,a)=>"articles"===n?`<a onClick="${o(r,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(r,a)}" href="${(0,e.getKartkatalogUrl)(i)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(7329)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GeonorgeFooter=e())}(self,(()=>(()=>{var t={1325:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(4663),r=n.n(o),i=n(7638),a=n.n(i)()(r());a.push([t.id,'*{box-sizing:border-box}footer{font-family:"Open Sans",sans-serif;border-top:solid 8px #fe5000;font-size:14px}footer .content-container{padding:40px 15px;margin:auto;justify-content:space-between}@media(min-width: 768px){footer .content-container{width:750px}}@media(min-width: 992px){footer .content-container{width:970px;display:flex}}@media(min-width: 1200px){footer .content-container{width:1170px}}footer .content-container>div{flex:1}footer .content-container>div:not(:first-child):before{border-bottom:solid #fe5000 2px;content:"";margin-top:18px;margin-bottom:6px;position:relative;width:50px;display:block}@media(min-width: 992px){footer .content-container>div:not(:first-child):before{border-bottom:none;margin:0}}footer .content-container>div h2{font-family:"Open Sans",sans-serif;font-size:14pt;font-weight:600;color:#2f3940;margin-top:0;text-transform:uppercase}footer .content-container>div p{color:#2f3940;font-family:"Open Sans",sans-serif;font-size:12pt;font-weight:400;line-height:22pt;color:#2f3940;margin:0 0 10px}@media(min-width: 992px){footer .content-container>div p{font-size:14pt;line-height:24pt}}footer .content-container>div a{color:#3767c7}footer .content-container>div a:hover{text-decoration:underline}footer .content-container>div hr{margin:20px 0;border-top-color:#d8d8d8}footer .content-container>div ul.link-list{list-style:none;margin:0;padding:0}footer .content-container>div ul.link-list li{margin-left:0;background-position:0 10px;background-repeat:no-repeat;background-size:10px 10px;font-family:"Open Sans",sans-serif;font-style:italic;font-size:12pt;line-height:24pt}@media(min-width: 992px){footer .content-container>div ul.link-list li{font-size:14pt}}footer .content-container>div ul.link-list li:before{content:"";width:6px;height:0px;border-top:6px solid rgba(0,0,0,0);border-bottom:6px solid rgba(0,0,0,0);border-left:10px solid #2f3940;display:inline-block}@media(min-width: 992px){footer .content-container>div ul.link-list li:before{width:8px;border-top:7px solid rgba(0,0,0,0);border-bottom:7px solid rgba(0,0,0,0);border-left:12px solid #2f3940}}footer .content-container>div #version-text{display:block;color:#404041;font-size:13px;text-align:right;max-width:230px}footer .content-container>div #geonorge-logo{max-width:230px}footer .content-container>div #kartverket-logo{max-width:195px}',"",{version:3,sources:["webpack://./custom-elements/geonorge-footer/geonorge-footer.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,OACI,kCCPW,CDQX,4BAAA,CACA,cAAA,CACA,0BACI,iBAAA,CACA,WAAA,CACA,6BAAA,CEHA,yBAAA,0BFKI,WAAA,CAAA,CETJ,yBFIJ,0BAQQ,WAAA,CACA,YAAA,CAAA,CEjBJ,0BFQJ,0BAYQ,YAAA,CAAA,CAEJ,8BACI,MAAA,CACA,uDACI,+BAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CE3BR,yBFoBI,uDASQ,kBAAA,CACA,QAAA,CAAA,CAGR,iCACI,kCCxCD,CDyCC,cAAA,CACA,eAAA,CACA,aGpCF,CHqCE,YAAA,CACA,wBAAA,CAEJ,gCACI,aGzCF,CH0CE,kCCjDD,CDkDC,cAAA,CACA,eAAA,CACA,gBAAA,CACA,aG9CF,CH+CE,eAAA,CEhDR,yBFyCI,gCASQ,cAAA,CACA,gBAAA,CAAA,CAGR,gCACI,aG/CD,CHgDC,sCACI,yBAAA,CAGR,iCACI,aAAA,CACA,wBGjEC,CHmEL,2CACI,eAAA,CACA,QAAA,CACA,SAAA,CACA,8CACI,aAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CACA,kCAAA,CACA,iBAAA,CACA,cAAA,CACA,gBAAA,CE5EZ,yBFoEQ,8CAUQ,cAAA,CAAA,CAEJ,qDACI,UAAA,CACA,SAAA,CACA,UAAA,CACA,kCAAA,CACA,qCAAA,CACA,8BAAA,CACA,oBAAA,CEvFhB,yBFgFY,qDASQ,SAAA,CACA,kCAAA,CACA,qCAAA,CACA,8BAAA,CAAA,CAKhB,4CACI,aAAA,CACA,aAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CAEJ,6CACI,eAAA,CAEJ,+CACI,eAAA",sourcesContent:['@import "../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nfooter {\n font-family: $default-font;\n border-top: solid 8px $primary-brand;\n font-size: 14px;\n .content-container {\n padding: 40px 15px;\n margin: auto;\n justify-content: space-between;\n @include breakpoint(tablet) {\n width: 750px;\n }\n @include breakpoint(laptop) {\n width: 970px;\n display: flex;\n }\n @include breakpoint(desktop) {\n width: 1170px;\n }\n > div {\n flex: 1;\n &:not(:first-child):before {\n border-bottom: solid #fe5000 2px;\n content: "";\n margin-top: 18px;\n margin-bottom: 6px;\n position: relative;\n width: 50px;\n display: block;\n @include breakpoint(laptop) {\n border-bottom: none;\n margin: 0;\n }\n }\n h2 {\n font-family: $default-font;\n font-size: 14pt;\n font-weight: 600;\n color: $default-text;\n margin-top: 0;\n text-transform: uppercase;\n }\n p {\n color: $default-text;\n font-family: $default-font;\n font-size: 12pt;\n font-weight: 400;\n line-height: 22pt;\n color: $default-text;\n margin: 0 0 10px;\n @include breakpoint(laptop) {\n font-size: 14pt;\n line-height: 24pt;\n }\n }\n a {\n color: $primary-text;\n &:hover {\n text-decoration: underline;\n }\n }\n hr {\n margin: 20px 0;\n border-top-color: $default-border;\n }\n ul.link-list {\n list-style: none;\n margin: 0;\n padding: 0;\n li {\n margin-left: 0;\n background-position: 0 10px;\n background-repeat: no-repeat;\n background-size: 10px 10px;\n font-family: "Open Sans", sans-serif;\n font-style: italic;\n font-size: 12pt;\n line-height: 24pt;\n @include breakpoint(laptop) {\n font-size: 14pt;\n }\n &:before {\n content: "";\n width: 6px;\n height: 0px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 10px solid $default-text;\n display: inline-block;\n @include breakpoint(laptop) {\n width: 8px;\n border-top: 7px solid transparent;\n border-bottom: 7px solid transparent;\n border-left: 12px solid $default-text;\n }\n }\n }\n }\n #version-text {\n display: block;\n color: #404041;\n font-size: 13px;\n text-align: right;\n max-width: 230px;\n }\n #geonorge-logo {\n max-width: 230px;\n }\n #kartverket-logo {\n max-width: 195px;\n }\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"@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","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},8259:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <footer id="geonorge-footer">\n <div class="content-container">\n <div>\n <div id="geonorge-logo"></div>\n <span id="version-text"></span>\n </div>\n <div>\n <h2 id="about-site-header">Om nettstedet:</h2>\n <ul id="link-list" class="link-list">\n <li>\n <a id="aboutGeonorgeLink" href="/aktuelt/om-geonorge/">Om Geonorge</a>\n </li>\n <li>\n <a id="cookieInfoLink" href="/aktuelt/Nyheter/annet/personvern-og-bruk-av-cookies/">Personvern\n og bruk av cookies</a>\n </li>\n </ul>\n </div>\n <div>\n <h2 id="contact-header">Kontakt:</h2>\n <p id="contact-info-text">Telefon: 32 11 80 00<br><a title="post@norgedigitalt.no"\n href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br>Org. nr.: 971 040 238</p>\n <hr>\n <p id="a-solution-by-text">En løsning fra</p>\n <a href="http://www.kartverket.no">\n <div id="kartverket-logo"></div>\n </a>\n </div>\n </div>\n </footer>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var p=[].concat(t[c]);o&&a[p[0]]||(void 0!==i&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=i),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),r&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=r):p[4]="".concat(r)),e.push(p))}},e}},4663:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([i]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),l=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),i.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,l),l}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},93:t=>{t.exports='<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 55"><defs><style>.__2RF-ozW__cls-1{fill:#4d4d4f;}.__2RF-ozW__cls-2{fill:#a6a8ab;}.__2RF-ozW__cls-3{fill:#bbbdbf;}.__2RF-ozW__cls-4{fill:#6d6e70;}.__2RF-ozW__cls-5{fill:#929497;}.__2RF-ozW__cls-6{fill:#fe5000;}.__2RF-ozW__cls-7{fill:#404041;}</style></defs><title>Artboard 1</title><polygon class="__2RF-ozW__cls-1 " points="20.9 30.4 20.9 54.5 0 42.4 20.9 30.4"></polygon><polygon class="__2RF-ozW__cls-2 " points="20.9 6.3 20.9 30.4 0 18.3 20.9 6.3"></polygon><polyline class="__2RF-ozW__cls-3 " points="20.9 30.4 41.8 42.4 41.8 18.3 20.9 30.4"></polyline><polyline class="__2RF-ozW__cls-4 " points="20.9 30.4 0 42.4 0 18.3 20.9 30.4"></polyline><polyline class="__2RF-ozW__cls-5 " points="20.9 30.4 20.9 54.5 41.8 42.4 20.9 30.4"></polyline><path class="__2RF-ozW__cls-6 " d="M24.5,9.1a8.08,8.08,0,0,1,1.2-4.7,8.78,8.78,0,0,1,15.2,8.8,9.49,9.49,0,0,1-3.5,3.4L24.5,24Zm13,2.1a4.8,4.8,0,0,0-1.8-6.7A4.93,4.93,0,0,0,29,6.3a4.84,4.84,0,0,0-.7,2.6A5,5,0,0,0,30.8,13a4.84,4.84,0,0,0,4.8.1A3.9,3.9,0,0,0,37.5,11.2Z"></path><path class="__2RF-ozW__cls-7 " d="M274.2,48.7h4.6c.2,0,.3-.2.4-.3s.1-.2,0-.2c-.8-1.6-5.2-10.2-6.6-12.8l-.1-.3.3-.1a9.48,9.48,0,0,0,2.7-1.7,11,11,0,0,0,3.3-5.8,12.47,12.47,0,0,0,.1-4.7,10.29,10.29,0,0,0-4.1-6.7,9.75,9.75,0,0,0-5.1-1.9H253.3c-.6,0-.7.1-.7.7v33c0,.6.1.7.7.7h5c.6,0,.7-.1.7-.7V35.8h5.7a.87.87,0,0,1,.9.5c.1.2.9,1.7,1.8,3.6,1.3,2.6,3.1,6.1,4.1,8a1.16,1.16,0,0,0,1.2.8ZM259,29.9V20h9.2a4.27,4.27,0,0,1,4.1,3.3,6.65,6.65,0,0,1-.2,4.2,3.84,3.84,0,0,1-3.6,2.5h0Z"></path><path class="__2RF-ozW__cls-7 " d="M104.6,14.2c-.6,0-.7.1-.7.7v33c0,.6.1.7.7.7H127c.6,0,.7-.1.7-.7V43.6c0-.6-.1-.7-.7-.7H110.3V34.2h13.3c.6,0,.7-.1.7-.7V29.4c0-.6-.1-.7-.7-.7H110.3V20H127c.6,0,.7-.1.7-.7V15c0-.6-.1-.7-.7-.7H104.6Z"></path><path class="__2RF-ozW__cls-7 " d="M326.9,14.2c-.6,0-.7.1-.7.7v33c0,.6.1.7.7.7h22.4c.6,0,.7-.1.7-.7V43.6c0-.6-.1-.7-.7-.7H332.6V34.2h13.3c.6,0,.7-.1.7-.7V29.4c0-.6-.1-.7-.7-.7H332.6V20h16.7c.6,0,.7-.1.7-.7V15c0-.6-.1-.7-.7-.7H326.9Z"></path><path class="__2RF-ozW__cls-7 " d="M149.7,13.8a17.7,17.7,0,1,0,17.6,17.7A17.65,17.65,0,0,0,149.7,13.8Zm0,29.5c-6.2,0-11.2-5.3-11.2-11.9s5-11.9,11.2-11.9,11.2,5.3,11.2,11.9S155.9,43.3,149.7,43.3Z"></path><path class="__2RF-ozW__cls-7 " d="M228.2,13.8a17.7,17.7,0,1,0,17.6,17.7A17.65,17.65,0,0,0,228.2,13.8Zm0,29.5C222,43.3,217,38,217,31.5s5-11.9,11.2-11.9,11.2,5.3,11.2,11.9S234.4,43.3,228.2,43.3Z"></path><path class="__2RF-ozW__cls-7 " d="M80.2,13.8A17.7,17.7,0,1,0,97.8,31.5V29.4c0-.6-.1-.7-.7-.7H79.6c-.6,0-.7.1-.7.7v4.1c0,.3,0,.5.1.6s.3.1.6.1H91.1l-.1.6a11.38,11.38,0,0,1-10.8,8.5C74.1,43.3,69,38,69,31.5s5-11.9,11.2-11.9a10.91,10.91,0,0,1,7.3,2.8c.5.5.7.5,1.1,0l3.2-3.2c.5-.5.5-.6,0-1.1A17.53,17.53,0,0,0,80.2,13.8Z"></path><path class="__2RF-ozW__cls-7 " d="M302.6,13.8a17.7,17.7,0,1,0,17.6,17.7V29.4c0-.6-.1-.7-.7-.7H302c-.6,0-.7.1-.7.7v4.1c0,.3,0,.5.1.6s.3.1.6.1h11.5l-.1.6a11.38,11.38,0,0,1-10.8,8.5c-6.2,0-11.2-5.3-11.2-11.9s5-11.9,11.2-11.9a10.91,10.91,0,0,1,7.3,2.8c.5.5.7.5,1.1,0l3.2-3.2c.5-.5.5-.6,0-1.1A18.16,18.16,0,0,0,302.6,13.8Z"></path><path class="__2RF-ozW__cls-7 " d="M180.9,26c.1,0,.1,0,.2.1,2.2,1.4,12.7,8.3,15.6,10.2a1.25,1.25,0,0,1,.6,1.1V48.1c0,.6.1.7.7.7h5c.6,0,.7-.1.7-.7v-33c0-.6-.1-.7-.7-.7h-5c-.6,0-.7.1-.7.7V29.3L174.8,14.1a.76.76,0,0,0-.4-.1.52.52,0,0,0-.2.4V48.1c0,.6.1.7.7.7h5c.6,0,.7-.1.7-.7V26Z"></path></svg>'},7856:t=>{t.exports='<svg id="kartverket-logo-large" viewBox="0 0 140.014 46.115"><path d="M289.088,131.643H291v15.841h-1.917Zm8.105,0h2.425l-6.373,7.435,6.327,8.405h-2.425L291.1,139.1Z" transform="translate(-248.927 -108.916)" fill="#1a1818"></path><path d="M338.919,150.077a8.664,8.664,0,0,1,4.826-1.547,3.124,3.124,0,0,1,3.187,1.8,6.822,6.822,0,0,1,.254,2.54l-.092,3.787c-.046,1.871.069,2.355.924,2.817l-.924,1.293a2.361,2.361,0,0,1-1.57-1.686,4.3,4.3,0,0,1-3.325,1.547c-2.84,0-3.695-1.732-3.695-3.279,0-2.609,2.24-4.133,6.1-4.133.485,0,.808.023.808.023v-.808c0-1.016-.046-1.432-.37-1.8a1.888,1.888,0,0,0-1.547-.624,6.365,6.365,0,0,0-3.672,1.363Zm6.443,4.411c-.3-.023-.577-.046-.9-.046-2.909,0-3.949.993-3.949,2.748,0,1.362.67,2.1,1.986,2.1a3.154,3.154,0,0,0,2.794-1.8Z" transform="translate(-286.517 -121.761)" fill="#1a1818"></path><path d="M390.227,148.867l1.8-.485a4.153,4.153,0,0,1,.369,1.87,4.167,4.167,0,0,1,3.233-1.917,2.166,2.166,0,0,1,.624.116l-.739,1.963a1.537,1.537,0,0,0-.508-.092,2.741,2.741,0,0,0-1.917.831,2.071,2.071,0,0,0-.67,1.824v7.2h-1.8v-8.867a5.811,5.811,0,0,0-.393-2.448" transform="translate(-325.864 -121.614)" fill="#1a1818"></path><path d="M428.012,139.213l-.554,1.362h-2.4v7.413c0,1.27.346,1.709,1.478,1.709a2.291,2.291,0,0,0,1.132-.231l.254,1.155a4.261,4.261,0,0,1-2.032.462,3.348,3.348,0,0,1-1.5-.323c-.808-.393-1.108-1.131-1.108-2.286v-7.9h-1.5v-1.362h1.5c0-1.108.185-2.909.185-2.909l1.894-.416a31,31,0,0,0-.231,3.325Z" transform="translate(-349.864 -112.145)" fill="#1a1818"></path><path d="M451.691,148.923l1.847-.393,2.678,7.921c.324.947.554,1.963.554,1.963h.046a16.2,16.2,0,0,1,.554-1.94L460,148.83h1.917L457.6,160.445h-1.778Z" transform="translate(-372.619 -121.761)" fill="#1a1818"></path><path d="M509.008,158l.693,1.155a5.745,5.745,0,0,1-3.88,1.432c-3.187,0-5.1-2.309-5.1-6.119a6.141,6.141,0,0,1,1.386-4.341,4.516,4.516,0,0,1,6.558-.346c.993,1.016,1.27,2.1,1.316,4.849v.254H502.8v.277a4.588,4.588,0,0,0,.531,2.517,3.252,3.252,0,0,0,2.863,1.409A3.96,3.96,0,0,0,509.008,158m-6.212-4.48h5.265a4.936,4.936,0,0,0-.531-2.563,2.447,2.447,0,0,0-2.078-1.016c-1.639,0-2.563,1.2-2.656,3.579" transform="translate(-409.914 -121.761)" fill="#1a1818"></path><path d="M552.345,148.867l1.8-.485a4.155,4.155,0,0,1,.37,1.87,4.167,4.167,0,0,1,3.233-1.917,2.167,2.167,0,0,1,.624.116l-.739,1.963a1.54,1.54,0,0,0-.508-.092,2.741,2.741,0,0,0-1.917.831,2.071,2.071,0,0,0-.67,1.824v7.2h-1.8v-8.867a5.811,5.811,0,0,0-.393-2.448" transform="translate(-449.186 -121.614)" fill="#1a1818"></path><path d="M585.83,127.647l1.8-.346a10.115,10.115,0,0,1,.3,2.725v14.155h-1.8V130a7.771,7.771,0,0,0-.3-2.355m6.558,5.034h2.263l-4.526,4.988,5.565,6.512h-2.4L588,137.669Z" transform="translate(-474.658 -105.613)" fill="#1a1818"></path><path d="M640.826,158l.693,1.155a5.745,5.745,0,0,1-3.88,1.432c-3.187,0-5.1-2.309-5.1-6.119a6.141,6.141,0,0,1,1.386-4.341,4.516,4.516,0,0,1,6.558-.346c.993,1.016,1.27,2.1,1.316,4.849v.254h-7.182v.277a4.588,4.588,0,0,0,.531,2.517,3.252,3.252,0,0,0,2.863,1.409A3.959,3.959,0,0,0,640.826,158m-6.212-4.48h5.265a4.932,4.932,0,0,0-.531-2.563,2.446,2.446,0,0,0-2.078-1.016c-1.64,0-2.563,1.2-2.656,3.579" transform="translate(-510.188 -121.761)" fill="#1a1818"></path><path d="M686.537,139.213l-.554,1.362h-2.4v7.413c0,1.27.347,1.709,1.478,1.709a2.292,2.292,0,0,0,1.132-.231l.254,1.155a4.261,4.261,0,0,1-2.032.462,3.347,3.347,0,0,1-1.5-.323c-.808-.393-1.108-1.131-1.108-2.286v-7.9h-1.5v-1.362h1.5c0-1.108.185-2.909.185-2.909l1.894-.416a30.991,30.991,0,0,0-.231,3.325Z" transform="translate(-546.523 -112.145)" fill="#1a1818"></path><path d="M150.431,36.669H123.694a2.431,2.431,0,0,0-2.43,2.431V55.5c2.1-1.6,4.725-3.829,9.462-2.66,4.083,1.007,4.973,4.154,11.43,7.729,3.953,2.189,7.662.5,10.705-1.268V39.1a2.431,2.431,0,0,0-2.431-2.431" transform="translate(-121.264 -36.669)" fill="#00973d"></path><path d="M144.245,141.048a7.677,7.677,0,0,1-3.386-1.283c-2.263-1.4-4.432-3.68-9.045-6.075-3.675-1.786-7.26-.424-10.545,1.448l0,0v18.383a2.431,2.431,0,0,0,2.43,2.43h26.736a2.431,2.431,0,0,0,2.431-2.43V138.535c-2.854,1.636-5.594,2.965-8.618,2.513" transform="translate(-121.265 -109.837)" fill="#00509c"></path><path d="M142.156,110.918c-6.458-3.575-7.348-6.722-11.43-7.729-4.737-1.169-7.364,1.063-9.462,2.66l0,3.308v3.166c3.285-1.872,6.919-3.33,10.545-1.448,4.614,2.395,6.783,4.678,9.045,6.075a8.661,8.661,0,0,0,3.386,1.283c3.025.452,5.765-.877,8.618-2.513l-.007-2.925.007-3.145c-3.043,1.768-6.752,3.457-10.705,1.268" transform="translate(-121.264 -87.023)" fill="#fff"></path></svg>'},7329:function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GeonorgeFooter=void 0;const l=n(406),c=n(1406),p=s(n(93)),d=s(n(7856));let h=class extends l.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}getLinkList(t,e){return"en"===t?`<li><a href="${(0,c.getGeonorgeUrl)(t,e)}about/what-is-geonorge/">What is Geonorge</a></li>`:`\n <li><a href="${(0,c.getGeonorgeUrl)(t,e)}aktuelt/om-geonorge/">Om Geonorge</a></li>\n <li><a href="${(0,c.getGeonorgeUrl)(t,e)}aktuelt/Nyheter/annet/personvern-og-bruk-av-cookies/">Personvern og bruk av cookies</a></li>\n `}getContactInfoText(t,e){return"en"===t?'\n <p>\n Telephone: +47 32 11 80 00<br>\n <a title="post@norgedigitalt.no" href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br>\n Org. nr.: 971 040 238\n </p>\n ':'\n <p>\n Telefon: 32 11 80 00<br>\n <a title="post@norgedigitalt.no" href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br>\n Org. nr.: 971 040 238\n </p>\n '}connectedCallback(){var t;this.geonorgeFooterElement=(0,l.getShadowRootElement)(this,"#geonorge-footer"),this.versionTextElement=(0,l.getShadowRootElement)(this,"#version-text"),this.geonorgeLogoElement=(0,l.getShadowRootElement)(this,"#geonorge-logo"),this.kartverketLogoElement=(0,l.getShadowRootElement)(this,"#kartverket-logo"),this.linkListElement=(0,l.getShadowRootElement)(this,"#link-list"),this.aboutSiteHeader=(0,l.getShadowRootElement)(this,"#about-site-header"),this.contactHeader=(0,l.getShadowRootElement)(this,"#contact-header"),this.aSolutionByText=(0,l.getShadowRootElement)(this,"#a-solution-by-text"),this.contactInfoText=(0,l.getShadowRootElement)(this,"#contact-info-text"),this.geonorgeFooterElement.setAttribute("environment",this.environment),(null===(t=this.version)||void 0===t?void 0:t.length)&&(this.versionTextElement.innerText="en"===this.language?`Version ${this.version}`:`Versjon ${this.version}`),this.geonorgeLogoElement.innerHTML=p.default,this.kartverketLogoElement.innerHTML=d.default,this.linkListElement.innerHTML=this.getLinkList(this.language,this.environment),this.contactInfoText.innerHTML=this.getContactInfoText(this.language,this.environment),this.aboutSiteHeader.innerText="en"===this.language?"About":"Om nettstedet",this.contactHeader.innerText="en"===this.language?"Contact":"Kontakt",this.aSolutionByText.innerText="en"===this.language?"A solution by":"Kontakt"}languageChanged(){var t;this.linkListElement.innerHTML=this.getLinkList(this.language,this.environment),this.contactInfoText.innerHTML=this.getContactInfoText(this.language,this.environment),this.aboutSiteHeader.innerText="en"===this.language?"About":"Om nettstedet",this.contactHeader.innerText="en"===this.language?"Contact":"Kontakt",this.aSolutionByText.innerText="en"===this.language?"A solution by":"En løsning fra",(null===(t=this.version)||void 0===t?void 0:t.length)&&(this.versionTextElement.innerText="en"===this.language?`Version ${this.version}`:`Versjon ${this.version}`)}};h.elementSelector="geonorge-footer",i([(0,l.Prop)()],h.prototype,"id",void 0),i([(0,l.Prop)()],h.prototype,"environment",void 0),i([(0,l.Prop)()],h.prototype,"version",void 0),i([(0,l.Prop)()],h.prototype,"language",void 0),i([(0,l.Watch)("language")],h.prototype,"languageChanged",null),h=i([(0,l.Component)({tag:"geonorge-footer",template:Promise.resolve().then((()=>a(n(8259)))),style:Promise.resolve().then((()=>a(n(1325))))})],h),e.GeonorgeFooter=h},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,r,i,a)=>"articles"===n?`<a onClick="${o(r,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(r,a)}" href="${(0,e.getKartkatalogUrl)(i)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(7329)})())); | ||
//# sourceMappingURL=GeonorgeFooter.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.geonorge=n():(t.geonorge=t.geonorge||{},t.geonorge.init=n())}(self,(function(){return(()=>{var t={745:(t,n,e)=>{"use strict";e.r(n),e.d(n,{default:()=>s});var i=e(3062),o=e.n(i),r=e(7638),a=e.n(r)()(o());a.push([t.id,'*{box-sizing:border-box}html{padding:0;margin:0}body{color:#2f3940;font-family:"Open Sans",sans-serif;margin:0;padding:0}',"",{version:3,sources:["webpack://./init.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,KACI,SAAA,CACA,QAAA,CAGJ,KACI,aCLU,CDMV,kCAAA,CACA,QAAA,CACA,SAAA",sourcesContent:['@import "./style/all";\n\n* {\n box-sizing: border-box;\n}\n\nhtml {\n padding: 0;\n margin: 0;\n}\n\nbody {\n color: $default-text;\n font-family: "Open Sans", sans-serif;\n margin: 0;\n padding: 0;\n}\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},7638:t=>{"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=t(n);return n[2]?"@media ".concat(n[2]," {").concat(e,"}"):e})).join("")},n.i=function(t,e,i){"string"==typeof t&&(t=[[null,t,""]]);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<t.length;s++){var c=[].concat(t[s]);i&&o[c[0]]||(e&&(c[2]?c[2]="".concat(e," and ").concat(c[2]):c[2]=e),n.push(c))}},n}},3062:t=>{"use strict";function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e<n;e++)i[e]=t[e];return i}t.exports=function(t){var e,i,o=(i=4,function(t){if(Array.isArray(t))return t}(e=t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,o,r=[],a=!0,s=!1;try{for(e=e.call(t);!(a=(i=e.next()).done)&&(r.push(i.value),!n||r.length!==n);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==e.return||e.return()}finally{if(s)throw o}}return r}}(e,i)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}}(e,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(!a)return r;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),f="/*# ".concat(c," */"),u=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[r].concat(u).concat([f]).join("\n")}return[r].join("\n")}},6474:(t,n,e)=>{var i;!function(){function o(t,n,e){return t.call.apply(t.bind,arguments)}function r(t,n,e){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(e,i),t.apply(n,e)}}return function(){return t.apply(n,arguments)}}function a(t,n,e){return(a=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:r).apply(null,arguments)}var s=Date.now||function(){return+new Date};function c(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var f=!!window.FontFace;function u(t,n,e,i){if(n=t.c.createElement(n),e)for(var o in e)e.hasOwnProperty(o)&&("style"==o?n.style.cssText=e[o]:n.setAttribute(o,e[o]));return i&&n.appendChild(t.c.createTextNode(i)),n}function l(t,n,e){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(e,t.lastChild)}function h(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t,n,e){n=n||[],e=e||[];for(var i=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var r=!1,a=0;a<i.length;a+=1)if(n[o]===i[a]){r=!0;break}r||i.push(n[o])}for(n=[],o=0;o<i.length;o+=1){for(r=!1,a=0;a<e.length;a+=1)if(i[o]===e[a]){r=!0;break}r||n.push(i[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(t,n){for(var e=t.className.split(/\s+/),i=0,o=e.length;i<o;i++)if(e[i]==n)return!0;return!1}function g(t,n,e){function i(){s&&o&&r&&(s(a),s=null)}n=u(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,r=!0,a=null,s=e||null;f?(n.onload=function(){o=!0,i()},n.onerror=function(){o=!0,a=Error("Stylesheet failed to load"),i()}):setTimeout((function(){o=!0,i()}),0),l(t,"head",n)}function v(t,n,e,i){var o=t.c.getElementsByTagName("head")[0];if(o){var r=u(t,"script",{src:n}),a=!1;return r.onload=r.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,e&&e(null),r.onload=r.onreadystatechange=null,"HEAD"==r.parentNode.tagName&&o.removeChild(r))},o.appendChild(r),setTimeout((function(){a||(a=!0,e&&e(Error("Script load timeout")))}),i||5e3),r}return null}function m(){this.a=0,this.c=null}function y(t){return t.a++,function(){t.a--,b(t)}}function w(t,n){t.c=n,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function x(t){this.a=t||"-"}function A(t,n){this.c=t,this.f=4,this.a="n";var e=(n||"n4").match(/^([nio])([1-9])$/i);e&&(this.a=e[1],this.f=parseInt(e[2],10))}function j(t){var n=[];t=t.split(/,\s*/);for(var e=0;e<t.length;e++){var i=t[e].replace(/['"]/g,"");-1!=i.indexOf(" ")||/^\d/.test(i)?n.push("'"+i+"'"):n.push(i)}return n.join(",")}function k(t){return t.a+t.f}function S(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function _(t){var n=4,e="n",i=null;return t&&((i=t.match(/(normal|oblique|italic)/i))&&i[1]&&(e=i[1].substr(0,1).toLowerCase()),(i=t.match(/([1-9]00|normal|bold)/i))&&i[1]&&(/bold/i.test(i[1])?n=7:/[1-9]00/.test(i[1])&&(n=parseInt(i[1].substr(0,1),10)))),e+n}function C(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new x("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function $(t){if(t.g){var n=p(t.f,t.a.c("wf","active")),e=[],i=[t.a.c("wf","loading")];n||e.push(t.a.c("wf","inactive")),d(t.f,e,i)}T(t,"inactive")}function T(t,n,e){t.j&&t.h[n]&&(e?t.h[n](e.c,k(e)):t.h[n]())}function E(){this.c={}}function O(t,n){this.c=t,this.f=n,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function I(t){l(t.c,"body",t.a)}function N(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+j(t.c)+";font-style:"+S(t)+";font-weight:"+t.f+"00;"}function P(t,n,e,i,o,r){this.g=t,this.j=n,this.a=i,this.c=e,this.f=o||3e3,this.h=r||void 0}function B(t,n,e,i,o,r,a){this.v=t,this.B=n,this.c=e,this.a=i,this.s=a||"BESbswy",this.f={},this.w=o||3e3,this.u=r||null,this.m=this.j=this.h=this.g=null,this.g=new O(this.c,this.s),this.h=new O(this.c,this.s),this.j=new O(this.c,this.s),this.m=new O(this.c,this.s),t=N(t=new A(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=t,t=N(t=new A(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=t,t=N(t=new A("serif",k(this.a))),this.j.a.style.cssText=t,t=N(t=new A("sans-serif",k(this.a))),this.m.a.style.cssText=t,I(this.g),I(this.h),I(this.j),I(this.m)}x.prototype.c=function(t){for(var n=[],e=0;e<arguments.length;e++)n.push(arguments[e].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},P.prototype.start=function(){var t=this.c.o.document,n=this,e=s(),i=new Promise((function(i,o){!function r(){s()-e>=n.f?o():t.fonts.load(function(t){return S(t)+" "+t.f+"00 300px "+j(t.c)}(n.a),n.h).then((function(t){1<=t.length?i():setTimeout(r,25)}),(function(){o()}))}()})),o=null,r=new Promise((function(t,e){o=setTimeout(e,n.f)}));Promise.race([r,i]).then((function(){o&&(clearTimeout(o),o=null),n.g(n.a)}),(function(){n.j(n.a)}))};var D={D:"serif",C:"sans-serif"},F=null;function M(){if(null===F){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);F=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return F}function L(t,n,e){for(var i in D)if(D.hasOwnProperty(i)&&n===t.f[D[i]]&&e===t.f[D[i]])return!0;return!1}function W(t){var n,e=t.g.a.offsetWidth,i=t.h.a.offsetWidth;(n=e===t.f.serif&&i===t.f["sans-serif"])||(n=M()&&L(t,e,i)),n?s()-t.A>=t.w?M()&&L(t,e,i)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?R(t,t.v):R(t,t.B):function(t){setTimeout(a((function(){W(this)}),t),50)}(t):R(t,t.v)}function R(t,n){setTimeout(a((function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),n(this.a)}),t),0)}function U(t,n,e){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=e}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),W(this)};var q=null;function z(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&d(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),T(t,"active")):$(t.a))}function G(t){this.j=t,this.a=new E,this.h=0,this.f=this.g=!0}function J(t,n,e,i,o){var r=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,s=i||{};if(0===e.length&&r)$(n.a);else{n.f+=e.length,r&&(n.j=r);var c,f=[];for(c=0;c<e.length;c++){var u=e[c],l=s[u.c],h=n.a,p=u;if(h.g&&d(h.f,[h.a.c("wf",p.c,k(p).toString(),"loading")]),T(h,"fontloading",p),h=null,null===q)if(window.FontFace){p=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var g=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);q=p?42<parseInt(p[1],10):!g}else q=!1;h=q?new P(a(n.g,n),a(n.h,n),n.c,u,n.s,l):new B(a(n.g,n),a(n.h,n),n.c,u,n.s,t,l),f.push(h)}for(c=0;c<f.length;c++)f[c].start()}}),0)}function K(t,n){this.c=t,this.a=n}function H(t,n){this.c=t,this.a=n}function Q(t,n){this.c=t||V,this.a=[],this.f=[],this.g=n||""}U.prototype.g=function(t){var n=this.a;n.g&&d(n.f,[n.a.c("wf",t.c,k(t).toString(),"active")],[n.a.c("wf",t.c,k(t).toString(),"loading"),n.a.c("wf",t.c,k(t).toString(),"inactive")]),T(n,"fontactive",t),this.m=!0,z(this)},U.prototype.h=function(t){var n=this.a;if(n.g){var e=p(n.f,n.a.c("wf",t.c,k(t).toString(),"active")),i=[],o=[n.a.c("wf",t.c,k(t).toString(),"loading")];e||i.push(n.a.c("wf",t.c,k(t).toString(),"inactive")),d(n.f,i,o)}T(n,"fontinactive",t),z(this)},G.prototype.load=function(t){this.c=new c(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,e){var i=[],o=e.timeout;!function(t){t.g&&d(t.f,[t.a.c("wf","loading")]),T(t,"loading")}(n),i=function(t,n,e){var i,o=[];for(i in n)if(n.hasOwnProperty(i)){var r=t.c[i];r&&o.push(r(n[i],e))}return o}(t.a,e,t.c);var r=new U(t.c,n,o);for(t.h=i.length,n=0,e=i.length;n<e;n++)i[n].load((function(n,e,i){J(t,r,n,e,i)}))}(this,new C(this.c,t),t)},K.prototype.load=function(t){function n(){if(r["__mti_fntLst"+i]){var e,o=r["__mti_fntLst"+i](),a=[];if(o)for(var s=0;s<o.length;s++){var c=o[s].fontfamily;null!=o[s].fontStyle&&null!=o[s].fontWeight?(e=o[s].fontStyle+o[s].fontWeight,a.push(new A(c,e))):a.push(new A(c))}t(a)}else setTimeout((function(){n()}),50)}var e=this,i=e.a.projectId,o=e.a.version;if(i){var r=e.c.o;v(this.c,(e.a.api||"https://fast.fonts.net/jsapi")+"/"+i+".js"+(o?"?v="+o:""),(function(o){o?t([]):(r["__MonotypeConfiguration__"+i]=function(){return e.a},n())})).id="__MonotypeAPIScript__"+i}else t([])},H.prototype.load=function(t){var n,e,i=this.a.urls||[],o=this.a.families||[],r=this.a.testStrings||{},a=new m;for(n=0,e=i.length;n<e;n++)g(this.c,i[n],y(a));var s=[];for(n=0,e=o.length;n<e;n++)if((i=o[n].split(":"))[1])for(var c=i[1].split(","),f=0;f<c.length;f+=1)s.push(new A(i[0],c[f]));else s.push(new A(i[0]));w(a,(function(){t(s,r)}))};var V="https://fonts.googleapis.com/css";function X(t){this.f=t,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},tt={i:"i",italic:"i",n:"n",normal:"n"},nt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function et(t,n){this.c=t,this.a=n}var it={Arimo:!0,Cousine:!0,Tinos:!0};function ot(t,n){this.c=t,this.a=n}function rt(t,n){this.c=t,this.f=n,this.a=[]}et.prototype.load=function(t){var n=new m,e=this.c,i=new Q(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var e=n.length,i=0;i<e;i++){var o=n[i].split(":");3==o.length&&t.f.push(o.pop());var r="";2==o.length&&""!=o[1]&&(r=":"),t.a.push(o.join(r))}}(i,o);var r=new X(o);!function(t){for(var n=t.f.length,e=0;e<n;e++){var i=t.f[e].split(":"),o=i[0].replace(/\+/g," "),r=["n4"];if(2<=i.length){var a;if(a=[],s=i[1])for(var s,c=(s=s.split(",")).length,f=0;f<c;f++){var u;if((u=s[f]).match(/^[\w-]+$/))if(null==(l=nt.exec(u.toLowerCase())))u="";else{if(u=null==(u=l[2])||""==u?"n":tt[u],null==(l=l[1])||""==l)l="4";else var l=Z[l]||(isNaN(l)?"4":l.substr(0,1));u=[u,l].join("")}else u="";u&&a.push(u)}0<a.length&&(r=a),3==i.length&&(a=[],0<(i=(i=i[2])?i.split(","):a).length&&(i=Y[i[0]])&&(t.c[o]=i))}for(t.c[o]||(i=Y[o])&&(t.c[o]=i),i=0;i<r.length;i+=1)t.a.push(new A(o,r[i]))}}(r),g(e,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,e=[],i=0;i<n;i++)e.push(t.a[i].replace(/ /g,"+"));return n=t.c+"?family="+e.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(i),y(n)),w(n,(function(){t(r.a,r.c,it)}))},ot.prototype.load=function(t){var n=this.a.id,e=this.c.o;n?v(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",(function(n){if(n)t([]);else if(e.Typekit&&e.Typekit.config&&e.Typekit.config.fn){n=e.Typekit.config.fn;for(var i=[],o=0;o<n.length;o+=2)for(var r=n[o],a=n[o+1],s=0;s<a.length;s++)i.push(new A(r,a[s]));try{e.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(i)}}),2e3):t([])},rt.prototype.load=function(t){var n=this.f.id,e=this.c.o,i=this;n?(e.__webfontfontdeckmodule__||(e.__webfontfontdeckmodule__={}),e.__webfontfontdeckmodule__[n]=function(n,e){for(var o=0,r=e.fonts.length;o<r;++o){var a=e.fonts[o];i.a.push(new A(a.name,_("font-weight:"+a.weight+";font-style:"+a.style)))}t(i.a)},v(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",(function(n){n&&t([])}))):t([])};var at=new G(window);at.a.c.custom=function(t,n){return new H(n,t)},at.a.c.fontdeck=function(t,n){return new rt(n,t)},at.a.c.monotype=function(t,n){return new K(n,t)},at.a.c.typekit=function(t,n){return new ot(n,t)},at.a.c.google=function(t,n){return new et(n,t)};var st={load:a(at.load,at)};void 0===(i=function(){return st}.call(n,e,n,t))||(t.exports=i)}()},1799:function(t,n,e){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});const o=i(e(6474)),r=i(e(745));o.default.load({google:{families:["Raleway:100,400,500,700","Open Sans:400,600,700","sans-serif"]}});const a=document.head||document.getElementsByTagName("head")[0],s=r.default.toString(),c=document.createElement("style");if(a.appendChild(c),c.appendChild(document.createTextNode(s)),window.navigator.userAgent.indexOf("Edge/")>-1){const t=document.createElement("script");t.src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.5.0/webcomponents-bundle.min.js",a.appendChild(t)}}},n={};function e(i){var o=n[i];if(void 0!==o)return o.exports;var r=n[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.exports}return e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e(1799)})()})); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.geonorge=n():(t.geonorge=t.geonorge||{},t.geonorge.init=n())}(self,(()=>(()=>{var t={745:(t,n,e)=>{"use strict";e.r(n),e.d(n,{default:()=>s});var i=e(4663),o=e.n(i),a=e(7638),r=e.n(a)()(o());r.push([t.id,'*{box-sizing:border-box}html{padding:0;margin:0}body{color:#2f3940;font-family:"Open Sans",sans-serif;margin:0;padding:0}',"",{version:3,sources:["webpack://./init.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,KACI,SAAA,CACA,QAAA,CAGJ,KACI,aCLU,CDMV,kCAAA,CACA,QAAA,CACA,SAAA",sourcesContent:['@import "./style/all";\n\n* {\n box-sizing: border-box;\n}\n\nhtml {\n padding: 0;\n margin: 0;\n}\n\nbody {\n color: $default-text;\n font-family: "Open Sans", sans-serif;\n margin: 0;\n padding: 0;\n}\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=r},7638:t=>{"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e="",i=void 0!==n[5];return n[4]&&(e+="@supports (".concat(n[4],") {")),n[2]&&(e+="@media ".concat(n[2]," {")),i&&(e+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),e+=t(n),i&&(e+="}"),n[2]&&(e+="}"),n[4]&&(e+="}"),e})).join("")},n.i=function(t,e,i,o,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(i)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(r[c]=!0)}for(var f=0;f<t.length;f++){var u=[].concat(t[f]);i&&r[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),e&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=e):u[2]=e),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),n.push(u))}},n}},4663:t=>{"use strict";t.exports=function(t){var n=t[1],e=t[3];if(!e)return n;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),a="/*# ".concat(o," */"),r=e.sources.map((function(t){return"/*# sourceURL=".concat(e.sourceRoot||"").concat(t," */")}));return[n].concat(r).concat([a]).join("\n")}return[n].join("\n")}},6474:(t,n,e)=>{var i;!function(){function o(t,n,e){return t.call.apply(t.bind,arguments)}function a(t,n,e){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(e,i),t.apply(n,e)}}return function(){return t.apply(n,arguments)}}function r(t,n,e){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:a).apply(null,arguments)}var s=Date.now||function(){return+new Date};function c(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var f=!!window.FontFace;function u(t,n,e,i){if(n=t.c.createElement(n),e)for(var o in e)e.hasOwnProperty(o)&&("style"==o?n.style.cssText=e[o]:n.setAttribute(o,e[o]));return i&&n.appendChild(t.c.createTextNode(i)),n}function l(t,n,e){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(e,t.lastChild)}function h(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t,n,e){n=n||[],e=e||[];for(var i=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var a=!1,r=0;r<i.length;r+=1)if(n[o]===i[r]){a=!0;break}a||i.push(n[o])}for(n=[],o=0;o<i.length;o+=1){for(a=!1,r=0;r<e.length;r+=1)if(i[o]===e[r]){a=!0;break}a||n.push(i[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(t,n){for(var e=t.className.split(/\s+/),i=0,o=e.length;i<o;i++)if(e[i]==n)return!0;return!1}function g(t,n,e){function i(){s&&o&&a&&(s(r),s=null)}n=u(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,a=!0,r=null,s=e||null;f?(n.onload=function(){o=!0,i()},n.onerror=function(){o=!0,r=Error("Stylesheet failed to load"),i()}):setTimeout((function(){o=!0,i()}),0),l(t,"head",n)}function v(t,n,e,i){var o=t.c.getElementsByTagName("head")[0];if(o){var a=u(t,"script",{src:n}),r=!1;return a.onload=a.onreadystatechange=function(){r||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(r=!0,e&&e(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout((function(){r||(r=!0,e&&e(Error("Script load timeout")))}),i||5e3),a}return null}function m(){this.a=0,this.c=null}function y(t){return t.a++,function(){t.a--,b(t)}}function w(t,n){t.c=n,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function x(t){this.a=t||"-"}function A(t,n){this.c=t,this.f=4,this.a="n";var e=(n||"n4").match(/^([nio])([1-9])$/i);e&&(this.a=e[1],this.f=parseInt(e[2],10))}function j(t){var n=[];t=t.split(/,\s*/);for(var e=0;e<t.length;e++){var i=t[e].replace(/['"]/g,"");-1!=i.indexOf(" ")||/^\d/.test(i)?n.push("'"+i+"'"):n.push(i)}return n.join(",")}function k(t){return t.a+t.f}function _(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function C(t){var n=4,e="n",i=null;return t&&((i=t.match(/(normal|oblique|italic)/i))&&i[1]&&(e=i[1].substr(0,1).toLowerCase()),(i=t.match(/([1-9]00|normal|bold)/i))&&i[1]&&(/bold/i.test(i[1])?n=7:/[1-9]00/.test(i[1])&&(n=parseInt(i[1].substr(0,1),10)))),e+n}function S(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new x("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function $(t){if(t.g){var n=p(t.f,t.a.c("wf","active")),e=[],i=[t.a.c("wf","loading")];n||e.push(t.a.c("wf","inactive")),d(t.f,e,i)}T(t,"inactive")}function T(t,n,e){t.j&&t.h[n]&&(e?t.h[n](e.c,k(e)):t.h[n]())}function E(){this.c={}}function O(t,n){this.c=t,this.f=n,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function N(t){l(t.c,"body",t.a)}function I(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+j(t.c)+";font-style:"+_(t)+";font-weight:"+t.f+"00;"}function P(t,n,e,i,o,a){this.g=t,this.j=n,this.a=i,this.c=e,this.f=o||3e3,this.h=a||void 0}function B(t,n,e,i,o,a,r){this.v=t,this.B=n,this.c=e,this.a=i,this.s=r||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new O(this.c,this.s),this.h=new O(this.c,this.s),this.j=new O(this.c,this.s),this.m=new O(this.c,this.s),t=I(t=new A(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=t,t=I(t=new A(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=t,t=I(t=new A("serif",k(this.a))),this.j.a.style.cssText=t,t=I(t=new A("sans-serif",k(this.a))),this.m.a.style.cssText=t,N(this.g),N(this.h),N(this.j),N(this.m)}x.prototype.c=function(t){for(var n=[],e=0;e<arguments.length;e++)n.push(arguments[e].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},P.prototype.start=function(){var t=this.c.o.document,n=this,e=s(),i=new Promise((function(i,o){!function a(){s()-e>=n.f?o():t.fonts.load(function(t){return _(t)+" "+t.f+"00 300px "+j(t.c)}(n.a),n.h).then((function(t){1<=t.length?i():setTimeout(a,25)}),(function(){o()}))}()})),o=null,a=new Promise((function(t,e){o=setTimeout(e,n.f)}));Promise.race([a,i]).then((function(){o&&(clearTimeout(o),o=null),n.g(n.a)}),(function(){n.j(n.a)}))};var D={D:"serif",C:"sans-serif"},F=null;function M(){if(null===F){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);F=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return F}function L(t,n,e){for(var i in D)if(D.hasOwnProperty(i)&&n===t.f[D[i]]&&e===t.f[D[i]])return!0;return!1}function W(t){var n,e=t.g.a.offsetWidth,i=t.h.a.offsetWidth;(n=e===t.f.serif&&i===t.f["sans-serif"])||(n=M()&&L(t,e,i)),n?s()-t.A>=t.w?M()&&L(t,e,i)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?R(t,t.v):R(t,t.B):function(t){setTimeout(r((function(){W(this)}),t),50)}(t):R(t,t.v)}function R(t,n){setTimeout(r((function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),n(this.a)}),t),0)}function U(t,n,e){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=e}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),W(this)};var q=null;function z(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&d(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),T(t,"active")):$(t.a))}function G(t){this.j=t,this.a=new E,this.h=0,this.f=this.g=!0}function J(t,n,e,i,o){var a=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,s=i||{};if(0===e.length&&a)$(n.a);else{n.f+=e.length,a&&(n.j=a);var c,f=[];for(c=0;c<e.length;c++){var u=e[c],l=s[u.c],h=n.a,p=u;if(h.g&&d(h.f,[h.a.c("wf",p.c,k(p).toString(),"loading")]),T(h,"fontloading",p),h=null,null===q)if(window.FontFace){p=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var g=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);q=p?42<parseInt(p[1],10):!g}else q=!1;h=q?new P(r(n.g,n),r(n.h,n),n.c,u,n.s,l):new B(r(n.g,n),r(n.h,n),n.c,u,n.s,t,l),f.push(h)}for(c=0;c<f.length;c++)f[c].start()}}),0)}function K(t,n){this.c=t,this.a=n}function H(t,n){this.c=t,this.a=n}function Q(t,n){this.c=t||V,this.a=[],this.f=[],this.g=n||""}U.prototype.g=function(t){var n=this.a;n.g&&d(n.f,[n.a.c("wf",t.c,k(t).toString(),"active")],[n.a.c("wf",t.c,k(t).toString(),"loading"),n.a.c("wf",t.c,k(t).toString(),"inactive")]),T(n,"fontactive",t),this.m=!0,z(this)},U.prototype.h=function(t){var n=this.a;if(n.g){var e=p(n.f,n.a.c("wf",t.c,k(t).toString(),"active")),i=[],o=[n.a.c("wf",t.c,k(t).toString(),"loading")];e||i.push(n.a.c("wf",t.c,k(t).toString(),"inactive")),d(n.f,i,o)}T(n,"fontinactive",t),z(this)},G.prototype.load=function(t){this.c=new c(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,e){var i=[],o=e.timeout;!function(t){t.g&&d(t.f,[t.a.c("wf","loading")]),T(t,"loading")}(n),i=function(t,n,e){var i,o=[];for(i in n)if(n.hasOwnProperty(i)){var a=t.c[i];a&&o.push(a(n[i],e))}return o}(t.a,e,t.c);var a=new U(t.c,n,o);for(t.h=i.length,n=0,e=i.length;n<e;n++)i[n].load((function(n,e,i){J(t,a,n,e,i)}))}(this,new S(this.c,t),t)},K.prototype.load=function(t){function n(){if(a["__mti_fntLst"+i]){var e,o=a["__mti_fntLst"+i](),r=[];if(o)for(var s=0;s<o.length;s++){var c=o[s].fontfamily;null!=o[s].fontStyle&&null!=o[s].fontWeight?(e=o[s].fontStyle+o[s].fontWeight,r.push(new A(c,e))):r.push(new A(c))}t(r)}else setTimeout((function(){n()}),50)}var e=this,i=e.a.projectId,o=e.a.version;if(i){var a=e.c.o;v(this.c,(e.a.api||"https://fast.fonts.net/jsapi")+"/"+i+".js"+(o?"?v="+o:""),(function(o){o?t([]):(a["__MonotypeConfiguration__"+i]=function(){return e.a},n())})).id="__MonotypeAPIScript__"+i}else t([])},H.prototype.load=function(t){var n,e,i=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},r=new m;for(n=0,e=i.length;n<e;n++)g(this.c,i[n],y(r));var s=[];for(n=0,e=o.length;n<e;n++)if((i=o[n].split(":"))[1])for(var c=i[1].split(","),f=0;f<c.length;f+=1)s.push(new A(i[0],c[f]));else s.push(new A(i[0]));w(r,(function(){t(s,a)}))};var V="https://fonts.googleapis.com/css";function X(t){this.f=t,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},tt={i:"i",italic:"i",n:"n",normal:"n"},nt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function et(t,n){this.c=t,this.a=n}var it={Arimo:!0,Cousine:!0,Tinos:!0};function ot(t,n){this.c=t,this.a=n}function at(t,n){this.c=t,this.f=n,this.a=[]}et.prototype.load=function(t){var n=new m,e=this.c,i=new Q(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var e=n.length,i=0;i<e;i++){var o=n[i].split(":");3==o.length&&t.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),t.a.push(o.join(a))}}(i,o);var a=new X(o);!function(t){for(var n=t.f.length,e=0;e<n;e++){var i=t.f[e].split(":"),o=i[0].replace(/\+/g," "),a=["n4"];if(2<=i.length){var r;if(r=[],s=i[1])for(var s,c=(s=s.split(",")).length,f=0;f<c;f++){var u;if((u=s[f]).match(/^[\w-]+$/))if(null==(l=nt.exec(u.toLowerCase())))u="";else{if(u=null==(u=l[2])||""==u?"n":tt[u],null==(l=l[1])||""==l)l="4";else var l=Z[l]||(isNaN(l)?"4":l.substr(0,1));u=[u,l].join("")}else u="";u&&r.push(u)}0<r.length&&(a=r),3==i.length&&(r=[],0<(i=(i=i[2])?i.split(","):r).length&&(i=Y[i[0]])&&(t.c[o]=i))}for(t.c[o]||(i=Y[o])&&(t.c[o]=i),i=0;i<a.length;i+=1)t.a.push(new A(o,a[i]))}}(a),g(e,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,e=[],i=0;i<n;i++)e.push(t.a[i].replace(/ /g,"+"));return n=t.c+"?family="+e.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(i),y(n)),w(n,(function(){t(a.a,a.c,it)}))},ot.prototype.load=function(t){var n=this.a.id,e=this.c.o;n?v(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",(function(n){if(n)t([]);else if(e.Typekit&&e.Typekit.config&&e.Typekit.config.fn){n=e.Typekit.config.fn;for(var i=[],o=0;o<n.length;o+=2)for(var a=n[o],r=n[o+1],s=0;s<r.length;s++)i.push(new A(a,r[s]));try{e.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(i)}}),2e3):t([])},at.prototype.load=function(t){var n=this.f.id,e=this.c.o,i=this;n?(e.__webfontfontdeckmodule__||(e.__webfontfontdeckmodule__={}),e.__webfontfontdeckmodule__[n]=function(n,e){for(var o=0,a=e.fonts.length;o<a;++o){var r=e.fonts[o];i.a.push(new A(r.name,C("font-weight:"+r.weight+";font-style:"+r.style)))}t(i.a)},v(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",(function(n){n&&t([])}))):t([])};var rt=new G(window);rt.a.c.custom=function(t,n){return new H(n,t)},rt.a.c.fontdeck=function(t,n){return new at(n,t)},rt.a.c.monotype=function(t,n){return new K(n,t)},rt.a.c.typekit=function(t,n){return new ot(n,t)},rt.a.c.google=function(t,n){return new et(n,t)};var st={load:r(rt.load,rt)};void 0===(i=function(){return st}.call(n,e,n,t))||(t.exports=i)}()},1799:function(t,n,e){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});const o=i(e(6474)),a=i(e(745));o.default.load({google:{families:["Raleway:100,400,500,700","Open Sans:400,600,700","sans-serif"]}});const r=document.head||document.getElementsByTagName("head")[0],s=a.default.toString(),c=document.createElement("style");if(r.appendChild(c),c.appendChild(document.createTextNode(s)),window.navigator.userAgent.indexOf("Edge/")>-1){const t=document.createElement("script");t.src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.5.0/webcomponents-bundle.min.js",r.appendChild(t)}}},n={};function e(i){var o=n[i];if(void 0!==o)return o.exports;var a=n[i]={id:i,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.exports}return e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e(1799)})())); | ||
//# sourceMappingURL=init.js.map |
@@ -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: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:56px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:15px}}@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: 56px;\n @include breakpoint(phablet) {\n top: 15px;\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){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(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(!a)return r;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=(0,u.getShadowRootElement)(this,"#menu-toggle-button"),this.menuTitle=(0,u.getShadowRootElement)(this,"#menu-title"),this.menuIcon=(0,u.getShadowRootElement)(this,"#menu-icon"),this.closeIcon=(0,u.getShadowRootElement)(this,"#close-icon"),this.menuContainer=(0,u.getShadowRootElement)(this,"#menu-container"),this.menuItemListContainer=(0,u.getShadowRootElement)(this,"#menu-item-list-container"),this.menuActionsRow=(0,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"),(0,d.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis meny"),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),(0,d.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis 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=(0,u.getElement)(e);t.onClick&&n.addEventListener("menuButtonClick",t.onClick),t.active&&(n.showmenu=t.active)}};p.elementSelector="main-menu",r([(0,u.Prop)()],p.prototype,"id",void 0),r([(0,u.Prop)()],p.prototype,"language",void 0),r([(0,u.Prop)()],p.prototype,"environment",void 0),r([(0,u.Prop)()],p.prototype,"signinurl",void 0),r([(0,u.Prop)()],p.prototype,"signouturl",void 0),r([(0,u.Prop)()],p.prototype,"norwegianurl",void 0),r([(0,u.Prop)()],p.prototype,"englishurl",void 0),r([(0,u.Toggle)()],p.prototype,"isloggedin",void 0),r([(0,u.Toggle)()],p.prototype,"showmenu",void 0),r([(0,u.Toggle)()],p.prototype,"hasAuthenticationFunction",void 0),r([(0,u.Toggle)()],p.prototype,"hasLanguageSelectFunctions",void 0),r([(0,u.Prop)()],p.prototype,"menuitems",void 0),r([(0,u.Dispatch)("onSignInClick")],p.prototype,"onSignInClick",void 0),r([(0,u.Dispatch)("onSignOutClick")],p.prototype,"onSignOutClick",void 0),r([(0,u.Dispatch)("onNorwegianLanguageSelect")],p.prototype,"onNorwegianLanguageSelect",void 0),r([(0,u.Dispatch)("onEnglishLanguageSelect")],p.prototype,"onEnglishLanguageSelect",void 0),r([(0,u.Listen)("click","#menu-toggle-button")],p.prototype,"buttonClicked",null),r([(0,u.Watch)("hasauthenticationfunction")],p.prototype,"hasAuthenticationFunctionChanged",null),r([(0,u.Watch)("isloggedin")],p.prototype,"isLoggedInChanged",null),r([(0,u.Watch)("haslanguageselectfunctions")],p.prototype,"hasLanguageSelectFunctionsChanged",null),r([(0,u.Watch)("language")],p.prototype,"languageChanged",null),r([(0,u.Watch)("showmenu")],p.prototype,"showMenuChanged",null),r([(0,u.Watch)("menuitems")],p.prototype,"menuItemsChanged",null),p=r([(0,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=(0,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=e.toString()}&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=(0,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){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.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,(()=>(()=>{var e={4667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(4663),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:rgba(0,0,0,0);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:56px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:15px}}@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,wBAAA,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: 56px;\n @include breakpoint(phablet) {\n top: 15px;\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="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);i&&a[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},4663:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */"),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([r]).join("\n")}return[t].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);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}: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=(0,u.getShadowRootElement)(this,"#menu-toggle-button"),this.menuTitle=(0,u.getShadowRootElement)(this,"#menu-title"),this.menuIcon=(0,u.getShadowRootElement)(this,"#menu-icon"),this.closeIcon=(0,u.getShadowRootElement)(this,"#close-icon"),this.menuContainer=(0,u.getShadowRootElement)(this,"#menu-container"),this.menuItemListContainer=(0,u.getShadowRootElement)(this,"#menu-item-list-container"),this.menuActionsRow=(0,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"),(0,d.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis meny"),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),(0,d.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis 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=(0,u.getElement)(e);t.onClick&&n.addEventListener("menuButtonClick",t.onClick),t.active&&(n.showmenu=t.active)}};p.elementSelector="main-menu",r([(0,u.Prop)()],p.prototype,"id",void 0),r([(0,u.Prop)()],p.prototype,"language",void 0),r([(0,u.Prop)()],p.prototype,"environment",void 0),r([(0,u.Prop)()],p.prototype,"signinurl",void 0),r([(0,u.Prop)()],p.prototype,"signouturl",void 0),r([(0,u.Prop)()],p.prototype,"norwegianurl",void 0),r([(0,u.Prop)()],p.prototype,"englishurl",void 0),r([(0,u.Toggle)()],p.prototype,"isloggedin",void 0),r([(0,u.Toggle)()],p.prototype,"showmenu",void 0),r([(0,u.Toggle)()],p.prototype,"hasAuthenticationFunction",void 0),r([(0,u.Toggle)()],p.prototype,"hasLanguageSelectFunctions",void 0),r([(0,u.Prop)()],p.prototype,"menuitems",void 0),r([(0,u.Dispatch)("onSignInClick")],p.prototype,"onSignInClick",void 0),r([(0,u.Dispatch)("onSignOutClick")],p.prototype,"onSignOutClick",void 0),r([(0,u.Dispatch)("onNorwegianLanguageSelect")],p.prototype,"onNorwegianLanguageSelect",void 0),r([(0,u.Dispatch)("onEnglishLanguageSelect")],p.prototype,"onEnglishLanguageSelect",void 0),r([(0,u.Listen)("click","#menu-toggle-button")],p.prototype,"buttonClicked",null),r([(0,u.Watch)("hasauthenticationfunction")],p.prototype,"hasAuthenticationFunctionChanged",null),r([(0,u.Watch)("isloggedin")],p.prototype,"isLoggedInChanged",null),r([(0,u.Watch)("haslanguageselectfunctions")],p.prototype,"hasLanguageSelectFunctionsChanged",null),r([(0,u.Watch)("language")],p.prototype,"languageChanged",null),r([(0,u.Watch)("showmenu")],p.prototype,"showMenuChanged",null),r([(0,u.Watch)("menuitems")],p.prototype,"menuItemsChanged",null),p=r([(0,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=(0,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=e.toString()}&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=(0,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){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.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 |
@@ -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.MainSearchField=t())}(self,(function(){return(()=>{var e={4678:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(3062),s=n.n(r),o=n(7638),i=n.n(o)()(s());i.push([e.id,'*{box-sizing:border-box}div.main-search-field{font-family:"Open Sans",sans-serif;display:flex;height:37px;margin-top:.25em;position:relative;width:100%}@media(min-width: 37.5em){div.main-search-field{margin-top:0}}div.main-search-field .mainSearchLabel{width:0;height:0;overflow:hidden;opacity:0}div.main-search-field input{height:37px;width:100%;outline-offset:-2px;-webkit-appearance:none;background:#fff;border:1px solid #dfdcda;border-right:0;border-radius:2px 0 0 2px;font-size:1.2em;flex:1;margin:0;padding:0 .75em}div.main-search-field button{margin:0;-webkit-appearance:button;background:#fff;border:1px solid #dfdcda;border-left:0;border-radius:0 2px 2px 0;display:inline-block;padding:0 .75em;height:100%}div.main-search-field button svg{height:22px;width:21px}div.search-results-container{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;position:absolute;background:#fbfcfd;display:none;top:37px;z-index:1}div.search-results-container.open{display:block;width:100%;overflow-y:auto}div.search-results-container a{color:#3767c7;text-decoration:none}div.search-results-container a:hover{color:#0056b3;text-decoration:underline}div.search-results-container div.search-results-for-type:nth-child(odd){background-color:#fbfcfd}div.search-results-container div.search-results-for-type:nth-child(even){background-color:#f5f6f7}div.search-results-container div.search-results-for-type a.search-results-for-type-title{padding:8px 16px;font-size:1.2em;display:inline-block}div.search-results-container div.search-results-for-type a.search-results-for-type-title span.search-results-for-type-number-badge{-webkit-border-radius:6px;border-radius:6px;padding:2px 4px;color:#fff;background-color:#fe5000;display:inline-block;font-size:.8em;vertical-align:text-bottom}div.search-results-container div.search-results-for-type ul.search-results-for-type-list{list-style:none;padding:0 16px 8px 32px;margin:0}div.search-results-container div.search-results-for-type ul.search-results-for-type-list li a{padding:4px 0;display:block}.hidden{height:0;width:0;position:absolute;color:transparent;overflow:hidden}',"",{version:3,sources:["webpack://./custom-elements/main-navigation/main-search-field/main-search-field.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACE,qBAAA,CAGF,sBACE,kCCPa,CDQb,YAAA,CACA,WAAA,CACA,gBAAA,CACA,iBAAA,CACA,UAAA,CEEM,0BFRR,sBAQI,YAAA,CAAA,CAGF,uCACE,OAAA,CACA,QAAA,CACA,eAAA,CACA,SAAA,CAGF,4BACE,WAAA,CACA,UAAA,CACA,mBAAA,CACA,uBAAA,CACA,eAAA,CACA,wBAAA,CACA,cAAA,CACA,yBAAA,CACA,eAAA,CACA,MAAA,CACA,QAAA,CACA,eAAA,CAGF,6BACE,QAAA,CACA,yBAAA,CACA,eAAA,CACA,wBAAA,CACA,aAAA,CACA,yBAAA,CACA,oBAAA,CACA,eAAA,CACA,WAAA,CAEA,iCACE,WAAA,CACA,UAAA,CAKN,6BGxDI,8GHyDF,CGxDE,2GHwDF,CGvDE,sGHuDF,CIzDA,iCJ8DuB,CI7DvB,yBJ6DuB,CACvB,iBAAA,CACA,kBAAA,CACA,YAAA,CACA,QAAA,CACA,SAAA,CAEA,kCACE,aAAA,CACA,UAAA,CACA,eAAA,CAGF,+BACE,aK/DW,CLgEX,oBAAA,CACA,qCACE,aKjEc,CLkEd,yBAAA,CAKF,wEACE,wBAAA,CAEF,yEACE,wBAAA,CAEF,yFACE,gBAAA,CACA,eAAA,CACA,oBAAA,CACA,mII/FJ,yBJgG6B,CI/F7B,iBJ+F6B,CACvB,eAAA,CACA,UAAA,CACA,wBK3FQ,CL4FR,oBAAA,CACA,cAAA,CACA,0BAAA,CAGJ,yFACE,eAAA,CACA,uBAAA,CACA,QAAA,CAEE,8FACE,aAAA,CACA,aAAA,CAOV,QACE,QAAA,CACA,OAAA,CACA,iBAAA,CACA,iBAAA,CACA,eAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\ndiv.main-search-field {\n font-family: $default-font;\n display: flex;\n height: 37px;\n margin-top: 0.25em;\n position: relative;\n width: 100%;\n @include breakpoint(phablet) {\n margin-top: 0;\n }\n\n .mainSearchLabel {\n width: 0;\n height: 0;\n overflow: hidden;\n opacity: 0;\n }\n\n input {\n height: 37px;\n width: 100%;\n outline-offset: -2px;\n -webkit-appearance: none;\n background: #fff;\n border: 1px solid #dfdcda;\n border-right: 0;\n border-radius: 2px 0 0 2px;\n font-size: 1.2em;\n flex: 1;\n margin: 0;\n padding: 0 0.75em;\n }\n\n button {\n margin: 0;\n -webkit-appearance: button;\n background: #fff;\n border: 1px solid #dfdcda;\n border-left: 0;\n border-radius: 0 2px 2px 0;\n display: inline-block;\n padding: 0 0.75em;\n height: 100%;\n\n svg {\n height: 22px;\n width: 21px;\n }\n }\n}\n\ndiv.search-results-container {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n @include border-radius(0 0 3px 3px);\n position: absolute;\n background: #fbfcfd;\n display: none;\n top: 37px;\n z-index: 1;\n\n &.open {\n display: block;\n width: 100%;\n overflow-y: auto;\n }\n\n a {\n color: $primary-text;\n text-decoration: none;\n &:hover {\n color: $primary-text-hover;\n text-decoration: underline;\n }\n }\n\n div.search-results-for-type {\n &:nth-child(odd) {\n background-color: #fbfcfd;\n }\n &:nth-child(even) {\n background-color: #f5f6f7;\n }\n a.search-results-for-type-title {\n padding: 8px 16px;\n font-size: 1.2em;\n display: inline-block;\n span.search-results-for-type-number-badge {\n @include border-radius(6px);\n padding: 2px 4px;\n color: #fff;\n background-color: $primary-brand;\n display: inline-block;\n font-size: 0.8em;\n vertical-align: text-bottom;\n }\n }\n ul.search-results-for-type-list {\n list-style: none;\n padding: 0 16px 8px 32px;\n margin: 0;\n li {\n a {\n padding: 4px 0;\n display: block;\n }\n }\n }\n }\n}\n\n.hidden {\n height: 0;\n width: 0;\n position: absolute;\n color: transparent;\n overflow: hidden;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"@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","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\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}","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},6920:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r='<template>\n <div class="main-search-field">\n <label id="main-search-input-label" for="main-search-input" class="hidden">søk</label>\n <input id="main-search-input" autocomplete="off" type="search" value="" />\n <button id="search-submit-button"></button>\n <div id="search-results-container" class="search-results-container">\n \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,r){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(s[i]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&s[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},3062:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var n,r,s=(r=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,s,o=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){a=!0,s=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw s}}return o}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||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.")}()),o=s[1],i=s[3];if(!i)return o;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),l="/*# ".concat(c," */"),d=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(d).concat([l]).join("\n")}return[o].join("\n")}},1397:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(s,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const s=n(5969),o=n(5773),i=n(3804);t.Component=e=>t=>{var n;const a=e.tag||i.toKebabCase(t.prototype.constructor.name),c=((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=>i.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,r=!0){if(t!=n){r&&(this[i.toCamelCase(e)]=n);const s=this.constructor.watchAttributes;if(s&&s[e]){const r=s[e];this.__connected&&"function"==typeof this[r]&&this[r]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return r(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,s.addEventListeners(this),o.initializeProps(this)}))}render(){return r(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 r(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 r(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(a)||customElements.define(a,c),c}},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 r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(1397),t),s(n(985),t),s(n(265),t),s(n(5969),t),s(n(5773),t),s(n(4271),t),s(n(9766),t),s(n(4938),t)},5969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const r=n(3804);t.Listen=(e,t)=>(n,r)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[r]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const r=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;r&&r.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(s){const o=e||r.toDotCase(n);t.dispatchEvent(new CustomEvent(o,s))}}}})}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const r=n(3804);t.Prop=()=>(e,t)=>{const n=r.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 s=this.props[t];this.props[t]=r.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,s,e,!1)}else this.hasAttribute(r.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 r=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(r)})(e)){if(t)if(null==t[r.toKebabCase(n)])t[r.toKebabCase(n)]="";else{const s=e.props[n]||e.getAttribute(r.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:s})}e.constructor.propsInit[n]&&(e.hasAttribute(r.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 r=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(r.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 r=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[r.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},4768:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 34 35" style="enable-background:new 0 0 34 35;" xml:space="preserve"><style type="text/css"> .__24nL31r__st0{fill:#B0A9A2;} </style><g><path class="__24nL31r__st0 " d="M23.6,22.8c2.2-2.4,3.6-5.7,3.6-9.2C27.2,6.1,21.1,0,13.6,0C6.1,0,0,6.1,0,13.6c0,7.5,6.1,13.6,13.6,13.6 c3.1,0,5.9-1,8.1-2.7l10.1,10.1c0.2,0.2,0.6,0.4,0.9,0.4c0.3,0,0.6-0.1,0.9-0.4c0.5-0.5,0.5-1.3,0-1.7L23.6,22.8z M2.5,13.6 c0-6.1,5-11.1,11.1-11.1c6.1,0,11.1,5,11.1,11.1s-5,11.1-11.1,11.1S2.5,19.7,2.5,13.6L2.5,13.6z"></path></g></svg>'},6306:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,n,r){var s,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},i=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)&&r(t,e,n);return s(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainSearchField=void 0;const c=n(406),l=n(9480),d=n(1406),u=a(n(4768));let h=class extends c.CustomElement{constructor(){super(),this.searchstring="",this.renderSearchResultsForType=e=>{const t=e.Results[0].TypeTranslated,n=e.searchResultsType,r=e.Results.map((e=>`<li>${(0,d.renderDropdownResultLink)(e,n,this.searchstring,this.environment)}</li>`)).join("");return`\n <div class="search-results-for-type">\n <a href="${"articles"===n?`${(0,d.getKartkatalogUrl)(this.environment)}/articles?text=${this.searchstring}`:`${(0,d.getKartkatalogUrl)(this.environment)}/metadata?text=${this.searchstring}&type=${n}`}" class="search-results-for-type-title">\n ${t}\n <span class="search-results-for-type-number-badge">\n ${e.NumFound}\n </span>\n </a>\n <ul class="search-results-for-type-list">\n ${r}\n </ul>\n </div>`},this.renderSearchResults=e=>`<div>${e.map((e=>this.renderSearchResultsForType(e))).join("")}</div>`,this.hideSearchResultsContainer=()=>{this.showSearchResults=!1},this.clickOutsideSearchResultsContainer=this.clickOutsideSearchResultsContainer.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.searchField=(0,c.getShadowRootElement)(this,"#main-search-input"),this.searchFieldLabel=(0,c.getShadowRootElement)(this,"#main-search-input-label"),this.searchButton=(0,c.getShadowRootElement)(this,"#search-submit-button"),this.searchFieldLabel.innerHTML="en"===this.language?"Search":"Søk",this.searchButton.innerHTML=u.default,this.searchResultsContainer=(0,c.getShadowRootElement)(this,"#search-results-container"),this.searchResultsContainer.style.maxHeight=window.innerHeight-61+"px",this.searchField&&this.searchstring&&this.searchField.setAttribute("value",this.searchstring),document.addEventListener("click",this.clickOutsideSearchResultsContainer)}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideSearchResultsContainer)}clickOutsideSearchResultsContainer(e){var t;const n=e.composedPath()[0];if(n.closest("#search-results-container")||n.closest("#main-search-input")){const e=n.closest("a");(null===(t=null==e?void 0:e.href)||void 0===t?void 0:t.length)&&this.hideSearchResultsContainer()}else this.hideSearchResultsContainer()}submitSearch(){this.hideSearchResultsContainer(),this.preventRedirect?this.onSearch.emit({detail:{searchString:this.searchstring}}):window.location.href=`${(0,d.getKartkatalogUrl)(this.environment)}/metadata?text=${this.searchstring}`}searchFieldKeyUp(e){var t,n,r;e.key&&"Enter"===e.key&&(null===(t=this.searchstring)||void 0===t?void 0:t.toString().length)?this.submitSearch():this.searchstring=(null===(r=null===(n=this.searchField)||void 0===n?void 0:n.value)||void 0===r?void 0:r.toString())||""}onSearchSubmitted(e){this.submitSearch()}searchStringChanged(){this.searchField&&this.searchField.setAttribute("value",this.searchstring),(0,l.fetchDropdownSearchResults)(this.searchstring,this.language,this.environment).then((e=>{this.searchResultsResponses=e}))}languageChanged(){this.searchField&&this.searchField.setAttribute("aria-label","en"===this.language?"Enter your search query":"Skriv inn det du vil søke etter"),this.searchFieldLabel&&(this.searchFieldLabel.innerText="en"===this.language?"Search":"Søk"),this.searchButton&&this.searchButton.setAttribute("aria-label","en"===this.language?"Search":"Søk")}showSearchResultsChanged(){this.showSearchResults?this.searchResultsContainer.classList.add("open"):this.searchResultsContainer.classList.remove("open")}searchResultsResponseChanged(){const e=this.searchResultsResponses&&this.searchResultsResponses.length?this.searchResultsResponses.filter((e=>e.NumFound>0)):[];this.searchResultsContainer.innerHTML=e.length?this.renderSearchResults(e):"",this.showSearchResults=!!e.length}static setup(e,t){const n=(0,c.getElement)(e);t.onClick&&n.addEventListener("searchButtonClick",t.onClick),t.active&&(n.showSearchResults=t.active)}};h.elementSelector="main-search-field",o([(0,c.Prop)()],h.prototype,"id",void 0),o([(0,c.Prop)()],h.prototype,"environment",void 0),o([(0,c.Toggle)()],h.prototype,"showSearchResults",void 0),o([(0,c.Toggle)()],h.prototype,"preventRedirect",void 0),o([(0,c.Prop)()],h.prototype,"searchstring",void 0),o([(0,c.Prop)()],h.prototype,"language",void 0),o([(0,c.Prop)()],h.prototype,"searchResultsResponses",void 0),o([(0,c.Dispatch)("searchResultsChanged")],h.prototype,"onTextChanged",void 0),o([(0,c.Dispatch)("onSearchStringChange")],h.prototype,"onSearchStringChange",void 0),o([(0,c.Dispatch)("onSearch")],h.prototype,"onSearch",void 0),o([(0,c.Listen)("keyup","input")],h.prototype,"searchFieldKeyUp",null),o([(0,c.Listen)("click","#search-submit-button")],h.prototype,"onSearchSubmitted",null),o([(0,c.Watch)("searchstring")],h.prototype,"searchStringChanged",null),o([(0,c.Watch)("language")],h.prototype,"languageChanged",null),o([(0,c.Watch)("showsearchresults")],h.prototype,"showSearchResultsChanged",null),o([(0,c.Watch)("searchResultsResponses")],h.prototype,"searchResultsResponseChanged",null),h=o([(0,c.Component)({tag:"main-search-field",template:Promise.resolve().then((()=>i(n(6920)))),style:Promise.resolve().then((()=>i(n(4678))))})],h),t.MainSearchField=h},9480:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(s,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.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 r=(0,t.getGeonorgeMenuUrl)(e,n);return fetch(r).then((e=>e.json())).then((e=>e))},t.fetchDropdownSearchResults=(e="",r="no",s="")=>n(void 0,void 0,void 0,(function*(){const o={dataset:`search?text=${e=e.toString()}&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}`},i={headers:new Headers({"Accept-Language":r})};return e&&e.length?yield Promise.all(Object.keys(o).map((e=>n(void 0,void 0,void 0,(function*(){const n=(0,t.getKartkatalogApiUrl)(s);return fetch(`${n}/${o[e]}&limit=5`,i).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))},1406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderDropdownResultLink=t.convertTextToUrlSlug=t.getGeonorgeNedlastingUrl=t.getGeonorgeUrl=t.getKartkatalogUrl=void 0,t.getKartkatalogUrl=e=>`https://kartkatalog.${"dev"===e||"test"===e?e+".":""}geonorge.no`,t.getGeonorgeUrl=(e,t)=>`https://www.${"dev"===t||"test"===t?"test.":""}geonorge.no/${"en"===e?"en/":""}`,t.getGeonorgeNedlastingUrl=e=>`https://nedlasting.${"dev"===e||"test"===e?"test.":""}geonorge.no`;const n=(e,t,n)=>(e=(e=(e=e.replace(new RegExp(`([^s])([${t}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${t}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${t}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${t}]`,"ig"),n);t.convertTextToUrlSlug=(e="")=>(e=e.toLowerCase(),e=n(e,"&","and"),(e=(e=(e=(e=(e=(e=(e=(e=(e=n(e,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const r=(e,t)=>{if(!t)return!1;t({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:e})};t.renderDropdownResultLink=(e,n,s,o,i)=>"articles"===n?`<a onClick="${r(s,i)}" href="${e.ShowDetailsUrl?e.ShowDetailsUrl:"#"}">${e.Title}</a>`:`<a onClick="${r(s,i)}" href="${(0,t.getKartkatalogUrl)(o)}/metadata/${(0,t.convertTextToUrlSlug)(e.Title)}/${e.Uuid}">${e.Title}</a>`}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={id:r,exports:{}};return e[r].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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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(6306)})()})); | ||
!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.MainSearchField=t())}(self,(()=>(()=>{var e={4678:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4663),s=n.n(r),o=n(7638),i=n.n(o)()(s());i.push([e.id,'*{box-sizing:border-box}div.main-search-field{font-family:"Open Sans",sans-serif;display:flex;height:37px;margin-top:.25em;position:relative;width:100%}@media(min-width: 37.5em){div.main-search-field{margin-top:0}}div.main-search-field .mainSearchLabel{width:0;height:0;overflow:hidden;opacity:0}div.main-search-field input{height:37px;width:100%;outline-offset:-2px;-webkit-appearance:none;background:#fff;border:1px solid #dfdcda;border-right:0;border-radius:2px 0 0 2px;font-size:1.2em;flex:1;margin:0;padding:0 .75em}div.main-search-field button{margin:0;-webkit-appearance:button;background:#fff;border:1px solid #dfdcda;border-left:0;border-radius:0 2px 2px 0;display:inline-block;padding:0 .75em;height:100%}div.main-search-field button svg{height:22px;width:21px}div.search-results-container{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;position:absolute;background:#fbfcfd;display:none;top:37px;z-index:1}div.search-results-container.open{display:block;width:100%;overflow-y:auto}div.search-results-container a{color:#3767c7;text-decoration:none}div.search-results-container a:hover{color:#0056b3;text-decoration:underline}div.search-results-container div.search-results-for-type:nth-child(odd){background-color:#fbfcfd}div.search-results-container div.search-results-for-type:nth-child(even){background-color:#f5f6f7}div.search-results-container div.search-results-for-type a.search-results-for-type-title{padding:8px 16px;font-size:1.2em;display:inline-block}div.search-results-container div.search-results-for-type a.search-results-for-type-title span.search-results-for-type-number-badge{-webkit-border-radius:6px;border-radius:6px;padding:2px 4px;color:#fff;background-color:#fe5000;display:inline-block;font-size:.8em;vertical-align:text-bottom}div.search-results-container div.search-results-for-type ul.search-results-for-type-list{list-style:none;padding:0 16px 8px 32px;margin:0}div.search-results-container div.search-results-for-type ul.search-results-for-type-list li a{padding:4px 0;display:block}.hidden{height:0;width:0;position:absolute;color:rgba(0,0,0,0);overflow:hidden}',"",{version:3,sources:["webpack://./custom-elements/main-navigation/main-search-field/main-search-field.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACE,qBAAA,CAGF,sBACE,kCCPa,CDQb,YAAA,CACA,WAAA,CACA,gBAAA,CACA,iBAAA,CACA,UAAA,CEEM,0BFRR,sBAQI,YAAA,CAAA,CAGF,uCACE,OAAA,CACA,QAAA,CACA,eAAA,CACA,SAAA,CAGF,4BACE,WAAA,CACA,UAAA,CACA,mBAAA,CACA,uBAAA,CACA,eAAA,CACA,wBAAA,CACA,cAAA,CACA,yBAAA,CACA,eAAA,CACA,MAAA,CACA,QAAA,CACA,eAAA,CAGF,6BACE,QAAA,CACA,yBAAA,CACA,eAAA,CACA,wBAAA,CACA,aAAA,CACA,yBAAA,CACA,oBAAA,CACA,eAAA,CACA,WAAA,CAEA,iCACE,WAAA,CACA,UAAA,CAKN,6BGxDI,8GHyDF,CGxDE,2GHwDF,CGvDE,sGHuDF,CIzDA,iCJ8DuB,CI7DvB,yBJ6DuB,CACvB,iBAAA,CACA,kBAAA,CACA,YAAA,CACA,QAAA,CACA,SAAA,CAEA,kCACE,aAAA,CACA,UAAA,CACA,eAAA,CAGF,+BACE,aK/DW,CLgEX,oBAAA,CACA,qCACE,aKjEc,CLkEd,yBAAA,CAKF,wEACE,wBAAA,CAEF,yEACE,wBAAA,CAEF,yFACE,gBAAA,CACA,eAAA,CACA,oBAAA,CACA,mII/FJ,yBJgG6B,CI/F7B,iBJ+F6B,CACvB,eAAA,CACA,UAAA,CACA,wBK3FQ,CL4FR,oBAAA,CACA,cAAA,CACA,0BAAA,CAGJ,yFACE,eAAA,CACA,uBAAA,CACA,QAAA,CAEE,8FACE,aAAA,CACA,aAAA,CAOV,QACE,QAAA,CACA,OAAA,CACA,iBAAA,CACA,mBAAA,CACA,eAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\ndiv.main-search-field {\n font-family: $default-font;\n display: flex;\n height: 37px;\n margin-top: 0.25em;\n position: relative;\n width: 100%;\n @include breakpoint(phablet) {\n margin-top: 0;\n }\n\n .mainSearchLabel {\n width: 0;\n height: 0;\n overflow: hidden;\n opacity: 0;\n }\n\n input {\n height: 37px;\n width: 100%;\n outline-offset: -2px;\n -webkit-appearance: none;\n background: #fff;\n border: 1px solid #dfdcda;\n border-right: 0;\n border-radius: 2px 0 0 2px;\n font-size: 1.2em;\n flex: 1;\n margin: 0;\n padding: 0 0.75em;\n }\n\n button {\n margin: 0;\n -webkit-appearance: button;\n background: #fff;\n border: 1px solid #dfdcda;\n border-left: 0;\n border-radius: 0 2px 2px 0;\n display: inline-block;\n padding: 0 0.75em;\n height: 100%;\n\n svg {\n height: 22px;\n width: 21px;\n }\n }\n}\n\ndiv.search-results-container {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n @include border-radius(0 0 3px 3px);\n position: absolute;\n background: #fbfcfd;\n display: none;\n top: 37px;\n z-index: 1;\n\n &.open {\n display: block;\n width: 100%;\n overflow-y: auto;\n }\n\n a {\n color: $primary-text;\n text-decoration: none;\n &:hover {\n color: $primary-text-hover;\n text-decoration: underline;\n }\n }\n\n div.search-results-for-type {\n &:nth-child(odd) {\n background-color: #fbfcfd;\n }\n &:nth-child(even) {\n background-color: #f5f6f7;\n }\n a.search-results-for-type-title {\n padding: 8px 16px;\n font-size: 1.2em;\n display: inline-block;\n span.search-results-for-type-number-badge {\n @include border-radius(6px);\n padding: 2px 4px;\n color: #fff;\n background-color: $primary-brand;\n display: inline-block;\n font-size: 0.8em;\n vertical-align: text-bottom;\n }\n }\n ul.search-results-for-type-list {\n list-style: none;\n padding: 0 16px 8px 32px;\n margin: 0;\n li {\n a {\n padding: 4px 0;\n display: block;\n }\n }\n }\n }\n}\n\n.hidden {\n height: 0;\n width: 0;\n position: absolute;\n color: transparent;\n overflow: hidden;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"@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","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\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}","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},6920:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r='<template>\n <div class="main-search-field">\n <label id="main-search-input-label" for="main-search-input" class="hidden">søk</label>\n <input id="main-search-input" autocomplete="off" type="search" value="" />\n <button id="search-submit-button"></button>\n <div id="search-results-container" class="search-results-container">\n \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="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);r&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},4663:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(s," */"),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(i).concat([o]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(s,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const s=n(5969),o=n(5773),i=n(3804);t.Component=e=>t=>{var n;const a=e.tag||i.toKebabCase(t.prototype.constructor.name),c=((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=>i.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,r=!0){if(t!=n){r&&(this[i.toCamelCase(e)]=n);const s=this.constructor.watchAttributes;if(s&&s[e]){const r=s[e];this.__connected&&"function"==typeof this[r]&&this[r]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return r(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,s.addEventListeners(this),o.initializeProps(this)}))}render(){return r(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 r(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 r(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(a)||customElements.define(a,c),c}},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 r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(1397),t),s(n(985),t),s(n(265),t),s(n(5969),t),s(n(5773),t),s(n(4271),t),s(n(9766),t),s(n(4938),t)},5969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const r=n(3804);t.Listen=(e,t)=>(n,r)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[r]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const r=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;r&&r.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(s){const o=e||r.toDotCase(n);t.dispatchEvent(new CustomEvent(o,s))}}}})}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const r=n(3804);t.Prop=()=>(e,t)=>{const n=r.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 s=this.props[t];this.props[t]=r.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,s,e,!1)}else this.hasAttribute(r.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 r=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(r)})(e)){if(t)if(null==t[r.toKebabCase(n)])t[r.toKebabCase(n)]="";else{const s=e.props[n]||e.getAttribute(r.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:s})}e.constructor.propsInit[n]&&(e.hasAttribute(r.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 r=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(r.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 r=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[r.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},4768:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 34 35" style="enable-background:new 0 0 34 35;" xml:space="preserve"><style type="text/css"> .__24nL31r__st0{fill:#B0A9A2;} </style><g><path class="__24nL31r__st0 " d="M23.6,22.8c2.2-2.4,3.6-5.7,3.6-9.2C27.2,6.1,21.1,0,13.6,0C6.1,0,0,6.1,0,13.6c0,7.5,6.1,13.6,13.6,13.6 c3.1,0,5.9-1,8.1-2.7l10.1,10.1c0.2,0.2,0.6,0.4,0.9,0.4c0.3,0,0.6-0.1,0.9-0.4c0.5-0.5,0.5-1.3,0-1.7L23.6,22.8z M2.5,13.6 c0-6.1,5-11.1,11.1-11.1c6.1,0,11.1,5,11.1,11.1s-5,11.1-11.1,11.1S2.5,19.7,2.5,13.6L2.5,13.6z"></path></g></svg>'},6306:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,n,r){var s,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},i=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)&&r(t,e,n);return s(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainSearchField=void 0;const c=n(406),l=n(9480),d=n(1406),u=a(n(4768));let h=class extends c.CustomElement{constructor(){super(),this.searchstring="",this.renderSearchResultsForType=e=>{const t=e.Results[0].TypeTranslated,n=e.searchResultsType,r=e.Results.map((e=>`<li>${(0,d.renderDropdownResultLink)(e,n,this.searchstring,this.environment)}</li>`)).join("");return`\n <div class="search-results-for-type">\n <a href="${"articles"===n?`${(0,d.getKartkatalogUrl)(this.environment)}/articles?text=${this.searchstring}`:`${(0,d.getKartkatalogUrl)(this.environment)}/metadata?text=${this.searchstring}&type=${n}`}" class="search-results-for-type-title">\n ${t}\n <span class="search-results-for-type-number-badge">\n ${e.NumFound}\n </span>\n </a>\n <ul class="search-results-for-type-list">\n ${r}\n </ul>\n </div>`},this.renderSearchResults=e=>`<div>${e.map((e=>this.renderSearchResultsForType(e))).join("")}</div>`,this.hideSearchResultsContainer=()=>{this.showSearchResults=!1},this.clickOutsideSearchResultsContainer=this.clickOutsideSearchResultsContainer.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.searchField=(0,c.getShadowRootElement)(this,"#main-search-input"),this.searchFieldLabel=(0,c.getShadowRootElement)(this,"#main-search-input-label"),this.searchButton=(0,c.getShadowRootElement)(this,"#search-submit-button"),this.searchFieldLabel.innerHTML="en"===this.language?"Search":"Søk",this.searchButton.innerHTML=u.default,this.searchResultsContainer=(0,c.getShadowRootElement)(this,"#search-results-container"),this.searchResultsContainer.style.maxHeight=window.innerHeight-61+"px",this.searchField&&this.searchstring&&this.searchField.setAttribute("value",this.searchstring),document.addEventListener("click",this.clickOutsideSearchResultsContainer)}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideSearchResultsContainer)}clickOutsideSearchResultsContainer(e){var t;const n=e.composedPath()[0];if(n.closest("#search-results-container")||n.closest("#main-search-input")){const e=n.closest("a");(null===(t=null==e?void 0:e.href)||void 0===t?void 0:t.length)&&this.hideSearchResultsContainer()}else this.hideSearchResultsContainer()}submitSearch(){this.hideSearchResultsContainer(),this.preventRedirect?this.onSearch.emit({detail:{searchString:this.searchstring}}):window.location.href=`${(0,d.getKartkatalogUrl)(this.environment)}/metadata?text=${this.searchstring}`}searchFieldKeyUp(e){var t,n,r;e.key&&"Enter"===e.key&&(null===(t=this.searchstring)||void 0===t?void 0:t.toString().length)?this.submitSearch():this.searchstring=(null===(r=null===(n=this.searchField)||void 0===n?void 0:n.value)||void 0===r?void 0:r.toString())||""}onSearchSubmitted(e){this.submitSearch()}searchStringChanged(){this.searchField&&this.searchField.setAttribute("value",this.searchstring),(0,l.fetchDropdownSearchResults)(this.searchstring,this.language,this.environment).then((e=>{this.searchResultsResponses=e}))}languageChanged(){this.searchField&&this.searchField.setAttribute("aria-label","en"===this.language?"Enter your search query":"Skriv inn det du vil søke etter"),this.searchFieldLabel&&(this.searchFieldLabel.innerText="en"===this.language?"Search":"Søk"),this.searchButton&&this.searchButton.setAttribute("aria-label","en"===this.language?"Search":"Søk")}showSearchResultsChanged(){this.showSearchResults?this.searchResultsContainer.classList.add("open"):this.searchResultsContainer.classList.remove("open")}searchResultsResponseChanged(){const e=this.searchResultsResponses&&this.searchResultsResponses.length?this.searchResultsResponses.filter((e=>e.NumFound>0)):[];this.searchResultsContainer.innerHTML=e.length?this.renderSearchResults(e):"",this.showSearchResults=!!e.length}static setup(e,t){const n=(0,c.getElement)(e);t.onClick&&n.addEventListener("searchButtonClick",t.onClick),t.active&&(n.showSearchResults=t.active)}};h.elementSelector="main-search-field",o([(0,c.Prop)()],h.prototype,"id",void 0),o([(0,c.Prop)()],h.prototype,"environment",void 0),o([(0,c.Toggle)()],h.prototype,"showSearchResults",void 0),o([(0,c.Toggle)()],h.prototype,"preventRedirect",void 0),o([(0,c.Prop)()],h.prototype,"searchstring",void 0),o([(0,c.Prop)()],h.prototype,"language",void 0),o([(0,c.Prop)()],h.prototype,"searchResultsResponses",void 0),o([(0,c.Dispatch)("searchResultsChanged")],h.prototype,"onTextChanged",void 0),o([(0,c.Dispatch)("onSearchStringChange")],h.prototype,"onSearchStringChange",void 0),o([(0,c.Dispatch)("onSearch")],h.prototype,"onSearch",void 0),o([(0,c.Listen)("keyup","input")],h.prototype,"searchFieldKeyUp",null),o([(0,c.Listen)("click","#search-submit-button")],h.prototype,"onSearchSubmitted",null),o([(0,c.Watch)("searchstring")],h.prototype,"searchStringChanged",null),o([(0,c.Watch)("language")],h.prototype,"languageChanged",null),o([(0,c.Watch)("showsearchresults")],h.prototype,"showSearchResultsChanged",null),o([(0,c.Watch)("searchResultsResponses")],h.prototype,"searchResultsResponseChanged",null),h=o([(0,c.Component)({tag:"main-search-field",template:Promise.resolve().then((()=>i(n(6920)))),style:Promise.resolve().then((()=>i(n(4678))))})],h),t.MainSearchField=h},9480:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(s,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.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 r=(0,t.getGeonorgeMenuUrl)(e,n);return fetch(r).then((e=>e.json())).then((e=>e))},t.fetchDropdownSearchResults=(e="",r="no",s="")=>n(void 0,void 0,void 0,(function*(){const o={dataset:`search?text=${e=e.toString()}&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}`},i={headers:new Headers({"Accept-Language":r})};return e&&e.length?yield Promise.all(Object.keys(o).map((e=>n(void 0,void 0,void 0,(function*(){const n=(0,t.getKartkatalogApiUrl)(s);return fetch(`${n}/${o[e]}&limit=5`,i).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))},1406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderDropdownResultLink=t.convertTextToUrlSlug=t.getGeonorgeNedlastingUrl=t.getGeonorgeUrl=t.getKartkatalogUrl=void 0,t.getKartkatalogUrl=e=>`https://kartkatalog.${"dev"===e||"test"===e?e+".":""}geonorge.no`,t.getGeonorgeUrl=(e,t)=>`https://www.${"dev"===t||"test"===t?"test.":""}geonorge.no/${"en"===e?"en/":""}`,t.getGeonorgeNedlastingUrl=e=>`https://nedlasting.${"dev"===e||"test"===e?"test.":""}geonorge.no`;const n=(e,t,n)=>(e=(e=(e=e.replace(new RegExp(`([^s])([${t}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${t}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${t}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${t}]`,"ig"),n);t.convertTextToUrlSlug=(e="")=>(e=e.toLowerCase(),e=n(e,"&","and"),(e=(e=(e=(e=(e=(e=(e=(e=(e=n(e,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const r=(e,t)=>{if(!t)return!1;t({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:e})};t.renderDropdownResultLink=(e,n,s,o,i)=>"articles"===n?`<a onClick="${r(s,i)}" href="${e.ShowDetailsUrl?e.ShowDetailsUrl:"#"}">${e.Title}</a>`:`<a onClick="${r(s,i)}" href="${(0,t.getKartkatalogUrl)(o)}/metadata/${(0,t.convertTextToUrlSlug)(e.Title)}/${e.Uuid}">${e.Title}</a>`}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={id:r,exports:{}};return e[r].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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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(6306)})())); | ||
//# sourceMappingURL=MainSearchField.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.MapItem=e())}(self,(function(){return(()=>{var t={2895:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var i=n(3062),o=n.n(i),r=n(7638),a=n.n(r)()(o());a.push([t.id,"*{box-sizing:border-box}div.map-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:transparent;color:#7d746d;cursor:pointer;padding:0}@media(min-width: 37.5em){div.map-items-container .icon-toggle-button{padding:0 4px}}div.map-items-container .icon-toggle-button.open{color:#414042}div.map-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){div.map-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}div.map-items-container .icon-toggle-button .counter.hidden{display:none}div.map-items-container .icon-toggle-button .map-icon svg{width:31px;height:32px}@media(min-width: 37.5em){div.map-items-container .icon-toggle-button .map-icon svg{width:36px;height:37px}}div.map-items-container .map-item-list-wrapper{position:absolute}div.map-items-container .map-item-list-wrapper .map-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){div.map-items-container .map-item-list-wrapper .map-item-list-container{right:245px;width:300px}}@media print{div.map-items-container .map-item-list-wrapper .map-item-list-container{display:none}}div.map-items-container .map-item-list-wrapper .map-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}div.map-items-container .map-item-list-wrapper .map-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}div.map-items-container .map-item-list-wrapper .map-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}div.map-items-container .map-item-list-wrapper .map-item-list-container ul{list-style:none;padding:0;margin:0}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}","",{version:3,sources:["webpack://./custom-elements/main-navigation/map-items/map-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAIA,4CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,sBAAA,CACA,aAAA,CACA,cAAA,CACA,SAAA,CECA,0BFPJ,4CAQQ,aAAA,CAAA,CAEJ,iDACI,aAAA,CAEJ,qDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,qDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,4DACI,YAAA,CAIJ,0DACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,0DAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,+CACI,iBAAA,CACA,wEItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,wEAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,wEAgBQ,YAAA,CAAA,CAEJ,6EKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,2FACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,iGACI,yBAAA,CACA,aG7EA,CHgFR,2EACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,8EClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,oFACI,gCGxGL,CH0GC,yFACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,6FACI,aGrFd,CHsFc,UAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\ndiv.map-items-container {\n .icon-toggle-button {\n @include transition(all 0.1s ease-in-out);\n border: none;\n background: transparent;\n color: #7d746d;\n cursor: pointer;\n padding: 0;\n @include breakpoint(phablet) {\n padding: 0 4px;\n }\n &.open {\n color: #414042;\n }\n .counter {\n background-color: $primary-brand;\n border-radius: 50%;\n color: #fff;\n margin-top: -0.25em;\n margin-left: -0.2em;\n position: absolute;\n text-align: center;\n width: 1.4em;\n line-height: 1.4;\n height: 1.4em;\n font-size: 0.9em;\n @include breakpoint(phablet) {\n height: 1.5em;\n width: 1.5em;\n line-height: 1.5;\n font-size: 1em;\n }\n &.hidden {\n display: none;\n }\n }\n .map-icon {\n svg {\n width: 31px;\n height: 32px;\n @include breakpoint(phablet) {\n width: 36px;\n height: 37px;\n }\n }\n }\n }\n .map-item-list-wrapper {\n position: absolute;\n .map-item-list-container {\n @include border-radius(0 0 3px 3px);\n @include transition(all 0.1s ease-in-out);\n box-sizing: border-box;\n overflow: hidden;\n max-height: 0;\n position: relative;\n top: 10px;\n background-color: #fbfcfd;\n right: 205px;\n width: 260px;\n @include breakpoint(phablet) {\n right: 245px;\n width: 300px;\n }\n @media print {\n display: none;\n }\n &.open {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n height: auto;\n max-height: 300px;\n overflow: auto;\n }\n .page-link-element {\n display: block;\n text-align: center;\n padding: 8px 16px;\n color: $primary-text;\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n color: $primary-text-hover;\n }\n }\n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n li {\n @include transition(all 0.15s ease-in-out);\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n &:hover {\n background-color: $hover-background;\n }\n .list-icon {\n margin-left: 8px;\n cursor: pointer;\n background: none;\n border: none;\n svg {\n color: $danger-text;\n width: 20px;\n }\n }\n }\n }\n }\n }\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","@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","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\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"],sourceRoot:""}]);const s=a},7814:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});const i='<template>\n <div class="map-items-container">\n <button id="map-toggle-button" class="icon-toggle-button">\n <span id="map-toggle-button-counter" class="counter"></span>\n <span id="map-toggle-button-icon" class="map-icon"></span>\n </button>\n <div class="map-item-list-wrapper">\n <div id="map-item-list-container" class="map-item-list-container"></div>\n </div>\n </div>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);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<t.length;s++){var p=[].concat(t[s]);i&&o[p[0]]||(n&&(p[2]?p[2]="".concat(n," and ").concat(p[2]):p[2]=n),e.push(p))}},e}},3062:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}t.exports=function(t){var n,i,o=(i=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(r.push(i.value),!e||r.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(n,i)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,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(!a)return r;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),p="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),c="/*# ".concat(p," */"),l=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([c]).join("\n")}return[r].join("\n")}},1397:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{p(i.next(t))}catch(t){r(t)}}function s(t){try{p(i.throw(t))}catch(t){r(t)}}function p(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}p((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const o=n(5969),r=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),p=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,i=!0){if(e!=n){i&&(this[a.toCamelCase(t)]=n);const o=this.constructor.watchAttributes;if(o&&o[t]){const i=o[t];this.__connected&&"function"==typeof this[i]&&this[i]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return i(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.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 e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return i(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return i(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,p),p}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1397),e),o(n(985),e),o(n(265),e),o(n(5969),e),o(n(5773),e),o(n(4271),e),o(n(9766),e),o(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const i=n(3804);e.Listen=(t,e)=>(n,i)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[i]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const i=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;i&&i.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(o){const r=t||i.toDotCase(n);e.dispatchEvent(new CustomEvent(r,o))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const i=n(3804);e.Prop=()=>(t,e)=>{const n=i.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const o=this.props[e];this.props[e]=i.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,o,t,!1)}else this.hasAttribute(i.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const i=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(i)})(t)){if(e)if(null==e[i.toKebabCase(n)])e[i.toKebabCase(n)]="";else{const o=t.props[n]||t.getAttribute(i.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:o})}t.constructor.propsInit[n]&&(t.hasAttribute(i.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const i=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(i.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const i=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[i.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},2635:t=>{t.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 22 22" style="enable-background:new 0 0 22 22;" xml:space="preserve"><style type="text/css"> .__158ibJ0__st0{fill:currentColor;} </style><path class="__158ibJ0__st0 " d="M5.2,11.2C4.4,10.1,4,8.8,4,7.3C4,3.3,7.3,0,11.4,0s7.3,3.3,7.3,7.3c0,1.5-0.4,2.8-1.1,3.9L11.4,22L5.2,11.2z M15.5,7.3c0-2.3-1.9-4.2-4.2-4.2S7.2,5.1,7.2,7.3c0,0.8,0.2,1.5,0.7,2.2c0.7,1.1,2,2,3.5,2s2.8-0.7,3.5-2 C15.3,8.9,15.5,8.1,15.5,7.3z"></path></svg>'},2374:t=>{t.exports='<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="trash" class="__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"></path></svg>'},1422:function(t,e,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__decorate||function(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MapItems=void 0;const p=n(406),c=s(n(2635)),l=s(n(2374)),d=n(8586),u=n(1406);let m=class extends p.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showList=!1},this.renderMapItems=t=>{const e=t.map((t=>{if(t){const e=document.createElement("span");e.innerText=t.Title;const n=document.createElement("button");return n.classList.add("list-icon"),n.innerHTML=l.default,n.dataset.mapItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.Title} from map`:`Fjern ${t.Title} fra kart`),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("span"),n.addEventListener("click",(()=>{this.onOpenEmptyMapItemsList.emit()}))):(n=document.createElement("a"),n.href=`${(0,u.getKartkatalogUrl)(this.environment)}/kart`),n.innerText="en"===this.language?"Show map":"Vis kart",n.classList.add("page-link-element"),this.mapItemListContainer.innerHTML=`<ul>${e}</ul>`,this.mapItemListContainer.prepend(n)},this.clickOutsideMapItemsContainer=this.clickOutsideMapItemsContainer.bind(this),this.updateDomElements=this.updateDomElements.bind(this),this.getUpdatedMapItems=this.getUpdatedMapItems.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.mapButton=(0,p.getShadowRootElement)(this,"#map-toggle-button"),this.mapIcon=(0,p.getShadowRootElement)(this,"#map-toggle-button-icon"),this.mapIconCounter=(0,p.getShadowRootElement)(this,"#map-toggle-button-counter"),this.mapItemListContainer=(0,p.getShadowRootElement)(this,"#map-item-list-container"),this.getUpdatedMapItems(),this.mapIcon.innerHTML=c.default,this.renderMapItemsCounter(),document.addEventListener("click",this.clickOutsideMapItemsContainer),document.addEventListener("mapItemsChanged",this.updateDomElements)}updateDomElements(){this.getUpdatedMapItems(),this.renderMapItems(this.mapItems),this.renderMapItemsCounter()}getUpdatedMapItems(){this.mapItems=(0,d.getMapItems)()}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideMapItemsContainer)}clickOutsideMapItemsContainer(t){const e=t.composedPath()[0];e.closest("#map-item-list-container")||e.closest("#map-toggle-button")||this.hideListContainer()}renderMapItemsCounter(){const t=(0,d.getMapItemsCount)();t?(this.mapIconCounter.innerHTML=t.toString(),this.mapIconCounter.classList.remove("hidden"),this.mapButton.setAttribute("aria-label","en"===this.language?"Show map item list":"Vis liste med elementer lagt til i kart")):(this.mapIconCounter.innerHTML="",this.mapIconCounter.classList.add("hidden"),this.mapButton.setAttribute("aria-label","en"===this.language?"Show map":"Vis kart"))}buttonClicked(t){this.mapItems&&this.mapItems.length?this.showList=!this.showList:(this.showList=!1,this.preventRedirect?this.onOpenEmptyMapItemsList.emit():window.location.href=`${(0,u.getKartkatalogUrl)(this.environment)}/kart`)}removeMapItemClicked(t){const e=t.composedPath()[0];e.closest("#menu-container");const n=e.closest("button");if(n){const e=n.dataset&&n.dataset.mapItem?JSON.parse(n.dataset.mapItem):null;e&&(t.stopPropagation(),(0,d.removeMapItem)(e),this.getUpdatedMapItems(),this.renderMapItems(this.mapItems),this.renderMapItemsCounter(),this.mapItems&&this.mapItems.length||(this.showList=!1))}}showMenuChanged(){this.showList?this.mapItemListContainer.classList.add("open"):this.mapItemListContainer.classList.remove("open"),this.showList?this.mapButton.classList.add("open"):this.mapButton.classList.remove("open")}mapItemsChanged(){this.mapItems&&this.mapItems.length&&(this.renderMapItems(this.mapItems),this.renderMapItemsCounter())}languageChanged(){this.mapItems&&this.mapItems.length&&(this.renderMapItems(this.mapItems),this.renderMapItemsCounter())}preventRedirectChanged(){this.mapItems&&this.mapItems.length&&(this.renderMapItems(this.mapItems),this.renderMapItemsCounter())}static setup(t,e){const n=(0,p.getElement)(t);e.active&&(n.showList=e.active)}};m.elementSelector="map-items",r([(0,p.Prop)()],m.prototype,"id",void 0),r([(0,p.Prop)()],m.prototype,"environment",void 0),r([(0,p.Prop)()],m.prototype,"language",void 0),r([(0,p.Toggle)()],m.prototype,"showList",void 0),r([(0,p.Toggle)()],m.prototype,"preventRedirect",void 0),r([(0,p.Dispatch)("onOpenEmptyMapItemsList")],m.prototype,"onOpenEmptyMapItemsList",void 0),r([(0,p.Listen)("click","#map-toggle-button")],m.prototype,"buttonClicked",null),r([(0,p.Listen)("click","#map-item-list-container")],m.prototype,"removeMapItemClicked",null),r([(0,p.Watch)("showlist")],m.prototype,"showMenuChanged",null),r([(0,p.Watch)("mapItems")],m.prototype,"mapItemsChanged",null),r([(0,p.Watch)("language")],m.prototype,"languageChanged",null),r([(0,p.Watch)("preventredirect")],m.prototype,"preventRedirectChanged",null),m=r([(0,p.Component)({tag:"map-items",template:Promise.resolve().then((()=>a(n(7814)))),style:Promise.resolve().then((()=>a(n(2895))))})],m),e.MapItems=m},4724:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguage=e.getLanguage=e.setCookie=e.getCookie=void 0,e.getCookie=t=>{const e=`${t}=`,n=decodeURIComponent(document.cookie).split(";");for(var i=0;i<n.length;i++){let t=n[i];for(;" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf(e))return t.substring(e.length,t.length)}return""},e.setCookie=(t,e,n)=>{let i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);const o=`expires=${i.toUTCString()}`,r="localhost"===window.location.hostname?"":"domain=-geonorge.no";document.cookie=`${t}=${e};${o};path=/;${r}`},e.getLanguage=()=>(0,e.getCookie)("_culture"),e.setLanguage=t=>{(0,e.setCookie)("_culture",t,7)}},8586:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeMapItem=e.getMapItemsCount=e.getMapItems=void 0;const i=n(4724);e.getMapItems=()=>localStorage.mapItems&&Array.isArray(JSON.parse(localStorage.mapItems))?JSON.parse(localStorage.mapItems).filter((t=>t)):[],e.getMapItemsCount=()=>{if(-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"))return(0,e.getMapItems)().length;{const t=parseInt((0,i.getCookie)("mapItems"));return t&&!isNaN(t)?t:0}},e.removeMapItem=t=>{let e=localStorage.mapItems&&Array.isArray(JSON.parse(localStorage.mapItems))?JSON.parse(localStorage.mapItems):[];localStorage.mapItems=JSON.stringify(e.filter((e=>e.Uuid!==t.Uuid)))}},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const i=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,o,r,a)=>"articles"===n?`<a onClick="${i(o,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${i(o,a)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(1422)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.MapItem=e())}(self,(()=>(()=>{var t={2895:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var i=n(4663),o=n.n(i),r=n(7638),a=n.n(r)()(o());a.push([t.id,"*{box-sizing:border-box}div.map-items-container .icon-toggle-button{-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;border:none;background:rgba(0,0,0,0);color:#7d746d;cursor:pointer;padding:0}@media(min-width: 37.5em){div.map-items-container .icon-toggle-button{padding:0 4px}}div.map-items-container .icon-toggle-button.open{color:#414042}div.map-items-container .icon-toggle-button .counter{background-color:#fe5000;border-radius:50%;color:#fff;margin-top:-0.25em;margin-left:-0.2em;position:absolute;text-align:center;width:1.4em;line-height:1.4;height:1.4em;font-size:.9em}@media(min-width: 37.5em){div.map-items-container .icon-toggle-button .counter{height:1.5em;width:1.5em;line-height:1.5;font-size:1em}}div.map-items-container .icon-toggle-button .counter.hidden{display:none}div.map-items-container .icon-toggle-button .map-icon svg{width:31px;height:32px}@media(min-width: 37.5em){div.map-items-container .icon-toggle-button .map-icon svg{width:36px;height:37px}}div.map-items-container .map-item-list-wrapper{position:absolute}div.map-items-container .map-item-list-wrapper .map-item-list-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;box-sizing:border-box;overflow:hidden;max-height:0;position:relative;top:10px;background-color:#fbfcfd;right:205px;width:260px}@media(min-width: 37.5em){div.map-items-container .map-item-list-wrapper .map-item-list-container{right:245px;width:300px}}@media print{div.map-items-container .map-item-list-wrapper .map-item-list-container{display:none}}div.map-items-container .map-item-list-wrapper .map-item-list-container.open{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);height:auto;max-height:300px;overflow:auto}div.map-items-container .map-item-list-wrapper .map-item-list-container .page-link-element{display:block;text-align:center;padding:8px 16px;color:#3767c7;text-decoration:none;cursor:pointer}div.map-items-container .map-item-list-wrapper .map-item-list-container .page-link-element:hover{text-decoration:underline;color:#0056b3}div.map-items-container .map-item-list-wrapper .map-item-list-container ul{list-style:none;padding:0;margin:0}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li{-moz-transition:all .15s ease-in-out;-o-transition:all .15s ease-in-out;-webkit-transition:all .15s ease-in-out;transition:all .15s ease-in-out;display:flex;align-items:center;justify-content:space-between;padding:8px 16px}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li:hover{background-color:rgba(0,0,0,.05)}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li .list-icon{margin-left:8px;cursor:pointer;background:none;border:none}div.map-items-container .map-item-list-wrapper .map-item-list-container ul li .list-icon svg{color:#e00d0d;width:20px}","",{version:3,sources:["webpack://./custom-elements/main-navigation/map-items/map-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAIA,4CCNA,mCDOI,CCNJ,iCDMI,CCLJ,sCDKI,CCJJ,8BDII,CACA,WAAA,CACA,wBAAA,CACA,aAAA,CACA,cAAA,CACA,SAAA,CECA,0BFPJ,4CAQQ,aAAA,CAAA,CAEJ,iDACI,aAAA,CAEJ,qDACI,wBGZI,CHaJ,iBAAA,CACA,UAAA,CACA,kBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CACA,YAAA,CACA,cAAA,CEjBJ,0BFMA,qDAaQ,YAAA,CACA,WAAA,CACA,eAAA,CACA,aAAA,CAAA,CAEJ,4DACI,YAAA,CAIJ,0DACI,UAAA,CACA,WAAA,CE/BR,0BF6BI,0DAIQ,UAAA,CACA,WAAA,CAAA,CAKhB,+CACI,iBAAA,CACA,wEItDN,iCJuDiC,CItDjC,yBJsDiC,CCvD/B,mCDwDQ,CCvDR,iCDuDQ,CCtDR,sCDsDQ,CCrDR,8BDqDQ,CACA,qBAAA,CACA,eAAA,CACA,YAAA,CACA,iBAAA,CACA,QAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CEnDJ,0BFyCA,wEAYQ,WAAA,CACA,WAAA,CAAA,CAEJ,aAfJ,wEAgBQ,YAAA,CAAA,CAEJ,6EKxER,8GLyEY,CKxEZ,2GLwEY,CKvEZ,sGLuEY,CAKA,WAAA,CACA,gBAAA,CACA,aAAA,CAEJ,2FACI,aAAA,CACA,iBAAA,CACA,gBAAA,CACA,aGzED,CH0EC,oBAAA,CACA,cAAA,CACA,iGACI,yBAAA,CACA,aG7EA,CHgFR,2EACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,8EClGZ,oCDmGgB,CClGhB,kCDkGgB,CCjGhB,uCDiGgB,CChGhB,+BDgGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,oFACI,gCGxGL,CH0GC,yFACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,6FACI,aGrFd,CHsFc,UAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\ndiv.map-items-container {\n .icon-toggle-button {\n @include transition(all 0.1s ease-in-out);\n border: none;\n background: transparent;\n color: #7d746d;\n cursor: pointer;\n padding: 0;\n @include breakpoint(phablet) {\n padding: 0 4px;\n }\n &.open {\n color: #414042;\n }\n .counter {\n background-color: $primary-brand;\n border-radius: 50%;\n color: #fff;\n margin-top: -0.25em;\n margin-left: -0.2em;\n position: absolute;\n text-align: center;\n width: 1.4em;\n line-height: 1.4;\n height: 1.4em;\n font-size: 0.9em;\n @include breakpoint(phablet) {\n height: 1.5em;\n width: 1.5em;\n line-height: 1.5;\n font-size: 1em;\n }\n &.hidden {\n display: none;\n }\n }\n .map-icon {\n svg {\n width: 31px;\n height: 32px;\n @include breakpoint(phablet) {\n width: 36px;\n height: 37px;\n }\n }\n }\n }\n .map-item-list-wrapper {\n position: absolute;\n .map-item-list-container {\n @include border-radius(0 0 3px 3px);\n @include transition(all 0.1s ease-in-out);\n box-sizing: border-box;\n overflow: hidden;\n max-height: 0;\n position: relative;\n top: 10px;\n background-color: #fbfcfd;\n right: 205px;\n width: 260px;\n @include breakpoint(phablet) {\n right: 245px;\n width: 300px;\n }\n @media print {\n display: none;\n }\n &.open {\n @include box-shadow(\n 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12)\n );\n height: auto;\n max-height: 300px;\n overflow: auto;\n }\n .page-link-element {\n display: block;\n text-align: center;\n padding: 8px 16px;\n color: $primary-text;\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n color: $primary-text-hover;\n }\n }\n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n li {\n @include transition(all 0.15s ease-in-out);\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n &:hover {\n background-color: $hover-background;\n }\n .list-icon {\n margin-left: 8px;\n cursor: pointer;\n background: none;\n border: none;\n svg {\n color: $danger-text;\n width: 20px;\n }\n }\n }\n }\n }\n }\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","@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","$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\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"],sourceRoot:""}]);const s=a},7814:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});const i='<template>\n <div class="map-items-container">\n <button id="map-toggle-button" class="icon-toggle-button">\n <span id="map-toggle-button-counter" class="counter"></span>\n <span id="map-toggle-button-icon" class="map-icon"></span>\n </button>\n <div class="map-item-list-wrapper">\n <div id="map-item-list-container" class="map-item-list-container"></div>\n </div>\n </div>\n</template>'},7638:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var p=this[s][0];null!=p&&(a[p]=!0)}for(var c=0;c<t.length;c++){var l=[].concat(t[c]);i&&a[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),e.push(l))}},e}},4663:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([r]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{p(i.next(t))}catch(t){r(t)}}function s(t){try{p(i.throw(t))}catch(t){r(t)}}function p(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}p((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const o=n(5969),r=n(5773),a=n(3804);e.Component=t=>e=>{var n;const s=t.tag||a.toKebabCase(e.prototype.constructor.name),p=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,i=!0){if(e!=n){i&&(this[a.toCamelCase(t)]=n);const o=this.constructor.watchAttributes;if(o&&o[t]){const i=o[t];this.__connected&&"function"==typeof this[i]&&this[i]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return i(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.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 e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return i(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return i(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,p),p}},985:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1397),e),o(n(985),e),o(n(265),e),o(n(5969),e),o(n(5773),e),o(n(4271),e),o(n(9766),e),o(n(4938),e)},5969:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const i=n(3804);e.Listen=(t,e)=>(n,i)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[i]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const i=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;i&&i.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(o){const r=t||i.toDotCase(n);e.dispatchEvent(new CustomEvent(r,o))}}}})}},5773:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const i=n(3804);e.Prop=()=>(t,e)=>{const n=i.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const o=this.props[e];this.props[e]=i.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,o,t,!1)}else this.hasAttribute(i.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const i=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(i)})(t)){if(e)if(null==e[i.toKebabCase(n)])e[i.toKebabCase(n)]="";else{const o=t.props[n]||t.getAttribute(i.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:o})}t.constructor.propsInit[n]&&(t.hasAttribute(i.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const i=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(i.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const i=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[i.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},2635:t=>{t.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 22 22" style="enable-background:new 0 0 22 22;" xml:space="preserve"><style type="text/css"> .__158ibJ0__st0{fill:currentColor;} </style><path class="__158ibJ0__st0 " d="M5.2,11.2C4.4,10.1,4,8.8,4,7.3C4,3.3,7.3,0,11.4,0s7.3,3.3,7.3,7.3c0,1.5-0.4,2.8-1.1,3.9L11.4,22L5.2,11.2z M15.5,7.3c0-2.3-1.9-4.2-4.2-4.2S7.2,5.1,7.2,7.3c0,0.8,0.2,1.5,0.7,2.2c0.7,1.1,2,2,3.5,2s2.8-0.7,3.5-2 C15.3,8.9,15.5,8.1,15.5,7.3z"></path></svg>'},2374:t=>{t.exports='<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="trash" class="__2fgqV-u__svg-inline--fa __2fgqV-u__fa-trash __2fgqV-u__fa-w-14 __2fgqV-u__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M432 80h-82.4l-34-56.7A48 48 0 0 0 274.4 0H173.6a48 48 0 0 0-41.2 23.3L98.4 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16l21.2 339a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM173.6 48h100.8l19.2 32H154.4zm173.3 416H101.11l-21-336h287.8z"></path></svg>'},1422:function(t,e,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__decorate||function(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MapItems=void 0;const p=n(406),c=s(n(2635)),l=s(n(2374)),d=n(8586),u=n(1406);let m=class extends p.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showList=!1},this.renderMapItems=t=>{const e=t.map((t=>{if(t){const e=document.createElement("span");e.innerText=t.Title;const n=document.createElement("button");return n.classList.add("list-icon"),n.innerHTML=l.default,n.dataset.mapItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.Title} from map`:`Fjern ${t.Title} fra kart`),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("span"),n.addEventListener("click",(()=>{this.onOpenEmptyMapItemsList.emit()}))):(n=document.createElement("a"),n.href=`${(0,u.getKartkatalogUrl)(this.environment)}/kart`),n.innerText="en"===this.language?"Show map":"Vis kart",n.classList.add("page-link-element"),this.mapItemListContainer.innerHTML=`<ul>${e}</ul>`,this.mapItemListContainer.prepend(n)},this.clickOutsideMapItemsContainer=this.clickOutsideMapItemsContainer.bind(this),this.updateDomElements=this.updateDomElements.bind(this),this.getUpdatedMapItems=this.getUpdatedMapItems.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.mapButton=(0,p.getShadowRootElement)(this,"#map-toggle-button"),this.mapIcon=(0,p.getShadowRootElement)(this,"#map-toggle-button-icon"),this.mapIconCounter=(0,p.getShadowRootElement)(this,"#map-toggle-button-counter"),this.mapItemListContainer=(0,p.getShadowRootElement)(this,"#map-item-list-container"),this.getUpdatedMapItems(),this.mapIcon.innerHTML=c.default,this.renderMapItemsCounter(),document.addEventListener("click",this.clickOutsideMapItemsContainer),document.addEventListener("mapItemsChanged",this.updateDomElements)}updateDomElements(){this.getUpdatedMapItems(),this.renderMapItems(this.mapItems),this.renderMapItemsCounter()}getUpdatedMapItems(){this.mapItems=(0,d.getMapItems)()}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideMapItemsContainer)}clickOutsideMapItemsContainer(t){const e=t.composedPath()[0];e.closest("#map-item-list-container")||e.closest("#map-toggle-button")||this.hideListContainer()}renderMapItemsCounter(){const t=(0,d.getMapItemsCount)();t?(this.mapIconCounter.innerHTML=t.toString(),this.mapIconCounter.classList.remove("hidden"),this.mapButton.setAttribute("aria-label","en"===this.language?"Show map item list":"Vis liste med elementer lagt til i kart")):(this.mapIconCounter.innerHTML="",this.mapIconCounter.classList.add("hidden"),this.mapButton.setAttribute("aria-label","en"===this.language?"Show map":"Vis kart"))}buttonClicked(t){this.mapItems&&this.mapItems.length?this.showList=!this.showList:(this.showList=!1,this.preventRedirect?this.onOpenEmptyMapItemsList.emit():window.location.href=`${(0,u.getKartkatalogUrl)(this.environment)}/kart`)}removeMapItemClicked(t){const e=t.composedPath()[0];e.closest("#menu-container");const n=e.closest("button");if(n){const e=n.dataset&&n.dataset.mapItem?JSON.parse(n.dataset.mapItem):null;e&&(t.stopPropagation(),(0,d.removeMapItem)(e),this.getUpdatedMapItems(),this.renderMapItems(this.mapItems),this.renderMapItemsCounter(),this.mapItems&&this.mapItems.length||(this.showList=!1))}}showMenuChanged(){this.showList?this.mapItemListContainer.classList.add("open"):this.mapItemListContainer.classList.remove("open"),this.showList?this.mapButton.classList.add("open"):this.mapButton.classList.remove("open")}mapItemsChanged(){this.mapItems&&this.mapItems.length&&(this.renderMapItems(this.mapItems),this.renderMapItemsCounter())}languageChanged(){this.mapItems&&this.mapItems.length&&(this.renderMapItems(this.mapItems),this.renderMapItemsCounter())}preventRedirectChanged(){this.mapItems&&this.mapItems.length&&(this.renderMapItems(this.mapItems),this.renderMapItemsCounter())}static setup(t,e){const n=(0,p.getElement)(t);e.active&&(n.showList=e.active)}};m.elementSelector="map-items",r([(0,p.Prop)()],m.prototype,"id",void 0),r([(0,p.Prop)()],m.prototype,"environment",void 0),r([(0,p.Prop)()],m.prototype,"language",void 0),r([(0,p.Toggle)()],m.prototype,"showList",void 0),r([(0,p.Toggle)()],m.prototype,"preventRedirect",void 0),r([(0,p.Dispatch)("onOpenEmptyMapItemsList")],m.prototype,"onOpenEmptyMapItemsList",void 0),r([(0,p.Listen)("click","#map-toggle-button")],m.prototype,"buttonClicked",null),r([(0,p.Listen)("click","#map-item-list-container")],m.prototype,"removeMapItemClicked",null),r([(0,p.Watch)("showlist")],m.prototype,"showMenuChanged",null),r([(0,p.Watch)("mapItems")],m.prototype,"mapItemsChanged",null),r([(0,p.Watch)("language")],m.prototype,"languageChanged",null),r([(0,p.Watch)("preventredirect")],m.prototype,"preventRedirectChanged",null),m=r([(0,p.Component)({tag:"map-items",template:Promise.resolve().then((()=>a(n(7814)))),style:Promise.resolve().then((()=>a(n(2895))))})],m),e.MapItems=m},4724:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguage=e.getLanguage=e.setCookie=e.getCookie=void 0,e.getCookie=t=>{const e=`${t}=`,n=decodeURIComponent(document.cookie).split(";");for(var i=0;i<n.length;i++){let t=n[i];for(;" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf(e))return t.substring(e.length,t.length)}return""},e.setCookie=(t,e,n)=>{let i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);const o=`expires=${i.toUTCString()}`,r="localhost"===window.location.hostname?"":"domain=-geonorge.no";document.cookie=`${t}=${e};${o};path=/;${r}`},e.getLanguage=()=>(0,e.getCookie)("_culture"),e.setLanguage=t=>{(0,e.setCookie)("_culture",t,7)}},8586:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeMapItem=e.getMapItemsCount=e.getMapItems=void 0;const i=n(4724);e.getMapItems=()=>localStorage.mapItems&&Array.isArray(JSON.parse(localStorage.mapItems))?JSON.parse(localStorage.mapItems).filter((t=>t)):[],e.getMapItemsCount=()=>{if(-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"))return(0,e.getMapItems)().length;{const t=parseInt((0,i.getCookie)("mapItems"));return t&&!isNaN(t)?t:0}},e.removeMapItem=t=>{let e=localStorage.mapItems&&Array.isArray(JSON.parse(localStorage.mapItems))?JSON.parse(localStorage.mapItems):[];localStorage.mapItems=JSON.stringify(e.filter((e=>e.Uuid!==t.Uuid)))}},1406:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const i=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,o,r,a)=>"articles"===n?`<a onClick="${i(o,a)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${i(o,a)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}">${t.Title}</a>`}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(1422)})())); | ||
//# sourceMappingURL=MapItem.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.NavigationTabContent=e())}(self,(function(){return(()=>{"use strict";var t={4344:(t,e,o)=>{o.r(e),o.d(e,{default:()=>c});var n=o(3062),r=o.n(n),s=o(7638),i=o.n(s)()(r());i.push([t.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const c=i},3936:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n='<template>\n <slot name="tab-content"></slot>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=t(e);return e[2]?"@media ".concat(e[2]," {").concat(o,"}"):o})).join("")},e.i=function(t,o,n){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(n)for(var s=0;s<this.length;s++){var i=this[s][0];null!=i&&(r[i]=!0)}for(var c=0;c<t.length;c++){var a=[].concat(t[c]);n&&r[a[0]]||(o&&(a[2]?a[2]="".concat(o," and ").concat(a[2]):a[2]=o),e.push(a))}},e}},3062:t=>{function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o<e;o++)n[o]=t[o];return n}t.exports=function(t){var o,n,r=(n=4,function(t){if(Array.isArray(t))return t}(o=t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var n,r,s=[],i=!0,c=!1;try{for(o=o.call(t);!(i=(n=o.next()).done)&&(s.push(n.value),!e||s.length!==e);i=!0);}catch(t){c=!0,r=t}finally{try{i||null==o.return||o.return()}finally{if(c)throw r}}return s}}(o,n)||function(t,o){if(t){if("string"==typeof t)return e(t,o);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)?e(t,o):void 0}}(o,n)||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.")}()),s=r[1],i=r[3];if(!i)return s;if("function"==typeof btoa){var c=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),u="/*# ".concat(a," */"),l=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[s].concat(l).concat([u]).join("\n")}return[s].join("\n")}},1397:function(t,e,o){var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,c)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=o(5969),s=o(5773),i=o(3804);e.Component=t=>e=>{var o;const c=t.tag||i.toKebabCase(e.prototype.constructor.name),a=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[i.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const n=r[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(c)||customElements.define(c,a),a}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(o(1397),e),r(o(985),e),r(o(265),e),r(o(5969),e),r(o(5773),e),r(o(4271),e),r(o(9766),e),r(o(4938),e)},5969:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(3804);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(r){const s=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(3804);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},4271:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(3804);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},6792:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,o,n){var r,s=arguments.length,i=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(i=(s<3?r(i):s>3?r(e,o,i):r(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&n(e,t,o);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabContent=void 0;const c=o(406);let a=0,u=class extends c.CustomElement{constructor(){super()}static get observedAttributes(){return["selected"]}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tabpanel"),this.id||(this.id="navigation-tab-content-"+a++)}disconnectedCallback(){}static setup(t,e){(0,c.getElement)(t)}};u.elementSelector="navigation-tab-content",s([(0,c.Prop)()],u.prototype,"id",void 0),u=s([(0,c.Component)({tag:"navigation-tab-content",template:Promise.resolve().then((()=>i(o(3936)))),style:Promise.resolve().then((()=>i(o(4344))))})],u),e.NavigationTabContent=u}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(6792)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.NavigationTabContent=e())}(self,(()=>(()=>{"use strict";var t={4344:(t,e,o)=>{o.r(e),o.d(e,{default:()=>i});var n=o(4663),r=o.n(n),s=o(7638),c=o.n(s)()(r());c.push([t.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const i=c},3936:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n='<template>\n <slot name="tab-content"></slot>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var c={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(c[a]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&c[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),o&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=o):l[2]=o),r&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=r):l[4]="".concat(r)),e.push(l))}},e}},4663:t=>{t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(r," */"),c=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[e].concat(c).concat([s]).join("\n")}return[e].join("\n")}},1397:function(t,e,o){var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,s){function c(t){try{a(n.next(t))}catch(t){s(t)}}function i(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(c,i)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=o(5969),s=o(5773),c=o(3804);e.Component=t=>e=>{var o;const i=t.tag||c.toKebabCase(e.prototype.constructor.name),a=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>c.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[c.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const n=r[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(i)||customElements.define(i,a),a}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(o(1397),e),r(o(985),e),r(o(265),e),r(o(5969),e),r(o(5773),e),r(o(4271),e),r(o(9766),e),r(o(4938),e)},5969:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(3804);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(r){const s=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(3804);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},4271:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(3804);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},6792:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(e,o);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,r)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,o,n){var r,s=arguments.length,c=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var i=t.length-1;i>=0;i--)(r=t[i])&&(c=(s<3?r(c):s>3?r(e,o,c):r(e,o))||c);return s>3&&c&&Object.defineProperty(e,o,c),c},c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&n(e,t,o);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabContent=void 0;const i=o(406);let a=0,u=class extends i.CustomElement{constructor(){super()}static get observedAttributes(){return["selected"]}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tabpanel"),this.id||(this.id="navigation-tab-content-"+a++)}disconnectedCallback(){}static setup(t,e){(0,i.getElement)(t)}};u.elementSelector="navigation-tab-content",s([(0,i.Prop)()],u.prototype,"id",void 0),u=s([(0,i.Component)({tag:"navigation-tab-content",template:Promise.resolve().then((()=>c(o(3936)))),style:Promise.resolve().then((()=>c(o(4344))))})],u),e.NavigationTabContent=u}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(6792)})())); | ||
//# sourceMappingURL=NavigationTabContent.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.NavigationTabHeading=e())}(self,(function(){return(()=>{"use strict";var t={3341:(t,e,n)=>{n.r(e),n.d(e,{default:()=>i});var o=n(3062),r=n.n(o),s=n(7638),a=n.n(s)()(r());a.push([t.id,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{display:block;background-color:#7da1c4;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid transparent;background-clip:padding-box;border-radius:0;font-size:13px;margin-bottom:0;margin-bottom:-1px;margin-right:2px}:host slot:hover{background-color:#fe5000;color:#fff;border-color:transparent}:host slot.selected{border:1px solid #414042;border-bottom:1px solid #fff;background-color:#fff;color:#555;cursor:default}',"",{version:3,sources:["webpack://./custom-elements/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WACI,aAAA,CACA,wBECU,CAAA,iBAAA,CFCV,6BAAA,CACA,UAAA,CACA,mCAAA,CACA,2BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBEbI,CFcJ,UAAA,CACA,wBAAA,CAGJ,oBACI,wBAAA,CACA,4BAAA,CACA,qBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:['@import "../../../style/all";\n\n:host {\n font-family: $default-font;\n display: inline-flex;\n cursor: pointer;\n\n slot {\n display: block;\n background-color: $secondary-brand;\n padding: 10px 12px;\n transition: all 0.35s linear 0s;\n color: #fff;\n border-bottom: 1px solid transparent;\n background-clip: padding-box;\n border-radius: 0;\n font-size: 13px;\n margin-bottom: 0;\n margin-bottom: -1px;\n margin-right: 2px;\n\n &:hover {\n background-color: $primary-brand;\n color: #fff;\n border-color: transparent;\n }\n\n &.selected {\n border: 1px solid #414042;\n border-bottom: 1px solid #fff;\n background-color: #fff;\n color: #555;\n cursor: default;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const i=a},6290:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-heading"></slot>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(r[a]=!0)}for(var i=0;i<t.length;i++){var c=[].concat(t[i]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},3062:t=>{function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n,o,r=(o=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,s=[],a=!0,i=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(s.push(o.value),!e||s.length!==e);a=!0);}catch(t){i=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(i)throw r}}return s}}(n,o)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(n,o)||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.")}()),s=r[1],a=r[3];if(!a)return s;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),l="/*# ".concat(c," */"),d=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[s].concat(d).concat([l]).join("\n")}return[s].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,s){function a(t){try{c(o.next(t))}catch(t){s(t)}}function i(t){try{c(o.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,i)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),s=n(5773),a=n(3804);e.Component=t=>e=>{var n;const i=t.tag||a.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[a.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(i)||customElements.define(i,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const s=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},913:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,n,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var i=t.length-1;i>=0;i--)(r=t[i])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const i=n(406);let c=0,l=class extends i.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tab"),this.id||(this.id="navigation-tab-heading-"+c++),this.tabHeadingElement=(0,i.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected")}disconnectedCallback(){}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}attributeChangedCallback(){}selectedChanged(){this.selected?this.setAttribute("aria-selected",""):this.removeAttribute("aria-selected"),this.selected?this.tabHeadingElement.classList.add("selected"):this.tabHeadingElement.classList.remove("selected"),this.setAttribute("tabindex",this.selected?"0":"-1")}static setup(t,e){(0,i.getElement)(t)}};l.elementSelector="navigation-tab-heading",s([(0,i.Prop)()],l.prototype,"id",void 0),s([(0,i.Toggle)()],l.prototype,"selected",void 0),s([(0,i.Watch)("selected")],l.prototype,"selectedChanged",null),l=s([(0,i.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>a(n(6290)))),style:Promise.resolve().then((()=>a(n(3341))))})],l),e.NavigationTabHeading=l}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={id:o,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(913)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.NavigationTabHeading=e())}(self,(()=>(()=>{"use strict";var t={3341:(t,e,o)=>{o.r(e),o.d(e,{default:()=>i});var n=o(4663),r=o.n(n),s=o(7638),a=o.n(s)()(r());a.push([t.id,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{display:block;background-color:#7da1c4;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:0;font-size:13px;margin-bottom:0;margin-bottom:-1px;margin-right:2px}:host slot:hover{background-color:#fe5000;color:#fff;border-color:rgba(0,0,0,0)}:host slot.selected{border:1px solid #414042;border-bottom:1px solid #fff;background-color:#fff;color:#555;cursor:default}',"",{version:3,sources:["webpack://./custom-elements/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WACI,aAAA,CACA,wBECU,CAAA,iBAAA,CFCV,6BAAA,CACA,UAAA,CACA,qCAAA,CACA,2BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBEbI,CFcJ,UAAA,CACA,0BAAA,CAGJ,oBACI,wBAAA,CACA,4BAAA,CACA,qBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:['@import "../../../style/all";\n\n:host {\n font-family: $default-font;\n display: inline-flex;\n cursor: pointer;\n\n slot {\n display: block;\n background-color: $secondary-brand;\n padding: 10px 12px;\n transition: all 0.35s linear 0s;\n color: #fff;\n border-bottom: 1px solid transparent;\n background-clip: padding-box;\n border-radius: 0;\n font-size: 13px;\n margin-bottom: 0;\n margin-bottom: -1px;\n margin-right: 2px;\n\n &:hover {\n background-color: $primary-brand;\n color: #fff;\n border-color: transparent;\n }\n\n &.selected {\n border: 1px solid #414042;\n border-bottom: 1px solid #fff;\n background-color: #fff;\n color: #555;\n cursor: default;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const i=a},6290:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n='<template>\n <slot name="tab-heading"></slot>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);n&&a[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},4663:t=>{t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(r," */"),a=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([s]).join("\n")}return[e].join("\n")}},1397:function(t,e,o){var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,s){function a(t){try{c(n.next(t))}catch(t){s(t)}}function i(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(a,i)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=o(5969),s=o(5773),a=o(3804);e.Component=t=>e=>{var o;const i=t.tag||a.toKebabCase(e.prototype.constructor.name),c=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>a.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[a.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const n=r[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(i)||customElements.define(i,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(o(1397),e),r(o(985),e),r(o(265),e),r(o(5969),e),r(o(5773),e),r(o(4271),e),r(o(9766),e),r(o(4938),e)},5969:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(3804);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(r){const s=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(3804);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},4271:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(3804);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},913:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(e,o);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,r)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,o,n){var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var i=t.length-1;i>=0;i--)(r=t[i])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&n(e,t,o);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const i=o(406);let c=0,l=class extends i.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tab"),this.id||(this.id="navigation-tab-heading-"+c++),this.tabHeadingElement=(0,i.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected")}disconnectedCallback(){}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}attributeChangedCallback(){}selectedChanged(){this.selected?this.setAttribute("aria-selected",""):this.removeAttribute("aria-selected"),this.selected?this.tabHeadingElement.classList.add("selected"):this.tabHeadingElement.classList.remove("selected"),this.setAttribute("tabindex",this.selected?"0":"-1")}static setup(t,e){(0,i.getElement)(t)}};l.elementSelector="navigation-tab-heading",s([(0,i.Prop)()],l.prototype,"id",void 0),s([(0,i.Toggle)()],l.prototype,"selected",void 0),s([(0,i.Watch)("selected")],l.prototype,"selectedChanged",null),l=s([(0,i.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>a(o(6290)))),style:Promise.resolve().then((()=>a(o(3341))))})],l),e.NavigationTabHeading=l}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(913)})())); | ||
//# sourceMappingURL=NavigationTabHeading.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.NavigationTabs=e())}(self,(function(){return(()=>{"use strict";var t={4344:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(3062),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const s=i},3341:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(3062),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{display:block;background-color:#7da1c4;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid transparent;background-clip:padding-box;border-radius:0;font-size:13px;margin-bottom:0;margin-bottom:-1px;margin-right:2px}:host slot:hover{background-color:#fe5000;color:#fff;border-color:transparent}:host slot.selected{border:1px solid #414042;border-bottom:1px solid #fff;background-color:#fff;color:#555;cursor:default}',"",{version:3,sources:["webpack://./custom-elements/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WACI,aAAA,CACA,wBECU,CAAA,iBAAA,CFCV,6BAAA,CACA,UAAA,CACA,mCAAA,CACA,2BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBEbI,CFcJ,UAAA,CACA,wBAAA,CAGJ,oBACI,wBAAA,CACA,4BAAA,CACA,qBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:['@import "../../../style/all";\n\n:host {\n font-family: $default-font;\n display: inline-flex;\n cursor: pointer;\n\n slot {\n display: block;\n background-color: $secondary-brand;\n padding: 10px 12px;\n transition: all 0.35s linear 0s;\n color: #fff;\n border-bottom: 1px solid transparent;\n background-clip: padding-box;\n border-radius: 0;\n font-size: 13px;\n margin-bottom: 0;\n margin-bottom: -1px;\n margin-right: 2px;\n\n &:hover {\n background-color: $primary-brand;\n color: #fff;\n border-color: transparent;\n }\n\n &.selected {\n border: 1px solid #414042;\n border-bottom: 1px solid #fff;\n background-color: #fff;\n color: #555;\n cursor: default;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=i},9146:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(3062),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,':host{font-family:"Open Sans",sans-serif}:host .navigation-tab-headings{width:100%;border-bottom:1px solid #414042;margin-bottom:10px;display:flex;flex-wrap:wrap}',"",{version:3,sources:["webpack://./custom-elements/navigation-tabs/navigation-tabs.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDKX,+BACI,UAAA,CACA,+BAAA,CACA,kBAAA,CACA,YAAA,CACA,cAAA",sourcesContent:['@import "../../style/all";\n\n:host {\n font-family: $default-font;\n\n .navigation-tab-headings {\n width: 100%;\n border-bottom: 1px solid #414042;\n margin-bottom: 10px;\n display: flex;\n flex-wrap: wrap;\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";'],sourceRoot:""}]);const s=i},3936:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-content"></slot>\n</template>'},6290:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-heading"></slot>\n</template>'},8687:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div class="navigation-tab-headings">\n <slot name="tab-heading"></slot>\n </div>\n <slot name="tab-content"></slot>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(r[i]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},3062:t=>{function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n,o,r=(o=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,a=[],i=!0,s=!1;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(a.push(o.value),!e||a.length!==e);i=!0);}catch(t){s=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return a}}(n,o)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(n,o)||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.")}()),a=r[1],i=r[3];if(!i)return a;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),l="/*# ".concat(c," */"),d=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[a].concat(d).concat([l]).join("\n")}return[a].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,a){function i(t){try{c(o.next(t))}catch(t){a(t)}}function s(t){try{c(o.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),a=n(5773),i=n(3804);e.Component=t=>e=>{var n;const s=t.tag||i.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[i.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),a.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const a=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(a,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},6792:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabContent=void 0;const s=n(406);let c=0,l=class extends s.CustomElement{constructor(){super()}static get observedAttributes(){return["selected"]}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tabpanel"),this.id||(this.id="navigation-tab-content-"+c++)}disconnectedCallback(){}static setup(t,e){(0,s.getElement)(t)}};l.elementSelector="navigation-tab-content",a([(0,s.Prop)()],l.prototype,"id",void 0),l=a([(0,s.Component)({tag:"navigation-tab-content",template:Promise.resolve().then((()=>i(n(3936)))),style:Promise.resolve().then((()=>i(n(4344))))})],l),e.NavigationTabContent=l},913:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const s=n(406);let c=0,l=class extends s.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tab"),this.id||(this.id="navigation-tab-heading-"+c++),this.tabHeadingElement=(0,s.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected")}disconnectedCallback(){}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}attributeChangedCallback(){}selectedChanged(){this.selected?this.setAttribute("aria-selected",""):this.removeAttribute("aria-selected"),this.selected?this.tabHeadingElement.classList.add("selected"):this.tabHeadingElement.classList.remove("selected"),this.setAttribute("tabindex",this.selected?"0":"-1")}static setup(t,e){(0,s.getElement)(t)}};l.elementSelector="navigation-tab-heading",a([(0,s.Prop)()],l.prototype,"id",void 0),a([(0,s.Toggle)()],l.prototype,"selected",void 0),a([(0,s.Watch)("selected")],l.prototype,"selectedChanged",null),l=a([(0,s.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>i(n(6290)))),style:Promise.resolve().then((()=>i(n(3341))))})],l),e.NavigationTabHeading=l},697:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabs=void 0;const s=n(406),c=n(913),l=n(6792);let d=class extends s.CustomElement{constructor(){super(),this.onSlotChange=this.onSlotChange.bind(this)}static get observedAttributes(){return["selected"]}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.tabHeadingSlot=(0,s.getShadowRootElement)(this,"slot[name=tab-heading]"),this.tabContentSlot=(0,s.getShadowRootElement)(this,"slot[name=tab-content]"),this.tabHeadingSlot.addEventListener("slotchange",this.onSlotChange),this.tabContentSlot.addEventListener("slotchange",this.onSlotChange),this.hasAttribute("role")||this.setAttribute("role","tablist"),this.addEventListener("click",this._onClick),new c.NavigationTabHeading,new l.NavigationTabContent,Promise.all([customElements.whenDefined("navigation-tab-heading"),customElements.whenDefined("navigation-tab-content")]).then((()=>{this.linkPanels()}))}disconnectedCallback(){this.removeEventListener("click",this._onClick)}onSlotChange(){this.linkPanels()}linkPanels(){const t=this.getTabHeadingElements();t.forEach((t=>{const e=t.nextElementSibling;if("navigation-tab-content"!==e.tagName.toLowerCase())return void console.error(`navigation-tab-heading #${t.id} is not asibling of a <tab-navigation-content>`);t.setAttribute("aria-controls",e.id),e.setAttribute("aria-labelledby",t.id);let n=document.createElement("div");n.innerHTML=t.innerHTML,n.setAttribute("slot","tab-heading"),t.innerHTML="",t.appendChild(n);let o=document.createElement("div");o.innerHTML=e.innerHTML,o.setAttribute("slot","tab-content"),e.innerHTML="",e.appendChild(o)}));const e=t.find((t=>t.selected))||t[0];this.setSelectTab(e)}setSelectTab(t){this.reset();const e=this.getTabContentForTabHeading(t);if(!e)throw new Error(`No tab-content-element with id ${t.getAttribute("aria-controls")}`);t.selected=!0,e.hidden=!1}getTabHeadingElements(){return Array.from(this.querySelectorAll("navigation-tab-heading"))}getTabContentElements(){return Array.from(this.querySelectorAll("navigation-tab-content"))}getTabContentForTabHeading(t){const e=t.getAttribute("aria-controls");return this.querySelector(`#${e}`)}reset(){const t=this.getTabHeadingElements(),e=this.getTabContentElements();t.forEach((t=>t.selected=!1)),e.forEach((t=>t.hidden=!0))}_onClick(t){const e=t.target.closest("navigation-tab-heading");e&&"tab"===e.getAttribute("role")&&this.setSelectTab(e)}static setup(t,e){(0,s.getElement)(t)}};d.elementSelector="navigation-tabs",a([(0,s.Prop)()],d.prototype,"id",void 0),a([(0,s.Prop)()],d.prototype,"selectedtab",void 0),a([(0,s.Dispatch)("onSearch")],d.prototype,"onSearch",void 0),d=a([(0,s.Component)({tag:"navigation-tabs",template:Promise.resolve().then((()=>i(n(8687)))),style:Promise.resolve().then((()=>i(n(9146))))})],d),e.NavigationTabs=d}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={id:o,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(697)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.NavigationTabs=e())}(self,(()=>(()=>{"use strict";var t={4344:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(4663),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const s=i},3341:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(4663),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{display:block;background-color:#7da1c4;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:0;font-size:13px;margin-bottom:0;margin-bottom:-1px;margin-right:2px}:host slot:hover{background-color:#fe5000;color:#fff;border-color:rgba(0,0,0,0)}:host slot.selected{border:1px solid #414042;border-bottom:1px solid #fff;background-color:#fff;color:#555;cursor:default}',"",{version:3,sources:["webpack://./custom-elements/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WACI,aAAA,CACA,wBECU,CAAA,iBAAA,CFCV,6BAAA,CACA,UAAA,CACA,qCAAA,CACA,2BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBEbI,CFcJ,UAAA,CACA,0BAAA,CAGJ,oBACI,wBAAA,CACA,4BAAA,CACA,qBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:['@import "../../../style/all";\n\n:host {\n font-family: $default-font;\n display: inline-flex;\n cursor: pointer;\n\n slot {\n display: block;\n background-color: $secondary-brand;\n padding: 10px 12px;\n transition: all 0.35s linear 0s;\n color: #fff;\n border-bottom: 1px solid transparent;\n background-clip: padding-box;\n border-radius: 0;\n font-size: 13px;\n margin-bottom: 0;\n margin-bottom: -1px;\n margin-right: 2px;\n\n &:hover {\n background-color: $primary-brand;\n color: #fff;\n border-color: transparent;\n }\n\n &.selected {\n border: 1px solid #414042;\n border-bottom: 1px solid #fff;\n background-color: #fff;\n color: #555;\n cursor: default;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=i},9146:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(4663),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,':host{font-family:"Open Sans",sans-serif}:host .navigation-tab-headings{width:100%;border-bottom:1px solid #414042;margin-bottom:10px;display:flex;flex-wrap:wrap}',"",{version:3,sources:["webpack://./custom-elements/navigation-tabs/navigation-tabs.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDKX,+BACI,UAAA,CACA,+BAAA,CACA,kBAAA,CACA,YAAA,CACA,cAAA",sourcesContent:['@import "../../style/all";\n\n:host {\n font-family: $default-font;\n\n .navigation-tab-headings {\n width: 100%;\n border-bottom: 1px solid #414042;\n margin-bottom: 10px;\n display: flex;\n flex-wrap: wrap;\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";'],sourceRoot:""}]);const s=i},3936:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-content"></slot>\n</template>'},6290:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-heading"></slot>\n</template>'},8687:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <div class="navigation-tab-headings">\n <slot name="tab-heading"></slot>\n </div>\n <slot name="tab-content"></slot>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,a){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(i[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&i[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},4663:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),a="/*# ".concat(r," */"),i=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(i).concat([a]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,a){function i(t){try{c(o.next(t))}catch(t){a(t)}}function s(t){try{c(o.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),a=n(5773),i=n(3804);e.Component=t=>e=>{var n;const s=t.tag||i.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[i.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),a.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const a=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(a,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},6792:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabContent=void 0;const s=n(406);let c=0,l=class extends s.CustomElement{constructor(){super()}static get observedAttributes(){return["selected"]}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tabpanel"),this.id||(this.id="navigation-tab-content-"+c++)}disconnectedCallback(){}static setup(t,e){(0,s.getElement)(t)}};l.elementSelector="navigation-tab-content",a([(0,s.Prop)()],l.prototype,"id",void 0),l=a([(0,s.Component)({tag:"navigation-tab-content",template:Promise.resolve().then((()=>i(n(3936)))),style:Promise.resolve().then((()=>i(n(4344))))})],l),e.NavigationTabContent=l},913:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const s=n(406);let c=0,l=class extends s.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.setAttribute("role","tab"),this.id||(this.id="navigation-tab-heading-"+c++),this.tabHeadingElement=(0,s.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected")}disconnectedCallback(){}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}attributeChangedCallback(){}selectedChanged(){this.selected?this.setAttribute("aria-selected",""):this.removeAttribute("aria-selected"),this.selected?this.tabHeadingElement.classList.add("selected"):this.tabHeadingElement.classList.remove("selected"),this.setAttribute("tabindex",this.selected?"0":"-1")}static setup(t,e){(0,s.getElement)(t)}};l.elementSelector="navigation-tab-heading",a([(0,s.Prop)()],l.prototype,"id",void 0),a([(0,s.Toggle)()],l.prototype,"selected",void 0),a([(0,s.Watch)("selected")],l.prototype,"selectedChanged",null),l=a([(0,s.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>i(n(6290)))),style:Promise.resolve().then((()=>i(n(3341))))})],l),e.NavigationTabHeading=l},697:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabs=void 0;const s=n(406),c=n(913),l=n(6792);let d=class extends s.CustomElement{constructor(){super(),this.onSlotChange=this.onSlotChange.bind(this)}static get observedAttributes(){return["selected"]}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.tabHeadingSlot=(0,s.getShadowRootElement)(this,"slot[name=tab-heading]"),this.tabContentSlot=(0,s.getShadowRootElement)(this,"slot[name=tab-content]"),this.tabHeadingSlot.addEventListener("slotchange",this.onSlotChange),this.tabContentSlot.addEventListener("slotchange",this.onSlotChange),this.hasAttribute("role")||this.setAttribute("role","tablist"),this.addEventListener("click",this._onClick),new c.NavigationTabHeading,new l.NavigationTabContent,Promise.all([customElements.whenDefined("navigation-tab-heading"),customElements.whenDefined("navigation-tab-content")]).then((()=>{this.linkPanels()}))}disconnectedCallback(){this.removeEventListener("click",this._onClick)}onSlotChange(){this.linkPanels()}linkPanels(){const t=this.getTabHeadingElements();t.forEach((t=>{const e=t.nextElementSibling;if("navigation-tab-content"!==e.tagName.toLowerCase())return void console.error(`navigation-tab-heading #${t.id} is not asibling of a <tab-navigation-content>`);t.setAttribute("aria-controls",e.id),e.setAttribute("aria-labelledby",t.id);let n=document.createElement("div");n.innerHTML=t.innerHTML,n.setAttribute("slot","tab-heading"),t.innerHTML="",t.appendChild(n);let o=document.createElement("div");o.innerHTML=e.innerHTML,o.setAttribute("slot","tab-content"),e.innerHTML="",e.appendChild(o)}));const e=t.find((t=>t.selected))||t[0];this.setSelectTab(e)}setSelectTab(t){this.reset();const e=this.getTabContentForTabHeading(t);if(!e)throw new Error(`No tab-content-element with id ${t.getAttribute("aria-controls")}`);t.selected=!0,e.hidden=!1}getTabHeadingElements(){return Array.from(this.querySelectorAll("navigation-tab-heading"))}getTabContentElements(){return Array.from(this.querySelectorAll("navigation-tab-content"))}getTabContentForTabHeading(t){const e=t.getAttribute("aria-controls");return this.querySelector(`#${e}`)}reset(){const t=this.getTabHeadingElements(),e=this.getTabContentElements();t.forEach((t=>t.selected=!1)),e.forEach((t=>t.hidden=!0))}_onClick(t){const e=t.target.closest("navigation-tab-heading");e&&"tab"===e.getAttribute("role")&&this.setSelectTab(e)}static setup(t,e){(0,s.getElement)(t)}};d.elementSelector="navigation-tabs",a([(0,s.Prop)()],d.prototype,"id",void 0),a([(0,s.Prop)()],d.prototype,"selectedtab",void 0),a([(0,s.Dispatch)("onSearch")],d.prototype,"onSearch",void 0),d=a([(0,s.Component)({tag:"navigation-tabs",template:Promise.resolve().then((()=>i(n(8687)))),style:Promise.resolve().then((()=>i(n(9146))))})],d),e.NavigationTabs=d}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={id:o,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(697)})())); | ||
//# sourceMappingURL=NavigationTabs.js.map |
{ | ||
"name": "@kartverket/geonorge-web-components", | ||
"version": "0.1.54", | ||
"version": "0.1.55", | ||
"description": "Geonorge Web Components", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -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.SearchTypeSelector=t())}(self,(function(){return(()=>{"use strict";var e={372:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(3062),r=n.n(o),a=n(7638),s=n.n(a)()(r());s.push([e.id,'div.search-type-selector{width:180px}div.search-type-selector label{font-size:14px;display:block;cursor:pointer}div.search-type-selector label input[type=radio]{vertical-align:middle;margin:0;width:14px;height:14px}div.search-type-selector label .search-type-counter{font-size:.9em}div.search-type-selector label .search-type-counter::before{content:"("}div.search-type-selector label .search-type-counter::after{content:")"}',"",{version:3,sources:["webpack://./custom-elements/main-navigation/search-type-selector/search-type-selector.scss"],names:[],mappings:"AAAA,yBACI,WAAA,CACA,+BACI,cAAA,CACA,aAAA,CACA,cAAA,CACA,iDACI,qBAAA,CACA,QAAA,CACA,UAAA,CACA,WAAA,CAEJ,oDACI,cAAA,CACA,4DACI,WAAA,CAEJ,2DACI,WAAA",sourcesContent:['div.search-type-selector{\n width: 180px;\n label {\n font-size: 14px;\n display: block;\n cursor: pointer;\n input[type="radio"]{\n vertical-align: middle;\n margin: 0;\n width: 14px;\n height: 14px;\n }\n .search-type-counter {\n font-size: .9em;\n &::before{\n content: "(";\n }\n &::after{\n content: ")";\n }\n }\n }\n}\n'],sourceRoot:""}]);const c=s},3650:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o='<template>\n <div id="search-type-selector" class="search-type-selector">\n <label for="search-type-metadata">\n <input name="search-type" type="radio" id="search-type-metadata" value="metadata" />\n <span id="search-type-metadata-name">Kartkatalogen</span>\n <span id="search-type-metadata-counter" class="search-type-counter"></span>\n </label>\n <label for="search-type-article">\n <input name="search-type" type="radio" id="search-type-article" value="articles" />\n <span id="search-type-article-name">Artikler</span>\n <span id="search-type-article-counter" class="search-type-counter"></span>\n </label>\n </div>\n</template>'},7638:e=>{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,o){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(o)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(r[s]=!0)}for(var c=0;c<e.length;c++){var i=[].concat(e[c]);o&&r[i[0]]||(n&&(i[2]?i[2]="".concat(n," and ").concat(i[2]):i[2]=n),t.push(i))}},t}},3062:e=>{function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}e.exports=function(e){var n,o,r=(o=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a=[],s=!0,c=!1;try{for(n=n.call(e);!(s=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(c)throw r}}return a}}(n,o)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}}(n,o)||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.")}()),a=r[1],s=r[3];if(!s)return a;if("function"==typeof btoa){var c=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),l="/*# ".concat(i," */"),u=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[a].concat(u).concat([l]).join("\n")}return[a].join("\n")}},1397:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,a){function s(e){try{i(o.next(e))}catch(e){a(e)}}function c(e){try{i(o.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,c)}i((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),a=n(5773),s=n(3804);t.Component=e=>t=>{var n;const c=e.tag||s.toKebabCase(t.prototype.constructor.name),i=((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=>s.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,o=!0){if(t!=n){o&&(this[s.toCamelCase(e)]=n);const r=this.constructor.watchAttributes;if(r&&r[e]){const o=r[e];this.__connected&&"function"==typeof this[o]&&this[o]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),a.initializeProps(this)}))}render(){return o(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 o(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 o(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(c)||customElements.define(c,i),i}},985:(e,t)=>{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)=>{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){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1397),t),r(n(985),t),r(n(265),t),r(n(5969),t),r(n(5773),t),r(n(4271),t),r(n(9766),t),r(n(4938),t)},5969:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const o=n(3804);t.Listen=(e,t)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[o]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const o=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;o&&o.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(r){const a=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(a,r))}}}})}},5773:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const o=n(3804);t.Prop=()=>(e,t)=>{const n=o.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 r=this.props[t];this.props[t]=o.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,r,e,!1)}else this.hasAttribute(o.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 o=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(o)})(e)){if(t)if(null==t[o.toKebabCase(n)])t[o.toKebabCase(n)]="";else{const r=e.props[n]||e.getAttribute(o.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:r})}e.constructor.propsInit[n]&&(e.hasAttribute(o.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},4271:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const o=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(o.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},9766:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3804:(e,t)=>{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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const o=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[o.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},8310:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,n,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(s=(a<3?r(s):a>3?r(t,n,s):r(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},s=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)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchTypeSelector=void 0;const c=n(406);let i=class extends c.CustomElement{constructor(){super(),this.handleSearchTypeOnChange=this.handleSearchTypeOnChange.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.searchTypeSelector=(0,c.getShadowRootElement)(this,"#search-type-selector"),this.metadataNameElement=(0,c.getShadowRootElement)(this,"#search-type-metadata-name"),this.metadataCounterElement=(0,c.getShadowRootElement)(this,"#search-type-metadata-counter"),this.articleNameElement=(0,c.getShadowRootElement)(this,"#search-type-article-name"),this.articleCounterElement=(0,c.getShadowRootElement)(this,"#search-type-article-counter"),this.searchTypeSelector.querySelectorAll("input[name=search-type]").forEach((e=>{e.onchange=this.handleSearchTypeOnChange})),this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`)}disconnectedCallback(){}updateNameElements(e){this.metadataNameElement.innerHTML="en"===e?"Map catalog":"Kartkatalogen",this.articleNameElement.innerHTML="en"===e?"Articles":"Artikler"}handleSearchTypeOnChange(e){if(this.onSearchTypeChange){const t=e.composedPath()[0];this.onSearchTypeChange.emit({detail:{value:t.value}})}}languageChanged(){this.updateNameElements(this.language)}metadataResultsFoundChanged(){this.metadataCounterElement.innerHTML=this.metadataresultsfound}articlesResultsFoundChanged(){this.articleCounterElement.innerHTML=this.articlesresultsfound}searchTypeChanged(){const e=this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`);e&&(e.checked=!0)}static setup(e,t){(0,c.getElement)(e)}};i.elementSelector="search-type-selector",a([(0,c.Prop)()],i.prototype,"id",void 0),a([(0,c.Prop)()],i.prototype,"metadataresultsfound",void 0),a([(0,c.Prop)()],i.prototype,"articlesresultsfound",void 0),a([(0,c.Prop)()],i.prototype,"language",void 0),a([(0,c.Prop)()],i.prototype,"searchtype",void 0),a([(0,c.Dispatch)("onSearchTypeChange")],i.prototype,"onSearchTypeChange",void 0),a([(0,c.Watch)("language")],i.prototype,"languageChanged",null),a([(0,c.Watch)("metadataresultsfound")],i.prototype,"metadataResultsFoundChanged",null),a([(0,c.Watch)("articlesresultsfound")],i.prototype,"articlesResultsFoundChanged",null),a([(0,c.Watch)("searchtype")],i.prototype,"searchTypeChanged",null),i=a([(0,c.Component)({tag:"search-type-selector",template:Promise.resolve().then((()=>s(n(3650)))),style:Promise.resolve().then((()=>s(n(372))))})],i),t.SearchTypeSelector=i}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={id:o,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.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 o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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(8310)})()})); | ||
!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.SearchTypeSelector=t())}(self,(()=>(()=>{"use strict";var e={372:(e,t,o)=>{o.r(t),o.d(t,{default:()=>c});var n=o(4663),r=o.n(n),a=o(7638),s=o.n(a)()(r());s.push([e.id,'div.search-type-selector{width:180px}div.search-type-selector label{font-size:14px;display:block;cursor:pointer}div.search-type-selector label input[type=radio]{vertical-align:middle;margin:0;width:14px;height:14px}div.search-type-selector label .search-type-counter{font-size:.9em}div.search-type-selector label .search-type-counter::before{content:"("}div.search-type-selector label .search-type-counter::after{content:")"}',"",{version:3,sources:["webpack://./custom-elements/main-navigation/search-type-selector/search-type-selector.scss"],names:[],mappings:"AAAA,yBACI,WAAA,CACA,+BACI,cAAA,CACA,aAAA,CACA,cAAA,CACA,iDACI,qBAAA,CACA,QAAA,CACA,UAAA,CACA,WAAA,CAEJ,oDACI,cAAA,CACA,4DACI,WAAA,CAEJ,2DACI,WAAA",sourcesContent:['div.search-type-selector{\n width: 180px;\n label {\n font-size: 14px;\n display: block;\n cursor: pointer;\n input[type="radio"]{\n vertical-align: middle;\n margin: 0;\n width: 14px;\n height: 14px;\n }\n .search-type-counter {\n font-size: .9em;\n &::before{\n content: "(";\n }\n &::after{\n content: ")";\n }\n }\n }\n}\n'],sourceRoot:""}]);const c=s},3650:(e,t,o)=>{o.r(t),o.d(t,{default:()=>n});const n='<template>\n <div id="search-type-selector" class="search-type-selector">\n <label for="search-type-metadata">\n <input name="search-type" type="radio" id="search-type-metadata" value="metadata" />\n <span id="search-type-metadata-name">Kartkatalogen</span>\n <span id="search-type-metadata-counter" class="search-type-counter"></span>\n </label>\n <label for="search-type-article">\n <input name="search-type" type="radio" id="search-type-article" value="articles" />\n <span id="search-type-article-name">Artikler</span>\n <span id="search-type-article-counter" class="search-type-counter"></span>\n </label>\n </div>\n</template>'},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var c=0;c<this.length;c++){var i=this[c][0];null!=i&&(s[i]=!0)}for(var l=0;l<e.length;l++){var p=[].concat(e[l]);n&&s[p[0]]||(void 0!==a&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=a),o&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=o):p[2]=o),r&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=r):p[4]="".concat(r)),t.push(p))}},t}},4663:e=>{e.exports=function(e){var t=e[1],o=e[3];if(!o)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),a="/*# ".concat(r," */"),s=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[t].concat(s).concat([a]).join("\n")}return[t].join("\n")}},1397:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function c(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,c)}i((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=o(5969),a=o(5773),s=o(3804);t.Component=e=>t=>{var o;const c=e.tag||s.toKebabCase(t.prototype.constructor.name),i=((o=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=>s.toKebabCase(e)))}attributeChangedCallback(e,t,o){this.onAttributeChange(e,t,o)}onAttributeChange(e,t,o,n=!0){if(t!=o){n&&(this[s.toCamelCase(e)]=o);const r=this.constructor.watchAttributes;if(r&&r[e]){const n=r[e];this.__connected&&"function"==typeof this[n]&&this[n]({old:t,new:o})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),a.initializeProps(this)}))}render(){return n(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 n(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),o=document.createRange().createContextualFragment(t);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(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,o.ready=new Promise(((e,t)=>e(!0))),o);return customElements.get(c)||customElements.define(c,i),i}},985:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=o},265:(e,t)=>{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,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(o(1397),t),r(o(985),t),r(o(265),t),r(o(5969),t),r(o(5773),t),r(o(4271),t),r(o(9766),t),r(o(4938),t)},5969:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const n=o(3804);t.Listen=(e,t)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:t,eventName:e,handler:o[n]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const o of e.constructor.listeners){const n=o.selector?t.querySelector(o.selector)?t.querySelector(o.selector):null:e;n&&n.addEventListener(o.eventName,(t=>{o.handler.call(e,t)}))}}},t.Dispatch=e=>(t,o)=>{Object.defineProperty(t,o,{get:function(){const t=this;return{emit(r){const a=e||n.toDotCase(o);t.dispatchEvent(new CustomEvent(a,r))}}}})}},5773:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const n=o(3804);t.Prop=()=>(e,t)=>{const o=n.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(o)},set:function(e){if(this.__connected){const r=this.props[t];this.props[t]=n.tryParseInt(e),"object"!=typeof e?this.setAttribute(o,e):this.onAttributeChange(o,r,e,!1)}else this.hasAttribute(n.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let o of(e=>{const t=e.constructor.watchAttributes,o=Object.assign({},t);Object.keys(o).forEach((e=>o[e]=""));const n=Object.assign(Object.assign({},o),e.constructor.propsInit);return Object.keys(n)})(e)){if(t)if(null==t[n.toKebabCase(o)])t[n.toKebabCase(o)]="";else{const r=e.props[o]||e.getAttribute(n.toKebabCase(o));"function"==typeof e[t[o]]&&e[t[o]]({new:r})}e.constructor.propsInit[o]&&(e.hasAttribute(n.toKebabCase(o))||(e[o]=e.constructor.propsInit[o]))}}},4271:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const n=o(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 o=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==o||""==o:(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,""!==o&&null!==o?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(n.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},9766:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3804:(e,t)=>{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,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const n=o(3804);t.Watch=e=>(t,o)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[n.toKebabCase(e)]=o,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},8310:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,o,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(s=(a<3?r(s):a>3?r(t,o,s):r(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchTypeSelector=void 0;const c=o(406);let i=class extends c.CustomElement{constructor(){super(),this.handleSearchTypeOnChange=this.handleSearchTypeOnChange.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.searchTypeSelector=(0,c.getShadowRootElement)(this,"#search-type-selector"),this.metadataNameElement=(0,c.getShadowRootElement)(this,"#search-type-metadata-name"),this.metadataCounterElement=(0,c.getShadowRootElement)(this,"#search-type-metadata-counter"),this.articleNameElement=(0,c.getShadowRootElement)(this,"#search-type-article-name"),this.articleCounterElement=(0,c.getShadowRootElement)(this,"#search-type-article-counter"),this.searchTypeSelector.querySelectorAll("input[name=search-type]").forEach((e=>{e.onchange=this.handleSearchTypeOnChange})),this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`)}disconnectedCallback(){}updateNameElements(e){this.metadataNameElement.innerHTML="en"===e?"Map catalog":"Kartkatalogen",this.articleNameElement.innerHTML="en"===e?"Articles":"Artikler"}handleSearchTypeOnChange(e){if(this.onSearchTypeChange){const t=e.composedPath()[0];this.onSearchTypeChange.emit({detail:{value:t.value}})}}languageChanged(){this.updateNameElements(this.language)}metadataResultsFoundChanged(){this.metadataCounterElement.innerHTML=this.metadataresultsfound}articlesResultsFoundChanged(){this.articleCounterElement.innerHTML=this.articlesresultsfound}searchTypeChanged(){const e=this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`);e&&(e.checked=!0)}static setup(e,t){(0,c.getElement)(e)}};i.elementSelector="search-type-selector",a([(0,c.Prop)()],i.prototype,"id",void 0),a([(0,c.Prop)()],i.prototype,"metadataresultsfound",void 0),a([(0,c.Prop)()],i.prototype,"articlesresultsfound",void 0),a([(0,c.Prop)()],i.prototype,"language",void 0),a([(0,c.Prop)()],i.prototype,"searchtype",void 0),a([(0,c.Dispatch)("onSearchTypeChange")],i.prototype,"onSearchTypeChange",void 0),a([(0,c.Watch)("language")],i.prototype,"languageChanged",null),a([(0,c.Watch)("metadataresultsfound")],i.prototype,"metadataResultsFoundChanged",null),a([(0,c.Watch)("articlesresultsfound")],i.prototype,"articlesResultsFoundChanged",null),a([(0,c.Watch)("searchtype")],i.prototype,"searchTypeChanged",null),i=a([(0,c.Component)({tag:"search-type-selector",template:Promise.resolve().then((()=>s(o(3650)))),style:Promise.resolve().then((()=>s(o(372))))})],i),t.SearchTypeSelector=i}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={id:n,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.exports}return o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(8310)})())); | ||
//# sourceMappingURL=SearchTypeSelector.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.StandardButton=e())}(self,(function(){return(()=>{"use strict";var t={3871:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(3062),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,'*{box-sizing:border-box}button{-moz-transition:all .35s linear 0s;-o-transition:all .35s linear 0s;-webkit-transition:all .35s linear 0s;transition:all .35s linear 0s;font-family:"Open Sans",sans-serif;font-weight:400;font-size:12pt;font-style:normal;text-align:center;vertical-align:middle;border:1px solid transparent;border-radius:0;cursor:pointer;display:inline-block;height:34px;line-height:16pt;text-decoration:none;background-position:50%}button:hover{background-color:#fe5000}button:disabled{background-color:#fff;color:#d8d8d8;border:1px solid #d8d8d8;cursor:not-allowed}button:disabled:hover,button:disabled:focus{background-color:#fff}button.default:not(:disabled){background-color:#eee;color:#2f3940;border-color:#d8d8d8}button.default:not(:disabled):hover,button.default:not(:disabled):focus{background-color:#ddd}button.primary:not(:disabled){background-color:#7da1c4;color:#fff}button.primary:not(:disabled):hover,button.primary:not(:disabled):focus{background-color:#fe5000}button.success:not(:disabled){background-color:#06a755;color:#fff}button.success:not(:disabled):hover,button.success:not(:disabled):focus{background-color:#009745}button.warning:not(:disabled){background-color:#c38621;color:#fff}button.warning:not(:disabled):hover,button.warning:not(:disabled):focus{background-color:#b37611}button.danger:not(:disabled){background-color:#e00d0d;color:#fff}button.danger:not(:disabled):hover,button.danger:not(:disabled):focus{background-color:#d00000}',"",{version:3,sources:["webpack://./custom-elements/standard-button/standard-button.scss","webpack://./style/mixins/_transition.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,OCLI,kCDMA,CCLA,gCDKA,CCJA,qCDIA,CCHA,6BDGA,CACA,kCERW,CFSX,eAAA,CACA,cAAA,CACA,iBAAA,CACA,iBAAA,CACA,qBAAA,CACA,4BAAA,CACA,eAAA,CACA,cAAA,CACA,oBAAA,CACA,WAAA,CACA,gBAAA,CACA,oBAAA,CACA,uBAAA,CACA,aACI,wBGdQ,CHgBZ,gBACI,qBGKc,CHJd,aGKQ,CHJR,wBAAA,CACA,kBAAA,CACA,4CAEI,qBGDU,CHIlB,8BACI,qBG/Ba,CHgCb,aG9BM,CH+BN,oBGnCS,CHoCT,wEAEI,qBGnCe,CHsCvB,8BACI,wBGjCa,CHkCb,UAAA,CAEA,wEAEI,wBGrCe,CHwCvB,8BACI,wBGpCa,CHqCb,UAAA,CACA,wEAEI,wBGvCe,CH0CvB,8BACI,wBGvCa,CHwCb,UAAA,CACA,wEAEI,wBG1Ce,CH6CvB,6BACI,wBG3CY,CH4CZ,UAAA,CACA,sEAEI,wBG9Cc",sourcesContent:['@import "../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nbutton {\n @include transition(all 0.35s linear 0s);\n font-family: $default-font;\n font-weight: 400;\n font-size: 12pt;\n font-style: normal;\n text-align: center;\n vertical-align: middle;\n border: 1px solid transparent;\n border-radius: 0;\n cursor: pointer;\n display: inline-block;\n height: 34px;\n line-height: 16pt;\n text-decoration: none;\n background-position: 50%;\n &:hover {\n background-color: $primary-brand;\n }\n &:disabled {\n background-color: $disabled-background;\n color: $disabled-text;\n border: 1px solid $disabled-text;\n cursor: not-allowed;\n &:hover,\n &:focus {\n background-color: $disabled-background;\n }\n }\n &.default:not(:disabled) {\n background-color: $default-background;\n color: $default-text;\n border-color: $default-border;\n &:hover,\n &:focus {\n background-color: $default-background-hover;\n }\n }\n &.primary:not(:disabled) {\n background-color: $primary-background;\n color: #fff;\n\n &:hover,\n &:focus {\n background-color: $primary-background-hover;\n }\n }\n &.success:not(:disabled) {\n background-color: $success-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $success-background-hover;\n }\n }\n &.warning:not(:disabled) {\n background-color: $warning-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $warning-background-hover;\n }\n }\n &.danger:not(:disabled) {\n background-color: $danger-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $danger-background-hover;\n }\n }\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",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=i},7506:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <button id="standard-button"></button>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(o)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(r[i]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},3062:t=>{function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n,o,r=(o=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,a=[],i=!0,s=!1;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(a.push(o.value),!e||a.length!==e);i=!0);}catch(t){s=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return a}}(n,o)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(n,o)||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.")}()),a=r[1],i=r[3];if(!i)return a;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),d="/*# ".concat(c," */"),l=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[a].concat(l).concat([d]).join("\n")}return[a].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,a){function i(t){try{c(o.next(t))}catch(t){a(t)}}function s(t){try{c(o.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),a=n(5773),i=n(3804);e.Component=t=>e=>{var n;const s=t.tag||i.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[i.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),a.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const a=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(a,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},69:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.StandardButton=void 0;const s=n(406);let c=class extends s.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.standardButtonElement=(0,s.getShadowRootElement)(this,"#standard-button"),this.standardButtonElement.innerHTML=this.content,this.standardButtonElement.disabled=this.disabled;const t=["default","primary","success","warning","danger"].includes(this.color)?this.color:"default";this.standardButtonElement.classList.add(t)}static setup(t,e){(0,s.getElement)(t)}};c.elementSelector="standard-button",a([(0,s.Prop)()],c.prototype,"id",void 0),a([(0,s.Prop)()],c.prototype,"content",void 0),a([(0,s.Prop)()],c.prototype,"color",void 0),a([(0,s.Toggle)()],c.prototype,"disabled",void 0),c=a([(0,s.Component)({tag:"standard-button",template:Promise.resolve().then((()=>i(n(7506)))),style:Promise.resolve().then((()=>i(n(3871))))})],c),e.StandardButton=c}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={id:o,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(69)})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.StandardButton=e())}(self,(()=>(()=>{"use strict";var t={3871:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var o=n(4663),r=n.n(o),a=n(7638),i=n.n(a)()(r());i.push([t.id,'*{box-sizing:border-box}button{-moz-transition:all .35s linear 0s;-o-transition:all .35s linear 0s;-webkit-transition:all .35s linear 0s;transition:all .35s linear 0s;font-family:"Open Sans",sans-serif;font-weight:400;font-size:12pt;font-style:normal;text-align:center;vertical-align:middle;border:1px solid rgba(0,0,0,0);border-radius:0;cursor:pointer;display:inline-block;height:34px;line-height:16pt;text-decoration:none;background-position:50%}button:hover{background-color:#fe5000}button:disabled{background-color:#fff;color:#d8d8d8;border:1px solid #d8d8d8;cursor:not-allowed}button:disabled:hover,button:disabled:focus{background-color:#fff}button.default:not(:disabled){background-color:#eee;color:#2f3940;border-color:#d8d8d8}button.default:not(:disabled):hover,button.default:not(:disabled):focus{background-color:#ddd}button.primary:not(:disabled){background-color:#7da1c4;color:#fff}button.primary:not(:disabled):hover,button.primary:not(:disabled):focus{background-color:#fe5000}button.success:not(:disabled){background-color:#06a755;color:#fff}button.success:not(:disabled):hover,button.success:not(:disabled):focus{background-color:#009745}button.warning:not(:disabled){background-color:#c38621;color:#fff}button.warning:not(:disabled):hover,button.warning:not(:disabled):focus{background-color:#b37611}button.danger:not(:disabled){background-color:#e00d0d;color:#fff}button.danger:not(:disabled):hover,button.danger:not(:disabled):focus{background-color:#d00000}',"",{version:3,sources:["webpack://./custom-elements/standard-button/standard-button.scss","webpack://./style/mixins/_transition.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,OCLI,kCDMA,CCLA,gCDKA,CCJA,qCDIA,CCHA,6BDGA,CACA,kCERW,CFSX,eAAA,CACA,cAAA,CACA,iBAAA,CACA,iBAAA,CACA,qBAAA,CACA,8BAAA,CACA,eAAA,CACA,cAAA,CACA,oBAAA,CACA,WAAA,CACA,gBAAA,CACA,oBAAA,CACA,uBAAA,CACA,aACI,wBGdQ,CHgBZ,gBACI,qBGKc,CHJd,aGKQ,CHJR,wBAAA,CACA,kBAAA,CACA,4CAEI,qBGDU,CHIlB,8BACI,qBG/Ba,CHgCb,aG9BM,CH+BN,oBGnCS,CHoCT,wEAEI,qBGnCe,CHsCvB,8BACI,wBGjCa,CHkCb,UAAA,CAEA,wEAEI,wBGrCe,CHwCvB,8BACI,wBGpCa,CHqCb,UAAA,CACA,wEAEI,wBGvCe,CH0CvB,8BACI,wBGvCa,CHwCb,UAAA,CACA,wEAEI,wBG1Ce,CH6CvB,6BACI,wBG3CY,CH4CZ,UAAA,CACA,sEAEI,wBG9Cc",sourcesContent:['@import "../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nbutton {\n @include transition(all 0.35s linear 0s);\n font-family: $default-font;\n font-weight: 400;\n font-size: 12pt;\n font-style: normal;\n text-align: center;\n vertical-align: middle;\n border: 1px solid transparent;\n border-radius: 0;\n cursor: pointer;\n display: inline-block;\n height: 34px;\n line-height: 16pt;\n text-decoration: none;\n background-position: 50%;\n &:hover {\n background-color: $primary-brand;\n }\n &:disabled {\n background-color: $disabled-background;\n color: $disabled-text;\n border: 1px solid $disabled-text;\n cursor: not-allowed;\n &:hover,\n &:focus {\n background-color: $disabled-background;\n }\n }\n &.default:not(:disabled) {\n background-color: $default-background;\n color: $default-text;\n border-color: $default-border;\n &:hover,\n &:focus {\n background-color: $default-background-hover;\n }\n }\n &.primary:not(:disabled) {\n background-color: $primary-background;\n color: #fff;\n\n &:hover,\n &:focus {\n background-color: $primary-background-hover;\n }\n }\n &.success:not(:disabled) {\n background-color: $success-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $success-background-hover;\n }\n }\n &.warning:not(:disabled) {\n background-color: $warning-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $warning-background-hover;\n }\n }\n &.danger:not(:disabled) {\n background-color: $danger-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $danger-background-hover;\n }\n }\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",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway";',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #7da1c4;\n\n$primary-background: #7DA1C4;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=i},7506:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <button id="standard-button"></button>\n</template>'},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,a){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(i[c]=!0)}for(var d=0;d<t.length;d++){var l=[].concat(t[d]);o&&i[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),r&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=r):l[4]="".concat(r)),e.push(l))}},e}},4663:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),a="/*# ".concat(r," */"),i=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(i).concat([a]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,a){function i(t){try{c(o.next(t))}catch(t){a(t)}}function s(t){try{c(o.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),a=n(5773),i=n(3804);e.Component=t=>e=>{var n;const s=t.tag||i.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[i.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),a.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(s)||customElements.define(s,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const a=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(a,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},69:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,n,o){var r,a=arguments.length,i=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(i=(a<3?r(i):a>3?r(e,n,i):r(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.StandardButton=void 0;const s=n(406);let c=class extends s.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.standardButtonElement=(0,s.getShadowRootElement)(this,"#standard-button"),this.standardButtonElement.innerHTML=this.content,this.standardButtonElement.disabled=this.disabled;const t=["default","primary","success","warning","danger"].includes(this.color)?this.color:"default";this.standardButtonElement.classList.add(t)}static setup(t,e){(0,s.getElement)(t)}};c.elementSelector="standard-button",a([(0,s.Prop)()],c.prototype,"id",void 0),a([(0,s.Prop)()],c.prototype,"content",void 0),a([(0,s.Prop)()],c.prototype,"color",void 0),a([(0,s.Toggle)()],c.prototype,"disabled",void 0),c=a([(0,s.Component)({tag:"standard-button",template:Promise.resolve().then((()=>i(n(7506)))),style:Promise.resolve().then((()=>i(n(3871))))})],c),e.StandardButton=c}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={id:o,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(69)})())); | ||
//# sourceMappingURL=StandardButton.js.map |
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1706019
2571