@mrts/soltw 0.3.21 → 0.3.23

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 (50) hide show
  1. package/dist/index.d.ts +125 -10
  2. package/dist/index.js +3730 -10
  3. package/dist/index.jsx +3648 -10
  4. package/package.json +2 -2
  5. package/dist/Block.d.ts +0 -13
  6. package/dist/Block.js +0 -33
  7. package/dist/Block.jsx +0 -24
  8. package/dist/items/IdLabel.d.ts +0 -15
  9. package/dist/items/IdLabel.js +0 -19
  10. package/dist/items/IdLabel.jsx +0 -19
  11. package/dist/items/Item.d.ts +0 -25
  12. package/dist/items/Item.js +0 -79
  13. package/dist/items/Item.jsx +0 -64
  14. package/dist/items/ItemGroup.d.ts +0 -24
  15. package/dist/items/ItemGroup.js +0 -87
  16. package/dist/items/ItemGroup.jsx +0 -64
  17. package/dist/node_modules/solid-js/dist/solid.js +0 -677
  18. package/dist/node_modules/solid-js/dist/solid.jsx +0 -654
  19. package/dist/node_modules/solid-js/web/dist/web.js +0 -694
  20. package/dist/node_modules/solid-js/web/dist/web.jsx +0 -678
  21. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1893
  22. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.jsx +0 -1893
  23. package/dist/packages/common/dist/index.js +0 -4
  24. package/dist/packages/common/dist/index.jsx +0 -4
  25. package/dist/packages/common/dist/messages/index.js +0 -1
  26. package/dist/packages/common/dist/messages/index.jsx +0 -1
  27. package/dist/packages/common/dist/messages/logMessages.js +0 -14
  28. package/dist/packages/common/dist/messages/logMessages.jsx +0 -14
  29. package/dist/packages/common/dist/strings/index.js +0 -1
  30. package/dist/packages/common/dist/strings/index.jsx +0 -1
  31. package/dist/packages/common/dist/strings/tokenize.js +0 -47
  32. package/dist/packages/common/dist/strings/tokenize.jsx +0 -47
  33. package/dist/soltw.d.ts +0 -7
  34. package/dist/soltw.js +0 -10
  35. package/dist/soltw.jsx +0 -7
  36. package/dist/stylers/SVTStyler.d.ts +0 -32
  37. package/dist/stylers/SVTStyler.js +0 -65
  38. package/dist/stylers/SVTStyler.jsx +0 -65
  39. package/dist/stylers/Stylers.d.ts +0 -12
  40. package/dist/stylers/Stylers.js +0 -23
  41. package/dist/stylers/Stylers.jsx +0 -23
  42. package/dist/stylers/base.styler.d.ts +0 -6
  43. package/dist/stylers/base.styler.js +0 -71
  44. package/dist/stylers/base.styler.jsx +0 -71
  45. package/dist/stylers/index.js +0 -4
  46. package/dist/stylers/index.jsx +0 -4
  47. package/dist/stylers/normalizers.d.ts +0 -6
  48. package/dist/stylers/normalizers.js +0 -32
  49. package/dist/stylers/normalizers.jsx +0 -32
  50. package/dist/stylers/types.d.ts +0 -14
package/dist/index.jsx CHANGED
@@ -1,12 +1,3650 @@
1
- import { buildIdLabel } from "./items/IdLabel.jsx";
2
- import { exclusiveTagsNormalize, mainTagNormalize, twMergeNormalize } from "./stylers/normalizers.jsx";
3
- import { SVTStyler, tagRuleMatches } from "./stylers/SVTStyler.jsx";
4
- import { baseStyler } from "./stylers/base.styler.jsx";
5
- import { Stylers } from "./stylers/Stylers.jsx";
6
- import { Item } from "./items/Item.jsx";
7
- import "./stylers/index.jsx";
8
- import { Block } from "./Block.jsx";
9
- import { ItemGroup } from "./items/ItemGroup.jsx";
10
- import { SolTw } from "./soltw.jsx";
1
+ //#region src/items/IdLabel.ts
2
+ function buildIdLabel(arg) {
3
+ if (typeof arg == "string") return {
4
+ id: arg,
5
+ label: arg
6
+ };
7
+ else if (Array.isArray(arg)) return {
8
+ id: arg[0],
9
+ label: arg[1]
10
+ };
11
+ else {
12
+ const r = Object.assign({}, arg);
13
+ if (r.label == void 0) r["label"] = r.id;
14
+ return r;
15
+ }
16
+ }
11
17
 
