copious-mail 0.0.0-stage → 0.9.0

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 (182) hide show
  1. package/LICENSE +504 -0
  2. package/README.md +83 -2
  3. package/bin/index.js +345 -0
  4. package/client/copiousLogo.svg +123 -0
  5. package/client/hosted.html +5173 -0
  6. package/client/mail_styles.css +40 -0
  7. package/client/mikado.bundle.debug.js +1406 -0
  8. package/client/mikado.bundle.min.js +68 -0
  9. package/client/mikado.bundle.module.debug.js +1401 -0
  10. package/client/mikado.bundle.module.min.js +67 -0
  11. package/client/mikado.bundle.profiler.debug.js +1490 -0
  12. package/client/mikado.es5.debug.js +1995 -0
  13. package/client/mikado.es5.min.js +85 -0
  14. package/client/mikado.light.debug.js +535 -0
  15. package/client/mikado.light.min.js +29 -0
  16. package/client/mikado.light.module.debug.js +530 -0
  17. package/data/user_list.db +14 -0
  18. package/index.html +7242 -0
  19. package/index.js +5 -0
  20. package/jsconfig.json +32 -0
  21. package/lib/mail_repo_bridge_ops.js +1158 -0
  22. package/lib/utils.js +70 -0
  23. package/lib/websocket_con.js +248 -0
  24. package/mail_bridge.conf +10 -0
  25. package/package.json +41 -5
  26. package/svelte-src/App.svelte +2513 -0
  27. package/svelte-src/ContactGrid.svelte +98 -0
  28. package/svelte-src/FloatWindow.svelte +181 -0
  29. package/svelte-src/MessageDisplay.svelte +230 -0
  30. package/svelte-src/MessageEditor.svelte +664 -0
  31. package/svelte-src/MessageListEditor.svelte +133 -0
  32. package/svelte-src/Thing.svelte +190 -0
  33. package/svelte-src/ThingFull.svelte +117 -0
  34. package/svelte-src/ipfs_profile_proxy.js +923 -0
  35. package/svelte-src/main.js +10 -0
  36. package/svelte-src/search_box.js +69 -0
  37. package/svelte-src/utilities.js +180 -0
  38. package/test/c +28 -0
  39. package/test/copiousLogo.svg +123 -0
  40. package/test/index.html +4408 -0
  41. package/test/index.js +244 -0
  42. package/test/mail_styles.css +40 -0
  43. package/test/mikado.bundle.debug.js +1406 -0
  44. package/test/mikado.bundle.min.js +68 -0
  45. package/test/mikado.bundle.module.debug.js +1401 -0
  46. package/test/mikado.bundle.module.min.js +67 -0
  47. package/test/mikado.bundle.profiler.debug.js +1490 -0
  48. package/test/mikado.es5.debug.js +1995 -0
  49. package/test/mikado.es5.min.js +85 -0
  50. package/test/mikado.light.debug.js +535 -0
  51. package/test/mikado.light.min.js +29 -0
  52. package/test/mikado.light.module.debug.js +530 -0
  53. package/test/tpl/partial/attachment_edit.es5.js +1 -0
  54. package/test/tpl/partial/attachment_edit.html +5 -0
  55. package/test/tpl/partial/attachment_edit.js +1 -0
  56. package/test/tpl/partial/attachment_view.es5.js +1 -0
  57. package/test/tpl/partial/attachment_view.html +1 -0
  58. package/test/tpl/partial/attachment_view.js +1 -0
  59. package/test/tpl/partial/contact_list.es5.js +1 -0
  60. package/test/tpl/partial/contact_list.html +9 -0
  61. package/test/tpl/partial/contact_list.js +1 -0
  62. package/test/tpl/partial/draft_list.es5.js +1 -0
  63. package/test/tpl/partial/draft_list.html +8 -0
  64. package/test/tpl/partial/draft_list.js +1 -0
  65. package/test/tpl/partial/inbox_list.es5.js +1 -0
  66. package/test/tpl/partial/inbox_list.html +7 -0
  67. package/test/tpl/partial/inbox_list.js +1 -0
  68. package/test/tpl/partial/notify_list.es5.js +1 -0
  69. package/test/tpl/partial/notify_list.html +8 -0
  70. package/test/tpl/partial/notify_list.js +1 -0
  71. package/test/tpl/partial/sent_list.es5.js +1 -0
  72. package/test/tpl/partial/sent_list.html +7 -0
  73. package/test/tpl/partial/sent_list.js +1 -0
  74. package/test/tpl/partial/spam_list.es5.js +1 -0
  75. package/test/tpl/partial/spam_list.html +8 -0
  76. package/test/tpl/partial/spam_list.js +1 -0
  77. package/test/tpl/partial/trash_list.es5.js +1 -0
  78. package/test/tpl/partial/trash_list.html +7 -0
  79. package/test/tpl/partial/trash_list.js +1 -0
  80. package/test/tpl/partial/user.es5.js +1 -0
  81. package/test/tpl/partial/user.html +18 -0
  82. package/test/tpl/partial/user.js +1 -0
  83. package/tools/jsdoc.conf +47 -0
  84. package/tools/templates/docdash/publish.js +843 -0
  85. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  86. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  87. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  88. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  89. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  90. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  91. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  92. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  93. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  94. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  95. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  96. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  97. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  98. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  99. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  100. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  101. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  102. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  103. package/tools/templates/docdash/static/scripts/collapse.js +67 -0
  104. package/tools/templates/docdash/static/scripts/commonNav.js +28 -0
  105. package/tools/templates/docdash/static/scripts/linenumber.js +25 -0
  106. package/tools/templates/docdash/static/scripts/nav.js +12 -0
  107. package/tools/templates/docdash/static/scripts/polyfill.js +4 -0
  108. package/tools/templates/docdash/static/scripts/prettify/Apache-License-2.0.txt +202 -0
  109. package/tools/templates/docdash/static/scripts/prettify/lang-css.js +2 -0
  110. package/tools/templates/docdash/static/scripts/prettify/prettify.js +28 -0
  111. package/tools/templates/docdash/static/scripts/search.js +99 -0
  112. package/tools/templates/docdash/static/styles/jsdoc.css +803 -0
  113. package/tools/templates/docdash/static/styles/prettify.css +80 -0
  114. package/tools/templates/docdash/tmpl/augments.tmpl +10 -0
  115. package/tools/templates/docdash/tmpl/container.tmpl +203 -0
  116. package/tools/templates/docdash/tmpl/details.tmpl +152 -0
  117. package/tools/templates/docdash/tmpl/example.tmpl +2 -0
  118. package/tools/templates/docdash/tmpl/examples.tmpl +13 -0
  119. package/tools/templates/docdash/tmpl/exceptions.tmpl +32 -0
  120. package/tools/templates/docdash/tmpl/layout.tmpl +102 -0
  121. package/tools/templates/docdash/tmpl/mainpage.tmpl +15 -0
  122. package/tools/templates/docdash/tmpl/members.tmpl +38 -0
  123. package/tools/templates/docdash/tmpl/method.tmpl +132 -0
  124. package/tools/templates/docdash/tmpl/modifies.tmpl +14 -0
  125. package/tools/templates/docdash/tmpl/namespace.tmpl +133 -0
  126. package/tools/templates/docdash/tmpl/params.tmpl +132 -0
  127. package/tools/templates/docdash/tmpl/properties.tmpl +107 -0
  128. package/tools/templates/docdash/tmpl/returns.tmpl +19 -0
  129. package/tools/templates/docdash/tmpl/source.tmpl +8 -0
  130. package/tools/templates/docdash/tmpl/tutorial.tmpl +19 -0
  131. package/tools/templates/docdash/tmpl/type.tmpl +26 -0
  132. package/tools/templates/templates/docdash/publish.js +843 -0
  133. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  134. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  135. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  136. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  137. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  138. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  139. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  140. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  141. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  142. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  143. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  144. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  145. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  146. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  147. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  148. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  149. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  150. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  151. package/tools/templates/templates/docdash/static/scripts/collapse.js +67 -0
  152. package/tools/templates/templates/docdash/static/scripts/commonNav.js +28 -0
  153. package/tools/templates/templates/docdash/static/scripts/linenumber.js +25 -0
  154. package/tools/templates/templates/docdash/static/scripts/nav.js +12 -0
  155. package/tools/templates/templates/docdash/static/scripts/polyfill.js +4 -0
  156. package/tools/templates/templates/docdash/static/scripts/prettify/Apache-License-2.0.txt +202 -0
  157. package/tools/templates/templates/docdash/static/scripts/prettify/lang-css.js +2 -0
  158. package/tools/templates/templates/docdash/static/scripts/prettify/prettify.js +28 -0
  159. package/tools/templates/templates/docdash/static/scripts/search.js +99 -0
  160. package/tools/templates/templates/docdash/static/styles/jsdoc.css +803 -0
  161. package/tools/templates/templates/docdash/static/styles/prettify.css +80 -0
  162. package/tools/templates/templates/docdash/tmpl/augments.tmpl +10 -0
  163. package/tools/templates/templates/docdash/tmpl/container.tmpl +203 -0
  164. package/tools/templates/templates/docdash/tmpl/details.tmpl +152 -0
  165. package/tools/templates/templates/docdash/tmpl/example.tmpl +2 -0
  166. package/tools/templates/templates/docdash/tmpl/examples.tmpl +13 -0
  167. package/tools/templates/templates/docdash/tmpl/exceptions.tmpl +32 -0
  168. package/tools/templates/templates/docdash/tmpl/layout.tmpl +102 -0
  169. package/tools/templates/templates/docdash/tmpl/mainpage.tmpl +15 -0
  170. package/tools/templates/templates/docdash/tmpl/members.tmpl +38 -0
  171. package/tools/templates/templates/docdash/tmpl/method.tmpl +132 -0
  172. package/tools/templates/templates/docdash/tmpl/modifies.tmpl +14 -0
  173. package/tools/templates/templates/docdash/tmpl/namespace.tmpl +133 -0
  174. package/tools/templates/templates/docdash/tmpl/params.tmpl +132 -0
  175. package/tools/templates/templates/docdash/tmpl/properties.tmpl +107 -0
  176. package/tools/templates/templates/docdash/tmpl/returns.tmpl +19 -0
  177. package/tools/templates/templates/docdash/tmpl/source.tmpl +8 -0
  178. package/tools/templates/templates/docdash/tmpl/tutorial.tmpl +19 -0
  179. package/tools/templates/templates/docdash/tmpl/type.tmpl +26 -0
  180. package/tpl/partial/user.es5.js +1 -0
  181. package/tpl/partial/user.html +10 -0
  182. package/tpl/partial/user.js +1 -0
