@oslokommune/punkt-elements 11.12.3

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 (35) hide show
  1. package/LICENSE +21 -0
  2. package/dist/converters-01e4a1b1.cjs +5 -0
  3. package/dist/converters-92631e0d.js +105 -0
  4. package/dist/directive-6900e150.cjs +23 -0
  5. package/dist/directive-720b7cc8.js +606 -0
  6. package/dist/index-34184de4.js +173 -0
  7. package/dist/index-51027300.cjs +13 -0
  8. package/dist/pkt-el-calendar.cjs +60 -0
  9. package/dist/pkt-el-calendar.js +1504 -0
  10. package/dist/pkt-el-component-template.cjs +29 -0
  11. package/dist/pkt-el-component-template.js +100 -0
  12. package/dist/pkt-el-element.cjs +1 -0
  13. package/dist/pkt-el-element.js +5 -0
  14. package/dist/pkt-el-icon.cjs +9 -0
  15. package/dist/pkt-el-icon.js +103 -0
  16. package/dist/pkt-el-index.cjs +1 -0
  17. package/dist/pkt-el-index.js +12 -0
  18. package/dist/property-0378afc0.js +47 -0
  19. package/dist/property-e170cbca.cjs +9 -0
  20. package/dist/src/components/calendar/index.d.ts +60 -0
  21. package/dist/src/components/component-template/index.d.ts +35 -0
  22. package/dist/src/components/element/index.d.ts +25 -0
  23. package/dist/src/components/icon/index.d.ts +30 -0
  24. package/dist/src/components/index.d.ts +3 -0
  25. package/dist/src/controllers/pkt-slot-controller.d.ts +12 -0
  26. package/dist/src/helpers/converters.d.ts +3 -0
  27. package/dist/src/index.d.ts +1 -0
  28. package/dist/src/translations/no.json.d.ts +43 -0
  29. package/dist/vite.config.d.ts +2 -0
  30. package/package.json +61 -0
  31. package/src/components/calendar/index.ts +375 -0
  32. package/src/components/component-template/index.ts +113 -0
  33. package/src/components/element/index.ts +37 -0
  34. package/src/components/icon/index.ts +100 -0
  35. package/src/components/index.ts +3 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present Oslo kommune, Oslo Origo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ "use strict";const s=require("./directive-6900e150.cjs");/**
2
+ * @license
3
+ * Copyright 2018 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const d=s.e(class extends s.i{constructor(t){var r;if(super(t),t.type!==s.t.ATTRIBUTE||t.name!=="class"||((r=t.strings)==null?void 0:r.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(r=>t[r]).join(" ")+" "}update(t,[r]){var i,a;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(e=>e!=="")));for(const e in r)r[e]&&!((i=this.nt)!=null&&i.has(e))&&this.st.add(e);return this.render(r)}const n=t.element.classList;for(const e of this.st)e in r||(n.remove(e),this.st.delete(e));for(const e in r){const o=!!r[e];o===this.st.has(e)||(a=this.nt)!=null&&a.has(e)||(o?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return s.w}}),h={hi:"Hei!"},c={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"},u={example:h,dates:c},g=t=>{if(Array.isArray(t))return t;if(typeof t=="string")return t.split(",")},p=t=>t?new Date(t):void 0,l=t=>{if(typeof t=="string")return t.split(",").map(r=>new Date(r));if(Array.isArray(t))return t.map(r=>new Date(r))};exports.csvToArray=g;exports.e=d;exports.stringToDate=p;exports.stringsToDate=l;exports.translations=u;
@@ -0,0 +1,105 @@
1
+ import { e as o, i as d, t as h, w as c } from "./directive-720b7cc8.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2018 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const m = o(class extends d {
8
+ constructor(t) {
9
+ var e;
10
+ if (super(t), t.type !== h.ATTRIBUTE || t.name !== "class" || ((e = t.strings) == null ? void 0 : e.length) > 2)
11
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
12
+ }
13
+ render(t) {
14
+ return " " + Object.keys(t).filter((e) => t[e]).join(" ") + " ";
15
+ }
16
+ update(t, [e]) {
17
+ var n, a;
18
+ if (this.st === void 0) {
19
+ this.st = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.nt = new Set(t.strings.join(" ").split(/\s/).filter((s) => s !== "")));
20
+ for (const s in e)
21
+ e[s] && !((n = this.nt) != null && n.has(s)) && this.st.add(s);
22
+ return this.render(e);
23
+ }
24
+ const r = t.element.classList;
25
+ for (const s of this.st)
26
+ s in e || (r.remove(s), this.st.delete(s));
27
+ for (const s in e) {
28
+ const i = !!e[s];
29
+ i === this.st.has(s) || (a = this.nt) != null && a.has(s) || (i ? (r.add(s), this.st.add(s)) : (r.remove(s), this.st.delete(s)));
30
+ }
31
+ return c;
32
+ }
33
+ }), p = {
34
+ hi: "Hei!"
35
+ }, u = {
36
+ days: [
37
+ "Mandag",
38
+ "Tirsdag",
39
+ "Onsdag",
40
+ "Torsdag",
41
+ "Fredag",
42
+ "Lørdag",
43
+ "Søndag"
44
+ ],
45
+ daysShort: [
46
+ "Man",
47
+ "Tir",
48
+ "Ons",
49
+ "Tor",
50
+ "Fre",
51
+ "Lør",
52
+ "Søn"
53
+ ],
54
+ months: [
55
+ "Januar",
56
+ "Februar",
57
+ "Mars",
58
+ "April",
59
+ "Mai",
60
+ "Juni",
61
+ "Juli",
62
+ "August",
63
+ "September",
64
+ "Oktober",
65
+ "November",
66
+ "Desember"
67
+ ],
68
+ monthsShort: [
69
+ "Jan",
70
+ "Feb",
71
+ "Mar",
72
+ "Apr",
73
+ "Mai",
74
+ "Jun",
75
+ "Jul",
76
+ "Aug",
77
+ "Sep",
78
+ "Okt",
79
+ "Nov",
80
+ "Des"
81
+ ],
82
+ week: "Uke",
83
+ prevMonth: "Forrige måned",
84
+ nextMonth: "Neste måned"
85
+ }, f = {
86
+ example: p,
87
+ dates: u
88
+ }, l = (t) => {
89
+ if (Array.isArray(t))
90
+ return t;
91
+ if (typeof t == "string")
92
+ return t.split(",");
93
+ }, y = (t) => t ? new Date(t) : void 0, b = (t) => {
94
+ if (typeof t == "string")
95
+ return t.split(",").map((e) => new Date(e));
96
+ if (Array.isArray(t))
97
+ return t.map((e) => new Date(e));
98
+ };
99
+ export {
100
+ b as a,
101
+ l as c,
102
+ m as e,
103
+ y as s,
104
+ f as t
105
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";/**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const N=globalThis,D=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),j=new WeakMap;let nt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==X)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(D&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=j.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&j.set(e,t))}return t}toString(){return this.cssText}};const ot=r=>new nt(typeof r=="string"?r:r+"",void 0,X),ht=(r,t)=>{if(D)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=N.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},W=D?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ot(e)})(r):r;/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const{is:lt,defineProperty:at,getOwnPropertyDescriptor:ct,getOwnPropertyNames:dt,getOwnPropertySymbols:pt,getPrototypeOf:$t}=Object,A=globalThis,V=A.trustedTypes,ut=V?V.emptyScript:"",k=A.reactiveElementPolyfillSupport,b=(r,t)=>r,O={toAttribute(r,t){switch(t){case Boolean:r=r?ut: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}},z=(r,t)=>!lt(r,t),q={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:z};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);class v 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=q){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&&at(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=ct(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 a=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??q}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=$t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const e=this.properties,s=[...dt(e),...pt(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(W(i))}else t!==void 0&&e.push(W(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 ht(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:O).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),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:O;this._$Em=i,this[i]=a.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??z)(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){}}v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[b("elementProperties")]=new Map,v[b("finalized")]=new Map,k==null||k({ReactiveElement:v}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const C=globalThis,R=C.trustedTypes,J=R?R.createPolicy("lit-html",{createHTML:r=>r}):void 0,tt="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,et="?"+_,_t=`<${et}>`,m=document,P=()=>m.createComment(""),U=r=>r===null||typeof r!="object"&&typeof r!="function",st=Array.isArray,At=r=>st(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",L=`[
14
+ \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,Y=/>/g,f=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,F=/"/g,it=/^(?:script|style|textarea|title)$/i,ft=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),gt=ft(1),y=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),G=new WeakMap,g=m.createTreeWalker(m,129);function rt(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return J!==void 0?J.createHTML(t):t}const mt=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":"",n=S;for(let a=0;a<e;a++){const h=r[a];let d,p,l=-1,$=0;for(;$<h.length&&(n.lastIndex=$,p=n.exec(h),p!==null);)$=n.lastIndex,n===S?p[1]==="!--"?n=K:p[1]!==void 0?n=Y:p[2]!==void 0?(it.test(p[2])&&(i=RegExp("</"+p[2],"g")),n=f):p[3]!==void 0&&(n=f):n===f?p[0]===">"?(n=i??S,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,d=p[1],n=p[3]===void 0?f:p[3]==='"'?F:Z):n===F||n===Z?n=f:n===K||n===Y?n=S:(n=f,i=void 0);const u=n===f&&r[a+1].startsWith("/>")?" ":"";o+=n===S?h+_t:l>=0?(s.push(d),h.slice(0,l)+tt+h.slice(l)+_+u):h+_+(l===-2?a:u)}return[rt(r,o+(r[e]||"<?>")+(t===2?"</svg>":"")),s]};class T{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const a=t.length-1,h=this.parts,[d,p]=mt(t,e);if(this.el=T.createElement(d,s),g.currentNode=this.el.content,e===2){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(tt)){const $=p[n++],u=i.getAttribute(l).split(_),H=/([.?@])?(.*)/.exec($);h.push({type:1,index:o,name:H[2],strings:u,ctor:H[1]==="."?vt:H[1]==="?"?Et:H[1]==="@"?St:M}),i.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:o}),i.removeAttribute(l));if(it.test(i.tagName)){const l=i.textContent.split(_),$=l.length-1;if($>0){i.textContent=R?R.emptyScript:"";for(let u=0;u<$;u++)i.append(l[u],P()),g.nextNode(),h.push({type:2,index:++o});i.append(l[$],P())}}}else if(i.nodeType===8)if(i.data===et)h.push({type:2,index:o});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,e){const s=m.createElement("template");return s.innerHTML=t,s}}function E(r,t,e=r,s){var n,a;if(t===y)return t;let i=s!==void 0?(n=e._$Co)==null?void 0:n[s]:e._$Cl;const o=U(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=E(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)??m).importNode(e,!0);g.currentNode=i;let o=g.nextNode(),n=0,a=0,h=s[0];for(;h!==void 0;){if(n===h.index){let d;h.type===2?d=new x(o,o.nextSibling,this,t):h.type===1?d=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(d=new bt(o,this,t)),this._$AV.push(d),h=s[++a]}n!==(h==null?void 0:h.index)&&(o=g.nextNode(),n++)}return g.currentNode=m,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._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(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=E(this,t,e),U(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==y&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):At(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==c&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.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=T.createElement(rt(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),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=G.get(t.strings);return e===void 0&&G.set(t.strings,e=new T(t)),e}k(t){st(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.S(P()),this.S(P()),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._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class M{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=c,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=c}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=E(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==y,n&&(this._$AH=t);else{const a=t;let h,d;for(t=o[0],h=0;h<o.length-1;h++)d=E(this,a[s+h],e,h),d===y&&(d=this._$AH[h]),n||(n=!U(d)||d!==this._$AH[h]),d===c?t=c:t!==c&&(t+=(d??"")+o[h+1]),this._$AH[h]=d}n&&!i&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class vt extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}}class Et extends M{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class St extends M{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??c)===y)return;const s=this._$AH,i=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==c&&(s===c||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 bt{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){E(this,t)}}const I=C.litHtmlPolyfillSupport;I==null||I(T,x),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.1.2");const Ct=(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(P(),o),o,void 0,e??{})}return i._$AI(r),i};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */class w extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return y}}var Q;w._$litElement$=!0,w.finalized=!0,(Q=globalThis.litElementHydrateSupport)==null||Q.call(globalThis,{LitElement:w});const B=globalThis.litElementPolyfillSupport;B==null||B({LitElement:w});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */const wt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Pt=r=>(...t)=>({_$litDirective$:r,values:t});class Ut{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}exports.T=c;exports.e=Pt;exports.f=z;exports.i=Ut;exports.s=w;exports.t=wt;exports.u=O;exports.w=y;exports.x=gt;