@oslokommune/punkt-elements 12.3.3 → 12.3.8

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 (40) hide show
  1. package/dist/{class-map-CEzmgstO.js → class-map-Cme3zDHv.js} +1 -1
  2. package/dist/{class-map-DfznHRRW.cjs → class-map-j1NPDnPL.cjs} +1 -1
  3. package/dist/{index-BCVyjeWS.cjs → index--Z_thODp.cjs} +1 -1
  4. package/dist/{index-CkBUiPHx.cjs → index-BoJqccWT.cjs} +6 -6
  5. package/dist/{index-C7OaW8f8.js → index-CQrIaUIc.js} +1 -1
  6. package/dist/{index-CINnuWkG.js → index-D16hQiYU.js} +80 -74
  7. package/dist/{index-BkKs8Yam.js → index-D1du6BqK.js} +101 -99
  8. package/dist/{index-BkqOsymS.cjs → index-xZNrDhoQ.cjs} +5 -5
  9. package/dist/index.d.ts +2 -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 +3 -3
  15. package/dist/pkt-card.js +9 -9
  16. package/dist/pkt-component-template.cjs +1 -1
  17. package/dist/pkt-component-template.js +3 -3
  18. package/dist/pkt-datepicker.cjs +31 -40
  19. package/dist/pkt-datepicker.js +72 -87
  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-BkUqMgQu.cjs → ref-B5fRDLdm.cjs} +1 -1
  35. package/dist/{ref-Cau3ksvI.js → ref-CC5SNvNX.js} +1 -1
  36. package/package.json +3 -3
  37. package/src/components/calendar/index.ts +19 -3
  38. package/src/components/card/index.ts +0 -1
  39. package/src/components/datepicker/index.ts +18 -21
  40. package/src/components/element/index.ts +22 -8
