@iamproperty/components 3.4.6 → 3.4.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.
Files changed (149) hide show
  1. package/assets/css/components/accordion.css.map +1 -1
  2. package/assets/css/components/applied-filters.css +1 -0
  3. package/assets/css/components/applied-filters.css.map +1 -0
  4. package/assets/css/components/card.css +1 -1
  5. package/assets/css/components/card.css.map +1 -1
  6. package/assets/css/components/charts.css +1 -1
  7. package/assets/css/components/charts.css.map +1 -1
  8. package/assets/css/components/container.css +1 -1
  9. package/assets/css/components/container.css.map +1 -1
  10. package/assets/css/components/dialog.css +1 -0
  11. package/assets/css/components/dialog.css.map +1 -0
  12. package/assets/css/components/forms.css +1 -1
  13. package/assets/css/components/forms.css.map +1 -1
  14. package/assets/css/components/lists.css +1 -1
  15. package/assets/css/components/lists.css.map +1 -1
  16. package/assets/css/components/nav.css +1 -1
  17. package/assets/css/components/nav.css.map +1 -1
  18. package/assets/css/components/pagination.css +1 -0
  19. package/assets/css/components/pagination.css.map +1 -0
  20. package/assets/css/components/table.css +1 -0
  21. package/assets/css/components/table.css.map +1 -0
  22. package/assets/css/core.min.css +1 -1
  23. package/assets/css/core.min.css.map +1 -1
  24. package/assets/css/style.min.css +1 -1
  25. package/assets/css/style.min.css.map +1 -1
  26. package/assets/js/bundle.js +18 -11
  27. package/assets/js/components/accordion/accordion.component.js +6 -0
  28. package/assets/js/components/accordion/accordion.component.min.js +3 -3
  29. package/assets/js/components/accordion/accordion.component.min.js.map +1 -1
  30. package/assets/js/components/applied-filters/applied-filters.component.js +26 -0
  31. package/assets/js/components/card/card.component.js +91 -0
  32. package/assets/js/components/card/card.component.min.js +21 -0
  33. package/assets/js/components/card/card.component.min.js.map +1 -0
  34. package/assets/js/components/filterlist/filterlist.component.js +49 -0
  35. package/assets/js/components/filterlist/filterlist.component.min.js +23 -0
  36. package/assets/js/components/filterlist/filterlist.component.min.js.map +1 -0
  37. package/assets/js/components/header/header.component.js +6 -0
  38. package/assets/js/components/header/header.component.min.js +2 -2
  39. package/assets/js/components/header/header.component.min.js.map +1 -1
  40. package/assets/js/components/pagination/pagination.component.js +34 -0
  41. package/assets/js/components/table/table.component.js +104 -0
  42. package/assets/js/components/table/table.component.min.js +24 -0
  43. package/assets/js/components/table/table.component.min.js.map +1 -0
  44. package/assets/js/components/tabs/tabs.component.js +6 -0
  45. package/assets/js/components/tabs/tabs.component.min.js +17 -0
  46. package/assets/js/components/tabs/tabs.component.min.js.map +1 -0
  47. package/assets/js/dynamic.js +7 -18
  48. package/assets/js/dynamic.min.js +2 -53
  49. package/assets/js/dynamic.min.js.map +1 -1
  50. package/assets/js/flat-components.js +27 -9
  51. package/assets/js/modules/applied-filters.js +100 -0
  52. package/assets/js/modules/data-layer.js +45 -0
  53. package/assets/js/modules/filterlist.js +32 -0
  54. package/assets/js/modules/helpers.js +77 -49
  55. package/assets/js/modules/pagination.js +33 -0
  56. package/assets/js/modules/table.js +507 -420
  57. package/assets/js/modules/tabs.js +6 -0
  58. package/assets/js/modules/youtubevideo.js +53 -61
  59. package/assets/js/scripts.bundle.js +77 -62
  60. package/assets/js/scripts.bundle.js.map +1 -1
  61. package/assets/js/scripts.bundle.min.js +2 -2
  62. package/assets/js/scripts.bundle.min.js.map +1 -1
  63. package/assets/js/tests/filterlist.spec.js +22 -0
  64. package/assets/js/tests/pagination.spec.js +15 -0
  65. package/assets/js/tests/table.spec.js +147 -0
  66. package/assets/sass/_components.scss +1 -2
  67. package/assets/sass/_corefiles.scss +5 -4
  68. package/assets/sass/_functions/utilities.scss +16 -0
  69. package/assets/sass/_functions/variables.scss +32 -18
  70. package/assets/sass/_tests/colours.spec.scss +1 -1
  71. package/assets/sass/components/applied-filters.scss +65 -0
  72. package/assets/sass/components/card.scss +177 -233
  73. package/assets/sass/components/charts.scss +4 -0
  74. package/assets/sass/components/container.scss +7 -2
  75. package/assets/sass/components/dialog.scss +202 -0
  76. package/assets/sass/components/forms.scss +37 -5
  77. package/assets/sass/components/lists.scss +15 -0
  78. package/assets/sass/components/nav.scss +5 -1
  79. package/assets/sass/components/pagination.scss +140 -0
  80. package/assets/sass/components/table.scss +419 -0
  81. package/assets/sass/foundations/icons.scss +1 -1
  82. package/assets/sass/{components → foundations}/links.scss +26 -0
  83. package/assets/sass/foundations/reboot.scss +19 -13
  84. package/assets/svg/illustrations/table.svg +165 -0
  85. package/assets/ts/bundle.ts +23 -12
  86. package/assets/ts/components/accordion/accordion.component.ts +7 -0
  87. package/assets/ts/components/applied-filters/README.md +5 -0
  88. package/assets/ts/components/applied-filters/applied-filters.component.ts +33 -0
  89. package/assets/ts/components/card/README.md +22 -0
  90. package/assets/ts/components/card/card.component.ts +117 -0
  91. package/assets/ts/components/filterlist/README.md +17 -0
  92. package/assets/ts/components/filterlist/filterlist.component.ts +60 -0
  93. package/assets/ts/components/header/header.component.ts +8 -0
  94. package/assets/ts/components/pagination/README.md +11 -0
  95. package/assets/ts/components/pagination/pagination.component.ts +45 -0
  96. package/assets/ts/components/table/README.md +23 -0
  97. package/assets/ts/components/table/table.component.ts +128 -0
  98. package/assets/ts/components/tabs/tabs.component.ts +7 -0
  99. package/assets/ts/dynamic.ts +12 -19
  100. package/assets/ts/flat-components.ts +37 -9
  101. package/assets/ts/modules/applied-filters.ts +146 -0
  102. package/assets/ts/modules/data-layer.ts +58 -0
  103. package/assets/ts/modules/filterlist.ts +46 -0
  104. package/assets/ts/modules/helpers.ts +90 -60
  105. package/assets/ts/modules/pagination.ts +44 -0
  106. package/assets/ts/modules/table.ts +598 -433
  107. package/assets/ts/modules/tabs.ts +8 -1
  108. package/assets/ts/modules/youtubevideo.ts +58 -63
  109. package/assets/ts/tests/filterlist.spec.ts +29 -0
  110. package/assets/ts/tests/pagination.spec.ts +21 -0
  111. package/assets/ts/tests/table.spec.ts +191 -0
  112. package/dist/components.es.js +1264 -1296
  113. package/dist/components.umd.js +70 -65
  114. package/dist/style.css +1 -1
  115. package/package.json +7 -5
  116. package/src/components/AppliedFilters/AppliedFilters.vue +20 -0
  117. package/src/components/AppliedFilters/README.md +5 -0
  118. package/src/components/Card/Card.vue +11 -112
  119. package/src/components/Card/README.md +16 -18
  120. package/src/components/Carousel/Carousel.vue +49 -10
  121. package/src/components/Chart/Chart.vue +46 -4
  122. package/src/components/Filterlist/Filterlist.vue +20 -0
  123. package/src/components/Filterlist/README.md +17 -0
  124. package/src/components/Pagination/Pagination.vue +30 -0
  125. package/src/components/Pagination/README.md +11 -0
  126. package/src/components/Table/README.md +29 -44
  127. package/src/components/Table/Table.spec.js +5 -37
  128. package/src/components/Table/Table.vue +16 -91
  129. package/src/foundations/YoutubeVideo/YoutubeVideo.vue +1 -1
  130. package/src/index.js +3 -2
  131. package/assets/css/components/cardDeck.css +0 -1
  132. package/assets/css/components/cardDeck.css.map +0 -1
  133. package/assets/css/components/links.css +0 -1
  134. package/assets/css/components/links.css.map +0 -1
  135. package/assets/css/components/modal.css +0 -1
  136. package/assets/css/components/modal.css.map +0 -1
  137. package/assets/css/components/tables.css +0 -1
  138. package/assets/css/components/tables.css.map +0 -1
  139. package/assets/js/modules/modal.js +0 -69
  140. package/assets/sass/components/cardDeck.scss +0 -108
  141. package/assets/sass/components/modal.scss +0 -136
  142. package/assets/sass/components/tables.scss +0 -291
  143. package/assets/ts/modules/modal.ts +0 -91
  144. package/src/components/CardDeck/CardDeck.spec.js +0 -99
  145. package/src/components/CardDeck/CardDeck.vue +0 -77
  146. package/src/components/CardDeck/README.md +0 -25
  147. package/src/components/Modal/Modal.spec.js +0 -22
  148. package/src/components/Modal/Modal.vue +0 -43
  149. package/src/components/Modal/README.md +0 -20
