@oslokommune/punkt-elements 12.3.10 → 12.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{class-map-CFiVus5w.cjs → class-map-BQ5k1q3A.cjs} +1 -1
  2. package/dist/{class-map-DnAEF9tj.js → class-map-CL_lSLwn.js} +1 -1
  3. package/dist/{index-DZ0cjZdG.cjs → index-BFqUD8HI.cjs} +1 -1
  4. package/dist/{index-DZGlpxj6.cjs → index-BUZITHLd.cjs} +6 -6
  5. package/dist/{index-BAKMcM4b.js → index-Gx8odlcY.js} +3 -3
  6. package/dist/{index-CsKoXqeT.js → index-exzYRW0z.js} +1 -1
  7. package/dist/{index-BoxUN9GL.js → index-m5WP1NKD.js} +47 -35
  8. package/dist/{index-C92NwPcv.cjs → index-wplohQV8.cjs} +1 -1
  9. package/dist/index.d.ts +4 -1
  10. package/dist/pkt-alert.cjs +1 -1
  11. package/dist/pkt-alert.js +4 -4
  12. package/dist/pkt-calendar.cjs +1 -1
  13. package/dist/pkt-calendar.js +4 -4
  14. package/dist/pkt-card.cjs +1 -1
  15. package/dist/pkt-card.js +4 -4
  16. package/dist/pkt-component-template.cjs +1 -1
  17. package/dist/pkt-component-template.js +3 -3
  18. package/dist/pkt-datepicker.cjs +34 -30
  19. package/dist/pkt-datepicker.js +77 -59
  20. package/dist/pkt-element.cjs +1 -1
  21. package/dist/pkt-element.js +1 -1
  22. package/dist/pkt-icon.cjs +1 -1
  23. package/dist/pkt-icon.js +2 -2
  24. package/dist/pkt-index.cjs +1 -1
  25. package/dist/pkt-index.js +2 -2
  26. package/dist/pkt-input-wrapper.cjs +1 -1
  27. package/dist/pkt-input-wrapper.js +4 -4
  28. package/dist/pkt-link.cjs +1 -1
  29. package/dist/pkt-link.js +4 -4
  30. package/dist/pkt-messagebox.cjs +1 -1
  31. package/dist/pkt-messagebox.js +4 -4
  32. package/dist/pkt-tag.cjs +1 -1
  33. package/dist/pkt-tag.js +4 -4
  34. package/dist/{ref-G2cIenWo.cjs → ref-BdbjJbqo.cjs} +1 -1
  35. package/dist/{ref-DzpbHCb_.js → ref-bNNrgsqL.js} +1 -1
  36. package/package.json +2 -2
  37. package/src/components/datepicker/index.ts +43 -6
  38. package/src/components/element/index.ts +17 -5
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("./index-DZGlpxj6.cjs"),n=require("./directive-19_ixLKS.cjs");/**
1
+ "use strict";const a=require("./index-BUZITHLd.cjs"),n=require("./directive-19_ixLKS.cjs");/**
2
2
  * @license
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- import { R as a } from "./index-BoxUN9GL.js";
1
+ import { R as a } from "./index-m5WP1NKD.js";
2
2
  import { e as h, i as d, a as c } from "./directive-DA0-wdk7.js";
3
3
  /**
4
4
  * @license
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index-DZGlpxj6.cjs"),n=require("./directive-19_ixLKS.cjs");/**
1
+ "use strict";const o=require("./index-BUZITHLd.cjs"),n=require("./directive-19_ixLKS.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -6,13 +6,13 @@
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:xt,getOwnPropertyNames:Ct,getOwnPropertySymbols:Tt,getPrototypeOf:Mt}=Object,v=globalThis,et=v.trustedTypes,Ot=et?et.emptyScript:"",q=v.reactiveElementPolyfillSupport,T=(r,t)=>r,D={toAttribute(r,t){switch(t){case Boolean:r=r?Ot:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},K=(r,t)=>!Ut(r,t),st={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:K};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),v.litPropertyMetadata??(v.litPropertyMetadata=new WeakMap);class P extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Pt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=xt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const h=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??st}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=Mt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,s=[...Ct(e),...Tt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(tt(i))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return wt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:D).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),h=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:D;this._$Em=i,this[i]=h.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??K)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,n]of i)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[T("elementProperties")]=new Map,P[T("finalized")]=new Map,q==null||q({ReactiveElement:P}),(v.reactiveElementVersions??(v.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:xt,getOwnPropertyNames:Ct,getOwnPropertySymbols:Tt,getPrototypeOf:Mt}=Object,A=globalThis,et=A.trustedTypes,Ot=et?et.emptyScript:"",q=A.reactiveElementPolyfillSupport,T=(r,t)=>r,F={toAttribute(r,t){switch(t){case Boolean:r=r?Ot:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},K=(r,t)=>!Ut(r,t),st={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:K};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);class P extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Pt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=xt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const h=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??st}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=Mt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,s=[...Ct(e),...Tt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(tt(i))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return wt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:F).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),h=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:F;this._$Em=i,this[i]=h.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??K)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,n]of i)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[T("elementProperties")]=new Map,P[T("finalized")]=new Map,q==null||q({ReactiveElement:P}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const M=globalThis,F=M.trustedTypes,it=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,Z="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+_,Rt=`<${G}>`,S=document,R=()=>S.createComment(""),k=r=>r===null||typeof r!="object"&&typeof r!="function",Q=Array.isArray,pt=r=>Q(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",j=`[
14
- \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rt=/-->/g,nt=/>/g,b=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ut=/^(?:script|style|textarea|title)$/i,kt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Nt=kt(1),w=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ht=new WeakMap,E=S.createTreeWalker(S,129);function mt(r,t){if(!Q(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}const gt=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",n=C;for(let h=0;h<e;h++){const a=r[h];let p,f,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,f=n.exec(a),f!==null);)$=n.lastIndex,n===C?f[1]==="!--"?n=rt:f[1]!==void 0?n=nt:f[2]!==void 0?(ut.test(f[2])&&(i=RegExp("</"+f[2],"g")),n=b):f[3]!==void 0&&(n=b):n===b?f[0]===">"?(n=i??C,l=-1):f[1]===void 0?l=-2:(l=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?b:f[3]==='"'?at:ot):n===at||n===ot?n=b:n===rt||n===nt?n=C:(n=b,i=void 0);const A=n===b&&r[h+1].startsWith("/>")?" ":"";o+=n===C?a+Rt:l>=0?(s.push(p),a.slice(0,l)+Z+a.slice(l)+_+A):a+_+(l===-2?h:A)}return[mt(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const h=t.length-1,a=this.parts,[p,f]=gt(t,e);if(this.el=N.createElement(p,s),E.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=E.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(Z)){const $=f[n++],A=i.getAttribute(l).split(_),V=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:V[2],strings:A,ctor:V[1]==="."?yt:V[1]==="?"?$t:V[1]==="@"?_t:H}),i.removeAttribute(l)}else l.startsWith(_)&&(a.push({type:6,index:o}),i.removeAttribute(l));if(ut.test(i.tagName)){const l=i.textContent.split(_),$=l.length-1;if($>0){i.textContent=F?F.emptyScript:"";for(let A=0;A<$;A++)i.append(l[A],R()),E.nextNode(),a.push({type:2,index:++o});i.append(l[$],R())}}}else if(i.nodeType===8)if(i.data===G)a.push({type:2,index:o});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)a.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,e){const s=S.createElement("template");return s.innerHTML=t,s}}function U(r,t,e=r,s){var n,h;if(t===w)return t;let i=s!==void 0?(n=e.o)==null?void 0:n[s]:e.l;const o=k(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e.o??(e.o=[]))[s]=i:e.l=i),i!==void 0&&(t=U(r,i._$AS(r,t.values),i,s)),t}class ft{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??S).importNode(e,!0);E.currentNode=i;let o=E.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new x(o,o.nextSibling,this,t):a.type===1?p=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(p=new At(o,this,t)),this._$AV.push(p),a=s[++h]}n!==(a==null?void 0:a.index)&&(o=E.nextNode(),n++)}return E.currentNode=S,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),k(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=N.createElement(mt(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const n=new ft(i,this),h=n.u(this.options);n.p(e),this.T(h),this._$AH=n}}_$AC(t){let e=ht.get(t.strings);return e===void 0&&ht.set(t.strings,e=new N(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new x(this.O(R()),this.O(R()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=U(this,t,e,0),n=!k(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const h=t;let a,p;for(t=o[0],a=0;a<o.length-1;a++)p=U(this,h[s+a],e,a),p===w&&(p=this._$AH[a]),n||(n=!k(p)||p!==this._$AH[a]),p===d?t=d:t!==d&&(t+=(p??"")+o[a+1]),this._$AH[a]=p}n&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class $t extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class _t extends H{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??d)===w)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class At{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const Ht={M:Z,P:_,A:G,C:1,L:gt,R:ft,D:pt,V:U,I:x,H,N:$t,U:_t,B:yt,F:At},B=M.litHtmlPolyfillSupport;B==null||B(N,x),(M.litHtmlVersions??(M.litHtmlVersions=[])).push("3.2.0");const Vt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new x(t.insertBefore(R(),o),o,void 0,e??{})}return i._$AI(r),i};/**
13
+ */const M=globalThis,D=M.trustedTypes,it=D?D.createPolicy("lit-html",{createHTML:r=>r}):void 0,Z="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+_,Rt=`<${G}>`,S=document,R=()=>S.createComment(""),k=r=>r===null||typeof r!="object"&&typeof r!="function",Q=Array.isArray,pt=r=>Q(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",B=`[
14
+ \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rt=/-->/g,nt=/>/g,b=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ut=/^(?:script|style|textarea|title)$/i,kt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Nt=kt(1),w=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ht=new WeakMap,E=S.createTreeWalker(S,129);function gt(r,t){if(!Q(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}const mt=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",n=C;for(let h=0;h<e;h++){const a=r[h];let p,f,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,f=n.exec(a),f!==null);)$=n.lastIndex,n===C?f[1]==="!--"?n=rt:f[1]!==void 0?n=nt:f[2]!==void 0?(ut.test(f[2])&&(i=RegExp("</"+f[2],"g")),n=b):f[3]!==void 0&&(n=b):n===b?f[0]===">"?(n=i??C,l=-1):f[1]===void 0?l=-2:(l=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?b:f[3]==='"'?at:ot):n===at||n===ot?n=b:n===rt||n===nt?n=C:(n=b,i=void 0);const v=n===b&&r[h+1].startsWith("/>")?" ":"";o+=n===C?a+Rt:l>=0?(s.push(p),a.slice(0,l)+Z+a.slice(l)+_+v):a+_+(l===-2?h:v)}return[gt(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const h=t.length-1,a=this.parts,[p,f]=mt(t,e);if(this.el=N.createElement(p,s),E.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=E.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(Z)){const $=f[n++],v=i.getAttribute(l).split(_),V=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:V[2],strings:v,ctor:V[1]==="."?yt:V[1]==="?"?$t:V[1]==="@"?_t:H}),i.removeAttribute(l)}else l.startsWith(_)&&(a.push({type:6,index:o}),i.removeAttribute(l));if(ut.test(i.tagName)){const l=i.textContent.split(_),$=l.length-1;if($>0){i.textContent=D?D.emptyScript:"";for(let v=0;v<$;v++)i.append(l[v],R()),E.nextNode(),a.push({type:2,index:++o});i.append(l[$],R())}}}else if(i.nodeType===8)if(i.data===G)a.push({type:2,index:o});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)a.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,e){const s=S.createElement("template");return s.innerHTML=t,s}}function U(r,t,e=r,s){var n,h;if(t===w)return t;let i=s!==void 0?(n=e.o)==null?void 0:n[s]:e.l;const o=k(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e.o??(e.o=[]))[s]=i:e.l=i),i!==void 0&&(t=U(r,i._$AS(r,t.values),i,s)),t}class ft{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??S).importNode(e,!0);E.currentNode=i;let o=E.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new x(o,o.nextSibling,this,t):a.type===1?p=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(p=new vt(o,this,t)),this._$AV.push(p),a=s[++h]}n!==(a==null?void 0:a.index)&&(o=E.nextNode(),n++)}return E.currentNode=S,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),k(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=N.createElement(gt(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const n=new ft(i,this),h=n.u(this.options);n.p(e),this.T(h),this._$AH=n}}_$AC(t){let e=ht.get(t.strings);return e===void 0&&ht.set(t.strings,e=new N(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new x(this.O(R()),this.O(R()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=U(this,t,e,0),n=!k(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const h=t;let a,p;for(t=o[0],a=0;a<o.length-1;a++)p=U(this,h[s+a],e,a),p===w&&(p=this._$AH[a]),n||(n=!k(p)||p!==this._$AH[a]),p===d?t=d:t!==d&&(t+=(p??"")+o[a+1]),this._$AH[a]=p}n&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class $t extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class _t extends H{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??d)===w)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const Ht={M:Z,P:_,A:G,C:1,L:mt,R:ft,D:pt,V:U,I:x,H,N:$t,U:_t,B:yt,F:vt},j=M.litHtmlPolyfillSupport;j==null||j(N,x),(M.litHtmlVersions??(M.litHtmlVersions=[])).push("3.2.0");const Vt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new x(t.insertBefore(R(),o),o,void 0,e??{})}return i._$AI(r),i};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20,8 +20,8 @@
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const It={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:K},Lt=(r=It,t,e)=>{const{kind:s,metadata:i}=e;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(e.name,r),s==="accessor"){const{name:n}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,r)},init(h){return h!==void 0&&this.P(n,void 0,r),h}}}if(s==="setter"){const{name:n}=e;return function(h){const a=this[n];t.call(this,h),this.requestUpdate(n,a,r)}}throw Error("Unsupported decorator location: "+s)};function c(r){return(t,e)=>typeof e=="object"?Lt(r,t,e):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,n?{...s,wrapped:!0}:s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}/**
23
+ */const It={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:K},Lt=(r=It,t,e)=>{const{kind:s,metadata:i}=e;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(e.name,r),s==="accessor"){const{name:n}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,r)},init(h){return h!==void 0&&this.P(n,void 0,r),h}}}if(s==="setter"){const{name:n}=e;return function(h){const a=this[n];t.call(this,h),this.requestUpdate(n,a,r)}}throw Error("Unsupported decorator location: "+s)};function c(r){return(t,e)=>typeof e=="object"?Lt(r,t,e):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,n?{...s,wrapped:!0}:s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */function vt(r){return c({...r,state:!0,attribute:!1})}var g=[];for(var J=0;J<256;++J)g.push((J+256).toString(16).slice(1));function Dt(r,t=0){return(g[r[t+0]]+g[r[t+1]]+g[r[t+2]]+g[r[t+3]]+"-"+g[r[t+4]]+g[r[t+5]]+"-"+g[r[t+6]]+g[r[t+7]]+"-"+g[r[t+8]]+g[r[t+9]]+"-"+g[r[t+10]]+g[r[t+11]]+g[r[t+12]]+g[r[t+13]]+g[r[t+14]]+g[r[t+15]]).toLowerCase()}var I,Ft=new Uint8Array(16);function qt(){if(!I&&(I=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(Ft)}var jt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const lt={randomUUID:jt};function bt(r,t,e){if(lt.randomUUID&&!t&&!r)return lt.randomUUID();r=r||{};var s=r.random||(r.rng||qt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dt(s)}const Bt={hi:"Hei!"},zt={buttonAltText:"Åpne kalender"},Jt={days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},Wt={labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},y={example:Bt,calendar:zt,dates:Jt,forms:Wt};var Kt=Object.defineProperty,u=(r,t,e,s)=>{for(var i=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(t,e,i)||i);return i&&Kt(t,e,i),i};class Y extends O{constructor(){super(),this.strings=y}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}}u([c({type:Object})],Y.prototype,"strings");class m extends Y{constructor(){super(),this.id=bt(),this.name=this.id,this.required=!1,this.disabled=!1,this.placeholder="",this.min=null,this.max=null,this.minlength=0,this.maxlength=0,this.pattern="",this.optionalTag=!1,this.optionalText=y.forms.labels.optional,this.requiredTag=!1,this.requiredText=y.forms.labels.required,this.hasError=!1,this.errorMessage="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){this.required&&!this.value?this.internals.setValidity({valueMissing:!0},y.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},y.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},y.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},y.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},y.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},y.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},y.forms.messages.rangeOverflow,t):t.validity.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(s=>{e.append(this.name,s)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChanged(t,e){typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=t,this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onInput(this.value),this.updateComplete.then(()=>this.requestUpdate())}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onInput(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRef2&&this.manageValidity(this.inputRef2.value),this.dispatchEvent(new Event("input")),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}firstUpdated(t){super.firstUpdated(t),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.disabled=!0,this.internals.ariaDisabled=!0),this.internals.setFormValue(this.value),this.manageValidity(this.inputRef.value)}}u([c({type:String,reflect:!0})],m.prototype,"id");u([c({type:String,reflect:!0})],m.prototype,"name");u([c({type:Boolean,reflect:!0})],m.prototype,"required");u([c({type:Boolean,reflect:!0})],m.prototype,"disabled");u([c({type:String,reflect:!0})],m.prototype,"placeholder");u([c({type:Number,reflect:!0})],m.prototype,"min");u([c({type:Number,reflect:!0})],m.prototype,"max");u([c({type:Number,reflect:!0})],m.prototype,"minlength");u([c({type:Number,reflect:!0})],m.prototype,"maxlength");u([c({type:String,reflect:!0})],m.prototype,"pattern");u([c({type:Boolean,reflect:!0})],m.prototype,"optionalTag");u([c({type:String,reflect:!0})],m.prototype,"optionalText");u([c({type:Boolean,reflect:!0})],m.prototype,"requiredTag");u([c({type:String,reflect:!0})],m.prototype,"requiredText");u([c({type:Boolean,reflect:!0})],m.prototype,"hasError");u([c({type:String,reflect:!0})],m.prototype,"errorMessage");u([vt()],m.prototype,"touched");exports.D=d;exports.PktElement=Y;exports.PktInputElement=m;exports.R=w;exports.ke=Nt;exports.n=c;exports.r=vt;exports.si=Ht;exports.translations=y;exports.v4=bt;
27
+ */function At(r){return c({...r,state:!0,attribute:!1})}var m=[];for(var J=0;J<256;++J)m.push((J+256).toString(16).slice(1));function Ft(r,t=0){return(m[r[t+0]]+m[r[t+1]]+m[r[t+2]]+m[r[t+3]]+"-"+m[r[t+4]]+m[r[t+5]]+"-"+m[r[t+6]]+m[r[t+7]]+"-"+m[r[t+8]]+m[r[t+9]]+"-"+m[r[t+10]]+m[r[t+11]]+m[r[t+12]]+m[r[t+13]]+m[r[t+14]]+m[r[t+15]]).toLowerCase()}var I,Dt=new Uint8Array(16);function qt(){if(!I&&(I=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(Dt)}var Bt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const lt={randomUUID:Bt};function bt(r,t,e){if(lt.randomUUID&&!t&&!r)return lt.randomUUID();r=r||{};var s=r.random||(r.rng||qt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ft(s)}const jt={hi:"Hei!"},zt={buttonAltText:"Åpne kalender"},Jt={days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},Wt={labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},y={example:jt,calendar:zt,dates:Jt,forms:Wt};var Kt=Object.defineProperty,u=(r,t,e,s)=>{for(var i=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(t,e,i)||i);return i&&Kt(t,e,i),i};class Y extends O{constructor(){super(),this.strings=y}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}}u([c({type:Object})],Y.prototype,"strings");class g extends Y{constructor(){super(),this.id=bt(),this.name=this.id,this.required=!1,this.disabled=!1,this.placeholder="",this.min=null,this.max=null,this.minlength=0,this.maxlength=0,this.pattern="",this.optionalTag=!1,this.optionalText=y.forms.labels.optional,this.requiredTag=!1,this.requiredText=y.forms.labels.required,this.hasError=!1,this.errorMessage="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){this.required&&!this.value?this.internals.setValidity({valueMissing:!0},y.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},y.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},y.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},y.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},y.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},y.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},y.forms.messages.rangeOverflow,t):t.validity.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(s=>{e.append(this.name,s)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChanged(t,e){typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=t,this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate())}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus"))}onBlur(){this.dispatchEvent(new FocusEvent("blur"))}onInput(){this.dispatchEvent(new InputEvent("input"))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRef2&&this.manageValidity(this.inputRef2.value),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}firstUpdated(t){super.firstUpdated(t),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.disabled=!0,this.internals.ariaDisabled=!0),this.internals.setFormValue(this.value),this.manageValidity(this.inputRef.value)}}u([c({type:String,reflect:!0})],g.prototype,"id");u([c({type:String,reflect:!0})],g.prototype,"name");u([c({type:Boolean,reflect:!0})],g.prototype,"required");u([c({type:Boolean,reflect:!0})],g.prototype,"disabled");u([c({type:String,reflect:!0})],g.prototype,"placeholder");u([c({type:Number,reflect:!0})],g.prototype,"min");u([c({type:Number,reflect:!0})],g.prototype,"max");u([c({type:Number,reflect:!0})],g.prototype,"minlength");u([c({type:Number,reflect:!0})],g.prototype,"maxlength");u([c({type:String,reflect:!0})],g.prototype,"pattern");u([c({type:Boolean,reflect:!0})],g.prototype,"optionalTag");u([c({type:String,reflect:!0})],g.prototype,"optionalText");u([c({type:Boolean,reflect:!0})],g.prototype,"requiredTag");u([c({type:String,reflect:!0})],g.prototype,"requiredText");u([c({type:Boolean,reflect:!0})],g.prototype,"hasError");u([c({type:String,reflect:!0})],g.prototype,"errorMessage");u([At()],g.prototype,"touched");exports.D=d;exports.PktElement=Y;exports.PktInputElement=g;exports.R=w;exports.ke=Nt;exports.n=c;exports.r=At;exports.si=Ht;exports.translations=y;exports.v4=bt;
@@ -1,8 +1,8 @@
1
- import { r as O, P as _, k as f, D as w, n as c } from "./index-BoxUN9GL.js";
1
+ import { r as O, P as _, k as f, D as w, n as c } from "./index-m5WP1NKD.js";
2
2
  import { a as b } from "./converters-DNCwIFwr.js";
3
3
  import { t as A } from "./directive-DA0-wdk7.js";
4
- import { R as I } from "./class-map-DnAEF9tj.js";
5
- import "./index-CsKoXqeT.js";
4
+ import { R as I } from "./class-map-CL_lSLwn.js";
5
+ import "./index-exzYRW0z.js";
6
6
  function k(e) {
7
7
  const t = Object.prototype.toString.call(e);
8
8
  return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
@@ -1,4 +1,4 @@
1
- import { D as w, R as g, P as y, k as P, n as a } from "./index-BoxUN9GL.js";
1
+ import { D as w, R as g, P as y, k as P, n as a } from "./index-m5WP1NKD.js";
2
2
  import { i as m, a as k, e as v, t as _ } from "./directive-DA0-wdk7.js";
3
3
  /**
4
4
  * @license
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
6
  const I = globalThis, W = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, dt = Symbol(), Y = /* @__PURE__ */ new WeakMap();
7
- let vt = class {
7
+ let At = class {
8
8
  constructor(t, e, s) {
9
9
  if (this._$cssResult$ = !0, s !== dt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
10
  this.cssText = t, this.t = e;
@@ -22,7 +22,7 @@ let vt = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const bt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, dt), Et = (r, t) => {
25
+ const bt = (r) => new At(typeof r == "string" ? r : r + "", void 0, dt), Et = (r, t) => {
26
26
  if (W) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
27
27
  else for (const e of t) {
28
28
  const s = document.createElement("style"), i = I.litNonce;
@@ -38,7 +38,7 @@ const bt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, dt), Et = (r
38
38
  * Copyright 2017 Google LLC
39
39
  * SPDX-License-Identifier: BSD-3-Clause
40
40
  */
41
- const { is: St, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: xt, getOwnPropertySymbols: Pt, getPrototypeOf: Ct } = Object, v = globalThis, tt = v.trustedTypes, Tt = tt ? tt.emptyScript : "", q = v.reactiveElementPolyfillSupport, T = (r, t) => r, D = { toAttribute(r, t) {
41
+ const { is: St, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: xt, getOwnPropertySymbols: Pt, getPrototypeOf: Ct } = Object, A = globalThis, tt = A.trustedTypes, Tt = tt ? tt.emptyScript : "", q = A.reactiveElementPolyfillSupport, T = (r, t) => r, F = { toAttribute(r, t) {
42
42
  switch (t) {
43
43
  case Boolean:
44
44
  r = r ? Tt : null;
@@ -66,8 +66,8 @@ const { is: St, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnProperty
66
66
  }
67
67
  }
68
68
  return e;
69
- } }, K = (r, t) => !St(r, t), et = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: K };
70
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), v.litPropertyMetadata ?? (v.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
69
+ } }, K = (r, t) => !St(r, t), et = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: K };
70
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), A.litPropertyMetadata ?? (A.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
71
71
  class U extends HTMLElement {
72
72
  static addInitializer(t) {
73
73
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
@@ -179,7 +179,7 @@ class U extends HTMLElement {
179
179
  var o;
180
180
  const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
181
181
  if (i !== void 0 && s.reflect === !0) {
182
- const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : D).toAttribute(e, s.type);
182
+ const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : F).toAttribute(e, s.type);
183
183
  this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
184
184
  }
185
185
  }
@@ -187,7 +187,7 @@ class U extends HTMLElement {
187
187
  var o;
188
188
  const s = this.constructor, i = s._$Eh.get(t);
189
189
  if (i !== void 0 && this._$Em !== i) {
190
- const n = s.getPropertyOptions(i), h = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : D;
190
+ const n = s.getPropertyOptions(i), h = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : F;
191
191
  this._$Em = i, this[i] = h.fromAttribute(e, n.type), this._$Em = null;
192
192
  }
193
193
  }
@@ -266,14 +266,14 @@ class U extends HTMLElement {
266
266
  firstUpdated(t) {
267
267
  }
268
268
  }
269
- U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[T("elementProperties")] = /* @__PURE__ */ new Map(), U[T("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: U }), (v.reactiveElementVersions ?? (v.reactiveElementVersions = [])).push("2.0.4");
269
+ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[T("elementProperties")] = /* @__PURE__ */ new Map(), U[T("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: U }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.0.4");
270
270
  /**
271
271
  * @license
272
272
  * Copyright 2017 Google LLC
273
273
  * SPDX-License-Identifier: BSD-3-Clause
274
274
  */
275
- const M = globalThis, F = M.trustedTypes, st = F ? F.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, G = "?" + _, Mt = `<${G}>`, S = document, R = () => S.createComment(""), N = (r) => r === null || typeof r != "object" && typeof r != "function", Q = Array.isArray, ct = (r) => Q(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", j = `[
276
- \f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, rt = />/g, b = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
275
+ const M = globalThis, D = M.trustedTypes, st = D ? D.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, G = "?" + _, Mt = `<${G}>`, S = document, R = () => S.createComment(""), N = (r) => r === null || typeof r != "object" && typeof r != "function", Q = Array.isArray, ct = (r) => Q(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", B = `[
276
+ \f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, rt = />/g, b = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
277
277
  \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Ot = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Kt = Ot(1), x = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), E = S.createTreeWalker(S, 129);
278
278
  function ut(r, t) {
279
279
  if (!Q(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
@@ -286,8 +286,8 @@ const gt = (r, t) => {
286
286
  const a = r[h];
287
287
  let d, f, l = -1, $ = 0;
288
288
  for (; $ < a.length && (n.lastIndex = $, f = n.exec(a), f !== null); ) $ = n.lastIndex, n === C ? f[1] === "!--" ? n = it : f[1] !== void 0 ? n = rt : f[2] !== void 0 ? (pt.test(f[2]) && (i = RegExp("</" + f[2], "g")), n = b) : f[3] !== void 0 && (n = b) : n === b ? f[0] === ">" ? (n = i ?? C, l = -1) : f[1] === void 0 ? l = -2 : (l = n.lastIndex - f[2].length, d = f[1], n = f[3] === void 0 ? b : f[3] === '"' ? ot : nt) : n === ot || n === nt ? n = b : n === it || n === rt ? n = C : (n = b, i = void 0);
289
- const A = n === b && r[h + 1].startsWith("/>") ? " " : "";
290
- o += n === C ? a + Mt : l >= 0 ? (s.push(d), a.slice(0, l) + Z + a.slice(l) + _ + A) : a + _ + (l === -2 ? h : A);
289
+ const v = n === b && r[h + 1].startsWith("/>") ? " " : "";
290
+ o += n === C ? a + Mt : l >= 0 ? (s.push(d), a.slice(0, l) + Z + a.slice(l) + _ + v) : a + _ + (l === -2 ? h : v);
291
291
  }
292
292
  return [ut(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
293
293
  };
@@ -304,14 +304,14 @@ class k {
304
304
  for (; (i = E.nextNode()) !== null && a.length < h; ) {
305
305
  if (i.nodeType === 1) {
306
306
  if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(Z)) {
307
- const $ = f[n++], A = i.getAttribute(l).split(_), V = /([.?@])?(.*)/.exec($);
308
- a.push({ type: 1, index: o, name: V[2], strings: A, ctor: V[1] === "." ? ft : V[1] === "?" ? yt : V[1] === "@" ? $t : H }), i.removeAttribute(l);
307
+ const $ = f[n++], v = i.getAttribute(l).split(_), V = /([.?@])?(.*)/.exec($);
308
+ a.push({ type: 1, index: o, name: V[2], strings: v, ctor: V[1] === "." ? ft : V[1] === "?" ? yt : V[1] === "@" ? $t : H }), i.removeAttribute(l);
309
309
  } else l.startsWith(_) && (a.push({ type: 6, index: o }), i.removeAttribute(l));
310
310
  if (pt.test(i.tagName)) {
311
311
  const l = i.textContent.split(_), $ = l.length - 1;
312
312
  if ($ > 0) {
313
- i.textContent = F ? F.emptyScript : "";
314
- for (let A = 0; A < $; A++) i.append(l[A], R()), E.nextNode(), a.push({ type: 2, index: ++o });
313
+ i.textContent = D ? D.emptyScript : "";
314
+ for (let v = 0; v < $; v++) i.append(l[v], R()), E.nextNode(), a.push({ type: 2, index: ++o });
315
315
  i.append(l[$], R());
316
316
  }
317
317
  }
@@ -492,8 +492,8 @@ class _t {
492
492
  w(this, t);
493
493
  }
494
494
  }
495
- const Zt = { M: Z, P: _, A: G, C: 1, L: gt, R: mt, D: ct, V: w, I: P, H, N: yt, U: $t, B: ft, F: _t }, B = M.litHtmlPolyfillSupport;
496
- B == null || B(k, P), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.2.0");
495
+ const Zt = { M: Z, P: _, A: G, C: 1, L: gt, R: mt, D: ct, V: w, I: P, H, N: yt, U: $t, B: ft, F: _t }, j = M.litHtmlPolyfillSupport;
496
+ j == null || j(k, P), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.2.0");
497
497
  const Rt = (r, t, e) => {
498
498
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
499
499
  let i = s._$litPart$;
@@ -543,7 +543,7 @@ z == null || z({ LitElement: O });
543
543
  * Copyright 2017 Google LLC
544
544
  * SPDX-License-Identifier: BSD-3-Clause
545
545
  */
546
- const Nt = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: K }, kt = (r = Nt, t, e) => {
546
+ const Nt = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: K }, kt = (r = Nt, t, e) => {
547
547
  const { kind: s, metadata: i } = e;
548
548
  let o = globalThis.litPropertyMetadata.get(i);
549
549
  if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), o.set(e.name, r), s === "accessor") {
@@ -590,11 +590,11 @@ function It() {
590
590
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
591
591
  return L(Lt);
592
592
  }
593
- var Dt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
593
+ var Ft = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
594
594
  const ht = {
595
- randomUUID: Dt
595
+ randomUUID: Ft
596
596
  };
597
- function Ft(r, t, e) {
597
+ function Dt(r, t, e) {
598
598
  if (ht.randomUUID && !t && !r)
599
599
  return ht.randomUUID();
600
600
  r = r || {};
@@ -603,9 +603,9 @@ function Ft(r, t, e) {
603
603
  }
604
604
  const qt = {
605
605
  hi: "Hei!"
606
- }, jt = {
607
- buttonAltText: "Åpne kalender"
608
606
  }, Bt = {
607
+ buttonAltText: "Åpne kalender"
608
+ }, jt = {
609
609
  days: [
610
610
  "Mandag",
611
611
  "Tirsdag",
@@ -676,8 +676,8 @@ const qt = {
676
676
  }
677
677
  }, y = {
678
678
  example: qt,
679
- calendar: jt,
680
- dates: Bt,
679
+ calendar: Bt,
680
+ dates: jt,
681
681
  forms: zt
682
682
  };
683
683
  var Jt = Object.defineProperty, u = (r, t, e, s) => {
@@ -685,7 +685,7 @@ var Jt = Object.defineProperty, u = (r, t, e, s) => {
685
685
  (n = r[o]) && (i = n(t, e, i) || i);
686
686
  return i && Jt(t, e, i), i;
687
687
  };
688
- class At extends O {
688
+ class vt extends O {
689
689
  /**
690
690
  * Add extra stuff here whenever we decide what should be added here…
691
691
  */
@@ -713,10 +713,10 @@ class At extends O {
713
713
  }
714
714
  u([
715
715
  p({ type: Object })
716
- ], At.prototype, "strings");
717
- class m extends At {
716
+ ], vt.prototype, "strings");
717
+ class m extends vt {
718
718
  constructor() {
719
- super(), this.id = Ft(), this.name = this.id, this.required = !1, this.disabled = !1, this.placeholder = "", this.min = null, this.max = null, this.minlength = 0, this.maxlength = 0, this.pattern = "", this.optionalTag = !1, this.optionalText = y.forms.labels.optional, this.requiredTag = !1, this.requiredText = y.forms.labels.required, this.hasError = !1, this.errorMessage = "", this.touched = !1, this.internals = this.attachInternals();
719
+ super(), this.id = Dt(), this.name = this.id, this.required = !1, this.disabled = !1, this.placeholder = "", this.min = null, this.max = null, this.minlength = 0, this.maxlength = 0, this.pattern = "", this.optionalTag = !1, this.optionalText = y.forms.labels.optional, this.requiredTag = !1, this.requiredText = y.forms.labels.required, this.hasError = !1, this.errorMessage = "", this.touched = !1, this.internals = this.attachInternals();
720
720
  }
721
721
  static get formAssociated() {
722
722
  return !0;
@@ -747,7 +747,7 @@ class m extends At {
747
747
  this.internals.setFormValue(t);
748
748
  }
749
749
  valueChanged(t, e) {
750
- typeof t == "string" ? ((this.multiple || this.range) && t.includes(",") && (t = t.split(",")), this.value = t, this._value = Array.isArray(t) ? t : [t]) : Array.isArray(t) ? (this.value = t, this._value = t) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && e && e.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (e == null ? void 0 : e.toString()) && this.onInput(this.value), this.updateComplete.then(() => this.requestUpdate());
750
+ typeof t == "string" ? ((this.multiple || this.range) && t.includes(",") && (t = t.split(",")), this.value = t, this._value = Array.isArray(t) ? t : [t]) : Array.isArray(t) ? (this.value = t, this._value = t) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && e && e.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (e == null ? void 0 : e.toString()) && this.onChange(this.value), this.updateComplete.then(() => this.requestUpdate());
751
751
  }
752
752
  // When input goes from content to no content
753
753
  clearInputValue() {
@@ -760,13 +760,25 @@ class m extends At {
760
760
  })
761
761
  );
762
762
  }
763
+ // When user enters the input, we need to push that event out to the form
764
+ onFocus() {
765
+ this.dispatchEvent(new FocusEvent("focus"));
766
+ }
767
+ // And also when the user leaves the input...
768
+ onBlur() {
769
+ this.dispatchEvent(new FocusEvent("blur"));
770
+ }
771
+ // Trigger this when user types in the input
772
+ onInput() {
773
+ this.dispatchEvent(new InputEvent("input"));
774
+ }
763
775
  // Trigger this when you want to set the value of the input out to the form
764
- onInput(t) {
776
+ onChange(t) {
765
777
  if (!this.touched) {
766
778
  this.touched = !0, t && this.setFormValue(t);
767
779
  return;
768
780
  }
769
- typeof t != "string" && !Array.isArray(t) || ((this.range || this.multiple) && !Array.isArray(t) && t.includes(",") && (t = t.split(",")), !this.multiple && !this.range && Array.isArray(t) && (t = t[0]), this.setFormValue(t), this.manageValidity(this.inputRef.value), this.inputRef2 && this.manageValidity(this.inputRef2.value), this.dispatchEvent(new Event("input")), this.dispatchEvent(new Event("change")), this.dispatchEvent(
781
+ typeof t != "string" && !Array.isArray(t) || ((this.range || this.multiple) && !Array.isArray(t) && t.includes(",") && (t = t.split(",")), !this.multiple && !this.range && Array.isArray(t) && (t = t[0]), this.setFormValue(t), this.manageValidity(this.inputRef.value), this.inputRef2 && this.manageValidity(this.inputRef2.value), this.dispatchEvent(new Event("change")), this.dispatchEvent(
770
782
  new CustomEvent("value-change", {
771
783
  detail: t,
772
784
  bubbles: !0,
@@ -831,7 +843,7 @@ u([
831
843
  ], m.prototype, "touched");
832
844
  export {
833
845
  c as D,
834
- At as P,
846
+ vt as P,
835
847
  x as R,
836
848
  m as a,
837
849
  Kt as k,
@@ -839,5 +851,5 @@ export {
839
851
  Ht as r,
840
852
  Zt as s,
841
853
  y as t,
842
- Ft as v
854
+ Dt as v
843
855
  };
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("./index-DZGlpxj6.cjs"),v=require("./converters-DhM11VlY.cjs"),C=require("./directive-19_ixLKS.cjs"),$=require("./class-map-CFiVus5w.cjs");require("./index-DZ0cjZdG.cjs");function k(i){const e=Object.prototype.toString.call(i);return i instanceof Date||typeof i=="object"&&e==="[object Date]"?new i.constructor(+i):typeof i=="number"||e==="[object Number]"||typeof i=="string"||e==="[object String]"?new Date(i):new Date(NaN)}function w(i,e){return i instanceof Date?new i.constructor(e):new Date(e)}const x=6048e5,_=864e5;let P={};function b(){return P}function m(i,e){var h,c,d,p;const t=b(),s=(e==null?void 0:e.weekStartsOn)??((c=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((p=(d=t.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,n=k(i),r=n.getDay(),l=(r<s?7:0)+r-s;return n.setDate(n.getDate()-l),n.setHours(0,0,0,0),n}function S(i,e){const t=k(i.start),s=k(i.end);let n=+t>+s;const r=n?+t:+s,l=n?s:t;l.setHours(0,0,0,0);let h=1;const c=[];for(;+l<=r;)c.push(k(l)),l.setDate(l.getDate()+h),l.setHours(0,0,0,0);return n?c.reverse():c}function M(i,e){var p,u,f,y;const t=k(i),s=t.getFullYear(),n=b(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((y=(f=n.locale)==null?void 0:f.options)==null?void 0:y.firstWeekContainsDate)??1,l=w(i,0);l.setFullYear(s+1,0,r),l.setHours(0,0,0,0);const h=m(l,e),c=w(i,0);c.setFullYear(s,0,r),c.setHours(0,0,0,0);const d=m(c,e);return t.getTime()>=h.getTime()?s+1:t.getTime()>=d.getTime()?s:s-1}function A(i,e){var h,c,d,p;const t=b(),s=(e==null?void 0:e.firstWeekContainsDate)??((c=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(d=t.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,n=M(i,e),r=w(i,0);return r.setFullYear(n,0,s),r.setHours(0,0,0,0),m(r,e)}function D(i,e){const t=k(i),s=+m(t,e)-+A(t,e);return Math.round(s/x)+1}function I(i){let t=k(i).getDay();return t===0&&(t=7),t}const T="pkt-calendar",E={id:{type:"string",name:"ID",description:"Unique identifier for the calendar"},currentmonth:{type:"date",converter:"stringToDate",description:"The current month to display"},selected:{type:"array",converter:"csvToArray",reflect:!0,items:{type:"date"},description:"Array of selected dates"},excludeweekdays:{type:"array",converter:"csvToArray",items:{type:"string"},description:"Array of weekdays (1-7) to exclude"},excludedates:{type:"array",converter:"stringsToDate",items:{type:"date"},description:"Array of specific dates to exclude"},earliest:{type:"date",converter:"stringToDate",default:null,description:"Earliest selectable date"},latest:{type:"date",converter:"stringToDate",default:null,description:"Latest selectable date"},weeknumbers:{type:"boolean",reflect:!0,default:!1,description:"Show week numbers in calendar"},withcontrols:{type:"boolean",reflect:!0,default:!1,description:"Show month and year navigation controls"},multiple:{type:"boolean",reflect:!0,default:!1,description:"Allow multiple date selection"},maxMultiple:{type:"number",default:4,description:"Maximum number of dates that can be selected"},range:{type:"boolean",reflect:!0,default:!1,description:"Allow date range selection"}},R={"date-selected":{description:"Returns ISO formatted date string"}},g={name:T,"css-class":"pkt-calendar",props:E,events:R};var H=Object.defineProperty,W=Object.getOwnPropertyDescriptor,o=(i,e,t,s)=>{for(var n=s>1?void 0:s?W(e,t):e,r=i.length-1,l;r>=0;r--)(l=i[r])&&(n=(s?l(e,t,n):l(n))||n);return s&&n&&H(e,t,n),n};exports.PktCalendar=class extends a.PktElement{constructor(){super(),this.multiple=g.props.multiple.default,this.maxMultiple=g.props.maxMultiple.default,this.range=g.props.range.default,this.weeknumbers=g.props.weeknumbers.default,this.withcontrols=g.props.withcontrols.default,this.selected=[],this.earliest=g.props.earliest.default,this.latest=g.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=new Date,this.dayStrings=this.strings.dates.daysShort,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[]}connectedCallback(){const e=this.currentmonth;this.year=e.getFullYear(),this.month=e.getMonth(),this.week=D(new Date(this.year,this.month,1,12)),this.selected&&this.selected.length&&this.selected.forEach(t=>{this._selected.push(new Date(t))}),super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(e,t,s){e==="currentmonth"&&s&&(this.currentmonth=new Date(s),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth(),this.week=D(new Date(this.year,this.month,1,12))),e==="selected"&&s&&(this._selected=[],this.selected.forEach(n=>{this._selected.push(new Date(n))})),super.attributeChangedCallback(e,t,s)}updated(e){if(e.has("selected")&&this.selected.length===2){const t=S({start:new Date(this.selected[0]),end:new Date(this.selected[1])});if(this.inRange={},Array.isArray(t)&&t.length){const s={};for(let n=0;n<t.length;n++)s[this.formatISODate(t[n])]=this.isInRange(t[n]);this.inRange=s}}super.updated(e)}firstUpdated(e){this.addEventListener("keydown",this.handleKeydown)}handleKeydown(e){switch(e.key){case"ArrowLeft":this.handleArrowKey(e,-1);break;case"ArrowRight":this.handleArrowKey(e,1);break;case"ArrowUp":this.handleArrowKey(e,-7);break;case"ArrowDown":this.handleArrowKey(e,7);break}}handleArrowKey(e,t){if(e.preventDefault(),!this.focusedDate)return;const s=new Date(this.focusedDate);let n=new Date(s.setDate(s.getDate()+t));if(n){let r=this.querySelector(`div[data-date="${this.formatISODate(n)}"]`);if(r instanceof HTMLDivElement){if(r.dataset.disabled){let l=new Date(s.setDate(s.getDate()+t)),h=this.querySelector(`div[data-date="${this.formatISODate(l)}"]`);for(;h&&h instanceof HTMLDivElement&&h.dataset.disabled;)l=new Date(l.setDate(l.getDate()+t)),h=this.querySelector(`div[data-date="${this.formatISODate(l)}"]`);r=h}r instanceof HTMLDivElement&&!r.dataset.disabled&&r.focus()}}}render(){return a.ke`
1
+ "use strict";const a=require("./index-BUZITHLd.cjs"),v=require("./converters-DhM11VlY.cjs"),C=require("./directive-19_ixLKS.cjs"),$=require("./class-map-BQ5k1q3A.cjs");require("./index-BFqUD8HI.cjs");function k(i){const e=Object.prototype.toString.call(i);return i instanceof Date||typeof i=="object"&&e==="[object Date]"?new i.constructor(+i):typeof i=="number"||e==="[object Number]"||typeof i=="string"||e==="[object String]"?new Date(i):new Date(NaN)}function w(i,e){return i instanceof Date?new i.constructor(e):new Date(e)}const x=6048e5,_=864e5;let P={};function b(){return P}function m(i,e){var h,c,d,p;const t=b(),s=(e==null?void 0:e.weekStartsOn)??((c=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((p=(d=t.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,n=k(i),r=n.getDay(),l=(r<s?7:0)+r-s;return n.setDate(n.getDate()-l),n.setHours(0,0,0,0),n}function S(i,e){const t=k(i.start),s=k(i.end);let n=+t>+s;const r=n?+t:+s,l=n?s:t;l.setHours(0,0,0,0);let h=1;const c=[];for(;+l<=r;)c.push(k(l)),l.setDate(l.getDate()+h),l.setHours(0,0,0,0);return n?c.reverse():c}function M(i,e){var p,u,f,y;const t=k(i),s=t.getFullYear(),n=b(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((y=(f=n.locale)==null?void 0:f.options)==null?void 0:y.firstWeekContainsDate)??1,l=w(i,0);l.setFullYear(s+1,0,r),l.setHours(0,0,0,0);const h=m(l,e),c=w(i,0);c.setFullYear(s,0,r),c.setHours(0,0,0,0);const d=m(c,e);return t.getTime()>=h.getTime()?s+1:t.getTime()>=d.getTime()?s:s-1}function A(i,e){var h,c,d,p;const t=b(),s=(e==null?void 0:e.firstWeekContainsDate)??((c=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(d=t.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,n=M(i,e),r=w(i,0);return r.setFullYear(n,0,s),r.setHours(0,0,0,0),m(r,e)}function D(i,e){const t=k(i),s=+m(t,e)-+A(t,e);return Math.round(s/x)+1}function I(i){let t=k(i).getDay();return t===0&&(t=7),t}const T="pkt-calendar",E={id:{type:"string",name:"ID",description:"Unique identifier for the calendar"},currentmonth:{type:"date",converter:"stringToDate",description:"The current month to display"},selected:{type:"array",converter:"csvToArray",reflect:!0,items:{type:"date"},description:"Array of selected dates"},excludeweekdays:{type:"array",converter:"csvToArray",items:{type:"string"},description:"Array of weekdays (1-7) to exclude"},excludedates:{type:"array",converter:"stringsToDate",items:{type:"date"},description:"Array of specific dates to exclude"},earliest:{type:"date",converter:"stringToDate",default:null,description:"Earliest selectable date"},latest:{type:"date",converter:"stringToDate",default:null,description:"Latest selectable date"},weeknumbers:{type:"boolean",reflect:!0,default:!1,description:"Show week numbers in calendar"},withcontrols:{type:"boolean",reflect:!0,default:!1,description:"Show month and year navigation controls"},multiple:{type:"boolean",reflect:!0,default:!1,description:"Allow multiple date selection"},maxMultiple:{type:"number",default:4,description:"Maximum number of dates that can be selected"},range:{type:"boolean",reflect:!0,default:!1,description:"Allow date range selection"}},R={"date-selected":{description:"Returns ISO formatted date string"}},g={name:T,"css-class":"pkt-calendar",props:E,events:R};var H=Object.defineProperty,W=Object.getOwnPropertyDescriptor,o=(i,e,t,s)=>{for(var n=s>1?void 0:s?W(e,t):e,r=i.length-1,l;r>=0;r--)(l=i[r])&&(n=(s?l(e,t,n):l(n))||n);return s&&n&&H(e,t,n),n};exports.PktCalendar=class extends a.PktElement{constructor(){super(),this.multiple=g.props.multiple.default,this.maxMultiple=g.props.maxMultiple.default,this.range=g.props.range.default,this.weeknumbers=g.props.weeknumbers.default,this.withcontrols=g.props.withcontrols.default,this.selected=[],this.earliest=g.props.earliest.default,this.latest=g.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=new Date,this.dayStrings=this.strings.dates.daysShort,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[]}connectedCallback(){const e=this.currentmonth;this.year=e.getFullYear(),this.month=e.getMonth(),this.week=D(new Date(this.year,this.month,1,12)),this.selected&&this.selected.length&&this.selected.forEach(t=>{this._selected.push(new Date(t))}),super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(e,t,s){e==="currentmonth"&&s&&(this.currentmonth=new Date(s),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth(),this.week=D(new Date(this.year,this.month,1,12))),e==="selected"&&s&&(this._selected=[],this.selected.forEach(n=>{this._selected.push(new Date(n))})),super.attributeChangedCallback(e,t,s)}updated(e){if(e.has("selected")&&this.selected.length===2){const t=S({start:new Date(this.selected[0]),end:new Date(this.selected[1])});if(this.inRange={},Array.isArray(t)&&t.length){const s={};for(let n=0;n<t.length;n++)s[this.formatISODate(t[n])]=this.isInRange(t[n]);this.inRange=s}}super.updated(e)}firstUpdated(e){this.addEventListener("keydown",this.handleKeydown)}handleKeydown(e){switch(e.key){case"ArrowLeft":this.handleArrowKey(e,-1);break;case"ArrowRight":this.handleArrowKey(e,1);break;case"ArrowUp":this.handleArrowKey(e,-7);break;case"ArrowDown":this.handleArrowKey(e,7);break}}handleArrowKey(e,t){if(e.preventDefault(),!this.focusedDate)return;const s=new Date(this.focusedDate);let n=new Date(s.setDate(s.getDate()+t));if(n){let r=this.querySelector(`div[data-date="${this.formatISODate(n)}"]`);if(r instanceof HTMLDivElement){if(r.dataset.disabled){let l=new Date(s.setDate(s.getDate()+t)),h=this.querySelector(`div[data-date="${this.formatISODate(l)}"]`);for(;h&&h instanceof HTMLDivElement&&h.dataset.disabled;)l=new Date(l.setDate(l.getDate()+t)),h=this.querySelector(`div[data-date="${this.formatISODate(l)}"]`);r=h}r instanceof HTMLDivElement&&!r.dataset.disabled&&r.focus()}}}render(){return a.ke`
2
2
  <div
3
3
  class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":a.D}"
4
4
  @focusout=${this.closeEvent}
package/dist/index.d.ts CHANGED
@@ -296,7 +296,10 @@ declare class PktInputElement extends PktElement {
296
296
  protected setFormValue(value: string | string[]): void;
297
297
  protected valueChanged(value: string | string[] | null, _old: string | string[] | null): void;
298
298
  protected clearInputValue(): void;
299
- protected onInput(value: string | string[]): void;
299
+ protected onFocus(): void;
300
+ protected onBlur(): void;
301
+ protected onInput(): void;
302
+ protected onChange(value: string | string[]): void;
300
303
  protected firstUpdated(_changedProperties: PropertyValues): void;
301
304
  }
302
305
 
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DZGlpxj6.cjs"),p=require("./ref-G2cIenWo.cjs"),c=require("./class-map-CFiVus5w.cjs"),k=require("./directive-19_ixLKS.cjs");require("./index-DZ0cjZdG.cjs");var h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,e=(s,r,o,i)=>{for(var l=i>1?void 0:i?u(r,o):r,a=s.length-1,n;a>=0;a--)(n=s[a])&&(l=(i?n(r,o,l):n(l))||l);return i&&l&&h(r,o,l),l};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=p.ii(),this.closable=!1,this.compact=!1,this.title="",this.skin="info",this.isDisplayed=!0,this.ariaLive="polite",this.closeAlert=!1,this.date="",this.slotController=new p.PktSlotController(this,this.defaultSlot)}handleClose(){this.isDisplayed=!1,this.onClose&&this.onClose()}render(){const r={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-alert--closable":this.closable};return this.isDisplayed?t.ke`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BUZITHLd.cjs"),p=require("./ref-BdbjJbqo.cjs"),c=require("./class-map-BQ5k1q3A.cjs"),k=require("./directive-19_ixLKS.cjs");require("./index-BFqUD8HI.cjs");var h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,e=(s,r,o,i)=>{for(var l=i>1?void 0:i?u(r,o):r,a=s.length-1,n;a>=0;a--)(n=s[a])&&(l=(i?n(r,o,l):n(l))||l);return i&&l&&h(r,o,l),l};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=p.ii(),this.closable=!1,this.compact=!1,this.title="",this.skin="info",this.isDisplayed=!0,this.ariaLive="polite",this.closeAlert=!1,this.date="",this.slotController=new p.PktSlotController(this,this.defaultSlot)}handleClose(){this.isDisplayed=!1,this.onClose&&this.onClose()}render(){const r={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-alert--closable":this.closable};return this.isDisplayed?t.ke`
2
2
  <div class=${c.Rt(r)} aria-live=${this.ariaLive}>
3
3
  <pkt-icon
4
4
  class="pkt-alert__icon"
package/dist/pkt-alert.js CHANGED
@@ -1,8 +1,8 @@
1
- import { P as f, D as a, k as p, n as i } from "./index-BoxUN9GL.js";
2
- import { i as d, P as k, K as u } from "./ref-DzpbHCb_.js";
3
- import { R as y } from "./class-map-DnAEF9tj.js";
1
+ import { P as f, D as a, k as p, n as i } from "./index-m5WP1NKD.js";
2
+ import { i as d, P as k, K as u } from "./ref-bNNrgsqL.js";
3
+ import { R as y } from "./class-map-CL_lSLwn.js";
4
4
  import { t as v } from "./directive-DA0-wdk7.js";
5
- import "./index-CsKoXqeT.js";
5
+ import "./index-exzYRW0z.js";
6
6
  var m = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (l, r, n, o) => {
7
7
  for (var s = o > 1 ? void 0 : o ? _(r, n) : r, c = l.length - 1, h; c >= 0; c--)
8
8
  (h = l[c]) && (s = (o ? h(r, n, s) : h(s)) || s);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-DZGlpxj6.cjs");require("./converters-DhM11VlY.cjs");require("./directive-19_ixLKS.cjs");require("./class-map-CFiVus5w.cjs");const e=require("./index-C92NwPcv.cjs");require("./index-DZ0cjZdG.cjs");Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>e.PktCalendar});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-BUZITHLd.cjs");require("./converters-DhM11VlY.cjs");require("./directive-19_ixLKS.cjs");require("./class-map-BQ5k1q3A.cjs");const e=require("./index-wplohQV8.cjs");require("./index-BFqUD8HI.cjs");Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>e.PktCalendar});
@@ -1,9 +1,9 @@
1
- import "./index-BoxUN9GL.js";
1
+ import "./index-m5WP1NKD.js";
2
2
  import "./converters-DNCwIFwr.js";
3
3
  import "./directive-DA0-wdk7.js";
4
- import "./class-map-DnAEF9tj.js";
5
- import { P as e } from "./index-BAKMcM4b.js";
6
- import "./index-CsKoXqeT.js";
4
+ import "./class-map-CL_lSLwn.js";
5
+ import { P as e } from "./index-Gx8odlcY.js";
6
+ import "./index-exzYRW0z.js";
7
7
  export {
8
8
  e as PktCalendar
9
9
  };
package/dist/pkt-card.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DZGlpxj6.cjs"),d=require("./ref-G2cIenWo.cjs"),c=require("./class-map-CFiVus5w.cjs"),g=require("./directive-19_ixLKS.cjs");require("./index-DZ0cjZdG.cjs");require("./pkt-tag.cjs");const k="pkt-card",u=!0,h={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},tags:{type:"IPktTag[]",description:"Liste av tags på kortet. Tar inn en array med IPktTag-objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"string",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag"}},required:["text"]}},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},Image:{type:"object",image:"Image",description:"Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",items:{type:"object",properties:{src:{type:"string",description:"Bilde på kortet"},alt:{type:"string",description:"Tekst for aria-label"}},required:["src","alt"]}}},m={default:{description:"Innholdet i kortet"}},l={name:k,"css-class":"pkt-card",isElement:u,props:h,slots:m};var y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(n,i,s,a)=>{for(var e=a>1?void 0:a?b(i,s):i,o=n.length-1,p;o>=0;o--)(p=n[o])&&(e=(a?p(i,s,e):p(e))||e);return a&&e&&y(i,s,e),e};exports.PktCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.ii(),this.skin=l.props.skin.default,this.direction=l.props.direction.default,this.image={src:"",alt:""},this.heading="",this.subheading="",this.tags=[],this.slotController=new d.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){const i={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction};return t.ke`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BUZITHLd.cjs"),d=require("./ref-BdbjJbqo.cjs"),c=require("./class-map-BQ5k1q3A.cjs"),g=require("./directive-19_ixLKS.cjs");require("./index-BFqUD8HI.cjs");require("./pkt-tag.cjs");const k="pkt-card",u=!0,h={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},tags:{type:"IPktTag[]",description:"Liste av tags på kortet. Tar inn en array med IPktTag-objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"string",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag"}},required:["text"]}},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},Image:{type:"object",image:"Image",description:"Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",items:{type:"object",properties:{src:{type:"string",description:"Bilde på kortet"},alt:{type:"string",description:"Tekst for aria-label"}},required:["src","alt"]}}},m={default:{description:"Innholdet i kortet"}},l={name:k,"css-class":"pkt-card",isElement:u,props:h,slots:m};var y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(n,i,s,a)=>{for(var e=a>1?void 0:a?b(i,s):i,o=n.length-1,p;o>=0;o--)(p=n[o])&&(e=(a?p(i,s,e):p(e))||e);return a&&e&&y(i,s,e),e};exports.PktCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.ii(),this.skin=l.props.skin.default,this.direction=l.props.direction.default,this.image={src:"",alt:""},this.heading="",this.subheading="",this.tags=[],this.slotController=new d.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){const i={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction};return t.ke`
2
2
  <div class=${c.Rt(i)}>
3
3
  ${this.image.src&&t.ke`
4
4
  <div class="pkt-card__image">
package/dist/pkt-card.js CHANGED
@@ -1,8 +1,8 @@
1
- import { P as g, k as r, D as k, n as a } from "./index-BoxUN9GL.js";
2
- import { i as h, P as m, K as u } from "./ref-DzpbHCb_.js";
3
- import { R as y } from "./class-map-DnAEF9tj.js";
1
+ import { P as g, k as r, D as k, n as a } from "./index-m5WP1NKD.js";
2
+ import { i as h, P as m, K as u } from "./ref-bNNrgsqL.js";
3
+ import { R as y } from "./class-map-CL_lSLwn.js";
4
4
  import { t as f } from "./directive-DA0-wdk7.js";
5
- import "./index-CsKoXqeT.js";
5
+ import "./index-exzYRW0z.js";
6
6
  import "./pkt-tag.js";
7
7
  const b = "pkt-card", v = !0, $ = {
8
8
  heading: {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DZGlpxj6.cjs"),h=require("./directive-19_ixLKS.cjs"),r=require("./ref-G2cIenWo.cjs"),d=require("./class-map-CFiVus5w.cjs"),c=require("./converters-DhM11VlY.cjs");var u=Object.defineProperty,m=Object.getOwnPropertyDescriptor,o=(l,t,s,i)=>{for(var n=i>1?void 0:i?m(t,s):t,a=l.length-1,p;a>=0;a--)(p=l[a])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&u(t,s,n),n};exports.PktComponent=class extends e.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=r.ii(),this.namedSlot=r.ii(),this.slotController=new r.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(t=>{this._list.push(t.toUpperCase())}),super.connectedCallback()}render(){const t={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return e.ke`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BUZITHLd.cjs"),h=require("./directive-19_ixLKS.cjs"),r=require("./ref-BdbjJbqo.cjs"),d=require("./class-map-BQ5k1q3A.cjs"),c=require("./converters-DhM11VlY.cjs");var u=Object.defineProperty,m=Object.getOwnPropertyDescriptor,o=(l,t,s,i)=>{for(var n=i>1?void 0:i?m(t,s):t,a=l.length-1,p;a>=0;a--)(p=l[a])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&u(t,s,n),n};exports.PktComponent=class extends e.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=r.ii(),this.namedSlot=r.ii(),this.slotController=new r.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(t=>{this._list.push(t.toUpperCase())}),super.connectedCallback()}render(){const t={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return e.ke`
2
2
  <div class="${d.Rt(t)}">
3
3
  <h1 class="pkt-txt-28">${this.string}</h1>
4
4
 
@@ -1,7 +1,7 @@
1
- import { P as m, k as h, t as u, n } from "./index-BoxUN9GL.js";
1
+ import { P as m, k as h, t as u, n } from "./index-m5WP1NKD.js";
2
2
  import { t as f } from "./directive-DA0-wdk7.js";
3
- import { i as d, P as v, K as c } from "./ref-DzpbHCb_.js";
4
- import { R as g } from "./class-map-DnAEF9tj.js";
3
+ import { i as d, P as v, K as c } from "./ref-bNNrgsqL.js";
4
+ import { R as g } from "./class-map-CL_lSLwn.js";
5
5
  import { c as k } from "./converters-DNCwIFwr.js";
6
6
  var S = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (t, e, l, o) => {
7
7
  for (var s = o > 1 ? void 0 : o ? $(e, l) : e, a = t.length - 1, p; a >= 0; a--)