18
+ //#endregion
19
+ //#region ../../node_modules/solid-js/dist/solid.js
20
+ const sharedConfig = {
21
+ context: void 0,
22
+ registry: void 0,
23
+ effects: void 0,
24
+ done: false,
25
+ getContextId() {
26
+ return getContextId(this.context.count);
27
+ },
28
+ getNextContextId() {
29
+ return getContextId(this.context.count++);
30
+ }
31
+ };
32
+ function getContextId(count) {
33
+ const num = String(count), len = num.length - 1;
34
+ return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : "") + num;
35
+ }
36
+ function setHydrateContext(context) {
37
+ sharedConfig.context = context;
38
+ }
39
+ const equalFn = (a, b) => a === b;
40
+ const $PROXY = Symbol("solid-proxy");
41
+ const SUPPORTS_PROXY = typeof Proxy === "function";
42
+ const $TRACK = Symbol("solid-track");
43
+ const signalOptions = { equals: equalFn };
44
+ let ERROR = null;
45
+ let runEffects = runQueue;
46
+ const STALE = 1;
47
+ const PENDING = 2;
48
+ const UNOWNED = {
49
+ owned: null,
50
+ cleanups: null,
51
+ context: null,
52
+ owner: null
53
+ };
54
+ var Owner = null;
55
+ let Transition = null;
56
+ let Scheduler = null;
57
+ let ExternalSourceConfig = null;
58
+ let Listener = null;
59
+ let Updates = null;
60
+ let Effects = null;
61
+ let ExecCount = 0;
62
+ function createRoot(fn, detachedOwner) {
63
+ const listener = Listener, owner = Owner, unowned = fn.length === 0, current = detachedOwner === void 0 ? owner : detachedOwner, root = unowned ? UNOWNED : {
64
+ owned: null,
65
+ cleanups: null,
66
+ context: current ? current.context : null,
67
+ owner: current
68
+ }, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
69
+ Owner = root;
70
+ Listener = null;
71
+ try {
72
+ return runUpdates(updateFn, true);
73
+ } finally {
74
+ Listener = listener;
75
+ Owner = owner;
76
+ }
77
+ }
78
+ function createSignal(value, options) {
79
+ options = options ? Object.assign({}, signalOptions, options) : signalOptions;
80
+ const s = {
81
+ value,
82
+ observers: null,
83
+ observerSlots: null,
84
+ comparator: options.equals || void 0
85
+ };
86
+ const setter = (value$1) => {
87
+ if (typeof value$1 === "function") if (Transition && Transition.running && Transition.sources.has(s)) value$1 = value$1(s.tValue);
88
+ else value$1 = value$1(s.value);
89
+ return writeSignal(s, value$1);
90
+ };
91
+ return [readSignal.bind(s), setter];
92
+ }
93
+ function createRenderEffect(fn, value, options) {
94
+ const c = createComputation(fn, value, false, STALE);
95
+ if (Scheduler && Transition && Transition.running) Updates.push(c);
96
+ else updateComputation(c);
97
+ }
98
+ function createEffect(fn, value, options) {
99
+ runEffects = runUserEffects;
100
+ const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
101
+ if (s) c.suspense = s;
102
+ if (!options || !options.render) c.user = true;
103
+ Effects ? Effects.push(c) : updateComputation(c);
104
+ }
105
+ function createMemo(fn, value, options) {
106
+ options = options ? Object.assign({}, signalOptions, options) : signalOptions;
107
+ const c = createComputation(fn, value, true, 0);
108
+ c.observers = null;
109
+ c.observerSlots = null;
110
+ c.comparator = options.equals || void 0;
111
+ if (Scheduler && Transition && Transition.running) {
112
+ c.tState = STALE;
113
+ Updates.push(c);
114
+ } else updateComputation(c);
115
+ return readSignal.bind(c);
116
+ }
117
+ function untrack(fn) {
118
+ if (!ExternalSourceConfig && Listener === null) return fn();
119
+ const listener = Listener;
120
+ Listener = null;
121
+ try {
122
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
123
+ return fn();
124
+ } finally {
125
+ Listener = listener;
126
+ }
127
+ }
128
+ function onCleanup(fn) {
129
+ if (Owner === null);
130
+ else if (Owner.cleanups === null) Owner.cleanups = [fn];
131
+ else Owner.cleanups.push(fn);
132
+ return fn;
133
+ }
134
+ function startTransition(fn) {
135
+ if (Transition && Transition.running) {
136
+ fn();
137
+ return Transition.done;
138
+ }
139
+ const l = Listener;
140
+ const o = Owner;
141
+ return Promise.resolve().then(() => {
142
+ Listener = l;
143
+ Owner = o;
144
+ let t;
145
+ if (Scheduler || SuspenseContext) {
146
+ t = Transition || (Transition = {
147
+ sources: /* @__PURE__ */ new Set(),
148
+ effects: [],
149
+ promises: /* @__PURE__ */ new Set(),
150
+ disposed: /* @__PURE__ */ new Set(),
151
+ queue: /* @__PURE__ */ new Set(),
152
+ running: true
153
+ });
154
+ t.done || (t.done = new Promise((res) => t.resolve = res));
155
+ t.running = true;
156
+ }
157
+ runUpdates(fn, false);
158
+ Listener = Owner = null;
159
+ return t ? t.done : void 0;
160
+ });
161
+ }
162
+ const [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
163
+ function useContext(context) {
164
+ let value;
165
+ return Owner && Owner.context && (value = Owner.context[context.id]) !== void 0 ? value : context.defaultValue;
166
+ }
167
+ let SuspenseContext;
168
+ function readSignal() {
169
+ const runningTransition = Transition && Transition.running;
170
+ if (this.sources && (runningTransition ? this.tState : this.state)) if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
171
+ else {
172
+ const updates = Updates;
173
+ Updates = null;
174
+ runUpdates(() => lookUpstream(this), false);
175
+ Updates = updates;
176
+ }
177
+ if (Listener) {
178
+ const sSlot = this.observers ? this.observers.length : 0;
179
+ if (!Listener.sources) {
180
+ Listener.sources = [this];
181
+ Listener.sourceSlots = [sSlot];
182
+ } else {
183
+ Listener.sources.push(this);
184
+ Listener.sourceSlots.push(sSlot);
185
+ }
186
+ if (!this.observers) {
187
+ this.observers = [Listener];
188
+ this.observerSlots = [Listener.sources.length - 1];
189
+ } else {
190
+ this.observers.push(Listener);
191
+ this.observerSlots.push(Listener.sources.length - 1);
192
+ }
193
+ }
194
+ if (runningTransition && Transition.sources.has(this)) return this.tValue;
195
+ return this.value;
196
+ }
197
+ function writeSignal(node, value, isComp) {
198
+ let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
199
+ if (!node.comparator || !node.comparator(current, value)) {
200
+ if (Transition) {
201
+ const TransitionRunning = Transition.running;
202
+ if (TransitionRunning || !isComp && Transition.sources.has(node)) {
203
+ Transition.sources.add(node);
204
+ node.tValue = value;
205
+ }
206
+ if (!TransitionRunning) node.value = value;
207
+ } else node.value = value;
208
+ if (node.observers && node.observers.length) runUpdates(() => {
209
+ for (let i = 0; i < node.observers.length; i += 1) {
210
+ const o = node.observers[i];
211
+ const TransitionRunning = Transition && Transition.running;
212
+ if (TransitionRunning && Transition.disposed.has(o)) continue;
213
+ if (TransitionRunning ? !o.tState : !o.state) {
214
+ if (o.pure) Updates.push(o);
215
+ else Effects.push(o);
216
+ if (o.observers) markDownstream(o);
217
+ }
218
+ if (!TransitionRunning) o.state = STALE;
219
+ else o.tState = STALE;
220
+ }
221
+ if (Updates.length > 1e6) {
222
+ Updates = [];
223
+ throw new Error();
224
+ }
225
+ }, false);
226
+ }
227
+ return value;
228
+ }
229
+ function updateComputation(node) {
230
+ if (!node.fn) return;
231
+ cleanNode(node);
232
+ const time = ExecCount;
233
+ runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
234
+ if (Transition && !Transition.running && Transition.sources.has(node)) queueMicrotask(() => {
235
+ runUpdates(() => {
236
+ Transition && (Transition.running = true);
237
+ Listener = Owner = node;
238
+ runComputation(node, node.tValue, time);
239
+ Listener = Owner = null;
240
+ }, false);
241
+ });
242
+ }
243
+ function runComputation(node, value, time) {
244
+ let nextValue;
245
+ const owner = Owner, listener = Listener;
246
+ Listener = Owner = node;
247
+ try {
248
+ nextValue = node.fn(value);
249
+ } catch (err) {
250
+ if (node.pure) if (Transition && Transition.running) {
251
+ node.tState = STALE;
252
+ node.tOwned && node.tOwned.forEach(cleanNode);
253
+ node.tOwned = void 0;
254
+ } else {
255
+ node.state = STALE;
256
+ node.owned && node.owned.forEach(cleanNode);
257
+ node.owned = null;
258
+ }
259
+ node.updatedAt = time + 1;
260
+ return handleError(err);
261
+ } finally {
262
+ Listener = listener;
263
+ Owner = owner;
264
+ }
265
+ if (!node.updatedAt || node.updatedAt <= time) {
266
+ if (node.updatedAt != null && "observers" in node) writeSignal(node, nextValue, true);
267
+ else if (Transition && Transition.running && node.pure) {
268
+ Transition.sources.add(node);
269
+ node.tValue = nextValue;
270
+ } else node.value = nextValue;
271
+ node.updatedAt = time;
272
+ }
273
+ }
274
+ function createComputation(fn, init, pure, state = STALE, options) {
275
+ const c = {
276
+ fn,
277
+ state,
278
+ updatedAt: null,
279
+ owned: null,
280
+ sources: null,
281
+ sourceSlots: null,
282
+ cleanups: null,
283
+ value: init,
284
+ owner: Owner,
285
+ context: Owner ? Owner.context : null,
286
+ pure
287
+ };
288
+ if (Transition && Transition.running) {
289
+ c.state = 0;
290
+ c.tState = state;
291
+ }
292
+ if (Owner === null);
293
+ else if (Owner !== UNOWNED) if (Transition && Transition.running && Owner.pure) if (!Owner.tOwned) Owner.tOwned = [c];
294
+ else Owner.tOwned.push(c);
295
+ else if (!Owner.owned) Owner.owned = [c];
296
+ else Owner.owned.push(c);
297
+ if (ExternalSourceConfig && c.fn) {
298
+ const [track, trigger] = createSignal(void 0, { equals: false });
299
+ const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
300
+ onCleanup(() => ordinary.dispose());
301
+ const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
302
+ const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
303
+ c.fn = (x) => {
304
+ track();
305
+ return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
306
+ };
307
+ }
308
+ return c;
309
+ }
310
+ function runTop(node) {
311
+ const runningTransition = Transition && Transition.running;
312
+ if ((runningTransition ? node.tState : node.state) === 0) return;
313
+ if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
314
+ if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
315
+ const ancestors = [node];
316
+ while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
317
+ if (runningTransition && Transition.disposed.has(node)) return;
318
+ if (runningTransition ? node.tState : node.state) ancestors.push(node);
319
+ }
320
+ for (let i = ancestors.length - 1; i >= 0; i--) {
321
+ node = ancestors[i];
322
+ if (runningTransition) {
323
+ let top = node, prev = ancestors[i + 1];
324
+ while ((top = top.owner) && top !== prev) if (Transition.disposed.has(top)) return;
325
+ }
326
+ if ((runningTransition ? node.tState : node.state) === STALE) updateComputation(node);
327
+ else if ((runningTransition ? node.tState : node.state) === PENDING) {
328
+ const updates = Updates;
329
+ Updates = null;
330
+ runUpdates(() => lookUpstream(node, ancestors[0]), false);
331
+ Updates = updates;
332
+ }
333
+ }
334
+ }
335
+ function runUpdates(fn, init) {
336
+ if (Updates) return fn();
337
+ let wait = false;
338
+ if (!init) Updates = [];
339
+ if (Effects) wait = true;
340
+ else Effects = [];
341
+ ExecCount++;
342
+ try {
343
+ const res = fn();
344
+ completeUpdates(wait);
345
+ return res;
346
+ } catch (err) {
347
+ if (!wait) Effects = null;
348
+ Updates = null;
349
+ handleError(err);
350
+ }
351
+ }
352
+ function completeUpdates(wait) {
353
+ if (Updates) {
354
+ if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
355
+ else runQueue(Updates);
356
+ Updates = null;
357
+ }
358
+ if (wait) return;
359
+ let res;
360
+ if (Transition) {
361
+ if (!Transition.promises.size && !Transition.queue.size) {
362
+ const sources = Transition.sources;
363
+ const disposed = Transition.disposed;
364
+ Effects.push.apply(Effects, Transition.effects);
365
+ res = Transition.resolve;
366
+ for (const e$1 of Effects) {
367
+ "tState" in e$1 && (e$1.state = e$1.tState);
368
+ delete e$1.tState;
369
+ }
370
+ Transition = null;
371
+ runUpdates(() => {
372
+ for (const d of disposed) cleanNode(d);
373
+ for (const v of sources) {
374
+ v.value = v.tValue;
375
+ if (v.owned) for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
376
+ if (v.tOwned) v.owned = v.tOwned;
377
+ delete v.tValue;
378
+ delete v.tOwned;
379
+ v.tState = 0;
380
+ }
381
+ setTransPending(false);
382
+ }, false);
383
+ } else if (Transition.running) {
384
+ Transition.running = false;
385
+ Transition.effects.push.apply(Transition.effects, Effects);
386
+ Effects = null;
387
+ setTransPending(true);
388
+ return;
389
+ }
390
+ }
391
+ const e = Effects;
392
+ Effects = null;
393
+ if (e.length) runUpdates(() => runEffects(e), false);
394
+ if (res) res();
395
+ }
396
+ function runQueue(queue) {
397
+ for (let i = 0; i < queue.length; i++) runTop(queue[i]);
398
+ }
399
+ function scheduleQueue(queue) {
400
+ for (let i = 0; i < queue.length; i++) {
401
+ const item = queue[i];
402
+ const tasks = Transition.queue;
403
+ if (!tasks.has(item)) {
404
+ tasks.add(item);
405
+ Scheduler(() => {
406
+ tasks.delete(item);
407
+ runUpdates(() => {
408
+ Transition.running = true;
409
+ runTop(item);
410
+ }, false);
411
+ Transition && (Transition.running = false);
412
+ });
413
+ }
414
+ }
415
+ }
416
+ function runUserEffects(queue) {
417
+ let i, userLength = 0;
418
+ for (i = 0; i < queue.length; i++) {
419
+ const e = queue[i];
420
+ if (!e.user) runTop(e);
421
+ else queue[userLength++] = e;
422
+ }
423
+ if (sharedConfig.context) {
424
+ if (sharedConfig.count) {
425
+ sharedConfig.effects || (sharedConfig.effects = []);
426
+ sharedConfig.effects.push(...queue.slice(0, userLength));
427
+ return;
428
+ }
429
+ setHydrateContext();
430
+ }
431
+ if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) {
432
+ queue = [...sharedConfig.effects, ...queue];
433
+ userLength += sharedConfig.effects.length;
434
+ delete sharedConfig.effects;
435
+ }
436
+ for (i = 0; i < userLength; i++) runTop(queue[i]);
437
+ }
438
+ function lookUpstream(node, ignore) {
439
+ const runningTransition = Transition && Transition.running;
440
+ if (runningTransition) node.tState = 0;
441
+ else node.state = 0;
442
+ for (let i = 0; i < node.sources.length; i += 1) {
443
+ const source = node.sources[i];
444
+ if (source.sources) {
445
+ const state = runningTransition ? source.tState : source.state;
446
+ if (state === STALE) {
447
+ if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);
448
+ } else if (state === PENDING) lookUpstream(source, ignore);
449
+ }
450
+ }
451
+ }
452
+ function markDownstream(node) {
453
+ const runningTransition = Transition && Transition.running;
454
+ for (let i = 0; i < node.observers.length; i += 1) {
455
+ const o = node.observers[i];
456
+ if (runningTransition ? !o.tState : !o.state) {
457
+ if (runningTransition) o.tState = PENDING;
458
+ else o.state = PENDING;
459
+ if (o.pure) Updates.push(o);
460
+ else Effects.push(o);
461
+ o.observers && markDownstream(o);
462
+ }
463
+ }
464
+ }
465
+ function cleanNode(node) {
466
+ let i;
467
+ if (node.sources) while (node.sources.length) {
468
+ const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
469
+ if (obs && obs.length) {
470
+ const n = obs.pop(), s = source.observerSlots.pop();
471
+ if (index < obs.length) {
472
+ n.sourceSlots[s] = index;
473
+ obs[index] = n;
474
+ source.observerSlots[index] = s;
475
+ }
476
+ }
477
+ }
478
+ if (node.tOwned) {
479
+ for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
480
+ delete node.tOwned;
481
+ }
482
+ if (Transition && Transition.running && node.pure) reset(node, true);
483
+ else if (node.owned) {
484
+ for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
485
+ node.owned = null;
486
+ }
487
+ if (node.cleanups) {
488
+ for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
489
+ node.cleanups = null;
490
+ }
491
+ if (Transition && Transition.running) node.tState = 0;
492
+ else node.state = 0;
493
+ }
494
+ function reset(node, top) {
495
+ if (!top) {
496
+ node.tState = 0;
497
+ Transition.disposed.add(node);
498
+ }
499
+ if (node.owned) for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
500
+ }
501
+ function castError(err) {
502
+ if (err instanceof Error) return err;
503
+ return new Error(typeof err === "string" ? err : "Unknown error", { cause: err });
504
+ }
505
+ function runErrors(err, fns, owner) {
506
+ try {
507
+ for (const f of fns) f(err);
508
+ } catch (e) {
509
+ handleError(e, owner && owner.owner || null);
510
+ }
511
+ }
512
+ function handleError(err, owner = Owner) {
513
+ const fns = ERROR && owner && owner.context && owner.context[ERROR];
514
+ const error = castError(err);
515
+ if (!fns) throw error;
516
+ if (Effects) Effects.push({
517
+ fn() {
518
+ runErrors(error, fns, owner);
519
+ },
520
+ state: STALE
521
+ });
522
+ else runErrors(error, fns, owner);
523
+ }
524
+ const FALLBACK = Symbol("fallback");
525
+ function dispose(d) {
526
+ for (let i = 0; i < d.length; i++) d[i]();
527
+ }
528
+ function mapArray(list, mapFn, options = {}) {
529
+ let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
530
+ onCleanup(() => dispose(disposers));
531
+ return () => {
532
+ let newItems = list() || [], newLen = newItems.length, i, j;
533
+ newItems[$TRACK];
534
+ return untrack(() => {
535
+ let newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
536
+ if (newLen === 0) {
537
+ if (len !== 0) {
538
+ dispose(disposers);
539
+ disposers = [];
540
+ items = [];
541
+ mapped = [];
542
+ len = 0;
543
+ indexes && (indexes = []);
544
+ }
545
+ if (options.fallback) {
546
+ items = [FALLBACK];
547
+ mapped[0] = createRoot((disposer) => {
548
+ disposers[0] = disposer;
549
+ return options.fallback();
550
+ });
551
+ len = 1;
552
+ }
553
+ } else if (len === 0) {
554
+ mapped = new Array(newLen);
555
+ for (j = 0; j < newLen; j++) {
556
+ items[j] = newItems[j];
557
+ mapped[j] = createRoot(mapper);
558
+ }
559
+ len = newLen;
560
+ } else {
561
+ temp = new Array(newLen);
562
+ tempdisposers = new Array(newLen);
563
+ indexes && (tempIndexes = new Array(newLen));
564
+ for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);
565
+ for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
566
+ temp[newEnd] = mapped[end];
567
+ tempdisposers[newEnd] = disposers[end];
568
+ indexes && (tempIndexes[newEnd] = indexes[end]);
569
+ }
570
+ newIndices = /* @__PURE__ */ new Map();
571
+ newIndicesNext = new Array(newEnd + 1);
572
+ for (j = newEnd; j >= start; j--) {
573
+ item = newItems[j];
574
+ i = newIndices.get(item);
575
+ newIndicesNext[j] = i === void 0 ? -1 : i;
576
+ newIndices.set(item, j);
577
+ }
578
+ for (i = start; i <= end; i++) {
579
+ item = items[i];
580
+ j = newIndices.get(item);
581
+ if (j !== void 0 && j !== -1) {
582
+ temp[j] = mapped[i];
583
+ tempdisposers[j] = disposers[i];
584
+ indexes && (tempIndexes[j] = indexes[i]);
585
+ j = newIndicesNext[j];
586
+ newIndices.set(item, j);
587
+ } else disposers[i]();
588
+ }
589
+ for (j = start; j < newLen; j++) if (j in temp) {
590
+ mapped[j] = temp[j];
591
+ disposers[j] = tempdisposers[j];
592
+ if (indexes) {
593
+ indexes[j] = tempIndexes[j];
594
+ indexes[j](j);
595
+ }
596
+ } else mapped[j] = createRoot(mapper);
597
+ mapped = mapped.slice(0, len = newLen);
598
+ items = newItems.slice(0);
599
+ }
600
+ return mapped;
601
+ });
602
+ function mapper(disposer) {
603
+ disposers[j] = disposer;
604
+ if (indexes) {
605
+ const [s, set] = createSignal(j);
606
+ indexes[j] = set;
607
+ return mapFn(newItems[j], s);
608
+ }
609
+ return mapFn(newItems[j]);
610
+ }
611
+ };
612
+ }
613
+ function trueFn() {
614
+ return true;
615
+ }
616
+ const propTraps = {
617
+ get(_, property, receiver) {
618
+ if (property === $PROXY) return receiver;
619
+ return _.get(property);
620
+ },
621
+ has(_, property) {
622
+ if (property === $PROXY) return true;
623
+ return _.has(property);
624
+ },
625
+ set: trueFn,
626
+ deleteProperty: trueFn,
627
+ getOwnPropertyDescriptor(_, property) {
628
+ return {
629
+ configurable: true,
630
+ enumerable: true,
631
+ get() {
632
+ return _.get(property);
633
+ },
634
+ set: trueFn,
635
+ deleteProperty: trueFn
636
+ };
637
+ },
638
+ ownKeys(_) {
639
+ return _.keys();
640
+ }
641
+ };
642
+ function splitProps(props, ...keys) {
643
+ const len = keys.length;
644
+ if (SUPPORTS_PROXY && $PROXY in props) {
645
+ const blocked = len > 1 ? keys.flat() : keys[0];
646
+ const res = keys.map((k) => {
647
+ return new Proxy({
648
+ get(property) {
649
+ return k.includes(property) ? props[property] : void 0;
650
+ },
651
+ has(property) {
652
+ return k.includes(property) && property in props;
653
+ },
654
+ keys() {
655
+ return k.filter((property) => property in props);
656
+ }
657
+ }, propTraps);
658
+ });
659
+ res.push(new Proxy({
660
+ get(property) {
661
+ return blocked.includes(property) ? void 0 : props[property];
662
+ },
663
+ has(property) {
664
+ return blocked.includes(property) ? false : property in props;
665
+ },
666
+ keys() {
667
+ return Object.keys(props).filter((k) => !blocked.includes(k));
668
+ }
669
+ }, propTraps));
670
+ return res;
671
+ }
672
+ const objects = [];
673
+ for (let i = 0; i <= len; i++) objects[i] = {};
674
+ for (const propName of Object.getOwnPropertyNames(props)) {
675
+ let keyIndex = len;
676
+ for (let i = 0; i < keys.length; i++) if (keys[i].includes(propName)) {
677
+ keyIndex = i;
678
+ break;
679
+ }
680
+ const desc = Object.getOwnPropertyDescriptor(props, propName);
681
+ !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable ? objects[keyIndex][propName] = desc.value : Object.defineProperty(objects[keyIndex], propName, desc);
682
+ }
683
+ return objects;
684
+ }
685
+ const narrowedError = (name) => `Stale read from <${name}>.`;
686
+ function For(props) {
687
+ const fallback = "fallback" in props && { fallback: () => props.fallback };
688
+ return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
689
+ }
690
+ function Show(props) {
691
+ const keyed = props.keyed;
692
+ const conditionValue = createMemo(() => props.when, void 0, void 0);
693
+ const condition = keyed ? conditionValue : createMemo(conditionValue, void 0, { equals: (a, b) => !a === !b });
694
+ return createMemo(() => {
695
+ const c = condition();
696
+ if (c) {
697
+ const child = props.children;
698
+ return typeof child === "function" && child.length > 0 ? untrack(() => child(keyed ? c : () => {
699
+ if (!untrack(condition)) throw narrowedError("Show");
700
+ return conditionValue();
701
+ })) : child;
702
+ }
703
+ return props.fallback;
704
+ }, void 0, void 0);
705
+ }
706
+
707
+ //#endregion
708
+ //#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
709
+ /**
710
+ * Concatenates two arrays faster than the array spread operator.
711
+ */
712
+ const concatArrays = (array1, array2) => {
713
+ const combinedArray = new Array(array1.length + array2.length);
714
+ for (let i = 0; i < array1.length; i++) combinedArray[i] = array1[i];
715
+ for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
716
+ return combinedArray;
717
+ };
718
+ const createClassValidatorObject = (classGroupId, validator) => ({
719
+ classGroupId,
720
+ validator
721
+ });
722
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
723
+ nextPart,
724
+ validators,
725
+ classGroupId
726
+ });
727
+ const CLASS_PART_SEPARATOR = "-";
728
+ const EMPTY_CONFLICTS = [];
729
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
730
+ const createClassGroupUtils = (config) => {
731
+ const classMap = createClassMap(config);
732
+ const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
733
+ const getClassGroupId = (className$1) => {
734
+ if (className$1.startsWith("[") && className$1.endsWith("]")) return getGroupIdForArbitraryProperty(className$1);
735
+ const classParts = className$1.split(CLASS_PART_SEPARATOR);
736
+ return getGroupRecursive(classParts, classParts[0] === "" && classParts.length > 1 ? 1 : 0, classMap);
737
+ };
738
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
739
+ if (hasPostfixModifier) {
740
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
741
+ const baseConflicts = conflictingClassGroups[classGroupId];
742
+ if (modifierConflicts) {
743
+ if (baseConflicts) return concatArrays(baseConflicts, modifierConflicts);
744
+ return modifierConflicts;
745
+ }
746
+ return baseConflicts || EMPTY_CONFLICTS;
747
+ }
748
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
749
+ };
750
+ return {
751
+ getClassGroupId,
752
+ getConflictingClassGroupIds
753
+ };
754
+ };
755
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
756
+ if (classParts.length - startIndex === 0) return classPartObject.classGroupId;
757
+ const currentClassPart = classParts[startIndex];
758
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
759
+ if (nextClassPartObject) {
760
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
761
+ if (result) return result;
762
+ }
763
+ const validators = classPartObject.validators;
764
+ if (validators === null) return;
765
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
766
+ const validatorsLength = validators.length;
767
+ for (let i = 0; i < validatorsLength; i++) {
768
+ const validatorObj = validators[i];
769
+ if (validatorObj.validator(classRest)) return validatorObj.classGroupId;
770
+ }
771
+ };
772
+ /**
773
+ * Get the class group ID for an arbitrary property.
774
+ *
775
+ * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
776
+ */
777
+ const getGroupIdForArbitraryProperty = (className$1) => className$1.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
778
+ const content = className$1.slice(1, -1);
779
+ const colonIndex = content.indexOf(":");
780
+ const property = content.slice(0, colonIndex);
781
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
782
+ })();
783
+ /**
784
+ * Exported for testing only
785
+ */
786
+ const createClassMap = (config) => {
787
+ const { theme, classGroups } = config;
788
+ return processClassGroups(classGroups, theme);
789
+ };
790
+ const processClassGroups = (classGroups, theme) => {
791
+ const classMap = createClassPartObject();
792
+ for (const classGroupId in classGroups) {
793
+ const group = classGroups[classGroupId];
794
+ processClassesRecursively(group, classMap, classGroupId, theme);
795
+ }
796
+ return classMap;
797
+ };
798
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
799
+ const len = classGroup.length;
800
+ for (let i = 0; i < len; i++) {
801
+ const classDefinition = classGroup[i];
802
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
803
+ }
804
+ };
805
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
806
+ if (typeof classDefinition === "string") {
807
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
808
+ return;
809
+ }
810
+ if (typeof classDefinition === "function") {
811
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
812
+ return;
813
+ }
814
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
815
+ };
816
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
817
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
818
+ classPartObjectToEdit.classGroupId = classGroupId;
819
+ };
820
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
821
+ if (isThemeGetter(classDefinition)) {
822
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
823
+ return;
824
+ }
825
+ if (classPartObject.validators === null) classPartObject.validators = [];
826
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
827
+ };
828
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
829
+ const entries = Object.entries(classDefinition);
830
+ const len = entries.length;
831
+ for (let i = 0; i < len; i++) {
832
+ const [key, value] = entries[i];
833
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
834
+ }
835
+ };
836
+ const getPart = (classPartObject, path) => {
837
+ let current = classPartObject;
838
+ const parts = path.split(CLASS_PART_SEPARATOR);
839
+ const len = parts.length;
840
+ for (let i = 0; i < len; i++) {
841
+ const part = parts[i];
842
+ let next = current.nextPart.get(part);
843
+ if (!next) {
844
+ next = createClassPartObject();
845
+ current.nextPart.set(part, next);
846
+ }
847
+ current = next;
848
+ }
849
+ return current;
850
+ };
851
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
852
+ const createLruCache = (maxCacheSize) => {
853
+ if (maxCacheSize < 1) return {
854
+ get: () => void 0,
855
+ set: () => {}
856
+ };
857
+ let cacheSize = 0;
858
+ let cache = Object.create(null);
859
+ let previousCache = Object.create(null);
860
+ const update = (key, value) => {
861
+ cache[key] = value;
862
+ cacheSize++;
863
+ if (cacheSize > maxCacheSize) {
864
+ cacheSize = 0;
865
+ previousCache = cache;
866
+ cache = Object.create(null);
867
+ }
868
+ };
869
+ return {
870
+ get(key) {
871
+ let value = cache[key];
872
+ if (value !== void 0) return value;
873
+ if ((value = previousCache[key]) !== void 0) {
874
+ update(key, value);
875
+ return value;
876
+ }
877
+ },
878
+ set(key, value) {
879
+ if (key in cache) cache[key] = value;
880
+ else update(key, value);
881
+ }
882
+ };
883
+ };
884
+ const IMPORTANT_MODIFIER = "!";
885
+ const MODIFIER_SEPARATOR = ":";
886
+ const EMPTY_MODIFIERS = [];
887
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
888
+ modifiers,
889
+ hasImportantModifier,
890
+ baseClassName,
891
+ maybePostfixModifierPosition,
892
+ isExternal
893
+ });
894
+ const createParseClassName = (config) => {
895
+ const { prefix, experimentalParseClassName } = config;
896
+ /**
897
+ * Parse class name into parts.
898
+ *
899
+ * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
900
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
901
+ */
902
+ let parseClassName = (className$1) => {
903
+ const modifiers = [];
904
+ let bracketDepth = 0;
905
+ let parenDepth = 0;
906
+ let modifierStart = 0;
907
+ let postfixModifierPosition;
908
+ const len = className$1.length;
909
+ for (let index = 0; index < len; index++) {
910
+ const currentCharacter = className$1[index];
911
+ if (bracketDepth === 0 && parenDepth === 0) {
912
+ if (currentCharacter === MODIFIER_SEPARATOR) {
913
+ modifiers.push(className$1.slice(modifierStart, index));
914
+ modifierStart = index + 1;
915
+ continue;
916
+ }
917
+ if (currentCharacter === "/") {
918
+ postfixModifierPosition = index;
919
+ continue;
920
+ }
921
+ }
922
+ if (currentCharacter === "[") bracketDepth++;
923
+ else if (currentCharacter === "]") bracketDepth--;
924
+ else if (currentCharacter === "(") parenDepth++;
925
+ else if (currentCharacter === ")") parenDepth--;
926
+ }
927
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className$1 : className$1.slice(modifierStart);
928
+ let baseClassName = baseClassNameWithImportantModifier;
929
+ let hasImportantModifier = false;
930
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
931
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
932
+ hasImportantModifier = true;
933
+ } else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
934
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
935
+ hasImportantModifier = true;
936
+ }
937
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
938
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
939
+ };
940
+ if (prefix) {
941
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
942
+ const parseClassNameOriginal = parseClassName;
943
+ parseClassName = (className$1) => className$1.startsWith(fullPrefix) ? parseClassNameOriginal(className$1.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className$1, void 0, true);
944
+ }
945
+ if (experimentalParseClassName) {
946
+ const parseClassNameOriginal = parseClassName;
947
+ parseClassName = (className$1) => experimentalParseClassName({
948
+ className: className$1,
949
+ parseClassName: parseClassNameOriginal
950
+ });
951
+ }
952
+ return parseClassName;
953
+ };
954
+ /**
955
+ * Sorts modifiers according to following schema:
956
+ * - Predefined modifiers are sorted alphabetically
957
+ * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
958
+ */
959
+ const createSortModifiers = (config) => {
960
+ const modifierWeights = /* @__PURE__ */ new Map();
961
+ config.orderSensitiveModifiers.forEach((mod, index) => {
962
+ modifierWeights.set(mod, 1e6 + index);
963
+ });
964
+ return (modifiers) => {
965
+ const result = [];
966
+ let currentSegment = [];
967
+ for (let i = 0; i < modifiers.length; i++) {
968
+ const modifier = modifiers[i];
969
+ const isArbitrary = modifier[0] === "[";
970
+ const isOrderSensitive = modifierWeights.has(modifier);
971
+ if (isArbitrary || isOrderSensitive) {
972
+ if (currentSegment.length > 0) {
973
+ currentSegment.sort();
974
+ result.push(...currentSegment);
975
+ currentSegment = [];
976
+ }
977
+ result.push(modifier);
978
+ } else currentSegment.push(modifier);
979
+ }
980
+ if (currentSegment.length > 0) {
981
+ currentSegment.sort();
982
+ result.push(...currentSegment);
983
+ }
984
+ return result;
985
+ };
986
+ };
987
+ const createConfigUtils = (config) => ({
988
+ cache: createLruCache(config.cacheSize),
989
+ parseClassName: createParseClassName(config),
990
+ sortModifiers: createSortModifiers(config),
991
+ ...createClassGroupUtils(config)
992
+ });
993
+ const SPLIT_CLASSES_REGEX = /\s+/;
994
+ const mergeClassList = (classList$1, configUtils) => {
995
+ const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } = configUtils;
996
+ /**
997
+ * Set of classGroupIds in following format:
998
+ * `{importantModifier}{variantModifiers}{classGroupId}`
999
+ * @example 'float'
1000
+ * @example 'hover:focus:bg-color'
1001
+ * @example 'md:!pr'
1002
+ */
1003
+ const classGroupsInConflict = [];
1004
+ const classNames = classList$1.trim().split(SPLIT_CLASSES_REGEX);
1005
+ let result = "";
1006
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
1007
+ const originalClassName = classNames[index];
1008
+ const { isExternal, modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
1009
+ if (isExternal) {
1010
+ result = originalClassName + (result.length > 0 ? " " + result : result);
1011
+ continue;
1012
+ }
1013
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
1014
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
1015
+ if (!classGroupId) {
1016
+ if (!hasPostfixModifier) {
1017
+ result = originalClassName + (result.length > 0 ? " " + result : result);
1018
+ continue;
1019
+ }
1020
+ classGroupId = getClassGroupId(baseClassName);
1021
+ if (!classGroupId) {
1022
+ result = originalClassName + (result.length > 0 ? " " + result : result);
1023
+ continue;
1024
+ }
1025
+ hasPostfixModifier = false;
1026
+ }
1027
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
1028
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
1029
+ const classId = modifierId + classGroupId;
1030
+ if (classGroupsInConflict.indexOf(classId) > -1) continue;
1031
+ classGroupsInConflict.push(classId);
1032
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
1033
+ for (let i = 0; i < conflictGroups.length; ++i) {
1034
+ const group = conflictGroups[i];
1035
+ classGroupsInConflict.push(modifierId + group);
1036
+ }
1037
+ result = originalClassName + (result.length > 0 ? " " + result : result);
1038
+ }
1039
+ return result;
1040
+ };
1041
+ /**
1042
+ * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
1043
+ *
1044
+ * Specifically:
1045
+ * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
1046
+ * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
1047
+ *
1048
+ * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
1049
+ */
1050
+ const twJoin = (...classLists) => {
1051
+ let index = 0;
1052
+ let argument;
1053
+ let resolvedValue;
1054
+ let string = "";
1055
+ while (index < classLists.length) if (argument = classLists[index++]) {
1056
+ if (resolvedValue = toValue(argument)) {
1057
+ string && (string += " ");
1058
+ string += resolvedValue;
1059
+ }
1060
+ }
1061
+ return string;
1062
+ };
1063
+ const toValue = (mix) => {
1064
+ if (typeof mix === "string") return mix;
1065
+ let resolvedValue;
1066
+ let string = "";
1067
+ for (let k = 0; k < mix.length; k++) if (mix[k]) {
1068
+ if (resolvedValue = toValue(mix[k])) {
1069
+ string && (string += " ");
1070
+ string += resolvedValue;
1071
+ }
1072
+ }
1073
+ return string;
1074
+ };
1075
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
1076
+ let configUtils;
1077
+ let cacheGet;
1078
+ let cacheSet;
1079
+ let functionToCall;
1080
+ const initTailwindMerge = (classList$1) => {
1081
+ configUtils = createConfigUtils(createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()));
1082
+ cacheGet = configUtils.cache.get;
1083
+ cacheSet = configUtils.cache.set;
1084
+ functionToCall = tailwindMerge;
1085
+ return tailwindMerge(classList$1);
1086
+ };
1087
+ const tailwindMerge = (classList$1) => {
1088
+ const cachedResult = cacheGet(classList$1);
1089
+ if (cachedResult) return cachedResult;
1090
+ const result = mergeClassList(classList$1, configUtils);
1091
+ cacheSet(classList$1, result);
1092
+ return result;
1093
+ };
1094
+ functionToCall = initTailwindMerge;
1095
+ return (...args) => functionToCall(twJoin(...args));
1096
+ };
1097
+ const fallbackThemeArr = [];
1098
+ const fromTheme = (key) => {
1099
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
1100
+ themeGetter.isThemeGetter = true;
1101
+ return themeGetter;
1102
+ };
1103
+ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
1104
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
1105
+ const fractionRegex = /^\d+\/\d+$/;
1106
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
1107
+ const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
1108
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
1109
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
1110
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
1111
+ const isFraction = (value) => fractionRegex.test(value);
1112
+ const isNumber = (value) => !!value && !Number.isNaN(Number(value));
1113
+ const isInteger = (value) => !!value && Number.isInteger(Number(value));
1114
+ const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
1115
+ const isTshirtSize = (value) => tshirtUnitRegex.test(value);
1116
+ const isAny = () => true;
1117
+ const isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
1118
+ const isNever = () => false;
1119
+ const isShadow = (value) => shadowRegex.test(value);
1120
+ const isImage = (value) => imageRegex.test(value);
1121
+ const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
1122
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
1123
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
1124
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
1125
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
1126
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
1127
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
1128
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
1129
+ const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
1130
+ const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
1131
+ const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
1132
+ const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
1133
+ const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
1134
+ const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
1135
+ const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
1136
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
1137
+ const result = arbitraryValueRegex.exec(value);
1138
+ if (result) {
1139
+ if (result[1]) return testLabel(result[1]);
1140
+ return testValue(result[2]);
1141
+ }
1142
+ return false;
1143
+ };
1144
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
1145
+ const result = arbitraryVariableRegex.exec(value);
1146
+ if (result) {
1147
+ if (result[1]) return testLabel(result[1]);
1148
+ return shouldMatchNoLabel;
1149
+ }
1150
+ return false;
1151
+ };
1152
+ const isLabelPosition = (label) => label === "position" || label === "percentage";
1153
+ const isLabelImage = (label) => label === "image" || label === "url";
1154
+ const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
1155
+ const isLabelLength = (label) => label === "length";
1156
+ const isLabelNumber = (label) => label === "number";
1157
+ const isLabelFamilyName = (label) => label === "family-name";
1158
+ const isLabelShadow = (label) => label === "shadow";
1159
+ const getDefaultConfig = () => {
1160
+ /**
1161
+ * Theme getters for theme variable namespaces
1162
+ * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
1163
+ */
1164
+ const themeColor = fromTheme("color");
1165
+ const themeFont = fromTheme("font");
1166
+ const themeText = fromTheme("text");
1167
+ const themeFontWeight = fromTheme("font-weight");
1168
+ const themeTracking = fromTheme("tracking");
1169
+ const themeLeading = fromTheme("leading");
1170
+ const themeBreakpoint = fromTheme("breakpoint");
1171
+ const themeContainer = fromTheme("container");
1172
+ const themeSpacing = fromTheme("spacing");
1173
+ const themeRadius = fromTheme("radius");
1174
+ const themeShadow = fromTheme("shadow");
1175
+ const themeInsetShadow = fromTheme("inset-shadow");
1176
+ const themeTextShadow = fromTheme("text-shadow");
1177
+ const themeDropShadow = fromTheme("drop-shadow");
1178
+ const themeBlur = fromTheme("blur");
1179
+ const themePerspective = fromTheme("perspective");
1180
+ const themeAspect = fromTheme("aspect");
1181
+ const themeEase = fromTheme("ease");
1182
+ const themeAnimate = fromTheme("animate");
1183
+ /**
1184
+ * Helpers to avoid repeating the same scales
1185
+ *
1186
+ * We use functions that create a new array every time they're called instead of static arrays.
1187
+ * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
1188
+ */
1189
+ const scaleBreak = () => [
1190
+ "auto",
1191
+ "avoid",
1192
+ "all",
1193
+ "avoid-page",
1194
+ "page",
1195
+ "left",
1196
+ "right",
1197
+ "column"
1198
+ ];
1199
+ const scalePosition = () => [
1200
+ "center",
1201
+ "top",
1202
+ "bottom",
1203
+ "left",
1204
+ "right",
1205
+ "top-left",
1206
+ "left-top",
1207
+ "top-right",
1208
+ "right-top",
1209
+ "bottom-right",
1210
+ "right-bottom",
1211
+ "bottom-left",
1212
+ "left-bottom"
1213
+ ];
1214
+ const scalePositionWithArbitrary = () => [
1215
+ ...scalePosition(),
1216
+ isArbitraryVariable,
1217
+ isArbitraryValue
1218
+ ];
1219
+ const scaleOverflow = () => [
1220
+ "auto",
1221
+ "hidden",
1222
+ "clip",
1223
+ "visible",
1224
+ "scroll"
1225
+ ];
1226
+ const scaleOverscroll = () => [
1227
+ "auto",
1228
+ "contain",
1229
+ "none"
1230
+ ];
1231
+ const scaleUnambiguousSpacing = () => [
1232
+ isArbitraryVariable,
1233
+ isArbitraryValue,
1234
+ themeSpacing
1235
+ ];
1236
+ const scaleInset = () => [
1237
+ isFraction,
1238
+ "full",
1239
+ "auto",
1240
+ ...scaleUnambiguousSpacing()
1241
+ ];
1242
+ const scaleGridTemplateColsRows = () => [
1243
+ isInteger,
1244
+ "none",
1245
+ "subgrid",
1246
+ isArbitraryVariable,
1247
+ isArbitraryValue
1248
+ ];
1249
+ const scaleGridColRowStartAndEnd = () => [
1250
+ "auto",
1251
+ { span: [
1252
+ "full",
1253
+ isInteger,
1254
+ isArbitraryVariable,
1255
+ isArbitraryValue
1256
+ ] },
1257
+ isInteger,
1258
+ isArbitraryVariable,
1259
+ isArbitraryValue
1260
+ ];
1261
+ const scaleGridColRowStartOrEnd = () => [
1262
+ isInteger,
1263
+ "auto",
1264
+ isArbitraryVariable,
1265
+ isArbitraryValue
1266
+ ];
1267
+ const scaleGridAutoColsRows = () => [
1268
+ "auto",
1269
+ "min",
1270
+ "max",
1271
+ "fr",
1272
+ isArbitraryVariable,
1273
+ isArbitraryValue
1274
+ ];
1275
+ const scaleAlignPrimaryAxis = () => [
1276
+ "start",
1277
+ "end",
1278
+ "center",
1279
+ "between",
1280
+ "around",
1281
+ "evenly",
1282
+ "stretch",
1283
+ "baseline",
1284
+ "center-safe",
1285
+ "end-safe"
1286
+ ];
1287
+ const scaleAlignSecondaryAxis = () => [
1288
+ "start",
1289
+ "end",
1290
+ "center",
1291
+ "stretch",
1292
+ "center-safe",
1293
+ "end-safe"
1294
+ ];
1295
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
1296
+ const scaleSizing = () => [
1297
+ isFraction,
1298
+ "auto",
1299
+ "full",
1300
+ "dvw",
1301
+ "dvh",
1302
+ "lvw",
1303
+ "lvh",
1304
+ "svw",
1305
+ "svh",
1306
+ "min",
1307
+ "max",
1308
+ "fit",
1309
+ ...scaleUnambiguousSpacing()
1310
+ ];
1311
+ const scaleColor = () => [
1312
+ themeColor,
1313
+ isArbitraryVariable,
1314
+ isArbitraryValue
1315
+ ];
1316
+ const scaleBgPosition = () => [
1317
+ ...scalePosition(),
1318
+ isArbitraryVariablePosition,
1319
+ isArbitraryPosition,
1320
+ { position: [isArbitraryVariable, isArbitraryValue] }
1321
+ ];
1322
+ const scaleBgRepeat = () => ["no-repeat", { repeat: [
1323
+ "",
1324
+ "x",
1325
+ "y",
1326
+ "space",
1327
+ "round"
1328
+ ] }];
1329
+ const scaleBgSize = () => [
1330
+ "auto",
1331
+ "cover",
1332
+ "contain",
1333
+ isArbitraryVariableSize,
1334
+ isArbitrarySize,
1335
+ { size: [isArbitraryVariable, isArbitraryValue] }
1336
+ ];
1337
+ const scaleGradientStopPosition = () => [
1338
+ isPercent,
1339
+ isArbitraryVariableLength,
1340
+ isArbitraryLength
1341
+ ];
1342
+ const scaleRadius = () => [
1343
+ "",
1344
+ "none",
1345
+ "full",
1346
+ themeRadius,
1347
+ isArbitraryVariable,
1348
+ isArbitraryValue
1349
+ ];
1350
+ const scaleBorderWidth = () => [
1351
+ "",
1352
+ isNumber,
1353
+ isArbitraryVariableLength,
1354
+ isArbitraryLength
1355
+ ];
1356
+ const scaleLineStyle = () => [
1357
+ "solid",
1358
+ "dashed",
1359
+ "dotted",
1360
+ "double"
1361
+ ];
1362
+ const scaleBlendMode = () => [
1363
+ "normal",
1364
+ "multiply",
1365
+ "screen",
1366
+ "overlay",
1367
+ "darken",
1368
+ "lighten",
1369
+ "color-dodge",
1370
+ "color-burn",
1371
+ "hard-light",
1372
+ "soft-light",
1373
+ "difference",
1374
+ "exclusion",
1375
+ "hue",
1376
+ "saturation",
1377
+ "color",
1378
+ "luminosity"
1379
+ ];
1380
+ const scaleMaskImagePosition = () => [
1381
+ isNumber,
1382
+ isPercent,
1383
+ isArbitraryVariablePosition,
1384
+ isArbitraryPosition
1385
+ ];
1386
+ const scaleBlur = () => [
1387
+ "",
1388
+ "none",
1389
+ themeBlur,
1390
+ isArbitraryVariable,
1391
+ isArbitraryValue
1392
+ ];
1393
+ const scaleRotate = () => [
1394
+ "none",
1395
+ isNumber,
1396
+ isArbitraryVariable,
1397
+ isArbitraryValue
1398
+ ];
1399
+ const scaleScale = () => [
1400
+ "none",
1401
+ isNumber,
1402
+ isArbitraryVariable,
1403
+ isArbitraryValue
1404
+ ];
1405
+ const scaleSkew = () => [
1406
+ isNumber,
1407
+ isArbitraryVariable,
1408
+ isArbitraryValue
1409
+ ];
1410
+ const scaleTranslate = () => [
1411
+ isFraction,
1412
+ "full",
1413
+ ...scaleUnambiguousSpacing()
1414
+ ];
1415
+ return {
1416
+ cacheSize: 500,
1417
+ theme: {
1418
+ animate: [
1419
+ "spin",
1420
+ "ping",
1421
+ "pulse",
1422
+ "bounce"
1423
+ ],
1424
+ aspect: ["video"],
1425
+ blur: [isTshirtSize],
1426
+ breakpoint: [isTshirtSize],
1427
+ color: [isAny],
1428
+ container: [isTshirtSize],
1429
+ "drop-shadow": [isTshirtSize],
1430
+ ease: [
1431
+ "in",
1432
+ "out",
1433
+ "in-out"
1434
+ ],
1435
+ font: [isAnyNonArbitrary],
1436
+ "font-weight": [
1437
+ "thin",
1438
+ "extralight",
1439
+ "light",
1440
+ "normal",
1441
+ "medium",
1442
+ "semibold",
1443
+ "bold",
1444
+ "extrabold",
1445
+ "black"
1446
+ ],
1447
+ "inset-shadow": [isTshirtSize],
1448
+ leading: [
1449
+ "none",
1450
+ "tight",
1451
+ "snug",
1452
+ "normal",
1453
+ "relaxed",
1454
+ "loose"
1455
+ ],
1456
+ perspective: [
1457
+ "dramatic",
1458
+ "near",
1459
+ "normal",
1460
+ "midrange",
1461
+ "distant",
1462
+ "none"
1463
+ ],
1464
+ radius: [isTshirtSize],
1465
+ shadow: [isTshirtSize],
1466
+ spacing: ["px", isNumber],
1467
+ text: [isTshirtSize],
1468
+ "text-shadow": [isTshirtSize],
1469
+ tracking: [
1470
+ "tighter",
1471
+ "tight",
1472
+ "normal",
1473
+ "wide",
1474
+ "wider",
1475
+ "widest"
1476
+ ]
1477
+ },
1478
+ classGroups: {
1479
+ aspect: [{ aspect: [
1480
+ "auto",
1481
+ "square",
1482
+ isFraction,
1483
+ isArbitraryValue,
1484
+ isArbitraryVariable,
1485
+ themeAspect
1486
+ ] }],
1487
+ container: ["container"],
1488
+ columns: [{ columns: [
1489
+ isNumber,
1490
+ isArbitraryValue,
1491
+ isArbitraryVariable,
1492
+ themeContainer
1493
+ ] }],
1494
+ "break-after": [{ "break-after": scaleBreak() }],
1495
+ "break-before": [{ "break-before": scaleBreak() }],
1496
+ "break-inside": [{ "break-inside": [
1497
+ "auto",
1498
+ "avoid",
1499
+ "avoid-page",
1500
+ "avoid-column"
1501
+ ] }],
1502
+ "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
1503
+ box: [{ box: ["border", "content"] }],
1504
+ display: [
1505
+ "block",
1506
+ "inline-block",
1507
+ "inline",
1508
+ "flex",
1509
+ "inline-flex",
1510
+ "table",
1511
+ "inline-table",
1512
+ "table-caption",
1513
+ "table-cell",
1514
+ "table-column",
1515
+ "table-column-group",
1516
+ "table-footer-group",
1517
+ "table-header-group",
1518
+ "table-row-group",
1519
+ "table-row",
1520
+ "flow-root",
1521
+ "grid",
1522
+ "inline-grid",
1523
+ "contents",
1524
+ "list-item",
1525
+ "hidden"
1526
+ ],
1527
+ sr: ["sr-only", "not-sr-only"],
1528
+ float: [{ float: [
1529
+ "right",
1530
+ "left",
1531
+ "none",
1532
+ "start",
1533
+ "end"
1534
+ ] }],
1535
+ clear: [{ clear: [
1536
+ "left",
1537
+ "right",
1538
+ "both",
1539
+ "none",
1540
+ "start",
1541
+ "end"
1542
+ ] }],
1543
+ isolation: ["isolate", "isolation-auto"],
1544
+ "object-fit": [{ object: [
1545
+ "contain",
1546
+ "cover",
1547
+ "fill",
1548
+ "none",
1549
+ "scale-down"
1550
+ ] }],
1551
+ "object-position": [{ object: scalePositionWithArbitrary() }],
1552
+ overflow: [{ overflow: scaleOverflow() }],
1553
+ "overflow-x": [{ "overflow-x": scaleOverflow() }],
1554
+ "overflow-y": [{ "overflow-y": scaleOverflow() }],
1555
+ overscroll: [{ overscroll: scaleOverscroll() }],
1556
+ "overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
1557
+ "overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
1558
+ position: [
1559
+ "static",
1560
+ "fixed",
1561
+ "absolute",
1562
+ "relative",
1563
+ "sticky"
1564
+ ],
1565
+ inset: [{ inset: scaleInset() }],
1566
+ "inset-x": [{ "inset-x": scaleInset() }],
1567
+ "inset-y": [{ "inset-y": scaleInset() }],
1568
+ start: [{ start: scaleInset() }],
1569
+ end: [{ end: scaleInset() }],
1570
+ top: [{ top: scaleInset() }],
1571
+ right: [{ right: scaleInset() }],
1572
+ bottom: [{ bottom: scaleInset() }],
1573
+ left: [{ left: scaleInset() }],
1574
+ visibility: [
1575
+ "visible",
1576
+ "invisible",
1577
+ "collapse"
1578
+ ],
1579
+ z: [{ z: [
1580
+ isInteger,
1581
+ "auto",
1582
+ isArbitraryVariable,
1583
+ isArbitraryValue
1584
+ ] }],
1585
+ basis: [{ basis: [
1586
+ isFraction,
1587
+ "full",
1588
+ "auto",
1589
+ themeContainer,
1590
+ ...scaleUnambiguousSpacing()
1591
+ ] }],
1592
+ "flex-direction": [{ flex: [
1593
+ "row",
1594
+ "row-reverse",
1595
+ "col",
1596
+ "col-reverse"
1597
+ ] }],
1598
+ "flex-wrap": [{ flex: [
1599
+ "nowrap",
1600
+ "wrap",
1601
+ "wrap-reverse"
1602
+ ] }],
1603
+ flex: [{ flex: [
1604
+ isNumber,
1605
+ isFraction,
1606
+ "auto",
1607
+ "initial",
1608
+ "none",
1609
+ isArbitraryValue
1610
+ ] }],
1611
+ grow: [{ grow: [
1612
+ "",
1613
+ isNumber,
1614
+ isArbitraryVariable,
1615
+ isArbitraryValue
1616
+ ] }],
1617
+ shrink: [{ shrink: [
1618
+ "",
1619
+ isNumber,
1620
+ isArbitraryVariable,
1621
+ isArbitraryValue
1622
+ ] }],
1623
+ order: [{ order: [
1624
+ isInteger,
1625
+ "first",
1626
+ "last",
1627
+ "none",
1628
+ isArbitraryVariable,
1629
+ isArbitraryValue
1630
+ ] }],
1631
+ "grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
1632
+ "col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
1633
+ "col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
1634
+ "col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
1635
+ "grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
1636
+ "row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
1637
+ "row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
1638
+ "row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
1639
+ "grid-flow": [{ "grid-flow": [
1640
+ "row",
1641
+ "col",
1642
+ "dense",
1643
+ "row-dense",
1644
+ "col-dense"
1645
+ ] }],
1646
+ "auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
1647
+ "auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
1648
+ gap: [{ gap: scaleUnambiguousSpacing() }],
1649
+ "gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
1650
+ "gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
1651
+ "justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
1652
+ "justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
1653
+ "justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
1654
+ "align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
1655
+ "align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
1656
+ "align-self": [{ self: [
1657
+ "auto",
1658
+ ...scaleAlignSecondaryAxis(),
1659
+ { baseline: ["", "last"] }
1660
+ ] }],
1661
+ "place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
1662
+ "place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
1663
+ "place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
1664
+ p: [{ p: scaleUnambiguousSpacing() }],
1665
+ px: [{ px: scaleUnambiguousSpacing() }],
1666
+ py: [{ py: scaleUnambiguousSpacing() }],
1667
+ ps: [{ ps: scaleUnambiguousSpacing() }],
1668
+ pe: [{ pe: scaleUnambiguousSpacing() }],
1669
+ pt: [{ pt: scaleUnambiguousSpacing() }],
1670
+ pr: [{ pr: scaleUnambiguousSpacing() }],
1671
+ pb: [{ pb: scaleUnambiguousSpacing() }],
1672
+ pl: [{ pl: scaleUnambiguousSpacing() }],
1673
+ m: [{ m: scaleMargin() }],
1674
+ mx: [{ mx: scaleMargin() }],
1675
+ my: [{ my: scaleMargin() }],
1676
+ ms: [{ ms: scaleMargin() }],
1677
+ me: [{ me: scaleMargin() }],
1678
+ mt: [{ mt: scaleMargin() }],
1679
+ mr: [{ mr: scaleMargin() }],
1680
+ mb: [{ mb: scaleMargin() }],
1681
+ ml: [{ ml: scaleMargin() }],
1682
+ "space-x": [{ "space-x": scaleUnambiguousSpacing() }],
1683
+ "space-x-reverse": ["space-x-reverse"],
1684
+ "space-y": [{ "space-y": scaleUnambiguousSpacing() }],
1685
+ "space-y-reverse": ["space-y-reverse"],
1686
+ size: [{ size: scaleSizing() }],
1687
+ w: [{ w: [
1688
+ themeContainer,
1689
+ "screen",
1690
+ ...scaleSizing()
1691
+ ] }],
1692
+ "min-w": [{ "min-w": [
1693
+ themeContainer,
1694
+ "screen",
1695
+ "none",
1696
+ ...scaleSizing()
1697
+ ] }],
1698
+ "max-w": [{ "max-w": [
1699
+ themeContainer,
1700
+ "screen",
1701
+ "none",
1702
+ "prose",
1703
+ { screen: [themeBreakpoint] },
1704
+ ...scaleSizing()
1705
+ ] }],
1706
+ h: [{ h: [
1707
+ "screen",
1708
+ "lh",
1709
+ ...scaleSizing()
1710
+ ] }],
1711
+ "min-h": [{ "min-h": [
1712
+ "screen",
1713
+ "lh",
1714
+ "none",
1715
+ ...scaleSizing()
1716
+ ] }],
1717
+ "max-h": [{ "max-h": [
1718
+ "screen",
1719
+ "lh",
1720
+ ...scaleSizing()
1721
+ ] }],
1722
+ "font-size": [{ text: [
1723
+ "base",
1724
+ themeText,
1725
+ isArbitraryVariableLength,
1726
+ isArbitraryLength
1727
+ ] }],
1728
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1729
+ "font-style": ["italic", "not-italic"],
1730
+ "font-weight": [{ font: [
1731
+ themeFontWeight,
1732
+ isArbitraryVariable,
1733
+ isArbitraryNumber
1734
+ ] }],
1735
+ "font-stretch": [{ "font-stretch": [
1736
+ "ultra-condensed",
1737
+ "extra-condensed",
1738
+ "condensed",
1739
+ "semi-condensed",
1740
+ "normal",
1741
+ "semi-expanded",
1742
+ "expanded",
1743
+ "extra-expanded",
1744
+ "ultra-expanded",
1745
+ isPercent,
1746
+ isArbitraryValue
1747
+ ] }],
1748
+ "font-family": [{ font: [
1749
+ isArbitraryVariableFamilyName,
1750
+ isArbitraryValue,
1751
+ themeFont
1752
+ ] }],
1753
+ "fvn-normal": ["normal-nums"],
1754
+ "fvn-ordinal": ["ordinal"],
1755
+ "fvn-slashed-zero": ["slashed-zero"],
1756
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1757
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1758
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1759
+ tracking: [{ tracking: [
1760
+ themeTracking,
1761
+ isArbitraryVariable,
1762
+ isArbitraryValue
1763
+ ] }],
1764
+ "line-clamp": [{ "line-clamp": [
1765
+ isNumber,
1766
+ "none",
1767
+ isArbitraryVariable,
1768
+ isArbitraryNumber
1769
+ ] }],
1770
+ leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }],
1771
+ "list-image": [{ "list-image": [
1772
+ "none",
1773
+ isArbitraryVariable,
1774
+ isArbitraryValue
1775
+ ] }],
1776
+ "list-style-position": [{ list: ["inside", "outside"] }],
1777
+ "list-style-type": [{ list: [
1778
+ "disc",
1779
+ "decimal",
1780
+ "none",
1781
+ isArbitraryVariable,
1782
+ isArbitraryValue
1783
+ ] }],
1784
+ "text-alignment": [{ text: [
1785
+ "left",
1786
+ "center",
1787
+ "right",
1788
+ "justify",
1789
+ "start",
1790
+ "end"
1791
+ ] }],
1792
+ "placeholder-color": [{ placeholder: scaleColor() }],
1793
+ "text-color": [{ text: scaleColor() }],
1794
+ "text-decoration": [
1795
+ "underline",
1796
+ "overline",
1797
+ "line-through",
1798
+ "no-underline"
1799
+ ],
1800
+ "text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
1801
+ "text-decoration-thickness": [{ decoration: [
1802
+ isNumber,
1803
+ "from-font",
1804
+ "auto",
1805
+ isArbitraryVariable,
1806
+ isArbitraryLength
1807
+ ] }],
1808
+ "text-decoration-color": [{ decoration: scaleColor() }],
1809
+ "underline-offset": [{ "underline-offset": [
1810
+ isNumber,
1811
+ "auto",
1812
+ isArbitraryVariable,
1813
+ isArbitraryValue
1814
+ ] }],
1815
+ "text-transform": [
1816
+ "uppercase",
1817
+ "lowercase",
1818
+ "capitalize",
1819
+ "normal-case"
1820
+ ],
1821
+ "text-overflow": [
1822
+ "truncate",
1823
+ "text-ellipsis",
1824
+ "text-clip"
1825
+ ],
1826
+ "text-wrap": [{ text: [
1827
+ "wrap",
1828
+ "nowrap",
1829
+ "balance",
1830
+ "pretty"
1831
+ ] }],
1832
+ indent: [{ indent: scaleUnambiguousSpacing() }],
1833
+ "vertical-align": [{ align: [
1834
+ "baseline",
1835
+ "top",
1836
+ "middle",
1837
+ "bottom",
1838
+ "text-top",
1839
+ "text-bottom",
1840
+ "sub",
1841
+ "super",
1842
+ isArbitraryVariable,
1843
+ isArbitraryValue
1844
+ ] }],
1845
+ whitespace: [{ whitespace: [
1846
+ "normal",
1847
+ "nowrap",
1848
+ "pre",
1849
+ "pre-line",
1850
+ "pre-wrap",
1851
+ "break-spaces"
1852
+ ] }],
1853
+ break: [{ break: [
1854
+ "normal",
1855
+ "words",
1856
+ "all",
1857
+ "keep"
1858
+ ] }],
1859
+ wrap: [{ wrap: [
1860
+ "break-word",
1861
+ "anywhere",
1862
+ "normal"
1863
+ ] }],
1864
+ hyphens: [{ hyphens: [
1865
+ "none",
1866
+ "manual",
1867
+ "auto"
1868
+ ] }],
1869
+ content: [{ content: [
1870
+ "none",
1871
+ isArbitraryVariable,
1872
+ isArbitraryValue
1873
+ ] }],
1874
+ "bg-attachment": [{ bg: [
1875
+ "fixed",
1876
+ "local",
1877
+ "scroll"
1878
+ ] }],
1879
+ "bg-clip": [{ "bg-clip": [
1880
+ "border",
1881
+ "padding",
1882
+ "content",
1883
+ "text"
1884
+ ] }],
1885
+ "bg-origin": [{ "bg-origin": [
1886
+ "border",
1887
+ "padding",
1888
+ "content"
1889
+ ] }],
1890
+ "bg-position": [{ bg: scaleBgPosition() }],
1891
+ "bg-repeat": [{ bg: scaleBgRepeat() }],
1892
+ "bg-size": [{ bg: scaleBgSize() }],
1893
+ "bg-image": [{ bg: [
1894
+ "none",
1895
+ {
1896
+ linear: [
1897
+ { to: [
1898
+ "t",
1899
+ "tr",
1900
+ "r",
1901
+ "br",
1902
+ "b",
1903
+ "bl",
1904
+ "l",
1905
+ "tl"
1906
+ ] },
1907
+ isInteger,
1908
+ isArbitraryVariable,
1909
+ isArbitraryValue
1910
+ ],
1911
+ radial: [
1912
+ "",
1913
+ isArbitraryVariable,
1914
+ isArbitraryValue
1915
+ ],
1916
+ conic: [
1917
+ isInteger,
1918
+ isArbitraryVariable,
1919
+ isArbitraryValue
1920
+ ]
1921
+ },
1922
+ isArbitraryVariableImage,
1923
+ isArbitraryImage
1924
+ ] }],
1925
+ "bg-color": [{ bg: scaleColor() }],
1926
+ "gradient-from-pos": [{ from: scaleGradientStopPosition() }],
1927
+ "gradient-via-pos": [{ via: scaleGradientStopPosition() }],
1928
+ "gradient-to-pos": [{ to: scaleGradientStopPosition() }],
1929
+ "gradient-from": [{ from: scaleColor() }],
1930
+ "gradient-via": [{ via: scaleColor() }],
1931
+ "gradient-to": [{ to: scaleColor() }],
1932
+ rounded: [{ rounded: scaleRadius() }],
1933
+ "rounded-s": [{ "rounded-s": scaleRadius() }],
1934
+ "rounded-e": [{ "rounded-e": scaleRadius() }],
1935
+ "rounded-t": [{ "rounded-t": scaleRadius() }],
1936
+ "rounded-r": [{ "rounded-r": scaleRadius() }],
1937
+ "rounded-b": [{ "rounded-b": scaleRadius() }],
1938
+ "rounded-l": [{ "rounded-l": scaleRadius() }],
1939
+ "rounded-ss": [{ "rounded-ss": scaleRadius() }],
1940
+ "rounded-se": [{ "rounded-se": scaleRadius() }],
1941
+ "rounded-ee": [{ "rounded-ee": scaleRadius() }],
1942
+ "rounded-es": [{ "rounded-es": scaleRadius() }],
1943
+ "rounded-tl": [{ "rounded-tl": scaleRadius() }],
1944
+ "rounded-tr": [{ "rounded-tr": scaleRadius() }],
1945
+ "rounded-br": [{ "rounded-br": scaleRadius() }],
1946
+ "rounded-bl": [{ "rounded-bl": scaleRadius() }],
1947
+ "border-w": [{ border: scaleBorderWidth() }],
1948
+ "border-w-x": [{ "border-x": scaleBorderWidth() }],
1949
+ "border-w-y": [{ "border-y": scaleBorderWidth() }],
1950
+ "border-w-s": [{ "border-s": scaleBorderWidth() }],
1951
+ "border-w-e": [{ "border-e": scaleBorderWidth() }],
1952
+ "border-w-t": [{ "border-t": scaleBorderWidth() }],
1953
+ "border-w-r": [{ "border-r": scaleBorderWidth() }],
1954
+ "border-w-b": [{ "border-b": scaleBorderWidth() }],
1955
+ "border-w-l": [{ "border-l": scaleBorderWidth() }],
1956
+ "divide-x": [{ "divide-x": scaleBorderWidth() }],
1957
+ "divide-x-reverse": ["divide-x-reverse"],
1958
+ "divide-y": [{ "divide-y": scaleBorderWidth() }],
1959
+ "divide-y-reverse": ["divide-y-reverse"],
1960
+ "border-style": [{ border: [
1961
+ ...scaleLineStyle(),
1962
+ "hidden",
1963
+ "none"
1964
+ ] }],
1965
+ "divide-style": [{ divide: [
1966
+ ...scaleLineStyle(),
1967
+ "hidden",
1968
+ "none"
1969
+ ] }],
1970
+ "border-color": [{ border: scaleColor() }],
1971
+ "border-color-x": [{ "border-x": scaleColor() }],
1972
+ "border-color-y": [{ "border-y": scaleColor() }],
1973
+ "border-color-s": [{ "border-s": scaleColor() }],
1974
+ "border-color-e": [{ "border-e": scaleColor() }],
1975
+ "border-color-t": [{ "border-t": scaleColor() }],
1976
+ "border-color-r": [{ "border-r": scaleColor() }],
1977
+ "border-color-b": [{ "border-b": scaleColor() }],
1978
+ "border-color-l": [{ "border-l": scaleColor() }],
1979
+ "divide-color": [{ divide: scaleColor() }],
1980
+ "outline-style": [{ outline: [
1981
+ ...scaleLineStyle(),
1982
+ "none",
1983
+ "hidden"
1984
+ ] }],
1985
+ "outline-offset": [{ "outline-offset": [
1986
+ isNumber,
1987
+ isArbitraryVariable,
1988
+ isArbitraryValue
1989
+ ] }],
1990
+ "outline-w": [{ outline: [
1991
+ "",
1992
+ isNumber,
1993
+ isArbitraryVariableLength,
1994
+ isArbitraryLength
1995
+ ] }],
1996
+ "outline-color": [{ outline: scaleColor() }],
1997
+ shadow: [{ shadow: [
1998
+ "",
1999
+ "none",
2000
+ themeShadow,
2001
+ isArbitraryVariableShadow,
2002
+ isArbitraryShadow
2003
+ ] }],
2004
+ "shadow-color": [{ shadow: scaleColor() }],
2005
+ "inset-shadow": [{ "inset-shadow": [
2006
+ "none",
2007
+ themeInsetShadow,
2008
+ isArbitraryVariableShadow,
2009
+ isArbitraryShadow
2010
+ ] }],
2011
+ "inset-shadow-color": [{ "inset-shadow": scaleColor() }],
2012
+ "ring-w": [{ ring: scaleBorderWidth() }],
2013
+ "ring-w-inset": ["ring-inset"],
2014
+ "ring-color": [{ ring: scaleColor() }],
2015
+ "ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
2016
+ "ring-offset-color": [{ "ring-offset": scaleColor() }],
2017
+ "inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
2018
+ "inset-ring-color": [{ "inset-ring": scaleColor() }],
2019
+ "text-shadow": [{ "text-shadow": [
2020
+ "none",
2021
+ themeTextShadow,
2022
+ isArbitraryVariableShadow,
2023
+ isArbitraryShadow
2024
+ ] }],
2025
+ "text-shadow-color": [{ "text-shadow": scaleColor() }],
2026
+ opacity: [{ opacity: [
2027
+ isNumber,
2028
+ isArbitraryVariable,
2029
+ isArbitraryValue
2030
+ ] }],
2031
+ "mix-blend": [{ "mix-blend": [
2032
+ ...scaleBlendMode(),
2033
+ "plus-darker",
2034
+ "plus-lighter"
2035
+ ] }],
2036
+ "bg-blend": [{ "bg-blend": scaleBlendMode() }],
2037
+ "mask-clip": [{ "mask-clip": [
2038
+ "border",
2039
+ "padding",
2040
+ "content",
2041
+ "fill",
2042
+ "stroke",
2043
+ "view"
2044
+ ] }, "mask-no-clip"],
2045
+ "mask-composite": [{ mask: [
2046
+ "add",
2047
+ "subtract",
2048
+ "intersect",
2049
+ "exclude"
2050
+ ] }],
2051
+ "mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
2052
+ "mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
2053
+ "mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
2054
+ "mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
2055
+ "mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
2056
+ "mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
2057
+ "mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
2058
+ "mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
2059
+ "mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
2060
+ "mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
2061
+ "mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
2062
+ "mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
2063
+ "mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
2064
+ "mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
2065
+ "mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
2066
+ "mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
2067
+ "mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
2068
+ "mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
2069
+ "mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
2070
+ "mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
2071
+ "mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
2072
+ "mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
2073
+ "mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
2074
+ "mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
2075
+ "mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
2076
+ "mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
2077
+ "mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
2078
+ "mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
2079
+ "mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
2080
+ "mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
2081
+ "mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
2082
+ "mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
2083
+ "mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
2084
+ "mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
2085
+ "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
2086
+ "mask-image-radial-size": [{ "mask-radial": [{
2087
+ closest: ["side", "corner"],
2088
+ farthest: ["side", "corner"]
2089
+ }] }],
2090
+ "mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
2091
+ "mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
2092
+ "mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
2093
+ "mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
2094
+ "mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
2095
+ "mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
2096
+ "mask-mode": [{ mask: [
2097
+ "alpha",
2098
+ "luminance",
2099
+ "match"
2100
+ ] }],
2101
+ "mask-origin": [{ "mask-origin": [
2102
+ "border",
2103
+ "padding",
2104
+ "content",
2105
+ "fill",
2106
+ "stroke",
2107
+ "view"
2108
+ ] }],
2109
+ "mask-position": [{ mask: scaleBgPosition() }],
2110
+ "mask-repeat": [{ mask: scaleBgRepeat() }],
2111
+ "mask-size": [{ mask: scaleBgSize() }],
2112
+ "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
2113
+ "mask-image": [{ mask: [
2114
+ "none",
2115
+ isArbitraryVariable,
2116
+ isArbitraryValue
2117
+ ] }],
2118
+ filter: [{ filter: [
2119
+ "",
2120
+ "none",
2121
+ isArbitraryVariable,
2122
+ isArbitraryValue
2123
+ ] }],
2124
+ blur: [{ blur: scaleBlur() }],
2125
+ brightness: [{ brightness: [
2126
+ isNumber,
2127
+ isArbitraryVariable,
2128
+ isArbitraryValue
2129
+ ] }],
2130
+ contrast: [{ contrast: [
2131
+ isNumber,
2132
+ isArbitraryVariable,
2133
+ isArbitraryValue
2134
+ ] }],
2135
+ "drop-shadow": [{ "drop-shadow": [
2136
+ "",
2137
+ "none",
2138
+ themeDropShadow,
2139
+ isArbitraryVariableShadow,
2140
+ isArbitraryShadow
2141
+ ] }],
2142
+ "drop-shadow-color": [{ "drop-shadow": scaleColor() }],
2143
+ grayscale: [{ grayscale: [
2144
+ "",
2145
+ isNumber,
2146
+ isArbitraryVariable,
2147
+ isArbitraryValue
2148
+ ] }],
2149
+ "hue-rotate": [{ "hue-rotate": [
2150
+ isNumber,
2151
+ isArbitraryVariable,
2152
+ isArbitraryValue
2153
+ ] }],
2154
+ invert: [{ invert: [
2155
+ "",
2156
+ isNumber,
2157
+ isArbitraryVariable,
2158
+ isArbitraryValue
2159
+ ] }],
2160
+ saturate: [{ saturate: [
2161
+ isNumber,
2162
+ isArbitraryVariable,
2163
+ isArbitraryValue
2164
+ ] }],
2165
+ sepia: [{ sepia: [
2166
+ "",
2167
+ isNumber,
2168
+ isArbitraryVariable,
2169
+ isArbitraryValue
2170
+ ] }],
2171
+ "backdrop-filter": [{ "backdrop-filter": [
2172
+ "",
2173
+ "none",
2174
+ isArbitraryVariable,
2175
+ isArbitraryValue
2176
+ ] }],
2177
+ "backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
2178
+ "backdrop-brightness": [{ "backdrop-brightness": [
2179
+ isNumber,
2180
+ isArbitraryVariable,
2181
+ isArbitraryValue
2182
+ ] }],
2183
+ "backdrop-contrast": [{ "backdrop-contrast": [
2184
+ isNumber,
2185
+ isArbitraryVariable,
2186
+ isArbitraryValue
2187
+ ] }],
2188
+ "backdrop-grayscale": [{ "backdrop-grayscale": [
2189
+ "",
2190
+ isNumber,
2191
+ isArbitraryVariable,
2192
+ isArbitraryValue
2193
+ ] }],
2194
+ "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
2195
+ isNumber,
2196
+ isArbitraryVariable,
2197
+ isArbitraryValue
2198
+ ] }],
2199
+ "backdrop-invert": [{ "backdrop-invert": [
2200
+ "",
2201
+ isNumber,
2202
+ isArbitraryVariable,
2203
+ isArbitraryValue
2204
+ ] }],
2205
+ "backdrop-opacity": [{ "backdrop-opacity": [
2206
+ isNumber,
2207
+ isArbitraryVariable,
2208
+ isArbitraryValue
2209
+ ] }],
2210
+ "backdrop-saturate": [{ "backdrop-saturate": [
2211
+ isNumber,
2212
+ isArbitraryVariable,
2213
+ isArbitraryValue
2214
+ ] }],
2215
+ "backdrop-sepia": [{ "backdrop-sepia": [
2216
+ "",
2217
+ isNumber,
2218
+ isArbitraryVariable,
2219
+ isArbitraryValue
2220
+ ] }],
2221
+ "border-collapse": [{ border: ["collapse", "separate"] }],
2222
+ "border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
2223
+ "border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
2224
+ "border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
2225
+ "table-layout": [{ table: ["auto", "fixed"] }],
2226
+ caption: [{ caption: ["top", "bottom"] }],
2227
+ transition: [{ transition: [
2228
+ "",
2229
+ "all",
2230
+ "colors",
2231
+ "opacity",
2232
+ "shadow",
2233
+ "transform",
2234
+ "none",
2235
+ isArbitraryVariable,
2236
+ isArbitraryValue
2237
+ ] }],
2238
+ "transition-behavior": [{ transition: ["normal", "discrete"] }],
2239
+ duration: [{ duration: [
2240
+ isNumber,
2241
+ "initial",
2242
+ isArbitraryVariable,
2243
+ isArbitraryValue
2244
+ ] }],
2245
+ ease: [{ ease: [
2246
+ "linear",
2247
+ "initial",
2248
+ themeEase,
2249
+ isArbitraryVariable,
2250
+ isArbitraryValue
2251
+ ] }],
2252
+ delay: [{ delay: [
2253
+ isNumber,
2254
+ isArbitraryVariable,
2255
+ isArbitraryValue
2256
+ ] }],
2257
+ animate: [{ animate: [
2258
+ "none",
2259
+ themeAnimate,
2260
+ isArbitraryVariable,
2261
+ isArbitraryValue
2262
+ ] }],
2263
+ backface: [{ backface: ["hidden", "visible"] }],
2264
+ perspective: [{ perspective: [
2265
+ themePerspective,
2266
+ isArbitraryVariable,
2267
+ isArbitraryValue
2268
+ ] }],
2269
+ "perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
2270
+ rotate: [{ rotate: scaleRotate() }],
2271
+ "rotate-x": [{ "rotate-x": scaleRotate() }],
2272
+ "rotate-y": [{ "rotate-y": scaleRotate() }],
2273
+ "rotate-z": [{ "rotate-z": scaleRotate() }],
2274
+ scale: [{ scale: scaleScale() }],
2275
+ "scale-x": [{ "scale-x": scaleScale() }],
2276
+ "scale-y": [{ "scale-y": scaleScale() }],
2277
+ "scale-z": [{ "scale-z": scaleScale() }],
2278
+ "scale-3d": ["scale-3d"],
2279
+ skew: [{ skew: scaleSkew() }],
2280
+ "skew-x": [{ "skew-x": scaleSkew() }],
2281
+ "skew-y": [{ "skew-y": scaleSkew() }],
2282
+ transform: [{ transform: [
2283
+ isArbitraryVariable,
2284
+ isArbitraryValue,
2285
+ "",
2286
+ "none",
2287
+ "gpu",
2288
+ "cpu"
2289
+ ] }],
2290
+ "transform-origin": [{ origin: scalePositionWithArbitrary() }],
2291
+ "transform-style": [{ transform: ["3d", "flat"] }],
2292
+ translate: [{ translate: scaleTranslate() }],
2293
+ "translate-x": [{ "translate-x": scaleTranslate() }],
2294
+ "translate-y": [{ "translate-y": scaleTranslate() }],
2295
+ "translate-z": [{ "translate-z": scaleTranslate() }],
2296
+ "translate-none": ["translate-none"],
2297
+ accent: [{ accent: scaleColor() }],
2298
+ appearance: [{ appearance: ["none", "auto"] }],
2299
+ "caret-color": [{ caret: scaleColor() }],
2300
+ "color-scheme": [{ scheme: [
2301
+ "normal",
2302
+ "dark",
2303
+ "light",
2304
+ "light-dark",
2305
+ "only-dark",
2306
+ "only-light"
2307
+ ] }],
2308
+ cursor: [{ cursor: [
2309
+ "auto",
2310
+ "default",
2311
+ "pointer",
2312
+ "wait",
2313
+ "text",
2314
+ "move",
2315
+ "help",
2316
+ "not-allowed",
2317
+ "none",
2318
+ "context-menu",
2319
+ "progress",
2320
+ "cell",
2321
+ "crosshair",
2322
+ "vertical-text",
2323
+ "alias",
2324
+ "copy",
2325
+ "no-drop",
2326
+ "grab",
2327
+ "grabbing",
2328
+ "all-scroll",
2329
+ "col-resize",
2330
+ "row-resize",
2331
+ "n-resize",
2332
+ "e-resize",
2333
+ "s-resize",
2334
+ "w-resize",
2335
+ "ne-resize",
2336
+ "nw-resize",
2337
+ "se-resize",
2338
+ "sw-resize",
2339
+ "ew-resize",
2340
+ "ns-resize",
2341
+ "nesw-resize",
2342
+ "nwse-resize",
2343
+ "zoom-in",
2344
+ "zoom-out",
2345
+ isArbitraryVariable,
2346
+ isArbitraryValue
2347
+ ] }],
2348
+ "field-sizing": [{ "field-sizing": ["fixed", "content"] }],
2349
+ "pointer-events": [{ "pointer-events": ["auto", "none"] }],
2350
+ resize: [{ resize: [
2351
+ "none",
2352
+ "",
2353
+ "y",
2354
+ "x"
2355
+ ] }],
2356
+ "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
2357
+ "scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
2358
+ "scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
2359
+ "scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
2360
+ "scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
2361
+ "scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
2362
+ "scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
2363
+ "scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
2364
+ "scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
2365
+ "scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
2366
+ "scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
2367
+ "scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
2368
+ "scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
2369
+ "scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
2370
+ "scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
2371
+ "scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
2372
+ "scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
2373
+ "scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
2374
+ "scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
2375
+ "snap-align": [{ snap: [
2376
+ "start",
2377
+ "end",
2378
+ "center",
2379
+ "align-none"
2380
+ ] }],
2381
+ "snap-stop": [{ snap: ["normal", "always"] }],
2382
+ "snap-type": [{ snap: [
2383
+ "none",
2384
+ "x",
2385
+ "y",
2386
+ "both"
2387
+ ] }],
2388
+ "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
2389
+ touch: [{ touch: [
2390
+ "auto",
2391
+ "none",
2392
+ "manipulation"
2393
+ ] }],
2394
+ "touch-x": [{ "touch-pan": [
2395
+ "x",
2396
+ "left",
2397
+ "right"
2398
+ ] }],
2399
+ "touch-y": [{ "touch-pan": [
2400
+ "y",
2401
+ "up",
2402
+ "down"
2403
+ ] }],
2404
+ "touch-pz": ["touch-pinch-zoom"],
2405
+ select: [{ select: [
2406
+ "none",
2407
+ "text",
2408
+ "all",
2409
+ "auto"
2410
+ ] }],
2411
+ "will-change": [{ "will-change": [
2412
+ "auto",
2413
+ "scroll",
2414
+ "contents",
2415
+ "transform",
2416
+ isArbitraryVariable,
2417
+ isArbitraryValue
2418
+ ] }],
2419
+ fill: [{ fill: ["none", ...scaleColor()] }],
2420
+ "stroke-w": [{ stroke: [
2421
+ isNumber,
2422
+ isArbitraryVariableLength,
2423
+ isArbitraryLength,
2424
+ isArbitraryNumber
2425
+ ] }],
2426
+ stroke: [{ stroke: ["none", ...scaleColor()] }],
2427
+ "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
2428
+ },
2429
+ conflictingClassGroups: {
2430
+ overflow: ["overflow-x", "overflow-y"],
2431
+ overscroll: ["overscroll-x", "overscroll-y"],
2432
+ inset: [
2433
+ "inset-x",
2434
+ "inset-y",
2435
+ "start",
2436
+ "end",
2437
+ "top",
2438
+ "right",
2439
+ "bottom",
2440
+ "left"
2441
+ ],
2442
+ "inset-x": ["right", "left"],
2443
+ "inset-y": ["top", "bottom"],
2444
+ flex: [
2445
+ "basis",
2446
+ "grow",
2447
+ "shrink"
2448
+ ],
2449
+ gap: ["gap-x", "gap-y"],
2450
+ p: [
2451
+ "px",
2452
+ "py",
2453
+ "ps",
2454
+ "pe",
2455
+ "pt",
2456
+ "pr",
2457
+ "pb",
2458
+ "pl"
2459
+ ],
2460
+ px: ["pr", "pl"],
2461
+ py: ["pt", "pb"],
2462
+ m: [
2463
+ "mx",
2464
+ "my",
2465
+ "ms",
2466
+ "me",
2467
+ "mt",
2468
+ "mr",
2469
+ "mb",
2470
+ "ml"
2471
+ ],
2472
+ mx: ["mr", "ml"],
2473
+ my: ["mt", "mb"],
2474
+ size: ["w", "h"],
2475
+ "font-size": ["leading"],
2476
+ "fvn-normal": [
2477
+ "fvn-ordinal",
2478
+ "fvn-slashed-zero",
2479
+ "fvn-figure",
2480
+ "fvn-spacing",
2481
+ "fvn-fraction"
2482
+ ],
2483
+ "fvn-ordinal": ["fvn-normal"],
2484
+ "fvn-slashed-zero": ["fvn-normal"],
2485
+ "fvn-figure": ["fvn-normal"],
2486
+ "fvn-spacing": ["fvn-normal"],
2487
+ "fvn-fraction": ["fvn-normal"],
2488
+ "line-clamp": ["display", "overflow"],
2489
+ rounded: [
2490
+ "rounded-s",
2491
+ "rounded-e",
2492
+ "rounded-t",
2493
+ "rounded-r",
2494
+ "rounded-b",
2495
+ "rounded-l",
2496
+ "rounded-ss",
2497
+ "rounded-se",
2498
+ "rounded-ee",
2499
+ "rounded-es",
2500
+ "rounded-tl",
2501
+ "rounded-tr",
2502
+ "rounded-br",
2503
+ "rounded-bl"
2504
+ ],
2505
+ "rounded-s": ["rounded-ss", "rounded-es"],
2506
+ "rounded-e": ["rounded-se", "rounded-ee"],
2507
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2508
+ "rounded-r": ["rounded-tr", "rounded-br"],
2509
+ "rounded-b": ["rounded-br", "rounded-bl"],
2510
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2511
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2512
+ "border-w": [
2513
+ "border-w-x",
2514
+ "border-w-y",
2515
+ "border-w-s",
2516
+ "border-w-e",
2517
+ "border-w-t",
2518
+ "border-w-r",
2519
+ "border-w-b",
2520
+ "border-w-l"
2521
+ ],
2522
+ "border-w-x": ["border-w-r", "border-w-l"],
2523
+ "border-w-y": ["border-w-t", "border-w-b"],
2524
+ "border-color": [
2525
+ "border-color-x",
2526
+ "border-color-y",
2527
+ "border-color-s",
2528
+ "border-color-e",
2529
+ "border-color-t",
2530
+ "border-color-r",
2531
+ "border-color-b",
2532
+ "border-color-l"
2533
+ ],
2534
+ "border-color-x": ["border-color-r", "border-color-l"],
2535
+ "border-color-y": ["border-color-t", "border-color-b"],
2536
+ translate: [
2537
+ "translate-x",
2538
+ "translate-y",
2539
+ "translate-none"
2540
+ ],
2541
+ "translate-none": [
2542
+ "translate",
2543
+ "translate-x",
2544
+ "translate-y",
2545
+ "translate-z"
2546
+ ],
2547
+ "scroll-m": [
2548
+ "scroll-mx",
2549
+ "scroll-my",
2550
+ "scroll-ms",
2551
+ "scroll-me",
2552
+ "scroll-mt",
2553
+ "scroll-mr",
2554
+ "scroll-mb",
2555
+ "scroll-ml"
2556
+ ],
2557
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
2558
+ "scroll-my": ["scroll-mt", "scroll-mb"],
2559
+ "scroll-p": [
2560
+ "scroll-px",
2561
+ "scroll-py",
2562
+ "scroll-ps",
2563
+ "scroll-pe",
2564
+ "scroll-pt",
2565
+ "scroll-pr",
2566
+ "scroll-pb",
2567
+ "scroll-pl"
2568
+ ],
2569
+ "scroll-px": ["scroll-pr", "scroll-pl"],
2570
+ "scroll-py": ["scroll-pt", "scroll-pb"],
2571
+ touch: [
2572
+ "touch-x",
2573
+ "touch-y",
2574
+ "touch-pz"
2575
+ ],
2576
+ "touch-x": ["touch"],
2577
+ "touch-y": ["touch"],
2578
+ "touch-pz": ["touch"]
2579
+ },
2580
+ conflictingClassGroupModifiers: { "font-size": ["leading"] },
2581
+ orderSensitiveModifiers: [
2582
+ "*",
2583
+ "**",
2584
+ "after",
2585
+ "backdrop",
2586
+ "before",
2587
+ "details-content",
2588
+ "file",
2589
+ "first-letter",
2590
+ "first-line",
2591
+ "marker",
2592
+ "placeholder",
2593
+ "selection"
2594
+ ]
2595
+ };
2596
+ };
2597
+ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2598
+
2599
+ //#endregion
2600
+ //#region ../common/dist/strings/tokenize.js
2601
+ function buildTokenizeFuncUsingSplitters(splitters) {
2602
+ splitters = Array.isArray(splitters) ? splitters : [splitters];
2603
+ const tokenize = (s) => {
2604
+ let r = s.split(splitters[0]).filter((t) => t != "" && t != void 0);
2605
+ for (const splitter of splitters.slice(1)) {
2606
+ const r0 = [...r];
2607
+ r = [];
2608
+ for (const s$1 of r0) r.push(...tokenizeFilterString(s$1, {
2609
+ splitter,
2610
+ filter: (t) => t != "" && t != void 0
2611
+ }));
2612
+ }
2613
+ return r;
2614
+ };
2615
+ return tokenize;
2616
+ }
2617
+ function buildArgTokenizeFunc(tokenize) {
2618
+ const argTokenize = (arg) => {
2619
+ if (arg == void 0) return [];
2620
+ else if (Array.isArray(arg)) {
2621
+ const r = [];
2622
+ for (const a of arg) r.push(...argTokenize(a));
2623
+ return r;
2624
+ } else return tokenize(arg);
2625
+ };
2626
+ return argTokenize;
2627
+ }
2628
+ const tokenizeBySpaces = buildTokenizeFuncUsingSplitters(/\s+/);
2629
+ const argTokenizeBySpaces = buildArgTokenizeFunc(tokenizeBySpaces);
2630
+ function tokenizeFilterString(s, options = {}) {
2631
+ const separator = options.splitter ?? /\s+/;
2632
+ const filter = options.filter ?? ((s$1) => s$1.length > 0);
2633
+ return s.split(separator).filter(filter);
2634
+ }
2635
+ function deduplicate(items) {
2636
+ const r = [];
2637
+ const itemSet = /* @__PURE__ */ new Set();
2638
+ for (const item of items) if (!itemSet.has(item)) {
2639
+ r.push(item);
2640
+ itemSet.add(item);
2641
+ }
2642
+ return r;
2643
+ }
2644
+
2645
+ //#endregion
2646
+ //#region ../common/dist/messages/logMessages.js
2647
+ const LogLevels = [
2648
+ "ERROR",
2649
+ "WARNING",
2650
+ "INFO",
2651
+ "DEBUG"
2652
+ ];
2653
+ const LogLevelsMap = /* @__PURE__ */ new Map();
2654
+ LogLevels.forEach((level, i) => {
2655
+ LogLevelsMap.set(level, LogLevels.length - i);
2656
+ });
2657
+
2658
+ //#endregion
2659
+ //#region src/stylers/normalizers.ts
2660
+ function twMergeNormalize(raw) {
2661
+ return tokenizeFilterString(twMerge(...raw));
2662
+ }
2663
+ function mainTagNormalize(rawTags, defaultTag) {
2664
+ return exclusiveTagsNormalize(rawTags, (tag) => tag.length == 1 && tag.toUpperCase() == tag, defaultTag);
2665
+ }
2666
+ function exclusiveTagsNormalize(rawTags, tagSet, defaultTag) {
2667
+ const rhead = [];
2668
+ const rtail = [];
2669
+ let rtag = void 0;
2670
+ const tagSetFunc = typeof tagSet == "function" ? tagSet : (tag) => tagSet.has(tag);
2671
+ for (const tag of rawTags) if (tagSetFunc(tag)) {
2672
+ rtag = tag;
2673
+ rhead.push(...rtail);
2674
+ rtail.length = 0;
2675
+ } else if (rtag == void 0) rhead.push(tag);
2676
+ else rtail.push(tag);
2677
+ rtag = rtag ?? defaultTag;
2678
+ return rtag == void 0 ? [...rhead, ...rtail] : [
2679
+ ...rhead,
2680
+ rtag,
2681
+ ...rtail
2682
+ ];
2683
+ }
2684
+
2685
+ //#endregion
2686
+ //#region src/stylers/SVTStyler.ts
2687
+ var SVTStyler = class SVTStyler {
2688
+ _rules = [];
2689
+ options;
2690
+ constructor(rules, options = {}) {
2691
+ for (const r of rules) this._rules.push(SVTStyler.normalizeRule(r));
2692
+ this.options = { ...options };
2693
+ }
2694
+ with(rules, options = {}) {
2695
+ const addedRules = [];
2696
+ for (const r of rules) addedRules.push(SVTStyler.normalizeRule(r));
2697
+ const styler = new SVTStyler([], { ...this.options });
2698
+ styler._rules.push(...this._rules, ...addedRules);
2699
+ return styler;
2700
+ }
2701
+ classes(stags, vtags) {
2702
+ const r = [];
2703
+ let stagsNormalized = argTokenizeBySpaces(stags);
2704
+ let vtagsNormalized = argTokenizeBySpaces(vtags);
2705
+ if (this.options.stagsNormaliser) stagsNormalized = this.options.stagsNormaliser(stagsNormalized);
2706
+ if (this.options.vtagsNormaliser) vtagsNormalized = this.options.vtagsNormaliser(vtagsNormalized);
2707
+ for (const rule of this._rules) if (this.ruleMatches(rule, stagsNormalized, vtagsNormalized)) r.push(...rule.classes);
2708
+ return this.options.normalizer ? this.options.normalizer(r) : r;
2709
+ }
2710
+ static normalizeRule(rule) {
2711
+ let stagMode = rule.stagMode ?? "or";
2712
+ let vtagMode = rule.vtagMode ?? "or";
2713
+ let stags = deduplicate(argTokenizeBySpaces(rule.stags));
2714
+ let vtags = deduplicate(argTokenizeBySpaces(rule.vtags));
2715
+ let classes = deduplicate(argTokenizeBySpaces(rule.classes));
2716
+ if (rule.stags == void 0 && rule.stagMode == void 0) stagMode = "any";
2717
+ if (rule.vtags == void 0 && rule.vtagMode == void 0) vtagMode = "any";
2718
+ return {
2719
+ stagRule: {
2720
+ mode: stagMode,
2721
+ tags: stags
2722
+ },
2723
+ vtagRule: {
2724
+ mode: vtagMode,
2725
+ tags: vtags
2726
+ },
2727
+ classes
2728
+ };
2729
+ }
2730
+ ruleMatches(rule, stags, vtags) {
2731
+ return tagRuleMatches(rule.stagRule, stags) && tagRuleMatches(rule.vtagRule, vtags);
2732
+ }
2733
+ };
2734
+ function tagRuleMatches(rule, candidateTags) {
2735
+ if (rule.mode == "any") return true;
2736
+ else if (rule.mode == "or") {
2737
+ for (const ctag of candidateTags) if (rule.tags.indexOf(ctag) >= 0) return true;
2738
+ return false;
2739
+ } else if (rule.mode == "and") {
2740
+ for (const rtag of rule.tags) if (candidateTags.indexOf(rtag) < 0) return false;
2741
+ return true;
2742
+ }
2743
+ return false;
2744
+ }
2745
+
2746
+ //#endregion
2747
+ //#region src/stylers/base.styler.ts
2748
+ const baseStyler = new SVTStyler([
2749
+ {
2750
+ vtags: "A",
2751
+ classes: "bg-slate-100 text-slate-800"
2752
+ },
2753
+ {
2754
+ vtags: "B",
2755
+ classes: "bg-slate-800 text-slate-100"
2756
+ },
2757
+ {
2758
+ vtags: "C",
2759
+ classes: "bg-stone-300 text-orange-950"
2760
+ },
2761
+ {
2762
+ vtags: "D",
2763
+ classes: "bg-orange-900 text-stone-100"
2764
+ },
2765
+ {
2766
+ vtags: "LG",
2767
+ classes: "text-xl p-2"
2768
+ },
2769
+ {
2770
+ vtags: "BASE",
2771
+ classes: "text-base p-1"
2772
+ },
2773
+ {
2774
+ vtags: "SM",
2775
+ classes: "text-sm p-0.5"
2776
+ },
2777
+ {
2778
+ vtags: "LG",
2779
+ stags: "item",
2780
+ classes: "text-xl px-2 py-1"
2781
+ },
2782
+ {
2783
+ vtags: "BASE",
2784
+ stags: "item",
2785
+ classes: "text-base px-1 py-0.5"
2786
+ },
2787
+ {
2788
+ vtags: "SM",
2789
+ stags: "item",
2790
+ classes: "text-sm p-0.5"
2791
+ },
2792
+ {
2793
+ stags: "item:selected",
2794
+ classes: "underline font-bold"
2795
+ },
2796
+ {
2797
+ stags: "item:disabled",
2798
+ classes: "blur-[1px]"
2799
+ },
2800
+ {
2801
+ stags: "item/disabler",
2802
+ classes: "bg-slate-300/85 cursor-not-allowed"
2803
+ }
2804
+ ], {
2805
+ normalizer: twMergeNormalize,
2806
+ vtagsNormaliser: (tags) => exclusiveTagsNormalize(mainTagNormalize(tags, "A"), new Set([
2807
+ "SM",
2808
+ "BASE",
2809
+ "LG"
2810
+ ]), "BASE")
2811
+ });
2812
+
2813
+ //#endregion
2814
+ //#region src/stylers/Stylers.ts
2815
+ var Stylers = class {
2816
+ static _base;
2817
+ static _stylersMap = /* @__PURE__ */ new Map();
2818
+ static get base() {
2819
+ return this._base;
2820
+ }
2821
+ static setBase(base) {
2822
+ return this._base = base;
2823
+ }
2824
+ static {
2825
+ this._stylersMap.set("default", baseStyler);
2826
+ this.setBase(baseStyler);
2827
+ }
2828
+ static get(name) {
2829
+ return this._stylersMap.get(name);
2830
+ }
2831
+ };
2832
+
2833
+ //#endregion
2834
+ //#region src/items/Item.tsx
2835
+ const Item = (props) => {
2836
+ const itemData = () => {
2837
+ const r = buildIdLabel(props.idLabel);
2838
+ if (props.selected) r.label = `[${r.label}]`;
2839
+ return r;
2840
+ };
2841
+ const currentSTags = () => {
2842
+ const r = [];
2843
+ r.push("item");
2844
+ if (props.selected) r.push("item:selected");
2845
+ if (props.disabled) r.push("item:disabled");
2846
+ return r;
2847
+ };
2848
+ const currentStyler = () => {
2849
+ if (props.styler) return props.styler;
2850
+ else return Stylers.base;
2851
+ };
2852
+ const classProp = createMemo(() => {
2853
+ if (props.class == void 0) return {};
2854
+ else if (typeof props.class == "string") return { item: props.class };
2855
+ else return props.class;
2856
+ });
2857
+ const itemClasses = () => {
2858
+ const stags = currentSTags();
2859
+ const styler = currentStyler();
2860
+ const rawClasses = [];
2861
+ const stylerClasses = styler ? styler.classes(stags, props.vtags) : void 0;
2862
+ rawClasses.push(...stylerClasses ?? []);
2863
+ if (props.callback) rawClasses.push("select-none cursor-pointer");
2864
+ const customClasses = classProp();
2865
+ if (customClasses.item) rawClasses.push(customClasses.item);
2866
+ if (props.selected && customClasses.selected) rawClasses.push(customClasses.selected);
2867
+ if (props.disabled && customClasses.disabled) rawClasses.push(customClasses.disabled);
2868
+ rawClasses.push("relative");
2869
+ return twMerge(rawClasses);
2870
+ };
2871
+ const disablerClasses = createMemo(() => {
2872
+ const rawClasses = [];
2873
+ if (currentStyler()) rawClasses.push(...currentStyler().classes("item/disabler", props.vtags));
2874
+ if (classProp().disabler) rawClasses.push(classProp().disabler);
2875
+ rawClasses.push("absolute inset-0");
2876
+ return twMerge(rawClasses);
2877
+ });
2878
+ function handleClick() {
2879
+ if (props.callback != void 0) props.callback(itemData());
2880
+ }
2881
+ return <div onClick={handleClick} class={itemClasses()}>
2882
+ {itemData().label}
2883
+ <Show when={props.disabled}>
2884
+ <div class={disablerClasses()} onClick={(e) => {
2885
+ if (!props.clickableWhendisabled) e.stopPropagation();
2886
+ }}></div>
2887
+ </Show>
2888
+ </div>;
2889
+ };
2890
+
2891
+ //#endregion
2892
+ //#region ../../node_modules/solid-js/web/dist/web.js
2893
+ const Properties = /* @__PURE__ */ new Set([
2894
+ "className",
2895
+ "value",
2896
+ "readOnly",
2897
+ "noValidate",
2898
+ "formNoValidate",
2899
+ "isMap",
2900
+ "noModule",
2901
+ "playsInline",
2902
+ "adAuctionHeaders",
2903
+ "allowFullscreen",
2904
+ "browsingTopics",
2905
+ "defaultChecked",
2906
+ "defaultMuted",
2907
+ "defaultSelected",
2908
+ "disablePictureInPicture",
2909
+ "disableRemotePlayback",
2910
+ "preservesPitch",
2911
+ "shadowRootClonable",
2912
+ "shadowRootCustomElementRegistry",
2913
+ "shadowRootDelegatesFocus",
2914
+ "shadowRootSerializable",
2915
+ "sharedStorageWritable",
2916
+ ...[
2917
+ "allowfullscreen",
2918
+ "async",
2919
+ "alpha",
2920
+ "autofocus",
2921
+ "autoplay",
2922
+ "checked",
2923
+ "controls",
2924
+ "default",
2925
+ "disabled",
2926
+ "formnovalidate",
2927
+ "hidden",
2928
+ "indeterminate",
2929
+ "inert",
2930
+ "ismap",
2931
+ "loop",
2932
+ "multiple",
2933
+ "muted",
2934
+ "nomodule",
2935
+ "novalidate",
2936
+ "open",
2937
+ "playsinline",
2938
+ "readonly",
2939
+ "required",
2940
+ "reversed",
2941
+ "seamless",
2942
+ "selected",
2943
+ "adauctionheaders",
2944
+ "browsingtopics",
2945
+ "credentialless",
2946
+ "defaultchecked",
2947
+ "defaultmuted",
2948
+ "defaultselected",
2949
+ "defer",
2950
+ "disablepictureinpicture",
2951
+ "disableremoteplayback",
2952
+ "preservespitch",
2953
+ "shadowrootclonable",
2954
+ "shadowrootcustomelementregistry",
2955
+ "shadowrootdelegatesfocus",
2956
+ "shadowrootserializable",
2957
+ "sharedstoragewritable"
2958
+ ]
2959
+ ]);
2960
+ const ChildProperties = /* @__PURE__ */ new Set([
2961
+ "innerHTML",
2962
+ "textContent",
2963
+ "innerText",
2964
+ "children"
2965
+ ]);
2966
+ const Aliases = /* @__PURE__ */ Object.assign(Object.create(null), {
2967
+ className: "class",
2968
+ htmlFor: "for"
2969
+ });
2970
+ const PropAliases = /* @__PURE__ */ Object.assign(Object.create(null), {
2971
+ class: "className",
2972
+ novalidate: {
2973
+ $: "noValidate",
2974
+ FORM: 1
2975
+ },
2976
+ formnovalidate: {
2977
+ $: "formNoValidate",
2978
+ BUTTON: 1,
2979
+ INPUT: 1
2980
+ },
2981
+ ismap: {
2982
+ $: "isMap",
2983
+ IMG: 1
2984
+ },
2985
+ nomodule: {
2986
+ $: "noModule",
2987
+ SCRIPT: 1
2988
+ },
2989
+ playsinline: {
2990
+ $: "playsInline",
2991
+ VIDEO: 1
2992
+ },
2993
+ readonly: {
2994
+ $: "readOnly",
2995
+ INPUT: 1,
2996
+ TEXTAREA: 1
2997
+ },
2998
+ adauctionheaders: {
2999
+ $: "adAuctionHeaders",
3000
+ IFRAME: 1
3001
+ },
3002
+ allowfullscreen: {
3003
+ $: "allowFullscreen",
3004
+ IFRAME: 1
3005
+ },
3006
+ browsingtopics: {
3007
+ $: "browsingTopics",
3008
+ IMG: 1
3009
+ },
3010
+ defaultchecked: {
3011
+ $: "defaultChecked",
3012
+ INPUT: 1
3013
+ },
3014
+ defaultmuted: {
3015
+ $: "defaultMuted",
3016
+ AUDIO: 1,
3017
+ VIDEO: 1
3018
+ },
3019
+ defaultselected: {
3020
+ $: "defaultSelected",
3021
+ OPTION: 1
3022
+ },
3023
+ disablepictureinpicture: {
3024
+ $: "disablePictureInPicture",
3025
+ VIDEO: 1
3026
+ },
3027
+ disableremoteplayback: {
3028
+ $: "disableRemotePlayback",
3029
+ AUDIO: 1,
3030
+ VIDEO: 1
3031
+ },
3032
+ preservespitch: {
3033
+ $: "preservesPitch",
3034
+ AUDIO: 1,
3035
+ VIDEO: 1
3036
+ },
3037
+ shadowrootclonable: {
3038
+ $: "shadowRootClonable",
3039
+ TEMPLATE: 1
3040
+ },
3041
+ shadowrootdelegatesfocus: {
3042
+ $: "shadowRootDelegatesFocus",
3043
+ TEMPLATE: 1
3044
+ },
3045
+ shadowrootserializable: {
3046
+ $: "shadowRootSerializable",
3047
+ TEMPLATE: 1
3048
+ },
3049
+ sharedstoragewritable: {
3050
+ $: "sharedStorageWritable",
3051
+ IFRAME: 1,
3052
+ IMG: 1
3053
+ }
3054
+ });
3055
+ function getPropAlias(prop, tagName) {
3056
+ const a = PropAliases[prop];
3057
+ return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
3058
+ }
3059
+ const DelegatedEvents = /* @__PURE__ */ new Set([
3060
+ "beforeinput",
3061
+ "click",
3062
+ "dblclick",
3063
+ "contextmenu",
3064
+ "focusin",
3065
+ "focusout",
3066
+ "input",
3067
+ "keydown",
3068
+ "keyup",
3069
+ "mousedown",
3070
+ "mousemove",
3071
+ "mouseout",
3072
+ "mouseover",
3073
+ "mouseup",
3074
+ "pointerdown",
3075
+ "pointermove",
3076
+ "pointerout",
3077
+ "pointerover",
3078
+ "pointerup",
3079
+ "touchend",
3080
+ "touchmove",
3081
+ "touchstart"
3082
+ ]);
3083
+ const SVGElements = /* @__PURE__ */ new Set([
3084
+ "altGlyph",
3085
+ "altGlyphDef",
3086
+ "altGlyphItem",
3087
+ "animate",
3088
+ "animateColor",
3089
+ "animateMotion",
3090
+ "animateTransform",
3091
+ "circle",
3092
+ "clipPath",
3093
+ "color-profile",
3094
+ "cursor",
3095
+ "defs",
3096
+ "desc",
3097
+ "ellipse",
3098
+ "feBlend",
3099
+ "feColorMatrix",
3100
+ "feComponentTransfer",
3101
+ "feComposite",
3102
+ "feConvolveMatrix",
3103
+ "feDiffuseLighting",
3104
+ "feDisplacementMap",
3105
+ "feDistantLight",
3106
+ "feDropShadow",
3107
+ "feFlood",
3108
+ "feFuncA",
3109
+ "feFuncB",
3110
+ "feFuncG",
3111
+ "feFuncR",
3112
+ "feGaussianBlur",
3113
+ "feImage",
3114
+ "feMerge",
3115
+ "feMergeNode",
3116
+ "feMorphology",
3117
+ "feOffset",
3118
+ "fePointLight",
3119
+ "feSpecularLighting",
3120
+ "feSpotLight",
3121
+ "feTile",
3122
+ "feTurbulence",
3123
+ "filter",
3124
+ "font",
3125
+ "font-face",
3126
+ "font-face-format",
3127
+ "font-face-name",
3128
+ "font-face-src",
3129
+ "font-face-uri",
3130
+ "foreignObject",
3131
+ "g",
3132
+ "glyph",
3133
+ "glyphRef",
3134
+ "hkern",
3135
+ "image",
3136
+ "line",
3137
+ "linearGradient",
3138
+ "marker",
3139
+ "mask",
3140
+ "metadata",
3141
+ "missing-glyph",
3142
+ "mpath",
3143
+ "path",
3144
+ "pattern",
3145
+ "polygon",
3146
+ "polyline",
3147
+ "radialGradient",
3148
+ "rect",
3149
+ "set",
3150
+ "stop",
3151
+ "svg",
3152
+ "switch",
3153
+ "symbol",
3154
+ "text",
3155
+ "textPath",
3156
+ "tref",
3157
+ "tspan",
3158
+ "use",
3159
+ "view",
3160
+ "vkern"
3161
+ ]);
3162
+ const SVGNamespace = {
3163
+ xlink: "http://www.w3.org/1999/xlink",
3164
+ xml: "http://www.w3.org/XML/1998/namespace"
3165
+ };
3166
+ function reconcileArrays(parentNode, a, b) {
3167
+ let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
3168
+ while (aStart < aEnd || bStart < bEnd) {
3169
+ if (a[aStart] === b[bStart]) {
3170
+ aStart++;
3171
+ bStart++;
3172
+ continue;
3173
+ }
3174
+ while (a[aEnd - 1] === b[bEnd - 1]) {
3175
+ aEnd--;
3176
+ bEnd--;
3177
+ }
3178
+ if (aEnd === aStart) {
3179
+ const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
3180
+ while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
3181
+ } else if (bEnd === bStart) while (aStart < aEnd) {
3182
+ if (!map || !map.has(a[aStart])) a[aStart].remove();
3183
+ aStart++;
3184
+ }
3185
+ else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
3186
+ const node = a[--aEnd].nextSibling;
3187
+ parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
3188
+ parentNode.insertBefore(b[--bEnd], node);
3189
+ a[aEnd] = b[bEnd];
3190
+ } else {
3191
+ if (!map) {
3192
+ map = /* @__PURE__ */ new Map();
3193
+ let i = bStart;
3194
+ while (i < bEnd) map.set(b[i], i++);
3195
+ }
3196
+ const index = map.get(a[aStart]);
3197
+ if (index != null) if (bStart < index && index < bEnd) {
3198
+ let i = aStart, sequence = 1, t;
3199
+ while (++i < aEnd && i < bEnd) {
3200
+ if ((t = map.get(a[i])) == null || t !== index + sequence) break;
3201
+ sequence++;
3202
+ }
3203
+ if (sequence > index - bStart) {
3204
+ const node = a[aStart];
3205
+ while (bStart < index) parentNode.insertBefore(b[bStart++], node);
3206
+ } else parentNode.replaceChild(b[bStart++], a[aStart++]);
3207
+ } else aStart++;
3208
+ else a[aStart++].remove();
3209
+ }
3210
+ }
3211
+ }
3212
+ const $$EVENTS = "_$DX_DELEGATE";
3213
+ function delegateEvents(eventNames, document$1 = window.document) {
3214
+ const e = document$1[$$EVENTS] || (document$1[$$EVENTS] = /* @__PURE__ */ new Set());
3215
+ for (let i = 0, l = eventNames.length; i < l; i++) {
3216
+ const name = eventNames[i];
3217
+ if (!e.has(name)) {
3218
+ e.add(name);
3219
+ document$1.addEventListener(name, eventHandler);
3220
+ }
3221
+ }
3222
+ }
3223
+ function setAttribute(node, name, value) {
3224
+ if (isHydrating(node)) return;
3225
+ if (value == null) node.removeAttribute(name);
3226
+ else node.setAttribute(name, value);
3227
+ }
3228
+ function setAttributeNS(node, namespace, name, value) {
3229
+ if (isHydrating(node)) return;
3230
+ if (value == null) node.removeAttributeNS(namespace, name);
3231
+ else node.setAttributeNS(namespace, name, value);
3232
+ }
3233
+ function setBoolAttribute(node, name, value) {
3234
+ if (isHydrating(node)) return;
3235
+ value ? node.setAttribute(name, "") : node.removeAttribute(name);
3236
+ }
3237
+ function className(node, value) {
3238
+ if (isHydrating(node)) return;
3239
+ if (value == null) node.removeAttribute("class");
3240
+ else node.className = value;
3241
+ }
3242
+ function addEventListener(node, name, handler, delegate) {
3243
+ if (delegate) if (Array.isArray(handler)) {
3244
+ node[`$$${name}`] = handler[0];
3245
+ node[`$$${name}Data`] = handler[1];
3246
+ } else node[`$$${name}`] = handler;
3247
+ else if (Array.isArray(handler)) {
3248
+ const handlerFn = handler[0];
3249
+ node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
3250
+ } else node.addEventListener(name, handler, typeof handler !== "function" && handler);
3251
+ }
3252
+ function classList(node, value, prev = {}) {
3253
+ const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
3254
+ let i, len;
3255
+ for (i = 0, len = prevKeys.length; i < len; i++) {
3256
+ const key = prevKeys[i];
3257
+ if (!key || key === "undefined" || value[key]) continue;
3258
+ toggleClassKey(node, key, false);
3259
+ delete prev[key];
3260
+ }
3261
+ for (i = 0, len = classKeys.length; i < len; i++) {
3262
+ const key = classKeys[i], classValue = !!value[key];
3263
+ if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
3264
+ toggleClassKey(node, key, true);
3265
+ prev[key] = classValue;
3266
+ }
3267
+ return prev;
3268
+ }
3269
+ function style(node, value, prev) {
3270
+ if (!value) return prev ? setAttribute(node, "style") : value;
3271
+ const nodeStyle = node.style;
3272
+ if (typeof value === "string") return nodeStyle.cssText = value;
3273
+ typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
3274
+ prev || (prev = {});
3275
+ value || (value = {});
3276
+ let v, s;
3277
+ for (s in prev) {
3278
+ value[s] ?? nodeStyle.removeProperty(s);
3279
+ delete prev[s];
3280
+ }
3281
+ for (s in value) {
3282
+ v = value[s];
3283
+ if (v !== prev[s]) {
3284
+ nodeStyle.setProperty(s, v);
3285
+ prev[s] = v;
3286
+ }
3287
+ }
3288
+ return prev;
3289
+ }
3290
+ function spread(node, props = {}, isSVG, skipChildren) {
3291
+ const prevProps = {};
3292
+ if (!skipChildren) createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
3293
+ createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
3294
+ createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
3295
+ return prevProps;
3296
+ }
3297
+ function use(fn, element, arg) {
3298
+ return untrack(() => fn(element, arg));
3299
+ }
3300
+ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
3301
+ props || (props = {});
3302
+ for (const prop in prevProps) if (!(prop in props)) {
3303
+ if (prop === "children") continue;
3304
+ prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
3305
+ }
3306
+ for (const prop in props) {
3307
+ if (prop === "children") {
3308
+ if (!skipChildren) insertExpression(node, props.children);
3309
+ continue;
3310
+ }
3311
+ const value = props[prop];
3312
+ prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);
3313
+ }
3314
+ }
3315
+ function getNextElement(template) {
3316
+ let node, key;
3317
+ if (!isHydrating() || !(node = sharedConfig.registry.get(key = getHydrationKey()))) return template();
3318
+ if (sharedConfig.completed) sharedConfig.completed.add(node);
3319
+ sharedConfig.registry.delete(key);
3320
+ return node;
3321
+ }
3322
+ function isHydrating(node) {
3323
+ return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);
3324
+ }
3325
+ function toPropertyName(name) {
3326
+ return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
3327
+ }
3328
+ function toggleClassKey(node, key, value) {
3329
+ const classNames = key.trim().split(/\s+/);
3330
+ for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
3331
+ }
3332
+ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
3333
+ let isCE, isProp, isChildProp, propAlias, forceProp;
3334
+ if (prop === "style") return style(node, value, prev);
3335
+ if (prop === "classList") return classList(node, value, prev);
3336
+ if (value === prev) return prev;
3337
+ if (prop === "ref") {
3338
+ if (!skipRef) value(node);
3339
+ } else if (prop.slice(0, 3) === "on:") {
3340
+ const e = prop.slice(3);
3341
+ prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
3342
+ value && node.addEventListener(e, value, typeof value !== "function" && value);
3343
+ } else if (prop.slice(0, 10) === "oncapture:") {
3344
+ const e = prop.slice(10);
3345
+ prev && node.removeEventListener(e, prev, true);
3346
+ value && node.addEventListener(e, value, true);
3347
+ } else if (prop.slice(0, 2) === "on") {
3348
+ const name = prop.slice(2).toLowerCase();
3349
+ const delegate = DelegatedEvents.has(name);
3350
+ if (!delegate && prev) {
3351
+ const h = Array.isArray(prev) ? prev[0] : prev;
3352
+ node.removeEventListener(name, h);
3353
+ }
3354
+ if (delegate || value) {
3355
+ addEventListener(node, name, value, delegate);
3356
+ delegate && delegateEvents([name]);
3357
+ }
3358
+ } else if (prop.slice(0, 5) === "attr:") setAttribute(node, prop.slice(5), value);
3359
+ else if (prop.slice(0, 5) === "bool:") setBoolAttribute(node, prop.slice(5), value);
3360
+ else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-") || "is" in props)) {
3361
+ if (forceProp) {
3362
+ prop = prop.slice(5);
3363
+ isProp = true;
3364
+ } else if (isHydrating(node)) return value;
3365
+ if (prop === "class" || prop === "className") className(node, value);
3366
+ else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
3367
+ else node[propAlias || prop] = value;
3368
+ } else {
3369
+ const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
3370
+ if (ns) setAttributeNS(node, ns, prop, value);
3371
+ else setAttribute(node, Aliases[prop] || prop, value);
3372
+ }
3373
+ return value;
3374
+ }
3375
+ function eventHandler(e) {
3376
+ if (sharedConfig.registry && sharedConfig.events) {
3377
+ if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
3378
+ }
3379
+ let node = e.target;
3380
+ const key = `$$${e.type}`;
3381
+ const oriTarget = e.target;
3382
+ const oriCurrentTarget = e.currentTarget;
3383
+ const retarget = (value) => Object.defineProperty(e, "target", {
3384
+ configurable: true,
3385
+ value
3386
+ });
3387
+ const handleNode = () => {
3388
+ const handler = node[key];
3389
+ if (handler && !node.disabled) {
3390
+ const data = node[`${key}Data`];
3391
+ data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
3392
+ if (e.cancelBubble) return;
3393
+ }
3394
+ node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
3395
+ return true;
3396
+ };
3397
+ const walkUpTree = () => {
3398
+ while (handleNode() && (node = node._$host || node.parentNode || node.host));
3399
+ };
3400
+ Object.defineProperty(e, "currentTarget", {
3401
+ configurable: true,
3402
+ get() {
3403
+ return node || document;
3404
+ }
3405
+ });
3406
+ if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
3407
+ if (e.composedPath) {
3408
+ const path = e.composedPath();
3409
+ retarget(path[0]);
3410
+ for (let i = 0; i < path.length - 2; i++) {
3411
+ node = path[i];
3412
+ if (!handleNode()) break;
3413
+ if (node._$host) {
3414
+ node = node._$host;
3415
+ walkUpTree();
3416
+ break;
3417
+ }
3418
+ if (node.parentNode === oriCurrentTarget) break;
3419
+ }
3420
+ } else walkUpTree();
3421
+ retarget(oriTarget);
3422
+ }
3423
+ function insertExpression(parent, value, current, marker, unwrapArray) {
3424
+ const hydrating = isHydrating(parent);
3425
+ if (hydrating) {
3426
+ !current && (current = [...parent.childNodes]);
3427
+ let cleaned = [];
3428
+ for (let i = 0; i < current.length; i++) {
3429
+ const node = current[i];
3430
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
3431
+ else cleaned.push(node);
3432
+ }
3433
+ current = cleaned;
3434
+ }
3435
+ while (typeof current === "function") current = current();
3436
+ if (value === current) return current;
3437
+ const t = typeof value, multi = marker !== void 0;
3438
+ parent = multi && current[0] && current[0].parentNode || parent;
3439
+ if (t === "string" || t === "number") {
3440
+ if (hydrating) return current;
3441
+ if (t === "number") {
3442
+ value = value.toString();
3443
+ if (value === current) return current;
3444
+ }
3445
+ if (multi) {
3446
+ let node = current[0];
3447
+ if (node && node.nodeType === 3) node.data !== value && (node.data = value);
3448
+ else node = document.createTextNode(value);
3449
+ current = cleanChildren(parent, current, marker, node);
3450
+ } else if (current !== "" && typeof current === "string") current = parent.firstChild.data = value;
3451
+ else current = parent.textContent = value;
3452
+ } else if (value == null || t === "boolean") {
3453
+ if (hydrating) return current;
3454
+ current = cleanChildren(parent, current, marker);
3455
+ } else if (t === "function") {
3456
+ createRenderEffect(() => {
3457
+ let v = value();
3458
+ while (typeof v === "function") v = v();
3459
+ current = insertExpression(parent, v, current, marker);
3460
+ });
3461
+ return () => current;
3462
+ } else if (Array.isArray(value)) {
3463
+ const array = [];
3464
+ const currentArray = current && Array.isArray(current);
3465
+ if (normalizeIncomingArray(array, value, current, unwrapArray)) {
3466
+ createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
3467
+ return () => current;
3468
+ }
3469
+ if (hydrating) {
3470
+ if (!array.length) return current;
3471
+ if (marker === void 0) return current = [...parent.childNodes];
3472
+ let node = array[0];
3473
+ if (node.parentNode !== parent) return current;
3474
+ const nodes = [node];
3475
+ while ((node = node.nextSibling) !== marker) nodes.push(node);
3476
+ return current = nodes;
3477
+ }
3478
+ if (array.length === 0) {
3479
+ current = cleanChildren(parent, current, marker);
3480
+ if (multi) return current;
3481
+ } else if (currentArray) if (current.length === 0) appendNodes(parent, array, marker);
3482
+ else reconcileArrays(parent, current, array);
3483
+ else {
3484
+ current && cleanChildren(parent);
3485
+ appendNodes(parent, array);
3486
+ }
3487
+ current = array;
3488
+ } else if (value.nodeType) {
3489
+ if (hydrating && value.parentNode) return current = multi ? [value] : value;
3490
+ if (Array.isArray(current)) {
3491
+ if (multi) return current = cleanChildren(parent, current, marker, value);
3492
+ cleanChildren(parent, current, null, value);
3493
+ } else if (current == null || current === "" || !parent.firstChild) parent.appendChild(value);
3494
+ else parent.replaceChild(value, parent.firstChild);
3495
+ current = value;
3496
+ }
3497
+ return current;
3498
+ }
3499
+ function normalizeIncomingArray(normalized, array, current, unwrap) {
3500
+ let dynamic = false;
3501
+ for (let i = 0, len = array.length; i < len; i++) {
3502
+ let item = array[i], prev = current && current[normalized.length], t;
3503
+ if (item == null || item === true || item === false);
3504
+ else if ((t = typeof item) === "object" && item.nodeType) normalized.push(item);
3505
+ else if (Array.isArray(item)) dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
3506
+ else if (t === "function") if (unwrap) {
3507
+ while (typeof item === "function") item = item();
3508
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
3509
+ } else {
3510
+ normalized.push(item);
3511
+ dynamic = true;
3512
+ }
3513
+ else {
3514
+ const value = String(item);
3515
+ if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
3516
+ else normalized.push(document.createTextNode(value));
3517
+ }
3518
+ }
3519
+ return dynamic;
3520
+ }
3521
+ function appendNodes(parent, array, marker = null) {
3522
+ for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
3523
+ }
3524
+ function cleanChildren(parent, current, marker, replacement) {
3525
+ if (marker === void 0) return parent.textContent = "";
3526
+ const node = replacement || document.createTextNode("");
3527
+ if (current.length) {
3528
+ let inserted = false;
3529
+ for (let i = current.length - 1; i >= 0; i--) {
3530
+ const el = current[i];
3531
+ if (node !== el) {
3532
+ const isParent = el.parentNode === parent;
3533
+ if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
3534
+ else isParent && el.remove();
3535
+ } else inserted = true;
3536
+ }
3537
+ } else parent.insertBefore(node, marker);
3538
+ return [node];
3539
+ }
3540
+ function getHydrationKey() {
3541
+ return sharedConfig.getNextContextId();
3542
+ }
3543
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
3544
+ function createElement(tagName, isSVG = false, is = void 0) {
3545
+ return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, { is });
3546
+ }
3547
+ function createDynamic(component, props) {
3548
+ const cached = createMemo(component);
3549
+ return createMemo(() => {
3550
+ const component$1 = cached();
3551
+ switch (typeof component$1) {
3552
+ case "function": return untrack(() => component$1(props));
3553
+ case "string":
3554
+ const isSvg = SVGElements.has(component$1);
3555
+ const el = sharedConfig.context ? getNextElement() : createElement(component$1, isSvg, untrack(() => props.is));
3556
+ spread(el, props, isSvg);
3557
+ return el;
3558
+ }
3559
+ });
3560
+ }
3561
+ function Dynamic(props) {
3562
+ const [, others] = splitProps(props, ["component"]);
3563
+ return createDynamic(() => props.component, others);
3564
+ }
3565
+
3566
+ //#endregion
3567
+ //#region src/Block.tsx
3568
+ const Block = (props) => {
3569
+ const elementTag = () => props.element ?? "div";
3570
+ const currentStyler = () => {
3571
+ if (props.styler) return props.styler;
3572
+ else return Stylers.base;
3573
+ };
3574
+ function blockClasses() {
3575
+ const classes = currentStyler().classes("block", props.vtags) ?? [];
3576
+ if (props.class) classes.push(props.class);
3577
+ return twMerge(classes);
3578
+ }
3579
+ return <Dynamic component={elementTag()} class={blockClasses()}>
3580
+ {props.children}
3581
+ </Dynamic>;
3582
+ };
3583
+
3584
+ //#endregion
3585
+ //#region src/items/ItemGroup.tsx
3586
+ const ItemGroup = (props) => {
3587
+ const items = () => props.items.map(buildIdLabel);
3588
+ createEffect(() => {
3589
+ console.log("GROUP ITEMS", items());
3590
+ });
3591
+ const currentVTags = createMemo(() => {
3592
+ const item = [];
3593
+ const group = [];
3594
+ const _vtags = props.vtags;
3595
+ if (Array.isArray(_vtags) || typeof _vtags == "string") group.push(...argTokenizeBySpaces(_vtags));
3596
+ else if (typeof _vtags == "object" && _vtags != null) {
3597
+ group.push(...argTokenizeBySpaces(_vtags.group));
3598
+ item.push(...argTokenizeBySpaces(_vtags.item));
3599
+ }
3600
+ return {
3601
+ group,
3602
+ item
3603
+ };
3604
+ });
3605
+ const classes = createMemo(() => {
3606
+ let group = "";
3607
+ let item = "";
3608
+ if (typeof props.class == "string") group = props.class;
3609
+ else if (props.class != void 0) {
3610
+ props.class;
3611
+ group = props.class.group ?? "";
3612
+ item = props.class.item ?? "";
3613
+ }
3614
+ return {
3615
+ group,
3616
+ item
3617
+ };
3618
+ });
3619
+ const blockClasses = () => {
3620
+ return twMerge("flex flex-row gap-1", classes().group);
3621
+ };
3622
+ const itemClasses = () => {
3623
+ return classes().item;
3624
+ };
3625
+ const callCallback = (item) => {
3626
+ if (props.callback) props.callback(item);
3627
+ };
3628
+ const itemSelected = (id) => {
3629
+ if (typeof props.selection == "string") return id == props.selection;
3630
+ else if (typeof props.selection == "object") return !!props.selection[id];
3631
+ return false;
3632
+ };
3633
+ return <Block class={blockClasses()} vtags={currentVTags().group}>
3634
+ <For each={items()}>
3635
+ {(item) => {
3636
+ const selected = () => itemSelected(item.id);
3637
+ return <Item idLabel={item} selected={selected()} callback={() => callCallback(item)} class={itemClasses()} vtags={currentVTags().item}></Item>;
3638
+ }}
3639
+ </For>
3640
+ </Block>;
3641
+ };
3642
+
3643
+ //#endregion
3644
+ //#region src/soltw.tsx
3645
+ const SolTw = (props) => {
3646
+ return <div class="bg-red-600">- - S O L T W - -</div>;
3647
+ };
3648
+
3649
+ //#endregion
12
3650
  export { Block, Item, ItemGroup, SVTStyler, SolTw, Stylers, baseStyler, buildIdLabel, exclusiveTagsNormalize, mainTagNormalize, tagRuleMatches, twMergeNormalize };