@twobirds/microcomponents 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/dist/MC.d.ts +0 -1
  2. package/dist/MC.js +6 -5
  3. package/dist/MC.min.js +39 -56
  4. package/dist/MC.ts +6 -4
  5. package/dist/elements.d.ts +0 -1
  6. package/dist/elements.js +0 -1
  7. package/dist/elements.min.js +1 -1
  8. package/dist/formValues.d.ts +0 -1
  9. package/dist/formValues.js +0 -1
  10. package/dist/formValues.min.js +1 -1
  11. package/dist/helpers.d.ts +0 -1
  12. package/dist/helpers.js +0 -1
  13. package/dist/microcomponents.d.ts +0 -1
  14. package/dist/microcomponents.js +0 -1
  15. package/dist/microcomponents.min.js +1 -1
  16. package/dist/observables.d.ts +0 -1
  17. package/dist/observables.js +0 -1
  18. package/dist/observables.min.js +1 -1
  19. package/package.json +10 -2
  20. package/.gitlab-ci.yml +0 -18
  21. package/.vscode/settings.json +0 -3
  22. package/MicroComponents.svg +0 -15
  23. package/assets/documentation/MC.md +0 -547
  24. package/assets/documentation/MicroComponents.svg +0 -15
  25. package/assets/documentation/ajaxian-1.png +0 -0
  26. package/assets/documentation/ajaxian-2.png +0 -0
  27. package/assets/documentation/ajaxian-3.png +0 -0
  28. package/assets/documentation/elements.md +0 -277
  29. package/assets/documentation/formvalues.md +0 -25
  30. package/assets/documentation/functional_requirements.md +0 -8
  31. package/assets/documentation/history.md +0 -436
  32. package/assets/documentation/klemmstein.png +0 -0
  33. package/assets/documentation/magic.md +0 -29
  34. package/assets/documentation/observables.md +0 -187
  35. package/assets/documentation/rnd0023-1.jpg +0 -0
  36. package/assets/documentation/rnd0023-2.jpg +0 -0
  37. package/assets/documentation/rnd0023-3.jpg +0 -0
  38. package/assets/documentation/tB_react.md +0 -207
  39. package/assets/documentation/usage.md +0 -142
  40. package/assets/documentation/why.md +0 -25
  41. package/assets/fiddle/MicroComponents.svg +0 -15
  42. package/assets/fiddle/fiddle.css +0 -0
  43. package/assets/fiddle/fiddle.js +0 -0
  44. package/assets/fiddle/index.html +0 -0
  45. package/assets/test/MicroComponents.svg +0 -15
  46. package/assets/test/grandparent.css +0 -16
  47. package/assets/test/myButton.css +0 -19
  48. package/assets/test/style.css +0 -8
  49. package/assets/test/test.html +0 -29
  50. package/assets/test/testform.json +0 -27
  51. package/dist/MC.d.ts.map +0 -1
  52. package/dist/elements.d.ts.map +0 -1
  53. package/dist/formValues.d.ts.map +0 -1
  54. package/dist/helpers.d.ts.map +0 -1
  55. package/dist/microcomponents.d.ts.map +0 -1
  56. package/dist/observables.d.ts.map +0 -1
  57. package/public/.nojekyll +0 -1
  58. package/public/MC.d.ts +0 -39
  59. package/public/MC.d.ts.map +0 -1
  60. package/public/MC.js +0 -287
  61. package/public/MC.js.map +0 -1
  62. package/public/MC.min.js +0 -348
  63. package/public/MC.ts +0 -431
  64. package/public/MicroComponents.svg +0 -15
  65. package/public/documentation/MC.md +0 -547
  66. package/public/documentation/MicroComponents.svg +0 -15
  67. package/public/documentation/ajaxian-1.png +0 -0
  68. package/public/documentation/ajaxian-2.png +0 -0
  69. package/public/documentation/ajaxian-3.png +0 -0
  70. package/public/documentation/elements.md +0 -277
  71. package/public/documentation/formvalues.md +0 -25
  72. package/public/documentation/functional_requirements.md +0 -8
  73. package/public/documentation/history.md +0 -436
  74. package/public/documentation/klemmstein.png +0 -0
  75. package/public/documentation/magic.md +0 -29
  76. package/public/documentation/observables.md +0 -187
  77. package/public/documentation/rnd0023-1.jpg +0 -0
  78. package/public/documentation/rnd0023-2.jpg +0 -0
  79. package/public/documentation/rnd0023-3.jpg +0 -0
  80. package/public/documentation/tB_react.md +0 -207
  81. package/public/documentation/usage.md +0 -142
  82. package/public/documentation/why.md +0 -25
  83. package/public/elements.d.ts +0 -5
  84. package/public/elements.d.ts.map +0 -1
  85. package/public/elements.js +0 -68
  86. package/public/elements.js.map +0 -1
  87. package/public/elements.min.js +0 -1
  88. package/public/elements.ts +0 -119
  89. package/public/fiddle/MicroComponents.svg +0 -15
  90. package/public/fiddle/fiddle.css +0 -0
  91. package/public/fiddle/fiddle.js +0 -0
  92. package/public/fiddle/index.html +0 -0
  93. package/public/formValues.d.ts +0 -3
  94. package/public/formValues.d.ts.map +0 -1
  95. package/public/formValues.js +0 -162
  96. package/public/formValues.js.map +0 -1
  97. package/public/formValues.min.js +0 -1
  98. package/public/formValues.ts +0 -225
  99. package/public/helpers.d.ts +0 -14
  100. package/public/helpers.d.ts.map +0 -1
  101. package/public/helpers.js +0 -113
  102. package/public/helpers.js.map +0 -1
  103. package/public/helpers.ts +0 -149
  104. package/public/microcomponents.d.ts +0 -6
  105. package/public/microcomponents.d.ts.map +0 -1
  106. package/public/microcomponents.js +0 -7
  107. package/public/microcomponents.js.map +0 -1
  108. package/public/microcomponents.min.js +0 -1
  109. package/public/microcomponents.ts +0 -8
  110. package/public/observables.d.ts +0 -11
  111. package/public/observables.d.ts.map +0 -1
  112. package/public/observables.js +0 -244
  113. package/public/observables.js.map +0 -1
  114. package/public/observables.min.js +0 -1
  115. package/public/observables.ts +0 -416
  116. package/public/selectors._ts +0 -1269
  117. package/public/src/MC.d.ts +0 -39
  118. package/public/src/MC.d.ts.map +0 -1
  119. package/public/src/MC.js +0 -287
  120. package/public/src/MC.js.map +0 -1
  121. package/public/src/MC.ts +0 -431
  122. package/public/src/elements.d.ts +0 -5
  123. package/public/src/elements.d.ts.map +0 -1
  124. package/public/src/elements.js +0 -68
  125. package/public/src/elements.js.map +0 -1
  126. package/public/src/elements.ts +0 -119
  127. package/public/src/formValues.d.ts +0 -3
  128. package/public/src/formValues.d.ts.map +0 -1
  129. package/public/src/formValues.js +0 -162
  130. package/public/src/formValues.js.map +0 -1
  131. package/public/src/formValues.ts +0 -225
  132. package/public/src/helpers.d.ts +0 -14
  133. package/public/src/helpers.d.ts.map +0 -1
  134. package/public/src/helpers.js +0 -113
  135. package/public/src/helpers.js.map +0 -1
  136. package/public/src/helpers.ts +0 -149
  137. package/public/src/microcomponents.d.ts +0 -6
  138. package/public/src/microcomponents.d.ts.map +0 -1
  139. package/public/src/microcomponents.js +0 -7
  140. package/public/src/microcomponents.js.map +0 -1
  141. package/public/src/microcomponents.ts +0 -8
  142. package/public/src/observables.d.ts +0 -11
  143. package/public/src/observables.d.ts.map +0 -1
  144. package/public/src/observables.js +0 -244
  145. package/public/src/observables.js.map +0 -1
  146. package/public/src/observables.ts +0 -416
  147. package/public/src/selectors._ts +0 -1269
  148. package/public/src/test/grandparent.css +0 -14
  149. package/public/src/test/test/child.d.ts +0 -2
  150. package/public/src/test/test/child.d.ts.map +0 -1
  151. package/public/src/test/test/child.js +0 -26
  152. package/public/src/test/test/child.js.map +0 -1
  153. package/public/src/test/test/child.ts +0 -36
  154. package/public/src/test/test/grandchild.d.ts +0 -2
  155. package/public/src/test/test/grandchild.d.ts.map +0 -1
  156. package/public/src/test/test/grandchild.js +0 -22
  157. package/public/src/test/test/grandchild.js.map +0 -1
  158. package/public/src/test/test/grandchild.ts +0 -31
  159. package/public/src/test/test/grandparent.d.ts +0 -2
  160. package/public/src/test/test/grandparent.d.ts.map +0 -1
  161. package/public/src/test/test/grandparent.js +0 -1
  162. package/public/src/test/test/grandparent.js.map +0 -1
  163. package/public/src/test/test/grandparent.ts +0 -43
  164. package/public/src/test/test/greatgrandchild.d.ts +0 -2
  165. package/public/src/test/test/greatgrandchild.d.ts.map +0 -1
  166. package/public/src/test/test/greatgrandchild.js +0 -36
  167. package/public/src/test/test/greatgrandchild.js.map +0 -1
  168. package/public/src/test/test/greatgrandchild.ts +0 -51
  169. package/public/src/test/test/parent.d.ts +0 -2
  170. package/public/src/test/test/parent.d.ts.map +0 -1
  171. package/public/src/test/test/parent.js +0 -25
  172. package/public/src/test/test/parent.js.map +0 -1
  173. package/public/src/test/test/parent.ts +0 -35
  174. package/public/src/test/test/testform.d.ts +0 -2
  175. package/public/src/test/test/testform.d.ts.map +0 -1
  176. package/public/src/test/test/testform.js +0 -1
  177. package/public/src/test/test/testform.js.map +0 -1
  178. package/public/src/test/test/testform.ts +0 -153
  179. package/public/src/test/test/testfunction.d.ts +0 -3
  180. package/public/src/test/test/testfunction.d.ts.map +0 -1
  181. package/public/src/test/test/testfunction.js +0 -7
  182. package/public/src/test/test/testfunction.js.map +0 -1
  183. package/public/src/test/test/testfunction.ts +0 -12
  184. package/public/src/test/test/testmc.d.ts +0 -3
  185. package/public/src/test/test/testmc.d.ts.map +0 -1
  186. package/public/src/test/test/testmc.js +0 -10
  187. package/public/src/test/test/testmc.js.map +0 -1
  188. package/public/src/test/test/testmc.ts +0 -16
  189. package/public/src/test/test/testsimpleclass.d.ts +0 -3
  190. package/public/src/test/test/testsimpleclass.d.ts.map +0 -1
  191. package/public/src/test/test/testsimpleclass.js +0 -9
  192. package/public/src/test/test/testsimpleclass.js.map +0 -1
  193. package/public/src/test/test/testsimpleclass.ts +0 -15
  194. package/public/src/test/test.d.ts +0 -2
  195. package/public/src/test/test.d.ts.map +0 -1
  196. package/public/src/test/test.js +0 -72
  197. package/public/src/test/test.js.map +0 -1
  198. package/public/src/test/test.ts +0 -176
  199. package/public/src/test/testform.css +0 -47
  200. package/public/src/test/testform.html +0 -56
  201. package/public/src/test/testform.json +0 -27
  202. package/public/test/MC.d.ts +0 -39
  203. package/public/test/MC.d.ts.map +0 -1
  204. package/public/test/MC.js +0 -287
  205. package/public/test/MC.min.js +0 -348
  206. package/public/test/MC.ts +0 -431
  207. package/public/test/MicroComponents.svg +0 -15
  208. package/public/test/elements.d.ts +0 -5
  209. package/public/test/elements.d.ts.map +0 -1
  210. package/public/test/elements.js +0 -68
  211. package/public/test/elements.min.js +0 -1
  212. package/public/test/elements.ts +0 -119
  213. package/public/test/formValues.d.ts +0 -3
  214. package/public/test/formValues.d.ts.map +0 -1
  215. package/public/test/formValues.js +0 -162
  216. package/public/test/formValues.min.js +0 -1
  217. package/public/test/formValues.ts +0 -225
  218. package/public/test/grandparent.css +0 -14
  219. package/public/test/helpers.d.ts +0 -14
  220. package/public/test/helpers.d.ts.map +0 -1
  221. package/public/test/helpers.js +0 -113
  222. package/public/test/helpers.ts +0 -149
  223. package/public/test/microcomponents.d.ts +0 -6
  224. package/public/test/microcomponents.d.ts.map +0 -1
  225. package/public/test/microcomponents.js +0 -7
  226. package/public/test/microcomponents.min.js +0 -1
  227. package/public/test/microcomponents.ts +0 -8
  228. package/public/test/myButton.css +0 -19
  229. package/public/test/observables.d.ts +0 -11
  230. package/public/test/observables.d.ts.map +0 -1
  231. package/public/test/observables.js +0 -244
  232. package/public/test/observables.min.js +0 -1
  233. package/public/test/observables.ts +0 -416
  234. package/public/test/style.css +0 -8
  235. package/public/test/test/child.d.ts +0 -2
  236. package/public/test/test/child.d.ts.map +0 -1
  237. package/public/test/test/child.js +0 -26
  238. package/public/test/test/child.js.map +0 -1
  239. package/public/test/test/child.ts +0 -36
  240. package/public/test/test/grandchild.d.ts +0 -2
  241. package/public/test/test/grandchild.d.ts.map +0 -1
  242. package/public/test/test/grandchild.js +0 -22
  243. package/public/test/test/grandchild.js.map +0 -1
  244. package/public/test/test/grandchild.ts +0 -31
  245. package/public/test/test/grandparent.d.ts +0 -2
  246. package/public/test/test/grandparent.d.ts.map +0 -1
  247. package/public/test/test/grandparent.js +0 -1
  248. package/public/test/test/grandparent.js.map +0 -1
  249. package/public/test/test/grandparent.ts +0 -43
  250. package/public/test/test/greatgrandchild.d.ts +0 -2
  251. package/public/test/test/greatgrandchild.d.ts.map +0 -1
  252. package/public/test/test/greatgrandchild.js +0 -36
  253. package/public/test/test/greatgrandchild.js.map +0 -1
  254. package/public/test/test/greatgrandchild.ts +0 -51
  255. package/public/test/test/parent.d.ts +0 -2
  256. package/public/test/test/parent.d.ts.map +0 -1
  257. package/public/test/test/parent.js +0 -25
  258. package/public/test/test/parent.js.map +0 -1
  259. package/public/test/test/parent.ts +0 -35
  260. package/public/test/test/testform.d.ts +0 -2
  261. package/public/test/test/testform.d.ts.map +0 -1
  262. package/public/test/test/testform.js +0 -1
  263. package/public/test/test/testform.js.map +0 -1
  264. package/public/test/test/testform.ts +0 -153
  265. package/public/test/test/testfunction.d.ts +0 -3
  266. package/public/test/test/testfunction.d.ts.map +0 -1
  267. package/public/test/test/testfunction.js +0 -7
  268. package/public/test/test/testfunction.js.map +0 -1
  269. package/public/test/test/testfunction.ts +0 -12
  270. package/public/test/test/testmc.d.ts +0 -3
  271. package/public/test/test/testmc.d.ts.map +0 -1
  272. package/public/test/test/testmc.js +0 -10
  273. package/public/test/test/testmc.js.map +0 -1
  274. package/public/test/test/testmc.ts +0 -16
  275. package/public/test/test/testsimpleclass.d.ts +0 -3
  276. package/public/test/test/testsimpleclass.d.ts.map +0 -1
  277. package/public/test/test/testsimpleclass.js +0 -9
  278. package/public/test/test/testsimpleclass.js.map +0 -1
  279. package/public/test/test/testsimpleclass.ts +0 -15
  280. package/public/test/test.d.ts +0 -2
  281. package/public/test/test.d.ts.map +0 -1
  282. package/public/test/test.html +0 -29
  283. package/public/test/test.js +0 -72
  284. package/public/test/test.js.map +0 -1
  285. package/public/test/test.ts +0 -176
  286. package/public/test/testform.css +0 -47
  287. package/public/test/testform.html +0 -56
  288. package/public/test/testform.json +0 -27
  289. package/public/typedoc/.nojekyll +0 -1
  290. package/public/typedoc/assets/highlight.css +0 -106
  291. package/public/typedoc/assets/icons.js +0 -18
  292. package/public/typedoc/assets/icons.svg +0 -1
  293. package/public/typedoc/assets/main.js +0 -60
  294. package/public/typedoc/assets/navigation.js +0 -1
  295. package/public/typedoc/assets/search.js +0 -1
  296. package/public/typedoc/assets/style.css +0 -1493
  297. package/public/typedoc/classes/MC.DC.html +0 -13
  298. package/public/typedoc/classes/MC.MC.html +0 -3
  299. package/public/typedoc/classes/MC.McBase.html +0 -3
  300. package/public/typedoc/functions/MC.autoload.html +0 -1
  301. package/public/typedoc/functions/MC.off.html +0 -1
  302. package/public/typedoc/functions/MC.on.html +0 -1
  303. package/public/typedoc/functions/MC.one.html +0 -1
  304. package/public/typedoc/functions/MC.trigger.html +0 -1
  305. package/public/typedoc/functions/elements.defineCE.html +0 -1
  306. package/public/typedoc/functions/elements.getCE.html +0 -1
  307. package/public/typedoc/functions/formValues.formValues.html +0 -1
  308. package/public/typedoc/functions/observables.observe.html +0 -1
  309. package/public/typedoc/hierarchy.html +0 -1
  310. package/public/typedoc/index.html +0 -122
  311. package/public/typedoc/interfaces/MC.HTMLMcElement.html +0 -758
  312. package/public/typedoc/media/MicroComponents.svg +0 -15
  313. package/public/typedoc/modules/MC.html +0 -10
  314. package/public/typedoc/modules/elements.html +0 -3
  315. package/public/typedoc/modules/formValues.html +0 -2
  316. package/public/typedoc/modules/observables.html +0 -3
  317. package/public/typedoc/modules.html +0 -5
  318. package/public/typedoc/types/observables.Observable.html +0 -1
  319. package/src/MC.ts +0 -431
  320. package/src/elements.ts +0 -119
  321. package/src/formValues.ts +0 -225
  322. package/src/helpers.ts +0 -149
  323. package/src/microcomponents.ts +0 -8
  324. package/src/observables.ts +0 -416
  325. package/src/selectors._ts +0 -1269
  326. package/src/test/grandparent.css +0 -14
  327. package/src/test/test/child.ts +0 -36
  328. package/src/test/test/grandchild.ts +0 -31
  329. package/src/test/test/grandparent.ts +0 -43
  330. package/src/test/test/greatgrandchild.ts +0 -51
  331. package/src/test/test/parent.ts +0 -35
  332. package/src/test/test/testform.ts +0 -153
  333. package/src/test/test/testfunction.ts +0 -12
  334. package/src/test/test/testmc.ts +0 -16
  335. package/src/test/test/testsimpleclass.ts +0 -15
  336. package/src/test/test.ts +0 -176
  337. package/src/test/testform.css +0 -47
  338. package/src/test/testform.html +0 -56
  339. package/src/test/testform.json +0 -27
  340. package/tasks.md +0 -36
  341. package/tsconfig.json +0 -107
  342. package/typedoc.json +0 -7
  343. package/webpack.config.js +0 -346
