@kartverket/geonorge-web-components
Advanced tools
Comparing version 2.8.1 to 2.9.0
@@ -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.BodyText=e())}(self,(()=>(()=>{"use strict";var t={3779:(t,e,o)=>{o.r(e),o.d(e,{default:()=>c});var n=o(4663),r=o.n(n),s=o(7638),i=o.n(s)()(r());i.push([t.id,':host,::slotted(*){font-family:"Open Sans",sans-serif;font-size:16px;line-height:24px;font-weight:300}',"",{version:3,sources:["webpack://./stories/body-text/body-text.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,mBAEI,kCCJW,CDKX,cAAA,CACA,gBAAA,CACA,eAAA",sourcesContent:['@import "../../style/all";\n\n:host,\n::slotted(*) {\n font-family: $default-font;\n font-size: 16px;\n line-height: 24px;\n font-weight: 300;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const c=i},8559:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n="<template>\n <slot></slot>\n</template>\n"},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 i={};if(n)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(i[a]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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," */");return[e].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 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}},4805: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,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.BodyText=void 0;const c=o(406);let a=class extends c.CustomElement{constructor(){super()}setup(t){}};a=s([(0,c.Component)({tag:"body-text",template:Promise.resolve().then((()=>i(o(8559)))),style:Promise.resolve().then((()=>i(o(3779))))})],a),e.BodyText=a}},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(4805)})())); | ||
!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.BodyText=e())}(self,(()=>(()=>{"use strict";var t={3779:(t,e,o)=>{o.r(e),o.d(e,{default:()=>c});var n=o(4663),r=o.n(n),s=o(7638),i=o.n(s)()(r());i.push([t.id,':host,::slotted(*){font-family:"Open Sans",sans-serif;font-size:14px;line-height:24px;font-weight:300}',"",{version:3,sources:["webpack://./stories/body-text/body-text.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,mBAEI,kCCJW,CDKX,cCHgB,CDIhB,gBAAA,CACA,eAAA",sourcesContent:['@import "../../style/all";\n\n:host,\n::slotted(*) {\n font-family: $default-font;\n font-size: $default-font-size;\n line-height: 24px;\n font-weight: 300;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const c=i},8559:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n="<template>\n <slot></slot>\n</template>\n"},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 i={};if(n)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(i[a]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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," */");return[e].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 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}},4805: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,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.BodyText=void 0;const c=o(406);let a=class extends c.CustomElement{constructor(){super()}setup(t){}};a=s([(0,c.Component)({tag:"body-text",template:Promise.resolve().then((()=>i(o(8559)))),style:Promise.resolve().then((()=>i(o(3779))))})],a),e.BodyText=a}},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(4805)})())); | ||
//# sourceMappingURL=BodyText.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.BreadcrumbList=e())}(self,(()=>(()=>{var t={8306:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([t.id,'ul{display:flex;margin-top:20px;padding:0}ul li{list-style-type:none;padding:0 10px 0 0}ul li:first-of-type{padding-left:10px}ul li a{font-family:"Open Sans",sans-serif;color:#3767c7;text-decoration:none;font-weight:400}ul li span{font-family:"Open Sans",sans-serif;font-weight:400}ul li svg{height:1em;overflow:visible;vertical-align:-0.125em;margin-left:10px}',"",{version:3,sources:["webpack://./stories/breadcrumb-list/breadcrumb-list.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,GACI,YAAA,CACA,eAAA,CACA,SAAA,CACA,MACI,oBAAA,CACA,kBAAA,CACA,oBACI,iBAAA,CAEJ,QACI,kCCbG,CDcH,aEEG,CFDH,oBAAA,CACA,eAAA,CAEJ,WACI,kCCnBG,CDoBH,eAAA,CAEJ,UACI,UAAA,CACA,gBAAA,CACA,uBAAA,CACA,gBAAA",sourcesContent:['@import "../../style/all";\n\nul {\n display: flex;\n margin-top: 20px;\n padding: 0;\n li {\n list-style-type: none;\n padding: 0 10px 0 0;\n &:first-of-type {\n padding-left: 10px;\n }\n a {\n font-family: $default-font;\n color: $primary-text;\n text-decoration: none;\n font-weight: 400;\n }\n span {\n font-family: $default-font;\n font-weight: 400;\n }\n svg {\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n margin-left: 10px;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},2874:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <ul id="breadcrumb-list"></ul>\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,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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),s="/*# ".concat(r," */");return[e].concat([s]).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,s){function i(t){try{c(o.next(t))}catch(t){s(t)}}function a(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(i,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);e.Component=t=>e=>{var n;const a=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),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(a)||customElements.define(a,c),c}},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 s=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(s,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}},316:t=>{t.exports='<svg data-prefix="fas" data-icon="angle-right" class="__1RDg9WQ__svg-inline--fa __1RDg9WQ__fa-angle-right __1RDg9WQ__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><title>Pil til hoyre</title><path fill="currentColor" d="M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"></path></svg>'},8574:function(t,e,n){"use strict";var o,r=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]}),s=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,s=arguments.length,i=s<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 a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(e,n,i):r(e,n))||i);return s>3&&i&&Object.defineProperty(e,n,i),i},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)&&r(e,t,n);return s(e,t),e},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbList=void 0;const l=n(406),u=c(n(316));let d=o=class extends l.CustomElement{constructor(){super(),this.renderBreadcrumbsFromAttribute=t=>{const e=JSON.parse(t);o.renderBreadcrumbs(e)}}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.renderBreadcrumbsFromAttribute(this.breadcrumbs)}breadcrumbsChanged(){var t;(null===(t=this.breadcrumbs)||void 0===t?void 0:t.length)&&this.renderBreadcrumbsFromAttribute(this.breadcrumbs)}static setup(t,e){const n=(0,l.getElement)(t);(0,l.getShadowRootElement)(n,"#breadcrumb-list").innerHTML=this.getBreadCrumbListElement(e.breadcrumbs)}};d.elementSelector="breadcrumb-list",d.getBreadCrumbListElement=t=>(null==t?void 0:t.length)?t.map(((e,n)=>{var o;const r=`${window.location.hash}`,s=`${window.location.pathname}${window.location.hash}${window.location.search}`,i=window.location.href,a=r.toLowerCase()===e.url.toLowerCase(),c=s.toLowerCase()===e.url.toLowerCase(),l=i.toLowerCase()===e.url.toLowerCase();return`<li>${!(null===(o=null==e?void 0:e.url)||void 0===o?void 0:o.length)||a||c||l?`<span>${e.name}</span>`:`<a href="${e.url}">${e.name}</a>`}${n<t.length-1?u.default:""}</li>`})).join(""):"",d.renderBreadcrumbs=t=>{const e=(0,l.getElement)("#breadcrumb-list");(0,l.getShadowRootElement)(e,"#breadcrumb-list").innerHTML=o.getBreadCrumbListElement(t)},i([(0,l.Prop)()],d.prototype,"id",void 0),i([(0,l.Prop)()],d.prototype,"breadcrumbs",void 0),i([(0,l.Watch)("breadcrumbs")],d.prototype,"breadcrumbsChanged",null),d=o=i([(0,l.Component)({tag:"breadcrumb-list",template:Promise.resolve().then((()=>a(n(2874)))),style:Promise.resolve().then((()=>a(n(8306))))})],d),e.BreadcrumbList=d}},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(8574)})())); | ||
!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.BreadcrumbList=e())}(self,(()=>(()=>{var t={8306:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([t.id,'ul{display:flex;margin-top:20px;padding:0}ul li{list-style-type:none;padding:0 10px 0 0}ul li:first-of-type{padding-left:10px}ul li a{font-family:"Open Sans",sans-serif;color:#3767c7;text-decoration:none;font-weight:400}ul li span{font-family:"Open Sans",sans-serif;font-weight:400}ul li svg{height:1em;overflow:visible;vertical-align:-0.125em;margin-left:10px}',"",{version:3,sources:["webpack://./stories/breadcrumb-list/breadcrumb-list.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,GACI,YAAA,CACA,eAAA,CACA,SAAA,CACA,MACI,oBAAA,CACA,kBAAA,CACA,oBACI,iBAAA,CAEJ,QACI,kCCbG,CDcH,aEEG,CFDH,oBAAA,CACA,eAAA,CAEJ,WACI,kCCnBG,CDoBH,eAAA,CAEJ,UACI,UAAA,CACA,gBAAA,CACA,uBAAA,CACA,gBAAA",sourcesContent:['@import "../../style/all";\n\nul {\n display: flex;\n margin-top: 20px;\n padding: 0;\n li {\n list-style-type: none;\n padding: 0 10px 0 0;\n &:first-of-type {\n padding-left: 10px;\n }\n a {\n font-family: $default-font;\n color: $primary-text;\n text-decoration: none;\n font-weight: 400;\n }\n span {\n font-family: $default-font;\n font-weight: 400;\n }\n svg {\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n margin-left: 10px;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},2874:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n <ul id="breadcrumb-list"></ul>\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,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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),s="/*# ".concat(r," */");return[e].concat([s]).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,s){function i(t){try{c(o.next(t))}catch(t){s(t)}}function a(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(i,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);e.Component=t=>e=>{var n;const a=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),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(a)||customElements.define(a,c),c}},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 s=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(s,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}},316:t=>{t.exports='<svg data-prefix="fas" data-icon="angle-right" class="__1RDg9WQ__svg-inline--fa __1RDg9WQ__fa-angle-right __1RDg9WQ__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><title>Pil til hoyre</title><path fill="currentColor" d="M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"></path></svg>'},8574:function(t,e,n){"use strict";var o,r=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]}),s=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,s=arguments.length,i=s<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 a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(e,n,i):r(e,n))||i);return s>3&&i&&Object.defineProperty(e,n,i),i},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)&&r(e,t,n);return s(e,t),e},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbList=void 0;const l=n(406),u=c(n(316));let d=o=class extends l.CustomElement{constructor(){super(),this.renderBreadcrumbsFromAttribute=t=>{const e=JSON.parse(t);o.renderBreadcrumbs(e)}}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.renderBreadcrumbsFromAttribute(this.breadcrumbs)}breadcrumbsChanged(){var t;(null===(t=this.breadcrumbs)||void 0===t?void 0:t.length)&&this.renderBreadcrumbsFromAttribute(this.breadcrumbs)}static setup(t,e){const n=(0,l.getElement)(t);(0,l.getShadowRootElement)(n,"#breadcrumb-list").innerHTML=this.getBreadCrumbListElement(e.breadcrumbs)}};d.elementSelector="breadcrumb-list",d.getBreadCrumbListElement=t=>(null==t?void 0:t.length)?t.map(((e,n)=>{var o;const r=`${window.location.hash}`,s=`${window.location.pathname}${window.location.hash}${window.location.search}`,i=window.location.href,a=r.toLowerCase()===e.url.toLowerCase(),c=s.toLowerCase()===e.url.toLowerCase(),l=i.toLowerCase()===e.url.toLowerCase();return`<li>${!(null===(o=null==e?void 0:e.url)||void 0===o?void 0:o.length)||a||c||l?`<span>${e.name}</span>`:`<a href="${e.url}">${e.name}</a>`}${n<t.length-1?u.default:""}</li>`})).join(""):"",d.renderBreadcrumbs=t=>{const e=(0,l.getElement)("#breadcrumb-list");(0,l.getShadowRootElement)(e,"#breadcrumb-list").innerHTML=o.getBreadCrumbListElement(t)},i([(0,l.Prop)()],d.prototype,"id",void 0),i([(0,l.Prop)()],d.prototype,"breadcrumbs",void 0),i([(0,l.Watch)("breadcrumbs")],d.prototype,"breadcrumbsChanged",null),d=o=i([(0,l.Component)({tag:"breadcrumb-list",template:Promise.resolve().then((()=>a(n(2874)))),style:Promise.resolve().then((()=>a(n(8306))))})],d),e.BreadcrumbList=d}},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(8574)})())); | ||
//# sourceMappingURL=BreadcrumbList.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.ContentContainer=e())}(self,(()=>(()=>{"use strict";var t={4990:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([t.id,'content-container{display:block;margin:auto;font-family:"Open Sans",sans-serif;padding:10px 15px}@media(min-width: 768px){content-container{width:750px}}@media(min-width: 992px){content-container{width:970px}}@media(min-width: 1200px){content-container{width:1170px}}content-container a{color:#3767c7;text-decoration:underline}',"",{version:3,sources:["webpack://./stories/content-container/content-container.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,kBACI,aAAA,CACA,WAAA,CACA,kCCLW,CDgBX,iBAAA,CENI,yBFRR,kBAMQ,WAAA,CAAA,CEFA,yBFJR,kBASQ,WAAA,CAAA,CETA,0BAAA,kBFYA,YAAA,CAAA,CAIJ,oBACI,aGHO,CHIP,yBAAA",sourcesContent:['@import "../../style/all";\n\ncontent-container {\n display: block;\n margin: auto;\n font-family: $default-font;\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 padding: 10px 15px;\n\n a {\n color: $primary-text;\n text-decoration: underline;\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},7056:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},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,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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),s="/*# ".concat(r," */");return[e].concat([s]).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,s){function i(t){try{c(o.next(t))}catch(t){s(t)}}function a(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(i,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);e.Component=t=>e=>{var n;const a=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),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(a)||customElements.define(a,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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},5924: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}),s=this&&this.__decorate||function(t,e,n,o){var r,s=arguments.length,i=s<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 a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(e,n,i):r(e,n))||i);return s>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},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ContentContainer=void 0;const c=n(5527),l=n(406),u=a(n(4990));let d=class extends l.CustomElement{constructor(){super(),(0,c.addGlobalStylesheet)("content-container-styles",u.default)}setup(t){}};d=s([(0,l.Component)({tag:"content-container",template:Promise.resolve().then((()=>i(n(7056))))})],d),e.ContentContainer=d}},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(5924)})())); | ||
!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.ContentContainer=e())}(self,(()=>(()=>{"use strict";var t={4990:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([t.id,'content-container{display:block;margin:auto;font-family:"Open Sans",sans-serif;font-size:14px;padding:10px 15px}@media(min-width: 768px){content-container{width:750px}}@media(min-width: 992px){content-container{width:970px}}@media(min-width: 1200px){content-container{width:1170px}}content-container a{color:#3767c7;text-decoration:underline}',"",{version:3,sources:["webpack://./stories/content-container/content-container.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,kBACI,aAAA,CACA,WAAA,CACA,kCCLW,CDMX,cCJgB,CDehB,iBAAA,CEPI,yBFRR,kBAOQ,WAAA,CAAA,CEHA,yBFJR,kBAUQ,WAAA,CAAA,CEVA,0BAAA,kBFaA,YAAA,CAAA,CAIJ,oBACI,aGJO,CHKP,yBAAA",sourcesContent:['@import "../../style/all";\n\ncontent-container {\n display: block;\n margin: auto;\n font-family: $default-font;\n font-size: $default-font-size;\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 padding: 10px 15px;\n\n a {\n color: $primary-text;\n text-decoration: underline;\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},7056:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},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,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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),s="/*# ".concat(r," */");return[e].concat([s]).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,s){function i(t){try{c(o.next(t))}catch(t){s(t)}}function a(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(i,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);e.Component=t=>e=>{var n;const a=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),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(a)||customElements.define(a,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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},5924: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}),s=this&&this.__decorate||function(t,e,n,o){var r,s=arguments.length,i=s<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 a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(e,n,i):r(e,n))||i);return s>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},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ContentContainer=void 0;const c=n(5527),l=n(406),u=a(n(4990));let d=class extends l.CustomElement{constructor(){super(),(0,c.addGlobalStylesheet)("content-container-styles",u.default)}setup(t){}};d=s([(0,l.Component)({tag:"content-container",template:Promise.resolve().then((()=>i(n(7056))))})],d),e.ContentContainer=d}},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(5924)})())); | ||
//# sourceMappingURL=ContentContainer.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,(()=>(()=>{var t={5348:(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{-webkit-border-radius:50%;border-radius:50%;background-color:#fe5000;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;border:none;font-size:16px;font-weight:400;width:100%;font-family:"Open Sans",sans-serif}.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://./stories/main-navigation/download-items/download-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/variables/_typography.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,uDGnBN,yBHoBiC,CGnBjC,iBHmBiC,CACvB,wBIXI,CJYJ,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,oFGtDN,iCHuDiC,CGtDjC,yBHsDiC,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,aIvED,CJwEC,oBAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,kCM9FD,CN+FC,6GACI,yBAAA,CACA,aIhFA,CJmFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FCvGZ,oCDwGgB,CCvGhB,kCDuGgB,CCtGhB,uCDsGgB,CCrGhB,+BDqGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCI7GL,CJ+GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aIxFd,CJyFc,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 @include border-radius(50%);\n background-color: $primary-brand;\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 border: none;\n font-size: 16px;\n font-weight: 400;\n width: 100%;\n font-family: $default-font;\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","@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const s=a},9206:(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," */");return[e].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}},5938: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"><title>Ikon for last ned</title><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1.000000, -9.000000)" fill="currentColor" class="__3aHyPbt__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="__1FtTC55__svg-inline--fa __1FtTC55__fa-trash __1FtTC55__fa-w-14 __1FtTC55__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title>Soppelkasse ikon</title><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>'},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=()=>{const t=-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"),n=window.sessionStorage.isLocalKartkatalogEnvironment;if(t||n)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")}},5527:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},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>`},5291: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(5938)),c=s(n(2374)),u=n(9399),p=n(1406),h=n(5527);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`),this.showList||n.setAttribute("tabindex","-1"),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("button"),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.showList||n.setAttribute("tabindex","-1"),this.downloadItemListContainer.innerHTML=(null==e?void 0:e.length)?`<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 ${t} download ${1===t?"item":"items"} in list`:`Vis liste med ${t} ${1===t?"element":"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)),this.onDownloadItemsChange&&this.onDownloadItemsChange.emit({detail:this.downloadItems})}}showListChanged(){this.showList?this.downloadItemListContainer.classList.add("open"):this.downloadItemListContainer.classList.remove("open"),this.showList?this.downloadButton.classList.add("open"):this.downloadButton.classList.remove("open"),(0,h.getFocusableElementsInsideElement)(this.downloadItemListContainer).forEach((t=>{this.showList?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}))}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.Dispatch)("onDownloadItemsChange")],g.prototype,"onDownloadItemsChange",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,"showListChanged",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(9206)))),style:Promise.resolve().then((()=>a(n(5348))))})],g),e.DownloadItems=g}},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(5291)})())); | ||
!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={5348:(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{-webkit-border-radius:50%;border-radius:50%;background-color:#fe5000;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;border:none;font-size:16px;font-weight:400;width:100%;font-family:"Open Sans",sans-serif}.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://./stories/main-navigation/download-items/download-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/variables/_typography.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,uDGnBN,yBHoBiC,CGnBjC,iBHmBiC,CACvB,wBIXI,CJYJ,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,oFGtDN,iCHuDiC,CGtDjC,yBHsDiC,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,aIvED,CJwEC,oBAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,kCM9FD,CN+FC,6GACI,yBAAA,CACA,aIhFA,CJmFR,uFACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,0FCvGZ,oCDwGgB,CCvGhB,kCDuGgB,CCtGhB,uCDsGgB,CCrGhB,+BDqGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,gGACI,gCI7GL,CJ+GC,qGACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,yGACI,aIxFd,CJyFc,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 @include border-radius(50%);\n background-color: $primary-brand;\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 border: none;\n font-size: 16px;\n font-weight: 400;\n width: 100%;\n font-family: $default-font;\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","@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const s=a},9206:(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," */");return[e].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}},5938: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"><title>Ikon for last ned</title><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1.000000, -9.000000)" fill="currentColor" class="__3aHyPbt__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="__1FtTC55__svg-inline--fa __1FtTC55__fa-trash __1FtTC55__fa-w-14 __1FtTC55__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title>Soppelkasse ikon</title><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>'},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=()=>{const t=-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"),n=window.sessionStorage.isLocalKartkatalogEnvironment;if(t||n)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")}},5527:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},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>`},5291: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(5938)),c=s(n(2374)),u=n(9399),p=n(1406),h=n(5527);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`),this.showList||n.setAttribute("tabindex","-1"),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("button"),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.showList||n.setAttribute("tabindex","-1"),this.downloadItemListContainer.innerHTML=(null==e?void 0:e.length)?`<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 ${t} download ${1===t?"item":"items"} in list`:`Vis liste med ${t} ${1===t?"element":"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)),this.onDownloadItemsChange&&this.onDownloadItemsChange.emit({detail:this.downloadItems})}}showListChanged(){this.showList?this.downloadItemListContainer.classList.add("open"):this.downloadItemListContainer.classList.remove("open"),this.showList?this.downloadButton.classList.add("open"):this.downloadButton.classList.remove("open"),(0,h.getFocusableElementsInsideElement)(this.downloadItemListContainer).forEach((t=>{this.showList?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}))}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.Dispatch)("onDownloadItemsChange")],g.prototype,"onDownloadItemsChange",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,"showListChanged",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(9206)))),style:Promise.resolve().then((()=>a(n(5348))))})],g),e.DownloadItems=g}},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(5291)})())); | ||
//# 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,(()=>(()=>{var t={3428:(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-of-type):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-of-type):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://./stories/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,yDACI,+BAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CE3BR,yBFoBI,yDASQ,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,aG7CD,CH8CC,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-of-type):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", sans-serif;',"@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},4091:(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 </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 d=[].concat(t[c]);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=>{"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," */");return[e].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" role="img" aria-labelledby="GeonorgeLogoTitle"><title id="GeonorgeLogoTitle">Geonorge logo</title><defs><style>.__2Z9mxra__cls-1{fill:#4d4d4f;}.__2Z9mxra__cls-2{fill:#a6a8ab;}.__2Z9mxra__cls-3{fill:#bbbdbf;}.__2Z9mxra__cls-4{fill:#6d6e70;}.__2Z9mxra__cls-5{fill:#929497;}.__2Z9mxra__cls-6{fill:#fe5000;}.__2Z9mxra__cls-7{fill:#404041;}</style></defs><title>Artboard 1</title><polygon class="__2Z9mxra__cls-1 " points="20.9 30.4 20.9 54.5 0 42.4 20.9 30.4"></polygon><polygon class="__2Z9mxra__cls-2 " points="20.9 6.3 20.9 30.4 0 18.3 20.9 6.3"></polygon><polyline class="__2Z9mxra__cls-3 " points="20.9 30.4 41.8 42.4 41.8 18.3 20.9 30.4"></polyline><polyline class="__2Z9mxra__cls-4 " points="20.9 30.4 0 42.4 0 18.3 20.9 30.4"></polyline><polyline class="__2Z9mxra__cls-5 " points="20.9 30.4 20.9 54.5 41.8 42.4 20.9 30.4"></polyline><path class="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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" role="img" aria-labelledby="kartverketLogoTitle"><title id="kartverketLogoTitle">Kartverket logo</title><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>'},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>`},8312: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),d=s(n(93)),p=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,n,o){const r=(null==n?void 0:n.length)?n:"https://uustatus.no/nb/erklaringer/publisert/8f3210cf-aa22-4d32-9fda-4460e3c3e05a";let i="";return"en"===t?(i=`\n <li><a href="${(0,c.getGeonorgeUrl)(t,e)}about/what-is-geonorge/">What is Geonorge</a></li>\n `,o||(i+=`\n <li><a href="${r}" target="_blank" rel="noopener noreferrer">Accessibility statement (in Norwegian)</a></li>\n `)):(i=`\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 `,o||(i+=`\n <li><a href="${r}" target="_blank" rel="noopener noreferrer">Tilgjengelighetserklæring</a></li>\n `)),i}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 '}shouldHideAccessibilityStatementLink(t){return""===(null==t?void 0:t.toString())||"true"===(null==t?void 0:t.toString())}renderLinkList(){const t=this.shouldHideAccessibilityStatementLink(this.hideaccessibilitystatementlink);this.linkListElement.innerHTML=this.getLinkList(this.language,this.environment,this.accessibilitystatementurl,t)}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=d.default,this.kartverketLogoElement.innerHTML=p.default,this.renderLinkList(),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.renderLinkList(),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}`)}hideaccessibilitystatementlinkChanged(){this.renderLinkList()}accessibilitystatementurlChanged(){this.renderLinkList()}};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.Prop)()],h.prototype,"accessibilitystatementurl",void 0),i([(0,l.Toggle)()],h.prototype,"hideaccessibilitystatementlink",void 0),i([(0,l.Watch)("language")],h.prototype,"languageChanged",null),i([(0,l.Watch)("hideaccessibilitystatementlink")],h.prototype,"hideaccessibilitystatementlinkChanged",null),i([(0,l.Watch)("accessibilitystatementurl")],h.prototype,"accessibilitystatementurlChanged",null),h=i([(0,l.Component)({tag:"geonorge-footer",template:Promise.resolve().then((()=>a(n(4091)))),style:Promise.resolve().then((()=>a(n(3428))))})],h),e.GeonorgeFooter=h}},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(8312)})())); | ||
!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={3428:(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-of-type):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-of-type):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://./stories/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,yDACI,+BAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CE3BR,yBFoBI,yDASQ,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,aG7CD,CH8CC,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-of-type):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", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},4091:(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 </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 d=[].concat(t[c]);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=>{"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," */");return[e].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" role="img" aria-labelledby="GeonorgeLogoTitle"><title id="GeonorgeLogoTitle">Geonorge logo</title><defs><style>.__2Z9mxra__cls-1{fill:#4d4d4f;}.__2Z9mxra__cls-2{fill:#a6a8ab;}.__2Z9mxra__cls-3{fill:#bbbdbf;}.__2Z9mxra__cls-4{fill:#6d6e70;}.__2Z9mxra__cls-5{fill:#929497;}.__2Z9mxra__cls-6{fill:#fe5000;}.__2Z9mxra__cls-7{fill:#404041;}</style></defs><title>Artboard 1</title><polygon class="__2Z9mxra__cls-1 " points="20.9 30.4 20.9 54.5 0 42.4 20.9 30.4"></polygon><polygon class="__2Z9mxra__cls-2 " points="20.9 6.3 20.9 30.4 0 18.3 20.9 6.3"></polygon><polyline class="__2Z9mxra__cls-3 " points="20.9 30.4 41.8 42.4 41.8 18.3 20.9 30.4"></polyline><polyline class="__2Z9mxra__cls-4 " points="20.9 30.4 0 42.4 0 18.3 20.9 30.4"></polyline><polyline class="__2Z9mxra__cls-5 " points="20.9 30.4 20.9 54.5 41.8 42.4 20.9 30.4"></polyline><path class="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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="__2Z9mxra__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" role="img" aria-labelledby="kartverketLogoTitle"><title id="kartverketLogoTitle">Kartverket logo</title><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>'},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>`},8312: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),d=s(n(93)),p=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,n,o){const r=(null==n?void 0:n.length)?n:"https://uustatus.no/nb/erklaringer/publisert/8f3210cf-aa22-4d32-9fda-4460e3c3e05a";let i="";return"en"===t?(i=`\n <li><a href="${(0,c.getGeonorgeUrl)(t,e)}about/what-is-geonorge/">What is Geonorge</a></li>\n `,o||(i+=`\n <li><a href="${r}" target="_blank" rel="noopener noreferrer">Accessibility statement (in Norwegian)</a></li>\n `)):(i=`\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 `,o||(i+=`\n <li><a href="${r}" target="_blank" rel="noopener noreferrer">Tilgjengelighetserklæring</a></li>\n `)),i}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 '}shouldHideAccessibilityStatementLink(t){return""===(null==t?void 0:t.toString())||"true"===(null==t?void 0:t.toString())}renderLinkList(){const t=this.shouldHideAccessibilityStatementLink(this.hideaccessibilitystatementlink);this.linkListElement.innerHTML=this.getLinkList(this.language,this.environment,this.accessibilitystatementurl,t)}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=d.default,this.kartverketLogoElement.innerHTML=p.default,this.renderLinkList(),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.renderLinkList(),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}`)}hideaccessibilitystatementlinkChanged(){this.renderLinkList()}accessibilitystatementurlChanged(){this.renderLinkList()}};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.Prop)()],h.prototype,"accessibilitystatementurl",void 0),i([(0,l.Toggle)()],h.prototype,"hideaccessibilitystatementlink",void 0),i([(0,l.Watch)("language")],h.prototype,"languageChanged",null),i([(0,l.Watch)("hideaccessibilitystatementlink")],h.prototype,"hideaccessibilitystatementlinkChanged",null),i([(0,l.Watch)("accessibilitystatementurl")],h.prototype,"accessibilitystatementurlChanged",null),h=i([(0,l.Component)({tag:"geonorge-footer",template:Promise.resolve().then((()=>a(n(4091)))),style:Promise.resolve().then((()=>a(n(3428))))})],h),e.GeonorgeFooter=h}},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(8312)})())); | ||
//# sourceMappingURL=GeonorgeFooter.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.GnAccordion=t())}(self,(()=>(()=>{"use strict";var e={583:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([e.id,'gn-accordion{font-family:"Open Sans",sans-serif;display:block}',"",{version:3,sources:["webpack://./stories/gn-accordion/gn-accordion.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,aACI,kCCHW,CDIX,aAAA",sourcesContent:['@import "../../style/all";\n\ngn-accordion {\n font-family: $default-font;\n display: block;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const s=a},656:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([e.id,'@keyframes show{0%{opacity:0;margin-top:0px;padding:0 15px 0;line-height:0;max-height:0}100%{opacity:1;margin-top:0px;padding:8px 15px 15px;line-height:inherit;max-height:1000px}}@keyframes hide{100%{opacity:0;margin-top:0px;padding:0 15px 0;line-height:0;max-height:0}0%{opacity:1;margin-top:0px;padding:8px 15px 15px;line-height:inherit;max-height:1000px}}@media(min-width: 37.5em){@keyframes show{0%{opacity:0;margin-top:0px;padding:0 30px 0;line-height:0;max-height:0}100%{opacity:1;margin-top:0px;padding:8px 30px 15px;line-height:inherit;max-height:1000px}}@keyframes hide{100%{opacity:0;margin-top:0px;padding:0 30px 0;line-height:0;max-height:0}0%{opacity:1;margin-top:0px;padding:8px 30px 15px;line-height:inherit;max-height:1000px}}}:host{background-color:#f6f5f4}.panel{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:0;border-radius:0;font-family:"Open Sans",sans-serif;padding:15px 15px;display:flex;align-items:center;position:relative;text-decoration:none;overflow-wrap:break-word;line-height:1.7;cursor:pointer;border:none;width:100%;background:none;text-align:left}@media(min-width: 37.5em){.panel{padding:15px 30px}}.panel:focus-visible{outline-color:#3767c7;outline-style:auto;outline-width:2px;outline-offset:0px}.panel .panelText{font-family:"Raleway",sans-serif;font-weight:bold;font-size:18px;flex:1}.panel .panelChevron{box-sizing:border-box;position:relative;display:block;width:18px;height:18px;border-radius:100px;margin-right:6px}@media(min-width: 37.5em){.panel .panelChevron{margin-right:0}}.panel .panelChevron::after{content:"";display:block;box-sizing:border-box;position:absolute;width:18px;height:18px;border-bottom:2px solid;border-right:2px solid;transform:translateY(-30%) rotate(45deg);transition:transform .3s ease-in-out}.panel .panelChevron.expanded::after{transform:translateY(30%) rotate(225deg)}.content{opacity:0;margin-top:0px;line-height:0;max-height:0;overflow:hidden;padding:0 15px 0}@media(min-width: 37.5em){.content{padding:0 30px 0}}.content.initialized{animation:hide .3s ease-in-out}.content.expanded{animation:show .3s ease-in-out;opacity:1;margin-top:0px;padding:8px 15px 15px;line-height:inherit;max-height:10000px}@media(min-width: 37.5em){.content.expanded{padding:8px 30px 15px}}',"",{version:3,sources:["webpack://./stories/gn-accordion/template.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,gBACI,GACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,KACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CAIR,gBACI,KACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,GACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CClBA,0BDwBJ,gBACI,GACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,KACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CAGR,gBACI,KACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,GACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CAAA,CAKZ,MACI,wBEhES,CFkET,OG1EA,uBH2EwB,CG1ExB,oBH0EwB,CGzExB,eHyEwB,CI3E1B,uBJ4E6B,CI3E7B,eJ2E6B,CACvB,kCK9EO,CL+EP,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,iBAAA,CACA,oBAAA,CACA,wBAAA,CACA,eAAA,CACA,cAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,eAAA,CC5EA,0BD6DJ,OAiBQ,iBAAA,CAAA,CAEJ,qBACI,qBE/EG,CFgFH,kBAAA,CACA,iBAAA,CACA,kBAAA,CAEJ,kBACI,gCKpGE,CLqGF,gBAAA,CACA,cAAA,CACA,MAAA,CAEJ,qBACI,qBAAA,CACA,iBAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,mBAAA,CACA,gBAAA,CCnGJ,0BD4FA,qBASQ,cAAA,CAAA,CAEJ,4BACI,UAAA,CACA,aAAA,CACA,qBAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,uBAAA,CACA,sBAAA,CACA,wCAAA,CACA,oCAAA,CAGA,qCACI,wCAAA,CAKhB,SACI,SAAA,CACA,cAAA,CACA,aAAA,CACA,YAAA,CACA,eAAA,CACA,gBAAA,CChIA,0BD0HJ,SAQQ,gBAAA,CAAA,CAEJ,qBACI,8BAAA,CAGJ,kBACI,8BAAA,CACA,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,kBAAA,CC9IJ,0BDwIA,kBAQQ,qBAAA,CAAA",sourcesContent:['@import "../../style/all";\n\n@keyframes show {\n 0% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 15px 0;\n line-height: 0;\n max-height: 0;\n }\n 100% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 15px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n}\n\n@keyframes hide {\n 100% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 15px 0;\n line-height: 0;\n max-height: 0;\n }\n 0% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 15px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n}\n\n\n@include breakpoint(phablet) {\n @keyframes show {\n 0% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 30px 0;\n line-height: 0;\n max-height: 0;\n }\n 100% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 30px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n }\n @keyframes hide {\n 100% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 30px 0;\n line-height: 0;\n max-height: 0;\n }\n 0% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 30px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n }\n}\n\n:host {\n background-color: $light-gray;\n}\n .panel {\n @include appearance(none);\n @include border-radius(0);\n font-family: $default-font;\n padding: 15px 15px;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n overflow-wrap: break-word;\n line-height: 1.7;\n cursor: pointer;\n border: none;\n width: 100%;\n background: none;\n text-align: left;\n @include breakpoint(phablet) {\n padding: 15px 30px;\n }\n &:focus-visible {\n outline-color: $primary-text;\n outline-style: auto;\n outline-width: 2px;\n outline-offset: 0px;\n }\n .panelText {\n font-family: $header-font;\n font-weight: bold;\n font-size: 18px;\n flex: 1;\n }\n .panelChevron {\n box-sizing: border-box;\n position: relative;\n display: block;\n width: 18px;\n height: 18px;\n border-radius: 100px;\n margin-right: 6px;\n @include breakpoint(phablet) {\n margin-right: 0;\n }\n &::after {\n content: "";\n display: block;\n box-sizing: border-box;\n position: absolute;\n width: 18px;\n height: 18px;\n border-bottom: 2px solid;\n border-right: 2px solid;\n transform: translateY(-30%) rotate(45deg);\n transition: transform 0.3s ease-in-out;\n }\n &.expanded {\n &::after {\n transform: translateY(30%) rotate(225deg);\n }\n }\n }\n }\n .content {\n opacity: 0;\n margin-top: 0px;\n line-height: 0;\n max-height: 0;\n overflow: hidden;\n padding: 0 15px 0;\n @include breakpoint(phablet) {\n padding: 0 30px 0;\n }\n &.initialized {\n animation: hide 0.3s ease-in-out;\n }\n\n &.expanded {\n animation: show 0.3s ease-in-out;\n opacity: 1;\n margin-top: 0px;\n padding: 8px 15px 15px;\n line-height: inherit;\n max-height: 10000px;\n @include breakpoint(phablet) {\n padding: 8px 30px 15px;\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","$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const s=a},6214:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o='<template>\n <button id="panel-button" class="panel" aria-expanded="false">\n <span id="panel-text" class="panelText"></span><span id="panel-chevron" class="panelChevron"></span>\n </button>\n <div id="content" class="content">\n <slot></slot>\n </div>\n</template>\n'},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,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 A=0;A<e.length;A++){var p=[].concat(e[A]);o&&a[p[0]]||(void 0!==r&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=r),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),i&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=i):p[4]="".concat(i)),t.push(p))}},t}},4663:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */");return[t].concat([r]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function s(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const i=n(5969),r=n(5773),a=n(3804);t.Component=e=>t=>{var n;const s=e.tag||a.toKebabCase(t.prototype.constructor.name),d=((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,o=!0){if(t!=n){o&&(this[a.toCamelCase(e)]=n);const i=this.constructor.watchAttributes;if(i&&i[e]){const o=i[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,i.addEventListeners(this),r.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(s)||customElements.define(s,d),d}},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]}),i=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}),i(n(1397),t),i(n(985),t),i(n(265),t),i(n(5969),t),i(n(5773),t),i(n(4271),t),i(n(9766),t),i(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(i){const r=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(r,i))}}}})}},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 i=this.props[t];this.props[t]=o.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,i,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 i=e.props[n]||e.getAttribute(o.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:i})}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}},5527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},3301:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=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,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(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)&&o(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnAccordion=void 0;const d=n(406),A=n(5527),p=s(n(583));let c=class extends d.CustomElement{constructor(){super(),(0,A.addGlobalStylesheet)("gn-accordion-styles",p.default)}toggleExpand(){(0,d.getShadowRootElement)(this,"#content").classList.add("initialized");const e=this.isExpanded(this.expanded);this.setAttribute("expanded",e?"false":"true")}isExpanded(e){return""===(null==e?void 0:e.toString())||"true"===(null==e?void 0:e.toString())}connectedCallback(){(0,d.getShadowRootElement)(this,"#panel-button").onclick=()=>this.toggleExpand(),(0,d.getShadowRootElement)(this,"#panel-text").innerText=this.title}titleChanged(){(0,d.getShadowRootElement)(this,"#panel-text").innerText=this.title}expandedChanged(){const e=this.isExpanded(this.expanded),t=(0,d.getShadowRootElement)(this,"#panel-button"),n=(0,d.getShadowRootElement)(this,"#panel-chevron"),o=(0,d.getShadowRootElement)(this,"#content");e?(t.setAttribute("aria-expanded","true"),n.classList.add("expanded"),o.classList.add("expanded")):(t.setAttribute("aria-expanded","false"),n.classList.remove("expanded"),o.classList.remove("expanded"))}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}};r([(0,d.Prop)()],c.prototype,"title",void 0),r([(0,d.Toggle)()],c.prototype,"expanded",void 0),r([(0,d.Watch)("title")],c.prototype,"titleChanged",null),r([(0,d.Watch)("expanded")],c.prototype,"expandedChanged",null),c=r([(0,d.Component)({tag:"gn-accordion",template:Promise.resolve().then((()=>a(n(6214)))),style:Promise.resolve().then((()=>a(n(656))))})],c),t.GnAccordion=c}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o].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 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(3301)})())); | ||
!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.GnAccordion=t())}(self,(()=>(()=>{"use strict";var e={583:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([e.id,'gn-accordion{font-family:"Open Sans",sans-serif;display:block}',"",{version:3,sources:["webpack://./stories/gn-accordion/gn-accordion.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,aACI,kCCHW,CDIX,aAAA",sourcesContent:['@import "../../style/all";\n\ngn-accordion {\n font-family: $default-font;\n display: block;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const s=a},656:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(4663),i=n.n(o),r=n(7638),a=n.n(r)()(i());a.push([e.id,'@keyframes show{0%{opacity:0;margin-top:0px;padding:0 15px 0;line-height:0;max-height:0}100%{opacity:1;margin-top:0px;padding:8px 15px 15px;line-height:inherit;max-height:1000px}}@keyframes hide{100%{opacity:0;margin-top:0px;padding:0 15px 0;line-height:0;max-height:0}0%{opacity:1;margin-top:0px;padding:8px 15px 15px;line-height:inherit;max-height:1000px}}@media(min-width: 37.5em){@keyframes show{0%{opacity:0;margin-top:0px;padding:0 30px 0;line-height:0;max-height:0}100%{opacity:1;margin-top:0px;padding:8px 30px 15px;line-height:inherit;max-height:1000px}}@keyframes hide{100%{opacity:0;margin-top:0px;padding:0 30px 0;line-height:0;max-height:0}0%{opacity:1;margin-top:0px;padding:8px 30px 15px;line-height:inherit;max-height:1000px}}}:host{background-color:#f6f5f4}.panel{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:0;border-radius:0;font-family:"Open Sans",sans-serif;padding:15px 15px;display:flex;align-items:center;position:relative;text-decoration:none;overflow-wrap:break-word;line-height:1.7;cursor:pointer;border:none;width:100%;background:none;text-align:left}@media(min-width: 37.5em){.panel{padding:15px 30px}}.panel:focus-visible{outline-color:#3767c7;outline-style:auto;outline-width:2px;outline-offset:0px}.panel .panelText{font-family:"Raleway",sans-serif;font-weight:bold;font-size:18px;flex:1}.panel .panelChevron{box-sizing:border-box;position:relative;display:block;width:18px;height:18px;border-radius:100px;margin-right:6px}@media(min-width: 37.5em){.panel .panelChevron{margin-right:0}}.panel .panelChevron::after{content:"";display:block;box-sizing:border-box;position:absolute;width:18px;height:18px;border-bottom:2px solid;border-right:2px solid;transform:translateY(-30%) rotate(45deg);transition:transform .3s ease-in-out}.panel .panelChevron.expanded::after{transform:translateY(30%) rotate(225deg)}.content{opacity:0;margin-top:0px;line-height:0;max-height:0;overflow:hidden;padding:0 15px 0}@media(min-width: 37.5em){.content{padding:0 30px 0}}.content.initialized{animation:hide .3s ease-in-out}.content.expanded{animation:show .3s ease-in-out;opacity:1;margin-top:0px;padding:8px 15px 15px;line-height:inherit;max-height:10000px}@media(min-width: 37.5em){.content.expanded{padding:8px 30px 15px}}',"",{version:3,sources:["webpack://./stories/gn-accordion/template.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,gBACI,GACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,KACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CAIR,gBACI,KACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,GACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CClBA,0BDwBJ,gBACI,GACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,KACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CAGR,gBACI,KACI,SAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,YAAA,CAEJ,GACI,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,iBAAA,CAAA,CAAA,CAKZ,MACI,wBEhES,CFkET,OG1EA,uBH2EwB,CG1ExB,oBH0EwB,CGzExB,eHyEwB,CI3E1B,uBJ4E6B,CI3E7B,eJ2E6B,CACvB,kCK9EO,CL+EP,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,iBAAA,CACA,oBAAA,CACA,wBAAA,CACA,eAAA,CACA,cAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,eAAA,CC5EA,0BD6DJ,OAiBQ,iBAAA,CAAA,CAEJ,qBACI,qBE/EG,CFgFH,kBAAA,CACA,iBAAA,CACA,kBAAA,CAEJ,kBACI,gCKpGE,CLqGF,gBAAA,CACA,cAAA,CACA,MAAA,CAEJ,qBACI,qBAAA,CACA,iBAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,mBAAA,CACA,gBAAA,CCnGJ,0BD4FA,qBASQ,cAAA,CAAA,CAEJ,4BACI,UAAA,CACA,aAAA,CACA,qBAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,uBAAA,CACA,sBAAA,CACA,wCAAA,CACA,oCAAA,CAGA,qCACI,wCAAA,CAKhB,SACI,SAAA,CACA,cAAA,CACA,aAAA,CACA,YAAA,CACA,eAAA,CACA,gBAAA,CChIA,0BD0HJ,SAQQ,gBAAA,CAAA,CAEJ,qBACI,8BAAA,CAGJ,kBACI,8BAAA,CACA,SAAA,CACA,cAAA,CACA,qBAAA,CACA,mBAAA,CACA,kBAAA,CC9IJ,0BDwIA,kBAQQ,qBAAA,CAAA",sourcesContent:['@import "../../style/all";\n\n@keyframes show {\n 0% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 15px 0;\n line-height: 0;\n max-height: 0;\n }\n 100% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 15px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n}\n\n@keyframes hide {\n 100% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 15px 0;\n line-height: 0;\n max-height: 0;\n }\n 0% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 15px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n}\n\n\n@include breakpoint(phablet) {\n @keyframes show {\n 0% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 30px 0;\n line-height: 0;\n max-height: 0;\n }\n 100% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 30px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n }\n @keyframes hide {\n 100% {\n opacity: 0;\n margin-top: 0px;\n padding: 0 30px 0;\n line-height: 0;\n max-height: 0;\n }\n 0% {\n opacity: 1;\n margin-top: 0px;\n padding: 8px 30px 15px;\n line-height: inherit;\n max-height: 1000px;\n }\n }\n}\n\n:host {\n background-color: $light-gray;\n}\n .panel {\n @include appearance(none);\n @include border-radius(0);\n font-family: $default-font;\n padding: 15px 15px;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n overflow-wrap: break-word;\n line-height: 1.7;\n cursor: pointer;\n border: none;\n width: 100%;\n background: none;\n text-align: left;\n @include breakpoint(phablet) {\n padding: 15px 30px;\n }\n &:focus-visible {\n outline-color: $primary-text;\n outline-style: auto;\n outline-width: 2px;\n outline-offset: 0px;\n }\n .panelText {\n font-family: $header-font;\n font-weight: bold;\n font-size: 18px;\n flex: 1;\n }\n .panelChevron {\n box-sizing: border-box;\n position: relative;\n display: block;\n width: 18px;\n height: 18px;\n border-radius: 100px;\n margin-right: 6px;\n @include breakpoint(phablet) {\n margin-right: 0;\n }\n &::after {\n content: "";\n display: block;\n box-sizing: border-box;\n position: absolute;\n width: 18px;\n height: 18px;\n border-bottom: 2px solid;\n border-right: 2px solid;\n transform: translateY(-30%) rotate(45deg);\n transition: transform 0.3s ease-in-out;\n }\n &.expanded {\n &::after {\n transform: translateY(30%) rotate(225deg);\n }\n }\n }\n }\n .content {\n opacity: 0;\n margin-top: 0px;\n line-height: 0;\n max-height: 0;\n overflow: hidden;\n padding: 0 15px 0;\n @include breakpoint(phablet) {\n padding: 0 30px 0;\n }\n &.initialized {\n animation: hide 0.3s ease-in-out;\n }\n\n &.expanded {\n animation: show 0.3s ease-in-out;\n opacity: 1;\n margin-top: 0px;\n padding: 8px 15px 15px;\n line-height: inherit;\n max-height: 10000px;\n @include breakpoint(phablet) {\n padding: 8px 30px 15px;\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","$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const s=a},6214:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o='<template>\n <button id="panel-button" class="panel" aria-expanded="false">\n <span id="panel-text" class="panelText"></span><span id="panel-chevron" class="panelChevron"></span>\n </button>\n <div id="content" class="content">\n <slot></slot>\n </div>\n</template>\n'},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,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 A=0;A<e.length;A++){var p=[].concat(e[A]);o&&a[p[0]]||(void 0!==r&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=r),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),i&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=i):p[4]="".concat(i)),t.push(p))}},t}},4663:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */");return[t].concat([r]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{d(o.next(e))}catch(e){r(e)}}function s(e){try{d(o.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const i=n(5969),r=n(5773),a=n(3804);t.Component=e=>t=>{var n;const s=e.tag||a.toKebabCase(t.prototype.constructor.name),d=((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,o=!0){if(t!=n){o&&(this[a.toCamelCase(e)]=n);const i=this.constructor.watchAttributes;if(i&&i[e]){const o=i[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,i.addEventListeners(this),r.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(s)||customElements.define(s,d),d}},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]}),i=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}),i(n(1397),t),i(n(985),t),i(n(265),t),i(n(5969),t),i(n(5773),t),i(n(4271),t),i(n(9766),t),i(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(i){const r=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(r,i))}}}})}},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 i=this.props[t];this.props[t]=o.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,i,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 i=e.props[n]||e.getAttribute(o.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:i})}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}},5527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},3301:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=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,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(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)&&o(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnAccordion=void 0;const d=n(406),A=n(5527),p=s(n(583));let c=class extends d.CustomElement{constructor(){super(),(0,A.addGlobalStylesheet)("gn-accordion-styles",p.default)}toggleExpand(){(0,d.getShadowRootElement)(this,"#content").classList.add("initialized");const e=this.isExpanded(this.expanded);this.setAttribute("expanded",e?"false":"true")}isExpanded(e){return""===(null==e?void 0:e.toString())||"true"===(null==e?void 0:e.toString())}connectedCallback(){(0,d.getShadowRootElement)(this,"#panel-button").onclick=()=>this.toggleExpand(),(0,d.getShadowRootElement)(this,"#panel-text").innerText=this.title}titleChanged(){(0,d.getShadowRootElement)(this,"#panel-text").innerText=this.title}expandedChanged(){const e=this.isExpanded(this.expanded),t=(0,d.getShadowRootElement)(this,"#panel-button"),n=(0,d.getShadowRootElement)(this,"#panel-chevron"),o=(0,d.getShadowRootElement)(this,"#content");e?(t.setAttribute("aria-expanded","true"),n.classList.add("expanded"),o.classList.add("expanded")):(t.setAttribute("aria-expanded","false"),n.classList.remove("expanded"),o.classList.remove("expanded"))}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}};r([(0,d.Prop)()],c.prototype,"title",void 0),r([(0,d.Toggle)()],c.prototype,"expanded",void 0),r([(0,d.Watch)("title")],c.prototype,"titleChanged",null),r([(0,d.Watch)("expanded")],c.prototype,"expandedChanged",null),c=r([(0,d.Component)({tag:"gn-accordion",template:Promise.resolve().then((()=>a(n(6214)))),style:Promise.resolve().then((()=>a(n(656))))})],c),t.GnAccordion=c}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o].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 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(3301)})())); | ||
//# sourceMappingURL=GnAccordion.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.GnButton=n())}(self,(()=>(()=>{"use strict";var t={4594:(t,n,o)=>{o.r(n),o.d(n,{default:()=>s});var e=o(4663),r=o.n(e),i=o(7638),a=o.n(i)()(r());a.push([t.id,'gn-button button,gn-button a{-moz-transition:all .35s linear 0s;-o-transition:all .35s linear 0s;-webkit-transition:all .35s linear 0s;transition:all .35s linear 0s;-webkit-border-radius:4px;border-radius:4px;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);cursor:pointer;display:inline-block;height:34px;line-height:16pt;text-decoration:none;background-position:50%;padding:5px 8px;box-sizing:border-box}gn-button button:hover,gn-button a:hover{background-color:#fe5000}gn-button button:disabled,gn-button a:disabled{background-color:#eee;color:#d8d8d8;border:1px solid #d8d8d8;cursor:not-allowed}gn-button button:disabled:hover,gn-button button:disabled:focus,gn-button a:disabled:hover,gn-button a:disabled:focus{background-color:#eee}gn-button[color=default] button:not(:disabled),gn-button[color=default] a:not(:disabled),gn-button[color=""] button:not(:disabled),gn-button[color=""] a:not(:disabled),gn-button:not([color]) button:not(:disabled),gn-button:not([color]) a:not(:disabled){background-color:#eee;color:#2f3940;border-color:#d8d8d8}gn-button[color=default] button:not(:disabled):hover,gn-button[color=default] button:not(:disabled):focus,gn-button[color=default] a:not(:disabled):hover,gn-button[color=default] a:not(:disabled):focus,gn-button[color=""] button:not(:disabled):hover,gn-button[color=""] button:not(:disabled):focus,gn-button[color=""] a:not(:disabled):hover,gn-button[color=""] a:not(:disabled):focus,gn-button:not([color]) button:not(:disabled):hover,gn-button:not([color]) button:not(:disabled):focus,gn-button:not([color]) a:not(:disabled):hover,gn-button:not([color]) a:not(:disabled):focus{background-color:#ddd}gn-button[color=primary] button:not(:disabled),gn-button[color=primary] a:not(:disabled){background-color:#4c7aa9;color:#fff}gn-button[color=primary] button:not(:disabled):hover,gn-button[color=primary] button:not(:disabled):focus,gn-button[color=primary] a:not(:disabled):hover,gn-button[color=primary] a:not(:disabled):focus{background-color:#fe5000}gn-button[color=success] button:not(:disabled),gn-button[color=success] a:not(:disabled){background-color:#06a755;color:#fff}gn-button[color=success] button:not(:disabled):hover,gn-button[color=success] button:not(:disabled):focus,gn-button[color=success] a:not(:disabled):hover,gn-button[color=success] a:not(:disabled):focus{background-color:#009745}gn-button[color=warning] button:not(:disabled),gn-button[color=warning] a:not(:disabled){background-color:#c38621;color:#fff}gn-button[color=warning] button:not(:disabled):hover,gn-button[color=warning] button:not(:disabled):focus,gn-button[color=warning] a:not(:disabled):hover,gn-button[color=warning] a:not(:disabled):focus{background-color:#b37611}gn-button[color=danger] button:not(:disabled),gn-button[color=danger] a:not(:disabled){background-color:#e00d0d;color:#fff}gn-button[color=danger] button:not(:disabled):hover,gn-button[color=danger] button:not(:disabled):focus,gn-button[color=danger] a:not(:disabled):hover,gn-button[color=danger] a:not(:disabled):focus{background-color:#d00000}',"",{version:3,sources:["webpack://./stories/gn-button/gn-button.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAGI,6BCFA,kCDII,CCHJ,gCDGI,CCFJ,qCDEI,CCDJ,6BDCI,CEJN,yBFK6B,CEJ7B,iBFI6B,CACvB,kCGPO,CHQP,eAAA,CACA,cAAA,CACA,iBAAA,CACA,iBAAA,CACA,qBAAA,CACA,8BAAA,CACA,cAAA,CACA,oBAAA,CACA,WAAA,CACA,gBAAA,CACA,oBAAA,CACA,uBAAA,CACA,eAAA,CACA,qBAAA,CACA,yCACI,wBIZI,CJcR,+CACI,qBIOU,CJNV,aIOI,CJNJ,wBAAA,CACA,kBAAA,CACA,sHAEI,qBICM,CJSV,6PACI,qBItCK,CJuCL,aIrCF,CJsCE,oBI1CC,CJ2CD,kkBAEI,qBI1CO,CJkDf,yFACI,wBI3CK,CJ4CL,UAAA,CACA,0MAEI,wBI9CO,CJsDf,yFACI,wBIlDK,CJmDL,UAAA,CACA,0MAEI,wBIrDO,CJ6Df,yFACI,wBI1DK,CJ2DL,UAAA,CACA,0MAEI,wBI7DO,CJqEf,uFACI,wBInEI,CJoEJ,UAAA,CACA,sMAEI,wBItEM",sourcesContent:['@import "../../style/all";\n\ngn-button {\n button,\n a {\n @include transition(all 0.35s linear 0s);\n @include border-radius(4px);\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 cursor: pointer;\n display: inline-block;\n height: 34px;\n line-height: 16pt;\n text-decoration: none;\n background-position: 50%;\n padding: 5px 8px;\n box-sizing: border-box;\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 }\n\n &[color="default"],\n &[color=""],\n &:not([color]) {\n button,\n a {\n &: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 }\n }\n &[color="primary"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $primary-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $primary-background-hover;\n }\n }\n }\n }\n &[color="success"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $success-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $success-background-hover;\n }\n }\n }\n }\n &[color="warning"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $warning-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $warning-background-hover;\n }\n }\n }\n }\n &[color="danger"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $danger-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $danger-background-hover;\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 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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},8874:(t,n,o)=>{o.r(n),o.d(n,{default:()=>e});const e="<template>\n <slot></slot>\n</template>\n"},7638:t=>{t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var o="",e=void 0!==n[5];return n[4]&&(o+="@supports (".concat(n[4],") {")),n[2]&&(o+="@media ".concat(n[2]," {")),e&&(o+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),o+=t(n),e&&(o+="}"),n[2]&&(o+="}"),n[4]&&(o+="}"),o})).join("")},n.i=function(t,o,e,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(e)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var d=0;d<t.length;d++){var u=[].concat(t[d]);e&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),n.push(u))}},n}},4663:t=>{t.exports=function(t){var n=t[1],o=t[3];if(!o)return n;if("function"==typeof btoa){var e=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e),i="/*# ".concat(r," */");return[n].concat([i]).join("\n")}return[n].join("\n")}},1397:function(t,n,o){var e=this&&this.__awaiter||function(t,n,o,e){return new(o||(o=Promise))((function(r,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function s(t){try{c(e.throw(t))}catch(t){i(t)}}function c(t){var n;t.done?r(t.value):(n=t.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,s)}c((e=e.apply(t,n||[])).next())}))};Object.defineProperty(n,"__esModule",{value:!0}),n.Component=void 0;const r=o(5969),i=o(5773),a=o(3804);n.Component=t=>n=>{var o;const s=t.tag||a.toKebabCase(n.prototype.constructor.name),c=((o=class extends n{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,n,o){this.onAttributeChange(t,n,o)}onAttributeChange(t,n,o,e=!0){if(n!=o){e&&(this[a.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const e=r[t];this.__connected&&"function"==typeof this[e]&&this[e]({old:n,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return e(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 e(this,void 0,void 0,(function*(){if(this.__connected)return;const n=document.createElement("template");n.innerHTML=yield this.getStyle(),t.template instanceof Promise?n.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(n.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(n.content.cloneNode(!0))}))}getExternalTemplate(){return e(this,void 0,void 0,(function*(){const n=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(n);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return e(this,void 0,void 0,(function*(){let n;return t.style instanceof Promise?n=(yield t.style).default.toString():"string"==typeof t.style&&(n=t.style),n?`<style>${n}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,n)=>t(!0))),o);return customElements.get(s)||customElements.define(s,c),c}},985:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}n.CustomElement=o},265:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getShadowRootElement=n.getElement=void 0,n.getElement=t=>document.querySelector(t),n.getShadowRootElement=(t,n)=>t.shadowRoot.querySelector(n)},406:function(t,n,o){var e=this&&this.__createBinding||(Object.create?function(t,n,o,e){void 0===e&&(e=o),Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[o]}})}:function(t,n,o,e){void 0===e&&(e=o),t[e]=n[o]}),r=this&&this.__exportStar||function(t,n){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||e(n,t,o)};Object.defineProperty(n,"__esModule",{value:!0}),r(o(1397),n),r(o(985),n),r(o(265),n),r(o(5969),n),r(o(5773),n),r(o(4271),n),r(o(9766),n),r(o(4938),n)},5969:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Dispatch=n.addEventListeners=n.Listen=void 0;const e=o(3804);n.Listen=(t,n)=>(o,e)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:n,eventName:t,handler:o[e]})},n.addEventListeners=t=>{if(t.constructor.listeners){const n=t.shadowRoot||t;for(const o of t.constructor.listeners){const e=o.selector?n.querySelector(o.selector)?n.querySelector(o.selector):null:t;e&&e.addEventListener(o.eventName,(n=>{o.handler.call(t,n)}))}}},n.Dispatch=t=>(n,o)=>{Object.defineProperty(n,o,{get:function(){const n=this;return{emit(r){const i=t||e.toDotCase(o);n.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.initializeProps=n.Prop=void 0;const e=o(3804);n.Prop=()=>(t,n)=>{const o=e.toKebabCase(n);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[n]=null,Object.defineProperty(t,n,{get:function(){return this.props[n]?this.props[n]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[n];this.props[n]=e.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(e.toKebabCase(n))||(this.constructor.propsInit[n]=t)}})},n.initializeProps=t=>{const n=t.constructor.watchAttributes;for(let o of(t=>{const n=t.constructor.watchAttributes,o=Object.assign({},n);Object.keys(o).forEach((t=>o[t]=""));const e=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(e)})(t)){if(n)if(null==n[e.toKebabCase(o)])n[e.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(e.toKebabCase(o));"function"==typeof t[n[o]]&&t[n[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(e.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},4271:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Toggle=void 0;const e=o(3804);n.Toggle=()=>(t,n)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[n]=null,Object.defineProperty(t,n,{get:function(){return(t=>{if(this.hasAttribute(t)){const n=this.getAttribute(t);return!!/^(true|false|^$)$/.test(n)&&("true"==n||""==n)}return!1})(n)},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 '${n}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${n}' to '${t}'`}this.__connected?(this.props[n]=t||!1,""!==o&&null!==o?this.setAttribute(n,t):t?this.setAttribute(n,""):this.removeAttribute(n)):this.hasAttribute(e.toKebabCase(n))||(this.constructor.propsInit[n]=t)}})}},9766:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0})},3804:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryParseInt=n.toDotCase=n.toCamelCase=n.toKebabCase=void 0,n.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),n.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),n.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Watch=void 0;const e=o(3804);n.Watch=t=>(n,o)=>{n.constructor.watchAttributes||(n.constructor.watchAttributes={}),n.constructor.watchAttributes[e.toKebabCase(t)]=o,n.constructor.propsInit||(n.constructor.propsInit={}),n.constructor.propsInit[t]=null}},5527:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addGlobalStylesheet=n.getFocusableElementsInsideElement=void 0,n.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),n.addGlobalStylesheet=(t,n)=>{const o=document.createElement("style");o.setAttribute("id",t),o.textContent=n,document.getElementById(t)||document.head.appendChild(o)}},4541:function(t,n,o){var e=this&&this.__createBinding||(Object.create?function(t,n,o,e){void 0===e&&(e=o);var r=Object.getOwnPropertyDescriptor(n,o);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(t,e,r)}:function(t,n,o,e){void 0===e&&(e=o),t[e]=n[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__decorate||function(t,n,o,e){var r,i=arguments.length,a=i<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,n,o,e);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(n,o,a):r(n,o))||a);return i>3&&a&&Object.defineProperty(n,o,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&e(n,t,o);return r(n,t),n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.GnButton=void 0;const c=o(406),d=o(5527),u=s(o(4594));let l=class extends c.CustomElement{constructor(){super(),(0,d.addGlobalStylesheet)("gn-button-styles",u.default)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}};i([(0,c.Prop)()],l.prototype,"color",void 0),l=i([(0,c.Component)({tag:"gn-button",template:Promise.resolve().then((()=>a(o(8874))))})],l),n.GnButton=l}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.exports}return o.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},o.d=(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(4541)})())); | ||
!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.GnButton=n())}(self,(()=>(()=>{"use strict";var t={4594:(t,n,o)=>{o.r(n),o.d(n,{default:()=>s});var e=o(4663),r=o.n(e),i=o(7638),a=o.n(i)()(r());a.push([t.id,'gn-button button,gn-button a{-moz-transition:all .35s linear 0s;-o-transition:all .35s linear 0s;-webkit-transition:all .35s linear 0s;transition:all .35s linear 0s;-webkit-border-radius:4px;border-radius:4px;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);cursor:pointer;display:inline-block;height:34px;line-height:16pt;text-decoration:none;background-position:50%;padding:5px 8px;box-sizing:border-box}gn-button button:hover,gn-button a:hover{background-color:#fe5000}gn-button button:disabled,gn-button a:disabled{background-color:#eee;color:#d8d8d8;border:1px solid #d8d8d8;cursor:not-allowed}gn-button button:disabled:hover,gn-button button:disabled:focus,gn-button a:disabled:hover,gn-button a:disabled:focus{background-color:#eee}gn-button[color=default] button:not(:disabled),gn-button[color=default] a:not(:disabled),gn-button[color=""] button:not(:disabled),gn-button[color=""] a:not(:disabled),gn-button:not([color]) button:not(:disabled),gn-button:not([color]) a:not(:disabled){background-color:#eee;color:#2f3940;border-color:#d8d8d8}gn-button[color=default] button:not(:disabled):hover,gn-button[color=default] button:not(:disabled):focus,gn-button[color=default] a:not(:disabled):hover,gn-button[color=default] a:not(:disabled):focus,gn-button[color=""] button:not(:disabled):hover,gn-button[color=""] button:not(:disabled):focus,gn-button[color=""] a:not(:disabled):hover,gn-button[color=""] a:not(:disabled):focus,gn-button:not([color]) button:not(:disabled):hover,gn-button:not([color]) button:not(:disabled):focus,gn-button:not([color]) a:not(:disabled):hover,gn-button:not([color]) a:not(:disabled):focus{background-color:#ddd}gn-button[color=primary] button:not(:disabled),gn-button[color=primary] a:not(:disabled){background-color:#4c7aa9;color:#fff}gn-button[color=primary] button:not(:disabled):hover,gn-button[color=primary] button:not(:disabled):focus,gn-button[color=primary] a:not(:disabled):hover,gn-button[color=primary] a:not(:disabled):focus{background-color:#fe5000}gn-button[color=success] button:not(:disabled),gn-button[color=success] a:not(:disabled){background-color:#06a755;color:#fff}gn-button[color=success] button:not(:disabled):hover,gn-button[color=success] button:not(:disabled):focus,gn-button[color=success] a:not(:disabled):hover,gn-button[color=success] a:not(:disabled):focus{background-color:#009745}gn-button[color=warning] button:not(:disabled),gn-button[color=warning] a:not(:disabled){background-color:#c38621;color:#fff}gn-button[color=warning] button:not(:disabled):hover,gn-button[color=warning] button:not(:disabled):focus,gn-button[color=warning] a:not(:disabled):hover,gn-button[color=warning] a:not(:disabled):focus{background-color:#b37611}gn-button[color=danger] button:not(:disabled),gn-button[color=danger] a:not(:disabled){background-color:#e00d0d;color:#fff}gn-button[color=danger] button:not(:disabled):hover,gn-button[color=danger] button:not(:disabled):focus,gn-button[color=danger] a:not(:disabled):hover,gn-button[color=danger] a:not(:disabled):focus{background-color:#d00000}',"",{version:3,sources:["webpack://./stories/gn-button/gn-button.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAGI,6BCFA,kCDII,CCHJ,gCDGI,CCFJ,qCDEI,CCDJ,6BDCI,CEJN,yBFK6B,CEJ7B,iBFI6B,CACvB,kCGPO,CHQP,eAAA,CACA,cAAA,CACA,iBAAA,CACA,iBAAA,CACA,qBAAA,CACA,8BAAA,CACA,cAAA,CACA,oBAAA,CACA,WAAA,CACA,gBAAA,CACA,oBAAA,CACA,uBAAA,CACA,eAAA,CACA,qBAAA,CACA,yCACI,wBIZI,CJcR,+CACI,qBIOU,CJNV,aIOI,CJNJ,wBAAA,CACA,kBAAA,CACA,sHAEI,qBICM,CJSV,6PACI,qBItCK,CJuCL,aIrCF,CJsCE,oBI1CC,CJ2CD,kkBAEI,qBI1CO,CJkDf,yFACI,wBI3CK,CJ4CL,UAAA,CACA,0MAEI,wBI9CO,CJsDf,yFACI,wBIlDK,CJmDL,UAAA,CACA,0MAEI,wBIrDO,CJ6Df,yFACI,wBI1DK,CJ2DL,UAAA,CACA,0MAEI,wBI7DO,CJqEf,uFACI,wBInEI,CJoEJ,UAAA,CACA,sMAEI,wBItEM",sourcesContent:['@import "../../style/all";\n\ngn-button {\n button,\n a {\n @include transition(all 0.35s linear 0s);\n @include border-radius(4px);\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 cursor: pointer;\n display: inline-block;\n height: 34px;\n line-height: 16pt;\n text-decoration: none;\n background-position: 50%;\n padding: 5px 8px;\n box-sizing: border-box;\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 }\n\n &[color="default"],\n &[color=""],\n &:not([color]) {\n button,\n a {\n &: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 }\n }\n &[color="primary"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $primary-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $primary-background-hover;\n }\n }\n }\n }\n &[color="success"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $success-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $success-background-hover;\n }\n }\n }\n }\n &[color="warning"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $warning-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $warning-background-hover;\n }\n }\n }\n }\n &[color="danger"] {\n button,\n a {\n &:not(:disabled) {\n background-color: $danger-background;\n color: #fff;\n &:hover,\n &:focus {\n background-color: $danger-background-hover;\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 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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},8874:(t,n,o)=>{o.r(n),o.d(n,{default:()=>e});const e="<template>\n <slot></slot>\n</template>\n"},7638:t=>{t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var o="",e=void 0!==n[5];return n[4]&&(o+="@supports (".concat(n[4],") {")),n[2]&&(o+="@media ".concat(n[2]," {")),e&&(o+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),o+=t(n),e&&(o+="}"),n[2]&&(o+="}"),n[4]&&(o+="}"),o})).join("")},n.i=function(t,o,e,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(e)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var d=0;d<t.length;d++){var u=[].concat(t[d]);e&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),n.push(u))}},n}},4663:t=>{t.exports=function(t){var n=t[1],o=t[3];if(!o)return n;if("function"==typeof btoa){var e=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e),i="/*# ".concat(r," */");return[n].concat([i]).join("\n")}return[n].join("\n")}},1397:function(t,n,o){var e=this&&this.__awaiter||function(t,n,o,e){return new(o||(o=Promise))((function(r,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function s(t){try{c(e.throw(t))}catch(t){i(t)}}function c(t){var n;t.done?r(t.value):(n=t.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,s)}c((e=e.apply(t,n||[])).next())}))};Object.defineProperty(n,"__esModule",{value:!0}),n.Component=void 0;const r=o(5969),i=o(5773),a=o(3804);n.Component=t=>n=>{var o;const s=t.tag||a.toKebabCase(n.prototype.constructor.name),c=((o=class extends n{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,n,o){this.onAttributeChange(t,n,o)}onAttributeChange(t,n,o,e=!0){if(n!=o){e&&(this[a.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const e=r[t];this.__connected&&"function"==typeof this[e]&&this[e]({old:n,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return e(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 e(this,void 0,void 0,(function*(){if(this.__connected)return;const n=document.createElement("template");n.innerHTML=yield this.getStyle(),t.template instanceof Promise?n.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(n.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(n.content.cloneNode(!0))}))}getExternalTemplate(){return e(this,void 0,void 0,(function*(){const n=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(n);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return e(this,void 0,void 0,(function*(){let n;return t.style instanceof Promise?n=(yield t.style).default.toString():"string"==typeof t.style&&(n=t.style),n?`<style>${n}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,n)=>t(!0))),o);return customElements.get(s)||customElements.define(s,c),c}},985:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}n.CustomElement=o},265:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getShadowRootElement=n.getElement=void 0,n.getElement=t=>document.querySelector(t),n.getShadowRootElement=(t,n)=>t.shadowRoot.querySelector(n)},406:function(t,n,o){var e=this&&this.__createBinding||(Object.create?function(t,n,o,e){void 0===e&&(e=o),Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[o]}})}:function(t,n,o,e){void 0===e&&(e=o),t[e]=n[o]}),r=this&&this.__exportStar||function(t,n){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||e(n,t,o)};Object.defineProperty(n,"__esModule",{value:!0}),r(o(1397),n),r(o(985),n),r(o(265),n),r(o(5969),n),r(o(5773),n),r(o(4271),n),r(o(9766),n),r(o(4938),n)},5969:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Dispatch=n.addEventListeners=n.Listen=void 0;const e=o(3804);n.Listen=(t,n)=>(o,e)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:n,eventName:t,handler:o[e]})},n.addEventListeners=t=>{if(t.constructor.listeners){const n=t.shadowRoot||t;for(const o of t.constructor.listeners){const e=o.selector?n.querySelector(o.selector)?n.querySelector(o.selector):null:t;e&&e.addEventListener(o.eventName,(n=>{o.handler.call(t,n)}))}}},n.Dispatch=t=>(n,o)=>{Object.defineProperty(n,o,{get:function(){const n=this;return{emit(r){const i=t||e.toDotCase(o);n.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.initializeProps=n.Prop=void 0;const e=o(3804);n.Prop=()=>(t,n)=>{const o=e.toKebabCase(n);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[n]=null,Object.defineProperty(t,n,{get:function(){return this.props[n]?this.props[n]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[n];this.props[n]=e.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(e.toKebabCase(n))||(this.constructor.propsInit[n]=t)}})},n.initializeProps=t=>{const n=t.constructor.watchAttributes;for(let o of(t=>{const n=t.constructor.watchAttributes,o=Object.assign({},n);Object.keys(o).forEach((t=>o[t]=""));const e=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(e)})(t)){if(n)if(null==n[e.toKebabCase(o)])n[e.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(e.toKebabCase(o));"function"==typeof t[n[o]]&&t[n[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(e.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},4271:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Toggle=void 0;const e=o(3804);n.Toggle=()=>(t,n)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[n]=null,Object.defineProperty(t,n,{get:function(){return(t=>{if(this.hasAttribute(t)){const n=this.getAttribute(t);return!!/^(true|false|^$)$/.test(n)&&("true"==n||""==n)}return!1})(n)},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 '${n}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${n}' to '${t}'`}this.__connected?(this.props[n]=t||!1,""!==o&&null!==o?this.setAttribute(n,t):t?this.setAttribute(n,""):this.removeAttribute(n)):this.hasAttribute(e.toKebabCase(n))||(this.constructor.propsInit[n]=t)}})}},9766:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0})},3804:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryParseInt=n.toDotCase=n.toCamelCase=n.toKebabCase=void 0,n.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),n.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),n.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Watch=void 0;const e=o(3804);n.Watch=t=>(n,o)=>{n.constructor.watchAttributes||(n.constructor.watchAttributes={}),n.constructor.watchAttributes[e.toKebabCase(t)]=o,n.constructor.propsInit||(n.constructor.propsInit={}),n.constructor.propsInit[t]=null}},5527:(t,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addGlobalStylesheet=n.getFocusableElementsInsideElement=void 0,n.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),n.addGlobalStylesheet=(t,n)=>{const o=document.createElement("style");o.setAttribute("id",t),o.textContent=n,document.getElementById(t)||document.head.appendChild(o)}},4541:function(t,n,o){var e=this&&this.__createBinding||(Object.create?function(t,n,o,e){void 0===e&&(e=o);var r=Object.getOwnPropertyDescriptor(n,o);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(t,e,r)}:function(t,n,o,e){void 0===e&&(e=o),t[e]=n[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__decorate||function(t,n,o,e){var r,i=arguments.length,a=i<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,n,o,e);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(n,o,a):r(n,o))||a);return i>3&&a&&Object.defineProperty(n,o,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&e(n,t,o);return r(n,t),n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.GnButton=void 0;const c=o(406),d=o(5527),u=s(o(4594));let l=class extends c.CustomElement{constructor(){super(),(0,d.addGlobalStylesheet)("gn-button-styles",u.default)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}};i([(0,c.Prop)()],l.prototype,"color",void 0),l=i([(0,c.Component)({tag:"gn-button",template:Promise.resolve().then((()=>a(o(8874))))})],l),n.GnButton=l}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.exports}return o.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},o.d=(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(4541)})())); | ||
//# sourceMappingURL=GnButton.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.GnInput=t())}(self,(()=>(()=>{"use strict";var e={2103:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var o=n(4663),r=n.n(o),i=n(7638),s=n.n(i)()(r());s.push([e.id,'gn-input{background-color:#fff;margin-bottom:10px}gn-input input{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:0 8px;height:34px;border:1px solid #cfcfcf;box-shadow:none;position:relative;z-index:1}gn-input input:disabled{background-color:#eee}gn-input[block]{display:block}gn-input:not([block]){display:inline-block}gn-input[fullwidth]{display:block}gn-input[fullwidth] input{width:100%}',"",{version:3,sources:["webpack://./stories/gn-input/gn-input.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,SACI,qBAAA,CACA,kBAAA,CACA,eCJA,uBDKwB,CCJxB,oBDIwB,CCHxB,eDGwB,CEL1B,yBFM6B,CEL7B,iBFK6B,CACvB,kCGRO,CHSP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,aAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,wBACI,qBIaU,CJVlB,gBACI,aAAA,CAEJ,sBACI,oBAAA,CAEJ,oBACI,aAAA,CACA,0BACI,UAAA",sourcesContent:['@import "../../style/all";\n\ngn-input {\n background-color: #fff;\n margin-bottom: 10px;\n input {\n @include appearance(none);\n @include border-radius(4px);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 0 8px;\n height: 34px;\n border: 1px solid #cfcfcf;\n box-shadow: none;\n position: relative;\n z-index: 1;\n &:disabled {\n background-color: $disabled-background;\n }\n }\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n }\n &[fullwidth] {\n display: block;\n input {\n width: 100%;\n }\n }\n}\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=s},2509:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);o&&s[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)),t.push(d))}},t}},4663:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{c(o.next(e))}catch(e){i(e)}}function a(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),i=n(5773),s=n(3804);t.Component=e=>t=>{var n;const a=e.tag||s.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=>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),i.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(a)||customElements.define(a,c),c}},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 i=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(i,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}},5527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},1106:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}: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}),i=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<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 a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>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},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnInput=void 0;const c=n(406),u=n(5527),d=a(n(2103));let l=class extends c.CustomElement{constructor(){super(),(0,u.addGlobalStylesheet)("gn-input-styles",d.default)}setup(e){}};i([(0,c.Toggle)()],l.prototype,"block",void 0),i([(0,c.Toggle)()],l.prototype,"fullwidth",void 0),l=i([(0,c.Component)({tag:"gn-input",template:Promise.resolve().then((()=>s(n(2509))))})],l),t.GnInput=l}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.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(1106)})())); | ||
!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.GnInput=t())}(self,(()=>(()=>{"use strict";var e={2103:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,'gn-input{background-color:#fff}gn-input input{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:0 8px;height:34px;border:1px solid #cfcfcf;box-shadow:none;position:relative;z-index:1}gn-input input:disabled{background-color:#eee}gn-input[block]{display:block}gn-input:not([block]){display:inline-block}gn-input[fullwidth]{display:block}gn-input[fullwidth] input{width:100%}',"",{version:3,sources:["webpack://./stories/gn-input/gn-input.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,SACI,qBAAA,CACA,eCHA,uBDIwB,CCHxB,oBDGwB,CCFxB,eDEwB,CEJ1B,yBFK6B,CEJ7B,iBFI6B,CACvB,kCGPO,CHQP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,aAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,wBACI,qBIcU,CJXlB,gBACI,aAAA,CAEJ,sBACI,oBAAA,CAEJ,oBACI,aAAA,CACA,0BACI,UAAA",sourcesContent:['@import "../../style/all";\n\ngn-input {\n background-color: #fff;\n input {\n @include appearance(none);\n @include border-radius(4px);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 0 8px;\n height: 34px;\n border: 1px solid #cfcfcf;\n box-shadow: none;\n position: relative;\n z-index: 1;\n &:disabled {\n background-color: $disabled-background;\n }\n }\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n }\n &[fullwidth] {\n display: block;\n input {\n width: 100%;\n }\n }\n}\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},2509:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);o&&i[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),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)),t.push(d))}},t}},4663:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),s="/*# ".concat(r," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),s=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,o=!0){if(t!=n){o&&(this[i.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),s.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(a)||customElements.define(a,c),c}},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 s=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(s,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}},5527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},1106:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}: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}),s=this&&this.__decorate||function(e,t,n,o){var r,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(i=(s<3?r(i):s>3?r(t,n,i):r(t,n))||i);return s>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)&&o(t,e,n);return r(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnInput=void 0;const c=n(406),u=n(5527),d=a(n(2103));let l=class extends c.CustomElement{constructor(){super(),(0,u.addGlobalStylesheet)("gn-input-styles",d.default)}setup(e){}};s([(0,c.Toggle)()],l.prototype,"block",void 0),s([(0,c.Toggle)()],l.prototype,"fullwidth",void 0),l=s([(0,c.Component)({tag:"gn-input",template:Promise.resolve().then((()=>i(n(2509))))})],l),t.GnInput=l}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={id:o,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.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(1106)})())); | ||
//# sourceMappingURL=GnInput.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.GnLabel=e())}(self,(()=>(()=>{"use strict";var t={6100:(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,'gn-label{font-family:"Open Sans",sans-serif;font-size:1em;line-height:1.5em;min-height:21px}gn-label[block]{display:block}gn-label:not([block]){display:inline-block}gn-label:not([block])+gn-input:not([block]),gn-label:not([block])+gn-select:not([block]),gn-label:not([block])+gn-textarea:not([block]){margin-left:.5em}',"",{version:3,sources:["webpack://./stories/gn-label/gn-label.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,SACI,kCCHW,CDIX,aAAA,CACA,iBAAA,CACA,eAAA,CACA,gBACI,aAAA,CAEJ,sBACI,oBAAA,CACA,wIAGI,gBAAA",sourcesContent:['@import "../../style/all";\n\ngn-label {\n font-family: $default-font;\n font-size: 1em;\n line-height: 1.5em;\n min-height: 21px;\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n & + gn-input:not([block]),\n & + gn-select:not([block]),\n & + gn-textarea:not([block]) {\n margin-left: 0.5em;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const i=c},2086:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n="<template>\n <slot></slot>\n</template>\n"},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 l=0;l<t.length;l++){var u=[].concat(t[l]);n&&c[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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," */");return[e].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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const o=document.createElement("style");o.setAttribute("id",t),o.textContent=e,document.getElementById(t)||document.head.appendChild(o)}},8492: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},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnLabel=void 0;const a=o(406),l=o(5527),u=i(o(6100));let p=class extends a.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-label-styles",u.default)}setup(t){}};s([(0,a.Toggle)()],p.prototype,"block",void 0),p=s([(0,a.Component)({tag:"gn-label",template:Promise.resolve().then((()=>c(o(2086))))})],p),e.GnLabel=p}},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(8492)})())); | ||
!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.GnLabel=e())}(self,(()=>(()=>{"use strict";var t={6100:(t,e,o)=>{o.r(e),o.d(e,{default:()=>c});var n=o(4663),r=o.n(n),s=o(7638),i=o.n(s)()(r());i.push([t.id,'gn-label{font-family:"Open Sans",sans-serif;font-size:1em;line-height:1.5em;min-height:21px;font-weight:bold}gn-label[block]{display:block}gn-label:not([block]){display:inline-block}gn-label:not([block])+gn-input:not([block]),gn-label:not([block])+gn-select:not([block]),gn-label:not([block])+gn-textarea:not([block]){margin-left:.5em}',"",{version:3,sources:["webpack://./stories/gn-label/gn-label.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,SACI,kCCHW,CDIX,aAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,gBACI,aAAA,CAEJ,sBACI,oBAAA,CACA,wIAGI,gBAAA",sourcesContent:['@import "../../style/all";\n\ngn-label {\n font-family: $default-font;\n font-size: 1em;\n line-height: 1.5em;\n min-height: 21px;\n font-weight: bold;\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n & + gn-input:not([block]),\n & + gn-select:not([block]),\n & + gn-textarea:not([block]) {\n margin-left: 0.5em;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const c=i},2086:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n="<template>\n <slot></slot>\n</template>\n"},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 i={};if(n)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(i[a]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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," */");return[e].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 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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const o=document.createElement("style");o.setAttribute("id",t),o.textContent=e,document.getElementById(t)||document.head.appendChild(o)}},8492: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,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},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnLabel=void 0;const a=o(406),l=o(5527),u=c(o(6100));let p=class extends a.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-label-styles",u.default)}setup(t){}};s([(0,a.Toggle)()],p.prototype,"block",void 0),p=s([(0,a.Component)({tag:"gn-label",template:Promise.resolve().then((()=>i(o(2086))))})],p),e.GnLabel=p}},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(8492)})())); | ||
//# sourceMappingURL=GnLabel.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.GnSelect=t())}(self,(()=>(()=>{var e={798:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,'gn-select{background-color:#fff;margin-bottom:10px;border-radius:4px}gn-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:0 29px 0 8px;height:34px;border:1px solid #cfcfcf;box-shadow:none;position:relative;z-index:1;margin-right:-27px}gn-select select:disabled{background-color:#eee}gn-select[block]{display:block}gn-select:not([block]){display:inline-block}gn-select[fullwidth]{display:block}gn-select[fullwidth] select{width:100%}gn-select:not([fullwidth]){padding-right:9px}',"",{version:3,sources:["webpack://./stories/gn-select/gn-select.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,UACI,qBAAA,CACA,kBAAA,CACA,iBAAA,CACA,iBCLA,uBDMwB,CCLxB,oBDKwB,CCJxB,eDIwB,CEN1B,yBFO6B,CEN7B,iBFM6B,CACvB,kCGTO,CHUP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,oBAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,kBAAA,CACA,0BACI,qBIWU,CJRlB,iBACI,aAAA,CAEJ,uBACI,oBAAA,CAEJ,qBACI,aAAA,CACA,4BACI,UAAA,CAGR,2BACI,iBAAA",sourcesContent:['@import "../../style/all";\n\ngn-select {\n background-color: #fff;\n margin-bottom: 10px;\n border-radius: 4px;\n select {\n @include appearance(none);\n @include border-radius(4px);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 0 29px 0 8px;\n height: 34px;\n border: 1px solid #cfcfcf;\n box-shadow: none;\n position: relative;\n z-index: 1;\n margin-right: -27px;\n &:disabled {\n background-color: $disabled-background;\n }\n }\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n }\n &[fullwidth] {\n display: block;\n select {\n width: 100%;\n }\n }\n &:not([fullwidth]) {\n padding-right: 9px;\n }\n}\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},5195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,".arrow-down-icon{position:relative;bottom:-1px;z-index:0;width:0}.arrow-down-icon svg{width:14px;height:14px}","",{version:3,sources:["webpack://./stories/gn-select/template.scss"],names:[],mappings:"AAAA,iBACI,iBAAA,CACA,WAAA,CACA,SAAA,CACA,OAAA,CACA,qBACI,UAAA,CACA,WAAA",sourcesContent:[".arrow-down-icon {\n position: relative;\n bottom: -1px;\n z-index: 0;\n width: 0;\n svg {\n width: 14px;\n height: 14px;\n }\n}"],sourceRoot:""}]);const a=i},828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o='<template>\n <slot></slot>\n <span id="arrow-down-icon" class="arrow-down-icon"></span>\n</template>\n'},7638:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var d=0;d<e.length;d++){var l=[].concat(e[d]);o&&i[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),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)),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 o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),s="/*# ".concat(r," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),s=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,o=!0){if(t!=n){o&&(this[i.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),s.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(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 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)=>{"use strict";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 s=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(e,t,n)=>{"use strict";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)=>{"use strict";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)=>{"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 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}},394: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 9 7.8" style="enable-background:new 0 0 9 7.8;" xml:space="preserve"><title>Pil ned</title><style type="text/css"> .__1KSPdXJ__st0{fill:#414042;} </style><g id="Layer_1"></g><g id="Header"><polygon class="__1KSPdXJ__st0 " points="0,0 4.5,7.8 9,0"></polygon></g></svg>'},5527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},783:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}: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}),s=this&&this.__decorate||function(e,t,n,o){var r,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(i=(s<3?r(i):s>3?r(t,n,i):r(t,n))||i);return s>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)&&o(t,e,n);return r(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnSelect=void 0;const c=n(406),d=n(5527),l=a(n(394)),u=a(n(798));let p=class extends c.CustomElement{constructor(){super(),(0,d.addGlobalStylesheet)("gn-select-styles",u.default)}connectedCallback(){(0,c.getShadowRootElement)(this,"#arrow-down-icon").innerHTML=l.default}setup(e){}};s([(0,c.Toggle)()],p.prototype,"block",void 0),s([(0,c.Toggle)()],p.prototype,"fullwidth",void 0),p=s([(0,c.Component)({tag:"gn-select",template:Promise.resolve().then((()=>i(n(828)))),style:Promise.resolve().then((()=>i(n(5195))))})],p),t.GnSelect=p}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={id:o,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.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(783)})())); | ||
!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.GnSelect=t())}(self,(()=>(()=>{var e={798:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,'gn-select{background-color:#fff;border-radius:4px}gn-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:0 29px 0 8px;height:34px;border:1px solid #cfcfcf;box-shadow:none;position:relative;z-index:1;margin-right:-27px}gn-select select:disabled{background-color:#eee}gn-select[block]{display:block}gn-select:not([block]){display:inline-block}gn-select[fullwidth]{display:block}gn-select[fullwidth] select{width:100%}gn-select:not([fullwidth]){padding-right:9px}',"",{version:3,sources:["webpack://./stories/gn-select/gn-select.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,UACI,qBAAA,CACA,iBAAA,CACA,iBCJA,uBDKwB,CCJxB,oBDIwB,CCHxB,eDGwB,CEL1B,yBFM6B,CEL7B,iBFK6B,CACvB,kCGRO,CHSP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,oBAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,kBAAA,CACA,0BACI,qBIYU,CJTlB,iBACI,aAAA,CAEJ,uBACI,oBAAA,CAEJ,qBACI,aAAA,CACA,4BACI,UAAA,CAGR,2BACI,iBAAA",sourcesContent:['@import "../../style/all";\n\ngn-select {\n background-color: #fff;\n border-radius: 4px;\n select {\n @include appearance(none);\n @include border-radius(4px);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 0 29px 0 8px;\n height: 34px;\n border: 1px solid #cfcfcf;\n box-shadow: none;\n position: relative;\n z-index: 1;\n margin-right: -27px;\n &:disabled {\n background-color: $disabled-background;\n }\n }\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n }\n &[fullwidth] {\n display: block;\n select {\n width: 100%;\n }\n }\n &:not([fullwidth]) {\n padding-right: 9px;\n }\n}\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},5195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,".arrow-down-icon{position:relative;bottom:-1px;z-index:0;width:0}.arrow-down-icon svg{width:14px;height:14px}","",{version:3,sources:["webpack://./stories/gn-select/template.scss"],names:[],mappings:"AAAA,iBACI,iBAAA,CACA,WAAA,CACA,SAAA,CACA,OAAA,CACA,qBACI,UAAA,CACA,WAAA",sourcesContent:[".arrow-down-icon {\n position: relative;\n bottom: -1px;\n z-index: 0;\n width: 0;\n svg {\n width: 14px;\n height: 14px;\n }\n}"],sourceRoot:""}]);const a=i},828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o='<template>\n <slot></slot>\n <span id="arrow-down-icon" class="arrow-down-icon"></span>\n</template>\n'},7638:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var d=0;d<e.length;d++){var l=[].concat(e[d]);o&&i[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),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)),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 o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),s="/*# ".concat(r," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),s=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,o=!0){if(t!=n){o&&(this[i.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),s.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(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 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)=>{"use strict";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 s=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(e,t,n)=>{"use strict";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)=>{"use strict";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)=>{"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 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}},394: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 9 7.8" style="enable-background:new 0 0 9 7.8;" xml:space="preserve"><title>Pil ned</title><style type="text/css"> .__1KSPdXJ__st0{fill:#414042;} </style><g id="Layer_1"></g><g id="Header"><polygon class="__1KSPdXJ__st0 " points="0,0 4.5,7.8 9,0"></polygon></g></svg>'},5527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},783:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}: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}),s=this&&this.__decorate||function(e,t,n,o){var r,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(i=(s<3?r(i):s>3?r(t,n,i):r(t,n))||i);return s>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)&&o(t,e,n);return r(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnSelect=void 0;const c=n(406),d=n(5527),l=a(n(394)),u=a(n(798));let p=class extends c.CustomElement{constructor(){super(),(0,d.addGlobalStylesheet)("gn-select-styles",u.default)}connectedCallback(){(0,c.getShadowRootElement)(this,"#arrow-down-icon").innerHTML=l.default}setup(e){}};s([(0,c.Toggle)()],p.prototype,"block",void 0),s([(0,c.Toggle)()],p.prototype,"fullwidth",void 0),p=s([(0,c.Component)({tag:"gn-select",template:Promise.resolve().then((()=>i(n(828)))),style:Promise.resolve().then((()=>i(n(5195))))})],p),t.GnSelect=p}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={id:o,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.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(783)})())); | ||
//# sourceMappingURL=GnSelect.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.GnTable=e())}(self,(()=>(()=>{"use strict";var t={8422:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),i=n(7638),s=n.n(i)()(r());s.push([t.id,'gn-table table{border-collapse:collapse;width:100%;font-family:"Open Sans",sans-serif}gn-table table 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}gn-table table tr td{padding:8px;border-bottom:1px solid #d8d8d8;line-height:20px}gn-table[hoverable] table 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}gn-table[hoverable] table tbody tr:hover{background-color:rgba(0,0,0,.05)}',"",{version:3,sources:["webpack://./stories/gn-table/gn-table.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAGE,eACE,wBAAA,CACA,UAAA,CACA,kCCNW,CDQT,qBACE,+BAAA,CACA,aEMO,CFLP,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,eAAA,CACA,wBAAA,CACA,iBAAA,CAEF,qBACE,WAAA,CACA,+BAAA,CACA,gBAAA,CAOA,mCG3BJ,iDH4BM,CG3BN,+CH2BM,CG1BN,oDH0BM,CGzBN,4CHyBM,CACA,yCACE,gCE7BO",sourcesContent:['@import "../../style/all";\n\ngn-table {\n table {\n border-collapse: collapse;\n width: 100%;\n font-family: $default-font;\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 td {\n padding: 8px;\n border-bottom: 1px solid $default-border;\n line-height: 20px;\n }\n }\n }\n &[hoverable] {\n table {\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','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\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 a=s},6500:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></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,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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," */");return[e].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 s(t){try{c(o.next(t))}catch(t){i(t)}}function a(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(s,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),s=n(3804);e.Component=t=>e=>{var n;const a=t.tag||s.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=>s.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[s.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(a)||customElements.define(a,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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},4474: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,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},s=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},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnTable=void 0;const c=n(406),l=n(5527),u=a(n(8422));let d=class extends c.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-table-styles",u.default)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}static setup(t,e){(0,c.getElement)(t)}};i([(0,c.Prop)()],d.prototype,"id",void 0),i([(0,c.Toggle)()],d.prototype,"hoverable",void 0),d=i([(0,c.Component)({tag:"gn-table",template:Promise.resolve().then((()=>s(n(6500))))})],d),e.GnTable=d}},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(4474)})())); | ||
!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.GnTable=e())}(self,(()=>(()=>{"use strict";var t={8422:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),i=n(7638),s=n.n(i)()(r());s.push([t.id,'gn-table table{border-collapse:collapse;width:100%;font-family:"Open Sans",sans-serif}gn-table table 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}gn-table table tr td{padding:8px;border-bottom:1px solid #d8d8d8;line-height:20px}gn-table[hoverable] table 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}gn-table[hoverable] table tbody tr:hover{background-color:rgba(0,0,0,.05)}',"",{version:3,sources:["webpack://./stories/gn-table/gn-table.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAGE,eACE,wBAAA,CACA,UAAA,CACA,kCCNW,CDQT,qBACE,+BAAA,CACA,aEMO,CFLP,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,eAAA,CACA,wBAAA,CACA,iBAAA,CAEF,qBACE,WAAA,CACA,+BAAA,CACA,gBAAA,CAOA,mCG3BJ,iDH4BM,CG3BN,+CH2BM,CG1BN,oDH0BM,CGzBN,4CHyBM,CACA,yCACE,gCE7BO",sourcesContent:['@import "../../style/all";\n\ngn-table {\n table {\n border-collapse: collapse;\n width: 100%;\n font-family: $default-font;\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 td {\n padding: 8px;\n border-bottom: 1px solid $default-border;\n line-height: 20px;\n }\n }\n }\n &[hoverable] {\n table {\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','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\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 a=s},6500:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></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,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},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," */");return[e].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 s(t){try{c(o.next(t))}catch(t){i(t)}}function a(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(s,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),s=n(3804);e.Component=t=>e=>{var n;const a=t.tag||s.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=>s.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[s.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(a)||customElements.define(a,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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},4474: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,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},s=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},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnTable=void 0;const c=n(406),l=n(5527),u=a(n(8422));let d=class extends c.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-table-styles",u.default)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}static setup(t,e){(0,c.getElement)(t)}};i([(0,c.Prop)()],d.prototype,"id",void 0),i([(0,c.Toggle)()],d.prototype,"hoverable",void 0),d=i([(0,c.Component)({tag:"gn-table",template:Promise.resolve().then((()=>s(n(6500))))})],d),e.GnTable=d}},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(4474)})())); | ||
//# sourceMappingURL=GnTable.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.GnTextarea=t())}(self,(()=>(()=>{"use strict";var e={1417:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var o=n(4663),r=n.n(o),a=n(7638),s=n.n(a)()(r());s.push([e.id,'gn-textarea{background-color:#fff;margin-bottom:10px}gn-textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:6px 8px;min-height:34px;border:1px solid #cfcfcf;box-shadow:none;position:relative;z-index:1}gn-textarea textarea:disabled{background-color:#eee}gn-textarea[block]{display:block}gn-textarea:not([block]){display:inline-block}gn-textarea[fullwidth]{display:block}gn-textarea[fullwidth] textarea{width:100%}',"",{version:3,sources:["webpack://./stories/gn-textarea/gn-textarea.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,YACI,qBAAA,CACA,kBAAA,CACA,qBCJA,uBDKwB,CCJxB,oBDIwB,CCHxB,eDGwB,CEL1B,yBFM6B,CEL7B,iBFK6B,CACvB,kCGRO,CHSP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,eAAA,CACA,wBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,8BACI,qBIaU,CJVlB,mBACI,aAAA,CAEJ,yBACI,oBAAA,CAEJ,uBACI,aAAA,CACA,gCACI,UAAA",sourcesContent:['@import "../../style/all";\n\ngn-textarea {\n background-color: #fff;\n margin-bottom: 10px;\n textarea {\n @include appearance(none);\n @include border-radius(4px);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 6px 8px;\n min-height: 34px;\n border: 1px solid #cfcfcf;\n box-shadow: none;\n position: relative;\n z-index: 1;\n &:disabled {\n background-color: $disabled-background;\n }\n }\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n }\n &[fullwidth] {\n display: block;\n textarea {\n width: 100%;\n }\n }\n}\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const i=s},2953:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(s[c]=!0)}for(var d=0;d<e.length;d++){var u=[].concat(e[d]);o&&s[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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},4663:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */");return[t].concat([a]).join("\n")}return[t].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{c(o.next(e))}catch(e){a(e)}}function i(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((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 i=e.tag||s.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=>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(i)||customElements.define(i,c),c}},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}},5527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},8929:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}: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 i=e.length-1;i>=0;i--)(r=e[i])&&(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},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnTextarea=void 0;const c=n(406),d=n(5527),u=i(n(1417));let l=class extends c.CustomElement{constructor(){super(),(0,d.addGlobalStylesheet)("gn-textarea-styles",u.default)}setup(e){}};a([(0,c.Toggle)()],l.prototype,"block",void 0),a([(0,c.Toggle)()],l.prototype,"fullwidth",void 0),l=a([(0,c.Component)({tag:"gn-textarea",template:Promise.resolve().then((()=>s(n(2953))))})],l),t.GnTextarea=l}},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(8929)})())); | ||
!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.GnTextarea=t())}(self,(()=>(()=>{"use strict";var e={1417:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var o=n(4663),r=n.n(o),a=n(7638),s=n.n(a)()(r());s.push([e.id,'gn-textarea{background-color:#fff}gn-textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:6px 8px;min-height:34px;border:1px solid #cfcfcf;box-shadow:none;position:relative;z-index:1}gn-textarea textarea:disabled{background-color:#eee}gn-textarea[block]{display:block}gn-textarea:not([block]){display:inline-block}gn-textarea[fullwidth]{display:block}gn-textarea[fullwidth] textarea{width:100%}',"",{version:3,sources:["webpack://./stories/gn-textarea/gn-textarea.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,YACI,qBAAA,CACA,qBCHA,uBDIwB,CCHxB,oBDGwB,CCFxB,eDEwB,CEJ1B,yBFK6B,CEJ7B,iBFI6B,CACvB,kCGPO,CHQP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,eAAA,CACA,wBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,8BACI,qBIcU,CJXlB,mBACI,aAAA,CAEJ,yBACI,oBAAA,CAEJ,uBACI,aAAA,CACA,gCACI,UAAA",sourcesContent:['@import "../../style/all";\n\ngn-textarea {\n background-color: #fff;\n textarea {\n @include appearance(none);\n @include border-radius(4px);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 6px 8px;\n min-height: 34px;\n border: 1px solid #cfcfcf;\n box-shadow: none;\n position: relative;\n z-index: 1;\n &:disabled {\n background-color: $disabled-background;\n }\n }\n &[block] {\n display: block;\n }\n &:not([block]) {\n display: inline-block;\n }\n &[fullwidth] {\n display: block;\n textarea {\n width: 100%;\n }\n }\n}\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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}",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const i=s},2953:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},7638:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(s[c]=!0)}for(var d=0;d<e.length;d++){var u=[].concat(e[d]);o&&s[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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},4663:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */");return[t].concat([a]).join("\n")}return[t].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{c(o.next(e))}catch(e){a(e)}}function i(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,i)}c((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 i=e.tag||s.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=>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(i)||customElements.define(i,c),c}},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}},5527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},8929:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}: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 i=e.length-1;i>=0;i--)(r=e[i])&&(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},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnTextarea=void 0;const c=n(406),d=n(5527),u=i(n(1417));let l=class extends c.CustomElement{constructor(){super(),(0,d.addGlobalStylesheet)("gn-textarea-styles",u.default)}setup(e){}};a([(0,c.Toggle)()],l.prototype,"block",void 0),a([(0,c.Toggle)()],l.prototype,"fullwidth",void 0),l=a([(0,c.Component)({tag:"gn-textarea",template:Promise.resolve().then((()=>s(n(2953))))})],l),t.GnTextarea=l}},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(8929)})())); | ||
//# sourceMappingURL=GnTextarea.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.HeadingText=e())}(self,(()=>(()=>{"use strict";var t={2902:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),s=n.n(o),i=n(7638),r=n.n(i)()(s());r.push([t.id,'::slotted(h1),::slotted([size="1"]){font-family:"Raleway",sans-serif;font-size:30px;font-weight:100}@media(min-width: 768px){::slotted(h1),::slotted([size="1"]){font-size:48px}}::slotted(h1[underline]):after,::slotted([size="1"][underline]):after{content:"";display:block;width:75px;border-bottom:3px solid #fe5000;margin:5px 0 15px}@media(min-width: 768px){::slotted(h1[underline]):after,::slotted([size="1"][underline]):after{width:100px;border-bottom:5px solid #fe5000;margin:10px 0 20px}}::slotted(h2),::slotted([size="2"]){font-family:"Raleway",sans-serif;font-size:26px;line-height:30px;font-weight:300;display:inline;margin-bottom:10px;margin-top:20px}@media(min-width: 768px){::slotted(h2),::slotted([size="2"]){font-size:32px;line-height:40px}}::slotted(h2):before,::slotted([size="2"]):before{content:"";display:block;margin-top:46px}::slotted(h2):after,::slotted([size="2"]):after{content:"";display:block;margin-bottom:20px}::slotted(h2[underline]),::slotted([size="2"][underline]){border-bottom:2px solid #fe5000}::slotted(h3),::slotted([size="3"]){font-family:"Open Sans",sans-serif;font-size:20px;font-weight:300}@media(min-width: 768px){::slotted(h3),::slotted([size="3"]){font-size:21px}}::slotted(h4),::slotted([size="4"]){font-family:"Open Sans",sans-serif;font-size:18px;font-weight:300}@media(min-width: 768px){::slotted(h4),::slotted([size="4"]){font-size:19px}}::slotted(h5),::slotted([size="5"]){font-family:"Open Sans",sans-serif;font-size:15px;font-weight:600}@media(min-width: 768px){::slotted(h5),::slotted([size="5"]){font-size:16px}}',"",{version:3,sources:["webpack://./stories/heading-text/heading-text.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss"],names:[],mappings:"AAEA,oCAEI,gCCHU,CDIV,cAAA,CACA,eAAA,CEII,yBFRR,oCAMQ,cAAA,CAAA,CAMJ,sEACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,+BAAA,CACA,iBAAA,CETA,yBFIJ,sEAOQ,WAAA,CACA,+BAAA,CACA,kBAAA,CAAA,CAKZ,oCAEI,gCC7BU,CD8BV,cAAA,CACA,gBAAA,CACA,eAAA,CACA,cAAA,CACA,kBAAA,CACA,eAAA,CE1BI,yBFkBR,oCAUQ,cAAA,CACA,gBAAA,CAAA,CAEJ,kDACI,UAAA,CACA,aAAA,CACA,eAAA,CAEJ,gDACI,UAAA,CACA,aAAA,CACA,kBAAA,CAIR,0DAEI,+BAAA,CAGJ,oCAEI,kCC5DW,CD6DX,cAAA,CACA,eAAA,CEpDI,yBFgDR,oCAMQ,cAAA,CAAA,CAIR,oCAEI,kCCtEW,CDuEX,cAAA,CACA,eAAA,CE9DI,yBF0DR,oCAMQ,cAAA,CAAA,CAIR,oCAEI,kCChFW,CDiFX,cAAA,CACA,eAAA,CExEI,yBFoER,oCAMQ,cAAA,CAAA",sourcesContent:['@import "../../style/all";\n\n::slotted(h1),\n::slotted([size="1"]) {\n font-family: $header-font;\n font-size: 30px;\n font-weight: 100;\n @include breakpoint(tablet) {\n font-size: 48px;\n }\n}\n\n::slotted(h1[underline]),\n::slotted([size="1"][underline]) {\n &:after {\n content: "";\n display: block;\n width: 75px;\n border-bottom: 3px solid $primary-brand;\n margin: 5px 0 15px;\n @include breakpoint(tablet) {\n width: 100px;\n border-bottom: 5px solid $primary-brand;\n margin: 10px 0 20px;\n }\n }\n}\n\n::slotted(h2),\n::slotted([size="2"]) {\n font-family: $header-font;\n font-size: 26px;\n line-height: 30px;\n font-weight: 300;\n display: inline;\n margin-bottom: 10px;\n margin-top: 20px;\n @include breakpoint(tablet) {\n font-size: 32px;\n line-height: 40px;\n }\n &:before {\n content: "";\n display: block;\n margin-top: 46px;\n }\n &:after {\n content: "";\n display: block;\n margin-bottom: 20px;\n }\n}\n\n::slotted(h2[underline]),\n::slotted([size="2"][underline]) {\n border-bottom: 2px solid $primary-brand;\n}\n\n::slotted(h3),\n::slotted([size="3"]) {\n font-family: $default-font;\n font-size: 20px;\n font-weight: 300;\n @include breakpoint(tablet) {\n font-size: 21px;\n }\n}\n\n::slotted(h4),\n::slotted([size="4"]) {\n font-family: $default-font;\n font-size: 18px;\n font-weight: 300;\n @include breakpoint(tablet) {\n font-size: 19px;\n }\n}\n\n::slotted(h5),\n::slotted([size="5"]) {\n font-family: $default-font;\n font-size: 15px;\n font-weight: 600;\n @include breakpoint(tablet) {\n font-size: 16px;\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"@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"],sourceRoot:""}]);const a=r},3011:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},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,s,i){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&r[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),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),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)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(s," */");return[e].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(s,i){function r(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const s=n(5969),i=n(5773),r=n(3804);e.Component=t=>e=>{var n;const a=t.tag||r.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=>r.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[r.toCamelCase(t)]=n);const s=this.constructor.watchAttributes;if(s&&s[t]){const o=s[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,s.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(a)||customElements.define(a,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]}),s=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}),s(n(1397),e),s(n(985),e),s(n(265),e),s(n(5969),e),s(n(5773),e),s(n(4271),e),s(n(9766),e),s(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(s){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,s))}}}})}},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 s=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,s,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 s=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:s})}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}},7315:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,s)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=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 s,i=arguments.length,r=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(i<3?s(r):i>3?s(e,n,r):s(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},r=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 s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadingText=void 0;const a=n(406);let c=class extends a.CustomElement{constructor(){super()}setup(t){}};i([(0,a.Prop)()],c.prototype,"size",void 0),i([(0,a.Prop)()],c.prototype,"tag",void 0),i([(0,a.Toggle)()],c.prototype,"underline",void 0),c=i([(0,a.Component)({tag:"heading-text",template:Promise.resolve().then((()=>r(n(3011)))),style:Promise.resolve().then((()=>r(n(2902))))})],c),e.HeadingText=c}},e={};function n(o){var s=e[o];if(void 0!==s)return s.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(7315)})())); | ||
!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.HeadingText=e())}(self,(()=>(()=>{"use strict";var t={2902:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),s=n.n(o),i=n(7638),r=n.n(i)()(s());r.push([t.id,'::slotted(h1),::slotted([size="1"]){font-family:"Raleway",sans-serif;font-size:30px;font-weight:100}@media(min-width: 768px){::slotted(h1),::slotted([size="1"]){font-size:48px}}::slotted(h1[underline]):after,::slotted([size="1"][underline]):after{content:"";display:block;width:75px;border-bottom:3px solid #fe5000;margin:5px 0 15px}@media(min-width: 768px){::slotted(h1[underline]):after,::slotted([size="1"][underline]):after{width:100px;border-bottom:5px solid #fe5000;margin:10px 0 20px}}::slotted(h2),::slotted([size="2"]){font-family:"Raleway",sans-serif;font-size:26px;line-height:30px;font-weight:300;display:inline;margin-bottom:10px;margin-top:20px}@media(min-width: 768px){::slotted(h2),::slotted([size="2"]){font-size:32px;line-height:40px}}::slotted(h2):before,::slotted([size="2"]):before{content:"";display:block;margin-top:46px}::slotted(h2):after,::slotted([size="2"]):after{content:"";display:block;margin-bottom:20px}::slotted(h2[underline]),::slotted([size="2"][underline]){border-bottom:2px solid #fe5000}::slotted(h3),::slotted([size="3"]){font-family:"Open Sans",sans-serif;font-size:20px;font-weight:300}@media(min-width: 768px){::slotted(h3),::slotted([size="3"]){font-size:21px}}::slotted(h4),::slotted([size="4"]){font-family:"Open Sans",sans-serif;font-size:18px;font-weight:300}@media(min-width: 768px){::slotted(h4),::slotted([size="4"]){font-size:19px}}::slotted(h5),::slotted([size="5"]){font-family:"Open Sans",sans-serif;font-size:15px;font-weight:600}@media(min-width: 768px){::slotted(h5),::slotted([size="5"]){font-size:16px}}',"",{version:3,sources:["webpack://./stories/heading-text/heading-text.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss"],names:[],mappings:"AAEA,oCAEI,gCCHU,CDIV,cAAA,CACA,eAAA,CEII,yBFRR,oCAMQ,cAAA,CAAA,CAMJ,sEACI,UAAA,CACA,aAAA,CACA,UAAA,CACA,+BAAA,CACA,iBAAA,CETA,yBFIJ,sEAOQ,WAAA,CACA,+BAAA,CACA,kBAAA,CAAA,CAKZ,oCAEI,gCC7BU,CD8BV,cAAA,CACA,gBAAA,CACA,eAAA,CACA,cAAA,CACA,kBAAA,CACA,eAAA,CE1BI,yBFkBR,oCAUQ,cAAA,CACA,gBAAA,CAAA,CAEJ,kDACI,UAAA,CACA,aAAA,CACA,eAAA,CAEJ,gDACI,UAAA,CACA,aAAA,CACA,kBAAA,CAIR,0DAEI,+BAAA,CAGJ,oCAEI,kCC5DW,CD6DX,cAAA,CACA,eAAA,CEpDI,yBFgDR,oCAMQ,cAAA,CAAA,CAIR,oCAEI,kCCtEW,CDuEX,cAAA,CACA,eAAA,CE9DI,yBF0DR,oCAMQ,cAAA,CAAA,CAIR,oCAEI,kCChFW,CDiFX,cAAA,CACA,eAAA,CExEI,yBFoER,oCAMQ,cAAA,CAAA",sourcesContent:['@import "../../style/all";\n\n::slotted(h1),\n::slotted([size="1"]) {\n font-family: $header-font;\n font-size: 30px;\n font-weight: 100;\n @include breakpoint(tablet) {\n font-size: 48px;\n }\n}\n\n::slotted(h1[underline]),\n::slotted([size="1"][underline]) {\n &:after {\n content: "";\n display: block;\n width: 75px;\n border-bottom: 3px solid $primary-brand;\n margin: 5px 0 15px;\n @include breakpoint(tablet) {\n width: 100px;\n border-bottom: 5px solid $primary-brand;\n margin: 10px 0 20px;\n }\n }\n}\n\n::slotted(h2),\n::slotted([size="2"]) {\n font-family: $header-font;\n font-size: 26px;\n line-height: 30px;\n font-weight: 300;\n display: inline;\n margin-bottom: 10px;\n margin-top: 20px;\n @include breakpoint(tablet) {\n font-size: 32px;\n line-height: 40px;\n }\n &:before {\n content: "";\n display: block;\n margin-top: 46px;\n }\n &:after {\n content: "";\n display: block;\n margin-bottom: 20px;\n }\n}\n\n::slotted(h2[underline]),\n::slotted([size="2"][underline]) {\n border-bottom: 2px solid $primary-brand;\n}\n\n::slotted(h3),\n::slotted([size="3"]) {\n font-family: $default-font;\n font-size: 20px;\n font-weight: 300;\n @include breakpoint(tablet) {\n font-size: 21px;\n }\n}\n\n::slotted(h4),\n::slotted([size="4"]) {\n font-family: $default-font;\n font-size: 18px;\n font-weight: 300;\n @include breakpoint(tablet) {\n font-size: 19px;\n }\n}\n\n::slotted(h5),\n::slotted([size="5"]) {\n font-family: $default-font;\n font-size: 15px;\n font-weight: 600;\n @include breakpoint(tablet) {\n font-size: 16px;\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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"],sourceRoot:""}]);const a=r},3011:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},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,s,i){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&r[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),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),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)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(s," */");return[e].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(s,i){function r(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const s=n(5969),i=n(5773),r=n(3804);e.Component=t=>e=>{var n;const a=t.tag||r.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=>r.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[r.toCamelCase(t)]=n);const s=this.constructor.watchAttributes;if(s&&s[t]){const o=s[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,s.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(a)||customElements.define(a,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]}),s=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}),s(n(1397),e),s(n(985),e),s(n(265),e),s(n(5969),e),s(n(5773),e),s(n(4271),e),s(n(9766),e),s(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(s){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,s))}}}})}},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 s=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,s,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 s=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:s})}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}},7315:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,s)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=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 s,i=arguments.length,r=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(i<3?s(r):i>3?s(e,n,r):s(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},r=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 s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadingText=void 0;const a=n(406);let c=class extends a.CustomElement{constructor(){super()}setup(t){}};i([(0,a.Prop)()],c.prototype,"size",void 0),i([(0,a.Prop)()],c.prototype,"tag",void 0),i([(0,a.Toggle)()],c.prototype,"underline",void 0),c=i([(0,a.Component)({tag:"heading-text",template:Promise.resolve().then((()=>r(n(3011)))),style:Promise.resolve().then((()=>r(n(2902))))})],c),e.HeadingText=c}},e={};function n(o){var s=e[o];if(void 0!==s)return s.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(7315)})())); | ||
//# sourceMappingURL=HeadingText.js.map |
@@ -9,2 +9,3 @@ export * from "./init"; | ||
export * from "./stories/gn-dialog/gn-dialog"; | ||
export * from "./stories/gn-field-container/gn-field-container"; | ||
export * from "./stories/gn-input/gn-input"; | ||
@@ -11,0 +12,0 @@ export * from "./stories/gn-label/gn-label"; |
@@ -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,(()=>(()=>{var e={2248:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var i=n(4663),o=n.n(i),r=n(7638),s=n.n(r)()(o());s.push([e.id,'*{box-sizing:border-box}button.menu-toggle-button{-webkit-border-radius:4px;border-radius:4px;border:none;background:rgba(0,0,0,0);background-color:#7d746d;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 button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer;border:none;font-size:16px;font-weight:300;font-family:"Open Sans",sans-serif;background:none}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row button:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row button:not(:first-child){border-left:1px solid #b6afa8}',"",{version:3,sources:["webpack://./stories/main-navigation/main-menu/main-menu.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_transition.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,0BCLE,yBDMyB,CCLzB,iBDKyB,CACvB,WAAA,CACA,wBAAA,CACA,wBAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CEDI,0BFRR,0BAWQ,UAAA,CACA,WAAA,CAAA,CEZA,yBAAA,0BFeA,UAAA,CACA,wBAAA,CACA,UAAA,CAAA,CAEJ,+BACI,wBAAA,CAEJ,+BACI,eAAA,CACA,eAAA,CACA,eAAA,CACA,qBAAA,CACA,0CACI,YAAA,CE5BJ,yBF2BA,0CAGQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI,WAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CEjCA,0BF6BJ,8BAMQ,WAAA,CACA,UAAA,CAAA,CAIZ,cACI,iBAAA,CACA,MAAA,CACA,UAAA,CAEA,8BC1DF,iCD2D6B,CC1D7B,yBD0D6B,CACvB,qBAAA,CACA,UAAA,CACA,wBAAA,CACA,WAAA,CACA,iBAAA,CACA,QAAA,CEpDA,0BF6CJ,8BASQ,QAAA,CAAA,CE1DJ,yBFiDJ,8BAaQ,WAAA,CAAA,CElEJ,yBFqDJ,8BAgBQ,WAAA,CAAA,CEzEJ,0BFyDJ,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,CEhFR,0BF8EI,6DAIQ,gBAAA,CAAA,CE1FZ,yBFsFI,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,CE3GhB,0BF0GY,2FAGQ,YAAA,CAAA,CErHpB,yBFkHY,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,yGACI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,aAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,kCKpKD,CLqKC,eAAA,CACA,qHACI,yBAAA,CAEJ,6IACI,6BAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nbutton.menu-toggle-button {\n @include border-radius(4px);\n border: none;\n background: transparent;\n background-color: rgb(125, 116, 109);\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, button {\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 border: none;\n font-size: 16px;\n font-weight: 300;\n font-family: $default-font;\n background: none;\n &:hover {\n text-decoration: underline;\n }\n &:not(:first-child) {\n border-left: 1px solid #b6afa8;\n }\n }\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}","@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","\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", sans-serif;'],sourceRoot:""}]);const a=s},5149:(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 s={};if(i)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);i&&s[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," */");return[t].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 s(e){try{u(i.next(e))}catch(e){r(e)}}function a(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(s,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(5969),r=n(5773),s=n(3804);t.Component=e=>t=>{var n;const a=e.tag||s.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=>s.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,i=!0){if(t!=n){i&&(this[s.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(a)||customElements.define(a,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}},6989:e=>{e.exports='<svg data-prefix="fas" data-icon="times" class="__1mUhmph__svg-inline--fa __1mUhmph__fa-times __1mUhmph__fa-w-11 __1mUhmph__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><title>ikon for lukk</title><path fill="#2F3940" 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 data-prefix="fas" data-icon="bars" class="__3IzhWwQ__svg-inline--fa __3IzhWwQ__fa-bars __3IzhWwQ__fa-w-14 __3IzhWwQ__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title>Menyikon</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>'},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 s(e){try{u(i.next(e))}catch(e){r(e)}}function a(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(s,a)}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}`},s={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`,s).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))},5527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},8641: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,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>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)&&i(t,e,n);return o(t,e),t},a=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=a(n(7291)),l=a(n(6989)),d=n(9480),p=n(5527);let h=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}" tabindex="${this.showmenu?null:"-1"}">${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("button"),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.showmenu||t.setAttribute("tabindex","-1"),this.menuActionsRow.appendChild(t)}addLanguageSelectLinks(e=!1){let t;if(!(this.norwegianurl&&this.englishurl||e))return"";e?(t=document.createElement("button"),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.showmenu||t.setAttribute("tabindex","-1"),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"),(0,p.getFocusableElementsInsideElement)(this.menuContainer).forEach((e=>{this.showmenu?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1")}))}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)}};h.elementSelector="main-menu",r([(0,u.Prop)()],h.prototype,"id",void 0),r([(0,u.Prop)()],h.prototype,"language",void 0),r([(0,u.Prop)()],h.prototype,"environment",void 0),r([(0,u.Prop)()],h.prototype,"signinurl",void 0),r([(0,u.Prop)()],h.prototype,"signouturl",void 0),r([(0,u.Prop)()],h.prototype,"norwegianurl",void 0),r([(0,u.Prop)()],h.prototype,"englishurl",void 0),r([(0,u.Toggle)()],h.prototype,"isloggedin",void 0),r([(0,u.Toggle)()],h.prototype,"showmenu",void 0),r([(0,u.Toggle)()],h.prototype,"hasAuthenticationFunction",void 0),r([(0,u.Toggle)()],h.prototype,"hasLanguageSelectFunctions",void 0),r([(0,u.Prop)()],h.prototype,"menuitems",void 0),r([(0,u.Dispatch)("onSignInClick")],h.prototype,"onSignInClick",void 0),r([(0,u.Dispatch)("onSignOutClick")],h.prototype,"onSignOutClick",void 0),r([(0,u.Dispatch)("onNorwegianLanguageSelect")],h.prototype,"onNorwegianLanguageSelect",void 0),r([(0,u.Dispatch)("onEnglishLanguageSelect")],h.prototype,"onEnglishLanguageSelect",void 0),r([(0,u.Listen)("click","#menu-toggle-button")],h.prototype,"buttonClicked",null),r([(0,u.Watch)("hasauthenticationfunction")],h.prototype,"hasAuthenticationFunctionChanged",null),r([(0,u.Watch)("isloggedin")],h.prototype,"isLoggedInChanged",null),r([(0,u.Watch)("haslanguageselectfunctions")],h.prototype,"hasLanguageSelectFunctionsChanged",null),r([(0,u.Watch)("language")],h.prototype,"languageChanged",null),r([(0,u.Watch)("showmenu")],h.prototype,"showMenuChanged",null),r([(0,u.Watch)("menuitems")],h.prototype,"menuItemsChanged",null),h=r([(0,u.Component)({tag:"main-menu",template:Promise.resolve().then((()=>s(n(5149)))),style:Promise.resolve().then((()=>s(n(2248))))})],h),t.MainMenu=h}},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(8641)})())); | ||
!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={2248:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var i=n(4663),o=n.n(i),r=n(7638),s=n.n(r)()(o());s.push([e.id,'*{box-sizing:border-box}button.menu-toggle-button{-webkit-border-radius:4px;border-radius:4px;border:none;background:rgba(0,0,0,0);background-color:#7d746d;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 button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer;border:none;font-size:16px;font-weight:300;font-family:"Open Sans",sans-serif;background:none}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row button:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row button:not(:first-child){border-left:1px solid #b6afa8}',"",{version:3,sources:["webpack://./stories/main-navigation/main-menu/main-menu.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_transition.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,EACI,qBAAA,CAGJ,0BCLE,yBDMyB,CCLzB,iBDKyB,CACvB,WAAA,CACA,wBAAA,CACA,wBAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CEDI,0BFRR,0BAWQ,UAAA,CACA,WAAA,CAAA,CEZA,yBAAA,0BFeA,UAAA,CACA,wBAAA,CACA,UAAA,CAAA,CAEJ,+BACI,wBAAA,CAEJ,+BACI,eAAA,CACA,eAAA,CACA,eAAA,CACA,qBAAA,CACA,0CACI,YAAA,CE5BJ,yBF2BA,0CAGQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI,WAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CEjCA,0BF6BJ,8BAMQ,WAAA,CACA,UAAA,CAAA,CAIZ,cACI,iBAAA,CACA,MAAA,CACA,UAAA,CAEA,8BC1DF,iCD2D6B,CC1D7B,yBD0D6B,CACvB,qBAAA,CACA,UAAA,CACA,wBAAA,CACA,WAAA,CACA,iBAAA,CACA,QAAA,CEpDA,0BF6CJ,8BASQ,QAAA,CAAA,CE1DJ,yBFiDJ,8BAaQ,WAAA,CAAA,CElEJ,yBFqDJ,8BAgBQ,WAAA,CAAA,CEzEJ,0BFyDJ,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,CEhFR,0BF8EI,6DAIQ,gBAAA,CAAA,CE1FZ,yBFsFI,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,CE3GhB,0BF0GY,2FAGQ,YAAA,CAAA,CErHpB,yBFkHY,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,yGACI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,aAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,kCKpKD,CLqKC,eAAA,CACA,qHACI,yBAAA,CAEJ,6IACI,6BAAA",sourcesContent:['@import "../../../style/all";\n\n* {\n box-sizing: border-box;\n}\n\nbutton.menu-toggle-button {\n @include border-radius(4px);\n border: none;\n background: transparent;\n background-color: rgb(125, 116, 109);\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, button {\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 border: none;\n font-size: 16px;\n font-weight: 300;\n font-family: $default-font;\n background: none;\n &:hover {\n text-decoration: underline;\n }\n &:not(:first-child) {\n border-left: 1px solid #b6afa8;\n }\n }\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}","@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","\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", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const a=s},5149:(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 s={};if(i)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);i&&s[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," */");return[t].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 s(e){try{u(i.next(e))}catch(e){r(e)}}function a(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(s,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(5969),r=n(5773),s=n(3804);t.Component=e=>t=>{var n;const a=e.tag||s.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=>s.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,i=!0){if(t!=n){i&&(this[s.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(a)||customElements.define(a,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}},6989:e=>{e.exports='<svg data-prefix="fas" data-icon="times" class="__1mUhmph__svg-inline--fa __1mUhmph__fa-times __1mUhmph__fa-w-11 __1mUhmph__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><title>ikon for lukk</title><path fill="#2F3940" 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 data-prefix="fas" data-icon="bars" class="__3IzhWwQ__svg-inline--fa __3IzhWwQ__fa-bars __3IzhWwQ__fa-w-14 __3IzhWwQ__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title>Menyikon</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>'},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 s(e){try{u(i.next(e))}catch(e){r(e)}}function a(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(s,a)}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}`},s={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`,s).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))},5527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},8641: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,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>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)&&i(t,e,n);return o(t,e),t},a=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=a(n(7291)),l=a(n(6989)),d=n(9480),p=n(5527);let h=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}" tabindex="${this.showmenu?null:"-1"}">${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("button"),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.showmenu||t.setAttribute("tabindex","-1"),this.menuActionsRow.appendChild(t)}addLanguageSelectLinks(e=!1){let t;if(!(this.norwegianurl&&this.englishurl||e))return"";e?(t=document.createElement("button"),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.showmenu||t.setAttribute("tabindex","-1"),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"),(0,p.getFocusableElementsInsideElement)(this.menuContainer).forEach((e=>{this.showmenu?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1")}))}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)}};h.elementSelector="main-menu",r([(0,u.Prop)()],h.prototype,"id",void 0),r([(0,u.Prop)()],h.prototype,"language",void 0),r([(0,u.Prop)()],h.prototype,"environment",void 0),r([(0,u.Prop)()],h.prototype,"signinurl",void 0),r([(0,u.Prop)()],h.prototype,"signouturl",void 0),r([(0,u.Prop)()],h.prototype,"norwegianurl",void 0),r([(0,u.Prop)()],h.prototype,"englishurl",void 0),r([(0,u.Toggle)()],h.prototype,"isloggedin",void 0),r([(0,u.Toggle)()],h.prototype,"showmenu",void 0),r([(0,u.Toggle)()],h.prototype,"hasAuthenticationFunction",void 0),r([(0,u.Toggle)()],h.prototype,"hasLanguageSelectFunctions",void 0),r([(0,u.Prop)()],h.prototype,"menuitems",void 0),r([(0,u.Dispatch)("onSignInClick")],h.prototype,"onSignInClick",void 0),r([(0,u.Dispatch)("onSignOutClick")],h.prototype,"onSignOutClick",void 0),r([(0,u.Dispatch)("onNorwegianLanguageSelect")],h.prototype,"onNorwegianLanguageSelect",void 0),r([(0,u.Dispatch)("onEnglishLanguageSelect")],h.prototype,"onEnglishLanguageSelect",void 0),r([(0,u.Listen)("click","#menu-toggle-button")],h.prototype,"buttonClicked",null),r([(0,u.Watch)("hasauthenticationfunction")],h.prototype,"hasAuthenticationFunctionChanged",null),r([(0,u.Watch)("isloggedin")],h.prototype,"isLoggedInChanged",null),r([(0,u.Watch)("haslanguageselectfunctions")],h.prototype,"hasLanguageSelectFunctionsChanged",null),r([(0,u.Watch)("language")],h.prototype,"languageChanged",null),r([(0,u.Watch)("showmenu")],h.prototype,"showMenuChanged",null),r([(0,u.Watch)("menuitems")],h.prototype,"menuItemsChanged",null),h=r([(0,u.Component)({tag:"main-menu",template:Promise.resolve().then((()=>s(n(5149)))),style:Promise.resolve().then((()=>s(n(2248))))})],h),t.MainMenu=h}},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(8641)})())); | ||
//# 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,(()=>(()=>{var e={9915:(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{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;height:37px;width:100%;outline-offset:-2px;background:#fff;border:1px solid #dfdcda;border-right:0;font-size:1.2em;flex:1;margin:0;padding:0 .75em}div.main-search-field button{-webkit-appearance:button;-moz-appearance:button;appearance:button;-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;margin:0;background:#fff;border:1px solid #dfdcda;border-left: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://./stories/main-navigation/main-search-field/main-search-field.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.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,4BGvBE,uBHwBoB,CGvBpB,oBHuBoB,CGtBpB,eHsBoB,CIxBtB,iCJyByB,CIxBzB,yBJwByB,CACvB,WAAA,CACA,UAAA,CACA,mBAAA,CACA,eAAA,CACA,wBAAA,CACA,cAAA,CACA,eAAA,CACA,MAAA,CACA,QAAA,CACA,eAAA,CAGF,6BGtCE,yBHuCoB,CGtCpB,sBHsCoB,CGrCpB,iBHqCoB,CIvCtB,iCJwCyB,CIvCzB,yBJuCyB,CACvB,QAAA,CACA,eAAA,CACA,wBAAA,CACA,aAAA,CACA,oBAAA,CACA,eAAA,CACA,WAAA,CAEA,iCACE,WAAA,CACA,UAAA,CAKN,6BKxDI,8GLyDF,CKxDE,2GLwDF,CKvDE,sGLuDF,CIzDA,iCJ8DuB,CI7DvB,yBJ6DuB,CACvB,iBAAA,CACA,kBAAA,CACA,YAAA,CACA,QAAA,CACA,SAAA,CAEA,kCACE,aAAA,CACA,UAAA,CACA,eAAA,CAGF,+BACE,aM7DW,CN8DX,oBAAA,CACA,qCACE,aM/Dc,CNgEd,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,wBMzFQ,CN0FR,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 @include appearance(none);\n @include border-radius(4px 0 0 4px);\n height: 37px;\n width: 100%;\n outline-offset: -2px;\n background: #fff;\n border: 1px solid #dfdcda;\n border-right: 0;\n font-size: 1.2em;\n flex: 1;\n margin: 0;\n padding: 0 0.75em;\n }\n\n button {\n @include appearance(button);\n @include border-radius(0 4px 4px 0);\n margin: 0;\n background: #fff;\n border: 1px solid #dfdcda;\n border-left: 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", sans-serif;',"@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 appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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","$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},8060:(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," */");return[t].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>'},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>`},1369: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 p=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)}};p.elementSelector="main-search-field",o([(0,c.Prop)()],p.prototype,"id",void 0),o([(0,c.Prop)()],p.prototype,"environment",void 0),o([(0,c.Toggle)()],p.prototype,"showSearchResults",void 0),o([(0,c.Toggle)()],p.prototype,"preventRedirect",void 0),o([(0,c.Prop)()],p.prototype,"searchstring",void 0),o([(0,c.Prop)()],p.prototype,"language",void 0),o([(0,c.Prop)()],p.prototype,"searchResultsResponses",void 0),o([(0,c.Dispatch)("searchResultsChanged")],p.prototype,"onTextChanged",void 0),o([(0,c.Dispatch)("onSearchStringChange")],p.prototype,"onSearchStringChange",void 0),o([(0,c.Dispatch)("onSearch")],p.prototype,"onSearch",void 0),o([(0,c.Listen)("keyup","input")],p.prototype,"searchFieldKeyUp",null),o([(0,c.Listen)("click","#search-submit-button")],p.prototype,"onSearchSubmitted",null),o([(0,c.Watch)("searchstring")],p.prototype,"searchStringChanged",null),o([(0,c.Watch)("language")],p.prototype,"languageChanged",null),o([(0,c.Watch)("showsearchresults")],p.prototype,"showSearchResultsChanged",null),o([(0,c.Watch)("searchResultsResponses")],p.prototype,"searchResultsResponseChanged",null),p=o([(0,c.Component)({tag:"main-search-field",template:Promise.resolve().then((()=>i(n(8060)))),style:Promise.resolve().then((()=>i(n(9915))))})],p),t.MainSearchField=p}},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(1369)})())); | ||
!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={9915:(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{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;height:37px;width:100%;outline-offset:-2px;background:#fff;border:1px solid #dfdcda;border-right:0;font-size:1.2em;flex:1;margin:0;padding:0 .75em}div.main-search-field button{-webkit-appearance:button;-moz-appearance:button;appearance:button;-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;margin:0;background:#fff;border:1px solid #dfdcda;border-left: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://./stories/main-navigation/main-search-field/main-search-field.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.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,4BGvBE,uBHwBoB,CGvBpB,oBHuBoB,CGtBpB,eHsBoB,CIxBtB,iCJyByB,CIxBzB,yBJwByB,CACvB,WAAA,CACA,UAAA,CACA,mBAAA,CACA,eAAA,CACA,wBAAA,CACA,cAAA,CACA,eAAA,CACA,MAAA,CACA,QAAA,CACA,eAAA,CAGF,6BGtCE,yBHuCoB,CGtCpB,sBHsCoB,CGrCpB,iBHqCoB,CIvCtB,iCJwCyB,CIvCzB,yBJuCyB,CACvB,QAAA,CACA,eAAA,CACA,wBAAA,CACA,aAAA,CACA,oBAAA,CACA,eAAA,CACA,WAAA,CAEA,iCACE,WAAA,CACA,UAAA,CAKN,6BKxDI,8GLyDF,CKxDE,2GLwDF,CKvDE,sGLuDF,CIzDA,iCJ8DuB,CI7DvB,yBJ6DuB,CACvB,iBAAA,CACA,kBAAA,CACA,YAAA,CACA,QAAA,CACA,SAAA,CAEA,kCACE,aAAA,CACA,UAAA,CACA,eAAA,CAGF,+BACE,aM7DW,CN8DX,oBAAA,CACA,qCACE,aM/Dc,CNgEd,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,wBMzFQ,CN0FR,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 @include appearance(none);\n @include border-radius(4px 0 0 4px);\n height: 37px;\n width: 100%;\n outline-offset: -2px;\n background: #fff;\n border: 1px solid #dfdcda;\n border-right: 0;\n font-size: 1.2em;\n flex: 1;\n margin: 0;\n padding: 0 0.75em;\n }\n\n button {\n @include appearance(button);\n @include border-radius(0 4px 4px 0);\n margin: 0;\n background: #fff;\n border: 1px solid #dfdcda;\n border-left: 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", sans-serif;\n$default-font-size: 14px;\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","\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\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","$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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},8060:(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," */");return[t].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>'},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>`},1369: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 p=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)}};p.elementSelector="main-search-field",o([(0,c.Prop)()],p.prototype,"id",void 0),o([(0,c.Prop)()],p.prototype,"environment",void 0),o([(0,c.Toggle)()],p.prototype,"showSearchResults",void 0),o([(0,c.Toggle)()],p.prototype,"preventRedirect",void 0),o([(0,c.Prop)()],p.prototype,"searchstring",void 0),o([(0,c.Prop)()],p.prototype,"language",void 0),o([(0,c.Prop)()],p.prototype,"searchResultsResponses",void 0),o([(0,c.Dispatch)("searchResultsChanged")],p.prototype,"onTextChanged",void 0),o([(0,c.Dispatch)("onSearchStringChange")],p.prototype,"onSearchStringChange",void 0),o([(0,c.Dispatch)("onSearch")],p.prototype,"onSearch",void 0),o([(0,c.Listen)("keyup","input")],p.prototype,"searchFieldKeyUp",null),o([(0,c.Listen)("click","#search-submit-button")],p.prototype,"onSearchSubmitted",null),o([(0,c.Watch)("searchstring")],p.prototype,"searchStringChanged",null),o([(0,c.Watch)("language")],p.prototype,"languageChanged",null),o([(0,c.Watch)("showsearchresults")],p.prototype,"showSearchResultsChanged",null),o([(0,c.Watch)("searchResultsResponses")],p.prototype,"searchResultsResponseChanged",null),p=o([(0,c.Component)({tag:"main-search-field",template:Promise.resolve().then((()=>i(n(8060)))),style:Promise.resolve().then((()=>i(n(9915))))})],p),t.MainSearchField=p}},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(1369)})())); | ||
//# 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,(()=>(()=>{var t={2562:(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{-webkit-border-radius:50%;border-radius:50%;background-color:#fe5000;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;border:none;font-size:16px;font-weight:400;width:100%;font-family:"Open Sans",sans-serif}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://./stories/main-navigation/map-items/map-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/variables/_typography.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,qDGnBN,yBHoBiC,CGnBjC,iBHmBiC,CACvB,wBIXI,CJYJ,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,wEGtDN,iCHuDiC,CGtDjC,yBHsDiC,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,aIvED,CJwEC,oBAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,kCM9FD,CN+FC,iGACI,yBAAA,CACA,aIhFA,CJmFR,2EACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,8ECvGZ,oCDwGgB,CCvGhB,kCDuGgB,CCtGhB,uCDsGgB,CCrGhB,+BDqGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,oFACI,gCI7GL,CJ+GC,yFACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,6FACI,aIxFd,CJyFc,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 @include border-radius(50%);\n background-color: $primary-brand;\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 border: none;\n font-size: 16px;\n font-weight: 400;\n width: 100%;\n font-family: $default-font;\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","@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const s=a},293:(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 l=0;l<t.length;l++){var c=[].concat(t[l]);i&&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),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),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 i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */");return[e].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"><title>Kartikon</title><style type="text/css"> .__zICRBCs__st0{fill:currentColor;} </style><path class="__zICRBCs__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="__1FtTC55__svg-inline--fa __1FtTC55__fa-trash __1FtTC55__fa-w-14 __1FtTC55__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title>Soppelkasse ikon</title><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>'},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)}},5527:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},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=()=>{const t=-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"),n=window.sessionStorage.isLocalKartkatalogEnvironment;if(t||n)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>`},1717: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),l=s(n(2635)),c=s(n(2374)),d=n(8586),u=n(1406),m=n(5527);let h=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=c.default,n.dataset.mapItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.Title} from map`:`Fjern ${t.Title} fra kart`),this.showList||n.setAttribute("tabindex","-1"),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("button"),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.showList||n.setAttribute("tabindex","-1"),this.mapItemListContainer.innerHTML=(null==e?void 0:e.length)?`<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=l.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 ${t} map ${1===t?"item":"items"} in list`:`Vis liste med ${t} ${1===t?"element":"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)),this.onMapItemsChange&&this.onMapItemsChange.emit({detail:this.onMapItemsChange})}}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"),(0,m.getFocusableElementsInsideElement)(this.mapItemListContainer).forEach((t=>{this.showList?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}))}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)}};h.elementSelector="map-items",r([(0,p.Prop)()],h.prototype,"id",void 0),r([(0,p.Prop)()],h.prototype,"environment",void 0),r([(0,p.Prop)()],h.prototype,"language",void 0),r([(0,p.Toggle)()],h.prototype,"showList",void 0),r([(0,p.Toggle)()],h.prototype,"preventRedirect",void 0),r([(0,p.Dispatch)("onOpenEmptyMapItemsList")],h.prototype,"onOpenEmptyMapItemsList",void 0),r([(0,p.Dispatch)("onMapItemsChange")],h.prototype,"onMapItemsChange",void 0),r([(0,p.Listen)("click","#map-toggle-button")],h.prototype,"buttonClicked",null),r([(0,p.Listen)("click","#map-item-list-container")],h.prototype,"removeMapItemClicked",null),r([(0,p.Watch)("showlist")],h.prototype,"showMenuChanged",null),r([(0,p.Watch)("mapItems")],h.prototype,"mapItemsChanged",null),r([(0,p.Watch)("language")],h.prototype,"languageChanged",null),r([(0,p.Watch)("preventredirect")],h.prototype,"preventRedirectChanged",null),h=r([(0,p.Component)({tag:"map-items",template:Promise.resolve().then((()=>a(n(293)))),style:Promise.resolve().then((()=>a(n(2562))))})],h),e.MapItems=h}},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(1717)})())); | ||
!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={2562:(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{-webkit-border-radius:50%;border-radius:50%;background-color:#fe5000;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;border:none;font-size:16px;font-weight:400;width:100%;font-family:"Open Sans",sans-serif}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://./stories/main-navigation/map-items/map-items.scss","webpack://./style/mixins/_transition.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/variables/_typography.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,qDGnBN,yBHoBiC,CGnBjC,iBHmBiC,CACvB,wBIXI,CJYJ,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,wEGtDN,iCHuDiC,CGtDjC,yBHsDiC,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,aIvED,CJwEC,oBAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,kCM9FD,CN+FC,iGACI,yBAAA,CACA,aIhFA,CJmFR,2EACI,eAAA,CACA,SAAA,CACA,QAAA,CACA,8ECvGZ,oCDwGgB,CCvGhB,kCDuGgB,CCtGhB,uCDsGgB,CCrGhB,+BDqGgB,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,gBAAA,CACA,oFACI,gCI7GL,CJ+GC,yFACI,eAAA,CACA,cAAA,CACA,eAAA,CACA,WAAA,CACA,6FACI,aIxFd,CJyFc,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 @include border-radius(50%);\n background-color: $primary-brand;\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 border: none;\n font-size: 16px;\n font-weight: 400;\n width: 100%;\n font-family: $default-font;\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","@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const s=a},293:(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 l=0;l<t.length;l++){var c=[].concat(t[l]);i&&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),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),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 i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */");return[e].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"><title>Kartikon</title><style type="text/css"> .__zICRBCs__st0{fill:currentColor;} </style><path class="__zICRBCs__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="__1FtTC55__svg-inline--fa __1FtTC55__fa-trash __1FtTC55__fa-w-14 __1FtTC55__ " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><title>Soppelkasse ikon</title><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>'},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)}},5527:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},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=()=>{const t=-1!==window.location.hostname.toLowerCase().indexOf("kartkatalog"),n=window.sessionStorage.isLocalKartkatalogEnvironment;if(t||n)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>`},1717: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),l=s(n(2635)),c=s(n(2374)),d=n(8586),u=n(1406),m=n(5527);let h=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=c.default,n.dataset.mapItem=JSON.stringify(t),n.setAttribute("aria-label","en"===this.language?`Remove ${t.Title} from map`:`Fjern ${t.Title} fra kart`),this.showList||n.setAttribute("tabindex","-1"),e.appendChild(n),`<li>${e.innerHTML}</li>`}return null})).filter((t=>t)).join("");let n;this.preventRedirect?(n=document.createElement("button"),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.showList||n.setAttribute("tabindex","-1"),this.mapItemListContainer.innerHTML=(null==e?void 0:e.length)?`<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=l.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 ${t} map ${1===t?"item":"items"} in list`:`Vis liste med ${t} ${1===t?"element":"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)),this.onMapItemsChange&&this.onMapItemsChange.emit({detail:this.onMapItemsChange})}}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"),(0,m.getFocusableElementsInsideElement)(this.mapItemListContainer).forEach((t=>{this.showList?t.removeAttribute("tabindex"):t.setAttribute("tabindex","-1")}))}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)}};h.elementSelector="map-items",r([(0,p.Prop)()],h.prototype,"id",void 0),r([(0,p.Prop)()],h.prototype,"environment",void 0),r([(0,p.Prop)()],h.prototype,"language",void 0),r([(0,p.Toggle)()],h.prototype,"showList",void 0),r([(0,p.Toggle)()],h.prototype,"preventRedirect",void 0),r([(0,p.Dispatch)("onOpenEmptyMapItemsList")],h.prototype,"onOpenEmptyMapItemsList",void 0),r([(0,p.Dispatch)("onMapItemsChange")],h.prototype,"onMapItemsChange",void 0),r([(0,p.Listen)("click","#map-toggle-button")],h.prototype,"buttonClicked",null),r([(0,p.Listen)("click","#map-item-list-container")],h.prototype,"removeMapItemClicked",null),r([(0,p.Watch)("showlist")],h.prototype,"showMenuChanged",null),r([(0,p.Watch)("mapItems")],h.prototype,"mapItemsChanged",null),r([(0,p.Watch)("language")],h.prototype,"languageChanged",null),r([(0,p.Watch)("preventredirect")],h.prototype,"preventRedirectChanged",null),h=r([(0,p.Component)({tag:"map-items",template:Promise.resolve().then((()=>a(n(293)))),style:Promise.resolve().then((()=>a(n(2562))))})],h),e.MapItems=h}},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(1717)})())); | ||
//# 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.NavigationTabHeading=e())}(self,(()=>(()=>{"use strict";var t={374:(t,e,o)=>{o.r(e),o.d(e,{default:()=>a});var n=o(4663),r=o.n(n),s=o(7638),i=o.n(s)()(r());i.push([t.id,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;display:block;background-color:#4c7aa9;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid rgba(0,0,0,0);background-clip:padding-box;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://./stories/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WENF,iCFO6B,CEN7B,yBFM6B,CACvB,aAAA,CACA,wBGEU,CHDV,iBAAA,CACA,6BAAA,CACA,UAAA,CACA,qCAAA,CACA,2BAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBGXI,CHYJ,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 @include border-radius(4px 4px 0 0);\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 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 \n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},4843:(t,e,o)=>{o.r(e),o.d(e,{default:()=>a});var n=o(4663),r=o.n(n),s=o(7638),i=o.n(s)()(r());i.push([t.id,"navigation-tab-heading a{color:#fff;text-decoration:none;margin:-10px -12px;padding:10px 12px}navigation-tab-heading[selected=true] a{color:#555}","",{version:3,sources:["webpack://./stories/navigation-tabs/navigation-tab-heading/slottedStyles.scss"],names:[],mappings:"AACI,yBACI,UAAA,CACA,oBAAA,CACA,kBAAA,CACA,iBAAA,CAGA,wCACI,UAAA",sourcesContent:['navigation-tab-heading {\n a {\n color: #fff;\n text-decoration: none;\n margin: -10px -12px;\n padding: 10px 12px;\n }\n &[selected="true"] {\n a {\n color: #555;\n }\n }\n}\n'],sourceRoot:""}]);const a=i},5937:(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 i={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var d=0;d<t.length;d++){var l=[].concat(t[d]);n&&i[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," */");return[e].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 i(t){try{c(n.next(t))}catch(t){s(t)}}function a(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(i,a)}c((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 a=t.tag||i.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=>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(a)||customElements.define(a,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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const o=document.createElement("style");o.setAttribute("id",t),o.textContent=e,document.getElementById(t)||document.head.appendChild(o)}},5325: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,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 a=t.length-1;a>=0;a--)(r=t[a])&&(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},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const c=o(406),d=o(5527),l=a(o(4843));let u=0,p=class extends c.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-"+u++),this.tabHeadingElement=(0,c.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected"),(0,d.addGlobalStylesheet)("navigation-tab-heading-styles",l.default)}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}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,c.getElement)(t)}};p.elementSelector="navigation-tab-heading",s([(0,c.Prop)()],p.prototype,"id",void 0),s([(0,c.Toggle)()],p.prototype,"selected",void 0),s([(0,c.Watch)("selected")],p.prototype,"selectedChanged",null),p=s([(0,c.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>i(o(5937)))),style:Promise.resolve().then((()=>i(o(374))))})],p),e.NavigationTabHeading=p}},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(5325)})())); | ||
!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={374:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([t.id,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;display:block;background-color:#4c7aa9;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid rgba(0,0,0,0);background-clip:padding-box;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://./stories/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WENF,iCFO6B,CEN7B,yBFM6B,CACvB,aAAA,CACA,wBGEU,CHDV,iBAAA,CACA,6BAAA,CACA,UAAA,CACA,qCAAA,CACA,2BAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBGXI,CHYJ,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 @include border-radius(4px 4px 0 0);\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 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 \n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const a=i},4843:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([t.id,"navigation-tab-heading a{color:#fff;text-decoration:none;margin:-10px -12px;padding:10px 12px}navigation-tab-heading[selected=true] a{color:#555}","",{version:3,sources:["webpack://./stories/navigation-tabs/navigation-tab-heading/slottedStyles.scss"],names:[],mappings:"AACI,yBACI,UAAA,CACA,oBAAA,CACA,kBAAA,CACA,iBAAA,CAGA,wCACI,UAAA",sourcesContent:['navigation-tab-heading {\n a {\n color: #fff;\n text-decoration: none;\n margin: -10px -12px;\n padding: 10px 12px;\n }\n &[selected="true"] {\n a {\n color: #555;\n }\n }\n}\n'],sourceRoot:""}]);const a=i},5937:(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="",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,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][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!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),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),s="/*# ".concat(r," */");return[e].concat([s]).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,s){function i(t){try{c(o.next(t))}catch(t){s(t)}}function a(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(i,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);e.Component=t=>e=>{var n;const a=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),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(a)||customElements.define(a,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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},5325: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}),s=this&&this.__decorate||function(t,e,n,o){var r,s=arguments.length,i=s<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 a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(e,n,i):r(e,n))||i);return s>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},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const c=n(406),d=n(5527),l=a(n(4843));let u=0,p=class extends c.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-"+u++),this.tabHeadingElement=(0,c.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected"),(0,d.addGlobalStylesheet)("navigation-tab-heading-styles",l.default)}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}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,c.getElement)(t)}};p.elementSelector="navigation-tab-heading",s([(0,c.Prop)()],p.prototype,"id",void 0),s([(0,c.Toggle)()],p.prototype,"selected",void 0),s([(0,c.Watch)("selected")],p.prototype,"selectedChanged",null),p=s([(0,c.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>i(n(5937)))),style:Promise.resolve().then((()=>i(n(374))))})],p),e.NavigationTabHeading=p}},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(5325)})())); | ||
//# 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,(()=>(()=>{"use strict";var t={4540:(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,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const s=a},374:(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,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;display:block;background-color:#4c7aa9;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid rgba(0,0,0,0);background-clip:padding-box;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://./stories/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WENF,iCFO6B,CEN7B,yBFM6B,CACvB,aAAA,CACA,wBGEU,CHDV,iBAAA,CACA,6BAAA,CACA,UAAA,CACA,qCAAA,CACA,2BAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBGXI,CHYJ,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 @include border-radius(4px 4px 0 0);\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 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 \n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"@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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},4843:(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,"navigation-tab-heading a{color:#fff;text-decoration:none;margin:-10px -12px;padding:10px 12px}navigation-tab-heading[selected=true] a{color:#555}","",{version:3,sources:["webpack://./stories/navigation-tabs/navigation-tab-heading/slottedStyles.scss"],names:[],mappings:"AACI,yBACI,UAAA,CACA,oBAAA,CACA,kBAAA,CACA,iBAAA,CAGA,wCACI,UAAA",sourcesContent:['navigation-tab-heading {\n a {\n color: #fff;\n text-decoration: none;\n margin: -10px -12px;\n padding: 10px 12px;\n }\n &[selected="true"] {\n a {\n color: #555;\n }\n }\n}\n'],sourceRoot:""}]);const s=a},6457:(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,':host{font-family:"Open Sans",sans-serif;display:block}:host .navigation-tab-headings{width:100%;border-bottom:1px solid #414042;margin-bottom:10px;display:flex;flex-wrap:wrap}',"",{version:3,sources:["webpack://./stories/navigation-tabs/navigation-tabs.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,aAAA,CACA,+BACI,UAAA,CACA,+BAAA,CACA,kBAAA,CACA,YAAA,CACA,cAAA",sourcesContent:['@import "../../style/all";\n\n:host {\n font-family: $default-font;\n display: block;\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", sans-serif;'],sourceRoot:""}]);const s=a},8349:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-content"></slot>\n</template>'},5937:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-heading"></slot>\n</template>'},9143:(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,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," */");return[e].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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},7108: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.NavigationTabContent=void 0;const s=n(406);let c=0,l=class extends s.CustomElement{static get observedAttributes(){return["selected"]}constructor(){super()}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",i([(0,s.Prop)()],l.prototype,"id",void 0),l=i([(0,s.Component)({tag:"navigation-tab-content",template:Promise.resolve().then((()=>a(n(8349)))),style:Promise.resolve().then((()=>a(n(4540))))})],l),e.NavigationTabContent=l},5325: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},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const c=n(406),l=n(5527),d=s(n(4843));let u=0,b=class extends c.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-"+u++),this.tabHeadingElement=(0,c.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected"),(0,l.addGlobalStylesheet)("navigation-tab-heading-styles",d.default)}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}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,c.getElement)(t)}};b.elementSelector="navigation-tab-heading",i([(0,c.Prop)()],b.prototype,"id",void 0),i([(0,c.Toggle)()],b.prototype,"selected",void 0),i([(0,c.Watch)("selected")],b.prototype,"selectedChanged",null),b=i([(0,c.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>a(n(5937)))),style:Promise.resolve().then((()=>a(n(374))))})],b),e.NavigationTabHeading=b},7945: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.NavigationTabs=void 0;const s=n(406),c=n(5325),l=n(7108);let d=class extends s.CustomElement{static get observedAttributes(){return["selected"]}constructor(){super(),this.onSlotChange=this.onSlotChange.bind(this)}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),e.setAttribute("id",e.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",i([(0,s.Prop)()],d.prototype,"id",void 0),i([(0,s.Prop)()],d.prototype,"selectedtab",void 0),i([(0,s.Dispatch)("onSearch")],d.prototype,"onSearch",void 0),d=i([(0,s.Component)({tag:"navigation-tabs",template:Promise.resolve().then((()=>a(n(9143)))),style:Promise.resolve().then((()=>a(n(6457))))})],d),e.NavigationTabs=d}},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(7945)})())); | ||
!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={4540:(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,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const s=a},374:(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,':host{font-family:"Open Sans",sans-serif;display:inline-flex;cursor:pointer}:host slot{-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;display:block;background-color:#4c7aa9;padding:10px 12px;transition:all .35s linear 0s;color:#fff;border-bottom:1px solid rgba(0,0,0,0);background-clip:padding-box;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://./stories/navigation-tabs/navigation-tab-heading/navigation-tab-heading.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,mBAAA,CACA,cAAA,CAEA,WENF,iCFO6B,CEN7B,yBFM6B,CACvB,aAAA,CACA,wBGEU,CHDV,iBAAA,CACA,6BAAA,CACA,UAAA,CACA,qCAAA,CACA,2BAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CAEA,iBACI,wBGXI,CHYJ,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 @include border-radius(4px 4px 0 0);\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 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 \n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 14px;\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$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\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: #eee;\n$disabled-text: #d8d8d8;\n"],sourceRoot:""}]);const s=a},4843:(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,"navigation-tab-heading a{color:#fff;text-decoration:none;margin:-10px -12px;padding:10px 12px}navigation-tab-heading[selected=true] a{color:#555}","",{version:3,sources:["webpack://./stories/navigation-tabs/navigation-tab-heading/slottedStyles.scss"],names:[],mappings:"AACI,yBACI,UAAA,CACA,oBAAA,CACA,kBAAA,CACA,iBAAA,CAGA,wCACI,UAAA",sourcesContent:['navigation-tab-heading {\n a {\n color: #fff;\n text-decoration: none;\n margin: -10px -12px;\n padding: 10px 12px;\n }\n &[selected="true"] {\n a {\n color: #555;\n }\n }\n}\n'],sourceRoot:""}]);const s=a},6457:(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,':host{font-family:"Open Sans",sans-serif;display:block}:host .navigation-tab-headings{width:100%;border-bottom:1px solid #414042;margin-bottom:10px;display:flex;flex-wrap:wrap}',"",{version:3,sources:["webpack://./stories/navigation-tabs/navigation-tabs.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,MACI,kCCHW,CDIX,aAAA,CACA,+BACI,UAAA,CACA,+BAAA,CACA,kBAAA,CACA,YAAA,CACA,cAAA",sourcesContent:['@import "../../style/all";\n\n:host {\n font-family: $default-font;\n display: block;\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", sans-serif;\n$default-font-size: 14px;\n'],sourceRoot:""}]);const s=a},8349:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-content"></slot>\n</template>'},5937:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o='<template>\n <slot name="tab-heading"></slot>\n</template>'},9143:(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,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," */");return[e].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}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},7108: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.NavigationTabContent=void 0;const s=n(406);let c=0,l=class extends s.CustomElement{static get observedAttributes(){return["selected"]}constructor(){super()}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",i([(0,s.Prop)()],l.prototype,"id",void 0),l=i([(0,s.Component)({tag:"navigation-tab-content",template:Promise.resolve().then((()=>a(n(8349)))),style:Promise.resolve().then((()=>a(n(4540))))})],l),e.NavigationTabContent=l},5325: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},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationTabHeading=void 0;const c=n(406),l=n(5527),d=s(n(4843));let u=0,b=class extends c.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-"+u++),this.tabHeadingElement=(0,c.getShadowRootElement)(this,"slot[name=tab-heading]"),this.setAttribute("aria-selected","false"),this.setAttribute("tabindex","-1"),this._upgradeProperty("selected"),(0,l.addGlobalStylesheet)("navigation-tab-heading-styles",d.default)}_upgradeProperty(t){if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}}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,c.getElement)(t)}};b.elementSelector="navigation-tab-heading",i([(0,c.Prop)()],b.prototype,"id",void 0),i([(0,c.Toggle)()],b.prototype,"selected",void 0),i([(0,c.Watch)("selected")],b.prototype,"selectedChanged",null),b=i([(0,c.Component)({tag:"navigation-tab-heading",template:Promise.resolve().then((()=>a(n(5937)))),style:Promise.resolve().then((()=>a(n(374))))})],b),e.NavigationTabHeading=b},7945: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.NavigationTabs=void 0;const s=n(406),c=n(5325),l=n(7108);let d=class extends s.CustomElement{static get observedAttributes(){return["selected"]}constructor(){super(),this.onSlotChange=this.onSlotChange.bind(this)}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),e.setAttribute("id",e.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",i([(0,s.Prop)()],d.prototype,"id",void 0),i([(0,s.Prop)()],d.prototype,"selectedtab",void 0),i([(0,s.Dispatch)("onSearch")],d.prototype,"onSearch",void 0),d=i([(0,s.Component)({tag:"navigation-tabs",template:Promise.resolve().then((()=>a(n(9143)))),style:Promise.resolve().then((()=>a(n(6457))))})],d),e.NavigationTabs=d}},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(7945)})())); | ||
//# sourceMappingURL=NavigationTabs.js.map |
{ | ||
"name": "@kartverket/geonorge-web-components", | ||
"version": "2.8.1", | ||
"version": "2.9.0", | ||
"description": "Geonorge Web Components", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
4599752
165
3984