@windwalker-io/unicorn-next 0.1.19 → 0.1.21

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 (107) hide show
  1. package/dist/chunks/_arrayPush.js +325 -108
  2. package/dist/chunks/_arrayPush.js.map +1 -1
  3. package/dist/chunks/_baseRest.js +155 -60
  4. package/dist/chunks/_baseRest.js.map +1 -1
  5. package/dist/chunks/_baseUnary.js +463 -0
  6. package/dist/chunks/_baseUnary.js.map +1 -0
  7. package/dist/chunks/_getPrototype.js +292 -100
  8. package/dist/chunks/_getPrototype.js.map +1 -1
  9. package/dist/chunks/alert-adapter.js +29 -0
  10. package/dist/chunks/alert-adapter.js.map +1 -0
  11. package/dist/chunks/alert.js +21 -0
  12. package/dist/chunks/alert.js.map +1 -0
  13. package/dist/chunks/arr.js +24 -0
  14. package/dist/chunks/arr.js.map +1 -0
  15. package/dist/chunks/button-radio.js +127 -145
  16. package/dist/chunks/button-radio.js.map +1 -1
  17. package/dist/chunks/checkboxes-multi-select.js +44 -43
  18. package/dist/chunks/checkboxes-multi-select.js.map +1 -1
  19. package/dist/chunks/chunk.js +24 -0
  20. package/dist/chunks/cloneDeep.js +679 -212
  21. package/dist/chunks/cloneDeep.js.map +1 -1
  22. package/dist/chunks/cropper.min.js +6 -5
  23. package/dist/chunks/cropper.min.js.map +1 -1
  24. package/dist/chunks/crypto.js +26 -0
  25. package/dist/chunks/crypto.js.map +1 -0
  26. package/dist/chunks/data.js +49 -0
  27. package/dist/chunks/data.js.map +1 -0
  28. package/dist/chunks/dom.js +128 -0
  29. package/dist/chunks/dom.js.map +1 -0
  30. package/dist/chunks/events.js +270 -0
  31. package/dist/chunks/events.js.map +1 -0
  32. package/dist/chunks/field-cascade-select.js +207 -250
  33. package/dist/chunks/field-cascade-select.js.map +1 -1
  34. package/dist/chunks/field-file-drag.js +175 -209
  35. package/dist/chunks/field-file-drag.js.map +1 -1
  36. package/dist/chunks/field-flatpickr.js +94 -898
  37. package/dist/chunks/field-flatpickr.js.map +1 -1
  38. package/dist/chunks/field-modal-select.js +728 -467
  39. package/dist/chunks/field-modal-select.js.map +1 -1
  40. package/dist/chunks/field-modal-tree.js +771 -766
  41. package/dist/chunks/field-modal-tree.js.map +1 -1
  42. package/dist/chunks/field-multi-uploader.js +249 -256
  43. package/dist/chunks/field-multi-uploader.js.map +1 -1
  44. package/dist/chunks/field-repeatable.js +111 -127
  45. package/dist/chunks/field-repeatable.js.map +1 -1
  46. package/dist/chunks/field-single-image-drag.js +286 -338
  47. package/dist/chunks/field-single-image-drag.js.map +1 -1
  48. package/dist/chunks/form.js +146 -159
  49. package/dist/chunks/form.js.map +1 -1
  50. package/dist/chunks/grid.js +349 -418
  51. package/dist/chunks/grid.js.map +1 -1
  52. package/dist/chunks/helper.js +39 -0
  53. package/dist/chunks/helper.js.map +1 -0
  54. package/dist/chunks/http-client.js +221 -211
  55. package/dist/chunks/http-client.js.map +1 -1
  56. package/dist/chunks/iframe-modal.js +95 -115
  57. package/dist/chunks/iframe-modal.js.map +1 -1
  58. package/dist/chunks/keep-tab.js +92 -101
  59. package/dist/chunks/keep-tab.js.map +1 -1
  60. package/dist/chunks/lang.js +250 -0
  61. package/dist/chunks/lang.js.map +1 -0
  62. package/dist/chunks/legacy.js +197 -201
  63. package/dist/chunks/legacy.js.map +1 -1
  64. package/dist/chunks/list-dependent.js +195 -228
  65. package/dist/chunks/list-dependent.js.map +1 -1
  66. package/dist/chunks/loader.js +106 -0
  67. package/dist/chunks/loader.js.map +1 -0
  68. package/dist/chunks/monthSelect.js +251 -0
  69. package/dist/chunks/monthSelect.js.map +1 -0
  70. package/dist/chunks/router.js +111 -0
  71. package/dist/chunks/router.js.map +1 -0
  72. package/dist/chunks/s3-multipart-uploader.js +183 -210
  73. package/dist/chunks/s3-multipart-uploader.js.map +1 -1
  74. package/dist/chunks/s3-uploader.js +106 -128
  75. package/dist/chunks/s3-uploader.js.map +1 -1
  76. package/dist/chunks/show-on.js +358 -205
  77. package/dist/chunks/show-on.js.map +1 -1
  78. package/dist/chunks/timing.js +10 -0
  79. package/dist/chunks/timing.js.map +1 -0
  80. package/dist/chunks/tinymce.js +153 -203
  81. package/dist/chunks/tinymce.js.map +1 -1
  82. package/dist/chunks/ui-bootstrap5.js +58 -72
  83. package/dist/chunks/ui-bootstrap5.js.map +1 -1
  84. package/dist/chunks/ui.js +320 -0
  85. package/dist/chunks/ui.js.map +1 -0
  86. package/dist/chunks/unicorn.js.map +1 -1
  87. package/dist/chunks/useQueue.js +111 -0
  88. package/dist/chunks/useQueue.js.map +1 -0
  89. package/dist/chunks/useStack.js +76 -0
  90. package/dist/chunks/useStack.js.map +1 -0
  91. package/dist/chunks/validation.js +761 -853
  92. package/dist/chunks/validation.js.map +1 -1
  93. package/dist/editor.css +1 -1
  94. package/dist/index.d.ts +10 -8
  95. package/dist/multi-level-menu.css +1 -1
  96. package/dist/switcher.css +1 -1
  97. package/dist/unicorn.js +805 -130
  98. package/dist/unicorn.js.map +1 -1
  99. package/package.json +3 -3
  100. package/src/composable/useBsModalAlert.ts +29 -0
  101. package/src/composable/useHttp.ts +13 -1
  102. package/src/module/s3-uploader.ts +1 -1
  103. package/vite.config.ts +5 -1
  104. package/dist/chunks/_commonjsHelpers.js +0 -7
  105. package/dist/chunks/index.js +0 -314
  106. package/dist/chunks/isArguments.js +0 -146
  107. package/dist/chunks/unicorn.js +0 -2621