package/dist/MC.d.ts CHANGED
@@ -36,4 +36,3 @@ declare class DC extends McBase {
36
36
  }
37
37
  declare function autoload(enable?: boolean): boolean;
38
38
  export { McBase, MC, DC, autoload, on, one, off, trigger };
39
- //# sourceMappingURL=MC.d.ts.map
package/dist/MC.js CHANGED
@@ -64,10 +64,12 @@ function trigger(domNode, event, data = {}, bubble = 'l', controller) {
64
64
  const eventName = /^_mc/.test(event) ? event : getMcEventName(event), bubbleController = !!controller ? controller : new BubbleController(), ev = new CustomEvent(eventName, { detail: { data, control: bubbleController }, bubbles: false });
65
65
  if (bubbleController.stopped)
66
66
  return;
67
- domNode.dispatchEvent(ev);
68
- ev.stopImmediatePropagation();
69
- if (bubbleController.stopped)
70
- return;
67
+ if (/l/.test(bubble)) {
68
+ domNode.dispatchEvent(ev);
69
+ ev.stopImmediatePropagation();
70
+ if (bubbleController.stopped)
71
+ return;
72
+ }
71
73
  if (/[ud]/.test(bubble)) {
72
74
  if (bubble.indexOf('l') === -1) {
73
75
  bubble += 'l';
@@ -284,4 +286,3 @@ function autoload(enable = true) {
284
286
  }
285
287
  autoload.state = loadingDCs;
286
288
  export { McBase, MC, DC, autoload, on, one, off, trigger };
287
- //# sourceMappingURL=MC.js.map
package/dist/MC.min.js CHANGED
@@ -1,59 +1,35 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define([], factory);
6
- else if(typeof exports === 'object')
7
- exports["MC"] = factory();
8
- else
9
- root["MC"] = factory();
10
- })(this, () => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ // The require scope
14
- /******/ var __webpack_require__ = {};
15
- /******/
1
+ /******/ // The require scope
2
+ /******/ var __webpack_require__ = {};
3
+ /******/
16
4
  /************************************************************************/
17
- /******/ /* webpack/runtime/define property getters */
18
- /******/ (() => {
19
- /******/ // define getter functions for harmony exports
20
- /******/ __webpack_require__.d = (exports, definition) => {
21
- /******/ for(var key in definition) {
22
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
23
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
24
- /******/ }
5
+ /******/ /* webpack/runtime/define property getters */
6
+ /******/ (() => {
7
+ /******/ // define getter functions for harmony exports
8
+ /******/ __webpack_require__.d = (exports, definition) => {
9
+ /******/ for(var key in definition) {
10
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
11
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
25
12
  /******/ }
26
- /******/ };
27
- /******/ })();
28
- /******/
29
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
30
- /******/ (() => {
31
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
32
- /******/ })();
33
- /******/
34
- /******/ /* webpack/runtime/make namespace object */
35
- /******/ (() => {
36
- /******/ // define __esModule on exports
37
- /******/ __webpack_require__.r = (exports) => {
38
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
39
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
40
- /******/ }
41
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
42
- /******/ };
43
- /******/ })();
44
- /******/
13
+ /******/ }
14
+ /******/ };
15
+ /******/ })();
16
+ /******/
17
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
18
+ /******/ (() => {
19
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
20
+ /******/ })();
21
+ /******/
45
22
  /************************************************************************/
46
23
  var __webpack_exports__ = {};
47
- __webpack_require__.r(__webpack_exports__);
48
24
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25
+ /* harmony export */ AU: () => (/* binding */ off),
49
26
  /* harmony export */ DC: () => (/* binding */ DC),
27
+ /* harmony export */ E_: () => (/* binding */ autoload),
50
28
  /* harmony export */ MC: () => (/* binding */ MC),
51
- /* harmony export */ McBase: () => (/* binding */ McBase),
52
- /* harmony export */ autoload: () => (/* binding */ autoload),
53
- /* harmony export */ off: () => (/* binding */ off),
29
+ /* harmony export */ Oc: () => (/* binding */ McBase),
30
+ /* harmony export */ hZ: () => (/* binding */ trigger),
54
31
  /* harmony export */ on: () => (/* binding */ on),
55
- /* harmony export */ one: () => (/* binding */ one),
56
- /* harmony export */ trigger: () => (/* binding */ trigger)
32
+ /* harmony export */ xH: () => (/* binding */ one)
57
33
  /* harmony export */ });
58
34
 
59
35
  const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');
