@trintel/zooy 1.0.20 → 1.1.2

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 (224) hide show
  1. package/dist/chunks/component-library-registry-BBQV6Kpv.js +1 -0
  2. package/dist/chunks/component-library-registry-DB5UeqC2.js +58 -0
  3. package/dist/chunks/register-D3pWAXhm.js +266 -0
  4. package/dist/chunks/register-HYODt48Q.js +1 -0
  5. package/dist/chunks/register-aF5kN8wT.js +1379 -0
  6. package/dist/chunks/register-uV9z3usH.js +1 -0
  7. package/dist/chunks/{tree-utils-D7kpr-Wj.js → tree-utils-B2JEGXHR.js} +2 -1
  8. package/dist/chunks/tree-utils-BYnipT-p.js +1 -0
  9. package/dist/chunks/zoo-CY2QpG41.js +52 -0
  10. package/dist/chunks/zoo-DgdxBjlN.js +390 -0
  11. package/dist/zooy.cjs.js +4 -4
  12. package/dist/zooy.es.js +226 -237
  13. package/package.json +1 -1
  14. package/dist/chunks/16-B2HVhDIW.js +0 -1
  15. package/dist/chunks/16-B9Ad4Fob.js +0 -19
  16. package/dist/chunks/16-BXsOcjPx.js +0 -19
  17. package/dist/chunks/16-BZCBqUx6.js +0 -1
  18. package/dist/chunks/16-BmOXGjZf.js +0 -1
  19. package/dist/chunks/16-BsQdCz_w.js +0 -27
  20. package/dist/chunks/16-C-Rp3Nso.js +0 -1
  21. package/dist/chunks/16-C36sVk5F.js +0 -26
  22. package/dist/chunks/16-CZycT1I8.js +0 -1
  23. package/dist/chunks/16-Ce_hDgPW.js +0 -1
  24. package/dist/chunks/16-CinLDpNC.js +0 -19
  25. package/dist/chunks/16-Cj0hOjaI.js +0 -1
  26. package/dist/chunks/16-Cx-PCMJJ.js +0 -26
  27. package/dist/chunks/16-D8XFc44J.js +0 -110
  28. package/dist/chunks/16-DVx7Niko.js +0 -33
  29. package/dist/chunks/16-DZJZDJYY.js +0 -1
  30. package/dist/chunks/16-DoCnqtvj.js +0 -35
  31. package/dist/chunks/16-DyCV3lkl.js +0 -19
  32. package/dist/chunks/16-SwMpxJpB.js +0 -19
  33. package/dist/chunks/16-jVjxC8Bu.js +0 -1
  34. package/dist/chunks/16-ma2Q_204.js +0 -1
  35. package/dist/chunks/16-qZ3FOIw0.js +0 -1
  36. package/dist/chunks/20-BwzzGcZC.js +0 -80
  37. package/dist/chunks/20-CqNSki3g.js +0 -1
  38. package/dist/chunks/accordion-0mybViUv.js +0 -236
  39. package/dist/chunks/accordion-CvcaulG8.js +0 -45
  40. package/dist/chunks/badge-indicator-BUdDkz6Z.js +0 -18
  41. package/dist/chunks/badge-indicator-DuYbJV5o.js +0 -1
  42. package/dist/chunks/breadcrumb-CYKgjbdB.js +0 -19
  43. package/dist/chunks/breadcrumb-DB0PkiBX.js +0 -140
  44. package/dist/chunks/button-1g5b3tWS.js +0 -268
  45. package/dist/chunks/button-BKj8189A.js +0 -4
  46. package/dist/chunks/button-DAOoyQ8b.js +0 -67
  47. package/dist/chunks/button-DfRkC-OR.js +0 -72
  48. package/dist/chunks/button-skeleton-C0mW3D7v.js +0 -44
  49. package/dist/chunks/button-skeleton-KFGdwtUH.js +0 -21
  50. package/dist/chunks/carbon-element-BsPGNbmz.js +0 -1
  51. package/dist/chunks/carbon-element-Z5iEnFdr.js +0 -24
  52. package/dist/chunks/checkbox-CBD8Qmjx.js +0 -37
  53. package/dist/chunks/checkbox-CewERWBu.js +0 -40
  54. package/dist/chunks/checkbox-CxxD4wgP.js +0 -176
  55. package/dist/chunks/checkbox-DKS7fw29.js +0 -168
  56. package/dist/chunks/class-map-BwUbMyhc.js +0 -1
  57. package/dist/chunks/class-map-qeLb1IA_.js +0 -27
  58. package/dist/chunks/code-snippet-BJhK27fG.js +0 -205
  59. package/dist/chunks/code-snippet-BUQFh_v7.js +0 -53
  60. package/dist/chunks/collection-helpers-DPVzwwb8.js +0 -7
  61. package/dist/chunks/collection-helpers-g7DrZSRQ.js +0 -1
  62. package/dist/chunks/combo-box-BCOUQHyG.js +0 -39
  63. package/dist/chunks/combo-box-Bms5blM6.js +0 -325
  64. package/dist/chunks/combo-button-BSBAvBIW.js +0 -15
  65. package/dist/chunks/combo-button-Bc3hx7VJ.js +0 -92
  66. package/dist/chunks/component-library-registry-CJ1Yb_8E.js +0 -98
  67. package/dist/chunks/component-library-registry-Co7WzTfw.js +0 -1
  68. package/dist/chunks/content-switcher-BuLZ3Aae.js +0 -1
  69. package/dist/chunks/content-switcher-DIODRHwc.js +0 -2
  70. package/dist/chunks/content-switcher-item-0YPDXW1z.js +0 -27
  71. package/dist/chunks/content-switcher-item-DkRD8k8n.js +0 -272
  72. package/dist/chunks/copy-button-XD4reiTK.js +0 -121
  73. package/dist/chunks/copy-button-eI9B8iKc.js +0 -17
  74. package/dist/chunks/data-table-BImLEoIA.js +0 -1243
  75. package/dist/chunks/data-table-YLNCQhJx.js +0 -158
  76. package/dist/chunks/date-picker-CWIAwkKj.js +0 -66
  77. package/dist/chunks/date-picker-CXjiOkZH.js +0 -2167
  78. package/dist/chunks/decorate-Cnz2C5jL.js +0 -62
  79. package/dist/chunks/decorate-DT052P_1.js +0 -72
  80. package/dist/chunks/decorators-CHZSYVOk.js +0 -1
  81. package/dist/chunks/decorators-CK8kfuyw.js +0 -87
  82. package/dist/chunks/deep-shadow-contains-BlQ_KSu4.js +0 -15
  83. package/dist/chunks/deep-shadow-contains-OTuAt1VE.js +0 -1
  84. package/dist/chunks/directive-CtTB8jL3.js +0 -31
  85. package/dist/chunks/directive-DWoJrOxt.js +0 -1
  86. package/dist/chunks/dropdown-Cg9JduA5.js +0 -4
  87. package/dist/chunks/dropdown-item-CYwutWei.js +0 -677
  88. package/dist/chunks/dropdown-item-H53zayYk.js +0 -73
  89. package/dist/chunks/dropdown-jdFaaXEa.js +0 -32
  90. package/dist/chunks/file-uploader-6FOP_GAh.js +0 -79
  91. package/dist/chunks/file-uploader-BTk1MqcJ.js +0 -342
  92. package/dist/chunks/floating-controller-BphaSUPY.js +0 -1012
  93. package/dist/chunks/floating-controller-C4ivnNvp.js +0 -1
  94. package/dist/chunks/focus-C1mbe9-i.js +0 -1
  95. package/dist/chunks/focus-Dpis0wA_.js +0 -13
  96. package/dist/chunks/form-BEmId1-D.js +0 -20
  97. package/dist/chunks/form-BmSVyKnm.js +0 -1
  98. package/dist/chunks/form-DUzcwJO9.js +0 -23
  99. package/dist/chunks/form-crnrWPVH.js +0 -3
  100. package/dist/chunks/form-group-Dax3eYD4.js +0 -43
  101. package/dist/chunks/form-group-dIvuqjw2.js +0 -12
  102. package/dist/chunks/heading-BbB6mvMG.js +0 -47
  103. package/dist/chunks/heading-UN9MO1TN.js +0 -5
  104. package/dist/chunks/host-listener-BBI7oAFw.js +0 -37
  105. package/dist/chunks/host-listener-BzjpIsFF.js +0 -1
  106. package/dist/chunks/host-listener-CtA1D-wt.js +0 -1
  107. package/dist/chunks/host-listener-DJEakRMM.js +0 -17
  108. package/dist/chunks/icon-B_S1_kDJ.js +0 -1
  109. package/dist/chunks/icon-CINf5Icb.js +0 -28
  110. package/dist/chunks/icon-button-BtE0-oCE.js +0 -1
  111. package/dist/chunks/icon-button-CACU21y5.js +0 -16
  112. package/dist/chunks/icon-button-D2STrB4d.js +0 -6
  113. package/dist/chunks/icon-button-D569kvcZ.js +0 -84
  114. package/dist/chunks/icon-indicator-BkILzP5o.js +0 -1
  115. package/dist/chunks/icon-indicator-D_IHkSon.js +0 -445
  116. package/dist/chunks/icon-loader-B9uu2SkP.js +0 -7
  117. package/dist/chunks/icon-loader-CZ8MQjNl.js +0 -1
  118. package/dist/chunks/icon-loader-utils-BKulYpY6.js +0 -110
  119. package/dist/chunks/icon-loader-utils-C-vWa1iy.js +0 -1
  120. package/dist/chunks/if-defined-C4rY5CqG.js +0 -1
  121. package/dist/chunks/if-defined-DvPh-nZx.js +0 -5
  122. package/dist/chunks/if-non-empty-CqihXhSU.js +0 -1
  123. package/dist/chunks/if-non-empty-DIcT03Pc.js +0 -5
  124. package/dist/chunks/inline-loading-BIB-coVZ.js +0 -83
  125. package/dist/chunks/inline-loading-C4MpPNzv.js +0 -12
  126. package/dist/chunks/link-Bz8knkhr.js +0 -1
  127. package/dist/chunks/link-CyrOt3Yx.js +0 -24
  128. package/dist/chunks/link-DlDoN1r0.js +0 -1
  129. package/dist/chunks/link-MrslkhR7.js +0 -106
  130. package/dist/chunks/lit-BNk7ncU9.js +0 -3
  131. package/dist/chunks/lit-uyM4-HrV.js +0 -552
  132. package/dist/chunks/loading-CUUY8ITP.js +0 -68
  133. package/dist/chunks/loading-CX_B-YYv.js +0 -1
  134. package/dist/chunks/loading-SDDHeWof.js +0 -1
  135. package/dist/chunks/loading-icon-BsInpAjb.js +0 -16
  136. package/dist/chunks/loading-icon-iCI-C5ZG.js +0 -24
  137. package/dist/chunks/loading-xKooWNUJ.js +0 -2
  138. package/dist/chunks/menu-D2kFhclQ.js +0 -56
  139. package/dist/chunks/menu-DG7s9yXJ.js +0 -682
  140. package/dist/chunks/modal-C2EEHjQh.js +0 -27
  141. package/dist/chunks/modal-DEGWE2iT.js +0 -414
  142. package/dist/chunks/multi-select-BXST526m.js +0 -63
  143. package/dist/chunks/multi-select-CgDCOBWa.js +0 -384
  144. package/dist/chunks/notification-BEvb6zBP.js +0 -89
  145. package/dist/chunks/notification-DLOgEfr6.js +0 -426
  146. package/dist/chunks/number-input-CRIgLD3k.js +0 -284
  147. package/dist/chunks/number-input-CiXkIGVz.js +0 -76
  148. package/dist/chunks/on-D2_IwJad.js +0 -8
  149. package/dist/chunks/on-_BJL2XbM.js +0 -1
  150. package/dist/chunks/overflow-menu-BSMy7pUY.js +0 -34
  151. package/dist/chunks/overflow-menu-CGghH3Mz.js +0 -387
  152. package/dist/chunks/pagination-4SuGaSx6.js +0 -77
  153. package/dist/chunks/pagination-D7VFRyN2.js +0 -293
  154. package/dist/chunks/password-input-Cx2ItLqG.js +0 -68
  155. package/dist/chunks/password-input-NoZg_DjL.js +0 -210
  156. package/dist/chunks/popover--wvkgqdv.js +0 -1
  157. package/dist/chunks/popover-Ca4f4ZCE.js +0 -6
  158. package/dist/chunks/popover-content-BOaLSQt3.js +0 -15
  159. package/dist/chunks/popover-content-Bi-ydBhZ.js +0 -277
  160. package/dist/chunks/progress-bar-BTHREDPK.js +0 -101
  161. package/dist/chunks/progress-bar-p0YwLsuh.js +0 -22
  162. package/dist/chunks/progress-indicator-BP8k-xTC.js +0 -252
  163. package/dist/chunks/progress-indicator-cr687P29.js +0 -35
  164. package/dist/chunks/radio-button-CNOPBUK8.js +0 -396
  165. package/dist/chunks/radio-button-CU2ngHxo.js +0 -44
  166. package/dist/chunks/radio-group-manager-iPCcbWB8.js +0 -60
  167. package/dist/chunks/radio-group-manager-zfU1GLIW.js +0 -1
  168. package/dist/chunks/register-BXKEXKsC.js +0 -15
  169. package/dist/chunks/register-Bx7SlevL.js +0 -8198
  170. package/dist/chunks/register-CnJjkv07.js +0 -1
  171. package/dist/chunks/register-DqgfpeXv.js +0 -1399
  172. package/dist/chunks/search-BYWQ80wI.js +0 -4
  173. package/dist/chunks/search-BgSG9LA9.js +0 -22
  174. package/dist/chunks/search-CET7sHGW.js +0 -173
  175. package/dist/chunks/search-CUuRRsTX.js +0 -31
  176. package/dist/chunks/select-BifhTIxt.js +0 -37
  177. package/dist/chunks/select-Dh4AFZ2v.js +0 -4
  178. package/dist/chunks/select-item-BvwJ4Wc-.js +0 -77
  179. package/dist/chunks/select-item-DLWdT1CE.js +0 -272
  180. package/dist/chunks/shared-enums-BdDASwq-.js +0 -1
  181. package/dist/chunks/shared-enums-Cd0vBQFM.js +0 -6
  182. package/dist/chunks/skeleton-placeholder-Czj5sAeI.js +0 -28
  183. package/dist/chunks/skeleton-placeholder-aS-woCl8.js +0 -1
  184. package/dist/chunks/skeleton-text-BIHdj7Jx.js +0 -1
  185. package/dist/chunks/skeleton-text-CZ2bSuDE.js +0 -6
  186. package/dist/chunks/skeleton-text-DJrow5mh.js +0 -1
  187. package/dist/chunks/skeleton-text-INjLvc2Y.js +0 -71
  188. package/dist/chunks/slider-CoHP_UJ2.js +0 -878
  189. package/dist/chunks/slider-DhIZP9Ms.js +0 -246
  190. package/dist/chunks/stack-C66k74Zo.js +0 -1
  191. package/dist/chunks/stack-vrK3hQYJ.js +0 -85
  192. package/dist/chunks/structured-list-BWjXHFbX.js +0 -19
  193. package/dist/chunks/structured-list-lqhD2RqL.js +0 -234
  194. package/dist/chunks/tabs-DixpRz83.js +0 -58
  195. package/dist/chunks/tabs-DkIGB3cC.js +0 -316
  196. package/dist/chunks/tag-DpezbQqm.js +0 -93
  197. package/dist/chunks/tag-rQOD2v2s.js +0 -412
  198. package/dist/chunks/text-input-BYjtsh0H.js +0 -26
  199. package/dist/chunks/text-input-C2jRG8Lb.js +0 -72
  200. package/dist/chunks/text-input-DvygxhCJ.js +0 -4
  201. package/dist/chunks/text-input-DzSNpORC.js +0 -309
  202. package/dist/chunks/textarea-BZ34-RaT.js +0 -190
  203. package/dist/chunks/textarea-Be3YTme6.js +0 -57
  204. package/dist/chunks/tile-CQ9nINGM.js +0 -524
  205. package/dist/chunks/tile-DNWy90OU.js +0 -74
  206. package/dist/chunks/time-picker-CJ_ONMZi.js +0 -267
  207. package/dist/chunks/time-picker-DK_Lu3AK.js +0 -52
  208. package/dist/chunks/toggle-BBdusHAx.js +0 -36
  209. package/dist/chunks/toggle-Bfx6cOUM.js +0 -156
  210. package/dist/chunks/toggle-tip-CkH7fFX4.js +0 -46
  211. package/dist/chunks/toggle-tip-DF_GKfoM.js +0 -169
  212. package/dist/chunks/tooltip-COwRDvmc.js +0 -85
  213. package/dist/chunks/tooltip-DbGsUOZ8.js +0 -23
  214. package/dist/chunks/tooltip-content-BDcgoT6r.js +0 -1
  215. package/dist/chunks/tooltip-content-CkxKIMDr.js +0 -116
  216. package/dist/chunks/tree-utils-AeNlEhIR.js +0 -1
  217. package/dist/chunks/tree-view-BmoD8n0Y.js +0 -292
  218. package/dist/chunks/tree-view-Drfa7DNm.js +0 -82
  219. package/dist/chunks/unsafe-html-BP-z2WTp.js +0 -26
  220. package/dist/chunks/unsafe-html-Dego4Lbw.js +0 -1
  221. package/dist/chunks/validity-CMW3OiFU.js +0 -31
  222. package/dist/chunks/validity-zT-XWh2t.js +0 -1
  223. package/dist/chunks/zoo-Bb5HHyrn.js +0 -721
  224. package/dist/chunks/zoo-C_CBOaHL.js +0 -52
