@oslokommune/punkt-elements 18.9.3 → 18.9.7
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.
- package/CHANGELOG.md +34 -0
- package/dist/{accordion-CsrLQXEA.cjs → accordion-BLMbI8SQ.cjs} +1 -1
- package/dist/{accordion-DoxhiwK-.js → accordion-Bwka5Mxo.js} +5 -5
- package/dist/{alert-DH3VqNqh.cjs → alert-Cfr6t5uz.cjs} +1 -1
- package/dist/{alert-DxAGxSX_.js → alert-DaXpwnzT.js} +6 -6
- package/dist/{async-directive-BSwJ8-GL.js → async-directive-C8UAk8Mv.js} +2 -2
- package/dist/{async-directive-CfPXShXu.cjs → async-directive-U0EE5r36.cjs} +1 -1
- package/dist/{backlink-CGc7r9CS.js → backlink-BjJwDjuP.js} +3 -3
- package/dist/{backlink-CDH824db.cjs → backlink-DM220m4q.cjs} +1 -1
- package/dist/{breadcrumbs-DRGhIXmN.js → breadcrumbs-B1pDtQy8.js} +2 -2
- package/dist/{breadcrumbs-B37tsIoh.cjs → breadcrumbs-BUmbj-hP.cjs} +1 -1
- package/dist/{button-D6QhHPWH.js → button-BUl8uWWh.js} +5 -5
- package/dist/{button-Cx6Xdp6t.cjs → button-CCR4eyt_.cjs} +1 -1
- package/dist/{calendar-CAwIY7x_.cjs → calendar-BuSfyUR9.cjs} +1 -1
- package/dist/{calendar-42o_q-jI.js → calendar-KUQ1dFeX.js} +3 -3
- package/dist/{card-cyZE94EO.js → card-27RxxKxW.js} +6 -6
- package/dist/{card-CB72gwBC.cjs → card-B-RKnu_C.cjs} +1 -1
- package/dist/{checkbox-BhyUp6l6.js → checkbox-CTf4GatI.js} +4 -4
- package/dist/{checkbox-DJfH-vTj.cjs → checkbox-DlzVGBum.cjs} +1 -1
- package/dist/{class-map-DupQbnhE.cjs → class-map-B0FX3YsK.cjs} +1 -1
- package/dist/{class-map-DSoj1J68.js → class-map-D5GHsely.js} +1 -1
- package/dist/combobox-CNCM-Psm.cjs +139 -0
- package/dist/{combobox-fzSaCPok.js → combobox-Dym_phvv.js} +67 -58
- package/dist/components/combobox/combobox.d.ts +1 -0
- package/dist/components/header/header-service.d.ts +1 -1
- package/dist/components/header/types.d.ts +1 -1
- package/dist/components/helptext/helptext-association.test.d.ts +0 -0
- package/dist/components/timepicker/timepicker.d.ts +1 -0
- package/dist/{consent-CsgKWDsR.js → consent-BeoP4rOa.js} +2 -2
- package/dist/{consent-DnE6IPEj.cjs → consent-Cle1hkPg.cjs} +1 -1
- package/dist/{datepicker-D6os8IVu.cjs → datepicker-BtEZMsWH.cjs} +1 -1
- package/dist/{datepicker-DMiZ3BBw.js → datepicker-Ct4dbs4e.js} +11 -11
- package/dist/{directive-helpers-2mcpDDv5.cjs → directive-helpers-BushnrQQ.cjs} +1 -1
- package/dist/{directive-helpers-ChEduoup.js → directive-helpers-DpyLJPJm.js} +1 -1
- package/dist/{element-D_mCyFeX.cjs → element-CewjrA4g.cjs} +1 -1
- package/dist/{element-J8nynuVk.js → element-CqC-sGuC.js} +11 -1
- package/dist/{element-with-slot-BOuXlWSY.js → element-with-slot-D_OKDlYo.js} +2 -2
- package/dist/{element-with-slot-C66Jck5e.cjs → element-with-slot-MCvSBwUv.cjs} +1 -1
- package/dist/{fileupload-Y4bDkaD9.cjs → fileupload-BVAgrofy.cjs} +3 -3
- package/dist/{fileupload-C5lxuood.js → fileupload-Dqf_94m2.js} +11 -11
- package/dist/{footer-ByAxlj9_.js → footer-Bf6RFuia.js} +4 -4
- package/dist/{footer-Ca3DM544.cjs → footer-XrX6LFHY.cjs} +1 -1
- package/dist/{header-CP332MCg.cjs → header-DMMt5FtF.cjs} +64 -50
- package/dist/{header-CCJeadiL.js → header-fkKhLsyE.js} +182 -167
- package/dist/{header-menu-CIuu8_UC.js → header-menu-CUHrJCvx.js} +4 -4
- package/dist/{header-menu-B9ABa0WW.cjs → header-menu-DYZsigfH.cjs} +1 -1
- package/dist/{heading-4ZHACOeL.cjs → heading-BDdX4JiM.cjs} +1 -1
- package/dist/{heading-BHWdVbvN.js → heading-ELXWxyTv.js} +2 -2
- package/dist/{helptext-BESB9Vlq.js → helptext-BQkrYsoV.js} +4 -4
- package/dist/{helptext-6HsH-I6a.cjs → helptext-DQe6GO75.cjs} +1 -1
- package/dist/{icon-DkVqRWbC.js → icon-B2v30QUk.js} +1 -1
- package/dist/{icon-BzxBkRyE.cjs → icon-Clz68-Kz.cjs} +1 -1
- package/dist/{if-defined-BILLSM7i.js → if-defined-BNXGXCwT.js} +1 -1
- package/dist/if-defined-CjRKmMQs.cjs +1 -0
- package/dist/{input-element-BWxgs8L-.js → input-element-BTzuDh4h.js} +2 -2
- package/dist/{input-element-PN5nWd1A.cjs → input-element-BdIWsDl-.cjs} +1 -1
- package/dist/{input-wrapper-D64Qn-QH.cjs → input-wrapper-BIrQijWT.cjs} +1 -1
- package/dist/{input-wrapper-Bg06k-cj.js → input-wrapper-CvFMiqIt.js} +6 -6
- package/dist/{link-Bk7aDZCC.cjs → link-1JEWpEDG.cjs} +1 -1
- package/dist/{link-C7fOEv66.js → link-BxKWhYsn.js} +4 -4
- package/dist/{linkcard-Bguo9oCv.js → linkcard-CICSZ7pK.js} +4 -4
- package/dist/{linkcard-rZpQuO1Z.cjs → linkcard-DXOkeQUy.cjs} +1 -1
- package/dist/{listbox-CrQboPG6.js → listbox-DcCrI15L.js} +4 -4
- package/dist/{listbox-kV4OO1Qa.cjs → listbox-DsYaWvLu.cjs} +1 -1
- package/dist/{loader-BAn68gBb.cjs → loader-BA__N62k.cjs} +1 -1
- package/dist/{loader-C3gwO0i3.js → loader-nIl61aTv.js} +4 -4
- package/dist/{messagebox-WH2HjT5I.cjs → messagebox-CdNMgTz4.cjs} +1 -1
- package/dist/{messagebox-DAE59dMX.js → messagebox-D0qxveug.js} +4 -4
- package/dist/{modal-DdC1_qT3.js → modal-D5tGq-nN.js} +5 -5
- package/dist/{modal-DZm_fn3K.cjs → modal-i3Qxv38H.cjs} +1 -1
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -1
- package/dist/pkt-footer.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +34 -34
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/{pkt-options-controller-DXAAVcBJ.cjs → pkt-options-controller-BClk341e.cjs} +1 -1
- package/dist/{pkt-options-controller-XcIgx_v1.js → pkt-options-controller-v2bPM9iU.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{progressbar-D1x6MwdY.js → progressbar-4WyR4T72.js} +5 -5
- package/dist/{progressbar-DsE4-qaW.cjs → progressbar-CJFGbev-.cjs} +1 -1
- package/dist/{radiobutton-CnGhAnjp.cjs → radiobutton-BQRtv7PK.cjs} +1 -1
- package/dist/{radiobutton-DWdn1O48.js → radiobutton-D7308uCY.js} +4 -4
- package/dist/{ref-DNowxdYH.js → ref-37-yxmc4.js} +2 -2
- package/dist/{ref-AuNEkS5a.cjs → ref-HT6KRjxp.cjs} +1 -1
- package/dist/{repeat-B3ksuY2F.cjs → repeat-Ddge5HTp.cjs} +1 -1
- package/dist/{repeat-CZ1oMXnW.js → repeat-DntD73oB.js} +2 -2
- package/dist/{searchinput-vi7twt5b.cjs → searchinput-D1cJ73Ki.cjs} +1 -1
- package/dist/{searchinput-CmyWnNr6.js → searchinput-j4IvYRzj.js} +4 -4
- package/dist/{select-CM-CcWab.js → select-B4gbFOil.js} +7 -7
- package/dist/{select-D761TXmv.cjs → select-oIF7UVvV.cjs} +1 -1
- package/dist/shared-strings/nb.d.ts +10 -0
- package/dist/{tabs-hiTrWsXq.cjs → tabs-95BpwB6j.cjs} +1 -1
- package/dist/{tabs-kxsX1ZEf.js → tabs-DexV26qJ.js} +4 -4
- package/dist/{tag-CGlxtBOH.cjs → tag-CQEyjF32.cjs} +1 -1
- package/dist/{tag-bztxjcF0.js → tag-DoUC99hn.js} +5 -5
- package/dist/{textarea-D3SeDZ1r.js → textarea-DGSMKcqK.js} +9 -9
- package/dist/{textarea-4s_SiG0_.cjs → textarea-DNFX958g.cjs} +1 -1
- package/dist/{textinput-uDRbleIa.cjs → textinput-Bzkdo2mN.cjs} +1 -1
- package/dist/{textinput-Dje0Zcsa.js → textinput-DpLeElI_.js} +8 -8
- package/dist/{timepicker--CrfIU_7.js → timepicker-CCNQeX5Q.js} +36 -27
- package/dist/timepicker-DCzhlRuc.cjs +198 -0
- package/package.json +2 -2
- package/src/components/combobox/combobox.ts +12 -0
- package/src/components/fileupload/fileupload.ts +1 -3
- package/src/components/header/header-global.test.ts +8 -0
- package/src/components/header/header-global.ts +13 -2
- package/src/components/header/header-service.test.ts +54 -0
- package/src/components/header/header-service.ts +20 -7
- package/src/components/header/header-user-menu.ts +10 -8
- package/src/components/header/types.ts +3 -2
- package/src/components/helptext/helptext-association.test.ts +108 -0
- package/src/components/timepicker/timepicker.ts +11 -0
- package/dist/combobox-B9Qo7hbt.cjs +0 -137
- package/dist/if-defined-BbUZeoaQ.cjs +0 -1
- package/dist/timepicker-auQ5Y6Et.cjs +0 -196
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-
|
|
2
|
-
import { t as o } from "./class-map-
|
|
3
|
-
import { t as s } from "./if-defined-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-CqC-sGuC.js";
|
|
2
|
+
import { t as o } from "./class-map-D5GHsely.js";
|
|
3
|
+
import { t as s } from "./if-defined-BNXGXCwT.js";
|
|
4
4
|
import { t as c } from "./format-BTeSVkED.js";
|
|
5
|
-
import { r as l } from "./element-with-slot-
|
|
6
|
-
import "./icon-
|
|
7
|
-
import { n as u, t as d } from "./ref-
|
|
8
|
-
import "./tag-
|
|
9
|
-
import { t as f } from "./repeat-
|
|
10
|
-
import { a as p, c as m, i as h, l as g, o as _, r as v, s as y } from "./listbox-
|
|
11
|
-
import { t as b } from "./input-element-
|
|
12
|
-
import { t as x } from "./pkt-options-controller-
|
|
13
|
-
import "./input-wrapper-
|
|
5
|
+
import { r as l } from "./element-with-slot-D_OKDlYo.js";
|
|
6
|
+
import "./icon-B2v30QUk.js";
|
|
7
|
+
import { n as u, t as d } from "./ref-37-yxmc4.js";
|
|
8
|
+
import "./tag-DoUC99hn.js";
|
|
9
|
+
import { t as f } from "./repeat-DntD73oB.js";
|
|
10
|
+
import { a as p, c as m, i as h, l as g, o as _, r as v, s as y } from "./listbox-DcCrI15L.js";
|
|
11
|
+
import { t as b } from "./input-element-BTzuDh4h.js";
|
|
12
|
+
import { t as x } from "./pkt-options-controller-v2bPM9iU.js";
|
|
13
|
+
import { r as S } from "./input-wrapper-CvFMiqIt.js";
|
|
14
14
|
//#region ../../shared-utils/combobox/input-utils.ts
|
|
15
|
-
var
|
|
15
|
+
var C = (e, t, n) => {
|
|
16
16
|
switch (e) {
|
|
17
17
|
case ",": return n ? "addValue" : null;
|
|
18
18
|
case "Enter": return "addValue";
|
|
@@ -21,7 +21,7 @@ var S = (e, t, n) => {
|
|
|
21
21
|
case "Escape": return "closeOptions";
|
|
22
22
|
default: return null;
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, w = (e, t, n, r, i) => {
|
|
25
25
|
if (!e) return {
|
|
26
26
|
action: "none",
|
|
27
27
|
value: null
|
|
@@ -43,7 +43,7 @@ var S = (e, t, n) => {
|
|
|
43
43
|
action: "none",
|
|
44
44
|
value: null
|
|
45
45
|
};
|
|
46
|
-
},
|
|
46
|
+
}, T = (e, t, n, r, i) => e.trim().toLowerCase() ? {
|
|
47
47
|
...m(e, t, n, r),
|
|
48
48
|
shouldRemoveValue: !1,
|
|
49
49
|
shouldResetInput: !1
|
|
@@ -52,10 +52,10 @@ var S = (e, t, n) => {
|
|
|
52
52
|
userInfoMessage: "",
|
|
53
53
|
shouldRemoveValue: !i && !!t[0],
|
|
54
54
|
shouldResetInput: !0
|
|
55
|
-
},
|
|
55
|
+
}, E = (e, t, n) => {
|
|
56
56
|
let r = h(t, e);
|
|
57
57
|
return n === "label" && r?.label ? r.label : e;
|
|
58
|
-
},
|
|
58
|
+
}, D = {
|
|
59
59
|
markOptionSelected(e, t) {
|
|
60
60
|
if (t) {
|
|
61
61
|
for (let n of e) if (n.value === t) {
|
|
@@ -81,7 +81,7 @@ var S = (e, t, n) => {
|
|
|
81
81
|
removeUserAddedOptions(e) {
|
|
82
82
|
return e.filter((e) => !e.userAdded);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, O = { parseOptionsFromSlot(e) {
|
|
85
85
|
let t = [];
|
|
86
86
|
return e.forEach((e) => {
|
|
87
87
|
if (!e.textContent && !e.getAttribute("value")) return;
|
|
@@ -91,7 +91,7 @@ var S = (e, t, n) => {
|
|
|
91
91
|
};
|
|
92
92
|
e.getAttribute("data-prefix") && (n.prefix = e.getAttribute("data-prefix") || void 0), e.getAttribute("tagskincolor") && (n.tagSkinColor = e.getAttribute("tagskincolor")), e.getAttribute("description") && (n.description = e.getAttribute("description") || void 0), n.fulltext = v(n), t.push(n);
|
|
93
93
|
}), t;
|
|
94
|
-
} },
|
|
94
|
+
} }, k = {
|
|
95
95
|
cloneOptions(e) {
|
|
96
96
|
return Array.isArray(e) ? e.map((e) => ({ ...e })) : [];
|
|
97
97
|
},
|
|
@@ -107,7 +107,7 @@ var S = (e, t, n) => {
|
|
|
107
107
|
mergeWithUserAdded(e, t, n) {
|
|
108
108
|
return [...t.filter((e) => e?.userAdded && n.includes(e.value)).filter((t) => !(Array.isArray(e) ? e : []).some((e) => e.value === t.value)), ...e];
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, A = {
|
|
111
111
|
name: "pkt-combobox",
|
|
112
112
|
react: "PktCombobox",
|
|
113
113
|
"css-class": "pkt-combobox",
|
|
@@ -497,9 +497,9 @@ var S = (e, t, n) => {
|
|
|
497
497
|
description: "Returnerer <code>event.detail { isOpen: true }</code> eller <code>event.detail { isOpen: false }</code> når hjelpeteksten åpnes eller lukkes"
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
},
|
|
500
|
+
}, j = class extends b {
|
|
501
501
|
constructor() {
|
|
502
|
-
super(), this.value = "", this.options = [], this.defaultOptions = [], this.allowUserInput = !1, this.typeahead = !1, this.includeSearch = !1, this.searchPlaceholder = null, this.multiple = !1, this.maxlength = null, this.displayValueAs =
|
|
502
|
+
super(), this.value = "", this.options = [], this.defaultOptions = [], this.allowUserInput = !1, this.typeahead = !1, this.includeSearch = !1, this.searchPlaceholder = null, this.multiple = !1, this.maxlength = null, this.displayValueAs = A.props.displayValueAs.default, this.tagPlacement = null, this.isOpen = !1, this._options = [], this._value = [], this._isOptionsOpen = !1, this._userInfoMessage = "", this._messageValue = null, this._addValueText = null, this._maxIsReached = !1, this._search = "", this._inputFocus = !1, this._skipInputTab = !1, this._optionsFromSlot = !1, this._lastSlotGeneration = 0, this._suppressNextOpen = !1, this.inputRef = d(), this.triggerRef = d(), this.listboxRef = d(), this._pendingDispatchFrom = null, this.optionsController = new x(this);
|
|
503
503
|
}
|
|
504
504
|
get _hasTextInput() {
|
|
505
505
|
return this.typeahead || this.allowUserInput;
|
|
@@ -546,36 +546,36 @@ var S = (e, t, n) => {
|
|
|
546
546
|
i([a({
|
|
547
547
|
type: String,
|
|
548
548
|
reflect: !0
|
|
549
|
-
})],
|
|
549
|
+
})], j.prototype, "value", void 0), i([a({ type: Array })], j.prototype, "options", void 0), i([a({
|
|
550
550
|
type: Array,
|
|
551
551
|
attribute: "default-options"
|
|
552
|
-
})],
|
|
552
|
+
})], j.prototype, "defaultOptions", void 0), i([a({
|
|
553
553
|
type: Boolean,
|
|
554
554
|
attribute: "allow-user-input"
|
|
555
|
-
})],
|
|
555
|
+
})], j.prototype, "allowUserInput", void 0), i([a({ type: Boolean })], j.prototype, "typeahead", void 0), i([a({
|
|
556
556
|
type: Boolean,
|
|
557
557
|
attribute: "include-search"
|
|
558
|
-
})],
|
|
558
|
+
})], j.prototype, "includeSearch", void 0), i([a({
|
|
559
559
|
type: String,
|
|
560
560
|
attribute: "search-placeholder"
|
|
561
|
-
})],
|
|
561
|
+
})], j.prototype, "searchPlaceholder", void 0), i([a({ type: Boolean })], j.prototype, "multiple", void 0), i([a({ type: Number })], j.prototype, "maxlength", void 0), i([a({
|
|
562
562
|
type: String,
|
|
563
563
|
attribute: "display-value-as"
|
|
564
|
-
})],
|
|
564
|
+
})], j.prototype, "displayValueAs", void 0), i([a({
|
|
565
565
|
type: String,
|
|
566
566
|
attribute: "tag-placement"
|
|
567
|
-
})],
|
|
567
|
+
})], j.prototype, "tagPlacement", void 0), i([a({
|
|
568
568
|
type: Boolean,
|
|
569
569
|
attribute: "open"
|
|
570
|
-
})],
|
|
570
|
+
})], j.prototype, "isOpen", void 0), i([r()], j.prototype, "_options", void 0), i([r()], j.prototype, "_value", void 0), i([r()], j.prototype, "_isOptionsOpen", void 0), i([r()], j.prototype, "_userInfoMessage", void 0), i([r()], j.prototype, "_messageValue", void 0), i([r()], j.prototype, "_addValueText", void 0), i([r()], j.prototype, "_maxIsReached", void 0), i([r()], j.prototype, "_search", void 0), i([r()], j.prototype, "_inputFocus", void 0), i([r()], j.prototype, "_skipInputTab", void 0);
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region src/components/combobox/combobox-value.ts
|
|
573
|
-
var
|
|
573
|
+
var M = class extends j {
|
|
574
574
|
toggleValue(e) {
|
|
575
575
|
if (this.disabled) return;
|
|
576
576
|
this.touched = !0, this._userInfoMessage = "", this._addValueText = null;
|
|
577
577
|
let t = h(this.options, e)?.value || null, n = this._value.includes(e || t || ""), r = !!t, i = this._options.find((t) => t.value === e)?.disabled || !1, a = !e?.trim(), o = !this.multiple, s = this.multiple, c = g(this._value.length, this.maxlength), l = !1, u = !0, d = "", f = null, p = "";
|
|
578
|
-
i || (!r && this.allowUserInput && !a ? (this.addNewUserValue(e), d = "valueAdded", l = s) : !r && !this.allowUserInput ? (o && this._value[0] && this.removeValue(this._value[0]), u = !1, l = !0, d = "noResults") : n ? (this.removeValue(t), l = !0, o && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = "")) : a && o ? (this.removeAllSelected(), l = !0) : o ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(t), l = !1, d = "valueSelected", f = this._hasTextInput ?
|
|
578
|
+
i || (!r && this.allowUserInput && !a ? (this.addNewUserValue(e), d = "valueAdded", l = s) : !r && !this.allowUserInput ? (o && this._value[0] && this.removeValue(this._value[0]), u = !1, l = !0, d = "noResults") : n ? (this.removeValue(t), l = !0, o && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = "")) : a && o ? (this.removeAllSelected(), l = !0) : o ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(t), l = !1, d = "valueSelected", f = this._hasTextInput ? E(t || "", this.options, this.displayValueAs) : y(h(this.options, t), this.displayValueAs)) : s && !c ? (this.setSelected(t), l = !0) : s && c ? (d = "maxSelected", u = !1, p = e) : (o && this.removeAllSelected(), d = "noValidValue", u = !1, l = !0, p = e), this._isOptionsOpen = l, l || window.setTimeout(() => {
|
|
579
579
|
this.focusAfterCommit();
|
|
580
580
|
}, 0), this._search = p || "", this.resetComboboxInput(u), this._userInfoMessage = d, this._messageValue = f, s && this.updateMaxReached());
|
|
581
581
|
}
|
|
@@ -585,14 +585,14 @@ var j = class extends A {
|
|
|
585
585
|
this._userInfoMessage = "maxSelected";
|
|
586
586
|
return;
|
|
587
587
|
}
|
|
588
|
-
!this.multiple && this.removeAllSelected(), this._value = e ? [...this._value, e] : this._value,
|
|
588
|
+
!this.multiple && this.removeAllSelected(), this._value = e ? [...this._value, e] : this._value, D.markOptionSelected(this._options, e), this.resetComboboxInput(!0);
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
591
|
removeSelected(e) {
|
|
592
592
|
if (!e) return;
|
|
593
593
|
this._value = this._value.filter((t) => t !== e);
|
|
594
594
|
let t = h(this.options, e);
|
|
595
|
-
t && (
|
|
595
|
+
t && (D.markOptionDeselected(this.options, e), t.userAdded ? (this._options = [...this._options.filter((t) => t.value !== e)], this.options = [...this.options.filter((t) => t.value !== e)]) : this._options.some((t) => t.value === e) || (this._options = [...this._options, t]));
|
|
596
596
|
}
|
|
597
597
|
addAllOptions() {
|
|
598
598
|
if (this.multiple) {
|
|
@@ -600,11 +600,11 @@ var j = class extends A {
|
|
|
600
600
|
this._userInfoMessage = "tooManySelected";
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
|
-
this._value = this._options.map((e) => e.value),
|
|
603
|
+
this._value = this._options.map((e) => e.value), D.markAllSelected(this._options), this.requestUpdate();
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
removeAllSelected() {
|
|
607
|
-
this._value = [],
|
|
607
|
+
this._value = [], D.markAllDeselected(this._options), this._options = D.removeUserAddedOptions(this._options), this.requestUpdate();
|
|
608
608
|
}
|
|
609
609
|
addValue() {
|
|
610
610
|
let e = this.inputRef.value?.value.trim() || "";
|
|
@@ -635,11 +635,11 @@ var j = class extends A {
|
|
|
635
635
|
}, 0)), this.requestUpdate();
|
|
636
636
|
}
|
|
637
637
|
refreshOptionsFromValue() {
|
|
638
|
-
let e =
|
|
639
|
-
e.forEach((e) => e.selected = this._value.includes(e.value)), this._options =
|
|
638
|
+
let e = k.cloneOptions(this.options);
|
|
639
|
+
e.forEach((e) => e.selected = this._value.includes(e.value)), this._options = k.syncOptionsWithValues(e, this._value).options;
|
|
640
640
|
}
|
|
641
641
|
resetComboboxInput(e = !0) {
|
|
642
|
-
this._addValueText = null, this.inputRef.value && this.inputRef.value.type !== "hidden" && e && (this._search = "", this.multiple ? this.inputRef.value.value = "" : (this.inputRef.value.value = this._value[0] ?
|
|
642
|
+
this._addValueText = null, this.inputRef.value && this.inputRef.value.type !== "hidden" && e && (this._search = "", this.multiple ? this.inputRef.value.value = "" : (this.inputRef.value.value = this._value[0] ? E(this._value[0], this.options, this.displayValueAs) : "", this._userInfoMessage = "")), this.refreshOptionsFromValue();
|
|
643
643
|
}
|
|
644
644
|
removeLastValue(e) {
|
|
645
645
|
if (this._value.length === 0) return;
|
|
@@ -647,7 +647,7 @@ var j = class extends A {
|
|
|
647
647
|
let t = this._value[this._value.length - 1];
|
|
648
648
|
t && this.removeSelected(t), this.updateMaxReached();
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, N = class extends M {
|
|
651
651
|
handleInput(e) {
|
|
652
652
|
if (e.stopPropagation(), e.stopImmediatePropagation(), this.disabled) return;
|
|
653
653
|
this.touched = !0;
|
|
@@ -665,7 +665,7 @@ var j = class extends A {
|
|
|
665
665
|
this._suppressNextOpen = !1, this._inputFocus = !0, this.requestUpdate();
|
|
666
666
|
return;
|
|
667
667
|
}
|
|
668
|
-
!this.multiple && this._value[0] && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value =
|
|
668
|
+
!this.multiple && this._value[0] && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = E(this._value[0], this.options, this.displayValueAs)), this._inputFocus = !0, this._search = "", this.refreshOptionsFromValue(), this._isOptionsOpen = !0, this.onFocus(), this.requestUpdate();
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
handleCloseOptions() {
|
|
@@ -686,7 +686,7 @@ var j = class extends A {
|
|
|
686
686
|
t && t.value !== this._value[0] ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(t.value)) : !t && this.allowUserInput && (this._value[0] && this.removeSelected(this._value[0]), this.addNewUserValue(e));
|
|
687
687
|
}
|
|
688
688
|
} else if (e !== "") {
|
|
689
|
-
let { action: t, value: n } =
|
|
689
|
+
let { action: t, value: n } = w(e, this._value, this.options, this.allowUserInput, this.multiple);
|
|
690
690
|
switch (t) {
|
|
691
691
|
case "addUserValue":
|
|
692
692
|
this.addNewUserValue(n);
|
|
@@ -697,7 +697,7 @@ var j = class extends A {
|
|
|
697
697
|
case "removeValue": this.removeValue(n);
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
!this.multiple && this._value[0] ? this.inputRef.value.value =
|
|
700
|
+
!this.multiple && this._value[0] ? this.inputRef.value.value = E(this._value[0], this.options, this.displayValueAs) : this.inputRef.value.value = "";
|
|
701
701
|
}
|
|
702
702
|
this._isOptionsOpen = !1, this.onBlur();
|
|
703
703
|
}
|
|
@@ -755,7 +755,7 @@ var j = class extends A {
|
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
let t =
|
|
758
|
+
let t = C(e.key, e.shiftKey, this.multiple);
|
|
759
759
|
if (t && !(e.key === "Tab" && !this._isOptionsOpen)) {
|
|
760
760
|
if (t === "focusListbox" && e.key === "Tab" && !this.listboxRef.value?.querySelector("[role=\"option\"]:not([data-disabled]), [data-type=\"new-option\"]")) {
|
|
761
761
|
this.closeAndProcessInput();
|
|
@@ -816,14 +816,14 @@ var j = class extends A {
|
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
checkForMatches() {
|
|
819
|
-
let e =
|
|
819
|
+
let e = T(this.inputRef.value?.value || this._search || "", this._value, this.options, this.allowUserInput, this.multiple);
|
|
820
820
|
if (e.shouldRemoveValue && this.removeValue(this._value[0]), e.shouldResetInput) {
|
|
821
821
|
this.resetComboboxInput(!1);
|
|
822
822
|
return;
|
|
823
823
|
}
|
|
824
824
|
this._addValueText = e.addValueText, this._userInfoMessage = e.userInfoMessage;
|
|
825
825
|
}
|
|
826
|
-
},
|
|
826
|
+
}, P = class extends N {
|
|
827
827
|
constructor(...e) {
|
|
828
828
|
super(...e), this.handleBodyClick = (e) => {
|
|
829
829
|
this._isOptionsOpen && !this.contains(e.target) && this.closeAndProcessInput();
|
|
@@ -832,10 +832,10 @@ var j = class extends A {
|
|
|
832
832
|
connectedCallback() {
|
|
833
833
|
if (super.connectedCallback(), document?.body.addEventListener("click", this.handleBodyClick), this._options = [], this.defaultOptions && this.defaultOptions.length) {
|
|
834
834
|
let e = this.options?.filter((e) => e.userAdded) || [];
|
|
835
|
-
this.options = [...e, ...JSON.parse(JSON.stringify(this.defaultOptions))], this._options =
|
|
835
|
+
this.options = [...e, ...JSON.parse(JSON.stringify(this.defaultOptions))], this._options = k.cloneOptions(this.options);
|
|
836
836
|
}
|
|
837
837
|
if (this.optionsController?.nodes && this.optionsController.nodes.length) {
|
|
838
|
-
let e =
|
|
838
|
+
let e = O.parseOptionsFromSlot(this.optionsController.nodes);
|
|
839
839
|
e.length && (this.options = [...e], this._options = [...e], this._optionsFromSlot = !0, this._lastSlotGeneration = this.optionsController.generation);
|
|
840
840
|
}
|
|
841
841
|
}
|
|
@@ -850,13 +850,13 @@ var j = class extends A {
|
|
|
850
850
|
let e = this.optionsController.generation;
|
|
851
851
|
if (e !== this._lastSlotGeneration) {
|
|
852
852
|
this._lastSlotGeneration = e;
|
|
853
|
-
let t =
|
|
853
|
+
let t = O.parseOptionsFromSlot(this.optionsController.nodes), n = this._options.filter((e) => e.userAdded);
|
|
854
854
|
this.options = [...n, ...t];
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
if (super.willUpdate(e), e.has("isOpen") && (this._isOptionsOpen = this.isOpen), e.has("defaultOptions") && this.defaultOptions.length) {
|
|
858
858
|
let e = (Array.isArray(this.options) ? this.options : []).filter((e) => e.userAdded) || [];
|
|
859
|
-
this.options = [...e, ...JSON.parse(JSON.stringify(this.defaultOptions))], this._options =
|
|
859
|
+
this.options = [...e, ...JSON.parse(JSON.stringify(this.defaultOptions))], this._options = k.cloneOptions(this.options);
|
|
860
860
|
}
|
|
861
861
|
let t = e.has("value"), n = e.has("_value");
|
|
862
862
|
if (t) {
|
|
@@ -868,9 +868,9 @@ var j = class extends A {
|
|
|
868
868
|
e.length && (this._pendingDispatchFrom ??= [...this._value], this._value = e, this._options.forEach((t) => t.selected = e.includes(t.value)), this._options = [...this._options]);
|
|
869
869
|
}
|
|
870
870
|
if (e.has("options")) {
|
|
871
|
-
let t = e.get("options") || this._options || [], n =
|
|
871
|
+
let t = e.get("options") || this._options || [], n = k.mergeWithUserAdded(k.cloneOptions(this.options), t, this._value);
|
|
872
872
|
this._options = n, n.length > this.options.length && (this.options = n);
|
|
873
|
-
let r =
|
|
873
|
+
let r = k.syncOptionsWithValues(this._options, this._value);
|
|
874
874
|
this._options = r.options, r.newValues.length > this._value.length && (this._pendingDispatchFrom ??= [...this._value], this._value = r.newValues);
|
|
875
875
|
}
|
|
876
876
|
(t || n || e.has("options") || e.has("defaultValue")) && this.updateMaxReached(), this._pendingDispatchFrom && this.syncPublicValue();
|
|
@@ -884,7 +884,7 @@ var j = class extends A {
|
|
|
884
884
|
detail: this._search,
|
|
885
885
|
bubbles: !1
|
|
886
886
|
})), !this._isOptionsOpen && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden") {
|
|
887
|
-
let e = !this.multiple && this._value[0] ?
|
|
887
|
+
let e = !this.multiple && this._value[0] ? E(this._value[0], this.options, this.displayValueAs) : "";
|
|
888
888
|
this.inputRef.value.value !== e && (this.inputRef.value.value = e);
|
|
889
889
|
}
|
|
890
890
|
this.classList.add("pkt-combobox-component"), this.classList.toggle("pkt-combobox-component--fullwidth", !!this.fullwidth), super.updated(e);
|
|
@@ -902,8 +902,8 @@ var j = class extends A {
|
|
|
902
902
|
}
|
|
903
903
|
attributeChangedCallback(e, t, n) {
|
|
904
904
|
if (e === "options") {
|
|
905
|
-
this._options =
|
|
906
|
-
let e =
|
|
905
|
+
this._options = k.cloneOptions(this.options);
|
|
906
|
+
let e = k.syncOptionsWithValues(this._options, this._value);
|
|
907
907
|
this._options = e.options, e.newValues.length > this._value.length && (this._value = e.newValues), this._search = "";
|
|
908
908
|
}
|
|
909
909
|
super.attributeChangedCallback(e, t, n);
|
|
@@ -952,6 +952,7 @@ var j = class extends A {
|
|
|
952
952
|
aria-expanded=${s(this._hasTextInput ? void 0 : this._isOptionsOpen ? "true" : "false")}
|
|
953
953
|
aria-controls=${s(this._hasTextInput ? void 0 : `${this.id}-listbox`)}
|
|
954
954
|
aria-haspopup=${s(this._hasTextInput ? void 0 : "listbox")}
|
|
955
|
+
aria-describedby=${s(this._hasTextInput ? void 0 : this._describedBy())}
|
|
955
956
|
aria-labelledby=${s(this._hasTextInput ? void 0 : `${this.id}-combobox-label`)}
|
|
956
957
|
aria-activedescendant=${s(!this._hasTextInput && this._isOptionsOpen && this._value[0] && h(this.options, this._value[0]) ? `${this.id}-listbox-${p(this._options, this._value[0])}` : void 0)}
|
|
957
958
|
aria-description=${s(this._selectionDescription || void 0)}
|
|
@@ -1005,6 +1006,13 @@ var j = class extends A {
|
|
|
1005
1006
|
</pkt-input-wrapper>
|
|
1006
1007
|
`;
|
|
1007
1008
|
}
|
|
1009
|
+
_describedBy() {
|
|
1010
|
+
return S({
|
|
1011
|
+
id: this._hasTextInput ? `${this.id}-input` : `${this.id}-combobox`,
|
|
1012
|
+
hasHelptext: !!this.helptext,
|
|
1013
|
+
ariaDescribedby: this.ariaDescribedby
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1008
1016
|
renderInputField() {
|
|
1009
1017
|
return this.typeahead || this.allowUserInput ? e`
|
|
1010
1018
|
<div class="pkt-combobox__input-div combobox__input">
|
|
@@ -1025,6 +1033,7 @@ var j = class extends A {
|
|
|
1025
1033
|
role="combobox"
|
|
1026
1034
|
aria-expanded=${this._isOptionsOpen ? "true" : "false"}
|
|
1027
1035
|
aria-label=${s(this.label)}
|
|
1036
|
+
aria-describedby=${s(this._describedBy())}
|
|
1028
1037
|
aria-autocomplete=${this.typeahead ? "both" : this.allowUserInput ? "list" : "none"}
|
|
1029
1038
|
aria-controls="${this.id}-listbox"
|
|
1030
1039
|
aria-activedescendant=${s(this._isOptionsOpen && this._value[0] && h(this.options, this._value[0]) ? `${this.id}-listbox-${p(this._options, this._value[0])}` : void 0)}
|
|
@@ -1080,12 +1089,12 @@ var j = class extends A {
|
|
|
1080
1089
|
}
|
|
1081
1090
|
};
|
|
1082
1091
|
try {
|
|
1083
|
-
t("pkt-combobox")(
|
|
1092
|
+
t("pkt-combobox")(P);
|
|
1084
1093
|
} catch {
|
|
1085
1094
|
console.warn("Forsøker å definere <pkt-combobox>, men den er allerede definert");
|
|
1086
1095
|
}
|
|
1087
1096
|
//#endregion
|
|
1088
1097
|
//#region src/components/combobox/index.ts
|
|
1089
|
-
var
|
|
1098
|
+
var F = P;
|
|
1090
1099
|
//#endregion
|
|
1091
|
-
export {
|
|
1100
|
+
export { P as n, F as t };
|
|
@@ -84,6 +84,7 @@ export declare class PktCombobox extends ComboboxHandlers implements IPktCombobo
|
|
|
84
84
|
protected formResetCallback(): void;
|
|
85
85
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
86
86
|
render(): import('lit-html').TemplateResult<1>;
|
|
87
|
+
private _describedBy;
|
|
87
88
|
private renderInputField;
|
|
88
89
|
private renderSingleOrMultipleValues;
|
|
89
90
|
private renderValueTag;
|
|
@@ -16,7 +16,7 @@ export declare class PktHeaderService extends PktElementWithSlot<IPktHeader> imp
|
|
|
16
16
|
position: THeaderPosition;
|
|
17
17
|
scrollBehavior: THeaderScrollBehavior;
|
|
18
18
|
slotMenuVariant: TSlotMenuVariant;
|
|
19
|
-
slotMenuText
|
|
19
|
+
slotMenuText?: string;
|
|
20
20
|
hideLogo: Booleanish;
|
|
21
21
|
compact: Booleanish;
|
|
22
22
|
showSearch: Booleanish;
|
|
@@ -21,7 +21,7 @@ export declare const convertUserMenuItem: (item: UserMenuItem) => TInternalMenuI
|
|
|
21
21
|
export interface IPktHeader extends IPktStringsProps<'header'> {
|
|
22
22
|
/** Hide the Oslo logo */
|
|
23
23
|
hideLogo?: Booleanish;
|
|
24
|
-
/** Logo link URL */
|
|
24
|
+
/** Logo link URL. Set to an empty string to render the logo without a link */
|
|
25
25
|
logoLink?: string;
|
|
26
26
|
/** Override CDN path for the logo */
|
|
27
27
|
logoPath?: string;
|
|
File without changes
|
|
@@ -61,6 +61,7 @@ export declare class PktTimepicker extends PktInputElement<Props> {
|
|
|
61
61
|
private _minutesDigitCount;
|
|
62
62
|
private _minutesFirstDigit;
|
|
63
63
|
private _hasFocus;
|
|
64
|
+
private _describedBy;
|
|
64
65
|
private _setAriaInvalid;
|
|
65
66
|
private _outsideClickHandler;
|
|
66
67
|
private _handleComponentFocusIn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, d as t, n, t as r, u as i } from "./element-
|
|
2
|
-
import "./button-
|
|
1
|
+
import { _ as e, d as t, n, t as r, u as i } from "./element-CqC-sGuC.js";
|
|
2
|
+
import "./button-BUl8uWWh.js";
|
|
3
3
|
//#region ../../shared-strings/consent.ts
|
|
4
4
|
var a = {
|
|
5
5
|
i18n: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CewjrA4g.cjs");require("./button-CCR4eyt_.cjs");var t={i18n:{nb:{contentPresentation:{title:`Oslo kommune bruker informasjonskapsler`,description:[`For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.`,`Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss.`],buttons:{accept:`Godta alle`,reject:`Kun nødvendige`,settings:`Innstillinger for informasjonskapsler`}},contentSettings:{title:`Innstillinger for informasjonskapsler`,description:[`Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.`,`Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler».`],buttons:{back:`Tilbake`,save:`Lagre innstillinger`}}},en:{contentPresentation:{title:`Before you visit Oslo kommune ...`,description:[`This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.`,`To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites.`],buttons:{accept:`Yes, I accept`,reject:`Only necessary`,settings:`Go to settings`}},contentSettings:{title:`Her kan du aktivt velge mellom ulike informasjonskapsler`,description:[`For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider`],buttons:{back:`Back`,save:`Save settings`}}}},cookies:[{name:`statistics`,defaultValue:null,i18n:{nb:{title:`Statistikk og analyse`,description:`Jeg godtar at Oslo kommune bruker informasjonskapsler til å innhente data om statistikk og brukeradferd.`,buttons:{yes:`Ja`,no:`Nei`}},en:{title:`Statistics and analytics`,description:`Select your preference for statistics and analytics`,buttons:{yes:`Yes`,no:`No`}}}},{name:`survey`,defaultValue:null,i18n:{nb:{title:`Skriftlige tilbakemeldinger`,description:`Jeg godtar at Oslo kommune bruker informasjonskapsler til å vise responsfelt og registrere tilbakemeldinger.`,buttons:{yes:`Ja`,no:`Nei`}},en:{title:`Survey`,description:`Select your preference for survey`,buttons:{yes:`Yes`,no:`No`}}}},{name:`functional`,defaultValue:!0,i18n:{nb:{title:`Funksjonelle informasjonskapsler`,description:`Jeg godtar at Oslo kommune bruker informasjonskapsler for å gjøre ulike funksjoner på nettstedet mulige (for eksempel skjemaer og barnehagevelger).`,buttons:{yes:`Ja`,no:`Nei`}},en:{title:`Functional cookies`,description:`For the website to function optimally, we recommend that you accept these cookies`,buttons:{yes:`Yes`,no:`No`}}}}]},n=null;function r(){return n||(n=new Promise((e,t)=>{if(document.querySelector(`#oslo-consent-script`)){e();return}let n=document.createElement(`script`);n.src=`https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js`,n.id=`oslo-consent-script`,n.onload=()=>e(),n.onerror=t,document.head.appendChild(n);let r=document.createElement(`link`);r.href=`https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css`,r.type=`text/css`,r.rel=`stylesheet`,r.id=`oslo-consent-styles`,document.head.appendChild(r)}),n)}var i=e=>{if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}},a=e=>i(e.value).items.reduce((e,t)=>(e[t.name]=t.consent,e),{}),o=class extends e.t{constructor(...e){super(...e),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType=`button`,this.triggerText=null,this.i18nLanguage=`nb`}connectedCallback(){super.connectedCallback();let e=this.i18nLanguage;this.triggerText=this.triggerText||t.i18n[e].contentPresentation.buttons.settings}disconnectedCallback(){super.disconnectedCallback(),this._cookieEventHandler&&window.__cookieEvents?.off(`CookieManager.setCookie`,this._cookieEventHandler)}returnJsonOrObject(e){return i(e)}emitCookieConsents(e){this.dispatchEvent(new CustomEvent(`toggle-consent`,{detail:a(e),bubbles:!0,cancelable:!1}))}async firstUpdated(e){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await r(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event(`CookieBannerReady`,{bubbles:!0,cancelable:!0}));let e=window.cookieBanner,t=window.__cookieEvents;!e||!t||e.cookieConsent.validateConsentCookie().then(n=>{if(!n)return;let r=e.cookieConsent.getConsentCookie();window.setTimeout(()=>this.emitCookieConsents({value:r}),0),this._cookieEventHandler&&t.off(`CookieManager.setCookie`,this._cookieEventHandler),this._cookieEventHandler=e=>this.emitCookieConsents(e),t.on(`CookieManager.setCookie`,this._cookieEventHandler)})}openModal(e){e.preventDefault(),window.cookieBanner?.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner?.openCookieModal())}render(){return this.triggerType===`link`?e._`<a href="#" class="pkt-link" aria-haspopup="dialog" @click=${this.openModal}
|
|
2
2
|
>${this.triggerText}</a
|
|
3
3
|
>`:this.triggerType===`footerlink`?e._`<a
|
|
4
4
|
href="#"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CewjrA4g.cjs"),t=require("./class-map-B0FX3YsK.cjs"),n=require("./if-defined-CjRKmMQs.cjs"),r=require("./element-with-slot-MCvSBwUv.cjs");require("./icon-Clz68-Kz.cjs");const i=require("./ref-HT6KRjxp.cjs"),a=require("./converters-BJ9Fe0kW.cjs");require("./calendar-BuSfyUR9.cjs"),require("./tag-CQEyjF32.cjs");const o=require("./repeat-Ddge5HTp.cjs"),s=require("./utils-63cRpWut.cjs"),c=require("./input-element-BdIWsDl-.cjs");require("./input-wrapper-BIrQijWT.cjs");var l=class extends e.t{constructor(...e){super(...e),this.dates=[],this.dateformat=`dd.MM.yyyy`,this.className=`pkt-datepicker__tags`,this.idBase=s.n()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},e._`
|
|
2
2
|
<div class=${t.t(this.classes)} aria-live="polite">
|
|
3
3
|
${Array.isArray(this.dates)&&this.dates[0]?o.t(a.h((this.dates??[]).filter(Boolean)),e=>e,t=>e._` <pkt-tag
|
|
4
4
|
id=${this.idBase+t+`-tag`}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, s as a, t as o, u as s } from "./element-
|
|
2
|
-
import { t as c } from "./class-map-
|
|
3
|
-
import { t as l } from "./if-defined-
|
|
4
|
-
import { r as ee } from "./element-with-slot-
|
|
5
|
-
import "./icon-
|
|
6
|
-
import { n as u, t as d } from "./ref-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, s as a, t as o, u as s } from "./element-CqC-sGuC.js";
|
|
2
|
+
import { t as c } from "./class-map-D5GHsely.js";
|
|
3
|
+
import { t as l } from "./if-defined-BNXGXCwT.js";
|
|
4
|
+
import { r as ee } from "./element-with-slot-D_OKDlYo.js";
|
|
5
|
+
import "./icon-B2v30QUk.js";
|
|
6
|
+
import { n as u, t as d } from "./ref-37-yxmc4.js";
|
|
7
7
|
import { a as f, c as p, d as m, h, i as g, m as _, n as v, r as y, s as b, t as x, u as S } from "./converters-CkjLSYpa.js";
|
|
8
|
-
import "./calendar-
|
|
9
|
-
import "./tag-
|
|
10
|
-
import { t as C } from "./repeat-
|
|
8
|
+
import "./calendar-KUQ1dFeX.js";
|
|
9
|
+
import "./tag-DoUC99hn.js";
|
|
10
|
+
import { t as C } from "./repeat-DntD73oB.js";
|
|
11
11
|
import { n as w, t as T } from "./utils-BwF4QSrq.js";
|
|
12
|
-
import { t as E } from "./input-element-
|
|
13
|
-
import "./input-wrapper-
|
|
12
|
+
import { t as E } from "./input-element-BTzuDh4h.js";
|
|
13
|
+
import "./input-wrapper-CvFMiqIt.js";
|
|
14
14
|
//#region src/components/datepicker/date-tags.ts
|
|
15
15
|
var D = class extends o {
|
|
16
16
|
constructor(...e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var{I:e}=require("./element-
|
|
1
|
+
var{I:e}=require("./element-CewjrA4g.cjs").v,t=e=>e,n=e=>e.strings===void 0,r=()=>document.createComment(``),i=(n,i,a)=>{let o=n._$AA.parentNode,s=i===void 0?n._$AB:i._$AA;if(a===void 0)a=new e(o.insertBefore(r(),s),o.insertBefore(r(),s),n,n.options);else{let e=a._$AB.nextSibling,r=a._$AM,i=r!==n;if(i){let e;a._$AQ?.(n),a._$AM=n,a._$AP!==void 0&&(e=n._$AU)!==r._$AU&&a._$AP(e)}if(e!==s||i){let n=a._$AA;for(;n!==e;){let e=t(n).nextSibling;t(o).insertBefore(n,s),n=e}}}return a},a=(e,t,n=e)=>(e._$AI(t,n),e),o={},s=(e,t=o)=>e._$AH=t,c=e=>e._$AH,l=e=>{e._$AR(),e._$AA.remove()};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as e } from "./element-
|
|
1
|
+
import { v as e } from "./element-CqC-sGuC.js";
|
|
2
2
|
//#region ../../node_modules/lit-html/directive-helpers.js
|
|
3
3
|
var { I: t } = e, n = (e) => e, r = (e) => e.strings === void 0, i = () => document.createComment(""), a = (e, r, a) => {
|
|
4
4
|
let o = e._$AA.parentNode, s = r === void 0 ? e._$AB : r._$AA;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var e=globalThis,t=e=>e,n=e.trustedTypes,r=n?n.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,i=`$lit$`,a=`lit$${Math.random().toFixed(9).slice(2)}$`,o=`?`+a,s=`<${o}>`,c=document,l=()=>c.createComment(``),u=e=>e===null||typeof e!=`object`&&typeof e!=`function`,d=Array.isArray,f=e=>d(e)||typeof e?.[Symbol.iterator]==`function`,p=`[
|
|
2
|
-
\f\r]`,m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,h=/-->/g,g=/>/g,_=RegExp(`>|${p}(?:([^\\s"'>=/]+)(${p}*=${p}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),v=/'/g,y=/"/g,b=/^(?:script|style|textarea|title)$/i,x=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),S=Symbol.for(`lit-noChange`),C=Symbol.for(`lit-nothing`),w=new WeakMap,T=c.createTreeWalker(c,129);function E(e,t){if(!d(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return r===void 0?t:r.createHTML(t)}var D=(e,t)=>{let n=e.length-1,r=[],o,c=t===2?`<svg>`:t===3?`<math>`:``,l=m;for(let t=0;t<n;t++){let n=e[t],u,d,f=-1,p=0;for(;p<n.length&&(l.lastIndex=p,d=l.exec(n),d!==null);)p=l.lastIndex,l===m?d[1]===`!--`?l=h:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(l=_):(b.test(d[2])&&(o=RegExp(`</`+d[2],`g`)),l=_):l=g:l===_?d[0]===`>`?(l=o??m,f=-1):d[1]===void 0?f=-2:(f=l.lastIndex-d[2].length,u=d[1],l=d[3]===void 0?_:d[3]===`"`?y:v):l===y||l===v?l=_:l===h||l===g?l=m:(l=_,o=void 0);let x=l===_&&e[t+1].startsWith(`/>`)?` `:``;c+=l===m?n+s:f>=0?(r.push(u),n.slice(0,f)+i+n.slice(f)+a+x):n+a+(f===-2?t:x)}return[E(e,c+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},O=class e{constructor({strings:t,_$litType$:r},s){let c;this.parts=[];let u=0,d=0,f=t.length-1,p=this.parts,[m,h]=D(t,r);if(this.el=e.createElement(m,s),T.currentNode=this.el.content,r===2||r===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(c=T.nextNode())!==null&&p.length<f;){if(c.nodeType===1){if(c.hasAttributes())for(let e of c.getAttributeNames())if(e.endsWith(i)){let t=h[d++],n=c.getAttribute(e).split(a),r=/([.?@])?(.*)/.exec(t);p.push({type:1,index:u,name:r[2],strings:n,ctor:r[1]===`.`?N:r[1]===`?`?ee:r[1]===`@`?te:M}),c.removeAttribute(e)}else e.startsWith(a)&&(p.push({type:6,index:u}),c.removeAttribute(e));if(b.test(c.tagName)){let e=c.textContent.split(a),t=e.length-1;if(t>0){c.textContent=n?n.emptyScript:``;for(let n=0;n<t;n++)c.append(e[n],l()),T.nextNode(),p.push({type:2,index:++u});c.append(e[t],l())}}}else if(c.nodeType===8){if(c.data===o)p.push({type:2,index:u});else{let e=-1;for(;(e=c.data.indexOf(a,e+1))!==-1;)p.push({type:7,index:u}),e+=a.length-1}}u++}}static createElement(e,t){let n=c.createElement(`template`);return n.innerHTML=e,n}};function k(e,t,n=e,r){if(t===S)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=u(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=k(e,i._$AS(e,t.values),i,r)),t}var A=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??c).importNode(t,!0);T.currentNode=r;let i=T.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new j(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new ne(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=T.nextNode(),a++)}return T.currentNode=c,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},j=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),u(e)?e===C||e==null||e===``?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==S&&this._(e):e._$litType$===void 0?e.nodeType===void 0?f(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==C&&u(this._$AH)?this._$AA.nextSibling.data=e:this.T(c.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=O.createElement(E(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new A(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=w.get(e.strings);return t===void 0&&w.set(e.strings,t=new O(e)),t}k(t){d(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(l()),this.O(l()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){let n=t(e).nextSibling;t(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},M=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=C}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=k(this,e,t,0),a=!u(e)||e!==this._$AH&&e!==S,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=k(this,r[n+o],t,o),s===S&&(s=this._$AH[o]),a||=!u(s)||s!==this._$AH[o],s===C?e=C:e!==C&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},N=class extends M{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}},ee=class extends M{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==C)}},te=class extends M{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=k(this,e,t,0)??C)===S)return;let n=this._$AH,r=e===C&&n!==C||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==C&&(n===C||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ne=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){k(this,e)}},re={M:i,P:a,A:o,C:1,L:D,R:A,D:f,V:k,I:j,H:M,N:ee,U:te,B:N,F:ne},ie=e.litHtmlPolyfillSupport;ie?.(O,j),(e.litHtmlVersions??=[]).push(`3.3.3`);var ae=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new j(t.insertBefore(l(),e),e,void 0,n??{})}return i._$AI(e),i},oe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},se=e=>(...t)=>({_$litDirective$:e,values:t}),ce=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},le=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},P=globalThis,F=P.ShadowRoot&&(P.ShadyCSS===void 0||P.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,I=Symbol(),L=new WeakMap,ue=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(F&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=L.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&L.set(t,e))}return e}toString(){return this.cssText}},de=e=>new ue(typeof e==`string`?e:e+``,void 0,I),fe=(e,t)=>{if(F)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=P.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},R=F?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return de(t)})(e):e,{is:pe,defineProperty:me,getOwnPropertyDescriptor:he,getOwnPropertyNames:ge,getOwnPropertySymbols:_e,getPrototypeOf:ve}=Object,z=globalThis,B=z.trustedTypes,ye=B?B.emptyScript:``,be=z.reactiveElementPolyfillSupport,V=(e,t)=>e,H={toAttribute(e,t){switch(t){case Boolean:e=e?ye:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},U=(e,t)=>!pe(e,t),xe={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:U};Symbol.metadata??=Symbol(`metadata`),z.litPropertyMetadata??=new WeakMap;var W=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=xe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&me(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=he(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??xe}static _$Ei(){if(this.hasOwnProperty(V(`elementProperties`)))return;let e=ve(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(V(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V(`properties`))){let e=this.properties,t=[...ge(e),..._e(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(R(e))}else e!==void 0&&t.push(R(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return fe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?H:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?H:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??U)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};W.elementStyles=[],W.shadowRootOptions={mode:`open`},W[V(`elementProperties`)]=new Map,W[V(`finalized`)]=new Map,be?.({ReactiveElement:W}),(z.reactiveElementVersions??=[]).push(`2.1.2`);var Se={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:U},Ce=(e=Se,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function G(e){return(t,n)=>typeof n==`object`?Ce(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function we(e){return G({...e,state:!0,attribute:!1})}var K=globalThis,q=class extends W{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ae(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};q._$litElement$=!0,q.finalized=!0,K.litElementHydrateSupport?.({LitElement:q});var Te=K.litElementPolyfillSupport;Te?.({LitElement:q}),(K.litElementVersions??=[]).push(`4.2.2`);var J={generic:{from:`Fra`,to:`Til`,close:`Lukk`},forms:{optional:`Valgfritt`,required:`Må fylles ut`,readMore:`Les mer <span class='pkt-sr-only'>om feltet</span>`},validation:{valueMissing:`Dette feltet er påkrevd`,typeMismatch:`Ugyldig verdi`,patternMismatch:`Ugyldig format`,tooShort:`For kort`,tooLong:`For lang`,rangeUnderflow:`For lav verdi`,rangeOverflow:`For høy verdi`,rangeUnderflowMin:`Verdien må være større enn eller lik {min}.`,rangeOverflowMax:`Verdien må være mindre enn eller lik {max}.`,stepMismatch:`Må treffe på steget som er definert i elementet`,timeStepMismatch:`Må treffe på et steg, for eksempel 0, {step} minutter`,timeStepMismatchHour:`Må treffe på hver hele time`,timeStepMismatchHalfHour:`Må treffe på hver hele eller halve time`,dateUnderflow:`For tidlig dato`,dateOverflow:`For sen dato`,counterExceeded:`Du har brukt {current} av {max}`},dates:{month:`Måned`,year:`År`,week:`Uke`,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`]},calendar:{prevMonth:`Forrige måned`,nextMonth:`Neste måned`},datepicker:{openPicker:`Åpne kalender`,deleteDate:`Fjern dato`},timepicker:{hours:`Timer`,minutes:`Minutter`,openPicker:`Åpne tidspunkt-velger`,prevTime:`Forrige tidspunkt`,nextTime:`Neste tidspunkt`,selectTime:`Velg tidspunkt`},searchinput:{placeholder:`Søk…`,submit:`Søk`},backlink:{label:`Gå tilbake til forrige side`},breadcrumbs:{ariaLabel:`brødsmulemeny`},linkcard:{openInNewTab:`Åpnes i ny fane`},alert:{lastUpdated:`Sist oppdatert: {date}`},tag:{remove:`Klikk for å fjerne {label}`},header:{search:`Søk`,menu:`Meny`,openMenu:`Åpne meny`,openSearch:`Åpne søkefelt`},listbox:{searchLabel:`Søk i listen`,searchPlaceholder:`Søk…`},combobox:{noResults:`Ingen treff i søket`,maxSelected:`Maks antall valg nådd`,tooManySelected:`For mange valgt`,alreadySelected:`Verdien er allerede valgt`,valueAdded:`Ny verdi lagt til`,valueSelected:`{value} er valgt`,noValidValue:`Ingen gyldig verdi valgt`},fileupload:{dropZoneDragMultiple:`Dra filer hit for å laste dem opp eller`,dropZoneDragSingle:`Dra en fil hit for å laste den opp eller`,dropZoneDragMultipleThumbnail:`Dra bilder hit for å laste dem opp eller`,dropZoneDragSingleThumbnail:`Dra et bilde hit for å laste det opp eller`,dropZoneDragActiveMultiple:`Slipp filene her`,dropZoneDragActiveSingle:`Slipp filen her`,dropZoneDragActiveMultipleThumbnail:`Slipp bildene her`,dropZoneDragActiveSingleThumbnail:`Slipp bildet her`,dropZoneOpenFileDialogMultiple:`velg filer`,dropZoneOpenFileDialogSingle:`velg en fil`,dropZoneOpenFileDialogMultipleThumbnail:`velg fra kamerarull`,dropZoneOpenFileDialogSingleThumbnail:`velg fra kamerarull`,supportedFormatsPrefix:`Format:`,invalidFormat:`Ugyldig filtype. Tillatte formater: {formats}`,sizeTooLarge:`Filen er for stor. Maks størrelse er {maxSize}.`,requiredMissing:`Du må laste opp minst én fil.`,genericValidationRejection:`Filen ble avvist av validering.`,unknownFilename:`Ukjent fil`,previewFallbackName:`Forhåndsvisning`,previewImage:`Forhåndsvis bilde {filename}`,fileLabelOne:`fil`,fileLabelOther:`filer`,srFileAdded:`Filen «{filename}» er lagt til`,srFilesAdded:`{count} filer er lagt til`,srFilesUploadedOfTotal:`{uploaded} av {total} {label} lastet opp`,srFilesFailedOfTotal:`Feil ved opplasting: {failed} av {total} {label} feilet`}},Y=Symbol.for(`@oslokommune/punkt-strings`);function X(){let e=globalThis;return e[Y]||(e[Y]={overrides:{},listeners:new Set}),e[Y]}function Ee(e){let t=X(),n={...t.overrides};for(let t of Object.keys(e)){let r=e[t];r&&(n[t]={...n[t],...r})}t.overrides=n,t.listeners.forEach(e=>e())}function De(){return X().overrides}function Oe(){let e=X();e.overrides={},e.listeners.forEach(e=>e())}function ke(e){let t=X();return t.listeners.add(e),()=>{t.listeners.delete(e)}}var Ae=new Map;function je(e,t){if(t)for(let n of Object.keys(t)){let r=t[n];r!==void 0&&(e[n]=r)}}function Me(e){return!!e&&Object.keys(e).length>0}function Ne(e){let t=De(),n=Ae.get(e);if(n&&n.overrides===t)return n.value;let r=t[e],i;if(Me(r)){let t={...J[e]};je(t,r),i=t}else i=J[e];return Ae.set(e,{overrides:t,value:i}),i}function Z(e,...t){let n=t.filter(t=>Me(t?.[e])),r=Ne(e);if(n.length===0)return r;let i={...r};for(let t of n)je(i,t?.[e]);return i}function Pe(e,...t){let n={};for(let r of e)n[r]=Z(r,...t);return n}var Fe=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=ke(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}get(e){return Z(e,this.host.strings)}getAll(e){return Pe(e,this.host.strings)}};function Q(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var $=class extends q{constructor(...e){super(...e),this.pktStrings=new Fe(this),this.role=null}hotReplacedCallback(){this.requestUpdate()}};Q([G({type:Object})],$.prototype,`strings`,void 0),Q([G({type:String})],$.prototype,`role`,void 0);var Ie=class extends ${createRenderRoot(){return this}};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return re}});
|
|
2
|
+
\f\r]`,m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,h=/-->/g,g=/>/g,_=RegExp(`>|${p}(?:([^\\s"'>=/]+)(${p}*=${p}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),v=/'/g,y=/"/g,b=/^(?:script|style|textarea|title)$/i,x=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),S=Symbol.for(`lit-noChange`),C=Symbol.for(`lit-nothing`),w=new WeakMap,T=c.createTreeWalker(c,129);function E(e,t){if(!d(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return r===void 0?t:r.createHTML(t)}var D=(e,t)=>{let n=e.length-1,r=[],o,c=t===2?`<svg>`:t===3?`<math>`:``,l=m;for(let t=0;t<n;t++){let n=e[t],u,d,f=-1,p=0;for(;p<n.length&&(l.lastIndex=p,d=l.exec(n),d!==null);)p=l.lastIndex,l===m?d[1]===`!--`?l=h:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(l=_):(b.test(d[2])&&(o=RegExp(`</`+d[2],`g`)),l=_):l=g:l===_?d[0]===`>`?(l=o??m,f=-1):d[1]===void 0?f=-2:(f=l.lastIndex-d[2].length,u=d[1],l=d[3]===void 0?_:d[3]===`"`?y:v):l===y||l===v?l=_:l===h||l===g?l=m:(l=_,o=void 0);let x=l===_&&e[t+1].startsWith(`/>`)?` `:``;c+=l===m?n+s:f>=0?(r.push(u),n.slice(0,f)+i+n.slice(f)+a+x):n+a+(f===-2?t:x)}return[E(e,c+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},O=class e{constructor({strings:t,_$litType$:r},s){let c;this.parts=[];let u=0,d=0,f=t.length-1,p=this.parts,[m,h]=D(t,r);if(this.el=e.createElement(m,s),T.currentNode=this.el.content,r===2||r===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(c=T.nextNode())!==null&&p.length<f;){if(c.nodeType===1){if(c.hasAttributes())for(let e of c.getAttributeNames())if(e.endsWith(i)){let t=h[d++],n=c.getAttribute(e).split(a),r=/([.?@])?(.*)/.exec(t);p.push({type:1,index:u,name:r[2],strings:n,ctor:r[1]===`.`?N:r[1]===`?`?ee:r[1]===`@`?te:M}),c.removeAttribute(e)}else e.startsWith(a)&&(p.push({type:6,index:u}),c.removeAttribute(e));if(b.test(c.tagName)){let e=c.textContent.split(a),t=e.length-1;if(t>0){c.textContent=n?n.emptyScript:``;for(let n=0;n<t;n++)c.append(e[n],l()),T.nextNode(),p.push({type:2,index:++u});c.append(e[t],l())}}}else if(c.nodeType===8){if(c.data===o)p.push({type:2,index:u});else{let e=-1;for(;(e=c.data.indexOf(a,e+1))!==-1;)p.push({type:7,index:u}),e+=a.length-1}}u++}}static createElement(e,t){let n=c.createElement(`template`);return n.innerHTML=e,n}};function k(e,t,n=e,r){if(t===S)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=u(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=k(e,i._$AS(e,t.values),i,r)),t}var A=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??c).importNode(t,!0);T.currentNode=r;let i=T.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new j(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new ne(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=T.nextNode(),a++)}return T.currentNode=c,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},j=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),u(e)?e===C||e==null||e===``?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==S&&this._(e):e._$litType$===void 0?e.nodeType===void 0?f(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==C&&u(this._$AH)?this._$AA.nextSibling.data=e:this.T(c.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=O.createElement(E(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new A(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=w.get(e.strings);return t===void 0&&w.set(e.strings,t=new O(e)),t}k(t){d(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(l()),this.O(l()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){let n=t(e).nextSibling;t(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},M=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=C}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=k(this,e,t,0),a=!u(e)||e!==this._$AH&&e!==S,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=k(this,r[n+o],t,o),s===S&&(s=this._$AH[o]),a||=!u(s)||s!==this._$AH[o],s===C?e=C:e!==C&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},N=class extends M{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}},ee=class extends M{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==C)}},te=class extends M{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=k(this,e,t,0)??C)===S)return;let n=this._$AH,r=e===C&&n!==C||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==C&&(n===C||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ne=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){k(this,e)}},re={M:i,P:a,A:o,C:1,L:D,R:A,D:f,V:k,I:j,H:M,N:ee,U:te,B:N,F:ne},ie=e.litHtmlPolyfillSupport;ie?.(O,j),(e.litHtmlVersions??=[]).push(`3.3.3`);var ae=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new j(t.insertBefore(l(),e),e,void 0,n??{})}return i._$AI(e),i},oe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},se=e=>(...t)=>({_$litDirective$:e,values:t}),ce=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},le=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},P=globalThis,F=P.ShadowRoot&&(P.ShadyCSS===void 0||P.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,I=Symbol(),L=new WeakMap,ue=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(F&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=L.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&L.set(t,e))}return e}toString(){return this.cssText}},de=e=>new ue(typeof e==`string`?e:e+``,void 0,I),fe=(e,t)=>{if(F)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=P.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},R=F?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return de(t)})(e):e,{is:pe,defineProperty:me,getOwnPropertyDescriptor:he,getOwnPropertyNames:ge,getOwnPropertySymbols:_e,getPrototypeOf:ve}=Object,z=globalThis,B=z.trustedTypes,ye=B?B.emptyScript:``,be=z.reactiveElementPolyfillSupport,V=(e,t)=>e,H={toAttribute(e,t){switch(t){case Boolean:e=e?ye:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},U=(e,t)=>!pe(e,t),xe={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:U};Symbol.metadata??=Symbol(`metadata`),z.litPropertyMetadata??=new WeakMap;var W=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=xe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&me(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=he(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??xe}static _$Ei(){if(this.hasOwnProperty(V(`elementProperties`)))return;let e=ve(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(V(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V(`properties`))){let e=this.properties,t=[...ge(e),..._e(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(R(e))}else e!==void 0&&t.push(R(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return fe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?H:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?H:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??U)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};W.elementStyles=[],W.shadowRootOptions={mode:`open`},W[V(`elementProperties`)]=new Map,W[V(`finalized`)]=new Map,be?.({ReactiveElement:W}),(z.reactiveElementVersions??=[]).push(`2.1.2`);var Se={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:U},Ce=(e=Se,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function G(e){return(t,n)=>typeof n==`object`?Ce(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function we(e){return G({...e,state:!0,attribute:!1})}var K=globalThis,q=class extends W{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ae(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};q._$litElement$=!0,q.finalized=!0,K.litElementHydrateSupport?.({LitElement:q});var Te=K.litElementPolyfillSupport;Te?.({LitElement:q}),(K.litElementVersions??=[]).push(`4.2.2`);var J={generic:{from:`Fra`,to:`Til`,close:`Lukk`},forms:{optional:`Valgfritt`,required:`Må fylles ut`,readMore:`Les mer <span class='pkt-sr-only'>om feltet</span>`},validation:{valueMissing:`Dette feltet er påkrevd`,typeMismatch:`Ugyldig verdi`,patternMismatch:`Ugyldig format`,tooShort:`For kort`,tooLong:`For lang`,rangeUnderflow:`For lav verdi`,rangeOverflow:`For høy verdi`,rangeUnderflowMin:`Verdien må være større enn eller lik {min}.`,rangeOverflowMax:`Verdien må være mindre enn eller lik {max}.`,stepMismatch:`Må treffe på steget som er definert i elementet`,timeStepMismatch:`Må treffe på et steg, for eksempel 0, {step} minutter`,timeStepMismatchHour:`Må treffe på hver hele time`,timeStepMismatchHalfHour:`Må treffe på hver hele eller halve time`,dateUnderflow:`For tidlig dato`,dateOverflow:`For sen dato`,counterExceeded:`Du har brukt {current} av {max}`},dates:{month:`Måned`,year:`År`,week:`Uke`,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`]},calendar:{prevMonth:`Forrige måned`,nextMonth:`Neste måned`},datepicker:{openPicker:`Åpne kalender`,deleteDate:`Fjern dato`},timepicker:{hours:`Timer`,minutes:`Minutter`,openPicker:`Åpne tidspunkt-velger`,prevTime:`Forrige tidspunkt`,nextTime:`Neste tidspunkt`,selectTime:`Velg tidspunkt`},searchinput:{placeholder:`Søk…`,submit:`Søk`},backlink:{label:`Gå tilbake til forrige side`},breadcrumbs:{ariaLabel:`brødsmulemeny`},linkcard:{openInNewTab:`Åpnes i ny fane`},alert:{lastUpdated:`Sist oppdatert: {date}`},tag:{remove:`Klikk for å fjerne {label}`},header:{search:`Søk`,menu:`Meny`,openMenu:`Åpne meny`,openSearch:`Åpne søkefelt`,logoLabel:`Til Oslo kommunes hovednettsted`,logoAlt:`Oslo kommune`,logOut:`Logg ut`,userMenuButton:`Brukermeny:`,userMenuLabel:`Meny for innlogget bruker`,loggedInAs:`Pålogget som`,lastLoggedIn:`Sist pålogget:`,representing:`Representerer`,orgNumber:`Org.nr. {number}`,changeRepresentation:`Endre organisasjon`},listbox:{searchLabel:`Søk i listen`,searchPlaceholder:`Søk…`},combobox:{noResults:`Ingen treff i søket`,maxSelected:`Maks antall valg nådd`,tooManySelected:`For mange valgt`,alreadySelected:`Verdien er allerede valgt`,valueAdded:`Ny verdi lagt til`,valueSelected:`{value} er valgt`,noValidValue:`Ingen gyldig verdi valgt`},fileupload:{dropZoneDragMultiple:`Dra filer hit for å laste dem opp eller`,dropZoneDragSingle:`Dra en fil hit for å laste den opp eller`,dropZoneDragMultipleThumbnail:`Dra bilder hit for å laste dem opp eller`,dropZoneDragSingleThumbnail:`Dra et bilde hit for å laste det opp eller`,dropZoneDragActiveMultiple:`Slipp filene her`,dropZoneDragActiveSingle:`Slipp filen her`,dropZoneDragActiveMultipleThumbnail:`Slipp bildene her`,dropZoneDragActiveSingleThumbnail:`Slipp bildet her`,dropZoneOpenFileDialogMultiple:`velg filer`,dropZoneOpenFileDialogSingle:`velg en fil`,dropZoneOpenFileDialogMultipleThumbnail:`velg fra kamerarull`,dropZoneOpenFileDialogSingleThumbnail:`velg fra kamerarull`,supportedFormatsPrefix:`Format:`,invalidFormat:`Ugyldig filtype. Tillatte formater: {formats}`,sizeTooLarge:`Filen er for stor. Maks størrelse er {maxSize}.`,requiredMissing:`Du må laste opp minst én fil.`,genericValidationRejection:`Filen ble avvist av validering.`,unknownFilename:`Ukjent fil`,previewFallbackName:`Forhåndsvisning`,previewImage:`Forhåndsvis bilde {filename}`,fileLabelOne:`fil`,fileLabelOther:`filer`,srFileAdded:`Filen «{filename}» er lagt til`,srFilesAdded:`{count} filer er lagt til`,srFilesUploadedOfTotal:`{uploaded} av {total} {label} lastet opp`,srFilesFailedOfTotal:`Feil ved opplasting: {failed} av {total} {label} feilet`}},Y=Symbol.for(`@oslokommune/punkt-strings`);function X(){let e=globalThis;return e[Y]||(e[Y]={overrides:{},listeners:new Set}),e[Y]}function Ee(e){let t=X(),n={...t.overrides};for(let t of Object.keys(e)){let r=e[t];r&&(n[t]={...n[t],...r})}t.overrides=n,t.listeners.forEach(e=>e())}function De(){return X().overrides}function Oe(){let e=X();e.overrides={},e.listeners.forEach(e=>e())}function ke(e){let t=X();return t.listeners.add(e),()=>{t.listeners.delete(e)}}var Ae=new Map;function je(e,t){if(t)for(let n of Object.keys(t)){let r=t[n];r!==void 0&&(e[n]=r)}}function Me(e){return!!e&&Object.keys(e).length>0}function Ne(e){let t=De(),n=Ae.get(e);if(n&&n.overrides===t)return n.value;let r=t[e],i;if(Me(r)){let t={...J[e]};je(t,r),i=t}else i=J[e];return Ae.set(e,{overrides:t,value:i}),i}function Z(e,...t){let n=t.filter(t=>Me(t?.[e])),r=Ne(e);if(n.length===0)return r;let i={...r};for(let t of n)je(i,t?.[e]);return i}function Pe(e,...t){let n={};for(let r of e)n[r]=Z(r,...t);return n}var Fe=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=ke(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}get(e){return Z(e,this.host.strings)}getAll(e){return Pe(e,this.host.strings)}};function Q(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var $=class extends q{constructor(...e){super(...e),this.pktStrings=new Fe(this),this.role=null}hotReplacedCallback(){this.requestUpdate()}};Q([G({type:Object})],$.prototype,`strings`,void 0),Q([G({type:String})],$.prototype,`role`,void 0);var Ie=class extends ${createRenderRoot(){return this}};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return re}});
|