@@ -0,0 +1,1401 @@
1
+ /**!
2
+ * Mikado.js v0.8.400 (Bundle/Module/Debug)
3
+ * Copyright 2019-2024 Nextapps GmbH
4
+ * Author: Thomas Wilkerling
5
+ * Licence: Apache-2.0
6
+ * https://github.com/nextapps-de/mikado
7
+ */
8
+ var n;
9
+ const p = {}, w = {}, y = Object.create(null), z = Object.create(null), B = document.documentElement || document.body.parentNode, C = "ontouchstart" in window, D = !C && window.PointerEvent && navigator.maxTouchPoints;
10
+ let aa;
11
+ function E(a, b) {
12
+ const c = a.target;
13
+ if (c !== window && c !== B) {
14
+ b || (b = a.type);
15
+ var d = c["_mke" + b];
16
+ if ("undefined" === typeof d) {
17
+ for (var e = c; e && e !== B;) {
18
+ var f = void 0;
19
+ "click" === b && aa && (f = e.getAttribute("tap"));
20
+ f || (f = e.getAttribute(b));
21
+ if (f) {
22
+ if ("$" === f[0]) {
23
+ var h = e === c;
24
+ f = f.substring(1);
25
+ }
26
+ var k = f.indexOf(":"), g = e, l = void 0;
27
+ if (-1 < k) {
28
+ l = f.endsWith(":*");
29
+ const m = f.substring(0, k);
30
+ k = f.substring(k + 1, f.length - (l ? 2 : 0));
31
+ for (f = ""; (g = g.parentElement) !== B;) {
32
+ if ("root" === k ? g._mkr : g.hasAttribute(k)) {
33
+ f = m;
34
+ break;
35
+ }
36
+ }
37
+ f || console.warn("Event root '" + k + "' was not found for the event: '" + m + "'.");
38
+ }
39
+ if (f && (d || (d = [], h && (c["_mke" + b] = d)), d.push([f, g]), g = z[f], !l || g && (g.stop || g.cancel))) {
40
+ break;
41
+ }
42
+ }
43
+ e = e.parentElement;
44
+ }
45
+ h && (d || (c["_mke" + b] = null));
46
+ }
47
+ if (d) {
48
+ for (let m = 0, q; m < d.length; m++) {
49
+ if (q = d[m], e = q[0], f = y[e]) {
50
+ l = q[1];
51
+ if (g = z[e]) {
52
+ g.prevent && a.preventDefault(), g.stop && a.stopImmediatePropagation(), g.once && (y[e] = null, h && (c["_mke" + b] = null));
53
+ }
54
+ f(l, a);
55
+ } else {
56
+ console.warn("The route '" + e + "' is not defined for the event '" + b + "'.");
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ function ba(a, b, c) {
63
+ if (!a) {
64
+ throw Error("Missing route name.");
65
+ }
66
+ if (!y[a]) {
67
+ throw Error("Undefined route '" + a + "'.");
68
+ }
69
+ y[a](b || this, c || window.event);
70
+ return this;
71
+ }
72
+ function ca(a, b) {
73
+ p[a] || (F(1, a, E, b), p[a] = 1, w[a] = b || null);
74
+ return this;
75
+ }
76
+ let H, I, da;
77
+ if (C || D) {
78
+ function a(d) {
79
+ var e = d;
80
+ (d = d.touches) && (e = d[0]);
81
+ H = e.clientX;
82
+ I = e.clientY;
83
+ }
84
+ function b(d) {
85
+ const e = H, f = I;
86
+ var h = d, k = d.changedTouches;
87
+ k && (h = k[0]);
88
+ H = h.clientX;
89
+ I = h.clientY;
90
+ 15 > Math.abs(H - e) && 15 > Math.abs(I - f) && E(d, "tap");
91
+ }
92
+ const c = {passive:!1, capture:!0};
93
+ da = function(d) {
94
+ F(d, D ? "pointerdown" : "touchstart", a, c);
95
+ F(d, D ? "pointerup" : "touchend", b, c);
96
+ };
97
+ }
98
+ function F(a, b, c, d) {
99
+ if ("tap" === b) {
100
+ if (C || D) {
101
+ da(a);
102
+ return;
103
+ }
104
+ aa = !0;
105
+ b = "click";
106
+ }
107
+ window[(a ? "add" : "remove") + "EventListener"](b, c, d || !1 === d ? d : !0);
108
+ }
109
+ ;function K(a, b, c) {
110
+ let d;
111
+ c && (d = a._mkc) && (a._mkc = null);
112
+ const e = b.length, f = [], h = {};
113
+ for (let l = 0, m, q, t, r, v = null; l < e; l++) {
114
+ m = b[l];
115
+ if (q = m.v) {
116
+ if (r = t = h[q], !r) {
117
+ a: {
118
+ var k = a, g = q;
119
+ for (let u = 0, J = g.length, A = ""; u < J; u++) {
120
+ const x = g[u];
121
+ A += x;
122
+ if (h[A]) {
123
+ k = h[A];
124
+ } else {
125
+ if (">" === x) {
126
+ k = k.firstChild;
127
+ } else {
128
+ if ("|" === x) {
129
+ t = [k.firstChild, k];
130
+ break a;
131
+ }
132
+ if ("@" === x) {
133
+ t = [k.style, k];
134
+ break a;
135
+ }
136
+ k = k.nextSibling;
137
+ }
138
+ h[A] = k;
139
+ }
140
+ }
141
+ t = [k];
142
+ }
143
+ r = t[0];
144
+ t = t[1] || r;
145
+ }
146
+ } else {
147
+ r = t = a;
148
+ }
149
+ c && (v = d ? d[l] : {}, t._mkc = v);
150
+ f[l] = new L(v, r, "");
151
+ }
152
+ return a._mkp = f;
153
+ }
154
+ function M(a, b, c, d, e, f) {
155
+ f || (a.i = 1);
156
+ const h = e || (b.tag ? b.svg ? document.createElementNS("http://www.w3.org/2000/svg", b.tag) : document.createElement(b.tag) : document.createTextNode(b.text));
157
+ let k, g;
158
+ if (g = b.class) {
159
+ "object" === typeof g ? (c.push(new L(k = {_c:""}, h, d)), (g = g[0]) ? N(a, g, {fn:"_c", index:c.length - 1}) : a.i = 0) : e || (h.className = g);
160
+ }
161
+ if (g = b.attr) {
162
+ for (const m in g) {
163
+ let q = g[m];
164
+ "object" === typeof q ? (k || c.push(new L(k = {}, h, d)), k["_a" + m] = !1, (q = q[0]) ? N(a, q, {fn:"_a", index:c.length - 1, key:m}) : a.i = 0) : e || h.setAttribute(m, q);
165
+ }
166
+ }
167
+ if (g = b.event) {
168
+ for (let m in g) {
169
+ let q;
170
+ if (!e) {
171
+ if ("load" === m || "error" === m) {
172
+ window.dispatch = ba, g["on" + m] = "dispatch('" + g[m] + "', this)", m = "on" + m, q = 1;
173
+ }
174
+ h.setAttribute(m, g[m]);
175
+ }
176
+ q || ca(m);
177
+ }
178
+ }
179
+ if (g = b.style) {
180
+ "object" === typeof g ? (c.push(new L(k || (k = {}), h.style, d + "@")), k._s = "", (g = g[0]) ? N(a, g, {fn:"_s", index:c.length - 1}) : a.i = 0) : e || (h.style.cssText = g);
181
+ }
182
+ if (g = b.text) {
183
+ if ("object" === typeof g) {
184
+ var l = h;
185
+ g = g[0];
186
+ b.tag ? (d += "|", l = !e && h.firstChild, l || (l = document.createTextNode(g), h.appendChild(l))) : k = {};
187
+ (k || (k = {}))._t = g;
188
+ c.push(new L(k, l, d));
189
+ g ? N(a, g, {fn:"_t", index:c.length - 1}) : a.i = 0;
190
+ } else {
191
+ e || (b.tag ? h.textContent = g : h.nodeValue = g);
192
+ }
193
+ } else if (g = b.child) {
194
+ if (e && (e = e.firstChild, !e)) {
195
+ return console.warn("Hydration failed of template '" + a.name + "' because the existing DOM structure was incompatible. Falls back to factory construction instead."), null;
196
+ }
197
+ g.constructor !== Array && (g = [g]);
198
+ for (let m = 0, q, t = g.length; m < t; m++) {
199
+ if (q = g[m], d = m ? d + "+" : d + ">", b = M(a, q, c, d, e, 1), e) {
200
+ if (m < t - 1 && (e = e.nextSibling, !e)) {
201
+ return console.warn("Hydration failed of template '" + a.name + "' because the existing DOM structure was incompatible. Falls back to factory construction instead."), null;
202
+ }
203
+ } else {
204
+ h.appendChild(b);
205
+ }
206
+ }
207
+ } else if (g = b.html) {
208
+ "object" === typeof g ? (k || c.push(new L(k = {}, h, d)), k._h = "", (g = g[0]) ? N(a, g, {fn:"_h", index:c.length - 1}) : a.i = 0) : e || (h.innerHTML = g);
209
+ } else if (g = b.inc) {
210
+ k || c.push(new L(null, h, d));
211
+ if ("string" === typeof g) {
212
+ l = O[g];
213
+ if (!l) {
214
+ throw Error("The partial template '" + g + "' which is included by the root template '" + a.name + "' was not registered. When using named includes make sure you register all your includes by Mikado.register(tpl) before instantiating the Mikado view instance.");
215
+ }
216
+ if (!(l instanceof P)) {
217
+ d = l[0];
218
+ if (b = l[1]) {
219
+ b.async = !1, e && (b.root = e, b.hydrate = !0);
220
+ }
221
+ O[g] = l = new P(d, b);
222
+ }
223
+ } else if (1 !== g) {
224
+ d = a.inc.length;
225
+ if (!a.tpl.fn.length) {
226
+ throw Error("The template '" + a.name + "|" + d + "' has conflicts. It should provide a handler entry, but wasn't found.");
227
+ }
228
+ l = new P({name:a.name + "|" + d, tpl:g, key:g.key, cache:g.cache, fn:a.tpl.fn}, {recycle:a.recycle, cache:a.cache, pool:!!a.pool, state:a.state, mount:h, hydrate:!!e});
229
+ }
230
+ 1 !== g && a.inc.push(l);
231
+ }
232
+ k && (h._mkc = k);
233
+ f || (h._mkp = c);
234
+ return h;
235
+ }
236
+ function N(a, b, c) {
237
+ a.proxy || (a.proxy = {});
238
+ (a.proxy[b] || (a.proxy[b] = [])).push(c);
239
+ }
240
+ const Q = {checked:1, selected:1, hidden:1};
241
+ function L(a, b, c) {
242
+ this.c = a;
243
+ this.n = b;
244
+ this.v = c;
245
+ }
246
+ n = L.prototype;
247
+ n._a = function(a, b, c, d, e) {
248
+ if (this.c) {
249
+ if (d) {
250
+ if (e || 0 === e) {
251
+ d = d[e] || (d[e] = {});
252
+ }
253
+ d["_a" + a] = b;
254
+ }
255
+ if (this.c["_a" + a] === b) {
256
+ return;
257
+ }
258
+ this.c["_a" + a] = b;
259
+ }
260
+ !Q[a] || c && "selected" === a ? !1 === b ? this.n.removeAttribute(a) : this.n.setAttribute(a, b) : this.n[a] = b;
261
+ };
262
+ n._t = function(a, b, c) {
263
+ if (this.c) {
264
+ if (b) {
265
+ if (c || 0 === c) {
266
+ b = b[c] || (b[c] = {});
267
+ }
268
+ b._t = a;
269
+ }
270
+ if (this.c._t === a) {
271
+ return;
272
+ }
273
+ this.c._t = a;
274
+ }
275
+ this.n.nodeValue = a;
276
+ };
277
+ n._c = function(a, b, c) {
278
+ if (this.c) {
279
+ if (b) {
280
+ if (c || 0 === c) {
281
+ b = b[c] || (b[c] = {});
282
+ }
283
+ b._c = a;
284
+ }
285
+ if (this.c._c === a) {
286
+ return;
287
+ }
288
+ this.c._c = a;
289
+ }
290
+ this.n.className = a;
291
+ };
292
+ n._s = function(a, b, c) {
293
+ if (this.c) {
294
+ if (b) {
295
+ if (c || 0 === c) {
296
+ b = b[c] || (b[c] = {});
297
+ }
298
+ b._s = a;
299
+ }
300
+ if (this.c._s === a) {
301
+ return;
302
+ }
303
+ this.c._s = a;
304
+ }
305
+ this.n.cssText = a;
306
+ };
307
+ n._h = function(a, b, c) {
308
+ if (this.c) {
309
+ if (b) {
310
+ if (c || 0 === c) {
311
+ b = b[c] || (b[c] = {});
312
+ }
313
+ b._h = a;
314
+ }
315
+ if (this.c._h === a) {
316
+ return;
317
+ }
318
+ this.c._h = a;
319
+ }
320
+ this.n.innerHTML = a;
321
+ };
322
+ const fa = window.Proxy || function() {
323
+ function a(b, c) {
324
+ this.path = c.path;
325
+ this.fn = c.fn;
326
+ for (const d in b) {
327
+ this.h(b, d, b[d]);
328
+ }
329
+ b._mkx = this;
330
+ return b;
331
+ }
332
+ a.prototype.h = function(b, c, d) {
333
+ const e = this;
334
+ Object.defineProperty(b, c, {get:function() {
335
+ return d;
336
+ }, set:function(f) {
337
+ ea(e, d = f, c);
338
+ }});
339
+ };
340
+ return a;
341
+ }();
342
+ function ha(a, b) {
343
+ return "_mkx" === b ? this : a[b];
344
+ }
345
+ function ia(a, b, c) {
346
+ ea(this, c, b);
347
+ a[b] = c;
348
+ return !0;
349
+ }
350
+ function ea(a, b, c) {
351
+ if (c = a.fn[c]) {
352
+ for (let e = 0; e < c.length; e++) {
353
+ var d = c[e];
354
+ const f = d.fn, h = a.path[d.index];
355
+ d = d.key || "";
356
+ h.c && h.c[f + d] === b || (d ? h[f](d, b) : h[f](b));
357
+ }
358
+ }
359
+ }
360
+ ;const O = Object.create(null);
361
+ function P(a, b = {}) {
362
+ if (!(this instanceof P)) {
363
+ return new P(a, b);
364
+ }
365
+ if ("string" === typeof a) {
366
+ var c = O[a];
367
+ if (!c) {
368
+ throw Error("The template '" + a + "' is not registered.");
369
+ }
370
+ if (c instanceof P) {
371
+ return c;
372
+ }
373
+ a = c[0];
374
+ b || (b = c[1]);
375
+ }
376
+ if (!a) {
377
+ throw Error("Initialization Error: Template is not defined.");
378
+ }
379
+ if (!a.tpl) {
380
+ throw Error("Initialization Error: Template isn't supported.");
381
+ }
382
+ this.g = [];
383
+ this.length = 0;
384
+ this.root = b.root || b.mount || null;
385
+ this.recycle = !!b.recycle;
386
+ this.state = b.state || {};
387
+ this.shadow = b.shadow || !!a.cmp;
388
+ this.key = a.key || "";
389
+ this.o = {};
390
+ c = a.fn;
391
+ a.B || c && (a.B = c.slice());
392
+ this.apply = c && c.pop();
393
+ this.tpl = a;
394
+ this.name = a.name;
395
+ this.inc = [];
396
+ this.pool = (c = this.recycle || !!this.key) && b.pool ? 1 : 0;
397
+ this.A = [];
398
+ this.j = new Map();
399
+ this.cache = c && (a.cache || !!b.cache);
400
+ this.async = !!b.async;
401
+ this.s = 0;
402
+ this.on = b.on || null;
403
+ this.proxy = null;
404
+ this.i = 0;
405
+ (a = b.observe) && (new R(a)).mount(this);
406
+ this.root ? this.mount(this.root, b.hydrate) : this.m = null;
407
+ }
408
+ n = P.prototype;
409
+ n.mount = function(a, b) {
410
+ if (!a) {
411
+ throw Error("No target was passed to .mount()");
412
+ }
413
+ this.s && this.cancel();
414
+ if (this.shadow) {
415
+ var c = this.tpl.cmp;
416
+ a = a.shadowRoot || a.attachShadow({mode:"open"});
417
+ if (c && c.length) {
418
+ var d = a.lastElementChild;
419
+ if (d) {
420
+ a = d;
421
+ } else {
422
+ c.push({tag:"root"});
423
+ for (let f = 0, h; f < c.length; f++) {
424
+ h = M(this, c[f], [], ""), a.append(h), f === c.length - 1 && (a = h);
425
+ }
426
+ }
427
+ }
428
+ }
429
+ c = a._mki;
430
+ d = this.root !== a;
431
+ if (c === this) {
432
+ if (!d) {
433
+ return this;
434
+ }
435
+ this.g = a._mkd;
436
+ this.length = this.g.length;
437
+ } else if (c) {
438
+ c.clear();
439
+ a._mkd = this.g = [];
440
+ this.length = 0;
441
+ a.firstChild && (a.textContent = "");
442
+ var e = this.on && this.on.unmount;
443
+ e && e(a, c);
444
+ } else {
445
+ if (b) {
446
+ e = a.children;
447
+ const f = e.length, h = Array(f);
448
+ for (let k = 0; k < f; k++) {
449
+ h[k] = e[k];
450
+ }
451
+ this.g = h;
452
+ this.length = this.g.length;
453
+ } else {
454
+ this.g = [], this.length = 0, a.firstChild && (a.textContent = "");
455
+ }
456
+ a._mkd = this.g;
457
+ }
458
+ if (this.key) {
459
+ if (d && this.root && (this.root._mkl = this.o), c === this) {
460
+ this.o = a._mkl;
461
+ } else {
462
+ d = {};
463
+ if (!c && b && this.length) {
464
+ for (let f = 0, h, k; f < this.length; f++) {
465
+ h = this.g[f], (k = h.getAttribute("key")) || console.warn("The template '" + this.name + "' runs in keyed mode, but the hydrated component don't have the attribute 'key' exported."), h._mkk = k, d[k] = h;
466
+ }
467
+ }
468
+ a._mkl = this.o = d;
469
+ }
470
+ }
471
+ a._mki = this;
472
+ this.root = a;
473
+ this.m || (b && this.length && (this.m = this.g[0].cloneNode(!0), M(this, this.tpl.tpl, [], "", this.m) && S(this)), this.tpl && (this.m = M(this, this.tpl.tpl, [], ""), S(this)));
474
+ (b = this.on && this.on.mount) && b(a, this);
475
+ return this;
476
+ };
477
+ function S(a) {
478
+ a.tpl.B && (a.tpl.fn = a.tpl.B, a.tpl.B = null);
479
+ a.tpl = null;
480
+ }
481
+ function ja(a, b, c, d, e) {
482
+ if (!a) {
483
+ throw Error("Root element is not defined.");
484
+ }
485
+ if (!b) {
486
+ throw Error("Template is not defined.");
487
+ }
488
+ var f;
489
+ if ("function" === typeof c || !0 === c) {
490
+ e = c, c = null;
491
+ } else if ("function" === typeof d || !0 === d) {
492
+ e = d, d = null;
493
+ }
494
+ if (e) {
495
+ return new Promise(function(k) {
496
+ requestAnimationFrame(function() {
497
+ ja(a, b, c, d);
498
+ "function" === typeof e && e();
499
+ k();
500
+ });
501
+ });
502
+ }
503
+ var h = (f = b.cmp) && f.length;
504
+ f && !h && (a = a.shadowRoot || a.attachShadow({mode:"open"}));
505
+ if (c || h || b.fn) {
506
+ f = new P(b);
507
+ h && (a = f.mount(a).root);
508
+ if (c && Array.isArray(c)) {
509
+ for (h = 0; h < c.length; h++) {
510
+ a.append(f.create(c[h], d, h));
511
+ }
512
+ } else {
513
+ a.append(f.create(c, d));
514
+ }
515
+ f.destroy();
516
+ } else {
517
+ f = M({}, b.tpl, [], "", null, 1), a.append(f);
518
+ }
519
+ return P;
520
+ }
521
+ n.render = function(a, b, c, d) {
522
+ if (!this.root) {
523
+ throw Error("Template was not mounted or root was not found.");
524
+ }
525
+ if (this.root._mki !== this) {
526
+ throw Error("Another template is already assigned to this root. Please use '.mount(root_element)' before calling '.render()' to switch the context of a template.");
527
+ }
528
+ if (!d) {
529
+ var e;
530
+ if (b && (e = "function" === typeof b) || !0 === b) {
531
+ c = b, b = null;
532
+ }
533
+ this.s && this.cancel();
534
+ if (this.async || c) {
535
+ const l = this;
536
+ e || (e = "function" === typeof c);
537
+ l.s = requestAnimationFrame(function() {
538
+ l.s = 0;
539
+ l.render(a, b, null, 1);
540
+ c();
541
+ });
542
+ return e ? this : new Promise(function(m) {
543
+ c = m;
544
+ });
545
+ }
546
+ }
547
+ var f = this.length;
548
+ if (!a && !this.apply) {
549
+ return this.g[0] || this.add(), this;
550
+ }
551
+ if (Array.isArray(a) || a instanceof R) {
552
+ if (d = a.length, !d) {
553
+ return this.remove(0, f);
554
+ }
555
+ } else {
556
+ if (this.proxy) {
557
+ throw Error("When a template is using data bindings by an expression like {{= ... }} you will need to pass an array to the render() function, also when just one single item should be rendered. Because the array you will pass in is getting proxified after calling .render(arr), after then you can trigger bindings via arr[0].prop = 'value'.");
558
+ }
559
+ a = [a];
560
+ d = 1;
561
+ }
562
+ var h = this.key;
563
+ e = this.proxy;
564
+ !f || h || this.recycle || (this.remove(0, f), f = 0);
565
+ let k = f < d ? f : d, g = 0;
566
+ if (g < k) {
567
+ for (let l, m; g < k; g++) {
568
+ l = this.g[g];
569
+ m = a[g];
570
+ if (h && l._mkk !== m[h]) {
571
+ return ka(this, a, b, g);
572
+ }
573
+ this.update(l, m, b, g);
574
+ e && !m._mkx && (a[g] = T(this, l, m));
575
+ }
576
+ }
577
+ if (g < d) {
578
+ for (f = h || this.recycle; g < d; g++) {
579
+ h = a[g], this.add(h, b), !e || f && h._mkx || (a[g] = T(this, this.g[g], h));
580
+ }
581
+ } else {
582
+ d < f && this.remove(d, f - d);
583
+ }
584
+ return this;
585
+ };
586
+ n.replace = function(a, b, c, d) {
587
+ "undefined" === typeof d && ("number" === typeof a ? (d = 0 > a ? this.length + a : a, a = this.g[d]) : d = this.index(a));
588
+ var e;
589
+ if (this.key) {
590
+ var f = b[this.key];
591
+ if (e = this.o[f]) {
592
+ if (e !== a) {
593
+ f = this.index(e);
594
+ const h = f < d ? e : a, k = f < d ? a : e;
595
+ let g = this.g[f < d ? f + 1 : d + 1];
596
+ this.g[d] = e;
597
+ this.g[f] = a;
598
+ g !== k ? this.root.insertBefore(h, k) : g = h;
599
+ this.root.insertBefore(k, g);
600
+ }
601
+ } else {
602
+ this.pool && (e = this.j.get(f)) && (this.j.delete(f), la(this, a), this.g[d] = e, a.replaceWith(e));
603
+ }
604
+ } else {
605
+ this.recycle && (e = a);
606
+ }
607
+ e ? this.apply && (this.i && b._mkx || this.apply(b, c || this.state, d, e._mkp || K(e, this.m._mkp, this.cache))) : (b = this.create(b, c, d, 1), (this.key || this.pool) && la(this, a), this.g[d] = b, a.replaceWith(b));
608
+ (d = this.on && this.on.replace) && d(a, this);
609
+ return this;
610
+ };
611
+ n.update = function(a, b, c, d) {
612
+ if (!this.apply) {
613
+ return "number" !== typeof d && console.warn("The template '" + this.name + "' is a static template and should not be updated. Alternatively you can use .replace() to switch contents."), this;
614
+ }
615
+ if (this.i && b._mkx) {
616
+ return this;
617
+ }
618
+ "undefined" === typeof d && ("number" === typeof a ? (d = 0 > a ? this.length + a - 1 : a, a = this.g[d]) : d = this.index(a));
619
+ this.apply(b, c || this.state, d, a._mkp || K(a, this.m._mkp, this.cache));
620
+ (b = this.on && this.on.update) && b(a, this);
621
+ return this;
622
+ };
623
+ n.cancel = function() {
624
+ cancelAnimationFrame(this.s);
625
+ this.s = 0;
626
+ return this;
627
+ };
628
+ n.create = function(a, b, c, d) {
629
+ const e = this.key, f = e && a[e];
630
+ let h;
631
+ var k;
632
+ let g, l;
633
+ this.pool && (e ? (k = this.j) && (h = k.get(f)) && (k.delete(f), l = 1) : (k = this.A) && k.length && (h = k.pop()));
634
+ h || (h = g = this.m, g || (this.m = h = g = M(this, this.tpl.tpl, [], ""), S(this)));
635
+ let m;
636
+ this.apply && (k = h._mkp || K(h, this.m._mkp, !!g || this.cache), m = g && this.cache && Array(k.length), this.apply(a, b || this.state, c, k, !!g, m));
637
+ g && (h = g.cloneNode(!0), m && !0 !== m && (h._mkc = m), h._mkr = 1);
638
+ e && (l || (h._mkk = f), d && (this.o[f] = h));
639
+ (a = this.on && this.on[g ? "create" : "recycle"]) && a(h, this);
640
+ return h;
641
+ };
642
+ n.add = function(a, b, c) {
643
+ let d;
644
+ "number" === typeof b ? (c = 0 > b ? this.length + b : b, b = null, d = c < this.length) : "number" === typeof c ? (0 > c && (c += this.length), d = c < this.length) : c = this.length;
645
+ a = this.create(a, b, c, 1);
646
+ d ? (this.root.insertBefore(a, this.g[c]), ma(this.g, this.length - 1, c, a), this.length++) : (this.root.appendChild(a), this.g[this.length++] = a);
647
+ this.key && this.pool && this.pool < this.length && (this.pool = this.length);
648
+ (c = this.on && this.on.insert) && c(a, this);
649
+ return this;
650
+ };
651
+ function T(a, b, c) {
652
+ {
653
+ b = b._mkp || K(b, a.m._mkp, a.cache);
654
+ a = a.proxy;
655
+ const d = c._mkx;
656
+ d ? d.path = b : c = new fa(c, {path:b, fn:a, get:ha, set:ia});
657
+ }
658
+ return c;
659
+ }
660
+ function ka(a, b, c, d) {
661
+ const e = a.g, f = a.o, h = a.key;
662
+ let k = b.length, g = e.length, l = g > k ? g : k, m = 0;
663
+ for (d || (d = 0); d < l; d++) {
664
+ var q = void 0;
665
+ if (d < k) {
666
+ var t = b[d], r = d >= g;
667
+ let v, u, J, A;
668
+ a.proxy && (t._mkx ? A = a.i : b[d] = T(a, e[d], t));
669
+ if (!r && (v = e[d], u = t[h], J = v._mkk, J === u)) {
670
+ A || a.update(v, t, c, d);
671
+ continue;
672
+ }
673
+ if (r || !f[u]) {
674
+ r || !a.pool ? (g++, l = g > k ? g : k, a.add(t, c, d)) : a.replace(v, t, c, d);
675
+ continue;
676
+ }
677
+ let x, G;
678
+ for (r = d + 1; r < l; r++) {
679
+ if (!x && r < g && e[r]._mkk === u && (x = r + 1), !G && r < k && b[r][h] === J && (G = r + 1), x && G) {
680
+ x >= G + m ? (q = e[x - 1], a.root.insertBefore(q, v), A || a.update(q, t, c, d), x === G ? (1 < r - d && a.root.insertBefore(v, e[x]), e[d] = e[r], (e[r] = v) || console.error("reconcile.error 1")) : (x - 1 === d && console.error("reconcile.error 2"), ma(e, x - 1, d), m++)) : (t = G - 1 + m, a.root.insertBefore(v, e[t] || null), (t > g ? g : t) - 1 === d && console.error("reconcile.error 3"), ma(e, d, (t > g ? g : t) - 1), m--, d--);
681
+ q = 1;
682
+ break;
683
+ }
684
+ }
685
+ }
686
+ q || (a.remove(d), g--, l = g > k ? g : k, d--);
687
+ }
688
+ return a;
689
+ }
690
+ function ma(a, b, c, d) {
691
+ const e = d || a[b];
692
+ d && b++;
693
+ if (b < c) {
694
+ for (; b < c; b++) {
695
+ a[b] = a[b + 1];
696
+ }
697
+ } else {
698
+ for (; b > c; b--) {
699
+ a[b] = a[b - 1];
700
+ }
701
+ }
702
+ a[c] = e;
703
+ }
704
+ n.append = function(a, b, c) {
705
+ let d;
706
+ "number" === typeof b ? (c = 0 > b ? this.length + b : b, b = null, d = 1) : "number" === typeof c && (0 > c && (c += this.length), d = 1);
707
+ const e = a.length;
708
+ for (let f = 0; f < e; f++) {
709
+ this.add(a[f], b, d ? c++ : null);
710
+ }
711
+ return this;
712
+ };
713
+ n.clear = function() {
714
+ this.length && this.remove(0, this.length);
715
+ return this;
716
+ };
717
+ n.remove = function(a, b) {
718
+ let c = this.length;
719
+ c && a && ("number" !== typeof a ? a = this.index(a) : 0 > a && (a = c + a));
720
+ if (!c || a >= c) {
721
+ return this;
722
+ }
723
+ b ? 0 > b && (a -= b + 1, 0 > a && (a = 0), b *= -1) : b = 1;
724
+ let d;
725
+ !a && b >= c ? (d = this.g, b = d.length, this.root.textContent = "", this.root._mkd = this.g = [], c = 0) : (d = this.g.splice(a, b), c -= b);
726
+ const e = this.pool && !this.key, f = this.key || this.pool, h = this.on && this.on.remove;
727
+ (a = this.key && this.pool) && b >= a && (this.j = new Map(), a = 0);
728
+ for (let k = 0, g; k < b; k++) {
729
+ g = d[e ? b - k - 1 : k], c && g.remove(), f && la(this, g, 1), h && h(g, this);
730
+ }
731
+ if (a && 0 < (a = this.j.size - a)) {
732
+ for (b = this.j.keys(); a--;) {
733
+ this.j.delete(b.next().value);
734
+ }
735
+ }
736
+ this.length = c;
737
+ return this;
738
+ };
739
+ n.index = function(a) {
740
+ return a ? this.g.indexOf(a) : -1;
741
+ };
742
+ n.node = function(a) {
743
+ return this.g[a];
744
+ };
745
+ function la(a, b, c) {
746
+ let d;
747
+ a.key && (d = b._mkk, a.o[d] = null);
748
+ a.pool && (d ? (a.j.set(d, b), !c && a.j.size > a.pool && a.j.delete(a.j.keys().next().value)) : a.A[a.A.length] = b);
749
+ }
750
+ n.flush = function() {
751
+ this.A = [];
752
+ this.j = new Map();
753
+ return this;
754
+ };
755
+ n.destroy = function() {
756
+ for (let a = 0, b; a < this.inc.length; a++) {
757
+ b = this.inc[a], O[b.name] || b.destroy();
758
+ }
759
+ this.key && (this.root && (this.root._mkl = null), this.o = null);
760
+ this.root && (this.root._mkd = this.root._mki = null);
761
+ this.proxy = this.on = this.j = this.A = this.g = this.root = this.tpl = this.apply = this.inc = this.state = this.m = null;
762
+ };
763
+ const U = Array.prototype, na = window.Proxy;
764
+ let V = !1;
765
+ function W(a) {
766
+ if (!a) {
767
+ throw Error("The observable array was not assigned to a Mikado instance. You need to pass in the observable array when initiating a Mikado instance.");
768
+ }
769
+ }
770
+ function R(a) {
771
+ if (a instanceof R) {
772
+ return a;
773
+ }
774
+ if (!(this instanceof R)) {
775
+ return new R(a);
776
+ }
777
+ this.h = null;
778
+ const b = a ? a.length : 0;
779
+ if (na) {
780
+ if (b) {
781
+ for (let c = 0; c < b; c++) {
782
+ this[c] = a[c];
783
+ }
784
+ }
785
+ this.length = b;
786
+ this.l = {splice:U.splice.bind(this), pop:U.pop.bind(this), shift:U.shift.bind(this), unshift:U.unshift.bind(this), push:U.push.bind(this)};
787
+ return new Proxy(this, oa);
788
+ }
789
+ this.l = a || [];
790
+ for (a = 0; a <= b; a++) {
791
+ pa(this, a);
792
+ }
793
+ pa(this, "length");
794
+ }
795
+ R.prototype.mount = function(a) {
796
+ this.h !== a && (this.h && a.mount(this.h.root), this.h = a);
797
+ return this;
798
+ };
799
+ function pa(a, b) {
800
+ Object.defineProperty(a, b, {get:function() {
801
+ return this.l[b];
802
+ }, set:function(c) {
803
+ "number" === typeof b && (b === this.length && pa(this, b + 1), oa.set(this, b, c));
804
+ }});
805
+ }
806
+ const oa = {set:function(a, b, c) {
807
+ let d;
808
+ "number" === typeof b ? d = !0 : b === "" + parseInt(b, 10) && (d = !0);
809
+ const e = a.h;
810
+ if (!V) {
811
+ V = !0;
812
+ if (e) {
813
+ var f = a.length;
814
+ if (d) {
815
+ W(e);
816
+ const h = e.length;
817
+ f !== h && (a.length = h);
818
+ b >= h ? (e.add(c), a.length++) : b < h && (f = e.g[b], e.recycle || e.key && f._mkk === c[e.key] ? e.update(f, c, null, b) : e.replace(f, c, null, b));
819
+ } else {
820
+ "length" === b && c < f && e.remove(c, f - c);
821
+ }
822
+ }
823
+ V = !1;
824
+ }
825
+ e && (f = e.recycle || e.key, !d || !e.proxy || f && c._mkx || (c = T(e, e.g[b], c)));
826
+ (na ? a : a.l)[b] = c;
827
+ return !0;
828
+ }};
829
+ n = R.prototype;
830
+ n.set = function(a) {
831
+ const b = this.h;
832
+ b.recycle || b.key ? (V = !0, b.render(a), V = !1, this.length > a.length && this.splice(a.length)) : (this.splice(), this.concat(a));
833
+ return this;
834
+ };
835
+ n.splice = function(a, b, c) {
836
+ W(this.h);
837
+ V = !0;
838
+ a || (a = 0);
839
+ "undefined" === typeof b && (b = this.length - a, 0 > b && (b = 0));
840
+ b && this.h.remove(a, b);
841
+ b = c ? this.l.splice(a, b, c) : this.l.splice(a, b);
842
+ c && this.h.add(c, a);
843
+ V = !1;
844
+ return b;
845
+ };
846
+ n.push = function(a) {
847
+ W(this.h);
848
+ V = !0;
849
+ this.h.add(a);
850
+ this[this.length] = a;
851
+ na && this.length++;
852
+ V = !1;
853
+ };
854
+ n.unshift = function(a) {
855
+ W(this.h);
856
+ V = !0;
857
+ this.h.add(a, 0);
858
+ this.l.unshift(a);
859
+ V = !1;
860
+ };
861
+ n.pop = function() {
862
+ W(this.h);
863
+ V = !0;
864
+ this.h.remove(this.length - 1);
865
+ const a = this.l.pop();
866
+ V = !1;
867
+ return a;
868
+ };
869
+ n.shift = function() {
870
+ W(this.h);
871
+ V = !0;
872
+ this.h.remove(0);
873
+ const a = this.l.shift();
874
+ V = !1;
875
+ return a;
876
+ };
877
+ n.concat = function(a) {
878
+ const b = a.length;
879
+ for (let c = 0; c < b; c++) {
880
+ this.push(a[c]);
881
+ }
882
+ return this;
883
+ };
884
+ n.sort = U.sort;
885
+ n.reverse = U.reverse;
886
+ n.slice = U.slice;
887
+ n.map = function(a, b) {
888
+ b && (a = a.bind(this));
889
+ for (let c = 0, d = this.length; c < d; c++) {
890
+ this[c] = a(this[c]);
891
+ }
892
+ return this;
893
+ };
894
+ n.filter = function(a, b) {
895
+ b && (a = a.bind(this));
896
+ let c, d;
897
+ for (let e = 0, f = this.length; e < f; e++) {
898
+ a(this[e]) ? d && (this.splice(c, d), f -= d, e -= d, d = 0) : d ? d++ : (c = e, d = 1);
899
+ }
900
+ d && this.splice(c, d);
901
+ return this;
902
+ };
903
+ n.indexOf = function(a) {
904
+ for (let b = 0, c = this.length; b < c; b++) {
905
+ if (this[b] === a) {
906
+ return b;
907
+ }
908
+ }
909
+ return -1;
910
+ };
911
+ n.lastIndexOf = function(a) {
912
+ for (let b = this.length - 1; 0 <= b; b--) {
913
+ if (this[b] === a) {
914
+ return b;
915
+ }
916
+ }
917
+ return -1;
918
+ };
919
+ n.includes = U.includes;
920
+ n.forEach = function(a) {
921
+ for (let b = 0, c = this.length; b < c; b++) {
922
+ a(this[b]);
923
+ }
924
+ return this;
925
+ };
926
+ n.swap = function(a, b) {
927
+ const c = this[b];
928
+ this[b] = this[a];
929
+ this[a] = c;
930
+ return this;
931
+ };
932
+ n.transaction = function(a) {
933
+ W(this.h);
934
+ V = !0;
935
+ a();
936
+ V = !1;
937
+ const b = this.h, c = b.i;
938
+ b.i = 0;
939
+ b.async ? b.render(this).then(function() {
940
+ b.i = c;
941
+ }) : (b.render(this), b.i = c);
942
+ };
943
+ const X = document.createElement("div"), qa = document.createTextNode(""), Y = document.createElement("div");
944
+ X.appendChild(qa);
945
+ n = P.prototype;
946
+ n.move = P.prototype.moveTo = function(a, b) {
947
+ let c;
948
+ "number" === typeof a ? (c = a, a = this.g[c]) : c = this.index(a);
949
+ 0 > b && (b = this.length + b - 1);
950
+ c !== b && this.shift(a, b - c);
951
+ return this;
952
+ };
953
+ n.shift = function(a, b) {
954
+ if (!b) {
955
+ return this;
956
+ }
957
+ if ("number" === typeof a) {
958
+ var c = a;
959
+ a = this.g[a];
960
+ } else {
961
+ c = this.index(a);
962
+ }
963
+ const d = 0 > b;
964
+ if (d && c || !d && c < this.length - 1) {
965
+ b = d ? Math.max(c + b, 0) : Math.min(c + b, this.length - 1);
966
+ const e = this.g[b], f = d && 1 < c - b || !d && 1 < b - c;
967
+ this.root.insertBefore(a, d ? e : this.g[b + 1] || null);
968
+ if (f) {
969
+ a = this.g[c];
970
+ if (d) {
971
+ for (; c > b; c--) {
972
+ this.g[c] = this.g[c - 1];
973
+ }
974
+ } else {
975
+ for (; c < b; c++) {
976
+ this.g[c] = this.g[c + 1];
977
+ }
978
+ }
979
+ this.g[b] = a;
980
+ } else {
981
+ this.g[c] = e, this.g[b] = a;
982
+ }
983
+ }
984
+ return this;
985
+ };
986
+ n.up = function(a, b) {
987
+ (!b || 0 < b) && this.shift(a, -(b || 1));
988
+ return this;
989
+ };
990
+ n.down = function(a, b) {
991
+ (!b || 0 < b) && this.shift(a, b || 1);
992
+ return this;
993
+ };
994
+ n.first = function(a) {
995
+ return this.shift(a, -this.length);
996
+ };
997
+ n.last = function(a) {
998
+ return this.shift(a, this.length);
999
+ };
1000
+ n.before = function(a, b) {
1001
+ "number" !== typeof a && (a = this.index(a));
1002
+ "number" !== typeof b && (b = this.index(b));
1003
+ b !== a + 1 && (0 > b && (b = this.length + b, 0 > a && b--), 0 > a && (a = this.length + a - 1), this.shift(a, b - a - 1));
1004
+ return this;
1005
+ };
1006
+ n.after = function(a, b) {
1007
+ "number" !== typeof a && (a = this.index(a));
1008
+ "number" !== typeof b && (b = this.index(b));
1009
+ b !== a - 1 && (0 > b && (b = this.length + b - 2, 0 > a && b++), 0 > a && (a = this.length + a - 1), this.shift(a, b - a + 1));
1010
+ return this;
1011
+ };
1012
+ n.swap = function(a, b) {
1013
+ if (a !== b) {
1014
+ let c, d;
1015
+ "number" === typeof a ? (c = 0 > a ? this.length + a : a, a = this.g[c]) : c = this.index(a);
1016
+ "number" === typeof b ? (d = 0 > b ? this.length + b : b, b = this.g[d]) : d = this.index(b);
1017
+ const e = c + 1 !== d;
1018
+ this.root.insertBefore(e ? a : b, e ? b : a);
1019
+ e && d + 1 !== c && this.root.insertBefore(b, this.g[c + 1] || null);
1020
+ this.g[c] = b;
1021
+ this.g[d] = a;
1022
+ }
1023
+ return this;
1024
+ };
1025
+ const ra = {tap:1, change:1, click:1, dblclick:1, input:1, keydown:1, keypress:1, keyup:1, mousedown:1, mouseover:1, mouseout:1, mousemove:1, mouseup:1, mousewheel:1, touchstart:1, touchmove:1, touchend:1, touchcancel:1, reset:1, select:1, submit:1, toggle:1, focusin:1, focusout:1, resize:1, scroll:1, error:1, load:1}, sa = {blur:"focusout", focus:"focusin", mouseleave:"mouseout", mouseenter:"mouseover"};
1026
+ let ta = 0, ua = 0;
1027
+ function va(a, b, c, d, e, f) {
1028
+ ta || (ta = 1, console.info("If this page has set a Content-Security-Policy (CSP) header field, using the inline compiler has disadvantage when not configure \"script-src 'unsafe-eval'\". It is recommended to use the Mikado native compiler, which is CSP-friendly and also can optimize your templates more powerful."));
1029
+ if (b) {
1030
+ return new Promise(function(v) {
1031
+ const u = va(a);
1032
+ "function" === typeof b && b(u);
1033
+ v(u);
1034
+ });
1035
+ }
1036
+ e || (d = [], c = [d], d.index = e = {current:-1, count:0, last:-1, inc:0, u:!1});
1037
+ const h = f ? {} : {tpl:{}}, k = f ? h : h.tpl;
1038
+ if (!f) {
1039
+ if ("string" === typeof a) {
1040
+ if (/<.*>/.test(a)) {
1041
+ var g = document.createElement("div");
1042
+ g.innerHTML = a;
1043
+ a = g.firstElementChild;
1044
+ } else {
1045
+ h.name = a, a = document.getElementById(a);
1046
+ }
1047
+ if (!a) {
1048
+ throw Error("The template was not found.");
1049
+ }
1050
+ }
1051
+ a.content && (h.name || (h.name = a.id || a.getAttribute("name")), a = a.content.firstElementChild);
1052
+ }
1053
+ g = a.tagName;
1054
+ if (!g || "SCRIPT" === g) {
1055
+ var l;
1056
+ if ((l = (g ? a.firstChild : a).nodeValue) && l && l.trim()) {
1057
+ if (l.includes("{{@")) {
1058
+ var m = l.replace(/{{@([\s\S]+)}}/g, "$1").trim();
1059
+ l = /{{[\s\S]+}}/.test(m) ? m.replace(/{{([\s\S]+)}}/g, "{{$1}}") : "";
1060
+ m && (m = m.replace(/{{([\s\S]+)}}/g, ""));
1061
+ m && d.push(m);
1062
+ if ("SCRIPT" === g) {
1063
+ return l.trim() && (k.text = l, k.tag = g), k;
1064
+ }
1065
+ }
1066
+ l && l.trim() && (l.includes("{{#") ? wa(k, "html", l, !1, null, e, d) : (e.count++, wa(k, "text", l, !1, null, e, d)));
1067
+ }
1068
+ if (!g) {
1069
+ return l && l.trim() ? k : null;
1070
+ }
1071
+ }
1072
+ g && (k.tag = g);
1073
+ if ((l = a.attributes) && l.length) {
1074
+ g = {};
1075
+ for (m = 0; m < l.length; m++) {
1076
+ let v = l[m].nodeName, u = a.getAttribute(v);
1077
+ "include" === v && (v = "inc");
1078
+ g[v] = u;
1079
+ }
1080
+ l = g;
1081
+ for (var q in l) {
1082
+ g = l[q];
1083
+ var t = void 0, r = void 0;
1084
+ switch(q) {
1085
+ case "class":
1086
+ case "style":
1087
+ t = q;
1088
+ break;
1089
+ case "include":
1090
+ q = "inc";
1091
+ case "inc":
1092
+ t = q;
1093
+ break;
1094
+ case "if":
1095
+ t = q;
1096
+ break;
1097
+ case "foreach":
1098
+ t = q = "for";
1099
+ break;
1100
+ case "js":
1101
+ break;
1102
+ case "key":
1103
+ h.key = g.replace(/({{|}})/g, "").trim().replace("data.", "");
1104
+ break;
1105
+ case "cache":
1106
+ break;
1107
+ default:
1108
+ sa[q] ? (r = k.event || (k.event = {}), console.info("The assigned event '" + q + "' was replaced by the event '" + sa[q] + "'."), q = sa[q]) : ra[q] ? r = k.event || (k.event = {}) : (f || "id" !== q && "name" !== q || h.name || /{{[\s\S]+}}/.test(g) || (h.name = g), r = k.attr || (k.attr = {})), t = q;
1109
+ }
1110
+ t && wa(r || k, t, g, !!r, l, e, d);
1111
+ }
1112
+ }
1113
+ q = (a.content || a).childNodes;
1114
+ t = q.length;
1115
+ e.u && (e.u = !1, e.inc++, d = [], (k.for || k.if) && c.unshift(d), k.child || (k.child = k.text ? {text:k.text} : k.html ? {html:k.html} : null), t ? (d.root = k, d.inc = k.child || (k.child = []), d.index = e = {current:-1, count:0, last:-1, inc:0, u:!1}) : d.inc = k.inc, delete k.for, delete k.if, delete k.text, delete k.html);
1116
+ if (t) {
1117
+ for (let v = 0, u; v < t; v++) {
1118
+ if (u = q[v], 8 !== u.nodeType && (e.count++, r = va(u, null, c, d, e, 1))) {
1119
+ 1 !== t || 3 !== u.nodeType && r.text || k.js && r.js ? (r.text || r.tag) && (k.child || (k.child = [])).push(r) : (r.js && (k.js = r.js), r.html && (k.html = r.html), r.text && (k.text = r.text));
1120
+ }
1121
+ }
1122
+ k.child && 1 === k.child.length && (k.child = k.child[0]);
1123
+ }
1124
+ if (!f) {
1125
+ h.name || (h.name = "tpl-" + ua++);
1126
+ if ("COMPONENT" === k.tag) {
1127
+ d = k.child;
1128
+ e = [];
1129
+ for (let v = 0, u; v < d.length; v++) {
1130
+ u = d[v], "TEMPLATE" === u.tag ? (d = f = u.child.length ? u.child[0] : u.child, u.name && (f.name = u.name), u.id && (f.id = u.id), u.key && (f.key = u.key), u.cache && (f.cache = u.cache)) : e.push(u);
1131
+ }
1132
+ h.tpl = d;
1133
+ h.cmp = e;
1134
+ }
1135
+ if (1 === c.length && 0 === c[0].length) {
1136
+ h.fn = null;
1137
+ } else {
1138
+ for (d = 0; d < c.length; d++) {
1139
+ c[d].root && (c[d].root.inc = c[d].inc[0], delete c[d].root.child), c[d] = c[d].length ? Function("data", "state", "index", "_p", "_f", "_x", '"use strict";let _o,_v,_c;' + c[d].join(";")) : null;
1140
+ }
1141
+ h.fn = c.length ? c : null;
1142
+ }
1143
+ }
1144
+ return h;
1145
+ }
1146
+ function wa(a, b, c, d, e, f, h) {
1147
+ if (/{{[\s\S]+}}/.test(c)) {
1148
+ let k = /{{([!?#]+)?=/.test(c), g = /{{!?\?/.test(c), l = /{{\??!/.test(c);
1149
+ if (k) {
1150
+ if (g || l) {
1151
+ c = c.replace(/{{[!?]+/g, "{{");
1152
+ }
1153
+ k = c.replace(/{{#?=+(.*)?}}/ig, "$1").trim().replace(/^data\./, "").replace(/^data\[['"](.*)['"]]/, "$1");
1154
+ }
1155
+ c = c.replace(/{{[!?#=]+/g, "{{").replace(/"(\s+)?{{(\s+)?/g, "(").replace(/(\s+)?}}(\s+)?"/g, ")").replace(/{{(\s+)?/g, "'+(").replace(/(\s+)?}}/g, ")+'").replace(/\s+/g, " ");
1156
+ c = ("'" + c + "'").replace(/^""\+/g, "").replace(/^''\+/g, "").replace(/\+''$/g, "").replace(/\+""$/g, "").replace(/"\)\+''\+\("/g, "").replace(/'\)\+''\+\('/g, "").replace(/\+''\+/g, "+").replace(/'(\s+)?\+(\s+)?'/g, "").replace(/"(\s+)?\+(\s+)?"/g, "").replace(/^\(([^ ]+)\)$/g, "$1").trim();
1157
+ g && (c = "(" + (c + "||" + c + "===0?" + c + ":'')"));
1158
+ "text" !== b && "style" !== b || !a.tag || f.count++;
1159
+ f.count !== f.last && (f.current++, f.last = f.count, h.push("_o=_p[" + f.current + "]"), h.push("_x&&(_x[" + f.current + "]=_c={})"));
1160
+ h.push("_v=" + c);
1161
+ d ? h.push('_c&&(_c["_a' + b + '"]=_v);if(!_o.c||_o.c["_a' + b + '"]!==_v){_o.c&&(_o.c["_a' + b + '"]=_v);' + (Q[b] ? "selected" === b ? '_f?_o.n[_v===false?"removeAttribute":"setAttribute"]("' + b + '",_v):_o.n.' + b + "=_v" : "_o.n." + b + "=_v" : '_o.n[_v===false?"removeAttribute":"setAttribute"]("' + b + '",_v)') + "}") : "class" === b ? h.push("_c&&(_c._c=_v);if(!_o.c||_o.c._c!==_v){_o.c&&(_o.c._c=_v);_o.n.className=_v}") : "style" === b ? h.push("_c&&(_c._s=_v);if(!_o.c||_o.c._s!==_v){_o.c&&(_o.c._s=_v);_o.n.cssText=_v}") :
1162
+ "html" === b ? h.push("_c&&(_c._h=_v);if(!_o.c||_o.c._h!==_v){_o.c&&(_o.c._h=_v);_o.n.innerHTML=_v}") : "text" === b && h.push("_c&&(_c._t=_v);if(!_o.c||_o.c._t!==_v){_o.c&&(_o.c._t=_v);_o.n.nodeValue=_v}");
1163
+ a[b] = k ? [k] : [];
1164
+ } else {
1165
+ a[b] = c;
1166
+ }
1167
+ "for" !== b && "if" !== b && "inc" !== b || d || f.u || (f.count !== f.last && (f.current++, f.last = f.count, h.push("_o=_p[" + f.current + "]")), a = e.foreach ? e.foreach.trim() : "data", b = f.inc, e.if ? h.push("this.inc[" + b + "].mount(_o.n)[" + e.if.trim() + '?"render":"clear"](' + a + ",state)") : e.foreach ? h.push("this.inc[" + b + "].mount(_o.n).render(" + a + ",state)") : h.push("this.inc[" + b + "].mount(_o.n).render(data,state)"), f.u = !0);
1168
+ }
1169
+ ;const xa = /[^;:]+/g, ya = / +/;
1170
+ function za(a, b, c, d) {
1171
+ d["_a" + b] !== c && (d["_a" + b] = c, Q[b] ? a[b] = c : !1 === c ? a.removeAttribute(b) : a.setAttribute(b, c));
1172
+ }
1173
+ function Aa(a, b, c) {
1174
+ !1 !== c["_a" + b] && (c["_a" + b] = !1, Q[b] ? a[b] = !1 : a.removeAttribute(b));
1175
+ }
1176
+ function Ba(a, b) {
1177
+ let c = a._mkc, d;
1178
+ c ? d = c["_a" + b] : a._mkc = c = {};
1179
+ "string" !== typeof d && (Q[b] ? d = a[b] : d = a.getAttribute(b), c["_a" + b] = d);
1180
+ return d;
1181
+ }
1182
+ function Z(a) {
1183
+ let b = a._mkc, c;
1184
+ b ? c = b._c : a._mkc = b = {};
1185
+ if (!c) {
1186
+ return b._c = {};
1187
+ }
1188
+ if ("string" === typeof c) {
1189
+ a = c.trim().split(ya);
1190
+ b._c = c = {};
1191
+ for (let d = 0, e; d < a.length; d++) {
1192
+ (e = a[d]) && (c[a[d]] = 1);
1193
+ }
1194
+ }
1195
+ return c;
1196
+ }
1197
+ function Ca(a, b, c, d) {
1198
+ let e = !!d[b];
1199
+ c = "undefined" === typeof c ? !e : !!c;
1200
+ e !== c && (d[b] = c ? 1 : 0, c ? a.classList.add(b) : a.classList.remove(b));
1201
+ }
1202
+ function Da(a) {
1203
+ var b = a._mkc;
1204
+ let c;
1205
+ b ? c = b._s : a._mkc = b = {};
1206
+ if (!c) {
1207
+ return b._s = {};
1208
+ }
1209
+ if ("string" === typeof c) {
1210
+ for (a = c.match(xa), b._s = c = {}, b = 0; b < a.length; b += 2) {
1211
+ c[a[b].trim()] = a[b + 1].trim();
1212
+ }
1213
+ }
1214
+ return c;
1215
+ }
1216
+ ;P.once = ja;
1217
+ P.register = function(a, b) {
1218
+ let c, d;
1219
+ if ("string" === typeof a) {
1220
+ if (c = d = a, a = O[c], a instanceof P || (a = a[0]), !a) {
1221
+ throw Error("The template '" + c + "' was not found.");
1222
+ }
1223
+ } else {
1224
+ c = a.name;
1225
+ }
1226
+ O[c] && (d ? console.info("The template '" + c + "' was replaced by a new definition.") : console.warn("The template '" + c + "' was already registered and is getting overwritten. When this isn't your intention, then please check your template names about uniqueness and collision!"));
1227
+ O[c] = [a, b];
1228
+ return P;
1229
+ };
1230
+ P.unregister = function(a) {
1231
+ "object" === typeof a && (a = a.name);
1232
+ const b = O[a];
1233
+ b && (b instanceof P && b.destroy(), O[a] = null);
1234
+ return P;
1235
+ };
1236
+ P.compile = va;
1237
+ P.setText = function(a, b) {
1238
+ var c = a._mkc;
1239
+ let d;
1240
+ c ? d = c._t : a._mkc = c = {};
1241
+ d !== b && (c._t = b, c._h = null, (c = a.firstChild) ? c.nodeValue = b : a.appendChild(document.createTextNode(b)));
1242
+ };
1243
+ P.getText = function(a) {
1244
+ let b = a._mkc, c;
1245
+ b ? c = b._t : a._mkc = b = {};
1246
+ "string" !== typeof c && (a = a.firstChild, b._t = c = a ? a.nodeValue : "");
1247
+ return c;
1248
+ };
1249
+ P.setHtml = function(a, b) {
1250
+ let c = a._mkc, d;
1251
+ c ? d = c._h : a._mkc = c = {};
1252
+ d !== b && (a.innerHTML = b, c._h = b, c._t = null);
1253
+ };
1254
+ P.getHtml = function(a) {
1255
+ let b = a._mkc, c;
1256
+ b ? c = b._h || b._t : a._mkc = b = {};
1257
+ "string" !== typeof c && (b._h = c = a.innerHTML);
1258
+ return c;
1259
+ };
1260
+ P.setClass = function(a, b) {
1261
+ let c = a._mkc, d;
1262
+ c ? d = c._c : a._mkc = c = {};
1263
+ "object" === typeof b && (b = b.join(" "));
1264
+ d !== b && (c._c = b, a.className = b);
1265
+ };
1266
+ P.getClass = function(a) {
1267
+ let b = a._mkc, c;
1268
+ b ? c = b._c : a._mkc = b = {};
1269
+ "string" !== typeof c && (b._c = c = a.className);
1270
+ c = c.split(ya);
1271
+ return "" === c[0] ? [] : c;
1272
+ };
1273
+ P.hasClass = function(a, b) {
1274
+ const c = Z(a);
1275
+ let d = c[b];
1276
+ "number" !== typeof d && (c[b] = d = a.classList.contains(b) ? 1 : 0);
1277
+ return !!d;
1278
+ };
1279
+ P.toggleClass = function(a, b, c) {
1280
+ const d = Z(a);
1281
+ if ("object" === typeof b) {
1282
+ if (b.constructor === Array) {
1283
+ for (var e = 0; e < b.length; e++) {
1284
+ Ca(a, b[e], c, d);
1285
+ }
1286
+ } else {
1287
+ for (e in b) {
1288
+ Ca(a, e, b[e], d);
1289
+ }
1290
+ }
1291
+ } else {
1292
+ Ca(a, b, c, d);
1293
+ }
1294
+ };
1295
+ P.removeClass = function(a, b) {
1296
+ const c = Z(a);
1297
+ if ("object" === typeof b) {
1298
+ for (let f = 0; f < b.length; f++) {
1299
+ var d = a, e = b[f];
1300
+ 0 !== c[e] && (c[e] = 0, d.classList.remove(e));
1301
+ }
1302
+ } else {
1303
+ 0 !== c[b] && (c[b] = 0, a.classList.remove(b));
1304
+ }
1305
+ };
1306
+ P.addClass = function(a, b) {
1307
+ const c = Z(a);
1308
+ if ("object" === typeof b) {
1309
+ for (let f = 0; f < b.length; f++) {
1310
+ var d = a, e = b[f];
1311
+ c[e] || (c[e] = 1, d.classList.add(e));
1312
+ }
1313
+ } else {
1314
+ c[b] || (c[b] = 1, a.classList.add(b));
1315
+ }
1316
+ };
1317
+ P.setAttribute = function(a, b, c) {
1318
+ let d = a._mkc;
1319
+ d || (a._mkc = d = {});
1320
+ if ("object" === typeof b) {
1321
+ for (let e in b) {
1322
+ za(a, e, b[e], d);
1323
+ }
1324
+ } else {
1325
+ za(a, b, c, d);
1326
+ }
1327
+ };
1328
+ P.getAttribute = Ba;
1329
+ P.hasAttribute = function(a, b) {
1330
+ a = Ba(a, b);
1331
+ return !(!a && "" !== a);
1332
+ };
1333
+ P.removeAttribute = function(a, b) {
1334
+ let c = a._mkc;
1335
+ c || (a._mkc = c = {});
1336
+ if ("object" === typeof b) {
1337
+ for (let d = 0; d < b.length; d++) {
1338
+ Aa(a, b[d], c);
1339
+ }
1340
+ } else {
1341
+ Aa(a, b, c);
1342
+ }
1343
+ };
1344
+ P.setCss = function(a, b) {
1345
+ let c = a._mkc, d;
1346
+ c ? d = c._s : a._mkc = c = {};
1347
+ d !== b && (c._s = b, a.style.cssText = b);
1348
+ };
1349
+ P.getCss = function(a) {
1350
+ let b = a._mkc, c;
1351
+ b ? c = b._s : a._mkc = b = {};
1352
+ "string" !== typeof c && (b._s = c = a.style.cssText);
1353
+ return c;
1354
+ };
1355
+ P.getStyle = function(a, b) {
1356
+ const c = Da(a);
1357
+ let d = c[b];
1358
+ "string" !== typeof d && (c[b] = d = a.style.getPropertyValue(b));
1359
+ return d;
1360
+ };
1361
+ P.setStyle = function(a, b, c) {
1362
+ const d = Da(a), e = a.style;
1363
+ if ("object" === typeof b) {
1364
+ for (const h in b) {
1365
+ c = a;
1366
+ var f = b[h];
1367
+ d[h] !== f && (d[h] = f, (e || c.style).setProperty(h, f));
1368
+ }
1369
+ } else {
1370
+ d[b] !== c && (d[b] = c, (e || a.style).setProperty(b, c));
1371
+ }
1372
+ };
1373
+ P.escape = function(a) {
1374
+ X.l !== a && (qa.nodeValue = a, X.h = X.innerHTML, X.l = a);
1375
+ return X.h;
1376
+ };
1377
+ P.sanitize = function(a) {
1378
+ Y.h !== a && (Y.innerHTML = a, Y.h = a, Y.l = Y.textContent);
1379
+ return Y.l;
1380
+ };
1381
+ P.prototype.route = P.route = function(a, b, c) {
1382
+ if (!a) {
1383
+ throw Error("Missing route name.");
1384
+ }
1385
+ if (!b) {
1386
+ throw Error("The route '" + a + "' has no function assigned to it.");
1387
+ }
1388
+ y[a] && console.info("A new handler was re-assigned to the route '" + a + "'.");
1389
+ y[a] = b;
1390
+ z[a] = c || null;
1391
+ return this;
1392
+ };
1393
+ P.prototype.dispatch = P.dispatch = ba;
1394
+ P.prototype.listen = P.listen = ca;
1395
+ P.prototype.unlisten = P.unlisten = function(a) {
1396
+ p[a] && (F(0, a, E, w[a]), p[a] = 0, w[a] = null);
1397
+ return this;
1398
+ };
1399
+ P.Array = R;
1400
+ export default P;
1401
+