@@ -1,721 +0,0 @@
1
- import { _ as C, a as b } from "./component-library-registry-CJ1Yb_8E.js";
2
- import { o as d, t as x, u as O } from "./lit-uyM4-HrV.js";
3
- function o(r) {
4
- return r != null && typeof r == "object" && r["@@functional/placeholder"] === !0;
5
- }
6
- function f(r) {
7
- return function t(e) {
8
- return arguments.length === 0 || o(e) ? t : r.apply(this, arguments);
9
- };
10
- }
11
- function c(r) {
12
- return function t(e, n) {
13
- switch (arguments.length) {
14
- case 0:
15
- return t;
16
- case 1:
17
- return o(e) ? t : f(function(i) {
18
- return r(e, i);
19
- });
20
- default:
21
- return o(e) && o(n) ? t : o(e) ? f(function(i) {
22
- return r(i, n);
23
- }) : o(n) ? f(function(i) {
24
- return r(e, i);
25
- }) : r(e, n);
26
- }
27
- };
28
- }
29
- function R(r, t) {
30
- r = r || [], t = t || [];
31
- var e, n = r.length, i = t.length, a = [];
32
- for (e = 0; e < n; )
33
- a[a.length] = r[e], e += 1;
34
- for (e = 0; e < i; )
35
- a[a.length] = t[e], e += 1;
36
- return a;
37
- }
38
- function D(r, t) {
39
- switch (r) {
40
- case 0:
41
- return function() {
42
- return t.apply(this, arguments);
43
- };
44
- case 1:
45
- return function(e) {
46
- return t.apply(this, arguments);
47
- };
48
- case 2:
49
- return function(e, n) {
50
- return t.apply(this, arguments);
51
- };
52
- case 3:
53
- return function(e, n, i) {
54
- return t.apply(this, arguments);
55
- };
56
- case 4:
57
- return function(e, n, i, a) {
58
- return t.apply(this, arguments);
59
- };
60
- case 5:
61
- return function(e, n, i, a, s) {
62
- return t.apply(this, arguments);
63
- };
64
- case 6:
65
- return function(e, n, i, a, s, u) {
66
- return t.apply(this, arguments);
67
- };
68
- case 7:
69
- return function(e, n, i, a, s, u, l) {
70
- return t.apply(this, arguments);
71
- };
72
- case 8:
73
- return function(e, n, i, a, s, u, l, h) {
74
- return t.apply(this, arguments);
75
- };
76
- case 9:
77
- return function(e, n, i, a, s, u, l, h, m) {
78
- return t.apply(this, arguments);
79
- };
80
- case 10:
81
- return function(e, n, i, a, s, u, l, h, m, p) {
82
- return t.apply(this, arguments);
83
- };
84
- default:
85
- throw new Error("First argument to _arity must be a non-negative integer no greater than ten");
86
- }
87
- }
88
- function j(r, t, e) {
89
- return function() {
90
- for (var n = [], i = 0, a = r, s = 0, u = !1; s < t.length || i < arguments.length; ) {
91
- var l;
92
- s < t.length && (!o(t[s]) || i >= arguments.length) ? l = t[s] : (l = arguments[i], i += 1), n[s] = l, o(l) ? u = !0 : a -= 1, s += 1;
93
- }
94
- return !u && a <= 0 ? e.apply(this, n) : D(Math.max(0, a), j(r, n, e));
95
- };
96
- }
97
- var _ = /* @__PURE__ */ c(function(t, e) {
98
- return t === 1 ? f(e) : D(t, j(t, [], e));
99
- });
100
- function q(r) {
101
- return function t(e, n, i) {
102
- switch (arguments.length) {
103
- case 0:
104
- return t;
105
- case 1:
106
- return o(e) ? t : c(function(a, s) {
107
- return r(e, a, s);
108
- });
109
- case 2:
110
- return o(e) && o(n) ? t : o(e) ? c(function(a, s) {
111
- return r(a, n, s);
112
- }) : o(n) ? c(function(a, s) {
113
- return r(e, a, s);
114
- }) : f(function(a) {
115
- return r(e, n, a);
116
- });
117
- default:
118
- return o(e) && o(n) && o(i) ? t : o(e) && o(n) ? c(function(a, s) {
119
- return r(a, s, i);
120
- }) : o(e) && o(i) ? c(function(a, s) {
121
- return r(a, n, s);
122
- }) : o(n) && o(i) ? c(function(a, s) {
123
- return r(e, a, s);
124
- }) : o(e) ? f(function(a) {
125
- return r(a, n, i);
126
- }) : o(n) ? f(function(a) {
127
- return r(e, a, i);
128
- }) : o(i) ? f(function(a) {
129
- return r(e, n, a);
130
- }) : r(e, n, i);
131
- }
132
- };
133
- }
134
- var A = Array.isArray || function(t) {
135
- return t != null && t.length >= 0 && Object.prototype.toString.call(t) === "[object Array]";
136
- };
137
- function U(r) {
138
- return r != null && typeof r["@@transducer/step"] == "function";
139
- }
140
- function H(r, t, e) {
141
- return function() {
142
- if (arguments.length === 0) return e();
143
- var n = arguments[arguments.length - 1];
144
- if (!A(n)) {
145
- for (var i = 0; i < r.length; ) {
146
- if (typeof n[r[i]] == "function") return n[r[i]].apply(n, Array.prototype.slice.call(arguments, 0, -1));
147
- i += 1;
148
- }
149
- if (U(n)) return t.apply(null, Array.prototype.slice.call(arguments, 0, -1))(n);
150
- }
151
- return e.apply(this, arguments);
152
- };
153
- }
154
- var T = {
155
- init: function() {
156
- return this.xf["@@transducer/init"]();
157
- },
158
- result: function(r) {
159
- return this.xf["@@transducer/result"](r);
160
- }
161
- };
162
- function g(r, t) {
163
- return Object.prototype.hasOwnProperty.call(t, r);
164
- }
165
- var k = Object.prototype.toString, Z = /* @__PURE__ */ (function() {
166
- return k.call(arguments) === "[object Arguments]" ? function(t) {
167
- return k.call(t) === "[object Arguments]";
168
- } : function(t) {
169
- return g("callee", t);
170
- };
171
- })(), G = !/* @__PURE__ */ { toString: null }.propertyIsEnumerable("toString"), S = [
172
- "constructor",
173
- "valueOf",
174
- "isPrototypeOf",
175
- "toString",
176
- "propertyIsEnumerable",
177
- "hasOwnProperty",
178
- "toLocaleString"
179
- ], E = /* @__PURE__ */ (function() {
180
- "use strict";
181
- return arguments.propertyIsEnumerable("length");
182
- })(), J = function(t, e) {
183
- for (var n = 0; n < t.length; ) {
184
- if (t[n] === e) return !0;
185
- n += 1;
186
- }
187
- return !1;
188
- }, V = /* @__PURE__ */ f(typeof Object.keys == "function" && !E ? function(t) {
189
- return Object(t) !== t ? [] : Object.keys(t);
190
- } : function(t) {
191
- if (Object(t) !== t) return [];
192
- var e, n, i = [], a = E && Z(t);
193
- for (e in t) g(e, t) && (!a || e !== "length") && (i[i.length] = e);
194
- if (G)
195
- for (n = S.length - 1; n >= 0; )
196
- e = S[n], g(e, t) && !J(i, e) && (i[i.length] = e), n -= 1;
197
- return i;
198
- });
199
- function W(r, t) {
200
- for (var e = 0, n = t.length, i = Array(n); e < n; )
201
- i[e] = r(t[e]), e += 1;
202
- return i;
203
- }
204
- function z(r, t, e) {
205
- for (var n = 0, i = e.length; n < i; )
206
- t = r(t, e[n]), n += 1;
207
- return t;
208
- }
209
- var K = /* @__PURE__ */ (function() {
210
- function r(t, e) {
211
- this.xf = e, this.f = t;
212
- }
213
- return r.prototype["@@transducer/init"] = T.init, r.prototype["@@transducer/result"] = T.result, r.prototype["@@transducer/step"] = function(t, e) {
214
- return this.xf["@@transducer/step"](t, this.f(e));
215
- }, r;
216
- })(), Q = function(t) {
217
- return function(e) {
218
- return new K(t, e);
219
- };
220
- }, B = /* @__PURE__ */ c(/* @__PURE__ */ H(["fantasy-land/map", "map"], Q, function(t, e) {
221
- switch (Object.prototype.toString.call(e)) {
222
- case "[object Function]":
223
- return _(e.length, function() {
224
- return t.call(this, e.apply(this, arguments));
225
- });
226
- case "[object Object]":
227
- return z(function(n, i) {
228
- return n[i] = t(e[i]), n;
229
- }, {}, V(e));
230
- default:
231
- return W(t, e);
232
- }
233
- })), v = Number.isInteger || function(t) {
234
- return t << 0 === t;
235
- };
236
- function N(r, t) {
237
- return t[r < 0 ? t.length + r : r];
238
- }
239
- function Y(r, t) {
240
- if (t != null)
241
- return v(r) ? N(r, t) : t[r];
242
- }
243
- function X(r) {
244
- return Object.prototype.toString.call(r) === "[object String]";
245
- }
246
- var tt = /* @__PURE__ */ f(function(t) {
247
- return A(t) ? !0 : !t || typeof t != "object" || X(t) ? !1 : t.length === 0 ? !0 : t.length > 0 ? t.hasOwnProperty(0) && t.hasOwnProperty(t.length - 1) : !1;
248
- }), $ = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
249
- function et(r, t, e) {
250
- return function(i, a, s) {
251
- if (tt(s)) return r(i, a, s);
252
- if (s == null) return a;
253
- if (typeof s["fantasy-land/reduce"] == "function") return t(i, a, s, "fantasy-land/reduce");
254
- if (s[$] != null) return e(i, a, s[$]());
255
- if (typeof s.next == "function") return e(i, a, s);
256
- if (typeof s.reduce == "function") return t(i, a, s, "reduce");
257
- throw new TypeError("reduce: list must be array or iterable");
258
- };
259
- }
260
- var rt = /* @__PURE__ */ c(function(t, e) {
261
- return t && e;
262
- });
263
- function nt(r, t, e) {
264
- for (var n = e.next(); !n.done; )
265
- t = r(t, n.value), n = e.next();
266
- return t;
267
- }
268
- function it(r, t, e, n) {
269
- return e[n](r, t);
270
- }
271
- var at = /* @__PURE__ */ et(z, it, nt), st = /* @__PURE__ */ c(function(t, e) {
272
- return typeof e["fantasy-land/ap"] == "function" ? e["fantasy-land/ap"](t) : typeof t.ap == "function" ? t.ap(e) : typeof t == "function" ? function(n) {
273
- return t(n)(e(n));
274
- } : at(function(n, i) {
275
- return R(n, B(i, e));
276
- }, [], t);
277
- });
278
- function ot(r, t, e) {
279
- if (v(r) && A(e)) {
280
- var n = r < 0 ? e.length + r : r, i = [].concat(e);
281
- return i[n] = t, i;
282
- }
283
- var a = {};
284
- for (var s in e) a[s] = e[s];
285
- return a[r] = t, a;
286
- }
287
- var w = /* @__PURE__ */ f(function(t) {
288
- return t == null;
289
- }), ut = /* @__PURE__ */ q(function r(t, e, n) {
290
- if (t.length === 0) return e;
291
- var i = t[0];
292
- if (t.length > 1) {
293
- var a = Y(i, n);
294
- (w(a) || typeof a != "object") && (a = v(t[1]) ? [] : {}), e = r(Array.prototype.slice.call(t, 1), e, a);
295
- }
296
- return ot(i, e, n);
297
- });
298
- function ct(r) {
299
- var t = Object.prototype.toString.call(r);
300
- return t === "[object Function]" || t === "[object AsyncFunction]" || t === "[object GeneratorFunction]" || t === "[object AsyncGeneratorFunction]";
301
- }
302
- var lt = /* @__PURE__ */ c(function(t, e) {
303
- var n = _(t, e);
304
- return _(t, function() {
305
- return z(st, B(n, arguments[0]), Array.prototype.slice.call(arguments, 1));
306
- });
307
- }), ft = /* @__PURE__ */ f(function(t) {
308
- return lt(t.length, t);
309
- }), ht = /* @__PURE__ */ c(function(t, e) {
310
- return ct(t) ? function() {
311
- return t.apply(this, arguments) && e.apply(this, arguments);
312
- } : ft(rt)(t, e);
313
- }), mt = /* @__PURE__ */ c(function(t, e) {
314
- if (t.length === 0 || w(e)) return !1;
315
- for (var n = e, i = 0; i < t.length; ) if (!w(n) && g(t[i], n))
316
- n = n[t[i]], i += 1;
317
- else return !1;
318
- return !0;
319
- }), P = /* @__PURE__ */ c(function(t, e) {
320
- return mt([t], e);
321
- });
322
- function pt(r, t) {
323
- for (var e = t, n = 0; n < r.length; n += 1) {
324
- if (e == null) return;
325
- var i = r[n];
326
- v(i) ? e = N(i, e) : e = e[i];
327
- }
328
- return e;
329
- }
330
- var I = /* @__PURE__ */ c(pt), dt = {
331
- json: (r) => JSON.stringify(r, null, 2),
332
- tpl: (r, t, e) => {
333
- const n = e?.getAttribute("zoo-bind-attr-tpl") || e?.getAttribute("zoo-bind-tpl");
334
- if (!n) return r;
335
- try {
336
- return new Function("value", "data", `return \`${n}\`;`)(r, t);
337
- } catch (i) {
338
- return console.warn("[Binder] Invalid template:", n, i), r;
339
- }
340
- }
341
- }, zt = class {
342
- #i;
343
- #t;
344
- #r;
345
- #e = null;
346
- #n;
347
- constructor(r, t, e, n = {}) {
348
- if (!t) throw new Error("Binder requires a URL");
349
- if (!e || !(e instanceof Element)) throw new Error("Binder requires a valid rootEl Element");
350
- this.#i = r, this.#t = new URL(t, window.location.origin), this.#r = e, this.#n = {
351
- ...dt,
352
- ...n.formatters
353
- }, n.urlParams ? this.#s(n.urlParams) : this.#a();
354
- }
355
- get url() {
356
- return this.#t;
357
- }
358
- get data() {
359
- return this.#e;
360
- }
361
- get limit() {
362
- return parseInt(this.#t.searchParams.get("limit") || "0", 10);
363
- }
364
- get offset() {
365
- return parseInt(this.#t.searchParams.get("offset") || "0", 10);
366
- }
367
- get isPaginated() {
368
- return ht(P("count"), P("results"))(this.#e);
369
- }
370
- #s(r) {
371
- return Object.entries(r).forEach(([t, e]) => {
372
- if (!b(e) || e === "" || Array.isArray(e) && e.length < 1) {
373
- this.#t.searchParams.delete(t);
374
- return;
375
- }
376
- if (Array.isArray(e)) {
377
- this.#t.searchParams.set(t, e.join(","));
378
- return;
379
- }
380
- this.#t.searchParams.set(t, e);
381
- }), this.#a(), this.#t;
382
- }
383
- #a() {
384
- const r = this.#t.href.split(this.url.origin)[1].slice(1);
385
- this.#r.querySelectorAll("[zoo-bind-binderurl]").forEach((t) => {
386
- t.setAttribute("zoo-bind-binderurl", r);
387
- });
388
- }
389
- async fetchData(r = {}) {
390
- const t = await this.#i.user.fetchJson(this.#s(r).toString(), this.#i.abortController.signal);
391
- this.setData(t);
392
- }
393
- setData(r) {
394
- this.#e = r, this.render();
395
- }
396
- render() {
397
- if (!b(this.#e)) {
398
- console.warn("[Binder] No data to render");
399
- return;
400
- }
401
- this.#a(), this.#o(this.#r, this.#e, 0), this.#c();
402
- }
403
- #o(r, t, e = 0, n = {}) {
404
- const i = n.removeAttributes ?? !1;
405
- r.querySelectorAll("[zoo-bind-attr]").forEach((a) => {
406
- a.closest("[zoo-template]") || (a.getAttribute("zoo-bind-attr").split(",").forEach((s) => {
407
- const [u, l] = s.split(":").map((y) => y.trim()), [h, m] = l.split("|").map((y) => y.trim());
408
- let p = this.#u(t, h, e);
409
- m && this.#n[m] && (p = this.#n[m](p, t, a)), b(p) && a.setAttribute(u, p);
410
- }), i && (a.removeAttribute("zoo-bind-attr"), a.removeAttribute("zoo-bind-attr-tpl")));
411
- }), r.querySelectorAll("[zoo-bind]").forEach((a) => {
412
- if (a.closest("[zoo-template]")) return;
413
- const [s, u] = a.getAttribute("zoo-bind").split("|").map((h) => h.trim());
414
- let l = this.#u(t, s, e);
415
- u && this.#n[u] && (l = this.#n[u](l, t, a)), a.textContent = l ?? "", i && (a.removeAttribute("zoo-bind"), a.removeAttribute("zoo-bind-tpl"));
416
- });
417
- }
418
- #c() {
419
- this.#r.querySelectorAll("[zoo-template]").forEach((r) => {
420
- const t = r.getAttribute("zoo-template"), e = r.getAttribute("zoo-template-bind");
421
- if (!t) {
422
- console.warn("[Binder] Consumer missing template ID", r);
423
- return;
424
- }
425
- const n = this.#r.querySelector(`#${t}`);
426
- if (!n || n.tagName !== "TEMPLATE") {
427
- console.error(`[DataBinder] Template not found or invalid: ${t}`);
428
- return;
429
- }
430
- const i = e ? I(e.split("."), this.#e) : this.#e;
431
- if (!i) {
432
- console.warn(`[DataBinder] Data slice is undefined. Path: ${e}. Skipping render for this consumer.`);
433
- return;
434
- }
435
- if (!Array.isArray(i)) {
436
- console.error(`[DataBinder] Data slice is not an array. Path: ${e}`, i);
437
- return;
438
- }
439
- r.innerHTML = "", i.forEach((a, s) => {
440
- const u = this.#l(n, a, s);
441
- r.appendChild(u);
442
- });
443
- });
444
- }
445
- #l(r, t, e) {
446
- const n = r.content.cloneNode(!0);
447
- return this.#o(n, t, e, { removeAttributes: !0 }), n;
448
- }
449
- #u(r, t, e) {
450
- const n = {
451
- $index: () => e,
452
- $index__paged: () => this.offset + e,
453
- $index1: () => e + 1,
454
- $index1__paged: () => this.offset + e + 1
455
- };
456
- return n[t] ? n[t]() : I(t.split("."), r);
457
- }
458
- }, L = new Map(Object.entries({
459
- event: "event",
460
- endpoint: "endpoint",
461
- href: "href",
462
- url: "url",
463
- target: "target",
464
- "record-id": "recordId",
465
- "zoo-sort-field": "sortField",
466
- "zoo-view": "view",
467
- "zoo-event": "event",
468
- "zoo-href": "href"
469
- })), gt = (r) => {
470
- let t = {};
471
- return Array.from(r.attributes).forEach((e) => {
472
- const n = e.name, i = e.value;
473
- L.has(n) ? t[L.get(n)] = i : (n.startsWith("data-") || n.startsWith("zoo-")) && (t = ut(n.split("-"), i, t));
474
- }), t;
475
- }, vt = (r, t, e = "event") => r.getAttribute(t) || r.getAttribute(e), F = class extends x {
476
- static properties = {
477
- token: { type: String },
478
- prefix: { type: String },
479
- postfix: { type: String }
480
- };
481
- static styles = O`
482
- :host {
483
- display: inline-block;
484
- }
485
-
486
- .tag {
487
- text-align: center;
488
- display: inline-flex;
489
- align-items: center;
490
- justify-content: center;
491
- line-height: initial;
492
- width: max-content;
493
- padding: .2em 1em;
494
- border-radius: 1em;
495
- font-size: var(--zoo-theme-chips-font-size, 0.75rem);
496
- white-space: nowrap;
497
- word-break: break-word;
498
- box-sizing: border-box;
499
- }
500
- `;
501
- render() {
502
- const r = `${this.prefix ?? ""}${this.token ?? "default"}${this.postfix ?? ""}`;
503
- return d`
504
- <span
505
- class="tag"
506
- style="
507
- background-color: var(--zoo-tag-${r}-bg, var(--zoo-tag-default-bg, #9e9e9e));
508
- color: var(--zoo-tag-${r}-fg, var(--zoo-tag-default-fg, #ffffff));
509
- "
510
- >
511
- <slot></slot>
512
- </span>
513
- `;
514
- }
515
- };
516
- customElements.get("zoo-tag") || customElements.define("zoo-tag", F);
517
- var yt = (r) => {
518
- const t = Math.floor((/* @__PURE__ */ new Date() - r) / 1e3), e = [
519
- {
520
- name: "year",
521
- seconds: 31536e3
522
- },
523
- {
524
- name: "month",
525
- seconds: 2592e3
526
- },
527
- {
528
- name: "week",
529
- seconds: 604800
530
- },
531
- {
532
- name: "day",
533
- seconds: 86400
534
- },
535
- {
536
- name: "hour",
537
- seconds: 3600
538
- },
539
- {
540
- name: "minute",
541
- seconds: 60
542
- },
543
- {
544
- name: "second",
545
- seconds: 1
546
- }
547
- ];
548
- if (t < 0) {
549
- const n = Math.abs(t);
550
- for (const i of e) {
551
- const a = Math.floor(n / i.seconds);
552
- if (a >= 1) return new Intl.RelativeTimeFormat("en", { numeric: "auto" }).format(a, i.name);
553
- }
554
- return "just now";
555
- }
556
- for (const n of e) {
557
- const i = Math.floor(t / n.seconds);
558
- if (i >= 1) return new Intl.RelativeTimeFormat("en", { numeric: "auto" }).format(-i, n.name);
559
- }
560
- return "just now";
561
- }, bt = (r) => {
562
- const [{ value: t }, , { value: e }, , { value: n }, , { value: i }, , { value: a }, , { value: s }] = new Intl.DateTimeFormat("en", {
563
- day: "2-digit",
564
- month: "short",
565
- year: "2-digit",
566
- hour: "2-digit",
567
- minute: "2-digit",
568
- second: "2-digit",
569
- hourCycle: "h23"
570
- }).formatToParts(r);
571
- return `${e} ${t} ${n} ${i}:${a}:${s}`;
572
- }, _t = (r) => {
573
- const [{ value: t }, , { value: e }, , { value: n }] = new Intl.DateTimeFormat("en", {
574
- day: "2-digit",
575
- month: "short",
576
- year: "2-digit"
577
- }).formatToParts(r);
578
- return `${e} ${t} ${n}`;
579
- }, M = class extends x {
580
- static properties = {
581
- timestamp: { type: Number },
582
- kind: { type: String },
583
- concat: { type: String }
584
- };
585
- static styles = O`
586
- :host {
587
- display: inline;
588
- }
589
-
590
- .relative {
591
- color: var(--zoo-timestamp-relative-color, inherit);
592
- font-weight: var(--zoo-timestamp-relative-weight, inherit);
593
- font-size: var(--zoo-timestamp-relative-size, inherit);
594
- }
595
-
596
- .static {
597
- color: var(--zoo-timestamp-static-color, inherit);
598
- font-weight: var(--zoo-timestamp-static-weight, inherit);
599
- font-size: var(--zoo-timestamp-static-size, inherit);
600
- }
601
-
602
- .separator {
603
- color: var(--zoo-timestamp-separator-color, inherit);
604
- }
605
- `;
606
- constructor() {
607
- super(), this.timestamp = Date.now(), this.kind = "both", this.concat = "r (s)", this._boundTickHandler = this._onTimeTick.bind(this), this._isListening = !1;
608
- }
609
- _shouldListenToTicks() {
610
- return this.kind === "relative" || this.kind === "both";
611
- }
612
- connectedCallback() {
613
- super.connectedCallback(), this._updateTickListener();
614
- }
615
- disconnectedCallback() {
616
- this._removeTickListener(), super.disconnectedCallback();
617
- }
618
- updated(r) {
619
- super.updated(r), r.has("kind") && this._updateTickListener();
620
- }
621
- _updateTickListener() {
622
- const r = this._shouldListenToTicks();
623
- r && !this._isListening ? (document.addEventListener("zoo-tick-60", this._boundTickHandler), this._isListening = !0) : !r && this._isListening && this._removeTickListener();
624
- }
625
- _removeTickListener() {
626
- this._isListening && (document.removeEventListener("zoo-tick-60", this._boundTickHandler), this._isListening = !1);
627
- }
628
- _onTimeTick() {
629
- this.requestUpdate();
630
- }
631
- _parseTemplate(r) {
632
- const t = [];
633
- let e = r;
634
- for (; e.length > 0; ) {
635
- const n = e.indexOf("r"), i = [n, e.indexOf("s")].filter((a) => a !== -1).sort((a, s) => a - s)[0];
636
- if (i === void 0) {
637
- e.length > 0 && t.push({
638
- type: "text",
639
- value: e
640
- });
641
- break;
642
- }
643
- i > 0 && t.push({
644
- type: "text",
645
- value: e.substring(0, i)
646
- }), i === n ? t.push({
647
- type: "relative",
648
- value: ""
649
- }) : t.push({
650
- type: "static",
651
- value: ""
652
- }), e = e.substring(i + 1);
653
- }
654
- return t;
655
- }
656
- _getFormattedParts() {
657
- let r = this.timestamp;
658
- r < 9466848e5 && (r = r * 1e3);
659
- const t = new Date(r), e = yt(t), n = bt(t), i = _t(t);
660
- switch (this.kind) {
661
- case "relative":
662
- return [{
663
- type: "relative",
664
- value: e
665
- }];
666
- case "datetime":
667
- return [{
668
- type: "static",
669
- value: n
670
- }];
671
- case "date":
672
- return [{
673
- type: "static",
674
- value: i
675
- }];
676
- case "both":
677
- return this._parseTemplate(this.concat).map((a) => a.type === "relative" ? {
678
- type: "relative",
679
- value: e
680
- } : a.type === "static" ? {
681
- type: "static",
682
- value: n
683
- } : a);
684
- default:
685
- return this._parseTemplate(this.concat).map((a) => a.type === "relative" ? {
686
- type: "relative",
687
- value: e
688
- } : a.type === "static" ? {
689
- type: "static",
690
- value: n
691
- } : a);
692
- }
693
- }
694
- render() {
695
- let r = this.timestamp;
696
- r < 9466848e5 && (r = r * 1e3);
697
- const t = new Date(r), e = this._getFormattedParts();
698
- return d`<time datetime="${t.toISOString()}">
699
- ${e.map((n) => n.type === "relative" ? d`<span class="relative">${n.value}</span>` : n.type === "static" ? d`<span class="static">${n.value}</span>` : d`<span class="separator">${n.value}</span>`)}
700
- </time>`;
701
- }
702
- };
703
- customElements.get("zoo-timestamp") || customElements.define("zoo-timestamp", M);
704
- var Tt = /* @__PURE__ */ C({
705
- ZooTag: () => F,
706
- ZooTimestamp: () => M,
707
- getEventAttribute: () => vt,
708
- getSemanticAttributes: () => gt
709
- });
710
- export {
711
- I as a,
712
- g as c,
713
- zt as i,
714
- q as l,
715
- vt as n,
716
- pt as o,
717
- gt as r,
718
- mt as s,
719
- Tt as t,
720
- c as u
721
- };