@@ -0,0 +1,270 @@
1
+ //#region ../../../../node_modules/ts-mixer/dist/esm/index.js
2
+ /**
3
+ * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives
4
+ * the option to exclude properties by name.
5
+ */
6
+ var copyProps = (dest, src, exclude = []) => {
7
+ const props = Object.getOwnPropertyDescriptors(src);
8
+ for (let prop of exclude) delete props[prop];
9
+ Object.defineProperties(dest, props);
10
+ };
11
+ /**
12
+ * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will
13
+ * be closest to farthest in the chain.
14
+ */
15
+ var protoChain = (obj, currentChain = [obj]) => {
16
+ const proto = Object.getPrototypeOf(obj);
17
+ if (proto === null) return currentChain;
18
+ return protoChain(proto, [...currentChain, proto]);
19
+ };
20
+ /**
21
+ * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated
22
+ * objects, this function should return Object.prototype.
23
+ */
24
+ var nearestCommonProto = (...objs) => {
25
+ if (objs.length === 0) return void 0;
26
+ let commonProto = void 0;
27
+ const protoChains = objs.map((obj) => protoChain(obj));
28
+ while (protoChains.every((protoChain) => protoChain.length > 0)) {
29
+ const protos = protoChains.map((protoChain) => protoChain.pop());
30
+ const potentialCommonProto = protos[0];
31
+ if (protos.every((proto) => proto === potentialCommonProto)) commonProto = potentialCommonProto;
32
+ else break;
33
+ }
34
+ return commonProto;
35
+ };
36
+ /**
37
+ * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first
38
+ * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods
39
+ * downstream of this prototype (ONLY downstream) are copied into the new object.
40
+ *
41
+ * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as
42
+ * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may
43
+ * want to use that instead.
44
+ */
45
+ var hardMixProtos = (ingredients, constructor, exclude = []) => {
46
+ var _a;
47
+ const base = (_a = nearestCommonProto(...ingredients)) !== null && _a !== void 0 ? _a : Object.prototype;
48
+ const mixedProto = Object.create(base);
49
+ const visitedProtos = protoChain(base);
50
+ for (let prototype of ingredients) {
51
+ let protos = protoChain(prototype);
52
+ for (let i = protos.length - 1; i >= 0; i--) {
53
+ let newProto = protos[i];
54
+ if (visitedProtos.indexOf(newProto) === -1) {
55
+ copyProps(mixedProto, newProto, ["constructor", ...exclude]);
56
+ visitedProtos.push(newProto);
57
+ }
58
+ }
59
+ }
60
+ mixedProto.constructor = constructor;
61
+ return mixedProto;
62
+ };
63
+ var unique = (arr) => arr.filter((e, i) => arr.indexOf(e) == i);
64
+ /**
65
+ * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient
66
+ * prototypes is required.
67
+ */
68
+ var getIngredientWithProp = (prop, ingredients) => {
69
+ const protoChains = ingredients.map((ingredient) => protoChain(ingredient));
70
+ let protoDepth = 0;
71
+ let protosAreLeftToSearch = true;
72
+ while (protosAreLeftToSearch) {
73
+ protosAreLeftToSearch = false;
74
+ for (let i = ingredients.length - 1; i >= 0; i--) {
75
+ const searchTarget = protoChains[i][protoDepth];
76
+ if (searchTarget !== void 0 && searchTarget !== null) {
77
+ protosAreLeftToSearch = true;
78
+ if (Object.getOwnPropertyDescriptor(searchTarget, prop) != void 0) return protoChains[i][0];
79
+ }
80
+ }
81
+ protoDepth++;
82
+ }
83
+ };
84
+ /**
85
+ * "Mixes" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit
86
+ * downstream of an existing prototype chain. Note that "properties" cannot be added, deleted, or modified.
87
+ */
88
+ var proxyMix = (ingredients, prototype = Object.prototype) => new Proxy({}, {
89
+ getPrototypeOf() {
90
+ return prototype;
91
+ },
92
+ setPrototypeOf() {
93
+ throw Error("Cannot set prototype of Proxies created by ts-mixer");
94
+ },
95
+ getOwnPropertyDescriptor(_, prop) {
96
+ return Object.getOwnPropertyDescriptor(getIngredientWithProp(prop, ingredients) || {}, prop);
97
+ },
98
+ defineProperty() {
99
+ throw new Error("Cannot define new properties on Proxies created by ts-mixer");
100
+ },
101
+ has(_, prop) {
102
+ return getIngredientWithProp(prop, ingredients) !== void 0 || prototype[prop] !== void 0;
103
+ },
104
+ get(_, prop) {
105
+ return (getIngredientWithProp(prop, ingredients) || prototype)[prop];
106
+ },
107
+ set(_, prop, val) {
108
+ const ingredientWithProp = getIngredientWithProp(prop, ingredients);
109
+ if (ingredientWithProp === void 0) throw new Error("Cannot set new properties on Proxies created by ts-mixer");
110
+ ingredientWithProp[prop] = val;
111
+ return true;
112
+ },
113
+ deleteProperty() {
114
+ throw new Error("Cannot delete properties on Proxies created by ts-mixer");
115
+ },
116
+ ownKeys() {
117
+ return ingredients.map(Object.getOwnPropertyNames).reduce((prev, curr) => curr.concat(prev.filter((key) => curr.indexOf(key) < 0)));
118
+ }
119
+ });
120
+ /**
121
+ * Creates a new proxy-prototype object that is a "soft" mixture of the given prototypes. The mixing is achieved by
122
+ * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any
123
+ * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.
124
+ */
125
+ var softMixProtos = (ingredients, constructor) => proxyMix([...ingredients, { constructor }]);
126
+ var settings = {
127
+ initFunction: null,
128
+ staticsStrategy: "copy",
129
+ prototypeStrategy: "copy",
130
+ decoratorInheritance: "deep"
131
+ };
132
+ var mixins = /* @__PURE__ */ new WeakMap();
133
+ var getMixinsForClass = (clazz) => mixins.get(clazz);
134
+ var registerMixins = (mixedClass, constituents) => mixins.set(mixedClass, constituents);
135
+ var mergeObjectsOfDecorators = (o1, o2) => {
136
+ var _a, _b;
137
+ const allKeys = unique([...Object.getOwnPropertyNames(o1), ...Object.getOwnPropertyNames(o2)]);
138
+ const mergedObject = {};
139
+ for (let key of allKeys) mergedObject[key] = unique([...(_a = o1 === null || o1 === void 0 ? void 0 : o1[key]) !== null && _a !== void 0 ? _a : [], ...(_b = o2 === null || o2 === void 0 ? void 0 : o2[key]) !== null && _b !== void 0 ? _b : []]);
140
+ return mergedObject;
141
+ };
142
+ var mergePropertyAndMethodDecorators = (d1, d2) => {
143
+ var _a, _b, _c, _d;
144
+ return {
145
+ property: mergeObjectsOfDecorators((_a = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a !== void 0 ? _a : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),
146
+ method: mergeObjectsOfDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {})
147
+ };
148
+ };
149
+ var mergeDecorators = (d1, d2) => {
150
+ var _a, _b, _c, _d, _e, _f;
151
+ return {
152
+ class: unique([...(_a = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a !== void 0 ? _a : [], ...(_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : []]),
153
+ static: mergePropertyAndMethodDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),
154
+ instance: mergePropertyAndMethodDecorators((_e = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e !== void 0 ? _e : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {})
155
+ };
156
+ };
157
+ var decorators = /* @__PURE__ */ new Map();
158
+ var findAllConstituentClasses = (...classes) => {
159
+ var _a;
160
+ const allClasses = /* @__PURE__ */ new Set();
161
+ const frontier = new Set([...classes]);
162
+ while (frontier.size > 0) for (let clazz of frontier) {
163
+ const protoChainClasses = protoChain(clazz.prototype).map((proto) => proto.constructor);
164
+ const mixinClasses = (_a = getMixinsForClass(clazz)) !== null && _a !== void 0 ? _a : [];
165
+ const newClasses = [...protoChainClasses, ...mixinClasses].filter((c) => !allClasses.has(c));
166
+ for (let newClass of newClasses) frontier.add(newClass);
167
+ allClasses.add(clazz);
168
+ frontier.delete(clazz);
169
+ }
170
+ return [...allClasses];
171
+ };
172
+ var deepDecoratorSearch = (...classes) => {
173
+ const decoratorsForClassChain = findAllConstituentClasses(...classes).map((clazz) => decorators.get(clazz)).filter((decorators) => !!decorators);
174
+ if (decoratorsForClassChain.length == 0) return {};
175
+ if (decoratorsForClassChain.length == 1) return decoratorsForClassChain[0];
176
+ return decoratorsForClassChain.reduce((d1, d2) => mergeDecorators(d1, d2));
177
+ };
178
+ var directDecoratorSearch = (...classes) => {
179
+ const classDecorators = classes.map((clazz) => getDecoratorsForClass(clazz));
180
+ if (classDecorators.length === 0) return {};
181
+ if (classDecorators.length === 1) return classDecorators[0];
182
+ return classDecorators.reduce((d1, d2) => mergeDecorators(d1, d2));
183
+ };
184
+ var getDecoratorsForClass = (clazz) => {
185
+ let decoratorsForClass = decorators.get(clazz);
186
+ if (!decoratorsForClass) {
187
+ decoratorsForClass = {};
188
+ decorators.set(clazz, decoratorsForClass);
189
+ }
190
+ return decoratorsForClass;
191
+ };
192
+ function Mixin(...constructors) {
193
+ var _a, _b, _c;
194
+ const prototypes = constructors.map((constructor) => constructor.prototype);
195
+ const initFunctionName = settings.initFunction;
196
+ if (initFunctionName !== null) {
197
+ const initFunctions = prototypes.map((proto) => proto[initFunctionName]).filter((func) => typeof func === "function");
198
+ const combinedInitFunction = function(...args) {
199
+ for (let initFunction of initFunctions) initFunction.apply(this, args);
200
+ };
201
+ const extraProto = { [initFunctionName]: combinedInitFunction };
202
+ prototypes.push(extraProto);
203
+ }
204
+ function MixedClass(...args) {
205
+ for (const constructor of constructors) copyProps(this, new constructor(...args));
206
+ if (initFunctionName !== null && typeof this[initFunctionName] === "function") this[initFunctionName].apply(this, args);
207
+ }
208
+ MixedClass.prototype = settings.prototypeStrategy === "copy" ? hardMixProtos(prototypes, MixedClass) : softMixProtos(prototypes, MixedClass);
209
+ Object.setPrototypeOf(MixedClass, settings.staticsStrategy === "copy" ? hardMixProtos(constructors, null, ["prototype"]) : proxyMix(constructors, Function.prototype));
210
+ let DecoratedMixedClass = MixedClass;
211
+ if (settings.decoratorInheritance !== "none") {
212
+ const classDecorators = settings.decoratorInheritance === "deep" ? deepDecoratorSearch(...constructors) : directDecoratorSearch(...constructors);
213
+ for (let decorator of (_a = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.class) !== null && _a !== void 0 ? _a : []) {
214
+ const result = decorator(DecoratedMixedClass);
215
+ if (result) DecoratedMixedClass = result;
216
+ }
217
+ applyPropAndMethodDecorators((_b = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.static) !== null && _b !== void 0 ? _b : {}, DecoratedMixedClass);
218
+ applyPropAndMethodDecorators((_c = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.instance) !== null && _c !== void 0 ? _c : {}, DecoratedMixedClass.prototype);
219
+ }
220
+ registerMixins(DecoratedMixedClass, constructors);
221
+ return DecoratedMixedClass;
222
+ }
223
+ var applyPropAndMethodDecorators = (propAndMethodDecorators, target) => {
224
+ const propDecorators = propAndMethodDecorators.property;
225
+ const methodDecorators = propAndMethodDecorators.method;
226
+ if (propDecorators) for (let key in propDecorators) for (let decorator of propDecorators[key]) decorator(target, key);
227
+ if (methodDecorators) for (let key in methodDecorators) for (let decorator of methodDecorators[key]) decorator(target, key, Object.getOwnPropertyDescriptor(target, key));
228
+ };
229
+ //#endregion
230
+ //#region src/events.ts
231
+ var EventMixin = class {
232
+ _listeners = {};
233
+ on(event, handler) {
234
+ if (Array.isArray(event)) {
235
+ for (const e of event) this.on(e, handler);
236
+ return this;
237
+ }
238
+ this._listeners[event] ??= [];
239
+ this._listeners[event].push(handler);
240
+ return this;
241
+ }
242
+ once(event, handler) {
243
+ handler.once = true;
244
+ return this.on(event, handler);
245
+ }
246
+ off(event, handler) {
247
+ if (handler) {
248
+ this._listeners[event] = this.listeners(event).filter((listener) => listener !== handler);
249
+ return this;
250
+ }
251
+ delete this._listeners[event];
252
+ return this;
253
+ }
254
+ trigger(event, ...args) {
255
+ if (Array.isArray(event)) {
256
+ for (const e of event) this.trigger(e);
257
+ return this;
258
+ }
259
+ for (const listener of this.listeners(event)) listener(...args);
260
+ this._listeners[event] = this.listeners(event).filter((listener) => listener?.once !== true);
261
+ return this;
262
+ }
263
+ listeners(event) {
264
+ return this._listeners[event] === void 0 ? [] : this._listeners[event];
265
+ }
266
+ };
267
+ //#endregion
268
+ export { Mixin as n, EventMixin as t };
269
+
270
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","names":[],"sources":["../../../../../../node_modules/ts-mixer/dist/esm/index.js","../../src/events.ts"],"sourcesContent":["/**\n * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives\n * the option to exclude properties by name.\n */\nconst copyProps = (dest, src, exclude = []) => {\n const props = Object.getOwnPropertyDescriptors(src);\n for (let prop of exclude)\n delete props[prop];\n Object.defineProperties(dest, props);\n};\n/**\n * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will\n * be closest to farthest in the chain.\n */\nconst protoChain = (obj, currentChain = [obj]) => {\n const proto = Object.getPrototypeOf(obj);\n if (proto === null)\n return currentChain;\n return protoChain(proto, [...currentChain, proto]);\n};\n/**\n * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated\n * objects, this function should return Object.prototype.\n */\nconst nearestCommonProto = (...objs) => {\n if (objs.length === 0)\n return undefined;\n let commonProto = undefined;\n const protoChains = objs.map(obj => protoChain(obj));\n while (protoChains.every(protoChain => protoChain.length > 0)) {\n const protos = protoChains.map(protoChain => protoChain.pop());\n const potentialCommonProto = protos[0];\n if (protos.every(proto => proto === potentialCommonProto))\n commonProto = potentialCommonProto;\n else\n break;\n }\n return commonProto;\n};\n/**\n * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first\n * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods\n * downstream of this prototype (ONLY downstream) are copied into the new object.\n *\n * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as\n * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may\n * want to use that instead.\n */\nconst hardMixProtos = (ingredients, constructor, exclude = []) => {\n var _a;\n const base = (_a = nearestCommonProto(...ingredients)) !== null && _a !== void 0 ? _a : Object.prototype;\n const mixedProto = Object.create(base);\n // Keeps track of prototypes we've already visited to avoid copying the same properties multiple times. We init the\n // list with the proto chain below the nearest common ancestor because we don't want any of those methods mixed in\n // when they will already be accessible via prototype access.\n const visitedProtos = protoChain(base);\n for (let prototype of ingredients) {\n let protos = protoChain(prototype);\n // Apply the prototype chain in reverse order so that old methods don't override newer ones.\n for (let i = protos.length - 1; i >= 0; i--) {\n let newProto = protos[i];\n if (visitedProtos.indexOf(newProto) === -1) {\n copyProps(mixedProto, newProto, ['constructor', ...exclude]);\n visitedProtos.push(newProto);\n }\n }\n }\n mixedProto.constructor = constructor;\n return mixedProto;\n};\nconst unique = (arr) => arr.filter((e, i) => arr.indexOf(e) == i);\n\n/**\n * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient\n * prototypes is required.\n */\nconst getIngredientWithProp = (prop, ingredients) => {\n const protoChains = ingredients.map(ingredient => protoChain(ingredient));\n // since we search breadth-first, we need to keep track of our depth in the prototype chains\n let protoDepth = 0;\n // not all prototype chains are the same depth, so this remains true as long as at least one of the ingredients'\n // prototype chains has an object at this depth\n let protosAreLeftToSearch = true;\n while (protosAreLeftToSearch) {\n // with the start of each horizontal slice, we assume this is the one that's deeper than any of the proto chains\n protosAreLeftToSearch = false;\n // scan through the ingredients right to left\n for (let i = ingredients.length - 1; i >= 0; i--) {\n const searchTarget = protoChains[i][protoDepth];\n if (searchTarget !== undefined && searchTarget !== null) {\n // if we find something, this is proof that this horizontal slice potentially more objects to search\n protosAreLeftToSearch = true;\n // eureka, we found it\n if (Object.getOwnPropertyDescriptor(searchTarget, prop) != undefined) {\n return protoChains[i][0];\n }\n }\n }\n protoDepth++;\n }\n return undefined;\n};\n/**\n * \"Mixes\" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit\n * downstream of an existing prototype chain. Note that \"properties\" cannot be added, deleted, or modified.\n */\nconst proxyMix = (ingredients, prototype = Object.prototype) => new Proxy({}, {\n getPrototypeOf() {\n return prototype;\n },\n setPrototypeOf() {\n throw Error('Cannot set prototype of Proxies created by ts-mixer');\n },\n getOwnPropertyDescriptor(_, prop) {\n return Object.getOwnPropertyDescriptor(getIngredientWithProp(prop, ingredients) || {}, prop);\n },\n defineProperty() {\n throw new Error('Cannot define new properties on Proxies created by ts-mixer');\n },\n has(_, prop) {\n return getIngredientWithProp(prop, ingredients) !== undefined || prototype[prop] !== undefined;\n },\n get(_, prop) {\n return (getIngredientWithProp(prop, ingredients) || prototype)[prop];\n },\n set(_, prop, val) {\n const ingredientWithProp = getIngredientWithProp(prop, ingredients);\n if (ingredientWithProp === undefined)\n throw new Error('Cannot set new properties on Proxies created by ts-mixer');\n ingredientWithProp[prop] = val;\n return true;\n },\n deleteProperty() {\n throw new Error('Cannot delete properties on Proxies created by ts-mixer');\n },\n ownKeys() {\n return ingredients\n .map(Object.getOwnPropertyNames)\n .reduce((prev, curr) => curr.concat(prev.filter(key => curr.indexOf(key) < 0)));\n },\n});\n/**\n * Creates a new proxy-prototype object that is a \"soft\" mixture of the given prototypes. The mixing is achieved by\n * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any\n * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.\n */\nconst softMixProtos = (ingredients, constructor) => proxyMix([...ingredients, { constructor }]);\n\nconst settings = {\n initFunction: null,\n staticsStrategy: 'copy',\n prototypeStrategy: 'copy',\n decoratorInheritance: 'deep',\n};\n\n// Keeps track of constituent classes for every mixin class created by ts-mixer.\nconst mixins = new WeakMap();\nconst getMixinsForClass = (clazz) => mixins.get(clazz);\nconst registerMixins = (mixedClass, constituents) => mixins.set(mixedClass, constituents);\nconst hasMixin = (instance, mixin) => {\n if (instance instanceof mixin)\n return true;\n const constructor = instance.constructor;\n const visited = new Set();\n let frontier = new Set();\n frontier.add(constructor);\n while (frontier.size > 0) {\n // check if the frontier has the mixin we're looking for. if not, we can say we visited every item in the frontier\n if (frontier.has(mixin))\n return true;\n frontier.forEach((item) => visited.add(item));\n // build a new frontier based on the associated mixin classes and prototype chains of each frontier item\n const newFrontier = new Set();\n frontier.forEach((item) => {\n var _a;\n const itemConstituents = (_a = mixins.get(item)) !== null && _a !== void 0 ? _a : protoChain(item.prototype)\n .map((proto) => proto.constructor)\n .filter((item) => item !== null);\n if (itemConstituents)\n itemConstituents.forEach((constituent) => {\n if (!visited.has(constituent) && !frontier.has(constituent))\n newFrontier.add(constituent);\n });\n });\n // we have a new frontier, now search again\n frontier = newFrontier;\n }\n // if we get here, we couldn't find the mixin anywhere in the prototype chain or associated mixin classes\n return false;\n};\n\nconst mergeObjectsOfDecorators = (o1, o2) => {\n var _a, _b;\n const allKeys = unique([...Object.getOwnPropertyNames(o1), ...Object.getOwnPropertyNames(o2)]);\n const mergedObject = {};\n for (let key of allKeys)\n mergedObject[key] = unique([...((_a = o1 === null || o1 === void 0 ? void 0 : o1[key]) !== null && _a !== void 0 ? _a : []), ...((_b = o2 === null || o2 === void 0 ? void 0 : o2[key]) !== null && _b !== void 0 ? _b : [])]);\n return mergedObject;\n};\nconst mergePropertyAndMethodDecorators = (d1, d2) => {\n var _a, _b, _c, _d;\n return ({\n property: mergeObjectsOfDecorators((_a = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a !== void 0 ? _a : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),\n method: mergeObjectsOfDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {}),\n });\n};\nconst mergeDecorators = (d1, d2) => {\n var _a, _b, _c, _d, _e, _f;\n return ({\n class: unique([...(_a = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a !== void 0 ? _a : [], ...(_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : []]),\n static: mergePropertyAndMethodDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),\n instance: mergePropertyAndMethodDecorators((_e = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e !== void 0 ? _e : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {}),\n });\n};\nconst decorators = new Map();\nconst findAllConstituentClasses = (...classes) => {\n var _a;\n const allClasses = new Set();\n const frontier = new Set([...classes]);\n while (frontier.size > 0) {\n for (let clazz of frontier) {\n const protoChainClasses = protoChain(clazz.prototype).map(proto => proto.constructor);\n const mixinClasses = (_a = getMixinsForClass(clazz)) !== null && _a !== void 0 ? _a : [];\n const potentiallyNewClasses = [...protoChainClasses, ...mixinClasses];\n const newClasses = potentiallyNewClasses.filter(c => !allClasses.has(c));\n for (let newClass of newClasses)\n frontier.add(newClass);\n allClasses.add(clazz);\n frontier.delete(clazz);\n }\n }\n return [...allClasses];\n};\nconst deepDecoratorSearch = (...classes) => {\n const decoratorsForClassChain = findAllConstituentClasses(...classes)\n .map(clazz => decorators.get(clazz))\n .filter(decorators => !!decorators);\n if (decoratorsForClassChain.length == 0)\n return {};\n if (decoratorsForClassChain.length == 1)\n return decoratorsForClassChain[0];\n return decoratorsForClassChain.reduce((d1, d2) => mergeDecorators(d1, d2));\n};\nconst directDecoratorSearch = (...classes) => {\n const classDecorators = classes.map(clazz => getDecoratorsForClass(clazz));\n if (classDecorators.length === 0)\n return {};\n if (classDecorators.length === 1)\n return classDecorators[0];\n return classDecorators.reduce((d1, d2) => mergeDecorators(d1, d2));\n};\nconst getDecoratorsForClass = (clazz) => {\n let decoratorsForClass = decorators.get(clazz);\n if (!decoratorsForClass) {\n decoratorsForClass = {};\n decorators.set(clazz, decoratorsForClass);\n }\n return decoratorsForClass;\n};\nconst decorateClass = (decorator) => ((clazz) => {\n const decoratorsForClass = getDecoratorsForClass(clazz);\n let classDecorators = decoratorsForClass.class;\n if (!classDecorators) {\n classDecorators = [];\n decoratorsForClass.class = classDecorators;\n }\n classDecorators.push(decorator);\n return decorator(clazz);\n});\nconst decorateMember = (decorator) => ((object, key, ...otherArgs) => {\n var _a, _b, _c;\n const decoratorTargetType = typeof object === 'function' ? 'static' : 'instance';\n const decoratorType = typeof object[key] === 'function' ? 'method' : 'property';\n const clazz = decoratorTargetType === 'static' ? object : object.constructor;\n const decoratorsForClass = getDecoratorsForClass(clazz);\n const decoratorsForTargetType = (_a = decoratorsForClass === null || decoratorsForClass === void 0 ? void 0 : decoratorsForClass[decoratorTargetType]) !== null && _a !== void 0 ? _a : {};\n decoratorsForClass[decoratorTargetType] = decoratorsForTargetType;\n let decoratorsForType = (_b = decoratorsForTargetType === null || decoratorsForTargetType === void 0 ? void 0 : decoratorsForTargetType[decoratorType]) !== null && _b !== void 0 ? _b : {};\n decoratorsForTargetType[decoratorType] = decoratorsForType;\n let decoratorsForKey = (_c = decoratorsForType === null || decoratorsForType === void 0 ? void 0 : decoratorsForType[key]) !== null && _c !== void 0 ? _c : [];\n decoratorsForType[key] = decoratorsForKey;\n // @ts-ignore: array is type `A[] | B[]` and item is type `A | B`, so technically a type error, but it's fine\n decoratorsForKey.push(decorator);\n // @ts-ignore\n return decorator(object, key, ...otherArgs);\n});\nconst decorate = (decorator) => ((...args) => {\n if (args.length === 1)\n return decorateClass(decorator)(args[0]);\n return decorateMember(decorator)(...args);\n});\n\nfunction Mixin(...constructors) {\n var _a, _b, _c;\n const prototypes = constructors.map(constructor => constructor.prototype);\n // Here we gather up the init functions of the ingredient prototypes, combine them into one init function, and\n // attach it to the mixed class prototype. The reason we do this is because we want the init functions to mix\n // similarly to constructors -- not methods, which simply override each other.\n const initFunctionName = settings.initFunction;\n if (initFunctionName !== null) {\n const initFunctions = prototypes\n .map(proto => proto[initFunctionName])\n .filter(func => typeof func === 'function');\n const combinedInitFunction = function (...args) {\n for (let initFunction of initFunctions)\n initFunction.apply(this, args);\n };\n const extraProto = { [initFunctionName]: combinedInitFunction };\n prototypes.push(extraProto);\n }\n function MixedClass(...args) {\n for (const constructor of constructors)\n // @ts-ignore: potentially abstract class\n copyProps(this, new constructor(...args));\n if (initFunctionName !== null && typeof this[initFunctionName] === 'function')\n this[initFunctionName].apply(this, args);\n }\n MixedClass.prototype = settings.prototypeStrategy === 'copy'\n ? hardMixProtos(prototypes, MixedClass)\n : softMixProtos(prototypes, MixedClass);\n Object.setPrototypeOf(MixedClass, settings.staticsStrategy === 'copy'\n ? hardMixProtos(constructors, null, ['prototype'])\n : proxyMix(constructors, Function.prototype));\n let DecoratedMixedClass = MixedClass;\n if (settings.decoratorInheritance !== 'none') {\n const classDecorators = settings.decoratorInheritance === 'deep'\n ? deepDecoratorSearch(...constructors)\n : directDecoratorSearch(...constructors);\n for (let decorator of (_a = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.class) !== null && _a !== void 0 ? _a : []) {\n const result = decorator(DecoratedMixedClass);\n if (result) {\n DecoratedMixedClass = result;\n }\n }\n applyPropAndMethodDecorators((_b = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.static) !== null && _b !== void 0 ? _b : {}, DecoratedMixedClass);\n applyPropAndMethodDecorators((_c = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.instance) !== null && _c !== void 0 ? _c : {}, DecoratedMixedClass.prototype);\n }\n registerMixins(DecoratedMixedClass, constructors);\n return DecoratedMixedClass;\n}\nconst applyPropAndMethodDecorators = (propAndMethodDecorators, target) => {\n const propDecorators = propAndMethodDecorators.property;\n const methodDecorators = propAndMethodDecorators.method;\n if (propDecorators)\n for (let key in propDecorators)\n for (let decorator of propDecorators[key])\n decorator(target, key);\n if (methodDecorators)\n for (let key in methodDecorators)\n for (let decorator of methodDecorators[key])\n decorator(target, key, Object.getOwnPropertyDescriptor(target, key));\n};\n/**\n * A decorator version of the `Mixin` function. You'll want to use this instead of `Mixin` for mixing generic classes.\n */\nconst mix = (...ingredients) => decoratedClass => {\n // @ts-ignore\n const mixedClass = Mixin(...ingredients.concat([decoratedClass]));\n Object.defineProperty(mixedClass, 'name', {\n value: decoratedClass.name,\n writable: false,\n });\n return mixedClass;\n};\n\nexport { Mixin, decorate, hasMixin, mix, settings };\n","export abstract class EventMixin implements EventAwareInterface {\n _listeners: Record<string, EventHandler[]> = {};\n\n on<T extends any[]>(event: string, handler: EventHandler<T>): this;\n on(event: string | string[], handler: EventHandler): this;\n on(event: string | string[], handler: EventHandler): this {\n if (Array.isArray(event)) {\n for (const e of event) {\n this.on(e, handler);\n }\n return this;\n }\n\n this._listeners[event] ??= [];\n\n this._listeners[event].push(handler);\n\n return this;\n }\n\n once<T extends any[]>(event: string, handler: EventHandler<T>): this;\n once(event: string | string[], handler: EventHandler): this;\n once(event: string | string[], handler: EventHandler): this {\n handler.once = true;\n return this.on(event, handler);\n }\n\n off(event: string, handler?: EventHandler): this {\n if (handler) {\n this._listeners[event] = this.listeners(event).filter((listener) => listener !== handler);\n return this;\n }\n\n delete this._listeners[event];\n\n return this;\n }\n\n trigger<T extends any[]>(event: string, ...args: T): this;\n trigger(event: string[], ...args: any[]): this;\n trigger(event: string | string[], ...args: any[]): this {\n if (Array.isArray(event)) {\n for (const e of event) {\n this.trigger(e);\n }\n return this;\n }\n\n for (const listener of this.listeners(event)) {\n listener(...args);\n }\n\n // Remove once\n this._listeners[event] = this.listeners(event).filter((listener) => listener?.once !== true);\n\n return this;\n }\n\n listeners(event: string): EventHandler[] {\n return this._listeners[event] === undefined ? [] : this._listeners[event];\n }\n}\n\n// export class EventBus extends Mixin(EventMixin) {\n// }\n\nexport type EventHandler<T extends any[] = any[]> = ((...event: T) => void) & { once?: boolean };\n\nexport interface EventAwareInterface {\n on<T extends any[]>(event: string, handler: EventHandler<T>): this;\n on(event: string | string[], handler: EventHandler): this;\n\n once<T extends any[]>(event: string, handler: EventHandler<T>): this;\n once(event: string | string[], handler: EventHandler): this;\n\n off(event: string, handler?: EventHandler): this;\n\n trigger<T extends any[]>(event: string, ...args: T): this;\n trigger(event: string[], ...args: any[]): this;\n\n listeners(event: string): EventHandler[];\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAIA,IAAM,aAAa,MAAM,KAAK,UAAU,EAAE,KAAK;CAC3C,MAAM,QAAQ,OAAO,0BAA0B,IAAI;AACnD,MAAK,I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