@@ -121,10 +97,12 @@ function trigger(domNode, event, data = {}, bubble = 'l', controller) {
121
97
  const eventName = /^_mc/.test(event) ? event : getMcEventName(event), bubbleController = !!controller ? controller : new BubbleController(), ev = new CustomEvent(eventName, { detail: { data, control: bubbleController }, bubbles: false });
122
98
  if (bubbleController.stopped)
123
99
  return;
124
- domNode.dispatchEvent(ev);
125
- ev.stopImmediatePropagation();
126
- if (bubbleController.stopped)
127
- return;
100
+ if (/l/.test(bubble)) {
101
+ domNode.dispatchEvent(ev);
102
+ ev.stopImmediatePropagation();
103
+ if (bubbleController.stopped)
104
+ return;
105
+ }
128
106
  if (/[ud]/.test(bubble)) {
129
107
  if (bubble.indexOf('l') === -1) {
130
108
  bubble += 'l';
@@ -342,7 +320,12 @@ function autoload(enable = true) {
342
320
  autoload.state = loadingDCs;
343
321
 
344
322
 
345
- /******/ return __webpack_exports__;
346
- /******/ })()
347
- ;
348
- });
323
+ var __webpack_exports__DC = __webpack_exports__.DC;
324
+ var __webpack_exports__MC = __webpack_exports__.MC;
325
+ var __webpack_exports__McBase = __webpack_exports__.Oc;
326
+ var __webpack_exports__autoload = __webpack_exports__.E_;
327
+ var __webpack_exports__off = __webpack_exports__.AU;
328
+ var __webpack_exports__on = __webpack_exports__.on;
329
+ var __webpack_exports__one = __webpack_exports__.xH;
330
+ var __webpack_exports__trigger = __webpack_exports__.hZ;
331
+ export { __webpack_exports__DC as DC, __webpack_exports__MC as MC, __webpack_exports__McBase as McBase, __webpack_exports__autoload as autoload, __webpack_exports__off as off, __webpack_exports__on as on, __webpack_exports__one as one, __webpack_exports__trigger as trigger };
package/dist/MC.ts CHANGED
@@ -108,14 +108,16 @@ function trigger(
108
108
  ){
109
109
  const eventName = /^_mc/.test( event ) ? event : getMcEventName( event ),
110
110
  bubbleController = !!controller ? controller : new BubbleController(),
111
- ev = new CustomEvent( eventName, { detail: {data,control: bubbleController}, bubbles: false } );
111
+ ev = new CustomEvent( eventName, { detail: { data, control: bubbleController }, bubbles: false } );
112
112
 
113
113
  if ( bubbleController.stopped ) return;
114
114
 
115
- domNode.dispatchEvent( ev );
116
- ev.stopImmediatePropagation();
115
+ if ( /l/.test(bubble) ){
116
+ domNode.dispatchEvent( ev );
117
+ ev.stopImmediatePropagation();
117
118
 
118
- if ( bubbleController.stopped ) return;
119
+ if ( bubbleController.stopped ) return;
120
+ }
119
121
 
120
122
  // bubble if up or down is indicated
121
123
  if( /[ud]/.test( bubble ) ){
@@ -2,4 +2,3 @@ export declare function defineCE(tagName: string, DefinitionClass: {
2
2
  new (...args: any[]): any;
3
3
  } | Function, observedAttributes?: string[]): void;
4
4
  export declare function getCE(tagName: string): CustomElementConstructor | undefined;
5
- //# sourceMappingURL=elements.d.ts.map
package/dist/elements.js CHANGED
@@ -65,4 +65,3 @@ export function defineCE(tagName, DefinitionClass, observedAttributes = []) {
65
65
  export function getCE(tagName) {
66
66
  return customElements.get(tagName);
67
67
  }
68
- //# sourceMappingURL=elements.js.map
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.elements=e():t.elements=e()}(this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{defineCE:()=>d,getCE:()=>m});const n=new Function("try {return this===window;}catch(e){ return false;}");function r(t){return t&&t instanceof HTMLElement}function o(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function c(t,e,n,r=!1){return t.addEventListener(o(e),n,{capture:!1,once:r}),n}class s{stopped=!1;constructor(){}stop(){this.stopped=!0}}class i{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==a&&e.trigger("Init")}),0),function(t){if(!n()||t.constructor===a)return;const e=t.target;if(e instanceof HTMLElement){let n=t;Object.getOwnPropertyNames(n.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof n.constructor.prototype[t])).forEach((t=>{let r=/^one/.test(t),o=t.replace(/^on[e]{0,1}/,""),s=o.toLowerCase();if("on"+s in e){let r=e=>{n[t](e)};e.addEventListener(s,r)}else c(e,o,(e=>{n[t](e)}),r)}))}}(this)}get target(){return this._target.deref()}}class a extends i{constructor(t){super(t)}static add(t,e,n={}){return function(t,e,n={}){let r=t;r._mc||(r._mc=new a(t));const o=r._mc;return e.length&&!o[e]&&(o[e]=n,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),r}(t,e,n)}static remove(t,e){!function(t,e){if(!e)return;const n=t?._mc||{};n&&n[e]&&delete n[e],!Object.keys(n).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){!function(t,e,n){t.removeEventListener(o(e),n)}(this.target,t,e)}on(t,e){return c(this.target,t,e)}one(t,e){return function(t,e,n){return c(t,e,n,!0),n}(this.target,t,e)}trigger(t,e={},n="l",r){!function(t,e,n={},r="l",c){const i=/^_mc/.test(e)?e:o(e),a=c||new s,u=new CustomEvent(i,{detail:{data:n,control:a},bubbles:!1});a.stopped||(t.dispatchEvent(u),u.stopImmediatePropagation(),a.stopped||/[ud]/.test(r)&&(-1===r.indexOf("l")&&(r+="l"),setTimeout((()=>{if(r.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(i,n,r,a)}if(r.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(i,n,r)))}}),0)))}(this.target,t,e,n,r)}ancestors(){let t=this?.target,e=[];if(!r(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return r(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return r(t)?function(t){const e=Math.random().toString().replace(".",""),n='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const r=[...t.querySelectorAll(n)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),r.length?r:null}(t):null}descendants(){const t=this?.target;if(!r(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}new Set;class u extends HTMLElement{constructor(){super()}connectedCallback(){this.dispatchEvent(new CustomEvent("_mcConnected"))}connectedMoveCallback(){this.dispatchEvent(new CustomEvent("_mcConnectedMove"))}disconnectedCallback(){this.dispatchEvent(new CustomEvent("_mcDisconnected"))}adoptedCallback(){this.dispatchEvent(new CustomEvent("_mcAdopted"))}attributeChangedCallback(t,e,n){this.dispatchEvent(new CustomEvent("_mcAttributeChanged",{detail:{name:t,oldValue:e,newValue:n}}))}formResetCallback(){this.dispatchEvent(new CustomEvent("_mcFormReset"))}}function l(t){return"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t))}function d(t,e,n=[]){if(customElements.get(t))return void console.warn(`IGNORED: Custom element "${t}" is already defined!`);if(!t.includes("-"))throw new Error('createCustomElement: tagName must contain at least one hyphen ("-").');let r=t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join("");l(e.prototype.constructor)&&e.prototype instanceof i?customElements.define(t,function(t,e){return Object.defineProperty(e,"name",{value:t})}(r,class extends u{instance;constructor(t){super();const n=l(e)?new e(this,t):e;a.add(this,r,n)}static get observedAttributes(){return n}})):customElements.define(t,e)}function m(t){return customElements.get(t)}return e})()));
1
+ var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{c:()=>d,t:()=>m});const n=new Function("try {return this===window;}catch(e){ return false;}");function r(t){return t&&t instanceof HTMLElement}function c(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function o(t,e,n,r=!1){return t.addEventListener(c(e),n,{capture:!1,once:r}),n}class s{stopped=!1;constructor(){}stop(){this.stopped=!0}}class a{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==i&&e.trigger("Init")}),0),function(t){if(!n()||t.constructor===i)return;const e=t.target;if(e instanceof HTMLElement){let n=t;Object.getOwnPropertyNames(n.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof n.constructor.prototype[t])).forEach((t=>{let r=/^one/.test(t),c=t.replace(/^on[e]{0,1}/,""),s=c.toLowerCase();if("on"+s in e){let r=e=>{n[t](e)};e.addEventListener(s,r)}else o(e,c,(e=>{n[t](e)}),r)}))}}(this)}get target(){return this._target.deref()}}class i extends a{constructor(t){super(t)}static add(t,e,n={}){return function(t,e,n={}){let r=t;r._mc||(r._mc=new i(t));const c=r._mc;return e.length&&!c[e]&&(c[e]=n,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),r}(t,e,n)}static remove(t,e){!function(t,e){if(!e)return;const n=t?._mc||{};n&&n[e]&&delete n[e],!Object.keys(n).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){!function(t,e,n){t.removeEventListener(c(e),n)}(this.target,t,e)}on(t,e){return o(this.target,t,e)}one(t,e){return function(t,e,n){return o(t,e,n,!0),n}(this.target,t,e)}trigger(t,e={},n="l",r){!function(t,e,n={},r="l",o){const a=/^_mc/.test(e)?e:c(e),i=o||new s,l=new CustomEvent(a,{detail:{data:n,control:i},bubbles:!1});i.stopped||/l/.test(r)&&(t.dispatchEvent(l),l.stopImmediatePropagation(),i.stopped)||/[ud]/.test(r)&&(-1===r.indexOf("l")&&(r+="l"),setTimeout((()=>{if(r.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(a,n,r,i)}if(r.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(a,n,r)))}}),0))}(this.target,t,e,n,r)}ancestors(){let t=this?.target,e=[];if(!r(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return r(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return r(t)?function(t){const e=Math.random().toString().replace(".",""),n='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const r=[...t.querySelectorAll(n)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),r.length?r:null}(t):null}descendants(){const t=this?.target;if(!r(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}new Set;class l extends HTMLElement{constructor(){super()}connectedCallback(){this.dispatchEvent(new CustomEvent("_mcConnected"))}connectedMoveCallback(){this.dispatchEvent(new CustomEvent("_mcConnectedMove"))}disconnectedCallback(){this.dispatchEvent(new CustomEvent("_mcDisconnected"))}adoptedCallback(){this.dispatchEvent(new CustomEvent("_mcAdopted"))}attributeChangedCallback(t,e,n){this.dispatchEvent(new CustomEvent("_mcAttributeChanged",{detail:{name:t,oldValue:e,newValue:n}}))}formResetCallback(){this.dispatchEvent(new CustomEvent("_mcFormReset"))}}function u(t){return"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t))}function d(t,e,n=[]){if(customElements.get(t))return void console.warn(`IGNORED: Custom element "${t}" is already defined!`);if(!t.includes("-"))throw new Error('createCustomElement: tagName must contain at least one hyphen ("-").');let r=t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join("");u(e.prototype.constructor)&&e.prototype instanceof a?customElements.define(t,function(t,e){return Object.defineProperty(e,"name",{value:t})}(r,class extends l{instance;constructor(t){super();const n=u(e)?new e(this,t):e;i.add(this,r,n)}static get observedAttributes(){return n}})):customElements.define(t,e)}function m(t){return customElements.get(t)}var p=e.c,f=e.t;export{p as defineCE,f as getCE};
@@ -1,3 +1,2 @@
1
1
  import { LooseObject } from './helpers.js';
2
2
  export declare function formValues(targetObject: LooseObject, propertyName: string, dom: HTMLElement | ShadowRoot): void;
3
- //# sourceMappingURL=formValues.d.ts.map
@@ -159,4 +159,3 @@ export function formValues(targetObject, propertyName, dom) {
159
159
  });
160
160
  });
161
161
  }
162
- //# sourceMappingURL=formValues.js.map
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.formValues=e():t.formValues=e()}(this,(()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){let e={};return[...Object.keys(t)].sort().forEach((n=>{var s;(s=t[n])&&s.constructor&&s.constructor===Object?e[n]=r(t[n]):e[n]=t[n]})),e}function n(t,e=!0){let s={};return[...Object.getOwnPropertyNames(t)].forEach((e=>{if(t[e]&&t[e].constructor&&t[e].constructor===Object){const r=n(t[e],!1);for(const t in r)s[e+"."+t]=r[t]}else s[e]=t[e]})),e?r(s):s}function s(t,e){return JSON.stringify(n(t))===JSON.stringify(n(e))}function o(t,e){let r;return()=>{clearTimeout(r),r=setTimeout((function(){t(...arguments)}),e)}}function a(t,e){const r=Object.getOwnPropertyDescriptors(t);for(const[t,n]of Object.entries(r))("get"in n||"set"in n)&&Object.defineProperty(e,t,n)}t.r(e),t.d(e,{formValues:()=>x});const c=new Function("try {return this===window;}catch(e){ return false;}");function l(t){return t&&t instanceof HTMLElement}function i(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function u(t,e,r,n=!1){return t.addEventListener(i(e),r,{capture:!1,once:n}),r}class f{stopped=!1;constructor(){}stop(){this.stopped=!0}}function d(t,e,r={},n="l",s){const o=/^_mc/.test(e)?e:i(e),a=s||new f,c=new CustomEvent(o,{detail:{data:r,control:a},bubbles:!1});a.stopped||(t.dispatchEvent(c),c.stopImmediatePropagation(),a.stopped||/[ud]/.test(n)&&(-1===n.indexOf("l")&&(n+="l"),setTimeout((()=>{if(n.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(o,r,n,a)}if(n.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(o,r,n)))}}),0)))}class h{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==p&&e.trigger("Init")}),0),function(t){if(!c()||t.constructor===p)return;const e=t.target;if(e instanceof HTMLElement){let r=t;Object.getOwnPropertyNames(r.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof r.constructor.prototype[t])).forEach((t=>{let n=/^one/.test(t),s=t.replace(/^on[e]{0,1}/,""),o=s.toLowerCase();if("on"+o in e){let n=e=>{r[t](e)};e.addEventListener(o,n)}else u(e,s,(e=>{r[t](e)}),n)}))}}(this)}get target(){return this._target.deref()}}class p extends h{constructor(t){super(t)}static add(t,e,r={}){return function(t,e,r={}){let n=t;n._mc||(n._mc=new p(t));const s=n._mc;return e.length&&!s[e]&&(s[e]=r,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),n}(t,e,r)}static remove(t,e){!function(t,e){if(!e)return;const r=t?._mc||{};r&&r[e]&&delete r[e],!Object.keys(r).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){!function(t,e,r){t.removeEventListener(i(e),r)}(this.target,t,e)}on(t,e){return u(this.target,t,e)}one(t,e){return function(t,e,r){return u(t,e,r,!0),r}(this.target,t,e)}trigger(t,e={},r="l",n){d(this.target,t,e,r,n)}ancestors(){let t=this?.target,e=[];if(!l(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return l(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return l(t)?function(t){const e=Math.random().toString().replace(".",""),r='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const n=[...t.querySelectorAll(r)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),n.length?n:null}(t):null}descendants(){const t=this?.target;if(!l(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}function m(t){return null!=t&&"object"==typeof t}function g(t){let e=new Set,r=/\{[^\{\}]*\}/g;return(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(r))).forEach((e=>{let n=new Set(t.getAttribute(e)?.match(r));n.forEach((t=>n.add(t.replace(/[\{\}]/g,""))))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(r))).forEach((t=>{(t.nodeValue||"").match(r).forEach((t=>{e.add(t.replace(/[\{\}]/g,""))}))})),[...e].map((t=>t.replace(/[\{\}]/g,"")))}new Set;const b=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement];class y extends p{data={};oldDisplay="";constructor(t){super(t),g(t).forEach((t=>this.data[t]="")),E(this),this.#t()}#t(){let t=this.target,e=!1;(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(/\{[^\{\}]*\}/g))).forEach((e=>{let r=new Set(t.getAttribute(e)?.match(/\{[^\{\}]*\}/g));var n;this.data.observe((n=t.getAttribute(e),s=>{let o=n;r.forEach((t=>{o=o.replace(t,s[t.replace(/[\{\}]/g,"")])})),t.setAttribute(e,o)}))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(/\{[^\{\}]*\}/g))).forEach((r=>{e=!0;let n=new Set(r.nodeValue.match(/\{[^\{\}]*\}/g));this.data.observe((e=>s=>{let o=e;n.forEach((t=>{o=o.replace(t,s[t.replace(/[\{\}]/g,"")])})),this.oldDisplay?t.style=this.oldDisplay:t.removeAttribute("style"),delete this.oldDisplay,r.nodeValue=o})(r.nodeValue)),this.oldDisplay=t.getAttribute("style")||"",e&&!b.includes(t.constructor)&&"FIELDSET"!==t.tagName&&(t.style.display="none")}))}onData(t){let e={};Object.keys(t.detail.data).forEach((r=>{this.data.hasOwnProperty(r)&&(e[r]=t.detail.data[r])})),JSON.stringify(e)!==JSON.stringify(this.data)&&Object.assign(this.data,e)}}const v={};function O(t){let e=t.constructor.name;return v[e]||function(t){const e=t.constructor,r=e.name;let s=class extends e{#e=!0;#r=[];constructor(t){super(t),this.constructor.callbacks=[],m(t)&&Object.getOwnPropertyNames(t).forEach((e=>{this[e]=t[e]}))}get callbacks(){return this.#r}set callbacks(t){this.#r=t}observe(t){return this.#r.push(t),this}bind(t){if(m(this.valueOf())){!function(t){var e;(e=t,[e].concat([...e.querySelectorAll("*")]).filter((t=>!!g(t).length)).filter((t=>"STYLE"!==t?.tagName)).reverse()).forEach((t=>{t?._mc?._placeholders||p.add(t,"_placeholders",new y(t))}))}(t);const e=[t,...t.querySelectorAll("[data-mc]")].filter((t=>!!t?._mc?._placeholders)),r=function(t){let r=n(t);e.forEach((t=>{t&&d(t,"data",r)}))};this.#r.push(r),this.notify()}else console.warn("IGNORED - cannot bind a non-Object to the dom, IS:",typeof this.valueOf(),this);return this}notify(t){let e=m(this.valueOf())&&this.valueOf()instanceof Array==0?structuredClone(Object.assign({},this)):this.valueOf();return void 0!==t&&(this.#e=t),this.#r.forEach((t=>{t(e)})),this}};return v[r]=s,s}(t)}const E=(t,e)=>((e?[e]:[...Object.getOwnPropertyNames(t)]).forEach((e=>{if(t.hasOwnProperty(e)&&"function"!=typeof t[e]&&!t?.[e]?.constructor?.prototype?.observe){if("_"===e[0]||void 0===t?.[e])return t;let r=t[e],n=new(O(r))(r);Object.defineProperty(t,e,{enumerable:!0,get(){if(m(n.valueOf())){let t=structuredClone(Object.assign({},n));setTimeout(o((function(){s(structuredClone(Object.assign({},n)),t)||n.notify()}),0),0)}return n},set(t){if(typeof t==typeof n.valueOf())if(m(n.valueOf())&&n.valueOf()instanceof Array==0){let e=structuredClone(Object.assign({},n));void 0===n?.constructor?.prototype?.observe&&(n=new(O(t))(structuredClone(Object.assign({},t))),a(t,n),n.seal()),Object.assign(n,t),setTimeout(o((function(){s(structuredClone(Object.assign({},n)),e)||n.notify()}),0),0)}else{let e=n.valueOf(),r=n.callbacks;t!==e&&(n=new(O(t))(t),n.callbacks=r,n.notify())}else console.warn("IGNORED - cannot change observable types, IS:",typeof n.valueOf(),n,"- CANNOT BECOME:",typeof t)}}),t[e]=r}})),t);class w{constructor(t){}}class A extends w{#n;constructor(t){super(t),this.#n=t}get val(){return new FormData(this.#n.form).get(this.#n.name)}set val(t){[...this.#n.form.querySelectorAll(`input[type="radio"][name="${this.#n.name}"]`)].filter((e=>e.getAttribute("value")===t)).shift().checked=!0}}class j extends w{#n;constructor(t){super(t),this.#n=t}get val(){return this.#n.checked}set val(t){this.#n.checked=t}}class S extends w{#n;constructor(t){super(t),this.#n=t}get val(){return this.#n.value}set val(t){this.#n.value=t}}class _ extends w{#n;#s=!1;constructor(t){super(t),this.#n=t,this.#s=t.multiple}get val(){const t=[];return[...this.#n.querySelectorAll("option")].filter((t=>t.selected)).forEach((e=>{t.push(e.value)})),this.#s?t:t.length?t[0]:""}set val(t){t="string"==typeof t?[t]:t,[...this.#n.querySelectorAll("option")].forEach((e=>{t.indexOf(e.value)>-1?e.selected=!0:e.selected=!1}))}}class k extends w{#n;constructor(t){super(t),this.#n=t}get val(){return this.#n.value||""}set val(t){this.#n.value=t}}const N=t=>{let e=[...(t||document).querySelectorAll("input,select,textarea")],r={};return e.forEach((t=>{const e=t.getAttribute("name");if(e){let n=!1;switch((t=>t.tagName.toLowerCase())(t)){case"input":switch(t.type){case"radio":n=new A(t);break;case"checkbox":n=new j(t);break;default:n=new S(t)}break;case"select":n=new _(t);break;case"textarea":n=new k(t);break;default:console.warn("handler missing:",e,"for",t.tagName.toLowerCase(),t)}n&&(p.add(t,e,n),Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>n.val,set:t=>{n.val!==t&&(n.val=t)}}))}})),r};function x(t,e,r){let n=N(r);t[e]=Object.assign({},n),E(t,e),a(n,t[e]),[...r.querySelectorAll("input, textarea, select")].forEach((r=>{r.addEventListener("input",(r=>{t[e].notify()}))}))}return e})()));
1
+ var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(t){let e={};return[...Object.keys(t)].sort().forEach((n=>{var s;(s=t[n])&&s.constructor&&s.constructor===Object?e[n]=r(t[n]):e[n]=t[n]})),e}function n(t,e=!0){let s={};return[...Object.getOwnPropertyNames(t)].forEach((e=>{if(t[e]&&t[e].constructor&&t[e].constructor===Object){const r=n(t[e],!1);for(const t in r)s[e+"."+t]=r[t]}else s[e]=t[e]})),e?r(s):s}function s(t,e){return JSON.stringify(n(t))===JSON.stringify(n(e))}function a(t,e){let r;return()=>{clearTimeout(r),r=setTimeout((function(){t(...arguments)}),e)}}function c(t,e){const r=Object.getOwnPropertyDescriptors(t);for(const[t,n]of Object.entries(r))("get"in n||"set"in n)&&Object.defineProperty(e,t,n)}t.d(e,{R:()=>T});const o=new Function("try {return this===window;}catch(e){ return false;}");function l(t){return t&&t instanceof HTMLElement}function i(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function u(t,e,r,n=!1){return t.addEventListener(i(e),r,{capture:!1,once:n}),r}class f{stopped=!1;constructor(){}stop(){this.stopped=!0}}function h(t,e,r={},n="l",s){const a=/^_mc/.test(e)?e:i(e),c=s||new f,o=new CustomEvent(a,{detail:{data:r,control:c},bubbles:!1});c.stopped||/l/.test(n)&&(t.dispatchEvent(o),o.stopImmediatePropagation(),c.stopped)||/[ud]/.test(n)&&(-1===n.indexOf("l")&&(n+="l"),setTimeout((()=>{if(n.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(a,r,n,c)}if(n.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(a,r,n)))}}),0))}class d{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==p&&e.trigger("Init")}),0),function(t){if(!o()||t.constructor===p)return;const e=t.target;if(e instanceof HTMLElement){let r=t;Object.getOwnPropertyNames(r.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof r.constructor.prototype[t])).forEach((t=>{let n=/^one/.test(t),s=t.replace(/^on[e]{0,1}/,""),a=s.toLowerCase();if("on"+a in e){let n=e=>{r[t](e)};e.addEventListener(a,n)}else u(e,s,(e=>{r[t](e)}),n)}))}}(this)}get target(){return this._target.deref()}}class p extends d{constructor(t){super(t)}static add(t,e,r={}){return function(t,e,r={}){let n=t;n._mc||(n._mc=new p(t));const s=n._mc;return e.length&&!s[e]&&(s[e]=r,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),n}(t,e,r)}static remove(t,e){!function(t,e){if(!e)return;const r=t?._mc||{};r&&r[e]&&delete r[e],!Object.keys(r).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){!function(t,e,r){t.removeEventListener(i(e),r)}(this.target,t,e)}on(t,e){return u(this.target,t,e)}one(t,e){return function(t,e,r){return u(t,e,r,!0),r}(this.target,t,e)}trigger(t,e={},r="l",n){h(this.target,t,e,r,n)}ancestors(){let t=this?.target,e=[];if(!l(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return l(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return l(t)?function(t){const e=Math.random().toString().replace(".",""),r='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const n=[...t.querySelectorAll(r)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),n.length?n:null}(t):null}descendants(){const t=this?.target;if(!l(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}function m(t){return null!=t&&"object"==typeof t}function g(t){let e=new Set,r=/\{[^\{\}]*\}/g;return(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(r))).forEach((e=>{let n=new Set(t.getAttribute(e)?.match(r));n.forEach((t=>n.add(t.replace(/[\{\}]/g,""))))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(r))).forEach((t=>{(t.nodeValue||"").match(r).forEach((t=>{e.add(t.replace(/[\{\}]/g,""))}))})),[...e].map((t=>t.replace(/[\{\}]/g,"")))}new Set;const b=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement];class y extends p{data={};oldDisplay="";constructor(t){super(t),g(t).forEach((t=>this.data[t]="")),E(this),this.#t()}#t(){let t=this.target,e=!1;(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(/\{[^\{\}]*\}/g))).forEach((e=>{let r=new Set(t.getAttribute(e)?.match(/\{[^\{\}]*\}/g));var n;this.data.observe((n=t.getAttribute(e),s=>{let a=n;r.forEach((t=>{a=a.replace(t,s[t.replace(/[\{\}]/g,"")])})),t.setAttribute(e,a)}))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(/\{[^\{\}]*\}/g))).forEach((r=>{e=!0;let n=new Set(r.nodeValue.match(/\{[^\{\}]*\}/g));this.data.observe((e=>s=>{let a=e;n.forEach((t=>{a=a.replace(t,s[t.replace(/[\{\}]/g,"")])})),this.oldDisplay?t.style=this.oldDisplay:t.removeAttribute("style"),delete this.oldDisplay,r.nodeValue=a})(r.nodeValue)),this.oldDisplay=t.getAttribute("style")||"",e&&!b.includes(t.constructor)&&"FIELDSET"!==t.tagName&&(t.style.display="none")}))}onData(t){let e={};Object.keys(t.detail.data).forEach((r=>{this.data.hasOwnProperty(r)&&(e[r]=t.detail.data[r])})),JSON.stringify(e)!==JSON.stringify(this.data)&&Object.assign(this.data,e)}}const v={};function O(t){let e=t.constructor.name;return v[e]||function(t){const e=t.constructor,r=e.name;let s=class extends e{#e=!0;#r=[];constructor(t){super(t),this.constructor.callbacks=[],m(t)&&Object.getOwnPropertyNames(t).forEach((e=>{this[e]=t[e]}))}get callbacks(){return this.#r}set callbacks(t){this.#r=t}observe(t){return this.#r.push(t),this}bind(t){if(m(this.valueOf())){!function(t){var e;(e=t,[e].concat([...e.querySelectorAll("*")]).filter((t=>!!g(t).length)).filter((t=>"STYLE"!==t?.tagName)).reverse()).forEach((t=>{t?._mc?._placeholders||p.add(t,"_placeholders",new y(t))}))}(t);const e=[t,...t.querySelectorAll("[data-mc]")].filter((t=>!!t?._mc?._placeholders)),r=function(t){let r=n(t);e.forEach((t=>{t&&h(t,"data",r)}))};this.#r.push(r),this.notify()}else console.warn("IGNORED - cannot bind a non-Object to the dom, IS:",typeof this.valueOf(),this);return this}notify(t){let e=m(this.valueOf())&&this.valueOf()instanceof Array==0?structuredClone(Object.assign({},this)):this.valueOf();return void 0!==t&&(this.#e=t),this.#r.forEach((t=>{t(e)})),this}};return v[r]=s,s}(t)}const E=(t,e)=>((e?[e]:[...Object.getOwnPropertyNames(t)]).forEach((e=>{if(t.hasOwnProperty(e)&&"function"!=typeof t[e]&&!t?.[e]?.constructor?.prototype?.observe){if("_"===e[0]||void 0===t?.[e])return t;let r=t[e],n=new(O(r))(r);Object.defineProperty(t,e,{enumerable:!0,get(){if(m(n.valueOf())){let t=structuredClone(Object.assign({},n));setTimeout(a((function(){s(structuredClone(Object.assign({},n)),t)||n.notify()}),0),0)}return n},set(t){if(typeof t==typeof n.valueOf())if(m(n.valueOf())&&n.valueOf()instanceof Array==0){let e=structuredClone(Object.assign({},n));void 0===n?.constructor?.prototype?.observe&&(n=new(O(t))(structuredClone(Object.assign({},t))),c(t,n),n.seal()),Object.assign(n,t),setTimeout(a((function(){s(structuredClone(Object.assign({},n)),e)||n.notify()}),0),0)}else{let e=n.valueOf(),r=n.callbacks;t!==e&&(n=new(O(t))(t),n.callbacks=r,n.notify())}else console.warn("IGNORED - cannot change observable types, IS:",typeof n.valueOf(),n,"- CANNOT BECOME:",typeof t)}}),t[e]=r}})),t);class w{constructor(t){}}class A extends w{#n;constructor(t){super(t),this.#n=t}get val(){return new FormData(this.#n.form).get(this.#n.name)}set val(t){[...this.#n.form.querySelectorAll(`input[type="radio"][name="${this.#n.name}"]`)].filter((e=>e.getAttribute("value")===t)).shift().checked=!0}}class j extends w{#n;constructor(t){super(t),this.#n=t}get val(){return this.#n.checked}set val(t){this.#n.checked=t}}class _ extends w{#n;constructor(t){super(t),this.#n=t}get val(){return this.#n.value}set val(t){this.#n.value=t}}class k extends w{#n;#s=!1;constructor(t){super(t),this.#n=t,this.#s=t.multiple}get val(){const t=[];return[...this.#n.querySelectorAll("option")].filter((t=>t.selected)).forEach((e=>{t.push(e.value)})),this.#s?t:t.length?t[0]:""}set val(t){t="string"==typeof t?[t]:t,[...this.#n.querySelectorAll("option")].forEach((e=>{t.indexOf(e.value)>-1?e.selected=!0:e.selected=!1}))}}class S extends w{#n;constructor(t){super(t),this.#n=t}get val(){return this.#n.value||""}set val(t){this.#n.value=t}}const N=t=>{let e=[...(t||document).querySelectorAll("input,select,textarea")],r={};return e.forEach((t=>{const e=t.getAttribute("name");if(e){let n=!1;switch((t=>t.tagName.toLowerCase())(t)){case"input":switch(t.type){case"radio":n=new A(t);break;case"checkbox":n=new j(t);break;default:n=new _(t)}break;case"select":n=new k(t);break;case"textarea":n=new S(t);break;default:console.warn("handler missing:",e,"for",t.tagName.toLowerCase(),t)}n&&(p.add(t,e,n),Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>n.val,set:t=>{n.val!==t&&(n.val=t)}}))}})),r};function T(t,e,r){let n=N(r);t[e]=Object.assign({},n),E(t,e),c(n,t[e]),[...r.querySelectorAll("input, textarea, select")].forEach((r=>{r.addEventListener("input",(r=>{t[e].notify()}))}))}var x=e.R;export{x as formValues};
package/dist/helpers.d.ts CHANGED
@@ -11,4 +11,3 @@ export declare function kebabToPascal(str: string): string;
11
11
  export declare function debounce(func: Function, milliseconds: number): Function;
12
12
  export declare function htmlToElements(html: string): HTMLElement[];
13
13
  export declare function copyGettersSetters(source: LooseObject, target: LooseObject): void;
14
- //# sourceMappingURL=helpers.d.ts.map
package/dist/helpers.js CHANGED
@@ -110,4 +110,3 @@ export function copyGettersSetters(source, target) {
110
110
  }
111
111
  }
112
112
  }
113
- //# sourceMappingURL=helpers.js.map
@@ -3,4 +3,3 @@ export * from './MC.js';
3
3
  export * from './elements.js';
4
4
  export * from './observables.js';
5
5
  export * from './formValues.js';
6
- //# sourceMappingURL=microcomponents.d.ts.map
@@ -4,4 +4,3 @@ export * from './MC.js';
4
4
  export * from './elements.js';
5
5
  export * from './observables.js';
6
6
  export * from './formValues.js';
7
- //# sourceMappingURL=microcomponents.js.map
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.microcomponents=e():t.microcomponents=e()}(this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t&&t.constructor&&t.constructor===Object}function r(t){let e={};return[...Object.keys(t)].sort().forEach((o=>{n(t[o])?e[o]=r(t[o]):e[o]=t[o]})),e}function o(t,e=!0){let n={};return[...Object.getOwnPropertyNames(t)].forEach((e=>{if(t[e]&&t[e].constructor&&t[e].constructor===Object){const r=o(t[e],!1);for(const t in r)n[e+"."+t]=r[t]}else n[e]=t[e]})),e?r(n):n}function s(t,e){return JSON.stringify(o(t))===JSON.stringify(o(e))}function c(t,e={}){let n=t.constructor===String?t.split("."):t;if(e&&n[0]&&e[n[0]])return e[n[0]].constructor===Object&&n.length>1?c(n.splice(1),e[n[0]]):e[n[0]];console.warn("ns",n[0],"not in",e)}function a(t,e){var r=Array.from(arguments);if(r.length>2){for(;r.length>1;)r[0]=a(r[0],r[1]),r.splice(1,1);return r[0]}if("string"==typeof t)t.match(/\{[^\{\}]*\}/g)?.forEach((function(n){var r=c(n.substring(1,n.length-1),e);void 0!==r&&(t=t.replace(n,r))}));else if(n(t))switch(t.constructor){case Object:Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(t[n]=a(t[n],e))}));break;case Array:t.forEach((function(n,r,o){o[r]=a(t[r],e)}))}return t}function i(t){return t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join("")}function l(t,e){let n;return()=>{clearTimeout(n),n=setTimeout((function(){t(...arguments)}),e)}}function u(t){let e=document.createElement("template");return t=t.replace(/<([A-Za-z0-9\-]*)([^>\/]*)(\/>)/gi,"<$1$2></$1>"),e.innerHTML=t,e.content.normalize(),Array.from(e.content.childNodes)}function d(t,e){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))("get"in r||"set"in r)&&Object.defineProperty(e,t,r)}t.r(e),t.d(e,{DC:()=>w,MC:()=>O,McBase:()=>E,autoload:()=>N,copyGettersSetters:()=>d,debounce:()=>l,deepEqual:()=>s,defineCE:()=>x,flattenObject:()=>o,formValues:()=>U,getCE:()=>M,htmlToElements:()=>u,isNativeObject:()=>n,kebabToPascal:()=>i,nameSpace:()=>c,observe:()=>$,off:()=>p,on:()=>b,one:()=>g,parse:()=>a,sortObject:()=>r,trigger:()=>v});const f=new Function("try {return this===window;}catch(e){ return false;}");function m(t){return t&&t instanceof HTMLElement}function h(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function p(t,e,n){t.removeEventListener(h(e),n)}function b(t,e,n,r=!1){return t.addEventListener(h(e),n,{capture:!1,once:r}),n}function g(t,e,n){return b(t,e,n,!0),n}class y{stopped=!1;constructor(){}stop(){this.stopped=!0}}function v(t,e,n={},r="l",o){const s=/^_mc/.test(e)?e:h(e),c=o||new y,a=new CustomEvent(s,{detail:{data:n,control:c},bubbles:!1});c.stopped||(t.dispatchEvent(a),a.stopImmediatePropagation(),c.stopped||/[ud]/.test(r)&&(-1===r.indexOf("l")&&(r+="l"),setTimeout((()=>{if(r.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(s,n,r,c)}if(r.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(s,n,r)))}}),0)))}class E{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==w&&e.trigger("Init")}),0),function(t){if(!f()||t.constructor===w)return;const e=t.target;if(e instanceof HTMLElement){let n=t;Object.getOwnPropertyNames(n.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof n.constructor.prototype[t])).forEach((t=>{let r=/^one/.test(t),o=t.replace(/^on[e]{0,1}/,""),s=o.toLowerCase();if("on"+s in e){let r=e=>{n[t](e)};e.addEventListener(s,r)}else b(e,o,(e=>{n[t](e)}),r)}))}}(this)}get target(){return this._target.deref()}}class O extends E{constructor(t){super(t)}}class w extends E{constructor(t){super(t)}static add(t,e,n={}){return function(t,e,n={}){let r=t;r._mc||(r._mc=new w(t));const o=r._mc;return e.length&&!o[e]&&(o[e]=n,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),r}(t,e,n)}static remove(t,e){!function(t,e){if(!e)return;const n=t?._mc||{};n&&n[e]&&delete n[e],!Object.keys(n).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){p(this.target,t,e)}on(t,e){return b(this.target,t,e)}one(t,e){return g(this.target,t,e)}trigger(t,e={},n="l",r){v(this.target,t,e,n,r)}ancestors(){let t=this?.target,e=[];if(!m(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return m(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return m(t)?function(t){const e=Math.random().toString().replace(".",""),n='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const r=[...t.querySelectorAll(n)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),r.length?r:null}(t):null}descendants(){const t=this?.target;if(!m(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}const A=new Set;function j(t){return()=>{const e=Array.from(document.querySelectorAll(`[data-mc*="${t}"]`)).filter((t=>t instanceof HTMLElement));if(0===e.length)return;const n=customElements.get(t);e.forEach((e=>{w.add(e,n.name,new n(e));const r=e.getAttribute("data-mc").split(" ").filter((e=>e!==t&&""!==e)).join(" ").trim();e.setAttribute("data-mc",r)}))}}function C(t){if(A.has(t))return;A.add(t);const e="./"+t.split("-").join("/")+".js",n=document.createElement("script");n.setAttribute("src",e),n.setAttribute("blocking","render"),n.async=!0,n.setAttribute("type","module"),n.setAttribute("data-name",t),n.setAttribute("loading",""),customElements.whenDefined(t).then(j(t)),n.addEventListener("load",(e=>{A.delete(t),document.head.querySelector(`script[data-name="${t}"]`)?.remove()})),n.addEventListener("error",(t=>{console.error("could not load DC code from",e)})),document.head.append(n)}function S(){[...document.querySelectorAll(":not(:defined)")].filter((t=>!!t&&!customElements.get(t.tagName.toLowerCase())&&!A.has(t.tagName.toLowerCase()))).forEach((t=>{C(t.tagName.toLowerCase())})),[...document.querySelectorAll('[data-mc]:not([data-mc=""]')].filter((t=>!!t)).forEach((t=>{const e=t.getAttribute("data-mc")?.split(" ").filter((t=>""!==t));e?.forEach((t=>{const e=customElements.get(t);A.has(t)||e?e&&j(t)():C(t)}))}))}let k=!1,_=null;function N(t=!0){return t?(k=t,_=new MutationObserver(S),setTimeout((()=>{_.observe(document.body,{childList:!0,subtree:!0}),S()}),5),window.autoload=window.autoload||N,k):(_?.disconnect(),_=null,k)}N.state=A;class T extends HTMLElement{constructor(){super()}connectedCallback(){this.dispatchEvent(new CustomEvent("_mcConnected"))}connectedMoveCallback(){this.dispatchEvent(new CustomEvent("_mcConnectedMove"))}disconnectedCallback(){this.dispatchEvent(new CustomEvent("_mcDisconnected"))}adoptedCallback(){this.dispatchEvent(new CustomEvent("_mcAdopted"))}attributeChangedCallback(t,e,n){this.dispatchEvent(new CustomEvent("_mcAttributeChanged",{detail:{name:t,oldValue:e,newValue:n}}))}formResetCallback(){this.dispatchEvent(new CustomEvent("_mcFormReset"))}}function L(t){return"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t))}function x(t,e,n=[]){if(customElements.get(t))return void console.warn(`IGNORED: Custom element "${t}" is already defined!`);if(!t.includes("-"))throw new Error('createCustomElement: tagName must contain at least one hyphen ("-").');let r=i(t);L(e.prototype.constructor)&&e.prototype instanceof E?customElements.define(t,function(t,e){return Object.defineProperty(e,"name",{value:t})}(r,class extends T{instance;constructor(t){super();const n=L(e)?new e(this,t):e;w.add(this,r,n)}static get observedAttributes(){return n}})):customElements.define(t,e)}function M(t){return customElements.get(t)}function P(t){return null!=t&&"object"==typeof t}function D(t){let e=new Set,n=/\{[^\{\}]*\}/g;return(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(n))).forEach((e=>{let r=new Set(t.getAttribute(e)?.match(n));r.forEach((t=>r.add(t.replace(/[\{\}]/g,""))))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(n))).forEach((t=>{(t.nodeValue||"").match(n).forEach((t=>{e.add(t.replace(/[\{\}]/g,""))}))})),[...e].map((t=>t.replace(/[\{\}]/g,"")))}const q=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement];class H extends w{data={};oldDisplay="";constructor(t){super(t),D(t).forEach((t=>this.data[t]="")),$(this),this.#t()}#t(){let t=this.target,e=!1;(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(/\{[^\{\}]*\}/g))).forEach((e=>{let n=new Set(t.getAttribute(e)?.match(/\{[^\{\}]*\}/g));var r;this.data.observe((r=t.getAttribute(e),o=>{let s=r;n.forEach((t=>{s=s.replace(t,o[t.replace(/[\{\}]/g,"")])})),t.setAttribute(e,s)}))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(/\{[^\{\}]*\}/g))).forEach((n=>{e=!0;let r=new Set(n.nodeValue.match(/\{[^\{\}]*\}/g));this.data.observe((e=>o=>{let s=e;r.forEach((t=>{s=s.replace(t,o[t.replace(/[\{\}]/g,"")])})),this.oldDisplay?t.style=this.oldDisplay:t.removeAttribute("style"),delete this.oldDisplay,n.nodeValue=s})(n.nodeValue)),this.oldDisplay=t.getAttribute("style")||"",e&&!q.includes(t.constructor)&&"FIELDSET"!==t.tagName&&(t.style.display="none")}))}onData(t){let e={};Object.keys(t.detail.data).forEach((n=>{this.data.hasOwnProperty(n)&&(e[n]=t.detail.data[n])})),JSON.stringify(e)!==JSON.stringify(this.data)&&Object.assign(this.data,e)}}const I={};function V(t){let e=t.constructor.name;return I[e]||function(t){const e=t.constructor,n=e.name;let r=class extends e{#e=!0;#n=[];constructor(t){super(t),this.constructor.callbacks=[],P(t)&&Object.getOwnPropertyNames(t).forEach((e=>{this[e]=t[e]}))}get callbacks(){return this.#n}set callbacks(t){this.#n=t}observe(t){return this.#n.push(t),this}bind(t){if(P(this.valueOf())){!function(t){var e;(e=t,[e].concat([...e.querySelectorAll("*")]).filter((t=>!!D(t).length)).filter((t=>"STYLE"!==t?.tagName)).reverse()).forEach((t=>{t?._mc?._placeholders||w.add(t,"_placeholders",new H(t))}))}(t);const e=[t,...t.querySelectorAll("[data-mc]")].filter((t=>!!t?._mc?._placeholders)),n=function(t){let n=o(t);e.forEach((t=>{t&&v(t,"data",n)}))};this.#n.push(n),this.notify()}else console.warn("IGNORED - cannot bind a non-Object to the dom, IS:",typeof this.valueOf(),this);return this}notify(t){let e=P(this.valueOf())&&this.valueOf()instanceof Array==0?structuredClone(Object.assign({},this)):this.valueOf();return void 0!==t&&(this.#e=t),this.#n.forEach((t=>{t(e)})),this}};return I[n]=r,r}(t)}const $=(t,e)=>((e?[e]:[...Object.getOwnPropertyNames(t)]).forEach((e=>{if(t.hasOwnProperty(e)&&"function"!=typeof t[e]&&!t?.[e]?.constructor?.prototype?.observe){if("_"===e[0]||void 0===t?.[e])return t;let n=t[e],r=new(V(n))(n);Object.defineProperty(t,e,{enumerable:!0,get(){if(P(r.valueOf())){let t=structuredClone(Object.assign({},r));setTimeout(l((function(){s(structuredClone(Object.assign({},r)),t)||r.notify()}),0),0)}return r},set(t){if(typeof t==typeof r.valueOf())if(P(r.valueOf())&&r.valueOf()instanceof Array==0){let e=structuredClone(Object.assign({},r));void 0===r?.constructor?.prototype?.observe&&(r=new(V(t))(structuredClone(Object.assign({},t))),d(t,r),r.seal()),Object.assign(r,t),setTimeout(l((function(){s(structuredClone(Object.assign({},r)),e)||r.notify()}),0),0)}else{let e=r.valueOf(),n=r.callbacks;t!==e&&(r=new(V(t))(t),r.callbacks=n,r.notify())}else console.warn("IGNORED - cannot change observable types, IS:",typeof r.valueOf(),r,"- CANNOT BECOME:",typeof t)}}),t[e]=n}})),t);class R{constructor(t){}}class F extends R{#r;constructor(t){super(t),this.#r=t}get val(){return new FormData(this.#r.form).get(this.#r.name)}set val(t){[...this.#r.form.querySelectorAll(`input[type="radio"][name="${this.#r.name}"]`)].filter((e=>e.getAttribute("value")===t)).shift().checked=!0}}class G extends R{#r;constructor(t){super(t),this.#r=t}get val(){return this.#r.checked}set val(t){this.#r.checked=t}}class J extends R{#r;constructor(t){super(t),this.#r=t}get val(){return this.#r.value}set val(t){this.#r.value=t}}class Z extends R{#r;#o=!1;constructor(t){super(t),this.#r=t,this.#o=t.multiple}get val(){const t=[];return[...this.#r.querySelectorAll("option")].filter((t=>t.selected)).forEach((e=>{t.push(e.value)})),this.#o?t:t.length?t[0]:""}set val(t){t="string"==typeof t?[t]:t,[...this.#r.querySelectorAll("option")].forEach((e=>{t.indexOf(e.value)>-1?e.selected=!0:e.selected=!1}))}}class z extends R{#r;constructor(t){super(t),this.#r=t}get val(){return this.#r.value||""}set val(t){this.#r.value=t}}const B=t=>{let e=[...(t||document).querySelectorAll("input,select,textarea")],n={};return e.forEach((t=>{const e=t.getAttribute("name");if(e){let r=!1;switch((t=>t.tagName.toLowerCase())(t)){case"input":switch(t.type){case"radio":r=new F(t);break;case"checkbox":r=new G(t);break;default:r=new J(t)}break;case"select":r=new Z(t);break;case"textarea":r=new z(t);break;default:console.warn("handler missing:",e,"for",t.tagName.toLowerCase(),t)}r&&(w.add(t,e,r),Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:()=>r.val,set:t=>{r.val!==t&&(r.val=t)}}))}})),n};function U(t,e,n){let r=B(n);t[e]=Object.assign({},r),$(t,e),d(r,t[e]),[...n.querySelectorAll("input, textarea, select")].forEach((n=>{n.addEventListener("input",(n=>{t[e].notify()}))}))}return e})()));
1
+ var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t&&t.constructor&&t.constructor===Object}function r(t){let e={};return[...Object.keys(t)].sort().forEach((s=>{n(t[s])?e[s]=r(t[s]):e[s]=t[s]})),e}function s(t,e=!0){let n={};return[...Object.getOwnPropertyNames(t)].forEach((e=>{if(t[e]&&t[e].constructor&&t[e].constructor===Object){const r=s(t[e],!1);for(const t in r)n[e+"."+t]=r[t]}else n[e]=t[e]})),e?r(n):n}function a(t,e){return JSON.stringify(s(t))===JSON.stringify(s(e))}function c(t,e={}){let n=t.constructor===String?t.split("."):t;if(e&&n[0]&&e[n[0]])return e[n[0]].constructor===Object&&n.length>1?c(n.splice(1),e[n[0]]):e[n[0]];console.warn("ns",n[0],"not in",e)}function o(t,e){var r=Array.from(arguments);if(r.length>2){for(;r.length>1;)r[0]=o(r[0],r[1]),r.splice(1,1);return r[0]}if("string"==typeof t)t.match(/\{[^\{\}]*\}/g)?.forEach((function(n){var r=c(n.substring(1,n.length-1),e);void 0!==r&&(t=t.replace(n,r))}));else if(n(t))switch(t.constructor){case Object:Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(t[n]=o(t[n],e))}));break;case Array:t.forEach((function(n,r,s){s[r]=o(t[r],e)}))}return t}function i(t){return t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join("")}function l(t,e){let n;return()=>{clearTimeout(n),n=setTimeout((function(){t(...arguments)}),e)}}function u(t){let e=document.createElement("template");return t=t.replace(/<([A-Za-z0-9\-]*)([^>\/]*)(\/>)/gi,"<$1$2></$1>"),e.innerHTML=t,e.content.normalize(),Array.from(e.content.childNodes)}function d(t,e){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))("get"in r||"set"in r)&&Object.defineProperty(e,t,r)}t.d(e,{DC:()=>w,MC:()=>O,Oc:()=>v,E_:()=>N,IT:()=>d,sg:()=>l,bD:()=>a,c2:()=>x,YO:()=>s,Rc:()=>U,tn:()=>D,qS:()=>u,nz:()=>n,TK:()=>i,k5:()=>c,lB:()=>R,AU:()=>p,on:()=>g,xH:()=>b,qg:()=>o,mf:()=>r,hZ:()=>E});const f=new Function("try {return this===window;}catch(e){ return false;}");function h(t){return t&&t instanceof HTMLElement}function m(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function p(t,e,n){t.removeEventListener(m(e),n)}function g(t,e,n,r=!1){return t.addEventListener(m(e),n,{capture:!1,once:r}),n}function b(t,e,n){return g(t,e,n,!0),n}class y{stopped=!1;constructor(){}stop(){this.stopped=!0}}function E(t,e,n={},r="l",s){const a=/^_mc/.test(e)?e:m(e),c=s||new y,o=new CustomEvent(a,{detail:{data:n,control:c},bubbles:!1});c.stopped||/l/.test(r)&&(t.dispatchEvent(o),o.stopImmediatePropagation(),c.stopped)||/[ud]/.test(r)&&(-1===r.indexOf("l")&&(r+="l"),setTimeout((()=>{if(r.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(a,n,r,c)}if(r.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(a,n,r)))}}),0))}class v{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==w&&e.trigger("Init")}),0),function(t){if(!f()||t.constructor===w)return;const e=t.target;if(e instanceof HTMLElement){let n=t;Object.getOwnPropertyNames(n.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof n.constructor.prototype[t])).forEach((t=>{let r=/^one/.test(t),s=t.replace(/^on[e]{0,1}/,""),a=s.toLowerCase();if("on"+a in e){let r=e=>{n[t](e)};e.addEventListener(a,r)}else g(e,s,(e=>{n[t](e)}),r)}))}}(this)}get target(){return this._target.deref()}}class O extends v{constructor(t){super(t)}}class w extends v{constructor(t){super(t)}static add(t,e,n={}){return function(t,e,n={}){let r=t;r._mc||(r._mc=new w(t));const s=r._mc;return e.length&&!s[e]&&(s[e]=n,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),r}(t,e,n)}static remove(t,e){!function(t,e){if(!e)return;const n=t?._mc||{};n&&n[e]&&delete n[e],!Object.keys(n).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){p(this.target,t,e)}on(t,e){return g(this.target,t,e)}one(t,e){return b(this.target,t,e)}trigger(t,e={},n="l",r){E(this.target,t,e,n,r)}ancestors(){let t=this?.target,e=[];if(!h(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return h(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return h(t)?function(t){const e=Math.random().toString().replace(".",""),n='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const r=[...t.querySelectorAll(n)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),r.length?r:null}(t):null}descendants(){const t=this?.target;if(!h(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}const A=new Set;function C(t){return()=>{const e=Array.from(document.querySelectorAll(`[data-mc*="${t}"]`)).filter((t=>t instanceof HTMLElement));if(0===e.length)return;const n=customElements.get(t);e.forEach((e=>{w.add(e,n.name,new n(e));const r=e.getAttribute("data-mc").split(" ").filter((e=>e!==t&&""!==e)).join(" ").trim();e.setAttribute("data-mc",r)}))}}function j(t){if(A.has(t))return;A.add(t);const e="./"+t.split("-").join("/")+".js",n=document.createElement("script");n.setAttribute("src",e),n.setAttribute("blocking","render"),n.async=!0,n.setAttribute("type","module"),n.setAttribute("data-name",t),n.setAttribute("loading",""),customElements.whenDefined(t).then(C(t)),n.addEventListener("load",(e=>{A.delete(t),document.head.querySelector(`script[data-name="${t}"]`)?.remove()})),n.addEventListener("error",(t=>{console.error("could not load DC code from",e)})),document.head.append(n)}function k(){[...document.querySelectorAll(":not(:defined)")].filter((t=>!!t&&!customElements.get(t.tagName.toLowerCase())&&!A.has(t.tagName.toLowerCase()))).forEach((t=>{j(t.tagName.toLowerCase())})),[...document.querySelectorAll('[data-mc]:not([data-mc=""]')].filter((t=>!!t)).forEach((t=>{const e=t.getAttribute("data-mc")?.split(" ").filter((t=>""!==t));e?.forEach((t=>{const e=customElements.get(t);A.has(t)||e?e&&C(t)():j(t)}))}))}let _=!1,S=null;function N(t=!0){return t?(_=t,S=new MutationObserver(k),setTimeout((()=>{S.observe(document.body,{childList:!0,subtree:!0}),k()}),5),window.autoload=window.autoload||N,_):(S?.disconnect(),S=null,_)}N.state=A;class T extends HTMLElement{constructor(){super()}connectedCallback(){this.dispatchEvent(new CustomEvent("_mcConnected"))}connectedMoveCallback(){this.dispatchEvent(new CustomEvent("_mcConnectedMove"))}disconnectedCallback(){this.dispatchEvent(new CustomEvent("_mcDisconnected"))}adoptedCallback(){this.dispatchEvent(new CustomEvent("_mcAdopted"))}attributeChangedCallback(t,e,n){this.dispatchEvent(new CustomEvent("_mcAttributeChanged",{detail:{name:t,oldValue:e,newValue:n}}))}formResetCallback(){this.dispatchEvent(new CustomEvent("_mcFormReset"))}}function L(t){return"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t))}function x(t,e,n=[]){if(customElements.get(t))return void console.warn(`IGNORED: Custom element "${t}" is already defined!`);if(!t.includes("-"))throw new Error('createCustomElement: tagName must contain at least one hyphen ("-").');let r=i(t);L(e.prototype.constructor)&&e.prototype instanceof v?customElements.define(t,function(t,e){return Object.defineProperty(e,"name",{value:t})}(r,class extends T{instance;constructor(t){super();const n=L(e)?new e(this,t):e;w.add(this,r,n)}static get observedAttributes(){return n}})):customElements.define(t,e)}function D(t){return customElements.get(t)}function M(t){return null!=t&&"object"==typeof t}function q(t){let e=new Set,n=/\{[^\{\}]*\}/g;return(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(n))).forEach((e=>{let r=new Set(t.getAttribute(e)?.match(n));r.forEach((t=>r.add(t.replace(/[\{\}]/g,""))))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(n))).forEach((t=>{(t.nodeValue||"").match(n).forEach((t=>{e.add(t.replace(/[\{\}]/g,""))}))})),[...e].map((t=>t.replace(/[\{\}]/g,"")))}const P=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement];class H extends w{data={};oldDisplay="";constructor(t){super(t),q(t).forEach((t=>this.data[t]="")),R(this),this.#t()}#t(){let t=this.target,e=!1;(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(/\{[^\{\}]*\}/g))).forEach((e=>{let n=new Set(t.getAttribute(e)?.match(/\{[^\{\}]*\}/g));var r;this.data.observe((r=t.getAttribute(e),s=>{let a=r;n.forEach((t=>{a=a.replace(t,s[t.replace(/[\{\}]/g,"")])})),t.setAttribute(e,a)}))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(/\{[^\{\}]*\}/g))).forEach((n=>{e=!0;let r=new Set(n.nodeValue.match(/\{[^\{\}]*\}/g));this.data.observe((e=>s=>{let a=e;r.forEach((t=>{a=a.replace(t,s[t.replace(/[\{\}]/g,"")])})),this.oldDisplay?t.style=this.oldDisplay:t.removeAttribute("style"),delete this.oldDisplay,n.nodeValue=a})(n.nodeValue)),this.oldDisplay=t.getAttribute("style")||"",e&&!P.includes(t.constructor)&&"FIELDSET"!==t.tagName&&(t.style.display="none")}))}onData(t){let e={};Object.keys(t.detail.data).forEach((n=>{this.data.hasOwnProperty(n)&&(e[n]=t.detail.data[n])})),JSON.stringify(e)!==JSON.stringify(this.data)&&Object.assign(this.data,e)}}const I={};function V(t){let e=t.constructor.name;return I[e]||function(t){const e=t.constructor,n=e.name;let r=class extends e{#e=!0;#n=[];constructor(t){super(t),this.constructor.callbacks=[],M(t)&&Object.getOwnPropertyNames(t).forEach((e=>{this[e]=t[e]}))}get callbacks(){return this.#n}set callbacks(t){this.#n=t}observe(t){return this.#n.push(t),this}bind(t){if(M(this.valueOf())){!function(t){var e;(e=t,[e].concat([...e.querySelectorAll("*")]).filter((t=>!!q(t).length)).filter((t=>"STYLE"!==t?.tagName)).reverse()).forEach((t=>{t?._mc?._placeholders||w.add(t,"_placeholders",new H(t))}))}(t);const e=[t,...t.querySelectorAll("[data-mc]")].filter((t=>!!t?._mc?._placeholders)),n=function(t){let n=s(t);e.forEach((t=>{t&&E(t,"data",n)}))};this.#n.push(n),this.notify()}else console.warn("IGNORED - cannot bind a non-Object to the dom, IS:",typeof this.valueOf(),this);return this}notify(t){let e=M(this.valueOf())&&this.valueOf()instanceof Array==0?structuredClone(Object.assign({},this)):this.valueOf();return void 0!==t&&(this.#e=t),this.#n.forEach((t=>{t(e)})),this}};return I[n]=r,r}(t)}const R=(t,e)=>((e?[e]:[...Object.getOwnPropertyNames(t)]).forEach((e=>{if(t.hasOwnProperty(e)&&"function"!=typeof t[e]&&!t?.[e]?.constructor?.prototype?.observe){if("_"===e[0]||void 0===t?.[e])return t;let n=t[e],r=new(V(n))(n);Object.defineProperty(t,e,{enumerable:!0,get(){if(M(r.valueOf())){let t=structuredClone(Object.assign({},r));setTimeout(l((function(){a(structuredClone(Object.assign({},r)),t)||r.notify()}),0),0)}return r},set(t){if(typeof t==typeof r.valueOf())if(M(r.valueOf())&&r.valueOf()instanceof Array==0){let e=structuredClone(Object.assign({},r));void 0===r?.constructor?.prototype?.observe&&(r=new(V(t))(structuredClone(Object.assign({},t))),d(t,r),r.seal()),Object.assign(r,t),setTimeout(l((function(){a(structuredClone(Object.assign({},r)),e)||r.notify()}),0),0)}else{let e=r.valueOf(),n=r.callbacks;t!==e&&(r=new(V(t))(t),r.callbacks=n,r.notify())}else console.warn("IGNORED - cannot change observable types, IS:",typeof r.valueOf(),r,"- CANNOT BECOME:",typeof t)}}),t[e]=n}})),t);class ${constructor(t){}}class F extends ${#r;constructor(t){super(t),this.#r=t}get val(){return new FormData(this.#r.form).get(this.#r.name)}set val(t){[...this.#r.form.querySelectorAll(`input[type="radio"][name="${this.#r.name}"]`)].filter((e=>e.getAttribute("value")===t)).shift().checked=!0}}class Z extends ${#r;constructor(t){super(t),this.#r=t}get val(){return this.#r.checked}set val(t){this.#r.checked=t}}class z extends ${#r;constructor(t){super(t),this.#r=t}get val(){return this.#r.value}set val(t){this.#r.value=t}}class B extends ${#r;#s=!1;constructor(t){super(t),this.#r=t,this.#s=t.multiple}get val(){const t=[];return[...this.#r.querySelectorAll("option")].filter((t=>t.selected)).forEach((e=>{t.push(e.value)})),this.#s?t:t.length?t[0]:""}set val(t){t="string"==typeof t?[t]:t,[...this.#r.querySelectorAll("option")].forEach((e=>{t.indexOf(e.value)>-1?e.selected=!0:e.selected=!1}))}}class G extends ${#r;constructor(t){super(t),this.#r=t}get val(){return this.#r.value||""}set val(t){this.#r.value=t}}const J=t=>{let e=[...(t||document).querySelectorAll("input,select,textarea")],n={};return e.forEach((t=>{const e=t.getAttribute("name");if(e){let r=!1;switch((t=>t.tagName.toLowerCase())(t)){case"input":switch(t.type){case"radio":r=new F(t);break;case"checkbox":r=new Z(t);break;default:r=new z(t)}break;case"select":r=new B(t);break;case"textarea":r=new G(t);break;default:console.warn("handler missing:",e,"for",t.tagName.toLowerCase(),t)}r&&(w.add(t,e,r),Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:()=>r.val,set:t=>{r.val!==t&&(r.val=t)}}))}})),n};function U(t,e,n){let r=J(n);t[e]=Object.assign({},r),R(t,e),d(r,t[e]),[...n.querySelectorAll("input, textarea, select")].forEach((n=>{n.addEventListener("input",(n=>{t[e].notify()}))}))}var Y=e.DC,K=e.MC,W=e.Oc,Q=e.E_,X=e.IT,tt=e.sg,et=e.bD,nt=e.c2,rt=e.YO,st=e.Rc,at=e.tn,ct=e.qS,ot=e.nz,it=e.TK,lt=e.k5,ut=e.lB,dt=e.AU,ft=e.on,ht=e.xH,mt=e.qg,pt=e.mf,gt=e.hZ;export{Y as DC,K as MC,W as McBase,Q as autoload,X as copyGettersSetters,tt as debounce,et as deepEqual,nt as defineCE,rt as flattenObject,st as formValues,at as getCE,ct as htmlToElements,ot as isNativeObject,it as kebabToPascal,lt as nameSpace,ut as observe,dt as off,ft as on,ht as one,mt as parse,pt as sortObject,gt as trigger};
@@ -8,4 +8,3 @@ export type Observable = {
8
8
  };
9
9
  export declare const observe: (target: LooseObject, propertyName?: string) => LooseObject;
10
10
  export {};
11
- //# sourceMappingURL=observables.d.ts.map
@@ -241,4 +241,3 @@ export const observe = (target, propertyName) => {
241
241
  });
242
242
  return target;
243
243
  };
244
- //# sourceMappingURL=observables.js.map
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.observables=e():t.observables=e()}(this,(()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){let e={};return[...Object.keys(t)].sort().forEach((n=>{var o;(o=t[n])&&o.constructor&&o.constructor===Object?e[n]=r(t[n]):e[n]=t[n]})),e}function n(t,e=!0){let o={};return[...Object.getOwnPropertyNames(t)].forEach((e=>{if(t[e]&&t[e].constructor&&t[e].constructor===Object){const r=n(t[e],!1);for(const t in r)o[e+"."+t]=r[t]}else o[e]=t[e]})),e?r(o):o}function o(t,e){return JSON.stringify(n(t))===JSON.stringify(n(e))}function c(t,e){let r;return()=>{clearTimeout(r),r=setTimeout((function(){t(...arguments)}),e)}}t.r(e),t.d(e,{observe:()=>v});const s=new Function("try {return this===window;}catch(e){ return false;}");function a(t){return t&&t instanceof HTMLElement}function i(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function l(t,e,r,n=!1){return t.addEventListener(i(e),r,{capture:!1,once:n}),r}class u{stopped=!1;constructor(){}stop(){this.stopped=!0}}function f(t,e,r={},n="l",o){const c=/^_mc/.test(e)?e:i(e),s=o||new u,a=new CustomEvent(c,{detail:{data:r,control:s},bubbles:!1});s.stopped||(t.dispatchEvent(a),a.stopImmediatePropagation(),s.stopped||/[ud]/.test(n)&&(-1===n.indexOf("l")&&(n+="l"),setTimeout((()=>{if(n.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(c,r,n,s)}if(n.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(c,r,n)))}}),0)))}class d{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==h&&e.trigger("Init")}),0),function(t){if(!s()||t.constructor===h)return;const e=t.target;if(e instanceof HTMLElement){let r=t;Object.getOwnPropertyNames(r.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof r.constructor.prototype[t])).forEach((t=>{let n=/^one/.test(t),o=t.replace(/^on[e]{0,1}/,""),c=o.toLowerCase();if("on"+c in e){let n=e=>{r[t](e)};e.addEventListener(c,n)}else l(e,o,(e=>{r[t](e)}),n)}))}}(this)}get target(){return this._target.deref()}}class h extends d{constructor(t){super(t)}static add(t,e,r={}){return function(t,e,r={}){let n=t;n._mc||(n._mc=new h(t));const o=n._mc;return e.length&&!o[e]&&(o[e]=r,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),n}(t,e,r)}static remove(t,e){!function(t,e){if(!e)return;const r=t?._mc||{};r&&r[e]&&delete r[e],!Object.keys(r).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){!function(t,e,r){t.removeEventListener(i(e),r)}(this.target,t,e)}on(t,e){return l(this.target,t,e)}one(t,e){return function(t,e,r){return l(t,e,r,!0),r}(this.target,t,e)}trigger(t,e={},r="l",n){f(this.target,t,e,r,n)}ancestors(){let t=this?.target,e=[];if(!a(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return a(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return a(t)?function(t){const e=Math.random().toString().replace(".",""),r='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const n=[...t.querySelectorAll(r)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),n.length?n:null}(t):null}descendants(){const t=this?.target;if(!a(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}function p(t){return null!=t&&"object"==typeof t}function m(t){let e=new Set,r=/\{[^\{\}]*\}/g;return(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(r))).forEach((e=>{let n=new Set(t.getAttribute(e)?.match(r));n.forEach((t=>n.add(t.replace(/[\{\}]/g,""))))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(r))).forEach((t=>{(t.nodeValue||"").match(r).forEach((t=>{e.add(t.replace(/[\{\}]/g,""))}))})),[...e].map((t=>t.replace(/[\{\}]/g,"")))}new Set;const b=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement];class g extends h{data={};oldDisplay="";constructor(t){super(t),m(t).forEach((t=>this.data[t]="")),v(this),this.#t()}#t(){let t=this.target,e=!1;(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(/\{[^\{\}]*\}/g))).forEach((e=>{let r=new Set(t.getAttribute(e)?.match(/\{[^\{\}]*\}/g));var n;this.data.observe((n=t.getAttribute(e),o=>{let c=n;r.forEach((t=>{c=c.replace(t,o[t.replace(/[\{\}]/g,"")])})),t.setAttribute(e,c)}))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(/\{[^\{\}]*\}/g))).forEach((r=>{e=!0;let n=new Set(r.nodeValue.match(/\{[^\{\}]*\}/g));this.data.observe((e=>o=>{let c=e;n.forEach((t=>{c=c.replace(t,o[t.replace(/[\{\}]/g,"")])})),this.oldDisplay?t.style=this.oldDisplay:t.removeAttribute("style"),delete this.oldDisplay,r.nodeValue=c})(r.nodeValue)),this.oldDisplay=t.getAttribute("style")||"",e&&!b.includes(t.constructor)&&"FIELDSET"!==t.tagName&&(t.style.display="none")}))}onData(t){let e={};Object.keys(t.detail.data).forEach((r=>{this.data.hasOwnProperty(r)&&(e[r]=t.detail.data[r])})),JSON.stringify(e)!==JSON.stringify(this.data)&&Object.assign(this.data,e)}}const y={};function O(t){let e=t.constructor.name;return y[e]||function(t){const e=t.constructor,r=e.name;let o=class extends e{#e=!0;#r=[];constructor(t){super(t),this.constructor.callbacks=[],p(t)&&Object.getOwnPropertyNames(t).forEach((e=>{this[e]=t[e]}))}get callbacks(){return this.#r}set callbacks(t){this.#r=t}observe(t){return this.#r.push(t),this}bind(t){if(p(this.valueOf())){!function(t){var e;(e=t,[e].concat([...e.querySelectorAll("*")]).filter((t=>!!m(t).length)).filter((t=>"STYLE"!==t?.tagName)).reverse()).forEach((t=>{t?._mc?._placeholders||h.add(t,"_placeholders",new g(t))}))}(t);const e=[t,...t.querySelectorAll("[data-mc]")].filter((t=>!!t?._mc?._placeholders)),r=function(t){let r=n(t);e.forEach((t=>{t&&f(t,"data",r)}))};this.#r.push(r),this.notify()}else console.warn("IGNORED - cannot bind a non-Object to the dom, IS:",typeof this.valueOf(),this);return this}notify(t){let e=p(this.valueOf())&&this.valueOf()instanceof Array==0?structuredClone(Object.assign({},this)):this.valueOf();return void 0!==t&&(this.#e=t),this.#r.forEach((t=>{t(e)})),this}};return y[r]=o,o}(t)}const v=(t,e)=>((e?[e]:[...Object.getOwnPropertyNames(t)]).forEach((e=>{if(t.hasOwnProperty(e)&&"function"!=typeof t[e]&&!t?.[e]?.constructor?.prototype?.observe){if("_"===e[0]||void 0===t?.[e])return t;let r=t[e],n=new(O(r))(r);Object.defineProperty(t,e,{enumerable:!0,get(){if(p(n.valueOf())){let t=structuredClone(Object.assign({},n));setTimeout(c((function(){o(structuredClone(Object.assign({},n)),t)||n.notify()}),0),0)}return n},set(t){if(typeof t==typeof n.valueOf())if(p(n.valueOf())&&n.valueOf()instanceof Array==0){let e=structuredClone(Object.assign({},n));void 0===n?.constructor?.prototype?.observe&&(n=new(O(t))(structuredClone(Object.assign({},t))),function(t,e){const r=Object.getOwnPropertyDescriptors(t);for(const[t,n]of Object.entries(r))("get"in n||"set"in n)&&Object.defineProperty(e,t,n)}(t,n),n.seal()),Object.assign(n,t),setTimeout(c((function(){o(structuredClone(Object.assign({},n)),e)||n.notify()}),0),0)}else{let e=n.valueOf(),r=n.callbacks;t!==e&&(n=new(O(t))(t),n.callbacks=r,n.notify())}else console.warn("IGNORED - cannot change observable types, IS:",typeof n.valueOf(),n,"- CANNOT BECOME:",typeof t)}}),t[e]=r}})),t);return e})()));
1
+ var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(t){let e={};return[...Object.keys(t)].sort().forEach((n=>{var c;(c=t[n])&&c.constructor&&c.constructor===Object?e[n]=r(t[n]):e[n]=t[n]})),e}function n(t,e=!0){let c={};return[...Object.getOwnPropertyNames(t)].forEach((e=>{if(t[e]&&t[e].constructor&&t[e].constructor===Object){const r=n(t[e],!1);for(const t in r)c[e+"."+t]=r[t]}else c[e]=t[e]})),e?r(c):c}function c(t,e){return JSON.stringify(n(t))===JSON.stringify(n(e))}function o(t,e){let r;return()=>{clearTimeout(r),r=setTimeout((function(){t(...arguments)}),e)}}t.d(e,{l:()=>v});const s=new Function("try {return this===window;}catch(e){ return false;}");function a(t){return t&&t instanceof HTMLElement}function i(t){return"_mc"+t[0].toUpperCase()+t.substring(1)}function l(t,e,r,n=!1){return t.addEventListener(i(e),r,{capture:!1,once:n}),r}class u{stopped=!1;constructor(){}stop(){this.stopped=!0}}function f(t,e,r={},n="l",c){const o=/^_mc/.test(e)?e:i(e),s=c||new u,a=new CustomEvent(o,{detail:{data:r,control:s},bubbles:!1});s.stopped||/l/.test(n)&&(t.dispatchEvent(a),a.stopImmediatePropagation(),s.stopped)||/[ud]/.test(n)&&(-1===n.indexOf("l")&&(n+="l"),setTimeout((()=>{if(n.indexOf("u")>-1){let e=t.parentElement?.closest("[data-mc]");e&&e?._mc.trigger(o,r,n,s)}if(n.indexOf("d")>-1){let e=t._mc.children();e&&e.forEach((t=>t.trigger(o,r,n)))}}),0))}class d{_target;constructor(t){var e;this._target=new WeakRef(t||{}),e=this,setTimeout((()=>{e.constructor!==h&&e.trigger("Init")}),0),function(t){if(!s()||t.constructor===h)return;const e=t.target;if(e instanceof HTMLElement){let r=t;Object.getOwnPropertyNames(r.constructor.prototype).filter((t=>/^on[A-Z]|one[A-Z]/.test(t)&&"function"==typeof r.constructor.prototype[t])).forEach((t=>{let n=/^one/.test(t),c=t.replace(/^on[e]{0,1}/,""),o=c.toLowerCase();if("on"+o in e){let n=e=>{r[t](e)};e.addEventListener(o,n)}else l(e,c,(e=>{r[t](e)}),n)}))}}(this)}get target(){return this._target.deref()}}class h extends d{constructor(t){super(t)}static add(t,e,r={}){return function(t,e,r={}){let n=t;n._mc||(n._mc=new h(t));const c=n._mc;return e.length&&!c[e]&&(c[e]=r,t instanceof HTMLElement&&!t.getAttribute("data-mc")&&t.setAttribute("data-mc","")),n}(t,e,r)}static remove(t,e){!function(t,e){if(!e)return;const r=t?._mc||{};r&&r[e]&&delete r[e],!Object.keys(r).length&&t instanceof HTMLElement&&t.hasAttribute("data-mc")&&t.removeAttribute("data-mc")}(t,e)}off(t,e){!function(t,e,r){t.removeEventListener(i(e),r)}(this.target,t,e)}on(t,e){return l(this.target,t,e)}one(t,e){return function(t,e,r){return l(t,e,r,!0),r}(this.target,t,e)}trigger(t,e={},r="l",n){f(this.target,t,e,r,n)}ancestors(){let t=this?.target,e=[];if(!a(t))return[];for(;t=t.closest("[data-mc]");)t?._mc&&e.push(t?._mc);return e.length?e:null}closest(){let t=this.target;return a(t)&&t.closest("[data-mc]")?._mc||null}children(){let t=this?.target;return a(t)?function(t){const e=Math.random().toString().replace(".",""),r='[data-mc]:not([temp_id="'+e+'"] [data-mc] [data-mc])';t.setAttribute("temp_id",e);const n=[...t.querySelectorAll(r)].filter((t=>!!t._mc)).map((t=>t._mc));return t.removeAttribute("temp_id"),n.length?n:null}(t):null}descendants(){const t=this?.target;if(!a(t))return[];const e=[...t.querySelectorAll("[data-mc]")].filter((t=>!!t._mc)).map((t=>t._mc));return e.length?e:null}}function m(t){return null!=t&&"object"==typeof t}function p(t){let e=new Set,r=/\{[^\{\}]*\}/g;return(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(r))).forEach((e=>{let n=new Set(t.getAttribute(e)?.match(r));n.forEach((t=>n.add(t.replace(/[\{\}]/g,""))))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(r))).forEach((t=>{(t.nodeValue||"").match(r).forEach((t=>{e.add(t.replace(/[\{\}]/g,""))}))})),[...e].map((t=>t.replace(/[\{\}]/g,"")))}new Set;const g=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement];class b extends h{data={};oldDisplay="";constructor(t){super(t),p(t).forEach((t=>this.data[t]="")),v(this),this.#t()}#t(){let t=this.target,e=!1;(t.getAttributeNames?t.getAttributeNames():[]).filter((e=>t.getAttribute(e)?.match(/\{[^\{\}]*\}/g))).forEach((e=>{let r=new Set(t.getAttribute(e)?.match(/\{[^\{\}]*\}/g));var n;this.data.observe((n=t.getAttribute(e),c=>{let o=n;r.forEach((t=>{o=o.replace(t,c[t.replace(/[\{\}]/g,"")])})),t.setAttribute(e,o)}))})),[...t.childNodes].filter((t=>3===t.nodeType&&(t.nodeValue||"").match(/\{[^\{\}]*\}/g))).forEach((r=>{e=!0;let n=new Set(r.nodeValue.match(/\{[^\{\}]*\}/g));this.data.observe((e=>c=>{let o=e;n.forEach((t=>{o=o.replace(t,c[t.replace(/[\{\}]/g,"")])})),this.oldDisplay?t.style=this.oldDisplay:t.removeAttribute("style"),delete this.oldDisplay,r.nodeValue=o})(r.nodeValue)),this.oldDisplay=t.getAttribute("style")||"",e&&!g.includes(t.constructor)&&"FIELDSET"!==t.tagName&&(t.style.display="none")}))}onData(t){let e={};Object.keys(t.detail.data).forEach((r=>{this.data.hasOwnProperty(r)&&(e[r]=t.detail.data[r])})),JSON.stringify(e)!==JSON.stringify(this.data)&&Object.assign(this.data,e)}}const y={};function O(t){let e=t.constructor.name;return y[e]||function(t){const e=t.constructor,r=e.name;let c=class extends e{#e=!0;#r=[];constructor(t){super(t),this.constructor.callbacks=[],m(t)&&Object.getOwnPropertyNames(t).forEach((e=>{this[e]=t[e]}))}get callbacks(){return this.#r}set callbacks(t){this.#r=t}observe(t){return this.#r.push(t),this}bind(t){if(m(this.valueOf())){!function(t){var e;(e=t,[e].concat([...e.querySelectorAll("*")]).filter((t=>!!p(t).length)).filter((t=>"STYLE"!==t?.tagName)).reverse()).forEach((t=>{t?._mc?._placeholders||h.add(t,"_placeholders",new b(t))}))}(t);const e=[t,...t.querySelectorAll("[data-mc]")].filter((t=>!!t?._mc?._placeholders)),r=function(t){let r=n(t);e.forEach((t=>{t&&f(t,"data",r)}))};this.#r.push(r),this.notify()}else console.warn("IGNORED - cannot bind a non-Object to the dom, IS:",typeof this.valueOf(),this);return this}notify(t){let e=m(this.valueOf())&&this.valueOf()instanceof Array==0?structuredClone(Object.assign({},this)):this.valueOf();return void 0!==t&&(this.#e=t),this.#r.forEach((t=>{t(e)})),this}};return y[r]=c,c}(t)}const v=(t,e)=>((e?[e]:[...Object.getOwnPropertyNames(t)]).forEach((e=>{if(t.hasOwnProperty(e)&&"function"!=typeof t[e]&&!t?.[e]?.constructor?.prototype?.observe){if("_"===e[0]||void 0===t?.[e])return t;let r=t[e],n=new(O(r))(r);Object.defineProperty(t,e,{enumerable:!0,get(){if(m(n.valueOf())){let t=structuredClone(Object.assign({},n));setTimeout(o((function(){c(structuredClone(Object.assign({},n)),t)||n.notify()}),0),0)}return n},set(t){if(typeof t==typeof n.valueOf())if(m(n.valueOf())&&n.valueOf()instanceof Array==0){let e=structuredClone(Object.assign({},n));void 0===n?.constructor?.prototype?.observe&&(n=new(O(t))(structuredClone(Object.assign({},t))),function(t,e){const r=Object.getOwnPropertyDescriptors(t);for(const[t,n]of Object.entries(r))("get"in n||"set"in n)&&Object.defineProperty(e,t,n)}(t,n),n.seal()),Object.assign(n,t),setTimeout(o((function(){c(structuredClone(Object.assign({},n)),e)||n.notify()}),0),0)}else{let e=n.valueOf(),r=n.callbacks;t!==e&&(n=new(O(t))(t),n.callbacks=r,n.notify())}else console.warn("IGNORED - cannot change observable types, IS:",typeof n.valueOf(),n,"- CANNOT BECOME:",typeof t)}}),t[e]=r}})),t);var E=e.l;export{E as observe};
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "@twobirds/microcomponents",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Micro Components Organization Class",
5
5
  "main": "./dist/microcomponents.ts",
6
6
  "types": "./dist/microcomponents.d.ts",
7
- "sideEffects": false,
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/microcomponents.js"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "sideEffects": false,
8
16
  "scripts": {
9
17
  "typedoc": "typedoc",
10
18
  "webpack": "webpack",
package/.gitlab-ci.yml DELETED
@@ -1,18 +0,0 @@
1
- # The Docker image that will be used to build your app
2
- image: node:lts
3
- # Functions that should be executed before the build script is run
4
- before_script:
5
- - npm i
6
- pages:
7
- script:
8
- - npm run typedoc
9
- - npm run build
10
- artifacts:
11
- paths:
12
- # The folder that contains the files to be exposed at the Page URL
13
- - public
14
- expire_in: 1h20min
15
- rules:
16
- # This ensures that only pushes to the default branch will trigger
17
- # a pages deploy
18
- - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
@@ -1,3 +0,0 @@
1
- {
2
- "CodeGPT.apiKey": "Ollama"
3
- }
@@ -1,15 +0,0 @@
1
- <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
2
- <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
3
- <title>test</title>
4
- <rect fill="transparent" x="0" y="0" width="200" height="200" fill-opacity="1"/>
5
- <g style="fill:transparent">
6
- <title>first bird</title>
7
- <path fill="#18829c" d="
8
- m15,160
9
- a30,75 45 1 0 160,-150
10
- a20,50 225 1 1 -110,100
11
- a12,25 45 1 1 60,-50
12
- a20,50 225 1 0 -110,100
13
- " />
14
- </g>
15
- </svg>