@@ -1,4 +1,4 @@
1
- import { R as a } from "./index-CINnuWkG.js";
1
+ import { R as a } from "./index-D16hQiYU.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 a=require("./index-CkBUiPHx.cjs"),n=require("./directive-19_ixLKS.cjs");/**
1
+ "use strict";const a=require("./index-BoJqccWT.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
- "use strict";const o=require("./index-CkBUiPHx.cjs"),n=require("./directive-19_ixLKS.cjs");/**
1
+ "use strict";const o=require("./index-BoJqccWT.cjs"),n=require("./directive-19_ixLKS.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -2,17 +2,17 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const I=globalThis,W=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ct=Symbol(),X=new WeakMap;let St=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(W&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}};const Et=r=>new St(typeof r=="string"?r:r+"",void 0,ct),wt=(r,t)=>{if(W)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=I.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},tt=W?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Et(e)})(r):r;/**
5
+ */const I=globalThis,W=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ct=Symbol(),X=new WeakMap;let Et=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(W&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}};const St=r=>new Et(typeof r=="string"?r:r+"",void 0,ct),wt=(r,t)=>{if(W)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=I.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},tt=W?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return St(e)})(r):r;/**
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,A=globalThis,et=A.trustedTypes,Ot=et?et.emptyScript:"",j=A.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")),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: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,j==null||j({ReactiveElement:P}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
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");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const M=globalThis,q=M.trustedTypes,it=q?q.createPolicy("lit-html",{createHTML:r=>r}):void 0,Z="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+_,Rt=`<${G}>`,E=document,R=()=>E.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,S=E.createTreeWalker(E,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 yt=(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,m,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,m=n.exec(a),m!==null);)$=n.lastIndex,n===C?m[1]==="!--"?n=rt:m[1]!==void 0?n=nt:m[2]!==void 0?(ut.test(m[2])&&(i=RegExp("</"+m[2],"g")),n=b):m[3]!==void 0&&(n=b):n===b?m[0]===">"?(n=i??C,l=-1):m[1]===void 0?l=-2:(l=n.lastIndex-m[2].length,p=m[1],n=m[3]===void 0?b:m[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,m]=yt(t,e);if(this.el=N.createElement(p,s),S.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=S.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(Z)){const $=m[n++],v=i.getAttribute(l).split(_),V=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:V[2],strings:v,ctor:V[1]==="."?ft: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=q?q.emptyScript:"";for(let v=0;v<$;v++)i.append(l[v],R()),S.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=E.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 mt{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)??E).importNode(e,!0);S.currentNode=i;let o=S.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=S.nextNode(),n++)}return S.currentNode=E,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(E.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 mt(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 ft 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:yt,R:mt,D:pt,V:U,I:x,H,N:$t,U:_t,B:ft,F:vt},F=M.litHtmlPolyfillSupport;F==null||F(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,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 ft=(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,y,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,y=n.exec(a),y!==null);)$=n.lastIndex,n===C?y[1]==="!--"?n=rt:y[1]!==void 0?n=nt:y[2]!==void 0?(ut.test(y[2])&&(i=RegExp("</"+y[2],"g")),n=b):y[3]!==void 0&&(n=b):n===b?y[0]===">"?(n=i??C,l=-1):y[1]===void 0?l=-2:(l=n.lastIndex-y[2].length,p=y[1],n=y[3]===void 0?b:y[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,y]=ft(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 $=y[n++],A=i.getAttribute(l).split(_),V=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:V[2],strings:A,ctor:V[1]==="."?gt: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 yt{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 yt(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 gt 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:ft,R:yt,D:pt,V:U,I:x,H,N:$t,U:_t,B:gt,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};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
@@ -24,4 +24,4 @@
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */function At(r){return c({...r,state:!0,attribute:!1})}var y=[];for(var J=0;J<256;++J)y.push((J+256).toString(16).slice(1));function Dt(r,t=0){return(y[r[t+0]]+y[r[t+1]]+y[r[t+2]]+y[r[t+3]]+"-"+y[r[t+4]]+y[r[t+5]]+"-"+y[r[t+6]]+y[r[t+7]]+"-"+y[r[t+8]]+y[r[t+9]]+"-"+y[r[t+10]]+y[r[t+11]]+y[r[t+12]]+y[r[t+13]]+y[r[t+14]]+y[r[t+15]]).toLowerCase()}var L,qt=new Uint8Array(16);function jt(){if(!L&&(L=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!L))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(qt)}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||jt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dt(s)}const Ft={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."}},f={example:Ft,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=f}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=f.forms.labels.optional,this.requiredTag=!1,this.requiredText=f.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},f.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},f.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},f.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},f.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},f.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},f.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},f.forms.messages.rangeOverflow,t):t.validity.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}onInput(t){if(!this.touched){this.touched=!0;return}if(console.log("onInput",t),typeof t!="string"&&!Array.isArray(t)){console.log("Value must be a string or an array");return}!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.manageValidity(this.inputRef.value),this.inputRef2&&this.manageValidity(this.inputRef2.value),this.internals.setFormValue(t),this.dispatchEvent(new Event("input")),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-changed",{detail:this._value,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=f;exports.v4=bt;
27
+ */function vt(r){return c({...r,state:!0,attribute:!1})}var f=[];for(var J=0;J<256;++J)f.push((J+256).toString(16).slice(1));function Dt(r,t=0){return(f[r[t+0]]+f[r[t+1]]+f[r[t+2]]+f[r[t+3]]+"-"+f[r[t+4]]+f[r[t+5]]+"-"+f[r[t+6]]+f[r[t+7]]+"-"+f[r[t+8]]+f[r[t+9]]+"-"+f[r[t+10]]+f[r[t+11]]+f[r[t+12]]+f[r[t+13]]+f[r[t+14]]+f[r[t+15]]).toLowerCase()}var L,Ft=new Uint8Array(16);function qt(){if(!L&&(L=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!L))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(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."}},g={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=g}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=g.forms.labels.optional,this.requiredTag=!1,this.requiredText=g.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},g.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},g.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},g.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},g.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},g.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},g.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},g.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)}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=g;exports.v4=bt;
@@ -1,4 +1,4 @@
1
- import { D as w, R as g, P as y, k as P, n as a } from "./index-CINnuWkG.js";
1
+ import { D as w, R as g, P as y, k as P, n as a } from "./index-D16hQiYU.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 At = class {
7
+ let vt = 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 At = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const bt = (r) => new At(typeof r == "string" ? r : r + "", void 0, dt), St = (r, t) => {
25
+ const bt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, dt), St = (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 At(typeof r == "string" ? r : r + "", void 0, dt), St = (r
38
38
  * Copyright 2017 Google LLC
39
39
  * SPDX-License-Identifier: BSD-3-Clause
40
40
  */
41
- const { is: Et, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: xt, getOwnPropertySymbols: Pt, getPrototypeOf: Ct } = Object, A = globalThis, tt = A.trustedTypes, Tt = tt ? tt.emptyScript : "", j = A.reactiveElementPolyfillSupport, T = (r, t) => r, D = { toAttribute(r, t) {
41
+ const { is: Et, 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) {
42
42
  switch (t) {
43
43
  case Boolean:
44
44
  r = r ? Tt : null;
@@ -67,7 +67,7 @@ const { is: Et, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnProperty
67
67
  }
68
68
  return e;
69
69
  } }, K = (r, t) => !Et(r, t), et = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: K };
70
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), A.litPropertyMetadata ?? (A.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
70
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), v.litPropertyMetadata ?? (v.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);
@@ -266,28 +266,28 @@ 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(), j == null || j({ ReactiveElement: U }), (A.reactiveElementVersions ?? (A.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 }), (v.reactiveElementVersions ?? (v.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, q = M.trustedTypes, st = q ? q.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, G = "?" + _, Mt = `<${G}>`, E = document, R = () => E.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}*(?:[^
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}>`, E = document, R = () => E.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}*(?:[^
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(), S = E.createTreeWalker(E, 129);
278
278
  function ut(r, t) {
279
279
  if (!Q(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
280
280
  return st !== void 0 ? st.createHTML(t) : t;
281
281
  }
282
- const gt = (r, t) => {
282
+ const mt = (r, t) => {
283
283
  const e = r.length - 1, s = [];
284
284
  let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = C;
285
285
  for (let h = 0; h < e; h++) {
286
286
  const a = r[h];
287
- let d, f, l = -1, $ = 0;
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 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);
287
+ let d, y, l = -1, $ = 0;
288
+ for (; $ < a.length && (n.lastIndex = $, y = n.exec(a), y !== null); ) $ = n.lastIndex, n === C ? y[1] === "!--" ? n = it : y[1] !== void 0 ? n = rt : y[2] !== void 0 ? (pt.test(y[2]) && (i = RegExp("</" + y[2], "g")), n = b) : y[3] !== void 0 && (n = b) : n === b ? y[0] === ">" ? (n = i ?? C, l = -1) : y[1] === void 0 ? l = -2 : (l = n.lastIndex - y[2].length, d = y[1], n = y[3] === void 0 ? b : y[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);
291
291
  }
292
292
  return [ut(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
293
293
  };
@@ -296,7 +296,7 @@ class k {
296
296
  let i;
297
297
  this.parts = [];
298
298
  let o = 0, n = 0;
299
- const h = t.length - 1, a = this.parts, [d, f] = gt(t, e);
299
+ const h = t.length - 1, a = this.parts, [d, y] = mt(t, e);
300
300
  if (this.el = k.createElement(d, s), S.currentNode = this.el.content, e === 2 || e === 3) {
301
301
  const l = this.el.content.firstChild;
302
302
  l.replaceWith(...l.childNodes);
@@ -304,14 +304,14 @@ class k {
304
304
  for (; (i = S.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++], 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] === "?" ? mt : V[1] === "@" ? $t : H }), i.removeAttribute(l);
307
+ const $ = y[n++], A = i.getAttribute(l).split(_), V = /([.?@])?(.*)/.exec($);
308
+ a.push({ type: 1, index: o, name: V[2], strings: A, ctor: V[1] === "." ? yt : V[1] === "?" ? gt : 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 = q ? q.emptyScript : "";
314
- for (let v = 0; v < $; v++) i.append(l[v], R()), S.nextNode(), a.push({ type: 2, index: ++o });
313
+ i.textContent = F ? F.emptyScript : "";
314
+ for (let A = 0; A < $; A++) i.append(l[A], R()), S.nextNode(), a.push({ type: 2, index: ++o });
315
315
  i.append(l[$], R());
316
316
  }
317
317
  }
@@ -335,7 +335,7 @@ function w(r, t, e = r, s) {
335
335
  const o = N(t) ? void 0 : t._$litDirective$;
336
336
  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 = w(r, i._$AS(r, t.values), i, s)), t;
337
337
  }
338
- class yt {
338
+ class ft {
339
339
  constructor(t, e) {
340
340
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
341
341
  }
@@ -399,7 +399,7 @@ class P {
399
399
  const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = k.createElement(ut(s.h, s.h[0]), this.options)), s);
400
400
  if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(e);
401
401
  else {
402
- const n = new yt(i, this), h = n.u(this.options);
402
+ const n = new ft(i, this), h = n.u(this.options);
403
403
  n.p(e), this.T(h), this._$AH = n;
404
404
  }
405
405
  }
@@ -451,7 +451,7 @@ class H {
451
451
  t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
452
452
  }
453
453
  }
454
- class ft extends H {
454
+ class yt extends H {
455
455
  constructor() {
456
456
  super(...arguments), this.type = 3;
457
457
  }
@@ -459,7 +459,7 @@ class ft extends H {
459
459
  this.element[this.name] = t === c ? void 0 : t;
460
460
  }
461
461
  }
462
- class mt extends H {
462
+ class gt extends H {
463
463
  constructor() {
464
464
  super(...arguments), this.type = 4;
465
465
  }
@@ -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: yt, D: ct, V: w, I: P, H, N: mt, U: $t, B: ft, F: _t }, F = M.litHtmlPolyfillSupport;
496
- F == null || F(k, P), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.2.0");
495
+ const Zt = { M: Z, P: _, A: G, C: 1, L: mt, R: ft, D: ct, V: w, I: P, H, N: gt, U: $t, B: yt, F: _t }, B = M.litHtmlPolyfillSupport;
496
+ B == null || B(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$;
@@ -578,11 +578,11 @@ function p(r) {
578
578
  function Ht(r) {
579
579
  return p({ ...r, state: !0, attribute: !1 });
580
580
  }
581
- var g = [];
581
+ var m = [];
582
582
  for (var J = 0; J < 256; ++J)
583
- g.push((J + 256).toString(16).slice(1));
583
+ m.push((J + 256).toString(16).slice(1));
584
584
  function Vt(r, t = 0) {
585
- 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();
585
+ 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();
586
586
  }
587
587
  var L, Lt = new Uint8Array(16);
588
588
  function It() {
@@ -594,18 +594,18 @@ var Dt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(cryp
594
594
  const ht = {
595
595
  randomUUID: Dt
596
596
  };
597
- function qt(r, t, e) {
597
+ function Ft(r, t, e) {
598
598
  if (ht.randomUUID && !t && !r)
599
599
  return ht.randomUUID();
600
600
  r = r || {};
601
601
  var s = r.random || (r.rng || It)();
602
602
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Vt(s);
603
603
  }
604
- const jt = {
604
+ const qt = {
605
605
  hi: "Hei!"
606
- }, Bt = {
606
+ }, jt = {
607
607
  buttonAltText: "Åpne kalender"
608
- }, Ft = {
608
+ }, Bt = {
609
609
  days: [
610
610
  "Mandag",
611
611
  "Tirsdag",
@@ -674,10 +674,10 @@ const jt = {
674
674
  date: {
675
675
  multiple: "Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."
676
676
  }
677
- }, m = {
678
- example: jt,
679
- calendar: Bt,
680
- dates: Ft,
677
+ }, g = {
678
+ example: qt,
679
+ calendar: jt,
680
+ dates: Bt,
681
681
  forms: zt
682
682
  };
683
683
  var Jt = Object.defineProperty, u = (r, t, e, s) => {
@@ -685,12 +685,12 @@ 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 vt extends O {
688
+ class At extends O {
689
689
  /**
690
690
  * Add extra stuff here whenever we decide what should be added here…
691
691
  */
692
692
  constructor() {
693
- super(), this.strings = m;
693
+ super(), this.strings = g;
694
694
  }
695
695
  /**
696
696
  * Runs on mount, used to set up various values and whatever you need to run
@@ -713,46 +713,52 @@ class vt extends O {
713
713
  }
714
714
  u([
715
715
  p({ type: Object })
716
- ], vt.prototype, "strings");
717
- class y extends vt {
716
+ ], At.prototype, "strings");
717
+ class f extends At {
718
718
  constructor() {
719
- super(), this.id = qt(), 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 = m.forms.labels.optional, this.requiredTag = !1, this.requiredText = m.forms.labels.required, this.hasError = !1, this.errorMessage = "", this.touched = !1, this.internals = this.attachInternals();
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 = g.forms.labels.optional, this.requiredTag = !1, this.requiredText = g.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;
723
723
  }
724
724
  manageValidity(t) {
725
- this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, m.forms.messages.required, t) : t.validity.typeMismatch || t.validity.badInput ? this.internals.setValidity({ typeMismatch: !0 }, m.forms.messages.invalid, t) : t.validity.patternMismatch ? this.internals.setValidity(
725
+ this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, g.forms.messages.required, t) : t.validity.typeMismatch || t.validity.badInput ? this.internals.setValidity({ typeMismatch: !0 }, g.forms.messages.invalid, t) : t.validity.patternMismatch ? this.internals.setValidity(
726
726
  { patternMismatch: !0 },
727
- m.forms.messages.invalidPattern,
727
+ g.forms.messages.invalidPattern,
728
728
  t
729
- ) : t.validity.tooShort || this.minLength > 0 && this.value.length < this.minLength ? this.internals.setValidity({ tooShort: !0 }, m.forms.messages.tooShort, t) : t.validity.tooLong || this.maxLength > 0 && this.value.length > this.maxLength ? this.internals.setValidity({ tooLong: !0 }, m.forms.messages.tooLong, t) : t.validity.rangeUnderflow ? this.internals.setValidity(
729
+ ) : t.validity.tooShort || this.minLength > 0 && this.value.length < this.minLength ? this.internals.setValidity({ tooShort: !0 }, g.forms.messages.tooShort, t) : t.validity.tooLong || this.maxLength > 0 && this.value.length > this.maxLength ? this.internals.setValidity({ tooLong: !0 }, g.forms.messages.tooLong, t) : t.validity.rangeUnderflow ? this.internals.setValidity(
730
730
  { rangeUnderflow: !0 },
731
- m.forms.messages.rangeUnderflow,
731
+ g.forms.messages.rangeUnderflow,
732
732
  t
733
733
  ) : t.validity.rangeOverflow ? this.internals.setValidity(
734
734
  { rangeOverflow: !0 },
735
- m.forms.messages.rangeOverflow,
735
+ g.forms.messages.rangeOverflow,
736
736
  t
737
737
  ) : t.validity.customError ? this.internals.setValidity({ customError: !0 }, t.validationMessage, t) : this.internals.setValidity({});
738
738
  }
739
+ setFormValue(t) {
740
+ if (this.internals)
741
+ if (Array.isArray(t)) {
742
+ const e = new FormData();
743
+ t.forEach((s) => {
744
+ e.append(this.name, s);
745
+ }), this.internals.setFormValue(e);
746
+ } else
747
+ this.internals.setFormValue(t);
748
+ }
739
749
  // Trigger this when you want to set the value of the input out to the form
740
750
  onInput(t) {
741
751
  if (!this.touched) {
742
- this.touched = !0;
743
- return;
744
- }
745
- if (console.log("onInput", t), typeof t != "string" && !Array.isArray(t)) {
746
- console.log("Value must be a string or an array");
752
+ this.touched = !0, t && this.setFormValue(t);
747
753
  return;
748
754
  }
749
- !Array.isArray(t) && t.includes(",") && (t = t.split(",")), !this.multiple && !this.range && Array.isArray(t) && (t = t[0]), this.manageValidity(this.inputRef.value), this.inputRef2 && this.manageValidity(this.inputRef2.value), this.internals.setFormValue(t), this.dispatchEvent(new Event("input")), this.dispatchEvent(new Event("change")), this.dispatchEvent(
750
- new CustomEvent("value-changed", {
751
- detail: this._value,
755
+ 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(
756
+ new CustomEvent("value-change", {
757
+ detail: t,
752
758
  bubbles: !0,
753
759
  composed: !0
754
760
  })
755
- ), this.internals.reportValidity();
761
+ ), this.internals.reportValidity());
756
762
  }
757
763
  firstUpdated(t) {
758
764
  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);
@@ -760,64 +766,64 @@ class y extends vt {
760
766
  }
761
767
  u([
762
768
  p({ type: String, reflect: !0 })
763
- ], y.prototype, "id");
769
+ ], f.prototype, "id");
764
770
  u([
765
771
  p({ type: String, reflect: !0 })
766
- ], y.prototype, "name");
772
+ ], f.prototype, "name");
767
773
  u([
768
774
  p({ type: Boolean, reflect: !0 })
769
- ], y.prototype, "required");
775
+ ], f.prototype, "required");
770
776
  u([
771
777
  p({ type: Boolean, reflect: !0 })
772
- ], y.prototype, "disabled");
778
+ ], f.prototype, "disabled");
773
779
  u([
774
780
  p({ type: String, reflect: !0 })
775
- ], y.prototype, "placeholder");
781
+ ], f.prototype, "placeholder");
776
782
  u([
777
783
  p({ type: Number, reflect: !0 })
778
- ], y.prototype, "min");
784
+ ], f.prototype, "min");
779
785
  u([
780
786
  p({ type: Number, reflect: !0 })
781
- ], y.prototype, "max");
787
+ ], f.prototype, "max");
782
788
  u([
783
789
  p({ type: Number, reflect: !0 })
784
- ], y.prototype, "minlength");
790
+ ], f.prototype, "minlength");
785
791
  u([
786
792
  p({ type: Number, reflect: !0 })
787
- ], y.prototype, "maxlength");
793
+ ], f.prototype, "maxlength");
788
794
  u([
789
795
  p({ type: String, reflect: !0 })
790
- ], y.prototype, "pattern");
796
+ ], f.prototype, "pattern");
791
797
  u([
792
798
  p({ type: Boolean, reflect: !0 })
793
- ], y.prototype, "optionalTag");
799
+ ], f.prototype, "optionalTag");
794
800
  u([
795
801
  p({ type: String, reflect: !0 })
796
- ], y.prototype, "optionalText");
802
+ ], f.prototype, "optionalText");
797
803
  u([
798
804
  p({ type: Boolean, reflect: !0 })
799
- ], y.prototype, "requiredTag");
805
+ ], f.prototype, "requiredTag");
800
806
  u([
801
807
  p({ type: String, reflect: !0 })
802
- ], y.prototype, "requiredText");
808
+ ], f.prototype, "requiredText");
803
809
  u([
804
810
  p({ type: Boolean, reflect: !0 })
805
- ], y.prototype, "hasError");
811
+ ], f.prototype, "hasError");
806
812
  u([
807
813
  p({ type: String, reflect: !0 })
808
- ], y.prototype, "errorMessage");
814
+ ], f.prototype, "errorMessage");
809
815
  u([
810
816
  Ht()
811
- ], y.prototype, "touched");
817
+ ], f.prototype, "touched");
812
818
  export {
813
819
  c as D,
814
- vt as P,
820
+ At as P,
815
821
  x as R,
816
- y as a,
822
+ f as a,
817
823
  Kt as k,
818
824
  p as n,
819
825
  Ht as r,
820
826
  Zt as s,
821
- m as t,
822
- qt as v
827
+ g as t,
828
+ Ft as v
823
829
  };