@@ -1,10 +1,10 @@
1
- import { openBlock as l, createElementBlock as c, createElementVNode as a, toDisplayString as k, normalizeClass as v, createCommentVNode as p, Fragment as x, renderList as L, renderSlot as b, withDirectives as N, mergeProps as T, vModelDynamic as F, vModelText as X, vModelSelect as ee, resolveComponent as H, createVNode as S, createTextVNode as j, normalizeStyle as te, withModifiers as se } from "vue";
2
- const g = (e, r) => {
3
- const t = e.__vccOpts || e;
4
- for (const [o, f] of r)
5
- t[o] = f;
6
- return t;
7
- }, ae = {
1
+ import { openBlock as c, createElementBlock as d, createElementVNode as o, toDisplayString as L, normalizeClass as v, createCommentVNode as _, Fragment as $, renderList as T, renderSlot as p, withDirectives as N, mergeProps as H, vModelDynamic as P, vModelText as se, vModelSelect as ie, resolveComponent as E, createVNode as S, createTextVNode as le, normalizeStyle as ne, withModifiers as re } from "vue";
2
+ const A = (t, a) => {
3
+ const e = t.__vccOpts || t;
4
+ for (const [s, r] of a)
5
+ e[s] = r;
6
+ return e;
7
+ }, oe = {
8
8
  name: "Icon",
9
9
  props: {
10
10
  id: {
@@ -18,16 +18,16 @@ const g = (e, r) => {
18
18
  default: "/svg/icons.svg"
19
19
  }
20
20
  }
21
- }, ie = { class: "icon" }, ne = ["xlink:href"];
22
- function re(e, r, t, o, f, s) {
23
- return l(), c("svg", ie, [
24
- a("title", null, k(t.id), 1),
25
- a("use", {
26
- "xlink:href": t.path + "#icon-" + t.id
27
- }, null, 8, ne)
21
+ }, ce = { class: "icon" }, de = ["xlink:href"];
22
+ function ue(t, a, e, s, r, n) {
23
+ return c(), d("svg", ce, [
24
+ o("title", null, L(e.id), 1),
25
+ o("use", {
26
+ "xlink:href": e.path + "#icon-" + e.id
27
+ }, null, 8, de)
28
28
  ]);
29
29
  }
30
- const oe = /* @__PURE__ */ g(ae, [["render", re]]), le = {
30
+ const he = /* @__PURE__ */ A(oe, [["render", ue]]), me = {
31
31
  name: "Logo",
32
32
  props: {
33
33
  id: {
@@ -52,390 +52,389 @@ const oe = /* @__PURE__ */ g(ae, [["render", re]]), le = {
52
52
  return "brand brand--" + this.id;
53
53
  }
54
54
  }
55
- }, ce = ["xlink:href"], de = ["innerHTML"];
56
- function ue(e, r, t, o, f, s) {
57
- return l(), c("div", {
58
- class: v(s.className)
55
+ }, fe = ["xlink:href"], ye = ["innerHTML"];
56
+ function be(t, a, e, s, r, n) {
57
+ return c(), d("div", {
58
+ class: v(n.className)
59
59
  }, [
60
- (l(), c("svg", null, [
61
- a("title", null, "iam " + k(t.id), 1),
62
- a("use", {
63
- "xlink:href": t.path + s.src
64
- }, null, 8, ce)
60
+ (c(), d("svg", null, [
61
+ o("title", null, "iam " + L(e.id), 1),
62
+ o("use", {
63
+ "xlink:href": e.path + n.src
64
+ }, null, 8, fe)
65
65
  ])),
66
- t.desc ? (l(), c("span", {
66
+ e.desc ? (c(), d("span", {
67
67
  key: 0,
68
- innerHTML: t.desc
69
- }, null, 8, de)) : p("", !0)
68
+ innerHTML: e.desc
69
+ }, null, 8, ye)) : _("", !0)
70
70
  ], 2);
71
71
  }
72
- const fe = /* @__PURE__ */ g(le, [["render", ue]]), W = (e) => e.charAt(0).toUpperCase() + e.slice(1), K = (e) => e.replace(/_/g, " "), he = (e) => e.replace(/ /g, "_"), me = function(e) {
73
- return e = e.toLowerCase(), e = he(e), e = e.replace(/\W/g, ""), e;
74
- }, _e = function(e) {
75
- return typeof e != "string" ? !1 : !isNaN(e) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
76
- !isNaN(parseFloat(e));
77
- }, ye = (e, r) => String(e).padStart(r, "0");
78
- function Z(e) {
79
- if (typeof e != "object")
72
+ const _e = /* @__PURE__ */ A(me, [["render", be]]), pe = function(t) {
73
+ return typeof t != "string" ? !1 : !isNaN(t) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
74
+ !isNaN(parseFloat(t));
75
+ }, ge = (t, a) => String(t).padStart(a, "0"), ve = (t) => t.charAt(0).toUpperCase() + t.slice(1), F = function(t, a) {
76
+ if (!t.getAttribute("data-pages"))
80
77
  return !1;
81
- const r = e.querySelector("thead"), t = e.querySelector("tbody"), o = t.cloneNode(!0), f = new Event("sorted"), s = new Event("filtered"), i = new Event("reordered"), n = "table_" + Math.random().toString(36).substr(2, 9);
82
- let h;
83
- e.setAttribute("id", n);
84
- const w = function(m, u) {
85
- let d = [];
86
- Array.from(t.querySelectorAll("tr")).forEach((y, q) => {
87
- let A = y.querySelector('td[data-label="' + m + '"], th[data-label="' + m + '"]').textContent;
88
- _e(A) && (A = ye(A, 10));
89
- const V = {
90
- index: A,
91
- row: y
92
- };
93
- d.push(V);
94
- }), d.sort((y, q) => y.index > q.index ? 1 : -1), u == "descending" && (d = d.reverse());
95
- let _ = "";
96
- d.forEach((y, q) => {
97
- _ += y.row.outerHTML;
98
- }), t.innerHTML = _, e.dispatchEvent(f);
99
- };
100
- if (e.addEventListener("click", function(m) {
101
- for (var u = m.target; u && u != this; u = u.parentNode)
102
- if (u.matches("[data-sortable]")) {
103
- let d = u.getAttribute("aria-sort") == "ascending" ? "descending" : "ascending";
104
- Array.from(e.querySelectorAll("[data-sortable]")).forEach((_, y) => {
105
- _.setAttribute("aria-sort", "none");
106
- }), u.setAttribute("aria-sort", d), e.setAttribute("data-sort", d), e.setAttribute("data-sortBy", u.textContent), w(u.textContent, d), Array.from(e.querySelectorAll("tr[draggable]")).forEach((_, y) => {
107
- _.removeAttribute("draggable");
108
- });
109
- break;
78
+ t.getAttribute("data-page") || t.setAttribute("data-page", 1);
79
+ let e = t.getAttribute("data-page"), s = t.getAttribute("data-pages"), r = t.getAttribute("data-total"), n = t.getAttribute("data-show"), i = t.getAttribute("data-increment");
80
+ if (s <= 1)
81
+ return a.innerHTML = "", !1;
82
+ let l = "";
83
+ for (let h = 1; h <= s; h++)
84
+ h == e ? l += `<li class="page-item active" aria-current="page"><span class="page-link">${h}</span></li>` : l += `<li class="page-item"><a href="?page=${h}" class="page-link" data-page="${h}">${h}</a></li>`;
85
+ return a.innerHTML = `<ul class="pagination mb-0 d-none d-sm-flex">
86
+ ${e == 1 ? '<li class="page-item disabled"><span class="page-link">Previous</span></li>' : `<li class="page-item"><a href="?page=${parseInt(e) - 1}" class="page-link" data-page="${parseInt(e) - 1}">Previous</a></li>`}
87
+ ${l}
88
+ ${e == s ? '<li class="page-item disabled"><span class="page-link">Next</span></li>' : `<li class="page-item"><a href="?page=${parseInt(e) + 1}" class="page-link" data-page="${parseInt(e) + 1}">Next</a></li>`}
89
+ </ul>`, a.innerHTML += `<div class="d-sm-none text-center">
90
+ <span class="d-block pb-2">You've viewed ${n} of ${r} results</span>
91
+ <a href="?show=${parseInt(n) + parseInt(i)}" class="btn btn-primary w-100 m-0" data-show="${parseInt(n) + parseInt(i)}">Load more results</a>
92
+ </div>`, !0;
93
+ }, G = (t) => {
94
+ const a = Array.from(t.querySelectorAll("thead th"));
95
+ Array.from(t.querySelectorAll("tbody tr")).forEach((s, r) => {
96
+ const n = Array.from(s.querySelectorAll("th, td")), i = ["Low", "Medium", "High", "N/A", "Pending", "Verified", "Incomplete", "Completed", "Requires approval"];
97
+ n.forEach((l, h) => {
98
+ const u = a[h];
99
+ if (typeof u < "u") {
100
+ let m = document.createElement("div");
101
+ m.innerHTML = u.innerHTML;
102
+ let f = m.textContent || m.innerText || "";
103
+ l.setAttribute("data-label", f), u.hasAttribute("class") && l.setAttribute("class", u.getAttribute("class")), u.hasAttribute("data-format") && (l.setAttribute("data-format", u.getAttribute("data-format")), l.innerHTML = D("date", l.textContent.trim())), i.includes(l.textContent.trim()) && l.setAttribute("data-content", l.textContent.trim());
110
104
  }
111
- }, !1), e.getAttribute("data-sortBy")) {
112
- let m = e.getAttribute("data-sort") == "ascending" ? "descending" : "ascending";
113
- Array.from(e.querySelectorAll("[data-sortable]")).forEach((u, d) => {
114
- u.textContent == e.getAttribute("data-sortBy") && (u.setAttribute("aria-sort", m), u.click());
115
105
  });
116
- }
117
- const $ = function(m) {
118
- const u = document.createElement("div");
119
- u.classList.add("table__filters"), u.classList.add("row"), u.classList.add("pt-1"), u.classList.add("pb-3");
120
- const d = Array.from(e.querySelectorAll("th[data-filterable]"));
121
- let _ = {};
122
- d.forEach((A, V) => {
123
- Array.from(e.querySelectorAll('td[data-label="' + A.textContent + '"]')).forEach((R, li) => {
124
- _[R.textContent] = R.textContent;
125
- });
126
- });
127
- const y = d.length == 1 ? "Filter by " + d[0].textContent : "Filter", q = d.length == 1 ? "d-none" : "d-sm-flex";
128
- u.innerHTML = `<div class="col-sm-6 col-md-4 pb-3">
129
- <div class="form-control__wrapper form-control-inline mb-0">
130
- <label for="${n}_filter" class="form-label">${y}:</label>
131
- <input type="search" name="${n}_filter" id="${n}_filter" class="form-control form-control-sm" placeholder="" list="${n}_list" />
132
- </div>
133
- <datalist id="${n}_list">
134
- ${Object.keys(_).map((A) => `<option value="${A}"></option>`).join("")}
135
- </datalist>
136
- </div>
137
- <div class="col-md-8 align-items-center pb-3 ${q}">
138
- ${'<span class="pe-3 text-nowrap h5 mb-0">Filter by: </span>' + d.map((A) => `<div class="form-check pe-3 mt-0 mb-0"><input class="form-check-input" type="checkbox" id="${n}_${A.textContent.replace(" ", "_").toLowerCase()}" checked="checked" /><label class="form-check-label text-nowrap" for="${n}_${A.textContent.replace(" ", "_").toLowerCase()}">${A.textContent}</label></div>`).join("")}
139
- </div>`, e.prepend(u);
140
- }, M = function(m) {
141
- let u = [];
142
- Array.from(o.querySelectorAll("tr")).forEach((_, y) => {
143
- let q = "";
144
- if (Array.from(e.querySelectorAll('[type="checkbox"]:checked + label')).forEach((A, V) => {
145
- q += _.querySelector('td[data-label="' + A.textContent + '"]').textContent + " | ";
146
- }), q.indexOf(m) >= 0) {
147
- const A = { row: _ };
148
- u.push(A);
149
- }
106
+ });
107
+ }, Ae = (t) => {
108
+ let a = 0;
109
+ return Array.from(t.querySelectorAll("tr")).forEach((e, s) => {
110
+ let r = window.getComputedStyle(document.querySelector("html")), n = e.querySelector(":scope > *:last-child > *:first-child");
111
+ if (n) {
112
+ let l = n.offsetWidth / parseFloat(r.fontSize);
113
+ l += 1.5, a = a > l ? a : l;
114
+ }
115
+ let i = e.offsetHeight / parseFloat(r.fontSize);
116
+ e.style.setProperty("--row-height", `${i}rem`);
117
+ }), a;
118
+ }, we = (t) => {
119
+ Array.from(t.querySelectorAll("tbody tr")).forEach((a, e) => {
120
+ let s = a.querySelector(":scope > :is(td,th):first-child"), r = s.textContent;
121
+ s.innerHTML = `<span class="td__content">${r}</span><button type="button" class="d-none">${r}</button>`;
122
+ });
123
+ }, Se = (t) => {
124
+ t.addEventListener("click", (a) => {
125
+ if (a && a.target instanceof HTMLElement && a.target.closest("tr > :is(td,th):first-child button")) {
126
+ let e = a.target.closest("tr > :is(td,th):first-child button"), s = e.parentNode.closest("tr");
127
+ s.getAttribute("data-view") == "full" ? s.setAttribute("data-view", "default") : s.setAttribute("data-view", "full"), e.blur();
128
+ }
129
+ });
130
+ }, Q = (t, a) => {
131
+ let e = a.querySelector("[data-search]");
132
+ if (!e)
133
+ return !1;
134
+ const s = e.getAttribute("id"), r = e.getAttribute("data-search").split(",");
135
+ let n = e.parentNode, i = {};
136
+ r.forEach((l, h) => {
137
+ Array.from(t.querySelectorAll('td[data-label="' + l.trim() + '"]')).forEach((u, m) => {
138
+ u.querySelector(".td__content") ? i[u.querySelector(".td__content").textContent] = u.querySelector(".td__content").textContent : i[u.textContent] = u.textContent;
150
139
  });
151
- let d = "";
152
- u.forEach((_, y) => {
153
- d += _.row.outerHTML;
154
- }), t.innerHTML = d, e.dispatchEvent(s);
155
- }, I = function() {
156
- let m = [];
157
- Array.from(e.querySelectorAll('[type="checkbox"]:checked + label')).forEach((_, y) => {
158
- m.push(_.textContent);
140
+ }), e.setAttribute("list", `${s}_list`), e.setAttribute("autocomplete", "off"), n.querySelector("datalist") || (n.innerHTML += `<datalist id="${s}_list"></datalist>`), n.querySelector("datalist").innerHTML = `${Object.keys(i).map((l) => `<option value="${l}"></option>`).join("")}`;
141
+ }, Le = (t, a, e, s, r) => {
142
+ var n;
143
+ let i = function() {
144
+ a.hasAttribute("data-ajax") ? J(t, a, e, s) : a.hasAttribute("data-submit") ? a.submit() : (Y(t, a, s), F(s, e));
145
+ };
146
+ a.addEventListener("keyup", (l) => {
147
+ clearTimeout(n), l && l.target instanceof HTMLElement && l.target.closest("[data-search]") && (n = setTimeout(function() {
148
+ i();
149
+ }, 500));
150
+ }), a.addEventListener("change", (l) => {
151
+ clearTimeout(n), l && l.target instanceof HTMLElement && l.target.closest("[data-sort]") && (a.hasAttribute("data-submit") || U(t, a, r), i()), l && l.target instanceof HTMLElement && l.target.closest("[data-search]") && i(), l && l.target instanceof HTMLElement && l.target.closest("[data-filter]") && !l.target.closest("form dialog") && i(), l && l.target instanceof HTMLElement && l.target.closest("[data-show]") && i();
152
+ }), a.addEventListener("click", (l) => {
153
+ clearTimeout(n), l && l.target instanceof HTMLElement && l.target.closest('dialog button:not([type="button"])') && l.target.closest('dialog button:not([type="button"])').closest("dialog").close(), l && l.target instanceof HTMLElement && l.target.closest(".dialog__close") && (l.preventDefault(), l.stopPropagation()), l && l.target instanceof HTMLElement && l.target.closest("[data-clear]") && (a.reset(), a.hasAttribute("data-submit") || U(t, a, r), i());
154
+ }), a.addEventListener("submit", (l) => {
155
+ clearTimeout(n), a.hasAttribute("data-submit") || l.preventDefault(), i();
156
+ });
157
+ }, U = (t, a, e) => {
158
+ if (a.getAttribute("data-ajax"))
159
+ return !1;
160
+ let s = t.querySelector("tbody"), r = a.querySelector("[data-sort]"), n = r.querySelector(`option:nth-child(${r.selectedIndex + 1})`), i = n.getAttribute("data-sort"), l = n.getAttribute("data-order"), h = n.getAttribute("data-format");
161
+ if (!i)
162
+ return s.innerHTML = e.innerHTML, G(t), !1;
163
+ let u = [];
164
+ ["asc", "desc", "descending"].includes(l) || (u = l.split(","));
165
+ let m = [];
166
+ Array.from(s.querySelectorAll("tr")).forEach((b, g) => {
167
+ let y = b.querySelector('td[data-label="' + i + '"], th[data-label="' + i + '"]').textContent.trim();
168
+ u.length && u.includes(y) && (y = u.indexOf(y)), pe(y) && (y = ge(y, 10)), h && h == "date" && (y = new Date(y));
169
+ const C = {
170
+ index: y,
171
+ row: b
172
+ };
173
+ m.push(C);
174
+ }), m.sort((b, g) => b.index > g.index ? 1 : -1), (l == "descending" || l == "desc") && (m = m.reverse());
175
+ let f = "";
176
+ m.forEach((b, g) => {
177
+ f += b.row.outerHTML;
178
+ }), s.innerHTML = f;
179
+ }, Y = (t, a, e) => {
180
+ t.classList.remove("table--filtered");
181
+ let s = [], r = [], n = 0, i = a.querySelector("[data-pagination]") ? parseInt(a.querySelector("[data-pagination]").value) : 1, l = a.querySelector("[data-show]") ? parseInt(a.querySelector("[data-show]").value) : 15;
182
+ if (Array.from(a.querySelectorAll("[data-filter]")).forEach((u, m) => {
183
+ if (!(u.type == "radio" && !u.checked) && !(u.type == "checkbox" && !u.checked))
184
+ if (u.getAttribute("data-filter") == "multi")
185
+ for (const [f, b] of Object.entries(JSON.parse(u.value)))
186
+ s[u.getAttribute("data-filter")].push(b);
187
+ else
188
+ u.value && (s[u.getAttribute("data-filter")] || (s[u.getAttribute("data-filter")] = new Array()), s[u.getAttribute("data-filter")].push(u.value));
189
+ }), a.querySelector("[data-search]")) {
190
+ let u = a.querySelector("[data-search]");
191
+ a.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((f, b) => {
192
+ r.push({ column: `${f.trim()}`, value: `${u.value}` });
159
193
  });
160
- let u = [];
161
- m.forEach((_, y) => {
162
- Array.from(e.querySelectorAll('td[data-label="' + _ + '"]')).forEach((q, A) => {
163
- u[q.textContent] = q.textContent;
164
- });
194
+ }
195
+ if (Array.from(a.querySelectorAll("[data-filter-count]")).forEach((u, m) => {
196
+ u.innerHTML = "";
197
+ }), s.length && Array.from(a.querySelectorAll("[data-filter-count]")).forEach((u, m) => {
198
+ u.innerHTML += `(${s.length})`;
199
+ }), !r.length && !s.length)
200
+ return !1;
201
+ t.classList.add("table--filtered"), Array.from(t.querySelectorAll("tbody tr")).forEach((u, m) => {
202
+ u.classList.remove("filtered"), u.classList.remove("filtered--matched"), u.classList.remove("filtered--show"), u.removeAttribute("data-filtered-by");
203
+ });
204
+ for (const [u, m] of Object.entries(s))
205
+ console.log(m), Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).forEach((f, b) => {
206
+ let g = !1;
207
+ m.forEach((y, C) => {
208
+ let M = f.querySelector(`[data-label="${u}"]`);
209
+ if (y && y == "$today")
210
+ y = D("date", /* @__PURE__ */ new Date());
211
+ else if (y && y == "$yesterday") {
212
+ let w = /* @__PURE__ */ new Date();
213
+ w.setDate(w.getDate() - 1), y = D("date", w);
214
+ } else if (y && (y == "$thisWeek" || y == "$lastWeek")) {
215
+ let w = /* @__PURE__ */ new Date(), x = new Date(w.setDate(w.getDate() - (w.getDay() - 1))), q = new Date(w.setDate(w.getDate() - w.getDay() + 7)), k = new Date(M.textContent.toLowerCase());
216
+ if (w.setHours(0, 0, 0, 0), x.setHours(0, 0, 0, 0), q.setHours(0, 0, 0, 0), k.setHours(0, 0, 0, 0), y == "$thisWeek")
217
+ g = k >= x && k <= q;
218
+ else {
219
+ let O = new Date(x.setDate(x.getDate() - 7)), j = new Date(q.setDate(q.getDate() - 7));
220
+ O.setHours(0, 0, 0, 0), j.setHours(0, 0, 0, 0), g = k >= O && k <= j;
221
+ }
222
+ } else if (y && y == "$thisMonth") {
223
+ let w = /* @__PURE__ */ new Date(), x = w.getFullYear(), q = w.getMonth();
224
+ var B = new Date(x, q, 1), V = new Date(x, q + 1, 0);
225
+ let k = new Date(M.textContent.toLowerCase());
226
+ B.setHours(0, 0, 0, 0), V.setHours(0, 0, 0, 0), k.setHours(0, 0, 0, 0), g = k >= B && k <= V;
227
+ } else if (y && y == "$lastMonth") {
228
+ let w = /* @__PURE__ */ new Date(), x = w.getFullYear(), q = w.getMonth();
229
+ var z = new Date(x, q - 1, 1), W = new Date(x, q, 0);
230
+ let k = new Date(M.textContent.toLowerCase());
231
+ z.setHours(0, 0, 0, 0), W.setHours(0, 0, 0, 0), k.setHours(0, 0, 0, 0), g = k >= z && k <= W;
232
+ }
233
+ M && M.textContent.toLowerCase().includes(y.toLowerCase()) && (g = !0);
234
+ }), g || (f.classList.add("filtered"), f.setAttribute("data-filtered-by", u));
165
235
  });
166
- let d = e.querySelector("datalist");
167
- d.innerHTML = Object.keys(u).map((_) => `<option value="${_}"></option>`).join("");
168
- };
169
- Array.from(e.querySelectorAll("[data-filterable]")).length && ($(e, Array.from(e.querySelectorAll("[data-filterable]")).length), e.addEventListener("keyup", function(m) {
170
- for (var u = m.target; u && u != this; u = u.parentNode)
171
- if (u.matches('input[type="search"]')) {
172
- const d = u.value;
173
- M(d);
174
- }
175
- }), e.addEventListener("change", function(m) {
176
- for (var u = m.target; u && u != this; u = u.parentNode)
177
- if (u.matches('input[type="search"]')) {
178
- const d = u.value;
179
- M(d);
180
- }
181
- }), e.addEventListener("change", function(m) {
182
- for (var u = m.target; u && u != this; u = u.parentNode)
183
- if (u.matches('input[type="checkbox"]')) {
184
- const d = e.querySelector('input[type="search"]').value;
185
- M(d), I();
186
- }
187
- }));
188
- const C = function(m, u) {
189
- let d = document.getElementById(n + "_style");
190
- d == null && (d = document.createElement("style"), d.setAttribute("id", n + "_style"));
191
- const _ = m * (u - 1) + 1, y = m * u;
192
- d.innerHTML = `
193
- #${n} tbody tr {
194
- display: none;
195
- }
196
- #${n} tbody tr:nth-child(${_}),
197
- #${n} tbody tr:nth-child(${_}) ~ tr{
198
- display: block;
236
+ Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).forEach((u, m) => {
237
+ let f = !(r.length > 0 && r[0].value.length >= 3);
238
+ r.forEach((b, g) => {
239
+ let y = u.querySelector(`[data-label="${b.column}"]`);
240
+ y && b.value.length >= 3 && y.textContent.toLowerCase().includes(b.value.toLowerCase()) && (f = !0);
241
+ }), f || u.classList.add("filtered");
242
+ }), Array.from(t.querySelectorAll("tbody tr:not(.filtered")).forEach((u, m) => {
243
+ n++, u.classList.add("filtered--matched"), Math.ceil(n / l) == parseInt(i) && u.classList.add("filtered--show");
244
+ }), e && (e.setAttribute("data-page", i), e.setAttribute("data-pages", Math.ceil(n / l)), e.setAttribute("data-total", n), e.setAttribute("data-show", l)), Z(t, a);
245
+ }, Z = (t, a) => {
246
+ Array.from(a.querySelectorAll("[data-query]")).forEach((s, r) => {
247
+ let n = s.getAttribute("data-query"), i;
248
+ if (n == "total")
249
+ i = t.classList.contains("table--filtered") ? t.querySelectorAll("tbody tr:not(.filtered)").length : t.querySelectorAll("tbody tr").length;
250
+ else if (!n.includes(" == ") && n.includes(" & ")) {
251
+ let l = n.split(" & "), h = "";
252
+ l.forEach((u) => {
253
+ h += `:not([data-filtered-by="${u}"])`;
254
+ }), console.log(h), i = Array.from(t.querySelectorAll(`tbody tr${h}`)).length;
255
+ } else if (!n.includes(" == "))
256
+ i = Array.from(t.querySelectorAll(`tbody tr:not([data-filtered-by="${n}"])`)).length;
257
+ else if (n.includes(" && ")) {
258
+ let l = n.split(" && ");
259
+ i = Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).filter(function(h) {
260
+ let u = !0;
261
+ for (const [m, f] of Object.entries(l)) {
262
+ let b = f.split(" == ");
263
+ (!h.querySelector(`td[data-label="${b[0]}"]`) || h.querySelector(`td[data-label="${b[0]}"]`).textContent != `${b[1]}`) && (u = !1);
264
+ }
265
+ return u;
266
+ }).length;
267
+ } else {
268
+ let l = n.split(" == ");
269
+ console.log(l[0]), i = Array.from(t.querySelectorAll(`tbody tr.filtered--matched td[data-label="${l[0]}"], tbody tr[data-filtered-by="${l[0]}"] td[data-label="${l[0]}"]`)).filter(function(h) {
270
+ return h.textContent === l[1];
271
+ }).length;
199
272
  }
200
- @media screen and (min-width: 36em) {
201
- #${n} tbody tr:nth-child(${_}),
202
- #${n} tbody tr:nth-child(${_}) ~ tr{
203
- display: table-row;
204
- }
273
+ s.hasAttribute("data-total") ? s.setAttribute("data-total", i) : s.innerHTML = i;
274
+ });
275
+ }, ke = function(t, a, e, s) {
276
+ e.addEventListener("click", (r) => {
277
+ if (r && r.target instanceof HTMLElement && r.target.closest("[data-page]")) {
278
+ r.preventDefault();
279
+ let n = a.querySelector("[data-pagination]"), i = r.target.closest("[data-page]").getAttribute("data-page");
280
+ n.value = i, s.setAttribute("data-page", i), a.dispatchEvent(new Event("submit"));
281
+ const l = new URL(location);
282
+ l.searchParams.set("page", i), history.pushState({ type: "pagination", form: a.getAttribute("id"), page: i }, "", l);
205
283
  }
206
- #${n} tbody tr:nth-child(${y}) ~ tr{
207
- display: none;
284
+ if (r && r.target instanceof HTMLElement && r.target.closest("[data-show]")) {
285
+ r.preventDefault();
286
+ let n = a.querySelector("[data-show]"), i = r.target.closest("[data-show]").getAttribute("data-show");
287
+ n.value = i, s.setAttribute("data-show", i), a.dispatchEvent(new Event("submit"));
208
288
  }
209
- `, e.append(d);
210
- };
211
- if (e.getAttribute("data-show")) {
212
- const m = parseInt(e.getAttribute("data-show")), u = parseInt(e.getAttribute("data-page")) ? parseInt(e.getAttribute("data-page")) : 1, d = e.querySelectorAll("tbody tr").length;
213
- m < d && (C(m, u), U(n, e, m, u, d), B(n, e, m, u, d), e.addEventListener("change", function(_) {
214
- for (var y = _.target; y && y != this; y = y.parentNode)
215
- y.matches('.table__pagination input[type="number"]') && (C(y.value, u), B(n, e, y.value, u, d), e.setAttribute("data-show", y.value));
216
- }), e.addEventListener("click", function(_) {
217
- for (var y = _.target; y && y != this; y = y.parentNode)
218
- y.matches(".page-item:not(.active):not(.disabled) .page-link") && (C(e.getAttribute("data-show"), y.getAttribute("data-page")), B(n, e, e.getAttribute("data-show"), y.getAttribute("data-page"), d));
219
- }, !1), e.addEventListener("change", function(_) {
220
- for (var y = _.target; y && y != this; y = y.parentNode)
221
- y.matches(".table__pagination select") && (C(e.getAttribute("data-show"), y.value), B(n, e, e.getAttribute("data-show"), y.value, d));
222
- }));
289
+ });
290
+ }, xe = (t, a) => {
291
+ if (!t)
292
+ return !1;
293
+ t.addEventListener("click", (e) => {
294
+ qe(a);
295
+ });
296
+ }, qe = function(t) {
297
+ for (var a = [], e = t.getElementsByTagName("tr"), s = 0; s < e.length; s++) {
298
+ for (var r = e[s].querySelectorAll("td,th"), n = [], i = 0; i < r.length; i++)
299
+ n.push(`"${r[i].textContent}"`);
300
+ a.push(n.join(","));
223
301
  }
224
- function J(m) {
225
- m.dataTransfer.setData("text/plain", m.target.id), h = m.target, m.target.classList.add("tr--dragging");
302
+ a = a.join(`
303
+ `);
304
+ let l = new Blob([a], {
305
+ type: "text/csv"
306
+ });
307
+ var h = document.createElement("a");
308
+ h.download = "export.csv";
309
+ var u = window.URL.createObjectURL(l);
310
+ h.href = u, h.style.display = "none", document.body.appendChild(h), h.click(), document.body.removeChild(h);
311
+ }, X = function(t, a, e, s) {
312
+ if (we(t), G(t), Z(t, a), s && s.classList.contains("table--cta")) {
313
+ const r = Ae(t);
314
+ s.style.setProperty("--cta-width", `${r}rem`);
226
315
  }
227
- const z = function() {
228
- Array.from(t.querySelectorAll("tr")).forEach((m, u) => {
229
- if (m.querySelector('[data-label="Order"]') == null) {
230
- const d = document.createElement("th");
231
- d.innerHTML = u + 1, d.setAttribute("data-label", "Order"), m.prepend(d);
232
- }
233
- m.setAttribute("id", n + "_row_" + (u + 1)), m.setAttribute("data-order", u + 1), m.setAttribute("draggable", "true"), m.addEventListener("dragstart", J);
234
- });
235
- };
236
- if (e.getAttribute("data-reorder") && e.getAttribute("data-reorder") != "false") {
237
- const m = document.createElement("th");
238
- m.innerHTML = "Order", m.title = "Click here to enable re-ordering via drag and drop", m.classList.add("table-order-reset"), r.querySelector("tr").prepend(m), z(), e.addEventListener("click", function(u) {
239
- for (var d = u.target; d && d != this; d = d.parentNode)
240
- if (d.matches(".table-order-reset")) {
241
- Array.from(e.querySelectorAll("[data-sortable]")).forEach((_, y) => {
242
- _.setAttribute("aria-sort", "none");
243
- }), e.removeAttribute("data-sort"), e.removeAttribute("data-sortBy"), w("Order", "ascending"), Array.from(e.querySelectorAll("tbody tr")).forEach((_, y) => {
244
- _.setAttribute("draggable", "true");
316
+ }, J = function(t, a, e, s) {
317
+ const r = (l, h, u) => h.split(/[\.\[\]\'\"]/).filter((m) => m).reduce((m, f) => m ? m[f] : u, l);
318
+ new URLSearchParams(new FormData(a)).toString();
319
+ let n = t.querySelectorAll("thead tr th"), i = t.querySelector("tbody");
320
+ fetch(a.getAttribute("data-ajax"), {
321
+ method: "get",
322
+ credentials: "same-origin",
323
+ headers: new Headers({
324
+ "Content-Type": "application/json",
325
+ Accept: "application/json",
326
+ "X-Requested-With": "XMLHttpRequest"
327
+ })
328
+ }).then((l) => l.json()).then((l) => {
329
+ l.data ? (i.innerHTML = "", l.data.forEach((h, u) => {
330
+ var m = document.createElement("tr");
331
+ n.forEach((f, b) => {
332
+ let g = "";
333
+ var y = document.createElement("td");
334
+ if (y.setAttribute("data-label", f.innerText), f.getAttribute("data-output")) {
335
+ var C = f.getAttribute("data-output");
336
+ g = C.replace(new RegExp(/{(.*?)}/, "gm"), function(M) {
337
+ return r(h, M.replace("{", "").replace("}", ""));
245
338
  });
246
- break;
247
- }
248
- }, !1), document.addEventListener("dragover", function(u) {
249
- u.preventDefault();
250
- }, !1), document.addEventListener("dragenter", function(u) {
251
- u.preventDefault(), u.dataTransfer.dropEffect = "move";
252
- for (var d = u.target; d && d != this; d = d.parentNode)
253
- d.matches("[data-reorder] tbody tr") && d.classList.add("tr--dropable");
254
- }, !1), document.addEventListener("dragleave", function(u) {
255
- u.preventDefault();
256
- for (var d = u.target; d && d != this; d = d.parentNode)
257
- d.matches("[data-reorder] tbody tr") && d.classList.remove("tr--dropable");
258
- }, !1), document.addEventListener("drop", function(u) {
259
- u.preventDefault();
260
- for (var d = u.target; d && d != this; d = d.parentNode)
261
- if (d.matches("[data-reorder] tbody tr")) {
262
- d.parentNode != null && h.parentNode != null && d != h && (h.parentNode.removeChild(h), h.getAttribute("data-order") > d.getAttribute("data-order") ? d.parentNode.insertBefore(h, d) : d.parentNode.insertBefore(h, d.nextElementSibling), Array.from(t.querySelectorAll("tr")).forEach((_, y) => {
263
- _.classList.remove("tr--dragging"), _.classList.remove("tr--dropable"), _.querySelector("th").innerHTML = y + 1, _.setAttribute("data-order", y + 1);
264
- }), e.dispatchEvent(i));
265
- break;
266
339
  }
267
- }, !1);
268
- }
269
- e.addEventListener("filtered", function(m) {
270
- if (e.getAttribute("data-sortBy") && e.getAttribute("data-sort") && w(e.getAttribute("data-sortBy"), e.getAttribute("data-sort")), e.getAttribute("data-show")) {
271
- const u = parseInt(e.getAttribute("data-show")), d = e.querySelectorAll("tbody tr").length, _ = e.querySelector(".table__pagination");
272
- _ != null && _.remove(), u < d && (C(u, 1), U(n, e, u, 1, d), B(n, e, u, 1, d));
273
- }
274
- e.getAttribute("data-reorder") && z();
275
- }, !1), e.addEventListener("sorted", function(m) {
276
- e.getAttribute("data-reorder") && z();
277
- }, !1), e.addEventListener("populated", function(m) {
278
- var u = e.querySelector(".table__filters");
279
- u.remove();
280
- var d = e.querySelector(".table__pagination");
281
- d.remove();
282
- var _ = e.cloneNode(!0);
283
- e.parentNode.replaceChild(_, e), Z(_);
284
- }, !1);
285
- }
286
- const U = function(e, r, t, o, f) {
287
- const s = document.createElement("div");
288
- s.classList.add("table__pagination"), s.classList.add("row"), s.classList.add("pt-3"), s.classList.add("pb-3"), s.innerHTML = `<div class="col mw-fit-content mb-3">
289
- <div class="form-control__wrapper form-control-inline mb-0">
290
- <label for="${e}_showing" class="form-label">Showing:</label>
291
- <input type="number" name="${e}_showing" id="${e}_showing" class="form-control form-control-sm showing-input-field" placeholder="" list="${e}_pagination" value="${t}" min="1" max="${f}" />
292
- </div>
293
- <datalist id="${e}_pagination">
294
- <option value="5">5</option>
295
- ${f > 10 ? '<option value="10">10</option>' : ""}
296
- ${f > 20 ? '<option value="20">20</option>' : ""}
297
- <option value="${f}">${f}</option>
298
- </datalist>
299
- </div>
300
- <div class="col mw-fit-content me-auto d-flex align-items-center mb-3"><span class="label">per page</span></div>
301
- <div class="col mw-fit-content d-sm-flex justify-content-end align-items-center" id="${e}_paginationBtns"></div>`, r.append(s);
302
- }, B = function(e, r, t, o, f) {
303
- const s = document.getElementById(e + "_paginationBtns");
304
- if (s == null)
305
- return !1;
306
- const i = Math.ceil(f / t);
307
- if (i == 1)
308
- s.innerHTML = "";
309
- else if (i < 5) {
310
- let n = "";
311
- for (let h = 1; h <= i; h++)
312
- h == o ? n += `<li class="page-item active" aria-current="page"><span class="page-link">${h}</span></li>` : n += `<li class="page-item"><button class="page-link" data-page="${h}">${h}</button></li>`;
313
- s.innerHTML = `<span class="pe-2 mb-3">Page: </span><ul class="pagination mb-3">
314
- ${o == 1 ? '<li class="page-item disabled"><span class="page-link">Previous</span></li>' : `<li class="page-item"><button class="page-link" data-page="${parseInt(o) - 1}">Previous</button></li>`}
315
- ${n}
316
- ${o == i ? '<li class="page-item disabled"><span class="page-link">Next</span></li>' : `<li class="page-item"><button class="page-link" data-page="${parseInt(o) + 1}">Next</button></li>`}
317
- </ul>`;
318
- } else {
319
- let n = "";
320
- for (let h = 1; h <= i; h++)
321
- h == o ? n += `<option value="${h}" selected>Page ${h}</option>` : n += `<option value="${h}">Page ${h}</option>`;
322
- s.innerHTML = `
323
- <div class="form-control__wrapper page-number mb-2">
324
- <select class="form-select">
325
- ${n}
326
- </select>
327
- </div>
328
- `;
340
+ f.hasAttribute("data-format") && (g = D(f.getAttribute("data-format"), g)), y.innerHTML = g, m.appendChild(y);
341
+ }), i.appendChild(m);
342
+ }), Q(t, a), X(t, a, e, s), s.setAttribute("data-total", l.meta.total ? l.meta.total : 1), s.setAttribute("data-page", l.meta.current_page ? l.meta.current_page : 1), s.setAttribute("data-pages", Math.ceil(s.getAttribute("data-total") / s.getAttribute("data-show"))), F(s, e), l.data.length == 0 && (i.innerHTML = '<tr><td colspan="100%"><span class="h4 m-0">No results found</span></td></tr>')) : i.innerHTML = '<tr><td colspan="100%"><span class="h6 m-0">Error loading table</span></td></tr>';
343
+ });
344
+ }, D = (t, a) => {
345
+ switch (t) {
346
+ case "date":
347
+ a = new Date(a).toLocaleDateString("en-gb", { year: "2-digit", month: "long", day: "numeric" });
348
+ break;
349
+ case "capitalise":
350
+ a = ve(a);
351
+ break;
329
352
  }
353
+ return a;
330
354
  };
331
- let G = function(e) {
332
- return typeof e != "string" ? e : (e = e.replace("£", ""), e = e.replace("%", ""), Number.isNaN(Number.parseFloat(e)) ? 0 : Number.parseFloat(e));
333
- };
334
- const pe = {
355
+ class $e extends HTMLElement {
356
+ constructor() {
357
+ super(), this.attachShadow({ mode: "open" });
358
+ const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", e = this.classList.contains("table--cta"), s = this.classList.contains("table--export");
359
+ let r = this.classList.toString();
360
+ r = r.replace("table--cta", "");
361
+ const n = document.createElement("template");
362
+ n.innerHTML = `
363
+ <style>
364
+ @import "${a}/css/core.min.css";
365
+ </style>
366
+ ${e ? '<div class="table--cta">' : ""}
367
+ <div class="table__wrapper ${r}">
368
+ <slot></slot>
369
+ </div>
370
+ ${e ? "</div>" : ""}
371
+ ${s ? '<button class="link" type="button" data-export>Export table as CSV</button>' : ""}
372
+ <div class="table__pagination"></div>
373
+ `, this.shadowRoot.appendChild(n.content.cloneNode(!0));
374
+ const i = new URLSearchParams(window.location.search);
375
+ this.hasAttribute("data-total") || this.setAttribute("data-total", this.querySelectorAll("table tbody tr").length), this.hasAttribute("data-page") || this.setAttribute("data-page", i.has("page") ? i.get("page") : 1), this.hasAttribute("data-show") || this.setAttribute("data-show", 15), this.setAttribute("data-pages", Math.ceil(this.getAttribute("data-total") / this.getAttribute("data-show")));
376
+ }
377
+ connectedCallback() {
378
+ this.table = this.querySelector("table"), this.savedTableBody = this.querySelector("tbody").cloneNode(!0), this.pagination = this.shadowRoot.querySelector(".table__pagination"), this.form = document.createElement("form"), this.hasAttribute("data-filterby") && (this.form = document.querySelector(`#${this.getAttribute("data-filterby")}`), Q(this.table, this.form), this.form.querySelector("[data-page]") || (this.form.innerHTML += `<input name="page" type="hidden" value="${this.getAttribute("data-page")}" data-pagination="true" />`), this.form.querySelector("[data-show]") || (this.form.innerHTML += `<input name="show" type="hidden" value="${this.getAttribute("data-show")}" data-show="true" />`)), Se(this.table), Le(this.table, this.form, this.pagination, this, this.savedTableBody), ke(this.table, this.form, this.pagination, this), xe(this.shadowRoot.querySelector("[data-export]"), this.table), this.form.getAttribute("data-ajax") ? J(this.table, this.form, this.pagination, this) : (X(this.table, this.form, this.pagination, this), Y(this.table, this.form, this), F(this, this.pagination));
379
+ }
380
+ static get observedAttributes() {
381
+ return ["data-total", "data-pages", "data-page", "data-show"];
382
+ }
383
+ attributeChangedCallback(a, e, s) {
384
+ }
385
+ }
386
+ const Te = (t) => t.charAt(0).toUpperCase() + t.slice(1), He = (t) => t.replace(/_/g, " "), Ce = (t) => t.replace(/ /g, "_"), Me = function(t) {
387
+ return t = t.toLowerCase(), t = Ce(t), t = t.replace(/\W/g, ""), t;
388
+ }, Ee = {
335
389
  name: "Table",
336
390
  props: {
337
- reorder: {
338
- type: Boolean,
339
- required: !1
340
- },
341
- page: {
342
- type: Number,
343
- required: !1
344
- },
345
- show: {
346
- type: Number,
347
- required: !1
348
- },
349
- sortby: {
350
- type: String,
351
- required: !1
352
- },
353
- sort: {
354
- type: String,
355
- required: !1
356
- },
357
- headingclass: {
358
- type: String,
359
- required: !1
360
- },
361
391
  items: {
362
392
  type: Array,
363
- required: !0
393
+ required: !1
364
394
  },
365
395
  fields: {
366
396
  type: Array,
367
- required: !0
397
+ required: !1
368
398
  }
369
399
  },
370
400
  computed: {
371
401
  cellHeading() {
372
- return (e) => `${W(K(e))}`;
373
- },
374
- numericValue() {
375
- return (e) => (e = G(e), e);
402
+ return (t) => `${Te(He(t))}`;
376
403
  }
377
404
  },
378
- mounted() {
405
+ created() {
379
406
  this.$nextTick(function() {
380
- Z(this.$refs.wrapper), this.$el.addEventListener("sorted", function(e) {
381
- console.log("Table sorted");
382
- }, !1), this.$el.addEventListener("filtered", function(e) {
383
- console.log("Table filtered");
384
- }, !1);
407
+ window.customElements.get("iam-table") || window.customElements.define("iam-table", $e);
385
408
  });
386
409
  },
387
410
  updated() {
388
- this.$nextTick(function() {
389
- let e = this.$refs.wrapper.querySelector("tbody"), r = "";
390
- this.items.forEach((o, f) => {
391
- let s = o.rowid ? o.rowid : "";
392
- o = Object.fromEntries(Object.entries(o).filter(([i]) => i !== "rowid")), r += `<tr data-row-id="${s}">${Object.keys(o).map((i) => `<td data-label="${W(K(i))}" data-numeric="${G(o[i])}">${o[i]}</td>`).join("")}</tr>`;
393
- }), e.innerHTML = r;
394
- const t = new Event("filtered");
395
- this.$refs.wrapper.dispatchEvent(t);
396
- });
397
411
  }
398
- }, be = ["data-sortby", "data-sort", "data-show", "data-page", "data-reorder"], ve = { key: 0 }, ge = ["data-sortable", "data-filterable"], Ae = { key: 1 }, we = ["data-row-id"], ke = ["innerHTML", "data-label", "data-numeric"];
399
- function Se(e, r, t, o, f, s) {
400
- return l(), c("div", {
401
- class: "table__wrapper",
402
- ref: "wrapper",
403
- "data-sortby": t.sortby,
404
- "data-sort": t.sort,
405
- "data-show": t.show,
406
- "data-page": t.page,
407
- "data-reorder": t.reorder
408
- }, [
409
- a("table", null, [
410
- t.fields ? (l(), c("thead", ve, [
411
- a("tr", {
412
- class: v(t.headingclass)
413
- }, [
414
- (l(!0), c(x, null, L(t.fields, (i) => (l(), c("th", {
415
- key: i.key,
416
- "data-sortable": i.sortable,
417
- "data-filterable": i.filterable
418
- }, k(s.cellHeading(i.key)), 9, ge))), 128))
419
- ], 2)
420
- ])) : p("", !0),
421
- t.items ? (l(), c("tbody", Ae, [
422
- (l(!0), c(x, null, L(t.items, (i, n) => (l(), c("tr", {
423
- key: n,
412
+ }, Ne = { key: 0 }, De = { key: 0 }, Re = ["data-row-id"], Pe = ["innerHTML"];
413
+ function Ie(t, a, e, s, r, n) {
414
+ return c(), d("iam-table", null, [
415
+ e.fields ? (c(), d("table", Ne, [
416
+ o("thead", null, [
417
+ o("tr", null, [
418
+ (c(!0), d($, null, T(e.fields, (i) => (c(), d("th", {
419
+ key: i.key
420
+ }, L(n.cellHeading(i.key)), 1))), 128))
421
+ ])
422
+ ]),
423
+ e.items ? (c(), d("tbody", De, [
424
+ (c(!0), d($, null, T(e.items, (i, l) => (c(), d("tr", {
425
+ key: l,
424
426
  "data-row-id": i.rowid
425
427
  }, [
426
- (l(!0), c(x, null, L(Object.fromEntries(Object.entries(i).filter(([h]) => h !== "rowid")), (h, w) => (l(), c("td", {
427
- key: w,
428
- innerHTML: h,
429
- "data-label": s.cellHeading(w),
430
- "data-numeric": s.numericValue(h)
431
- }, null, 8, ke))), 128))
432
- ], 8, we))), 128))
433
- ])) : p("", !0)
434
- ]),
435
- b(e.$slots, "default")
436
- ], 8, be);
428
+ (c(!0), d($, null, T(Object.fromEntries(Object.entries(i).filter(([h]) => h !== "rowid")), (h, u) => (c(), d("td", {
429
+ key: u,
430
+ innerHTML: h
431
+ }, null, 8, Pe))), 128))
432
+ ], 8, Re))), 128))
433
+ ])) : _("", !0)
434
+ ])) : p(t.$slots, "default", { key: 1 })
435
+ ]);
437
436
  }
438
- const E = /* @__PURE__ */ g(pe, [["render", Se]]), $e = {
437
+ const ee = /* @__PURE__ */ A(Ee, [["render", Ie]]), Fe = {
439
438
  name: "Input",
440
439
  props: {
441
440
  value: {
@@ -597,176 +596,176 @@ const E = /* @__PURE__ */ g(pe, [["render", Se]]), $e = {
597
596
  get() {
598
597
  return this.value == null && this.options != null && this.type == "select" ? this.$attrs.multiple ? [] : this.options[0].value : this.value;
599
598
  },
600
- set(e) {
601
- this.$emit("input", e);
599
+ set(t) {
600
+ this.$emit("input", t);
602
601
  }
603
602
  }
604
603
  },
605
604
  mounted() {
606
605
  this.$nextTick(function() {
607
- let e = this.$refs.wrapper;
608
- if (e.parentNode && e.parentNode.classList.contains("form-check") || e.classList.length == 0) {
609
- const r = document.createDocumentFragment();
610
- Array.from(e.childNodes).forEach((t) => r.appendChild(t)), e.parentNode.insertBefore(r, e), e.parentNode.removeChild(e);
606
+ let t = this.$refs.wrapper;
607
+ if (t.parentNode && t.parentNode.classList.contains("form-check") || t.classList.length == 0) {
608
+ const a = document.createDocumentFragment();
609
+ Array.from(t.childNodes).forEach((e) => a.appendChild(e)), t.parentNode.insertBefore(a, t), t.parentNode.removeChild(t);
611
610
  }
612
611
  });
613
612
  },
614
613
  methods: {
615
- inputKeyup(e) {
616
- this.$emit("keyupEvent", e);
614
+ inputKeyup(t) {
615
+ this.$emit("keyupEvent", t);
617
616
  },
618
617
  clickEvent() {
619
618
  this.$emit("bus");
620
619
  }
621
620
  }
622
- }, qe = ["for", "innerHTML", "title"], xe = ["innerHTML"], Le = ["innerHTML"], Te = ["type", "name", "id", "pattern", "list"], Me = ["type", "name", "id", "pattern"], He = {
621
+ }, Be = ["for", "innerHTML", "title"], Ve = ["innerHTML"], ze = ["innerHTML"], We = ["type", "name", "id", "pattern", "list"], Oe = ["type", "name", "id", "pattern"], je = {
623
622
  key: 5,
624
623
  class: "input-group"
625
- }, Ce = ["type", "name", "id", "pattern", "list"], Ne = { class: "input-group-text border-0 col-2 col-sm-1 px-0" }, Be = {
624
+ }, Ue = ["type", "name", "id", "pattern", "list"], Ke = { class: "input-group-text border-0 col-2 col-sm-1 px-0" }, Ge = {
626
625
  key: 6,
627
626
  class: "input-group"
628
- }, Pe = ["type", "name", "id", "pattern", "list"], De = { class: "input-group-text flex-fill" }, Ie = ["type", "name", "id", "pattern"], ze = ["value"], Ve = ["id"], Fe = ["value"], Oe = ["type", "name", "id"], je = ["for", "innerHTML"], Re = ["type", "name", "id"], We = ["for", "innerHTML"], Ke = ["innerHTML"];
629
- function Ue(e, r, t, o, f, s) {
630
- return l(), c("div", {
631
- class: v(s.wrapperClass()),
627
+ }, Qe = ["type", "name", "id", "pattern", "list"], Ye = { class: "input-group-text flex-fill" }, Ze = ["type", "name", "id", "pattern"], Xe = ["value"], Je = ["id"], et = ["value"], tt = ["type", "name", "id"], at = ["for", "innerHTML"], st = ["type", "name", "id"], it = ["for", "innerHTML"], lt = ["innerHTML"];
628
+ function nt(t, a, e, s, r, n) {
629
+ return c(), d("div", {
630
+ class: v(n.wrapperClass()),
632
631
  ref: "wrapper"
633
632
  }, [
634
- s.needsLabel() ? (l(), c("label", {
633
+ n.needsLabel() ? (c(), d("label", {
635
634
  key: 0,
636
- class: v(`form-label${t.labelclass ? ` ${t.labelclass}` : ""}`),
637
- for: t.id,
638
- innerHTML: s.displayLabel(),
639
- title: t.title
640
- }, null, 10, qe)) : p("", !0),
641
- t.prefix ? (l(), c("span", {
635
+ class: v(`form-label${e.labelclass ? ` ${e.labelclass}` : ""}`),
636
+ for: e.id,
637
+ innerHTML: n.displayLabel(),
638
+ title: e.title
639
+ }, null, 10, Be)) : _("", !0),
640
+ e.prefix ? (c(), d("span", {
642
641
  key: 1,
643
- class: v(`prefix ${this.prefixClass} ${t.size ? `prefix-${t.size}` : ""}`),
644
- innerHTML: t.prefix,
642
+ class: v(`prefix ${this.prefixClass} ${e.size ? `prefix-${e.size}` : ""}`),
643
+ innerHTML: e.prefix,
645
644
  role: "presentation"
646
- }, null, 10, xe)) : p("", !0),
647
- t.suffix ? (l(), c("span", {
645
+ }, null, 10, Ve)) : _("", !0),
646
+ e.suffix ? (c(), d("span", {
648
647
  key: 2,
649
- class: v(`suffix ${this.suffixClass} ${t.size ? `suffix-${t.size}` : ""}`),
650
- innerHTML: t.suffix,
648
+ class: v(`suffix ${this.suffixClass} ${e.size ? `suffix-${e.size}` : ""}`),
649
+ innerHTML: e.suffix,
651
650
  role: "presentation"
652
- }, null, 10, Le)) : p("", !0),
653
- s.isInput() ? N((l(), c("input", T({
651
+ }, null, 10, ze)) : _("", !0),
652
+ n.isInput() ? N((c(), d("input", H({
654
653
  key: 3,
655
- "onUpdate:modelValue": r[0] || (r[0] = (i) => s.inputVal = i),
656
- class: `form-control${t.size ? ` form-control-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
657
- type: t.type,
658
- name: t.name ? t.name : t.id,
659
- id: t.id,
660
- pattern: s.needPattern(),
661
- list: s.hasOptions()
662
- }, e.$attrs, {
663
- onKeyup: r[1] || (r[1] = (...i) => s.inputKeyup && s.inputKeyup(...i))
664
- }), null, 16, Te)), [
665
- [F, s.inputVal]
666
- ]) : p("", !0),
667
- t.type == "textarea" ? N((l(), c("textarea", T({
654
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => n.inputVal = i),
655
+ class: `form-control${e.size ? ` form-control-${e.size}` : ""}${e.inputclass ? ` ${e.inputclass}` : ""}`,
656
+ type: e.type,
657
+ name: e.name ? e.name : e.id,
658
+ id: e.id,
659
+ pattern: n.needPattern(),
660
+ list: n.hasOptions()
661
+ }, t.$attrs, {
662
+ onKeyup: a[1] || (a[1] = (...i) => n.inputKeyup && n.inputKeyup(...i))
663
+ }), null, 16, We)), [
664
+ [P, n.inputVal]
665
+ ]) : _("", !0),
666
+ e.type == "textarea" ? N((c(), d("textarea", H({
668
667
  key: 4,
669
- "onUpdate:modelValue": r[2] || (r[2] = (i) => s.inputVal = i),
670
- class: `form-control${t.size ? ` form-control-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
671
- type: t.type,
672
- name: t.name ? t.name : t.id,
673
- id: t.id,
674
- pattern: s.needPattern()
675
- }, e.$attrs), null, 16, Me)), [
676
- [X, s.inputVal]
677
- ]) : p("", !0),
678
- t.type == "range" ? (l(), c("div", He, [
679
- N(a("input", T({
680
- "onUpdate:modelValue": r[3] || (r[3] = (i) => s.inputVal = i),
681
- class: `form-range${t.inputclass ? ` ${t.inputclass}` : ""}`,
682
- type: t.type,
683
- name: t.name ? t.name : t.id,
684
- id: t.id,
685
- pattern: s.needPattern(),
686
- list: s.hasOptions()
687
- }, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Ce), [
688
- [F, s.inputVal]
668
+ "onUpdate:modelValue": a[2] || (a[2] = (i) => n.inputVal = i),
669
+ class: `form-control${e.size ? ` form-control-${e.size}` : ""}${e.inputclass ? ` ${e.inputclass}` : ""}`,
670
+ type: e.type,
671
+ name: e.name ? e.name : e.id,
672
+ id: e.id,
673
+ pattern: n.needPattern()
674
+ }, t.$attrs), null, 16, Oe)), [
675
+ [se, n.inputVal]
676
+ ]) : _("", !0),
677
+ e.type == "range" ? (c(), d("div", je, [
678
+ N(o("input", H({
679
+ "onUpdate:modelValue": a[3] || (a[3] = (i) => n.inputVal = i),
680
+ class: `form-range${e.inputclass ? ` ${e.inputclass}` : ""}`,
681
+ type: e.type,
682
+ name: e.name ? e.name : e.id,
683
+ id: e.id,
684
+ pattern: n.needPattern(),
685
+ list: n.hasOptions()
686
+ }, t.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Ue), [
687
+ [P, n.inputVal]
689
688
  ]),
690
- a("output", Ne, k(t.value), 1)
691
- ])) : p("", !0),
692
- t.type == "color" ? (l(), c("div", Be, [
693
- N(a("input", T({
694
- "onUpdate:modelValue": r[4] || (r[4] = (i) => s.inputVal = i),
695
- class: `form-control form-control-color${t.inputclass ? ` ${t.inputclass}` : ""}`,
696
- type: t.type,
697
- name: t.name ? t.name : t.id,
698
- id: t.id,
699
- pattern: s.needPattern(),
700
- list: s.hasOptions()
701
- }, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Pe), [
702
- [F, s.inputVal]
689
+ o("output", Ke, L(e.value), 1)
690
+ ])) : _("", !0),
691
+ e.type == "color" ? (c(), d("div", Ge, [
692
+ N(o("input", H({
693
+ "onUpdate:modelValue": a[4] || (a[4] = (i) => n.inputVal = i),
694
+ class: `form-control form-control-color${e.inputclass ? ` ${e.inputclass}` : ""}`,
695
+ type: e.type,
696
+ name: e.name ? e.name : e.id,
697
+ id: e.id,
698
+ pattern: n.needPattern(),
699
+ list: n.hasOptions()
700
+ }, t.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Qe), [
701
+ [P, n.inputVal]
703
702
  ]),
704
- a("output", De, k(t.value ? e.vale : "#000000"), 1)
705
- ])) : p("", !0),
706
- t.type == "select" ? N((l(), c("select", T({
703
+ o("output", Ye, L(e.value ? t.vale : "#000000"), 1)
704
+ ])) : _("", !0),
705
+ e.type == "select" ? N((c(), d("select", H({
707
706
  key: 7,
708
- "onUpdate:modelValue": r[5] || (r[5] = (i) => s.inputVal = i),
709
- class: `form-select${t.size ? ` form-select-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
710
- type: t.type,
711
- name: t.id,
712
- id: t.id,
713
- pattern: s.needPattern()
714
- }, e.$attrs), [
715
- (l(!0), c(x, null, L(t.options, (i, n) => (l(), c("option", {
716
- key: n,
707
+ "onUpdate:modelValue": a[5] || (a[5] = (i) => n.inputVal = i),
708
+ class: `form-select${e.size ? ` form-select-${e.size}` : ""}${e.inputclass ? ` ${e.inputclass}` : ""}`,
709
+ type: e.type,
710
+ name: e.id,
711
+ id: e.id,
712
+ pattern: n.needPattern()
713
+ }, t.$attrs), [
714
+ (c(!0), d($, null, T(e.options, (i, l) => (c(), d("option", {
715
+ key: l,
717
716
  value: i.value
718
- }, k(i.display ? i.display : i.value), 9, ze))), 128))
719
- ], 16, Ie)), [
720
- [ee, s.inputVal]
721
- ]) : p("", !0),
722
- s.allowDatalist() ? (l(), c("datalist", {
717
+ }, L(i.display ? i.display : i.value), 9, Xe))), 128))
718
+ ], 16, Ze)), [
719
+ [ie, n.inputVal]
720
+ ]) : _("", !0),
721
+ n.allowDatalist() ? (c(), d("datalist", {
723
722
  key: 8,
724
- id: t.id + "-list"
723
+ id: e.id + "-list"
725
724
  }, [
726
- (l(!0), c(x, null, L(t.options, (i, n) => (l(), c("option", {
727
- key: n,
725
+ (c(!0), d($, null, T(e.options, (i, l) => (c(), d("option", {
726
+ key: l,
728
727
  value: i.value
729
- }, k(i.value), 9, Fe))), 128))
730
- ], 8, Ve)) : p("", !0),
731
- t.type == "checkbox" || t.type == "radio" ? (l(), c("input", T({
728
+ }, L(i.value), 9, et))), 128))
729
+ ], 8, Je)) : _("", !0),
730
+ e.type == "checkbox" || e.type == "radio" ? (c(), d("input", H({
732
731
  key: 9,
733
732
  class: "form-check-input",
734
- type: t.type,
735
- name: t.name ? t.name : t.id,
736
- id: t.id
737
- }, e.$attrs), null, 16, Oe)) : p("", !0),
738
- t.type == "checkbox" || t.type == "radio" ? (l(), c("label", {
733
+ type: e.type,
734
+ name: e.name ? e.name : e.id,
735
+ id: e.id
736
+ }, t.$attrs), null, 16, tt)) : _("", !0),
737
+ e.type == "checkbox" || e.type == "radio" ? (c(), d("label", {
739
738
  key: 10,
740
- class: v(`form-label form-check-label${t.labelclass ? ` ${t.labelclass}` : ""}`),
741
- for: t.id,
742
- innerHTML: t.label
743
- }, null, 10, je)) : p("", !0),
744
- t.type == "checkbox-btn" || t.type == "radio-btn" ? (l(), c("input", T({
739
+ class: v(`form-label form-check-label${e.labelclass ? ` ${e.labelclass}` : ""}`),
740
+ for: e.id,
741
+ innerHTML: e.label
742
+ }, null, 10, at)) : _("", !0),
743
+ e.type == "checkbox-btn" || e.type == "radio-btn" ? (c(), d("input", H({
745
744
  key: 11,
746
- class: `btn-check${t.inputclass ? ` ${t.inputclass}` : ""}`,
747
- type: t.type.replace("-btn", ""),
745
+ class: `btn-check${e.inputclass ? ` ${e.inputclass}` : ""}`,
746
+ type: e.type.replace("-btn", ""),
748
747
  autocomplete: "off",
749
- name: t.name ? t.name : t.id,
750
- id: t.id
751
- }, e.$attrs), null, 16, Re)) : p("", !0),
752
- t.type == "checkbox-btn" || t.type == "radio-btn" ? (l(), c("label", {
748
+ name: e.name ? e.name : e.id,
749
+ id: e.id
750
+ }, t.$attrs), null, 16, st)) : _("", !0),
751
+ e.type == "checkbox-btn" || e.type == "radio-btn" ? (c(), d("label", {
753
752
  key: 12,
754
- class: v(`btn${t.labelclass ? ` ${t.labelclass}` : ""}`),
755
- for: t.id,
756
- innerHTML: t.label,
757
- onClick: r[6] || (r[6] = (...i) => s.clickEvent && s.clickEvent(...i))
758
- }, null, 10, We)) : p("", !0),
759
- t.errormsg ? (l(), c("p", {
753
+ class: v(`btn${e.labelclass ? ` ${e.labelclass}` : ""}`),
754
+ for: e.id,
755
+ innerHTML: e.label,
756
+ onClick: a[6] || (a[6] = (...i) => n.clickEvent && n.clickEvent(...i))
757
+ }, null, 10, it)) : _("", !0),
758
+ e.errormsg ? (c(), d("p", {
760
759
  key: 13,
761
760
  class: "invalid-feedback mb-0",
762
- innerHTML: t.errormsg
763
- }, null, 8, Ke)) : p("", !0),
764
- b(e.$slots, "default")
761
+ innerHTML: e.errormsg
762
+ }, null, 8, lt)) : _("", !0),
763
+ p(t.$slots, "default")
765
764
  ], 2);
766
765
  }
767
- const D = /* @__PURE__ */ g($e, [["render", Ue]]), Ge = {
766
+ const R = /* @__PURE__ */ A(Fe, [["render", nt]]), rt = {
768
767
  components: {
769
- Input: D
768
+ Input: R
770
769
  },
771
770
  name: "FileUploads",
772
771
  props: {
@@ -787,95 +786,100 @@ const D = /* @__PURE__ */ g($e, [["render", Ue]]), Ge = {
787
786
  required: !1
788
787
  }
789
788
  }
790
- }, Ze = { class: "multiple-file-uploads mb-4" }, Ee = { class: "row" }, Qe = { class: "col-12 col-md me-auto" }, Ye = /* @__PURE__ */ a("div", { class: "col mw-fit-content" }, [
791
- /* @__PURE__ */ a("button", {
789
+ }, ot = { class: "multiple-file-uploads mb-4" }, ct = { class: "row" }, dt = { class: "col-12 col-md me-auto" }, ut = /* @__PURE__ */ o("div", { class: "col mw-fit-content" }, [
790
+ /* @__PURE__ */ o("button", {
792
791
  type: "button",
793
792
  class: "btn btn-tertiary me-0",
794
793
  "data-delete": ""
795
794
  }, "Delete")
796
- ], -1), Je = ["data-maxfiles"];
797
- function Xe(e, r, t, o, f, s) {
798
- const i = H("Input");
799
- return l(), c("div", Ze, [
800
- a("div", Ee, [
801
- a("div", {
802
- class: v(`${t.inputcolclass ? t.inputcolclass : "col-12 col-sm-4"}`)
795
+ ], -1), ht = ["data-maxfiles"];
796
+ function mt(t, a, e, s, r, n) {
797
+ const i = E("Input");
798
+ return c(), d("div", ot, [
799
+ o("div", ct, [
800
+ o("div", {
801
+ class: v(`${e.inputcolclass ? e.inputcolclass : "col-12 col-sm-4"}`)
803
802
  }, [
804
803
  S(i, {
805
804
  type: "file",
806
- id: t.id,
807
- name: `${t.id}[]`,
805
+ id: e.id,
806
+ name: `${e.id}[]`,
808
807
  label: "Add new file",
809
808
  labelclass: "d-none",
810
809
  class: "form-control-inline col",
811
810
  required: "",
812
- "data-filesize": t.maxfilesize
811
+ "data-filesize": e.maxfilesize
813
812
  }, null, 8, ["id", "name", "data-filesize"])
814
813
  ], 2),
815
- a("div", Qe, [
816
- b(e.$slots, "default")
814
+ o("div", dt, [
815
+ p(t.$slots, "default")
817
816
  ]),
818
- Ye
817
+ ut
819
818
  ]),
820
- a("button", {
819
+ o("button", {
821
820
  type: "button",
822
821
  class: "btn btn-secondary me-0",
823
822
  "data-add": "",
824
- "data-maxfiles": t.maxfiles
825
- }, "+ Add file", 8, Je)
823
+ "data-maxfiles": e.maxfiles
824
+ }, "+ Add file", 8, ht)
826
825
  ]);
827
826
  }
828
- const di = /* @__PURE__ */ g(Ge, [["render", Xe]]);
829
- function et(e) {
830
- let r = e.querySelectorAll("details"), t = e.querySelectorAll("summary");
831
- if (r.forEach((o) => {
832
- o.classList.add("accordion-item");
833
- }), t.forEach((o) => {
834
- o.classList.add("accordion-header"), o.classList.add("accordion-button"), o.classList.add("h4");
835
- }), !e.classList.contains("accordion--keep-open")) {
836
- const o = e.querySelectorAll(":scope > details");
837
- o.forEach((f) => {
838
- f.addEventListener("click", () => {
839
- o.forEach((s) => {
840
- s !== f && s.removeAttribute("open");
827
+ const oi = /* @__PURE__ */ A(rt, [["render", mt]]);
828
+ function ft(t) {
829
+ let a = t.querySelectorAll("details"), e = t.querySelectorAll("summary");
830
+ if (a.forEach((s) => {
831
+ s.classList.add("accordion-item");
832
+ }), e.forEach((s) => {
833
+ s.classList.add("accordion-header"), s.classList.add("accordion-button"), s.classList.add("h4");
834
+ }), !t.classList.contains("accordion--keep-open")) {
835
+ const s = t.querySelectorAll(":scope > details");
836
+ s.forEach((r) => {
837
+ r.addEventListener("click", () => {
838
+ s.forEach((n) => {
839
+ n !== r && n.removeAttribute("open");
841
840
  });
842
841
  });
843
842
  });
844
843
  }
845
844
  }
846
- const O = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets";
847
- class tt extends HTMLElement {
845
+ window.dataLayer = window.dataLayer || [];
846
+ window.dataLayer.push({
847
+ event: "customElementRegistered",
848
+ element: "accordion"
849
+ });
850
+ const I = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets";
851
+ class yt extends HTMLElement {
848
852
  constructor() {
849
853
  super(), this.attachShadow({ mode: "open" });
850
- const r = document.createElement("template");
851
- r.innerHTML = `
854
+ const a = document.createElement("template");
855
+ a.innerHTML = `
852
856
  <style>
853
- @import "${O}/css/core.min.css";
854
- @import "${O}/css/components/accordion.css";
857
+ @import "${I}/css/core.min.css";
858
+ @import "${I}/css/components/accordion.css";
855
859
  ${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
856
860
  </style>
857
861
  <div class="accordion">
858
862
  <slot></slot>
859
863
  </div>
860
- `, this.shadowRoot.appendChild(r.content.cloneNode(!0));
864
+ `, this.shadowRoot.appendChild(a.content.cloneNode(!0));
861
865
  }
862
866
  connectedCallback() {
863
- et(this), this.insertAdjacentHTML("beforebegin", `<link rel="stylesheet" href="${O}/css/components/accordion.css">`);
867
+ ft(this), this.insertAdjacentHTML("beforebegin", `<link rel="stylesheet" href="${I}/css/components/accordion.css">`);
864
868
  }
865
869
  }
866
- window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", tt);
867
- const st = {
870
+ window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", yt);
871
+ const bt = {
868
872
  name: "Accordion",
869
873
  props: {},
870
874
  mounted() {
871
875
  }
872
- }, at = { ref: "wrapper" };
873
- function it(e, r, t, o, f, s) {
874
- return l(), c("iam-accordion", at, [
875
- b(e.$slots, "default")
876
+ }, _t = { ref: "wrapper" };
877
+ function pt(t, a, e, s, r, n) {
878
+ return c(), d("iam-accordion", _t, [
879
+ p(t.$slots, "default")
876
880
  ], 512);
877
881
  }
878
- const ui = /* @__PURE__ */ g(st, [["render", it]]), nt = {
882
+ const ci = /* @__PURE__ */ A(bt, [["render", pt]]), gt = {
879
883
  name: "AccordionItem",
880
884
  props: {
881
885
  title: {
@@ -902,7 +906,7 @@ const ui = /* @__PURE__ */ g(st, [["render", it]]), nt = {
902
906
  },
903
907
  computed: {
904
908
  createID() {
905
- return (e) => `${me(e)}`;
909
+ return (t) => `${Me(t)}`;
906
910
  }
907
911
  },
908
912
  data() {
@@ -910,24 +914,24 @@ const ui = /* @__PURE__ */ g(st, [["render", it]]), nt = {
910
914
  show: !this.lazy
911
915
  };
912
916
  }
913
- }, rt = ["id"], ot = ["classList"];
914
- function lt(e, r, t, o, f, s) {
915
- return l(), c("details", {
916
- id: s.createID(t.title)
917
+ }, vt = ["id"], At = ["classList"];
918
+ function wt(t, a, e, s, r, n) {
919
+ return c(), d("details", {
920
+ id: n.createID(e.title)
917
921
  }, [
918
- a("summary", {
919
- classList: `${t.titlecolour ? `bg-${t.titlecolour}` : ""}`
922
+ o("summary", {
923
+ classList: `${e.titlecolour ? `bg-${e.titlecolour}` : ""}`
920
924
  }, [
921
- j(k(t.title), 1),
922
- t.badge ? (l(), c("span", {
925
+ le(L(e.title), 1),
926
+ e.badge ? (c(), d("span", {
923
927
  key: 0,
924
- class: v(`badge bg-${t.badgecolour}`)
925
- }, k(t.badge), 3)) : p("", !0)
926
- ], 8, ot),
927
- b(e.$slots, "default")
928
- ], 8, rt);
928
+ class: v(`badge bg-${e.badgecolour}`)
929
+ }, L(e.badge), 3)) : _("", !0)
930
+ ], 8, At),
931
+ p(t.$slots, "default")
932
+ ], 8, vt);
929
933
  }
930
- const fi = /* @__PURE__ */ g(nt, [["render", lt]]), ct = {
934
+ const di = /* @__PURE__ */ A(gt, [["render", wt]]), St = {
931
935
  name: "Header",
932
936
  props: {
933
937
  title: {
@@ -944,181 +948,150 @@ const fi = /* @__PURE__ */ g(nt, [["render", lt]]), ct = {
944
948
  required: !1
945
949
  }
946
950
  }
947
- }, dt = { class: "container" }, ut = { class: "row" }, ft = { class: "col-sm-6" }, ht = { class: "pt-5 pb-3 px-4" }, mt = { class: "col-sm-6 col-md-5 ms-auto" }, _t = ["src"];
948
- function yt(e, r, t, o, f, s) {
949
- return l(), c("div", dt, [
950
- a("div", {
951
- class: v("bg-" + t.background + " mb-4")
951
+ }, Lt = { class: "container" }, kt = { class: "row" }, xt = { class: "col-sm-6" }, qt = { class: "pt-5 pb-3 px-4" }, $t = { class: "col-sm-6 col-md-5 ms-auto" }, Tt = ["src"];
952
+ function Ht(t, a, e, s, r, n) {
953
+ return c(), d("div", Lt, [
954
+ o("div", {
955
+ class: v("bg-" + e.background + " mb-4")
952
956
  }, [
953
- a("div", ut, [
954
- a("div", ft, [
955
- a("div", ht, [
956
- a("h2", null, k(t.title), 1),
957
- b(e.$slots, "default")
957
+ o("div", kt, [
958
+ o("div", xt, [
959
+ o("div", qt, [
960
+ o("h2", null, L(e.title), 1),
961
+ p(t.$slots, "default")
958
962
  ])
959
963
  ]),
960
- a("div", mt, [
961
- t.image ? (l(), c("img", {
964
+ o("div", $t, [
965
+ e.image ? (c(), d("img", {
962
966
  key: 0,
963
- src: t.image,
967
+ src: e.image,
964
968
  alt: "",
965
969
  class: "h-100 w-100 object-cover"
966
- }, null, 8, _t)) : p("", !0)
970
+ }, null, 8, Tt)) : _("", !0)
967
971
  ])
968
972
  ])
969
973
  ], 2)
970
974
  ]);
971
975
  }
972
- const hi = /* @__PURE__ */ g(ct, [["render", yt]]);
973
- const pt = {
974
- name: "Card",
975
- props: {
976
- link: {
977
- type: String,
978
- required: !1
979
- },
980
- cardClass: {
981
- type: String,
982
- required: !1,
983
- default: ""
984
- },
985
- titleclass: {
986
- type: String,
987
- required: !1,
988
- default: "h4"
989
- },
990
- title: {
991
- type: String,
992
- required: !1
993
- },
994
- subtitle: {
995
- type: String,
996
- required: !1
997
- },
998
- content: {
999
- type: String,
1000
- required: !1
1001
- },
1002
- type: {
1003
- type: String,
1004
- required: !1
1005
- },
1006
- btntype: {
1007
- type: String,
1008
- required: !1,
1009
- default: "secondary"
1010
- },
1011
- ctatext: {
1012
- type: String,
1013
- required: !1,
1014
- default: "Find out more"
1015
- },
1016
- hidectatext: {
1017
- type: Boolean,
1018
- required: !1,
1019
- default: !1
1020
- },
1021
- image: {
1022
- type: String,
1023
- required: !1
1024
- },
1025
- target: {
1026
- type: String,
1027
- required: !1
1028
- },
1029
- details: {
1030
- type: Object,
1031
- required: !1
1032
- }
1033
- },
1034
- computed: {
1035
- cardStatus() {
1036
- return () => this.details && this.details.status ? `${this.details.status == "Live now" ? '<span class="text-danger lh-0 fs-1 align-middle">&#8226;</span>&nbsp;&nbsp;' : ""}${this.details.status}` : "";
1037
- },
1038
- cardMedia() {
1039
- return () => `<svg xmlns='http://www.w3.org/2000/svg' width='30' height='28' viewBox='0 0 30 28' class="icon text-white"><title>Images </title><path d='M15 10.5c2.484 0 4.5 2.016 4.5 4.5s-2.016 4.5-4.5 4.5-4.5-2.016-4.5-4.5 2.016-4.5 4.5-4.5zM26 4c2.203 0 4 1.797 4 4v14c0 2.203-1.797 4-4 4h-22c-2.203 0-4-1.797-4-4v-14c0-2.203 1.797-4 4-4h3.5l0.797-2.125c0.391-1.031 1.609-1.875 2.703-1.875h8c1.094 0 2.312 0.844 2.703 1.875l0.797 2.125h3.5zM15 22c3.859 0 7-3.141 7-7s-3.141-7-7-7-7 3.141-7 7 3.141 7 7 7z'></path></svg> ${this.details && this.details.images ? `${this.details.images}` : "0"}&nbsp;&nbsp;|&nbsp;&nbsp;<svg xmlns='http://www.w3.org/2000/svg' width='30' height='28' viewBox='0 0 28 28' class="icon text-white ms-0"><title>Videos </title><path d="M11.109 17.625l7.562-3.906-7.562-3.953v7.859zM14 4.156c5.891 0 9.797 0.281 9.797 0.281 0.547 0.063 1.75 0.063 2.812 1.188 0 0 0.859 0.844 1.109 2.781 0.297 2.266 0.281 4.531 0.281 4.531v2.125s0.016 2.266-0.281 4.531c-0.25 1.922-1.109 2.781-1.109 2.781-1.062 1.109-2.266 1.109-2.812 1.172 0 0-3.906 0.297-9.797 0.297v0c-7.281-0.063-9.516-0.281-9.516-0.281-0.625-0.109-2.031-0.078-3.094-1.188 0 0-0.859-0.859-1.109-2.781-0.297-2.266-0.281-4.531-0.281-4.531v-2.125s-0.016-2.266 0.281-4.531c0.25-1.937 1.109-2.781 1.109-2.781 1.062-1.125 2.266-1.125 2.812-1.188 0 0 3.906-0.281 9.797-0.281v0z"></path></svg> ${this.details && this.details.videos ? `${this.details.videos}` : "0"}`;
1040
- },
1041
- cardContent() {
1042
- return () => {
1043
- const e = function(f) {
1044
- switch (f) {
1045
- case "Modern method":
1046
- return "bg-secondary text-primary";
1047
- case "Freehold":
1048
- return "bg-light text-dark";
1049
- default:
1050
- return "bg-body text-white";
1051
- }
1052
- }, r = this.details && this.details.tags ? this.details.tags.map((f) => `<span class="badge rounded-pill py-2 px-3 mb-3 me-2 ${e(f)}">${f}</span>`).join("") : "", t = this.title ? `<span class="card-title d-block ${this.titleclass}">${this.title}${this.subtitle ? ` <span class="d-block fw-normal font-body text-body small">${this.subtitle}</span>` : ""}</span>` : "", o = `
1053
- ${this.details && this.details.guideprice ? `<span class="d-block h6 text-dark mb-1">Price guide: ${this.details.guideprice}</span>` : ""}
1054
- ${this.details && this.details.auctiontime ? `<span class="d-block h6 text-primary mb-4">Auction time left: ${this.details.auctiontime}</span>` : ""}
1055
- ${this.details && this.details.readtime ? `<span class="d-block h6 text-primary mb-4"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22" height="23" viewBox="0 0 22 23" class="icon ms-0 me-2"><path d="M11 1.63c-5.176 0-9.37 4.194-9.37 9.37 0 5.176 4.194 9.37 9.37 9.37 5.176 0 9.37-4.194 9.37-9.37 0-5.176-4.194-9.37-9.37-9.37M11 0c6.075 0 11 4.925 11 11s-4.925 11-11 11S0 17.075 0 11 4.925 0 11 0" fill="var(--colour-secondary)" /><path d="M9.62 5.39c0-.473.368-.856.82-.856.454 0 .822.383.822.855v6.27l3.25 1.898c.395.23.536.75.314 1.16-.22.412-.72.558-1.115.328l-4.09-2.39V5.39z" fill="var(--colour-primary)"/></svg>${this.details.readtime}</span>` : ""}
1056
- `;
1057
- return `${r}${t}${o}${this.content}`;
1058
- };
976
+ const ui = /* @__PURE__ */ A(St, [["render", Ht]]);
977
+ class Ct extends HTMLElement {
978
+ constructor() {
979
+ super(), this.attachShadow({ mode: "open" });
980
+ const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", e = `@import "${a}/css/components/card.css";`;
981
+ this.querySelector(".icon") && this.classList.add("card--has-icon");
982
+ let s = this.classList.toString();
983
+ const r = document.createElement("template");
984
+ r.innerHTML = `
985
+ <style>
986
+ @import "${a}/css/core.min.css";
987
+ ${e}
988
+ ${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
989
+ </style>
990
+ <div class="card ${s}" tabindex="0" role="button">
991
+ ${this.hasAttribute("data-image") ? `<div class="card__head"><img src="${this.getAttribute("data-image")}" alt="" loading="lazy" /></div>` : ""}
992
+ <div class="card__body">
993
+ ${this.classList.contains("card--filter") && this.hasAttribute("data-total") ? `<div class="card__total">${this.getAttribute("data-total")}</div>` : ""}
994
+ ${this.hasAttribute("data-illustration") ? `<div class="card__illustration"><img src="${this.getAttribute("data-illustration")}" alt="" loading="lazy" /></div>` : ""}
995
+ <slot></slot>
996
+ </div>
997
+ ${this.hasAttribute("data-cta") ? `<div class="card__footer"><span class="link">${this.getAttribute("data-cta")}</span></div>` : ""}
998
+ </div>
999
+ `, this.shadowRoot.appendChild(r.content.cloneNode(!0));
1000
+ }
1001
+ connectedCallback() {
1002
+ const a = this.parentNode.closest("a, button, label"), e = this.shadowRoot.querySelector(".card");
1003
+ a.setAttribute("tabindex", "-1"), a.matches("label[for]") && document.getElementById(a.getAttribute("for")).checked && e.classList.add("active"), e.addEventListener("click", (s) => {
1004
+ a.matches("label[for]") ? document.getElementById(a.getAttribute("for")).checked ? e.classList.remove("active") : e.classList.add("active") : a.click();
1005
+ }), e.addEventListener("keydown", (s) => {
1006
+ switch (s.keyCode) {
1007
+ case 32:
1008
+ case 13:
1009
+ a.matches("label[for]") ? document.getElementById(a.getAttribute("for")).checked ? e.classList.remove("active") : e.classList.add("active") : a.click();
1010
+ break;
1011
+ }
1012
+ });
1013
+ }
1014
+ static get observedAttributes() {
1015
+ return ["data-total", "class"];
1016
+ }
1017
+ attributeChangedCallback(a, e, s) {
1018
+ switch (a) {
1019
+ case "data-total": {
1020
+ this.shadowRoot.querySelector(".card__total").innerHTML = s;
1021
+ break;
1022
+ }
1023
+ case "class": {
1024
+ let r = this.classList.toString();
1025
+ this.querySelector(".icon") && (r += " card--has-icon"), this.shadowRoot.querySelector(".card").setAttribute("class", `card ${r}`);
1026
+ break;
1027
+ }
1059
1028
  }
1060
1029
  }
1061
- }, bt = ["href", "title", "target"], vt = {
1062
- key: 0,
1063
- class: "card-header__wrapper"
1064
- }, gt = ["src"], At = { class: "card-header" }, wt = ["innerHTML"], kt = ["innerHTML"], St = ["src"], $t = ["innerHTML"], qt = {
1065
- key: 1,
1066
- class: "card-footer"
1067
- }, xt = { class: "visually-hidden" };
1068
- function Lt(e, r, t, o, f, s) {
1069
- return l(), c("a", {
1070
- href: t.link,
1071
- class: v("card" + (t.type ? " card--" + t.type : "") + " " + t.cardClass),
1072
- title: t.ctatext + ": " + t.title + (t.subtitle ? " - " + t.subtitle : ""),
1073
- target: t.target
1074
- }, [
1075
- t.image ? (l(), c("div", vt, [
1076
- a("img", {
1077
- src: t.image,
1078
- alt: "",
1079
- loading: "lazy",
1080
- class: "card-image"
1081
- }, null, 8, gt),
1082
- a("div", At, [
1083
- this.details && this.details.status ? (l(), c("span", {
1084
- key: 0,
1085
- class: "badge bg-primary p-2 me-2",
1086
- innerHTML: s.cardStatus()
1087
- }, null, 8, wt)) : p("", !0),
1088
- this.details && (this.details.images || this.details.videos) ? (l(), c("span", {
1089
- key: 1,
1090
- class: "badge bg-black bg-opacity-50 p-2 align-self-end",
1091
- innerHTML: s.cardMedia()
1092
- }, null, 8, kt)) : p("", !0)
1093
- ]),
1094
- t.details && t.details.logo ? (l(), c("img", {
1095
- key: 0,
1096
- src: t.details.logo,
1097
- alt: "",
1098
- loading: "lazy",
1099
- class: "card-logo"
1100
- }, null, 8, St)) : p("", !0)
1101
- ])) : p("", !0),
1102
- a("div", {
1103
- class: "card-body",
1104
- innerHTML: s.cardContent()
1105
- }, null, 8, $t),
1106
- t.hidectatext == !1 ? (l(), c("div", qt, [
1107
- a("span", {
1108
- class: v(`${t.btntype == "link" ? "link" : `btn btn-${t.btntype}`} mb-0`)
1109
- }, [
1110
- j(k(t.ctatext), 1),
1111
- a("span", xt, ": " + k(t.title), 1)
1112
- ], 2)
1113
- ])) : p("", !0)
1114
- ], 10, bt);
1115
1030
  }
1116
- const Q = /* @__PURE__ */ g(pt, [["render", Lt]]);
1117
- const Tt = {
1031
+ const Mt = {
1032
+ name: "Card",
1033
+ created() {
1034
+ this.$nextTick(function() {
1035
+ window.customElements.get("iam-card") || window.customElements.define("iam-card", Ct);
1036
+ });
1037
+ }
1038
+ };
1039
+ function Et(t, a, e, s, r, n) {
1040
+ return c(), d("iam-card", null, [
1041
+ p(t.$slots, "default")
1042
+ ]);
1043
+ }
1044
+ const Nt = /* @__PURE__ */ A(Mt, [["render", Et]]);
1045
+ function Dt(t) {
1046
+ var a;
1047
+ let e = t.querySelector(".carousel__inner"), s = t.querySelectorAll(".carousel__item").length;
1048
+ t.getAttribute("data-cols");
1049
+ let r = t.getAttribute("data-sm-cols"), n = t.getAttribute("data-md-cols");
1050
+ t.querySelector(".carousel__controls a").classList.add("active"), e.addEventListener("scroll", function(i) {
1051
+ clearTimeout(a), a = setTimeout(function() {
1052
+ let l = e.clientWidth, h = e.scrollWidth, u = e.scrollLeft, m = Math.round(u / h * s) + 1, f = t.querySelector(".carousel__item:last-child").offsetLeft;
1053
+ Array.from(t.querySelectorAll(".carousel__controls a")).forEach((b, g) => {
1054
+ b.classList.remove("active");
1055
+ }), t.querySelector(".control-" + m).classList.add("active"), m == 1 ? t.querySelector(".btn-prev").setAttribute("disabled", "disabled") : t.querySelector(".btn-prev").removeAttribute("disabled"), e.scrollLeft + l > f ? t.querySelector(".btn-next").setAttribute("disabled", "disabled") : t.querySelector(".btn-next").removeAttribute("disabled");
1056
+ }, 100);
1057
+ }, !1), t.addEventListener("click", function(i) {
1058
+ for (var l = i.target; l && l != this; l = l.parentNode)
1059
+ if (l.matches(".carousel__controls a")) {
1060
+ i.preventDefault(), Array.from(t.querySelectorAll(".carousel__controls a")).forEach((u, m) => {
1061
+ u.classList.remove("active");
1062
+ }), l.classList.add("active");
1063
+ const h = document.querySelector(l.getAttribute("href"));
1064
+ e.scroll({
1065
+ top: 0,
1066
+ left: h.offsetLeft,
1067
+ behavior: "smooth"
1068
+ });
1069
+ break;
1070
+ }
1071
+ }, !1), t.addEventListener("click", function(i) {
1072
+ for (var l = i.target; l && l != this; l = l.parentNode)
1073
+ if (l.matches(".btn-next, .btn-prev")) {
1074
+ i.preventDefault();
1075
+ let h = l.classList.contains("btn-prev") ? e.scrollLeft - e.clientWidth : e.scrollLeft + e.clientWidth;
1076
+ e.scroll({
1077
+ top: 0,
1078
+ left: h,
1079
+ behavior: "smooth"
1080
+ });
1081
+ break;
1082
+ }
1083
+ }, !1), s == 1 && t.classList.add("hide-btns"), r >= s && t.classList.add("hide-sm-btns"), n >= s && t.classList.add("hide-md-btns");
1084
+ }
1085
+ const Rt = {
1118
1086
  components: {
1119
- Card: Q
1087
+ Card: Nt
1088
+ },
1089
+ name: "Carousel",
1090
+ data() {
1091
+ return {
1092
+ id: null
1093
+ };
1120
1094
  },
1121
- name: "CardDeck",
1122
1095
  props: {
1123
1096
  items: {
1124
1097
  type: Array,
@@ -1168,94 +1141,7 @@ const Tt = {
1168
1141
  type: Boolean,
1169
1142
  required: !1,
1170
1143
  default: !1
1171
- }
1172
- }
1173
- }, Mt = ["data-card-type"];
1174
- function Ht(e, r, t, o, f, s) {
1175
- const i = H("Card");
1176
- return l(), c("div", {
1177
- class: "container card-deck prevent-invert",
1178
- "data-card-type": t.cardtype
1179
- }, [
1180
- b(e.$slots, "default"),
1181
- a("div", {
1182
- class: v(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap ? `g-${t.gap}` : ""}`)
1183
- }, [
1184
- (l(!0), c(x, null, L(t.items, (n, h) => (l(), c("div", {
1185
- class: "col",
1186
- key: h
1187
- }, [
1188
- S(i, T(n, {
1189
- class: t.cardclass,
1190
- type: t.cardtype,
1191
- btntype: n.btntype ? n.btntype : t.btntype,
1192
- titleclass: n.titleclass ? n.titleclass : t.titleclass,
1193
- ctatext: n.ctatext,
1194
- hidectatext: t.hidectatext
1195
- }), null, 16, ["class", "type", "btntype", "titleclass", "ctatext", "hidectatext"])
1196
- ]))), 128))
1197
- ], 2),
1198
- b(e.$slots, "after")
1199
- ], 8, Mt);
1200
- }
1201
- const Ct = /* @__PURE__ */ g(Tt, [["render", Ht]]);
1202
- function Nt(e) {
1203
- var r;
1204
- let t = e.querySelector(".carousel__inner"), o = e.querySelectorAll(".carousel__item").length;
1205
- e.getAttribute("data-cols");
1206
- let f = e.getAttribute("data-sm-cols"), s = e.getAttribute("data-md-cols");
1207
- e.querySelector(".carousel__controls a").classList.add("active"), t.addEventListener("scroll", function(i) {
1208
- clearTimeout(r), r = setTimeout(function() {
1209
- let n = t.clientWidth, h = t.scrollWidth, w = t.scrollLeft, $ = Math.round(w / h * o) + 1, M = e.querySelector(".carousel__item:last-child").offsetLeft;
1210
- Array.from(e.querySelectorAll(".carousel__controls a")).forEach((I, C) => {
1211
- I.classList.remove("active");
1212
- }), e.querySelector(".control-" + $).classList.add("active"), $ == 1 ? e.querySelector(".btn-prev").setAttribute("disabled", "disabled") : e.querySelector(".btn-prev").removeAttribute("disabled"), t.scrollLeft + n > M ? e.querySelector(".btn-next").setAttribute("disabled", "disabled") : e.querySelector(".btn-next").removeAttribute("disabled");
1213
- }, 100);
1214
- }, !1), e.addEventListener("click", function(i) {
1215
- for (var n = i.target; n && n != this; n = n.parentNode)
1216
- if (n.matches(".carousel__controls a")) {
1217
- i.preventDefault(), Array.from(e.querySelectorAll(".carousel__controls a")).forEach((w, $) => {
1218
- w.classList.remove("active");
1219
- }), n.classList.add("active");
1220
- const h = document.querySelector(n.getAttribute("href"));
1221
- t.scroll({
1222
- top: 0,
1223
- left: h.offsetLeft,
1224
- behavior: "smooth"
1225
- });
1226
- break;
1227
- }
1228
- }, !1), e.addEventListener("click", function(i) {
1229
- for (var n = i.target; n && n != this; n = n.parentNode)
1230
- if (n.matches(".btn-next, .btn-prev")) {
1231
- i.preventDefault();
1232
- let h = n.classList.contains("btn-prev") ? t.scrollLeft - t.clientWidth : t.scrollLeft + t.clientWidth;
1233
- t.scroll({
1234
- top: 0,
1235
- left: h,
1236
- behavior: "smooth"
1237
- });
1238
- break;
1239
- }
1240
- }, !1), o == 1 && e.classList.add("hide-btns"), f >= o && e.classList.add("hide-sm-btns"), s >= o && e.classList.add("hide-md-btns");
1241
- }
1242
- let P = Ct.props;
1243
- P.gap.default = 0;
1244
- P.cols.default = 1;
1245
- P.smcols.default = 2;
1246
- P.mdcols.default = 4;
1247
- const Bt = {
1248
- components: {
1249
- Card: Q
1250
- },
1251
- name: "Carousel",
1252
- data() {
1253
- return {
1254
- id: null
1255
- };
1256
- },
1257
- props: {
1258
- ...P,
1144
+ },
1259
1145
  colclass: {
1260
1146
  type: String,
1261
1147
  required: !1
@@ -1267,45 +1153,45 @@ const Bt = {
1267
1153
  },
1268
1154
  computed: {
1269
1155
  content() {
1270
- return (e) => `${e.image ? `<img src="${e.image}" alt="" />` : ""}${e.content ? e.content : ""}`;
1156
+ return (t) => `${t.image ? `<img src="${t.image}" alt="" />` : ""}${t.content ? t.content : ""}`;
1271
1157
  }
1272
1158
  },
1273
1159
  mounted() {
1274
1160
  this.id = this._uid, this.$nextTick(function() {
1275
- Nt(this.$refs.wrapper);
1161
+ Dt(this.$refs.wrapper);
1276
1162
  });
1277
1163
  }
1278
- }, Pt = ["id", "data-cols", "data-sm-cols", "data-md-cols"], Dt = { class: "carousel__wrapper" }, It = { class: "carousel__inner" }, zt = ["id"], Vt = ["innerHTML", "id"], Ft = ["href"], Ot = /* @__PURE__ */ a("button", {
1164
+ }, Pt = ["id", "data-cols", "data-sm-cols", "data-md-cols"], It = { class: "carousel__wrapper" }, Ft = { class: "carousel__inner" }, Bt = ["id"], Vt = ["innerHTML", "id"], zt = ["href"], Wt = /* @__PURE__ */ o("button", {
1279
1165
  class: "btn btn-prev",
1280
1166
  "data-go": "0",
1281
1167
  disabled: ""
1282
- }, "Prev", -1), jt = /* @__PURE__ */ a("button", {
1168
+ }, "Prev", -1), Ot = /* @__PURE__ */ o("button", {
1283
1169
  class: "btn btn-next",
1284
1170
  "data-go": "2"
1285
1171
  }, "Next", -1);
1286
- function Rt(e, r, t, o, f, s) {
1287
- const i = H("Card");
1288
- return l(), c("div", {
1172
+ function jt(t, a, e, s, r, n) {
1173
+ const i = E("Card");
1174
+ return c(), d("div", {
1289
1175
  class: "container carousel",
1290
- id: "carousel" + f.id,
1176
+ id: "carousel" + r.id,
1291
1177
  ref: "wrapper",
1292
1178
  "data-cols": e.cols,
1293
1179
  "data-sm-cols": e.smcols,
1294
1180
  "data-md-cols": e.mdcols
1295
1181
  }, [
1296
- b(e.$slots, "default"),
1297
- a("div", Dt, [
1298
- a("div", It, [
1299
- t.type == "card" ? (l(), c("div", {
1182
+ p(t.$slots, "default"),
1183
+ o("div", It, [
1184
+ o("div", Ft, [
1185
+ e.type == "card" ? (c(), d("div", {
1300
1186
  key: 0,
1301
1187
  class: v(`row row-cols-${e.cols} row-cols-sm-${e.smcols} row-cols-md-${e.mdcols} ${e.gap ? `g-${e.gap}` : ""}`)
1302
1188
  }, [
1303
- (l(!0), c(x, null, L(e.items, (n, h) => (l(), c("div", {
1304
- class: v(`col carousel__item${t.colclass ? ` ${t.colclass}` : ""}`),
1189
+ (c(!0), d($, null, T(e.items, (l, h) => (c(), d("div", {
1190
+ class: v(`col carousel__item${e.colclass ? ` ${e.colclass}` : ""}`),
1305
1191
  key: h,
1306
- id: "carousel" + f.id + "slide" + (h + 1)
1192
+ id: "carousel" + r.id + "slide" + (h + 1)
1307
1193
  }, [
1308
- S(i, T(n, {
1194
+ S(i, H(l, {
1309
1195
  class: e.cardclass,
1310
1196
  type: e.cardtype,
1311
1197
  btnyype: e.btntype,
@@ -1313,43 +1199,48 @@ function Rt(e, r, t, o, f, s) {
1313
1199
  ctatext: e.ctatext,
1314
1200
  hidectatext: e.hidectatext
1315
1201
  }), null, 16, ["class", "type", "btnyype", "titleclass", "ctatext", "hidectatext"])
1316
- ], 10, zt))), 128))
1317
- ], 2)) : p("", !0),
1318
- t.type != "card" ? (l(), c("div", {
1202
+ ], 10, Bt))), 128))
1203
+ ], 2)) : _("", !0),
1204
+ e.type != "card" ? (c(), d("div", {
1319
1205
  key: 1,
1320
1206
  class: v(`row row-cols-${e.cols} row-cols-sm-${e.smcols} row-cols-md-${e.mdcols} ${e.gap ? `g-${e.gap}` : ""}`)
1321
1207
  }, [
1322
- (l(!0), c(x, null, L(e.items, (n, h) => (l(), c("div", {
1323
- class: v(`col carousel__item${t.colclass ? ` ${t.colclass}` : ""}`),
1208
+ (c(!0), d($, null, T(e.items, (l, h) => (c(), d("div", {
1209
+ class: v(`col carousel__item${e.colclass ? ` ${e.colclass}` : ""}`),
1324
1210
  key: h,
1325
- innerHTML: s.content(n),
1326
- id: "carousel" + f.id + "slide" + (h + 1)
1211
+ innerHTML: n.content(l),
1212
+ id: "carousel" + r.id + "slide" + (h + 1)
1327
1213
  }, null, 10, Vt))), 128))
1328
- ], 2)) : p("", !0)
1214
+ ], 2)) : _("", !0)
1329
1215
  ]),
1330
- a("div", {
1216
+ o("div", {
1331
1217
  class: v(`carousel__controls cols-${e.cols} cols-sm-${e.smcols} cols-md-${e.mdcols}`)
1332
1218
  }, [
1333
- (l(!0), c(x, null, L(e.items, (n, h) => (l(), c("a", {
1219
+ (c(!0), d($, null, T(e.items, (l, h) => (c(), d("a", {
1334
1220
  key: h,
1335
- href: "#carousel" + f.id + "slide" + (h + 1),
1221
+ href: "#carousel" + r.id + "slide" + (h + 1),
1336
1222
  class: v(`control-${h + 1}`)
1337
- }, "Slide " + k(h + 1), 11, Ft))), 128))
1223
+ }, "Slide " + L(h + 1), 11, zt))), 128))
1338
1224
  ], 2),
1339
- Ot,
1340
- jt
1225
+ Wt,
1226
+ Ot
1341
1227
  ])
1342
1228
  ], 8, Pt);
1343
1229
  }
1344
- const mi = /* @__PURE__ */ g(Bt, [["render", Rt]]);
1345
- class Wt extends HTMLElement {
1230
+ const hi = /* @__PURE__ */ A(Rt, [["render", jt]]);
1231
+ window.dataLayer = window.dataLayer || [];
1232
+ window.dataLayer.push({
1233
+ event: "customElementRegistered",
1234
+ element: "header"
1235
+ });
1236
+ class Ut extends HTMLElement {
1346
1237
  constructor() {
1347
1238
  super(), this.attachShadow({ mode: "open" });
1348
- const r = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", t = `@import "${r}/css/components/header.css";`, o = document.createElement("template");
1349
- o.innerHTML = `
1239
+ const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", e = `@import "${a}/css/components/header.css";`, s = document.createElement("template");
1240
+ s.innerHTML = `
1350
1241
  <style>
1351
- @import "${r}/css/core.min.css";
1352
- ${t}
1242
+ @import "${a}/css/core.min.css";
1243
+ ${e}
1353
1244
  ${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
1354
1245
  :host {
1355
1246
  max-width:100%!important;
@@ -1370,14 +1261,14 @@ class Wt extends HTMLElement {
1370
1261
  <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="" lazy="" />
1371
1262
  </picture>
1372
1263
  </div>
1373
- `, this.shadowRoot.appendChild(o.content.cloneNode(!0));
1264
+ `, this.shadowRoot.appendChild(s.content.cloneNode(!0));
1374
1265
  }
1375
1266
  connectedCallback() {
1376
- const r = this.shadowRoot.querySelector("picture"), t = this.shadowRoot.querySelector("picture source");
1377
- this.hasAttribute("image") ? t.setAttribute("srcset", this.getAttribute("image")) : r.remove();
1267
+ const a = this.shadowRoot.querySelector("picture"), e = this.shadowRoot.querySelector("picture source");
1268
+ this.hasAttribute("image") ? e.setAttribute("srcset", this.getAttribute("image")) : a.remove();
1378
1269
  }
1379
1270
  }
1380
- window.customElements.get("iam-header") || window.customElements.define("iam-header", Wt);
1271
+ window.customElements.get("iam-header") || window.customElements.define("iam-header", Ut);
1381
1272
  const Kt = {
1382
1273
  name: "Header",
1383
1274
  props: {
@@ -1390,50 +1281,50 @@ const Kt = {
1390
1281
  required: !1
1391
1282
  }
1392
1283
  }
1393
- }, Ut = ["image"], Gt = ["innerHTML"];
1394
- function Zt(e, r, t, o, f, s) {
1395
- return l(), c("iam-header", {
1284
+ }, Gt = ["image"], Qt = ["innerHTML"];
1285
+ function Yt(t, a, e, s, r, n) {
1286
+ return c(), d("iam-header", {
1396
1287
  class: "bg-secondary",
1397
- image: t.image
1288
+ image: e.image
1398
1289
  }, [
1399
- b(e.$slots, "breadcrumb"),
1400
- t.title ? (l(), c("h1", {
1290
+ p(t.$slots, "breadcrumb"),
1291
+ e.title ? (c(), d("h1", {
1401
1292
  key: 0,
1402
- innerHTML: t.title
1403
- }, null, 8, Gt)) : p("", !0),
1404
- b(e.$slots, "default")
1405
- ], 8, Ut);
1293
+ innerHTML: e.title
1294
+ }, null, 8, Qt)) : _("", !0),
1295
+ p(t.$slots, "default")
1296
+ ], 8, Gt);
1406
1297
  }
1407
- const _i = /* @__PURE__ */ g(Kt, [["render", Zt]]);
1408
- function Et(e) {
1409
- var r;
1410
- const t = e.querySelector(".testimonial__images"), o = t.querySelectorAll("img").length;
1411
- if (o == 1)
1298
+ const mi = /* @__PURE__ */ A(Kt, [["render", Yt]]);
1299
+ function Zt(t) {
1300
+ var a;
1301
+ const e = t.querySelector(".testimonial__images"), s = e.querySelectorAll("img").length;
1302
+ if (s == 1)
1412
1303
  return !1;
1413
- e.classList.add("testimonial--multi");
1414
- const f = function(s) {
1415
- const i = e.querySelector(".btn-next"), n = e.querySelector(".btn-prev");
1416
- i.setAttribute("data-go", s + 1), n.setAttribute("data-go", s - 1), i.removeAttribute("disabled"), n.removeAttribute("disabled"), s == 1 ? n.setAttribute("disabled", !0) : s == o && i.setAttribute("disabled", !0);
1304
+ t.classList.add("testimonial--multi");
1305
+ const r = function(n) {
1306
+ const i = t.querySelector(".btn-next"), l = t.querySelector(".btn-prev");
1307
+ i.setAttribute("data-go", n + 1), l.setAttribute("data-go", n - 1), i.removeAttribute("disabled"), l.removeAttribute("disabled"), n == 1 ? l.setAttribute("disabled", !0) : n == s && i.setAttribute("disabled", !0);
1417
1308
  };
1418
- t.addEventListener("scroll", function(s) {
1419
- clearTimeout(r), r = setTimeout(function() {
1420
- let i = t.scrollWidth, n = t.scrollHeight, h = t.scrollLeft, w = t.scrollTop, $ = Math.round(h / i * o) + 1;
1421
- h == 0 && w != 0 && ($ = Math.round(w / n * o) + 1), e.setAttribute("data-show", $), f($);
1309
+ e.addEventListener("scroll", function(n) {
1310
+ clearTimeout(a), a = setTimeout(function() {
1311
+ let i = e.scrollWidth, l = e.scrollHeight, h = e.scrollLeft, u = e.scrollTop, m = Math.round(h / i * s) + 1;
1312
+ h == 0 && u != 0 && (m = Math.round(u / l * s) + 1), t.setAttribute("data-show", m), r(m);
1422
1313
  }, 300);
1423
- }, !1), e.addEventListener("click", function(s) {
1424
- for (var i = s.target; i && i != this; i = i.parentNode)
1314
+ }, !1), t.addEventListener("click", function(n) {
1315
+ for (var i = n.target; i && i != this; i = i.parentNode)
1425
1316
  if (i.matches("[data-go]")) {
1426
- let n = parseInt(i.getAttribute("data-go")), h = 0, w = 0, $ = t.scrollWidth, M = t.scrollHeight;
1427
- $ > M ? w = Math.floor($ * ((n - 1) / o)) : h = Math.floor(M * ((n - 1) / o)), t.scroll({
1317
+ let l = parseInt(i.getAttribute("data-go")), h = 0, u = 0, m = e.scrollWidth, f = e.scrollHeight;
1318
+ m > f ? u = Math.floor(m * ((l - 1) / s)) : h = Math.floor(f * ((l - 1) / s)), e.scroll({
1428
1319
  top: h,
1429
- left: w,
1320
+ left: u,
1430
1321
  behavior: "smooth"
1431
1322
  });
1432
1323
  break;
1433
1324
  }
1434
1325
  }, !1);
1435
1326
  }
1436
- const Qt = {
1327
+ const Xt = {
1437
1328
  name: "Testimonial",
1438
1329
  props: {
1439
1330
  items: {
@@ -1447,68 +1338,68 @@ const Qt = {
1447
1338
  }
1448
1339
  },
1449
1340
  mounted() {
1450
- Et(this.$refs.wrapper);
1341
+ Zt(this.$refs.wrapper);
1451
1342
  }
1452
- }, Yt = {
1343
+ }, Jt = {
1453
1344
  class: "container testimonial mb-5",
1454
1345
  "data-show": "1",
1455
1346
  ref: "wrapper"
1456
- }, Jt = { class: "row" }, Xt = { class: "col-md-5 position-relative" }, es = { class: "testimonial__images" }, ts = ["src"], ss = /* @__PURE__ */ a("div", { class: "testimonial__controls" }, [
1457
- /* @__PURE__ */ a("button", {
1347
+ }, ea = { class: "row" }, ta = { class: "col-md-5 position-relative" }, aa = { class: "testimonial__images" }, sa = ["src"], ia = /* @__PURE__ */ o("div", { class: "testimonial__controls" }, [
1348
+ /* @__PURE__ */ o("button", {
1458
1349
  "data-go": "0",
1459
1350
  disabled: "",
1460
1351
  class: "btn-prev"
1461
1352
  }, "Previous"),
1462
- /* @__PURE__ */ a("button", {
1353
+ /* @__PURE__ */ o("button", {
1463
1354
  "data-go": "2",
1464
1355
  class: "btn-next"
1465
1356
  }, "Next")
1466
- ], -1), as = { class: "col-md-7" }, is = /* @__PURE__ */ a("h2", null, "What our customers think…", -1), ns = { class: "testimonial__content" }, rs = ["innerHTML"], os = ["innerHTML"], ls = { class: "testimonial__after" }, cs = /* @__PURE__ */ a("span", { class: "circle circle--dots d-none d-md-block" }, null, -1);
1467
- function ds(e, r, t, o, f, s) {
1468
- return l(), c("div", Yt, [
1469
- a("div", {
1470
- class: v("bg-" + t.background)
1357
+ ], -1), la = { class: "col-md-7" }, na = /* @__PURE__ */ o("h2", null, "What our customers think…", -1), ra = { class: "testimonial__content" }, oa = ["innerHTML"], ca = ["innerHTML"], da = { class: "testimonial__after" }, ua = /* @__PURE__ */ o("span", { class: "circle circle--dots d-none d-md-block" }, null, -1);
1358
+ function ha(t, a, e, s, r, n) {
1359
+ return c(), d("div", Jt, [
1360
+ o("div", {
1361
+ class: v("bg-" + e.background)
1471
1362
  }, [
1472
- a("div", Jt, [
1473
- a("div", Xt, [
1474
- a("div", es, [
1475
- (l(!0), c(x, null, L(t.items, (i, n) => (l(), c("img", {
1476
- key: n,
1363
+ o("div", ea, [
1364
+ o("div", ta, [
1365
+ o("div", aa, [
1366
+ (c(!0), d($, null, T(e.items, (i, l) => (c(), d("img", {
1367
+ key: l,
1477
1368
  src: i.image ? i.image : "data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",
1478
1369
  alt: "",
1479
1370
  class: v("h-100 w-100 object-cover" + (i.image ? "" : " opacity-0"))
1480
- }, null, 10, ts))), 128))
1371
+ }, null, 10, sa))), 128))
1481
1372
  ]),
1482
- ss
1373
+ ia
1483
1374
  ]),
1484
- a("div", as, [
1485
- is,
1486
- a("div", ns, [
1487
- (l(!0), c(x, null, L(t.items, (i, n) => (l(), c("blockquote", {
1488
- key: n,
1375
+ o("div", la, [
1376
+ na,
1377
+ o("div", ra, [
1378
+ (c(!0), d($, null, T(e.items, (i, l) => (c(), d("blockquote", {
1379
+ key: l,
1489
1380
  class: v(i.class)
1490
1381
  }, [
1491
- a("div", {
1382
+ o("div", {
1492
1383
  innerHTML: i.quote
1493
- }, null, 8, rs),
1494
- a("cite", {
1384
+ }, null, 8, oa),
1385
+ o("cite", {
1495
1386
  innerHTML: i.cite
1496
- }, null, 8, os)
1387
+ }, null, 8, ca)
1497
1388
  ], 2))), 128))
1498
1389
  ]),
1499
- a("div", ls, [
1500
- b(e.$slots, "default")
1390
+ o("div", da, [
1391
+ p(t.$slots, "default")
1501
1392
  ])
1502
1393
  ])
1503
1394
  ]),
1504
- cs
1395
+ ua
1505
1396
  ], 2)
1506
1397
  ], 512);
1507
1398
  }
1508
- const yi = /* @__PURE__ */ g(Qt, [["render", ds]]);
1509
- const us = {
1399
+ const fi = /* @__PURE__ */ A(Xt, [["render", ha]]);
1400
+ const ma = {
1510
1401
  components: {
1511
- Input: D
1402
+ Input: R
1512
1403
  },
1513
1404
  name: "PropertySearchbar",
1514
1405
  props: {
@@ -1633,8 +1524,8 @@ const us = {
1633
1524
  };
1634
1525
  },
1635
1526
  methods: {
1636
- locationKeyup: function(e) {
1637
- this.$emit("locationKeyup", e);
1527
+ locationKeyup: function(t) {
1528
+ this.$emit("locationKeyup", t);
1638
1529
  }
1639
1530
  },
1640
1531
  computed: {
@@ -1642,8 +1533,8 @@ const us = {
1642
1533
  get() {
1643
1534
  return this.locationSave ? this.locationSave : this.location;
1644
1535
  },
1645
- set(e) {
1646
- this.locationSave = e, this.$emit("input", e);
1536
+ set(t) {
1537
+ this.locationSave = t, this.$emit("input", t);
1647
1538
  }
1648
1539
  },
1649
1540
  locationsList() {
@@ -1652,43 +1543,43 @@ const us = {
1652
1543
  ];
1653
1544
  }
1654
1545
  }
1655
- }, fs = {
1546
+ }, fa = {
1656
1547
  class: "container",
1657
1548
  ref: "wrapper"
1658
- }, hs = { class: "property-searchbar" }, ms = ["action", "method"], _s = { class: "col-12 col-md-3" }, ys = { class: "col-12 col-md" }, ps = /* @__PURE__ */ a("span", { class: "form-label d-none d-md-block" }, "Price range", -1), bs = {
1549
+ }, ya = { class: "property-searchbar" }, ba = ["action", "method"], _a = { class: "col-12 col-md-3" }, pa = { class: "col-12 col-md" }, ga = /* @__PURE__ */ o("span", { class: "form-label d-none d-md-block" }, "Price range", -1), va = {
1659
1550
  class: "row",
1660
1551
  "data-input-range": ""
1661
- }, vs = { class: "col-12 col-md" }, gs = /* @__PURE__ */ a("span", { class: "form-label d-none d-md-block" }, "Number of beds", -1), As = {
1552
+ }, Aa = { class: "col-12 col-md" }, wa = /* @__PURE__ */ o("span", { class: "form-label d-none d-md-block" }, "Number of beds", -1), Sa = {
1662
1553
  class: "row",
1663
1554
  "data-input-range": ""
1664
- }, ws = { class: "col-12 col-md-2" }, ks = /* @__PURE__ */ a("div", { class: "col-12 col-md mw-md-fit-content d-flex property-searchbar__btn" }, [
1665
- /* @__PURE__ */ a("button", {
1555
+ }, La = { class: "col-12 col-md-2" }, ka = /* @__PURE__ */ o("div", { class: "col-12 col-md mw-md-fit-content d-flex property-searchbar__btn" }, [
1556
+ /* @__PURE__ */ o("button", {
1666
1557
  class: "btn w-100 me-0",
1667
1558
  type: "submit",
1668
1559
  value: "submit"
1669
1560
  }, "Search")
1670
1561
  ], -1);
1671
- function Ss(e, r, t, o, f, s) {
1672
- const i = H("Input");
1673
- return l(), c("div", fs, [
1674
- b(e.$slots, "default"),
1675
- a("div", hs, [
1676
- a("form", {
1562
+ function xa(t, a, e, s, r, n) {
1563
+ const i = E("Input");
1564
+ return c(), d("div", fa, [
1565
+ p(t.$slots, "default"),
1566
+ o("div", ya, [
1567
+ o("form", {
1677
1568
  class: "row",
1678
- action: t.formaction,
1679
- method: t.formmethod
1569
+ action: e.formaction,
1570
+ method: e.formmethod
1680
1571
  }, [
1681
- a("fieldset", _s, [
1572
+ o("fieldset", _a, [
1682
1573
  S(i, {
1683
1574
  inputClass: "input--locations",
1684
- modelValue: s.locationSet,
1685
- "onUpdate:modelValue": r[0] || (r[0] = (n) => s.locationSet = n),
1575
+ modelValue: n.locationSet,
1576
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => n.locationSet = l),
1686
1577
  label: "Location",
1687
1578
  id: "location",
1688
- options: s.locationsList(),
1579
+ options: n.locationsList(),
1689
1580
  required: "",
1690
1581
  placeholder: "i.e. Newcastle or NE1",
1691
- onKeyupEvent: r[1] || (r[1] = (n) => s.locationKeyup(...arguments)),
1582
+ onKeyupEvent: a[1] || (a[1] = (l) => n.locationKeyup(...arguments)),
1692
1583
  ref: "search"
1693
1584
  }, null, 8, ["modelValue", "options"]),
1694
1585
  S(i, {
@@ -1696,19 +1587,19 @@ function Ss(e, r, t, o, f, s) {
1696
1587
  label: "Miles",
1697
1588
  id: "miles",
1698
1589
  type: "select",
1699
- options: t.distances
1590
+ options: e.distances
1700
1591
  }, null, 8, ["options"])
1701
1592
  ]),
1702
- a("fieldset", ys, [
1703
- ps,
1704
- a("div", bs, [
1593
+ o("fieldset", pa, [
1594
+ ga,
1595
+ o("div", va, [
1705
1596
  S(i, {
1706
1597
  class: "col-6",
1707
1598
  label: "Minimum price",
1708
1599
  id: "price-min",
1709
1600
  "data-min": "true",
1710
1601
  type: "select",
1711
- options: t.pricemin
1602
+ options: e.pricemin
1712
1603
  }, null, 8, ["options"]),
1713
1604
  S(i, {
1714
1605
  class: "col-6",
@@ -1716,20 +1607,20 @@ function Ss(e, r, t, o, f, s) {
1716
1607
  id: "price-max",
1717
1608
  "data-max": "true",
1718
1609
  type: "select",
1719
- options: t.pricemax
1610
+ options: e.pricemax
1720
1611
  }, null, 8, ["options"])
1721
1612
  ])
1722
1613
  ]),
1723
- a("fieldset", vs, [
1724
- gs,
1725
- a("div", As, [
1614
+ o("fieldset", Aa, [
1615
+ wa,
1616
+ o("div", Sa, [
1726
1617
  S(i, {
1727
1618
  class: "col-6",
1728
1619
  label: "Minimum beds",
1729
1620
  id: "beds-min",
1730
1621
  "data-min": "true",
1731
1622
  type: "select",
1732
- options: t.bedsmin
1623
+ options: e.bedsmin
1733
1624
  }, null, 8, ["options"]),
1734
1625
  S(i, {
1735
1626
  class: "col-6",
@@ -1737,41 +1628,41 @@ function Ss(e, r, t, o, f, s) {
1737
1628
  id: "beds-max",
1738
1629
  "data-max": "true",
1739
1630
  type: "select",
1740
- options: t.bedsmax
1631
+ options: e.bedsmax
1741
1632
  }, null, 8, ["options"])
1742
1633
  ])
1743
1634
  ]),
1744
- a("fieldset", ws, [
1635
+ o("fieldset", La, [
1745
1636
  S(i, {
1746
1637
  label: "Property type",
1747
1638
  id: "property-type",
1748
1639
  type: "select",
1749
- options: t.propertytypes
1640
+ options: e.propertytypes
1750
1641
  }, null, 8, ["options"])
1751
1642
  ]),
1752
- ks
1753
- ], 8, ms)
1643
+ ka
1644
+ ], 8, ba)
1754
1645
  ]),
1755
- b(e.$slots, "after")
1646
+ p(t.$slots, "after")
1756
1647
  ], 512);
1757
1648
  }
1758
- const pi = /* @__PURE__ */ g(us, [["render", Ss]]), $s = (e) => {
1759
- Array.from(e.querySelectorAll("details")).forEach((r, t) => {
1760
- r.addEventListener("mouseenter", function(o) {
1761
- window.matchMedia("(min-width: 62em)").matches && r.setAttribute("open", "true");
1762
- }, !1), r.addEventListener("mouseleave", function(o) {
1763
- window.matchMedia("(min-width: 62em)").matches && r.removeAttribute("open");
1649
+ const yi = /* @__PURE__ */ A(ma, [["render", xa]]), qa = (t) => {
1650
+ Array.from(t.querySelectorAll("details")).forEach((a, e) => {
1651
+ a.addEventListener("mouseenter", function(s) {
1652
+ window.matchMedia("(min-width: 62em)").matches && a.setAttribute("open", "true");
1653
+ }, !1), a.addEventListener("mouseleave", function(s) {
1654
+ window.matchMedia("(min-width: 62em)").matches && a.removeAttribute("open");
1764
1655
  }, !1);
1765
1656
  }), "IntersectionObserver" in window && new IntersectionObserver(
1766
- ([t]) => t.target.classList.toggle("is-stuck", t.intersectionRatio < 1),
1657
+ ([e]) => e.target.classList.toggle("is-stuck", e.intersectionRatio < 1),
1767
1658
  { threshold: [1] }
1768
- ).observe(e);
1659
+ ).observe(t);
1769
1660
  };
1770
- const qs = {
1661
+ const $a = {
1771
1662
  components: {
1772
- Input: D,
1773
- Logo: fe,
1774
- Icon: oe
1663
+ Input: R,
1664
+ Logo: _e,
1665
+ Icon: he
1775
1666
  },
1776
1667
  name: "Nav",
1777
1668
  props: {
@@ -1818,8 +1709,8 @@ const qs = {
1818
1709
  };
1819
1710
  },
1820
1711
  methods: {
1821
- subIsActive(e) {
1822
- return (Array.isArray(e) ? e : [e]).some((t) => this.$route.path.indexOf(t) === 0);
1712
+ subIsActive(t) {
1713
+ return (Array.isArray(t) ? t : [t]).some((e) => this.$route.path.indexOf(e) === 0);
1823
1714
  }
1824
1715
  },
1825
1716
  computed: {
@@ -1841,61 +1732,61 @@ const qs = {
1841
1732
  },
1842
1733
  mounted() {
1843
1734
  this.$nextTick(function() {
1844
- $s(this.$refs.wrapper);
1735
+ qa(this.$refs.wrapper);
1845
1736
  });
1846
1737
  }
1847
- }, xs = /* @__PURE__ */ a("input", {
1738
+ }, Ta = /* @__PURE__ */ o("input", {
1848
1739
  type: "checkbox",
1849
1740
  name: "showMenu",
1850
1741
  id: "showMenu",
1851
1742
  class: "d-none"
1852
- }, null, -1), Ls = /* @__PURE__ */ a("input", {
1743
+ }, null, -1), Ha = /* @__PURE__ */ o("input", {
1853
1744
  type: "checkbox",
1854
1745
  name: "showSearch",
1855
1746
  id: "showSearch",
1856
1747
  class: "d-none"
1857
- }, null, -1), Ts = /* @__PURE__ */ a("input", {
1748
+ }, null, -1), Ca = /* @__PURE__ */ o("input", {
1858
1749
  type: "checkbox",
1859
1750
  name: "showAccount",
1860
1751
  id: "showAccount",
1861
1752
  class: "d-none"
1862
- }, null, -1), Ms = { class: "nav__mobile-bar" }, Hs = { class: "container" }, Cs = { class: "row" }, Ns = {
1753
+ }, null, -1), Ma = { class: "nav__mobile-bar" }, Ea = { class: "container" }, Na = { class: "row" }, Da = {
1863
1754
  key: 0,
1864
1755
  class: "col mw-md-fit-content nav__logo"
1865
- }, Bs = {
1756
+ }, Ra = {
1866
1757
  key: 1,
1867
1758
  class: "col mw-md-fit-content nav__logo"
1868
- }, Ps = {
1759
+ }, Pa = {
1869
1760
  href: "/",
1870
1761
  class: "text-decoration-none mb-0"
1871
- }, Ds = /* @__PURE__ */ a("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1872
- /* @__PURE__ */ a("label", { for: "showMenu" }, "Menu")
1873
- ], -1), Is = { class: "nav__inner" }, zs = { class: "container" }, Vs = { class: "row" }, Fs = {
1762
+ }, Ia = /* @__PURE__ */ o("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1763
+ /* @__PURE__ */ o("label", { for: "showMenu" }, "Menu")
1764
+ ], -1), Fa = { class: "nav__inner" }, Ba = { class: "container" }, Va = { class: "row" }, za = {
1874
1765
  key: 0,
1875
1766
  class: "col mw-md-fit-content nav__logo"
1876
- }, Os = {
1767
+ }, Wa = {
1877
1768
  key: 1,
1878
1769
  class: "col mw-md-fit-content nav__logo"
1879
- }, js = {
1770
+ }, Oa = {
1880
1771
  href: "/",
1881
1772
  class: "text-decoration-none mb-0"
1882
- }, Rs = {
1773
+ }, ja = {
1883
1774
  key: 2,
1884
1775
  class: "col mw-fit-content nav__search-btn flex-row align-items-center"
1885
- }, Ws = /* @__PURE__ */ a("label", { for: "showSearch" }, [
1886
- /* @__PURE__ */ a("svg", {
1776
+ }, Ua = /* @__PURE__ */ o("label", { for: "showSearch" }, [
1777
+ /* @__PURE__ */ o("svg", {
1887
1778
  class: "icon",
1888
1779
  viewBox: "0 0 32 32"
1889
1780
  }, [
1890
- /* @__PURE__ */ a("title", null, "Search"),
1891
- /* @__PURE__ */ a("ellipse", {
1781
+ /* @__PURE__ */ o("title", null, "Search"),
1782
+ /* @__PURE__ */ o("ellipse", {
1892
1783
  cx: "14.92",
1893
1784
  cy: "13.81",
1894
1785
  rx: "11.92",
1895
1786
  ry: "11.81",
1896
1787
  class: "icon__outline"
1897
1788
  }),
1898
- /* @__PURE__ */ a("line", {
1789
+ /* @__PURE__ */ o("line", {
1899
1790
  x1: "22.68",
1900
1791
  y1: "22.75",
1901
1792
  x2: "30",
@@ -1903,237 +1794,152 @@ const qs = {
1903
1794
  class: "icon__outline"
1904
1795
  })
1905
1796
  ])
1906
- ], -1), Ks = [
1907
- Ws
1908
- ], Us = /* @__PURE__ */ a("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1909
- /* @__PURE__ */ a("label", { for: "showMenu" }, "Menu")
1910
- ], -1), Gs = { class: "col-12 col-md nav__menu ms-auto flex-row align-items-center" }, Zs = {
1797
+ ], -1), Ka = [
1798
+ Ua
1799
+ ], Ga = /* @__PURE__ */ o("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1800
+ /* @__PURE__ */ o("label", { for: "showMenu" }, "Menu")
1801
+ ], -1), Qa = { class: "col-12 col-md nav__menu ms-auto flex-row align-items-center" }, Ya = {
1911
1802
  key: 3,
1912
1803
  class: "col nav__account-btn flex-row align-items-center"
1913
- }, Es = /* @__PURE__ */ a("label", { for: "showAccount" }, [
1914
- /* @__PURE__ */ a("svg", {
1804
+ }, Za = /* @__PURE__ */ o("label", { for: "showAccount" }, [
1805
+ /* @__PURE__ */ o("svg", {
1915
1806
  class: "icon",
1916
1807
  viewBox: "0 0 28 28"
1917
1808
  }, [
1918
- /* @__PURE__ */ a("path", {
1809
+ /* @__PURE__ */ o("path", {
1919
1810
  d: "M14,28a13.861,13.861,0,0,1-9.268-3.533l-.023.047-.721-.738L3.62,23.4l.012-.023a14,14,0,1,1,20.735,0l.012.023-.367.377-.722.738-.024-.045A13.855,13.855,0,0,1,14,28Zm0-9.58a10.5,10.5,0,0,0-1.368.092c-.085.012-.17.03-.252.047-.061.013-.124.026-.187.037l-.077.013c-.266.047-.54.095-.8.165-.108.029-.215.065-.318.1-.063.022-.125.043-.188.063l-.08.026c-.223.071-.454.144-.671.234-.125.05-.245.11-.362.168l-.146.072-.045.021c-.208.1-.423.2-.623.312-.131.074-.257.158-.379.239l-.106.07-.068.044c-.176.114-.359.232-.528.359-.137.1-.267.218-.393.327l-.054.047c-.174.15-.355.306-.519.47-.132.134-.258.277-.38.416l-.018.021c-.16.184-.3.35-.437.527-.12.161-.23.33-.337.494-.076.117-.146.238-.214.356a12.495,12.495,0,0,0,17.109,0l-.022-.037c-.061-.1-.125-.212-.192-.315-.1-.156-.214-.333-.338-.5-.141-.188-.293-.363-.436-.526-.113-.13-.253-.292-.4-.438-.161-.162-.337-.314-.517-.468l-.08-.069c-.118-.1-.24-.209-.368-.307-.183-.137-.379-.264-.568-.387l-.026-.017-.106-.07c-.125-.083-.251-.166-.381-.24-.207-.118-.429-.222-.643-.322l-.024-.011-.152-.074c-.116-.057-.235-.116-.356-.165-.214-.087-.438-.159-.656-.229l-.1-.031c-.066-.021-.132-.043-.2-.066-.1-.035-.2-.07-.309-.1-.264-.07-.538-.118-.8-.165l-.078-.014c-.063-.011-.126-.024-.187-.037-.082-.017-.167-.035-.252-.047A10.483,10.483,0,0,0,14,18.421Zm0-1.473a11.871,11.871,0,0,1,1.54.1c.1.013.192.033.284.052.069.014.139.028.209.04.34.058.672.118,1,.2.14.036.278.082.412.127l.151.05c.309.1.587.188.859.3.148.059.293.127.433.194l.13.061c.306.142.553.266.775.389.188.107.368.22.535.328.26.166.489.322.7.478.156.117.316.244.49.389.209.176.412.361.622.567.156.154.3.293.43.443.209.23.4.472.542.657l.051.066c.1.134.21.272.308.416.021.031.045.061.068.09a1.267,1.267,0,0,1,.085.117,12.525,12.525,0,1,0-19.24,0c.026-.04.056-.078.084-.114s.05-.064.073-.1c.1-.141.2-.278.3-.409l.046-.059c.2-.264.378-.478.555-.672.137-.152.281-.3.417-.43.215-.21.422-.4.635-.578.18-.15.332-.271.479-.381.208-.155.433-.31.709-.486.174-.111.346-.219.526-.319.274-.153.55-.285.783-.393l.112-.053c.144-.069.293-.14.445-.2.282-.113.578-.208.864-.3l.159-.052c.132-.044.265-.088.4-.124.331-.087.675-.148,1-.2.068-.012.137-.026.2-.039.094-.019.191-.039.288-.052A11.827,11.827,0,0,1,14,16.948Z",
1920
1811
  transform: "translate(0 -0.001)"
1921
1812
  }),
1922
- /* @__PURE__ */ a("path", {
1813
+ /* @__PURE__ */ o("path", {
1923
1814
  d: "M5.2,10.4a5.2,5.2,0,1,1,5.2-5.2A5.206,5.206,0,0,1,5.2,10.4Zm0-8.915A3.714,3.714,0,1,0,8.915,5.2,3.719,3.719,0,0,0,5.2,1.486Z",
1924
1815
  transform: "translate(8.8 4.8)"
1925
1816
  })
1926
1817
  ]),
1927
- /* @__PURE__ */ a("span", null, "My account")
1928
- ], -1), Qs = [
1929
- Es
1930
- ], Ys = {
1818
+ /* @__PURE__ */ o("span", null, "My account")
1819
+ ], -1), Xa = [
1820
+ Za
1821
+ ], Ja = {
1931
1822
  key: 4,
1932
1823
  class: "col-12 col-md nav__btn mw-md-fit-content flex-row align-items-center"
1933
- }, Js = ["href", "innerHTML"], Xs = {
1824
+ }, es = ["href", "innerHTML"], ts = {
1934
1825
  key: 0,
1935
1826
  class: "nav__menu--secondary"
1936
- }, ea = { class: "container" }, ta = {
1827
+ }, as = { class: "container" }, ss = {
1937
1828
  key: 1,
1938
1829
  class: "nav__menu--search"
1939
- }, sa = { class: "bg-gradient pt-4" }, aa = { class: "container" }, ia = {
1830
+ }, is = { class: "bg-gradient pt-4" }, ls = { class: "container" }, ns = {
1940
1831
  key: 0,
1941
1832
  class: "nav__menu--account"
1942
- }, na = { class: "container" }, ra = { class: "row mb-4" }, oa = {
1833
+ }, rs = { class: "container" }, os = { class: "row mb-4" }, cs = {
1943
1834
  key: 0,
1944
1835
  class: "col mw-md-fit-content nav__logo"
1945
- }, la = {
1836
+ }, ds = {
1946
1837
  key: 1,
1947
1838
  class: "col mw-md-fit-content nav__logo"
1948
- }, ca = {
1839
+ }, us = {
1949
1840
  href: "/",
1950
1841
  class: "text-decoration-none mb-0"
1951
- }, da = /* @__PURE__ */ a("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1952
- /* @__PURE__ */ a("label", { for: "showAccount" }, "Account")
1953
- ], -1), ua = { class: "container" }, fa = /* @__PURE__ */ a("span", { class: "nav__bg" }, null, -1);
1954
- function ha(e, r, t, o, f, s) {
1955
- const i = H("Logo");
1956
- return l(), c("nav", {
1957
- class: v(`nav${s.hasSecondarySlot ? " has-secondary" : ""}`),
1842
+ }, hs = /* @__PURE__ */ o("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1843
+ /* @__PURE__ */ o("label", { for: "showAccount" }, "Account")
1844
+ ], -1), ms = { class: "container" }, fs = /* @__PURE__ */ o("span", { class: "nav__bg" }, null, -1);
1845
+ function ys(t, a, e, s, r, n) {
1846
+ const i = E("Logo");
1847
+ return c(), d("nav", {
1848
+ class: v(`nav${n.hasSecondarySlot ? " has-secondary" : ""}`),
1958
1849
  ref: "wrapper"
1959
1850
  }, [
1960
- xs,
1961
- Ls,
1962
- Ts,
1963
- a("div", Ms, [
1964
- a("div", Hs, [
1965
- a("div", Cs, [
1966
- s.hasLogoSlot ? (l(), c("div", Ns, [
1967
- b(e.$slots, "logo")
1968
- ])) : (l(), c("div", Bs, [
1969
- a("a", Ps, [
1851
+ Ta,
1852
+ Ha,
1853
+ Ca,
1854
+ o("div", Ma, [
1855
+ o("div", Ea, [
1856
+ o("div", Na, [
1857
+ n.hasLogoSlot ? (c(), d("div", Da, [
1858
+ p(t.$slots, "logo")
1859
+ ])) : (c(), d("div", Ra, [
1860
+ o("a", Pa, [
1970
1861
  S(i, {
1971
- id: t.logo,
1972
- path: t.logopath,
1973
- desc: t.logotext,
1862
+ id: e.logo,
1863
+ path: e.logopath,
1864
+ desc: e.logotext,
1974
1865
  class: "pb-0"
1975
1866
  }, null, 8, ["id", "path", "desc"])
1976
1867
  ])
1977
1868
  ])),
1978
- Ds
1869
+ Ia
1979
1870
  ])
1980
1871
  ])
1981
1872
  ]),
1982
- a("div", Is, [
1983
- a("div", zs, [
1984
- a("div", Vs, [
1985
- s.hasLogoSlot ? (l(), c("div", Fs, [
1986
- b(e.$slots, "logo")
1987
- ])) : (l(), c("div", Os, [
1988
- a("a", js, [
1873
+ o("div", Fa, [
1874
+ o("div", Ba, [
1875
+ o("div", Va, [
1876
+ n.hasLogoSlot ? (c(), d("div", za, [
1877
+ p(t.$slots, "logo")
1878
+ ])) : (c(), d("div", Wa, [
1879
+ o("a", Oa, [
1989
1880
  S(i, {
1990
- id: t.logo,
1991
- path: t.logopath,
1992
- desc: t.logotext,
1881
+ id: e.logo,
1882
+ path: e.logopath,
1883
+ desc: e.logotext,
1993
1884
  class: "pb-0"
1994
1885
  }, null, 8, ["id", "path", "desc"])
1995
1886
  ])
1996
1887
  ])),
1997
- s.hasSearchSlot ? (l(), c("div", Rs, Ks)) : p("", !0),
1998
- Us,
1999
- a("div", Gs, [
2000
- b(e.$slots, "default")
1888
+ n.hasSearchSlot ? (c(), d("div", ja, Ka)) : _("", !0),
1889
+ Ga,
1890
+ o("div", Qa, [
1891
+ p(t.$slots, "default")
2001
1892
  ]),
2002
- s.hasAccountSlot ? (l(), c("div", Zs, Qs)) : p("", !0),
2003
- t.btnlink ? (l(), c("div", Ys, [
2004
- a("a", {
2005
- href: t.btnlink,
1893
+ n.hasAccountSlot ? (c(), d("div", Ya, Xa)) : _("", !0),
1894
+ e.btnlink ? (c(), d("div", Ja, [
1895
+ o("a", {
1896
+ href: e.btnlink,
2006
1897
  class: "btn me-0",
2007
- innerHTML: t.btntext
2008
- }, null, 8, Js)
2009
- ])) : p("", !0)
1898
+ innerHTML: e.btntext
1899
+ }, null, 8, es)
1900
+ ])) : _("", !0)
2010
1901
  ])
2011
1902
  ]),
2012
- s.hasSecondarySlot ? (l(), c("div", Xs, [
2013
- a("div", ea, [
2014
- b(e.$slots, "secondary")
1903
+ n.hasSecondarySlot ? (c(), d("div", ts, [
1904
+ o("div", as, [
1905
+ p(t.$slots, "secondary")
2015
1906
  ])
2016
- ])) : p("", !0),
2017
- s.hasSearchSlot ? (l(), c("div", ta, [
2018
- a("div", sa, [
2019
- a("div", aa, [
2020
- b(e.$slots, "search")
1907
+ ])) : _("", !0),
1908
+ n.hasSearchSlot ? (c(), d("div", ss, [
1909
+ o("div", is, [
1910
+ o("div", ls, [
1911
+ p(t.$slots, "search")
2021
1912
  ])
2022
1913
  ])
2023
- ])) : p("", !0)
1914
+ ])) : _("", !0)
2024
1915
  ]),
2025
- s.hasAccountSlot ? (l(), c("div", ia, [
2026
- a("div", na, [
2027
- a("div", ra, [
2028
- s.hasLogoSlot ? (l(), c("div", oa, [
2029
- b(e.$slots, "logo")
2030
- ])) : (l(), c("div", la, [
2031
- a("a", ca, [
1916
+ n.hasAccountSlot ? (c(), d("div", ns, [
1917
+ o("div", rs, [
1918
+ o("div", os, [
1919
+ n.hasLogoSlot ? (c(), d("div", cs, [
1920
+ p(t.$slots, "logo")
1921
+ ])) : (c(), d("div", ds, [
1922
+ o("a", us, [
2032
1923
  S(i, {
2033
- id: t.logo,
2034
- path: t.logopath,
2035
- desc: t.logotext,
1924
+ id: e.logo,
1925
+ path: e.logopath,
1926
+ desc: e.logotext,
2036
1927
  class: "pb-0"
2037
1928
  }, null, 8, ["id", "path", "desc"])
2038
1929
  ])
2039
1930
  ])),
2040
- da
1931
+ hs
2041
1932
  ])
2042
1933
  ]),
2043
- a("div", ua, [
2044
- b(e.$slots, "account")
1934
+ o("div", ms, [
1935
+ p(t.$slots, "account")
2045
1936
  ])
2046
- ])) : p("", !0),
2047
- fa
1937
+ ])) : _("", !0),
1938
+ fs
2048
1939
  ], 2);
2049
1940
  }
2050
- const bi = /* @__PURE__ */ g(qs, [["render", ha]]), ma = (e) => {
2051
- const r = e.querySelectorAll(".modal__outer a, .modal__outer button"), t = r[0], o = r[r.length - 1], f = e.getAttribute("id"), s = function() {
2052
- document.querySelector('[href="' + window.location.hash + '"]').focus(), window.location.hash = "close", history.replaceState("", document.title, window.location.pathname + window.location.search), typeof window.player < "u" && typeof window.player.pauseVideo == "function" && window.player.pauseVideo();
2053
- };
2054
- e.addEventListener("keydown", function(n) {
2055
- n.key === "Tab" && n.shiftKey && document.activeElement == t ? (n.preventDefault(), o.focus()) : n.key === "Tab" && !n.shiftKey && document.activeElement == o && (n.preventDefault(), t.focus());
2056
- }), document.addEventListener("keydown", function(n) {
2057
- n.key === "Escape" && document.querySelector(".modal:target") && s();
2058
- }), e.addEventListener("click", function(n) {
2059
- for (var h = n.target; h && h != this; h = h.parentNode)
2060
- if (h.matches('[href="#close"]')) {
2061
- n.preventDefault(), s();
2062
- break;
2063
- } else if (h.matches(".modal__dock--right")) {
2064
- n.preventDefault(), e.classList.contains("modal--left") || e.classList.add("modal--right"), e.classList.remove("modal--left");
2065
- break;
2066
- } else if (h.matches(".modal__dock--left")) {
2067
- n.preventDefault(), e.classList.contains("modal--right") || e.classList.add("modal--left"), e.classList.remove("modal--right");
2068
- break;
2069
- }
2070
- });
2071
- function i() {
2072
- if (location.hash === "#" + f) {
2073
- console.log("Modal is now open");
2074
- const n = document.querySelector(".modal:target .modal__inner > .youtube-embed:first-child:last-child a");
2075
- console.log(n), n && n.click();
2076
- }
2077
- }
2078
- window.onhashchange = i;
2079
- };
2080
- const _a = {
2081
- name: "Modal",
2082
- props: {
2083
- id: {
2084
- type: String,
2085
- required: !0
2086
- },
2087
- returnid: {
2088
- type: String,
2089
- default: "close",
2090
- required: !1
2091
- }
2092
- },
2093
- mounted() {
2094
- this.$nextTick(function() {
2095
- ma(this.$refs.modal);
2096
- });
2097
- }
2098
- }, ya = ["id"], pa = ["href"], ba = /* @__PURE__ */ a("span", { class: "visually-hidden" }, "Close", -1), va = [
2099
- ba
2100
- ], ga = { class: "modal__outer" }, Aa = ["href"], wa = /* @__PURE__ */ a("span", { class: "visually-hidden" }, "Close", -1), ka = { class: "modal__inner" }, Sa = /* @__PURE__ */ a("button", {
2101
- class: "modal__dock--left btn btn-prev",
2102
- tabindex: "-1"
2103
- }, "Left", -1), $a = /* @__PURE__ */ a("button", {
2104
- class: "modal__dock--right btn btn-next",
2105
- tabindex: "-1"
2106
- }, "Right", -1);
2107
- function qa(e, r, t, o, f, s) {
2108
- return l(), c("div", {
2109
- class: "modal",
2110
- id: t.id,
2111
- role: "dialog",
2112
- modal: "true",
2113
- ref: "modal"
2114
- }, [
2115
- a("a", {
2116
- href: `#${t.returnid ? t.returnid : ""}`,
2117
- tabindex: "-1"
2118
- }, va, 8, pa),
2119
- a("div", ga, [
2120
- a("a", {
2121
- href: `#${t.returnid ? t.returnid : ""}`,
2122
- class: "btn btn-tertiary py-1 px-2"
2123
- }, [
2124
- wa,
2125
- j("✕")
2126
- ], 8, Aa),
2127
- a("div", ka, [
2128
- b(e.$slots, "default")
2129
- ])
2130
- ]),
2131
- Sa,
2132
- $a
2133
- ], 8, ya);
2134
- }
2135
- const vi = /* @__PURE__ */ g(_a, [["render", qa]]);
2136
- const xa = {
1941
+ const bi = /* @__PURE__ */ A($a, [["render", ys]]);
1942
+ const bs = {
2137
1943
  name: "Stepper",
2138
1944
  props: {
2139
1945
  label: {
@@ -2146,25 +1952,25 @@ const xa = {
2146
1952
  default: "Complete"
2147
1953
  }
2148
1954
  }
2149
- }, La = { class: "container" }, Ta = ["aria-label"], Ma = {
1955
+ }, _s = { class: "container" }, ps = ["aria-label"], gs = {
2150
1956
  key: 0,
2151
1957
  class: "h6 stepper__start"
2152
- }, Ha = { class: "list-unstyled" }, Ca = { class: "h6 stepper__end" };
2153
- function Na(e, r, t, o, f, s) {
2154
- return l(), c("div", La, [
2155
- a("nav", {
1958
+ }, vs = { class: "list-unstyled" }, As = { class: "h6 stepper__end" };
1959
+ function ws(t, a, e, s, r, n) {
1960
+ return c(), d("div", _s, [
1961
+ o("nav", {
2156
1962
  class: "stepper",
2157
- "aria-label": t.label ? t.label : "Progress"
1963
+ "aria-label": e.label ? e.label : "Progress"
2158
1964
  }, [
2159
- t.label ? (l(), c("span", Ma, k(t.label), 1)) : p("", !0),
2160
- a("ol", Ha, [
2161
- b(e.$slots, "default")
1965
+ e.label ? (c(), d("span", gs, L(e.label), 1)) : _("", !0),
1966
+ o("ol", vs, [
1967
+ p(t.$slots, "default")
2162
1968
  ]),
2163
- a("span", Ca, k(t.endlabel), 1)
2164
- ], 8, Ta)
1969
+ o("span", As, L(e.endlabel), 1)
1970
+ ], 8, ps)
2165
1971
  ]);
2166
1972
  }
2167
- const gi = /* @__PURE__ */ g(xa, [["render", Na]]), Ba = {
1973
+ const _i = /* @__PURE__ */ A(bs, [["render", ws]]), Ss = {
2168
1974
  name: "Stepper",
2169
1975
  props: {
2170
1976
  url: {
@@ -2180,69 +1986,77 @@ const gi = /* @__PURE__ */ g(xa, [["render", Na]]), Ba = {
2180
1986
  required: !1
2181
1987
  }
2182
1988
  }
2183
- }, Pa = ["href", "aria-current"], Da = {
1989
+ }, Ls = ["href", "aria-current"], ks = {
2184
1990
  key: 0,
2185
1991
  class: "visually-hidden"
2186
1992
  };
2187
- function Ia(e, r, t, o, f, s) {
2188
- return l(), c("li", null, [
2189
- a("a", {
2190
- href: t.url,
2191
- class: v(`${t.status ? "bg-" + t.status : ""}${typeof t.current < "u" ? "current" : ""}`),
2192
- "aria-current": typeof t.current < "u"
1993
+ function xs(t, a, e, s, r, n) {
1994
+ return c(), d("li", null, [
1995
+ o("a", {
1996
+ href: e.url,
1997
+ class: v(`${e.status ? "bg-" + e.status : ""}${typeof e.current < "u" ? "current" : ""}`),
1998
+ "aria-current": typeof e.current < "u"
2193
1999
  }, [
2194
- a("span", null, [
2195
- b(e.$slots, "default")
2000
+ o("span", null, [
2001
+ p(t.$slots, "default")
2196
2002
  ]),
2197
- t.status ? (l(), c("em", Da, " - status: " + k(t.status), 1)) : p("", !0)
2198
- ], 10, Pa)
2003
+ e.status ? (c(), d("em", ks, " - status: " + L(e.status), 1)) : _("", !0)
2004
+ ], 10, Ls)
2199
2005
  ]);
2200
2006
  }
2201
- const Ai = /* @__PURE__ */ g(Ba, [["render", Ia]]), za = function(e) {
2202
- const r = e.querySelectorAll(":scope > details");
2203
- e.querySelectorAll(":scope > details > summary");
2204
- let t = e.querySelector(":scope > .tabs__links");
2205
- e.shadowRoot && e.shadowRoot.querySelector(".tabs__links") && (t = e.shadowRoot.querySelector(".tabs__links")), t || (t = document.createElement("div"), t.classList.add("tabs__links"), e.prepend(t)), r.forEach((o, f) => {
2206
- let s = o.querySelector(":scope > summary");
2207
- s.classList.add("visually-hidden");
2007
+ const pi = /* @__PURE__ */ A(Ss, [["render", xs]]), qs = function(t) {
2008
+ const a = t.querySelectorAll(":scope > details");
2009
+ t.querySelectorAll(":scope > details > summary");
2010
+ let e = t.querySelector(":scope > .tabs__links");
2011
+ t.shadowRoot && t.shadowRoot.querySelector(".tabs__links") && (e = t.shadowRoot.querySelector(".tabs__links")), e || (e = document.createElement("div"), e.classList.add("tabs__links"), t.prepend(e)), a.forEach((s, r) => {
2012
+ let n = s.querySelector(":scope > summary");
2013
+ n.classList.add("visually-hidden");
2208
2014
  let i = document.createElement("button");
2209
- o.hasAttribute("id") && (i = document.createElement("a"), i.setAttribute("href", `#${o.getAttribute("id")}`)), o.hasAttribute("open") && i.setAttribute("aria-pressed", !0), i.innerHTML = `${s.innerText}`, i.classList.add("link"), i.setAttribute("data-index", f), i.setAttribute("tabindex", "-1"), t.appendChild(i);
2015
+ s.hasAttribute("id") && (i = document.createElement("a"), i.setAttribute("href", `#${s.getAttribute("id")}`)), s.hasAttribute("open") && i.setAttribute("aria-pressed", !0), i.innerHTML = `${n.innerText}`, i.classList.add("link"), i.setAttribute("data-index", r), i.setAttribute("tabindex", "-1"), e.appendChild(i);
2210
2016
  });
2211
- }, Va = function(e) {
2212
- let r = e.querySelectorAll(":scope > details"), t = e.querySelectorAll(":scope > details > summary"), o = e.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");
2213
- e.shadowRoot && (o = e.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")), o.forEach((f) => {
2214
- f.addEventListener("click", (s) => {
2215
- s.preventDefault(), o.forEach((i) => {
2216
- let n = i == f;
2217
- i.setAttribute("aria-pressed", n);
2218
- }), r.forEach((i, n) => {
2219
- let h = f.getAttribute("data-index") == n;
2017
+ }, $s = function(t) {
2018
+ let a = t.querySelectorAll(":scope > details"), e = t.querySelectorAll(":scope > details > summary"), s = t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");
2019
+ t.shadowRoot && (s = t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")), s.forEach((r) => {
2020
+ r.addEventListener("click", (n) => {
2021
+ n.preventDefault(), s.forEach((i) => {
2022
+ let l = i == r;
2023
+ i.setAttribute("aria-pressed", l);
2024
+ }), a.forEach((i, l) => {
2025
+ let h = r.getAttribute("data-index") == l;
2220
2026
  h ? i.setAttribute("open", h) : i.removeAttribute("open");
2221
- }), f.hasAttribute("href") && history.pushState(void 0, void 0, f.getAttribute("href"));
2027
+ }), r.hasAttribute("href") && history.pushState(void 0, void 0, r.getAttribute("href")), window.dataLayer = window.dataLayer || [], window.dataLayer.push({
2028
+ event: "openTab",
2029
+ tabTitle: r.textContent
2030
+ });
2222
2031
  });
2223
- }), t.forEach((f, s) => {
2224
- f.addEventListener("focus", (i) => {
2225
- o.forEach((n) => {
2226
- n.classList.remove("focus");
2227
- }), o[s].classList.add("focus");
2228
- }), f.addEventListener("click", (i) => {
2229
- i.preventDefault(), o[s].click();
2032
+ }), e.forEach((r, n) => {
2033
+ r.addEventListener("focus", (i) => {
2034
+ s.forEach((l) => {
2035
+ l.classList.remove("focus");
2036
+ }), s[n].classList.add("focus");
2037
+ }), r.addEventListener("click", (i) => {
2038
+ i.preventDefault(), s[n].click();
2230
2039
  });
2231
2040
  });
2232
- }, Fa = function(e) {
2233
- let r = e.querySelectorAll(":scope > details"), t = e.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");
2234
- e.shadowRoot && (t = e.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")), location.hash && e.querySelector(`.tabs__links [href="${location.hash}"]`) ? (e.querySelector(`[href="${location.hash}"]`).setAttribute("open", !0), e.querySelector(`details[id="${location.hash.replace("#", "")}"]`).setAttribute("open", !0)) : e.querySelector("details[open]") || (r[0].setAttribute("open", !0), t[0].setAttribute("aria-pressed", !0));
2235
- }, Oa = function(e) {
2236
- za(e), Va(e), Fa(e);
2041
+ }, Ts = function(t) {
2042
+ let a = t.querySelectorAll(":scope > details"), e = t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");
2043
+ t.shadowRoot && (e = t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")), location.hash && t.querySelector(`.tabs__links [href="${location.hash}"]`) ? (t.querySelector(`[href="${location.hash}"]`).setAttribute("open", !0), t.querySelector(`details[id="${location.hash.replace("#", "")}"]`).setAttribute("open", !0)) : t.querySelector("details[open]") || (a[0].setAttribute("open", !0), e[0].setAttribute("aria-pressed", !0));
2044
+ }, Hs = function(t) {
2045
+ qs(t), $s(t), Ts(t);
2237
2046
  };
2238
- class ja extends HTMLElement {
2047
+ window.dataLayer = window.dataLayer || [];
2048
+ window.dataLayer.push({
2049
+ event: "customElementRegistered",
2050
+ element: "tabs"
2051
+ });
2052
+ class Cs extends HTMLElement {
2239
2053
  constructor() {
2240
2054
  super(), this.attachShadow({ mode: "open" });
2241
- const r = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", t = `@import "${r}/css/components/tabs.css";`, o = document.createElement("template");
2242
- o.innerHTML = `
2055
+ const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", e = `@import "${a}/css/components/tabs.css";`, s = document.createElement("template");
2056
+ s.innerHTML = `
2243
2057
  <style>
2244
- @import "${r}/css/core.min.css";
2245
- ${t}
2058
+ @import "${a}/css/core.min.css";
2059
+ ${e}
2246
2060
 
2247
2061
  ${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
2248
2062
  </style>
@@ -2250,22 +2064,22 @@ class ja extends HTMLElement {
2250
2064
  <div class="tabs__links"></div>
2251
2065
  <slot></slot>
2252
2066
  </div>
2253
- `, this.shadowRoot.appendChild(o.content.cloneNode(!0));
2067
+ `, this.shadowRoot.appendChild(s.content.cloneNode(!0));
2254
2068
  }
2255
2069
  connectedCallback() {
2256
- Oa(this);
2070
+ Hs(this);
2257
2071
  }
2258
2072
  }
2259
- window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", ja);
2260
- const Ra = {
2073
+ window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", Cs);
2074
+ const Ms = {
2261
2075
  name: "Tabs"
2262
- }, Wa = { ref: "wrapper" };
2263
- function Ka(e, r, t, o, f, s) {
2264
- return l(), c("iam-tabs", Wa, [
2265
- b(e.$slots, "default")
2076
+ }, Es = { ref: "wrapper" };
2077
+ function Ns(t, a, e, s, r, n) {
2078
+ return c(), d("iam-tabs", Es, [
2079
+ p(t.$slots, "default")
2266
2080
  ], 512);
2267
2081
  }
2268
- const wi = /* @__PURE__ */ g(Ra, [["render", Ka]]), Ua = {
2082
+ const gi = /* @__PURE__ */ A(Ms, [["render", Ns]]), Ds = {
2269
2083
  name: "Tab",
2270
2084
  props: {
2271
2085
  title: {
@@ -2283,44 +2097,44 @@ const wi = /* @__PURE__ */ g(Ra, [["render", Ka]]), Ua = {
2283
2097
  };
2284
2098
  },
2285
2099
  watch: {
2286
- show(e, r) {
2287
- console.log(e);
2100
+ show(t, a) {
2101
+ console.log(t);
2288
2102
  }
2289
2103
  }
2290
- }, Ga = { class: "tab" }, Za = ["innerHTML"];
2291
- function Ea(e, r, t, o, f, s) {
2292
- return l(), c("details", Ga, [
2293
- a("summary", { innerHTML: t.title }, null, 8, Za),
2294
- b(e.$slots, "default")
2104
+ }, Rs = { class: "tab" }, Ps = ["innerHTML"];
2105
+ function Is(t, a, e, s, r, n) {
2106
+ return c(), d("details", Rs, [
2107
+ o("summary", { innerHTML: e.title }, null, 8, Ps),
2108
+ p(t.$slots, "default")
2295
2109
  ]);
2296
2110
  }
2297
- const ki = /* @__PURE__ */ g(Ua, [["render", Ea]]);
2298
- function Qa(e) {
2299
- if (e.addEventListener("click", function(t) {
2300
- for (var o = t.target; o && o != this; o = o.parentNode)
2301
- if (o.matches(".btn-close")) {
2302
- t.preventDefault(), e.classList.remove("show"), setTimeout(function() {
2303
- e.remove();
2111
+ const vi = /* @__PURE__ */ A(Ds, [["render", Is]]);
2112
+ function Fs(t) {
2113
+ if (t.addEventListener("click", function(e) {
2114
+ for (var s = e.target; s && s != this; s = s.parentNode)
2115
+ if (s.matches(".btn-close")) {
2116
+ e.preventDefault(), t.classList.remove("show"), setTimeout(function() {
2117
+ t.remove();
2304
2118
  }, 300);
2305
2119
  break;
2306
2120
  }
2307
- }, !1), e.hasAttribute("data-timeout")) {
2308
- let t = e.getAttribute("data-timeout");
2121
+ }, !1), t.hasAttribute("data-timeout")) {
2122
+ let e = t.getAttribute("data-timeout");
2309
2123
  setTimeout(function() {
2310
- e.classList.remove("show"), setTimeout(function() {
2311
- e.remove();
2124
+ t.classList.remove("show"), setTimeout(function() {
2125
+ t.remove();
2312
2126
  }, 300);
2313
- }, t);
2127
+ }, e);
2314
2128
  }
2315
2129
  if (!document.querySelector(".alert__holder")) {
2316
2130
  document.getElementsByTagName("BODY")[0];
2317
- let t = document.createElement("div");
2318
- t.classList.add("alert__holder"), document.querySelector("main") ? document.querySelector("main").appendChild(t) : document.body.appendChild(t);
2131
+ let e = document.createElement("div");
2132
+ e.classList.add("alert__holder"), document.querySelector("main") ? document.querySelector("main").appendChild(e) : document.body.appendChild(e);
2319
2133
  }
2320
- let r = document.querySelector(".alert__holder");
2321
- e.classList.contains("alert--fixed") && !e.parentNode.classList.contains("alert__wrapper") && r.appendChild(e);
2134
+ let a = document.querySelector(".alert__holder");
2135
+ t.classList.contains("alert--fixed") && !t.parentNode.classList.contains("alert__wrapper") && a.appendChild(t);
2322
2136
  }
2323
- const Ya = {
2137
+ const Bs = {
2324
2138
  name: "Alert",
2325
2139
  props: {
2326
2140
  dismissible: {
@@ -2339,38 +2153,38 @@ const Ya = {
2339
2153
  }
2340
2154
  },
2341
2155
  mounted() {
2342
- Qa(this.$refs.wrapper);
2156
+ Fs(this.$refs.wrapper);
2343
2157
  }
2344
- }, Ja = ["data-timeout"], Xa = {
2158
+ }, Vs = ["data-timeout"], zs = {
2345
2159
  key: 0,
2346
2160
  type: "button",
2347
2161
  class: "btn-close",
2348
2162
  "data-bs-dismiss": "alert",
2349
2163
  "aria-label": "Close"
2350
2164
  };
2351
- function ei(e, r, t, o, f, s) {
2352
- return l(), c("div", {
2353
- class: v(`container alert pb-0 ${t.dismissible ? "alert--dismissible fade show" : ""}`),
2165
+ function Ws(t, a, e, s, r, n) {
2166
+ return c(), d("div", {
2167
+ class: v(`container alert pb-0 ${e.dismissible ? "alert--dismissible fade show" : ""}`),
2354
2168
  ref: "wrapper",
2355
- "data-timeout": t.timeout,
2356
- style: te(t.timeout ? `--animation-length: ${t.timeout}ms` : "")
2169
+ "data-timeout": e.timeout,
2170
+ style: ne(e.timeout ? `--animation-length: ${e.timeout}ms` : "")
2357
2171
  }, [
2358
- a("div", {
2359
- class: v(`alert__inner bg-${t.colour}`),
2172
+ o("div", {
2173
+ class: v(`alert__inner bg-${e.colour}`),
2360
2174
  role: "alert"
2361
2175
  }, [
2362
- t.dismissible ? (l(), c("button", Xa)) : p("", !0),
2363
- b(e.$slots, "default")
2176
+ e.dismissible ? (c(), d("button", zs)) : _("", !0),
2177
+ p(t.$slots, "default")
2364
2178
  ], 2)
2365
- ], 14, Ja);
2179
+ ], 14, Vs);
2366
2180
  }
2367
- const Si = /* @__PURE__ */ g(Ya, [["render", ei]]);
2368
- let Y = E.props;
2369
- Y.fields.required = !1;
2370
- const ti = {
2181
+ const Ai = /* @__PURE__ */ A(Bs, [["render", Ws]]);
2182
+ let te = ee.props;
2183
+ te.fields.required = !1;
2184
+ const Os = {
2371
2185
  components: {
2372
- Table: E,
2373
- Input: D
2186
+ Table: ee,
2187
+ Input: R
2374
2188
  },
2375
2189
  data() {
2376
2190
  return {
@@ -2379,17 +2193,17 @@ const ti = {
2379
2193
  };
2380
2194
  },
2381
2195
  methods: {
2382
- submitForm: function(e) {
2196
+ submitForm: function(t) {
2383
2197
  console.log(this);
2384
- const r = new FormData(e.target);
2385
- let t = /* @__PURE__ */ new Date();
2386
- const o = t.getFullYear();
2387
- let f = t.getMonth() + 1, s = t.getDate();
2388
- s < 10 && (s = "0" + s), f < 10 && (f = "0" + f), t = s + "/" + f + "/" + o, this.itemsData.unshift({
2389
- date_added: t,
2390
- user: r.get("user"),
2391
- note: r.get("addNote")
2392
- }), this.$emit("formSubmitted", e);
2198
+ const a = new FormData(t.target);
2199
+ let e = /* @__PURE__ */ new Date();
2200
+ const s = e.getFullYear();
2201
+ let r = e.getMonth() + 1, n = e.getDate();
2202
+ n < 10 && (n = "0" + n), r < 10 && (r = "0" + r), e = n + "/" + r + "/" + s, this.itemsData.unshift({
2203
+ date_added: e,
2204
+ user: a.get("user"),
2205
+ note: a.get("addNote")
2206
+ }), this.$emit("formSubmitted", t);
2393
2207
  }
2394
2208
  },
2395
2209
  name: "NoteFeed",
@@ -2398,7 +2212,7 @@ const ti = {
2398
2212
  type: String,
2399
2213
  required: !0
2400
2214
  },
2401
- ...Y,
2215
+ ...te,
2402
2216
  title: {
2403
2217
  type: String,
2404
2218
  required: !1
@@ -2413,62 +2227,216 @@ const ti = {
2413
2227
  required: !1
2414
2228
  }
2415
2229
  }
2416
- }, si = { class: "container note-feed mb-2" }, ai = ["innerHTML"], ii = ["action", "method"], ni = ["value"], ri = /* @__PURE__ */ a("button", { class: "btn btn-tertiary" }, "Submit note", -1);
2417
- function oi(e, r, t, o, f, s) {
2418
- const i = H("Table"), n = H("Input");
2419
- return l(), c("div", si, [
2420
- t.title ? (l(), c("span", {
2230
+ }, js = { class: "container note-feed mb-2" }, Us = ["innerHTML"], Ks = ["action", "method"], Gs = ["value"], Qs = /* @__PURE__ */ o("button", { class: "btn btn-tertiary" }, "Submit note", -1);
2231
+ function Ys(t, a, e, s, r, n) {
2232
+ const i = E("Table"), l = E("Input");
2233
+ return c(), d("div", js, [
2234
+ e.title ? (c(), d("span", {
2421
2235
  key: 0,
2422
2236
  class: "h3",
2423
- innerHTML: t.title
2424
- }, null, 8, ai)) : p("", !0),
2425
- S(i, T({
2237
+ innerHTML: e.title
2238
+ }, null, 8, Us)) : _("", !0),
2239
+ S(i, H({
2426
2240
  fields: [{ key: "date_added" }, { key: "user" }, { key: "note" }],
2427
- items: f.itemsData
2428
- }, e.$props, { class: "mb-0" }), null, 16, ["items"]),
2429
- a("form", {
2430
- action: t.action,
2431
- method: t.method,
2432
- onSubmit: r[0] || (r[0] = se((h) => s.submitForm(...arguments), ["prevent"]))
2241
+ items: r.itemsData
2242
+ }, t.$props, { class: "mb-0" }), null, 16, ["items"]),
2243
+ o("form", {
2244
+ action: e.action,
2245
+ method: e.method,
2246
+ onSubmit: a[0] || (a[0] = re((h) => n.submitForm(...arguments), ["prevent"]))
2433
2247
  }, [
2434
- a("input", {
2248
+ o("input", {
2435
2249
  type: "hidden",
2436
- value: t.user,
2250
+ value: e.user,
2437
2251
  name: "user"
2438
- }, null, 8, ni),
2439
- S(n, {
2252
+ }, null, 8, Gs),
2253
+ S(l, {
2440
2254
  id: "addNote",
2441
2255
  type: "textarea",
2442
2256
  label: "Add note",
2443
2257
  required: "",
2444
2258
  class: "mw-100"
2445
2259
  }),
2446
- ri
2447
- ], 40, ii)
2260
+ Qs
2261
+ ], 40, Ks)
2262
+ ]);
2263
+ }
2264
+ const wi = /* @__PURE__ */ A(Os, [["render", Ys]]);
2265
+ function Zs(t, a) {
2266
+ function e(s, r) {
2267
+ let n = !1, i = r.getAttribute("name");
2268
+ i.includes("[]") && (i = i.replace("[]", `[${r.value}]`));
2269
+ let l = s.querySelector(`[data-name="${i}"]`);
2270
+ l && r.getAttribute("type") == "checkbox" && (n = !0);
2271
+ let h = r.getAttribute("data-filter-text");
2272
+ if (l || (l = document.createElement("button"), s.appendChild(l)), l.setAttribute("type", "button"), l.classList.add("filter"), l.setAttribute("data-name", i), l.innerHTML = h.replace("$value", r.value), (!r.value || n) && l.remove(), r.parentNode.closest("[data-filter-text]")) {
2273
+ let u = r.parentNode.closest("[data-filter-text]"), m = !0;
2274
+ if (i = "", u.querySelectorAll("input").forEach((f, b) => {
2275
+ let g = f.getAttribute("name");
2276
+ if (i += `${b != 0 ? "," : ""}${g}`, s.querySelector(`[data-name="${g}"]`) && s.querySelector(`[data-name="${g}"]`).remove(), f.value) {
2277
+ let y = document.createElement("button");
2278
+ y.setAttribute("type", "button"), y.classList.add("filter"), y.setAttribute("data-name", g), y.innerHTML = h.replace("$value", f.value), s.appendChild(y);
2279
+ } else
2280
+ m = !1;
2281
+ }), s.querySelector(`[data-name="${i}"]`) && s.querySelector(`[data-name="${i}"]`).remove(), m) {
2282
+ let f = u.getAttribute("data-filter-text");
2283
+ u.querySelectorAll("input").forEach((g, y) => {
2284
+ let C = g.getAttribute("name");
2285
+ s.querySelector(`[data-name="${C}"]`) && s.querySelector(`[data-name="${C}"]`).remove(), f = f.replace(`$${y + 1}`, g.value);
2286
+ });
2287
+ let b = document.createElement("button");
2288
+ b.setAttribute("type", "button"), b.classList.add("filter"), b.setAttribute("data-name", i), b.innerHTML = f, s.appendChild(b);
2289
+ }
2290
+ }
2291
+ }
2292
+ Array.from(t.querySelectorAll('input[type="checkbox"]:checked')).forEach((s, r) => {
2293
+ e(a, s);
2294
+ }), t.addEventListener("change", function(s) {
2295
+ if (s && s.target instanceof HTMLElement && s.target.closest("input[data-filter-text]")) {
2296
+ let r = s.target.closest("input[data-filter-text]");
2297
+ e(a, r);
2298
+ }
2299
+ }, !1), a.addEventListener("click", function(s) {
2300
+ if (s && s.target instanceof HTMLElement && s.target.closest(".filter")) {
2301
+ let i = s.target.closest(".filter"), l = i.getAttribute("data-name").split(",");
2302
+ for (var r = 0; r < l.length; r++) {
2303
+ let h = l[r], u = `[name="${h}"]`;
2304
+ if (h.match(/\[(.*)\]/)) {
2305
+ let f = h.replace(/\[(.*)\]/, "[]"), b = h.replace(/.*\[(.*)\]/, "$1");
2306
+ u = `[name="${f}"][value="${b}"]`;
2307
+ }
2308
+ let m = t.querySelectorAll(u);
2309
+ for (var n = 0; n < m.length; n++) {
2310
+ let f = m[n];
2311
+ f.getAttribute("type") != "radio" && f.getAttribute("type") != "checkbox" && (m[n].value = ""), m[n].checked = !1;
2312
+ }
2313
+ }
2314
+ i.remove();
2315
+ }
2316
+ }, !1);
2317
+ }
2318
+ const ae = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", Xs = `@import "${ae}/css/components/applied-filters.css";`;
2319
+ class Js extends HTMLElement {
2320
+ constructor() {
2321
+ super(), this.attachShadow({ mode: "open" });
2322
+ let a = this.classList.toString();
2323
+ const e = document.createElement("template");
2324
+ e.innerHTML = `
2325
+ <style>
2326
+ @import "${ae}/css/core.min.css";
2327
+ ${Xs}
2328
+ ${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
2329
+ </style>
2330
+ <div class="applied-filters ${a}"></div>
2331
+ <slot></slot>
2332
+ `, this.shadowRoot.appendChild(e.content.cloneNode(!0));
2333
+ }
2334
+ connectedCallback() {
2335
+ Zs(this, this.shadowRoot.querySelector(".applied-filters"));
2336
+ }
2337
+ }
2338
+ window.customElements.get("iam-applied-filters") || window.customElements.define("iam-applied-filters", Js);
2339
+ const ei = {
2340
+ name: "Header"
2341
+ };
2342
+ function ti(t, a, e, s, r, n) {
2343
+ return c(), d("iam-applied-filters", null, [
2344
+ p(t.$slots, "default")
2345
+ ]);
2346
+ }
2347
+ const Si = /* @__PURE__ */ A(ei, [["render", ti]]);
2348
+ function ai(t, a) {
2349
+ si(t, a);
2350
+ }
2351
+ function si(t, a) {
2352
+ var e;
2353
+ a.addEventListener("keyup", (s) => {
2354
+ clearTimeout(e), e = setTimeout(function() {
2355
+ K(t, a.value);
2356
+ }, 500);
2357
+ }), a.addEventListener("change", (s) => {
2358
+ clearTimeout(e), K(t, a.value);
2359
+ });
2360
+ }
2361
+ const K = function(t, a) {
2362
+ Array.from(t.querySelectorAll(":scope > li")).forEach((e, s) => {
2363
+ let r = e.textContent.toLowerCase();
2364
+ e.classList.add("d-none"), r.includes(a.toLowerCase()) && e.classList.remove("d-none");
2365
+ }), window.dataLayer = window.dataLayer || [], window.dataLayer.push({
2366
+ event: "Filtered list",
2367
+ value: a
2368
+ });
2369
+ };
2370
+ window.dataLayer = window.dataLayer || [];
2371
+ window.dataLayer.push({
2372
+ event: "customElementRegistered",
2373
+ element: "filterlist"
2374
+ });
2375
+ class ii extends HTMLElement {
2376
+ constructor() {
2377
+ super(), this.attachShadow({ mode: "open" });
2378
+ const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", e = document.createElement("template");
2379
+ e.innerHTML = `
2380
+ <style>
2381
+ @import "${a}/css/core.min.css";
2382
+ ${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
2383
+
2384
+ :host {
2385
+ margin-bottom: 3rem;
2386
+ display:block;
2387
+ }
2388
+ </style>
2389
+ <div class="form-control__wrapper">
2390
+ <label for="search" class="visually-hidden">Search</label>
2391
+ <span class="suffix" role="presentation"><slot name="icon"></slot></span>
2392
+ <input name="search" id="search" type="text" class="form-control" autocomplete="off">
2393
+ </div>
2394
+ <div class="list__wrapper">
2395
+ <slot></slot>
2396
+ </div>
2397
+ `, this.shadowRoot.appendChild(e.content.cloneNode(!0));
2398
+ }
2399
+ connectedCallback() {
2400
+ const a = {
2401
+ small: "12.5rem",
2402
+ medium: "25rem",
2403
+ large: "37.5rem"
2404
+ };
2405
+ let e = this.hasAttribute("data-max-height") && a[this.getAttribute("data-max-height")] ? "list__wrapper--" + this.getAttribute("data-max-height") : "";
2406
+ this.shadowRoot.querySelector(".list__wrapper").classList.add(e), this.querySelector("i.fa-search") || (this.innerHTML += '<i class="fa fa-light fa-search" aria-hidden="true" slot="icon"></i>'), ai(this.querySelector("ul"), this.shadowRoot.querySelector("#search"));
2407
+ }
2408
+ }
2409
+ window.customElements.get("iam-filterlist") || window.customElements.define("iam-filterlist", ii);
2410
+ const li = {
2411
+ name: "Filter list"
2412
+ };
2413
+ function ni(t, a, e, s, r, n) {
2414
+ return c(), d("iam-filterlist", null, [
2415
+ p(t.$slots, "default")
2448
2416
  ]);
2449
2417
  }
2450
- const $i = /* @__PURE__ */ g(ti, [["render", oi]]);
2418
+ const Li = /* @__PURE__ */ A(li, [["render", ni]]);
2451
2419
  export {
2452
- ui as Accordion,
2453
- fi as AccordionItem,
2454
- Si as Alert,
2455
- hi as Banner,
2456
- Q as Card,
2457
- Ct as CardDeck,
2458
- mi as Carousel,
2459
- di as FileUploads,
2460
- _i as Header,
2461
- oe as Icon,
2462
- D as Input,
2463
- fe as Logo,
2464
- vi as Modal,
2420
+ ci as Accordion,
2421
+ di as AccordionItem,
2422
+ Ai as Alert,
2423
+ Si as AppliedFilters,
2424
+ ui as Banner,
2425
+ Nt as Card,
2426
+ hi as Carousel,
2427
+ oi as FileUploads,
2428
+ Li as Filterlist,
2429
+ mi as Header,
2430
+ he as Icon,
2431
+ R as Input,
2432
+ _e as Logo,
2465
2433
  bi as Nav,
2466
- $i as NoteFeed,
2467
- pi as PropertySearchbar,
2468
- Ai as Step,
2469
- gi as Stepper,
2470
- ki as Tab,
2471
- E as Table,
2472
- wi as Tabs,
2473
- yi as Testimonial
2434
+ wi as NoteFeed,
2435
+ yi as PropertySearchbar,
2436
+ pi as Step,
2437
+ _i as Stepper,
2438
+ vi as Tab,
2439
+ ee as Table,
2440
+ gi as Tabs,
2441
+ fi as Testimonial
2474
2442
  };