@tanstack/query-devtools 5.71.2 → 5.71.5

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.
@@ -78,10 +78,8 @@ function createSignal(value, options) {
78
78
  };
79
79
  const setter = (value2) => {
80
80
  if (typeof value2 === "function") {
81
- if (Transition && Transition.running && Transition.sources.has(s))
82
- value2 = value2(s.tValue);
83
- else
84
- value2 = value2(s.value);
81
+ if (Transition && Transition.running && Transition.sources.has(s)) value2 = value2(s.tValue);
82
+ else value2 = value2(s.value);
85
83
  }
86
84
  return writeSignal(s, value2);
87
85
  };
@@ -89,25 +87,19 @@ function createSignal(value, options) {
89
87
  }
90
88
  function createComputed(fn, value, options) {
91
89
  const c = createComputation(fn, value, true, STALE);
92
- if (Scheduler && Transition && Transition.running)
93
- Updates.push(c);
94
- else
95
- updateComputation(c);
90
+ if (Scheduler && Transition && Transition.running) Updates.push(c);
91
+ else updateComputation(c);
96
92
  }
97
93
  function createRenderEffect(fn, value, options) {
98
94
  const c = createComputation(fn, value, false, STALE);
99
- if (Scheduler && Transition && Transition.running)
100
- Updates.push(c);
101
- else
102
- updateComputation(c);
95
+ if (Scheduler && Transition && Transition.running) Updates.push(c);
96
+ else updateComputation(c);
103
97
  }
104
98
  function createEffect(fn, value, options) {
105
99
  runEffects = runUserEffects;
106
100
  const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
107
- if (s)
108
- c.suspense = s;
109
- if (!options || !options.render)
110
- c.user = true;
101
+ if (s) c.suspense = s;
102
+ if (!options || !options.render) c.user = true;
111
103
  Effects ? Effects.push(c) : updateComputation(c);
112
104
  }
113
105
  function createMemo(fn, value, options) {
@@ -119,8 +111,7 @@ function createMemo(fn, value, options) {
119
111
  if (Scheduler && Transition && Transition.running) {
120
112
  c.tState = STALE;
121
113
  Updates.push(c);
122
- } else
123
- updateComputation(c);
114
+ } else updateComputation(c);
124
115
  return readSignal.bind(c);
125
116
  }
126
117
  function isPromise(v) {
@@ -141,10 +132,8 @@ function createResource(pSource, pFetcher, pOptions) {
141
132
  }), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
142
133
  if (sharedConfig.context) {
143
134
  id = sharedConfig.getNextContextId();
144
- if (options.ssrLoadFrom === "initial")
145
- initP = options.initialValue;
146
- else if (sharedConfig.load && sharedConfig.has(id))
147
- initP = sharedConfig.load(id);
135
+ if (options.ssrLoadFrom === "initial") initP = options.initialValue;
136
+ else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id);
148
137
  }
149
138
  function loadEnd(p, v, error2, key) {
150
139
  if (pr === p) {
@@ -164,32 +153,27 @@ function createResource(pSource, pFetcher, pOptions) {
164
153
  Transition.running = true;
165
154
  completeLoad(v, error2);
166
155
  }, false);
167
- } else
168
- completeLoad(v, error2);
156
+ } else completeLoad(v, error2);
169
157
  }
170
158
  return v;
171
159
  }
172
160
  function completeLoad(v, err) {
173
161
  runUpdates(() => {
174
- if (err === void 0)
175
- setValue(() => v);
162
+ if (err === void 0) setValue(() => v);
176
163
  setState(err !== void 0 ? "errored" : resolved ? "ready" : "unresolved");
177
164
  setError(err);
178
- for (const c of contexts.keys())
179
- c.decrement();
165
+ for (const c of contexts.keys()) c.decrement();
180
166
  contexts.clear();
181
167
  }, false);
182
168
  }
183
169
  function read() {
184
170
  const c = SuspenseContext && useContext(SuspenseContext), v = value(), err = error();
185
- if (err !== void 0 && !pr)
186
- throw err;
171
+ if (err !== void 0 && !pr) throw err;
187
172
  if (Listener && !Listener.user && c) {
188
173
  createComputed(() => {
189
174
  track();
190
175
  if (pr) {
191
- if (c.resolved && Transition && loadedUnderTransition)
192
- Transition.promises.add(pr);
176
+ if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);
193
177
  else if (!contexts.has(c)) {
194
178
  c.increment();
195
179
  contexts.add(c);
@@ -200,8 +184,7 @@ function createResource(pSource, pFetcher, pOptions) {
200
184
  return v;
201
185
  }
202
186
  function load(refetching = true) {
203
- if (refetching !== false && scheduled)
204
- return;
187
+ if (refetching !== false && scheduled) return;
205
188
  scheduled = false;
206
189
  const lookup = dynamic ? dynamic() : source;
207
190
  loadedUnderTransition = Transition && Transition.running;
@@ -209,8 +192,7 @@ function createResource(pSource, pFetcher, pOptions) {
209
192
  loadEnd(pr, untrack(value));
210
193
  return;
211
194
  }
212
- if (Transition && pr)
213
- Transition.promises.delete(pr);
195
+ if (Transition && pr) Transition.promises.delete(pr);
214
196
  const p = initP !== NO_INIT ? initP : untrack(
215
197
  () => fetcher(lookup, {
216
198
  value: value(),
@@ -223,10 +205,8 @@ function createResource(pSource, pFetcher, pOptions) {
223
205
  }
224
206
  pr = p;
225
207
  if ("value" in p) {
226
- if (p.status === "success")
227
- loadEnd(pr, p.value, void 0, lookup);
228
- else
229
- loadEnd(pr, void 0, castError(p.value), lookup);
208
+ if (p.status === "success") loadEnd(pr, p.value, void 0, lookup);
209
+ else loadEnd(pr, void 0, castError(p.value), lookup);
230
210
  return p;
231
211
  }
232
212
  scheduled = true;
@@ -255,19 +235,15 @@ function createResource(pSource, pFetcher, pOptions) {
255
235
  },
256
236
  latest: {
257
237
  get() {
258
- if (!resolved)
259
- return read();
238
+ if (!resolved) return read();
260
239
  const err = error();
261
- if (err && !pr)
262
- throw err;
240
+ if (err && !pr) throw err;
263
241
  return value();
264
242
  }
265
243
  }
266
244
  });
267
- if (dynamic)
268
- createComputed(() => load(false));
269
- else
270
- load(false);
245
+ if (dynamic) createComputed(() => load(false));
246
+ else load(false);
271
247
  return [
272
248
  read,
273
249
  {
@@ -280,13 +256,11 @@ function batch(fn) {
280
256
  return runUpdates(fn, false);
281
257
  }
282
258
  function untrack(fn) {
283
- if (!ExternalSourceConfig && Listener === null)
284
- return fn();
259
+ if (!ExternalSourceConfig && Listener === null) return fn();
285
260
  const listener = Listener;
286
261
  Listener = null;
287
262
  try {
288
- if (ExternalSourceConfig)
289
- return ExternalSourceConfig.untrack(fn);
263
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
290
264
  return fn();
291
265
  } finally {
292
266
  Listener = listener;
@@ -300,10 +274,8 @@ function on(deps, fn, options) {
300
274
  let input;
301
275
  if (isArray3) {
302
276
  input = Array(deps.length);
303
- for (let i = 0; i < deps.length; i++)
304
- input[i] = deps[i]();
305
- } else
306
- input = deps();
277
+ for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
278
+ } else input = deps();
307
279
  if (defer) {
308
280
  defer = false;
309
281
  return prevValue;
@@ -317,12 +289,9 @@ function onMount(fn) {
317
289
  createEffect(() => untrack(fn));
318
290
  }
319
291
  function onCleanup(fn) {
320
- if (Owner === null)
321
- ;
322
- else if (Owner.cleanups === null)
323
- Owner.cleanups = [fn];
324
- else
325
- Owner.cleanups.push(fn);
292
+ if (Owner === null) ;
293
+ else if (Owner.cleanups === null) Owner.cleanups = [fn];
294
+ else Owner.cleanups.push(fn);
326
295
  return fn;
327
296
  }
328
297
  function getOwner() {
@@ -399,8 +368,7 @@ var SuspenseContext;
399
368
  function readSignal() {
400
369
  const runningTransition = Transition && Transition.running;
401
370
  if (this.sources && (runningTransition ? this.tState : this.state)) {
402
- if ((runningTransition ? this.tState : this.state) === STALE)
403
- updateComputation(this);
371
+ if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
404
372
  else {
405
373
  const updates = Updates;
406
374
  Updates = null;
@@ -425,8 +393,7 @@ function readSignal() {
425
393
  this.observerSlots.push(Listener.sources.length - 1);
426
394
  }
427
395
  }
428
- if (runningTransition && Transition.sources.has(this))
429
- return this.tValue;
396
+ if (runningTransition && Transition.sources.has(this)) return this.tValue;
430
397
  return this.value;
431
398
  }
432
399
  function writeSignal(node, value, isComp) {
@@ -438,34 +405,25 @@ function writeSignal(node, value, isComp) {
438
405
  Transition.sources.add(node);
439
406
  node.tValue = value;
440
407
  }
441
- if (!TransitionRunning)
442
- node.value = value;
443
- } else
444
- node.value = value;
408
+ if (!TransitionRunning) node.value = value;
409
+ } else node.value = value;
445
410
  if (node.observers && node.observers.length) {
446
411
  runUpdates(() => {
447
412
  for (let i = 0; i < node.observers.length; i += 1) {
448
413
  const o = node.observers[i];
449
414
  const TransitionRunning = Transition && Transition.running;
450
- if (TransitionRunning && Transition.disposed.has(o))
451
- continue;
415
+ if (TransitionRunning && Transition.disposed.has(o)) continue;
452
416
  if (TransitionRunning ? !o.tState : !o.state) {
453
- if (o.pure)
454
- Updates.push(o);
455
- else
456
- Effects.push(o);
457
- if (o.observers)
458
- markDownstream(o);
417
+ if (o.pure) Updates.push(o);
418
+ else Effects.push(o);
419
+ if (o.observers) markDownstream(o);
459
420
  }
460
- if (!TransitionRunning)
461
- o.state = STALE;
462
- else
463
- o.tState = STALE;
421
+ if (!TransitionRunning) o.state = STALE;
422
+ else o.tState = STALE;
464
423
  }
465
424
  if (Updates.length > 1e6) {
466
425
  Updates = [];
467
- if (IS_DEV)
468
- ;
426
+ if (IS_DEV) ;
469
427
  throw new Error();
470
428
  }
471
429
  }, false);
@@ -474,8 +432,7 @@ function writeSignal(node, value, isComp) {
474
432
  return value;
475
433
  }
476
434
  function updateComputation(node) {
477
- if (!node.fn)
478
- return;
435
+ if (!node.fn) return;
479
436
  cleanNode(node);
480
437
  const time = ExecCount;
481
438
  runComputation(
@@ -524,8 +481,7 @@ function runComputation(node, value, time) {
524
481
  } else if (Transition && Transition.running && node.pure) {
525
482
  Transition.sources.add(node);
526
483
  node.tValue = nextValue;
527
- } else
528
- node.value = nextValue;
484
+ } else node.value = nextValue;
529
485
  node.updatedAt = time;
530
486
  }
531
487
  }
@@ -547,19 +503,14 @@ function createComputation(fn, init, pure, state = STALE, options) {
547
503
  c.state = 0;
548
504
  c.tState = state;
549
505
  }
550
- if (Owner === null)
551
- ;
506
+ if (Owner === null) ;
552
507
  else if (Owner !== UNOWNED) {
553
508
  if (Transition && Transition.running && Owner.pure) {
554
- if (!Owner.tOwned)
555
- Owner.tOwned = [c];
556
- else
557
- Owner.tOwned.push(c);
509
+ if (!Owner.tOwned) Owner.tOwned = [c];
510
+ else Owner.tOwned.push(c);
558
511
  } else {
559
- if (!Owner.owned)
560
- Owner.owned = [c];
561
- else
562
- Owner.owned.push(c);
512
+ if (!Owner.owned) Owner.owned = [c];
513
+ else Owner.owned.push(c);
563
514
  }
564
515
  }
565
516
  if (ExternalSourceConfig && c.fn) {
@@ -579,26 +530,20 @@ function createComputation(fn, init, pure, state = STALE, options) {
579
530
  }
580
531
  function runTop(node) {
581
532
  const runningTransition = Transition && Transition.running;
582
- if ((runningTransition ? node.tState : node.state) === 0)
583
- return;
584
- if ((runningTransition ? node.tState : node.state) === PENDING)
585
- return lookUpstream(node);
586
- if (node.suspense && untrack(node.suspense.inFallback))
587
- return node.suspense.effects.push(node);
533
+ if ((runningTransition ? node.tState : node.state) === 0) return;
534
+ if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
535
+ if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
588
536
  const ancestors = [node];
589
537
  while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
590
- if (runningTransition && Transition.disposed.has(node))
591
- return;
592
- if (runningTransition ? node.tState : node.state)
593
- ancestors.push(node);
538
+ if (runningTransition && Transition.disposed.has(node)) return;
539
+ if (runningTransition ? node.tState : node.state) ancestors.push(node);
594
540
  }
595
541
  for (let i = ancestors.length - 1; i >= 0; i--) {
596
542
  node = ancestors[i];
597
543
  if (runningTransition) {
598
544
  let top = node, prev = ancestors[i + 1];
599
545
  while ((top = top.owner) && top !== prev) {
600
- if (Transition.disposed.has(top))
601
- return;
546
+ if (Transition.disposed.has(top)) return;
602
547
  }
603
548
  }
604
549
  if ((runningTransition ? node.tState : node.state) === STALE) {
@@ -612,37 +557,29 @@ function runTop(node) {
612
557
  }
613
558
  }
614
559
  function runUpdates(fn, init) {
615
- if (Updates)
616
- return fn();
560
+ if (Updates) return fn();
617
561
  let wait = false;
618
- if (!init)
619
- Updates = [];
620
- if (Effects)
621
- wait = true;
622
- else
623
- Effects = [];
562
+ if (!init) Updates = [];
563
+ if (Effects) wait = true;
564
+ else Effects = [];
624
565
  ExecCount++;
625
566
  try {
626
567
  const res = fn();
627
568
  completeUpdates(wait);
628
569
  return res;
629
570
  } catch (err) {
630
- if (!wait)
631
- Effects = null;
571
+ if (!wait) Effects = null;
632
572
  Updates = null;
633
573
  handleError(err);
634
574
  }
635
575
  }
636
576
  function completeUpdates(wait) {
637
577
  if (Updates) {
638
- if (Scheduler && Transition && Transition.running)
639
- scheduleQueue(Updates);
640
- else
641
- runQueue(Updates);
578
+ if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
579
+ else runQueue(Updates);
642
580
  Updates = null;
643
581
  }
644
- if (wait)
645
- return;
582
+ if (wait) return;
646
583
  let res;
647
584
  if (Transition) {
648
585
  if (!Transition.promises.size && !Transition.queue.size) {
@@ -656,16 +593,13 @@ function completeUpdates(wait) {
656
593
  }
657
594
  Transition = null;
658
595
  runUpdates(() => {
659
- for (const d of disposed)
660
- cleanNode(d);
596
+ for (const d of disposed) cleanNode(d);
661
597
  for (const v of sources) {
662
598
  v.value = v.tValue;
663
599
  if (v.owned) {
664
- for (let i = 0, len = v.owned.length; i < len; i++)
665
- cleanNode(v.owned[i]);
600
+ for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
666
601
  }
667
- if (v.tOwned)
668
- v.owned = v.tOwned;
602
+ if (v.tOwned) v.owned = v.tOwned;
669
603
  delete v.tValue;
670
604
  delete v.tOwned;
671
605
  v.tState = 0;
@@ -682,14 +616,11 @@ function completeUpdates(wait) {
682
616
  }
683
617
  const e = Effects;
684
618
  Effects = null;
685
- if (e.length)
686
- runUpdates(() => runEffects(e), false);
687
- if (res)
688
- res();
619
+ if (e.length) runUpdates(() => runEffects(e), false);
620
+ if (res) res();
689
621
  }
690
622
  function runQueue(queue) {
691
- for (let i = 0; i < queue.length; i++)
692
- runTop(queue[i]);
623
+ for (let i = 0; i < queue.length; i++) runTop(queue[i]);
693
624
  }
694
625
  function scheduleQueue(queue) {
695
626
  for (let i = 0; i < queue.length; i++) {
@@ -712,10 +643,8 @@ function runUserEffects(queue) {
712
643
  let i, userLength = 0;
713
644
  for (i = 0; i < queue.length; i++) {
714
645
  const e = queue[i];
715
- if (!e.user)
716
- runTop(e);
717
- else
718
- queue[userLength++] = e;
646
+ if (!e.user) runTop(e);
647
+ else queue[userLength++] = e;
719
648
  }
720
649
  if (sharedConfig.context) {
721
650
  if (sharedConfig.count) {
@@ -730,15 +659,12 @@ function runUserEffects(queue) {
730
659
  userLength += sharedConfig.effects.length;
731
660
  delete sharedConfig.effects;
732
661
  }
733
- for (i = 0; i < userLength; i++)
734
- runTop(queue[i]);
662
+ for (i = 0; i < userLength; i++) runTop(queue[i]);
735
663
  }
736
664
  function lookUpstream(node, ignore) {
737
665
  const runningTransition = Transition && Transition.running;
738
- if (runningTransition)
739
- node.tState = 0;
740
- else
741
- node.state = 0;
666
+ if (runningTransition) node.tState = 0;
667
+ else node.state = 0;
742
668
  for (let i = 0; i < node.sources.length; i += 1) {
743
669
  const source = node.sources[i];
744
670
  if (source.sources) {
@@ -746,8 +672,7 @@ function lookUpstream(node, ignore) {
746
672
  if (state === STALE) {
747
673
  if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
748
674
  runTop(source);
749
- } else if (state === PENDING)
750
- lookUpstream(source, ignore);
675
+ } else if (state === PENDING) lookUpstream(source, ignore);
751
676
  }
752
677
  }
753
678
  }
@@ -756,14 +681,10 @@ function markDownstream(node) {
756
681
  for (let i = 0; i < node.observers.length; i += 1) {
757
682
  const o = node.observers[i];
758
683
  if (runningTransition ? !o.tState : !o.state) {
759
- if (runningTransition)
760
- o.tState = PENDING;
761
- else
762
- o.state = PENDING;
763
- if (o.pure)
764
- Updates.push(o);
765
- else
766
- Effects.push(o);
684
+ if (runningTransition) o.tState = PENDING;
685
+ else o.state = PENDING;
686
+ if (o.pure) Updates.push(o);
687
+ else Effects.push(o);
767
688
  o.observers && markDownstream(o);
768
689
  }
769
690
  }
@@ -784,26 +705,21 @@ function cleanNode(node) {
784
705
  }
785
706
  }
786
707
  if (node.tOwned) {
787
- for (i = node.tOwned.length - 1; i >= 0; i--)
788
- cleanNode(node.tOwned[i]);
708
+ for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
789
709
  delete node.tOwned;
790
710
  }
791
711
  if (Transition && Transition.running && node.pure) {
792
712
  reset(node, true);
793
713
  } else if (node.owned) {
794
- for (i = node.owned.length - 1; i >= 0; i--)
795
- cleanNode(node.owned[i]);
714
+ for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
796
715
  node.owned = null;
797
716
  }
798
717
  if (node.cleanups) {
799
- for (i = node.cleanups.length - 1; i >= 0; i--)
800
- node.cleanups[i]();
718
+ for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
801
719
  node.cleanups = null;
802
720
  }
803
- if (Transition && Transition.running)
804
- node.tState = 0;
805
- else
806
- node.state = 0;
721
+ if (Transition && Transition.running) node.tState = 0;
722
+ else node.state = 0;
807
723
  }
808
724
  function reset(node, top) {
809
725
  if (!top) {
@@ -811,21 +727,18 @@ function reset(node, top) {
811
727
  Transition.disposed.add(node);
812
728
  }
813
729
  if (node.owned) {
814
- for (let i = 0; i < node.owned.length; i++)
815
- reset(node.owned[i]);
730
+ for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
816
731
  }
817
732
  }
818
733
  function castError(err) {
819
- if (err instanceof Error)
820
- return err;
734
+ if (err instanceof Error) return err;
821
735
  return new Error(typeof err === "string" ? err : "Unknown error", {
822
736
  cause: err
823
737
  });
824
738
  }
825
739
  function runErrors(err, fns, owner) {
826
740
  try {
827
- for (const f of fns)
828
- f(err);
741
+ for (const f of fns) f(err);
829
742
  } catch (e) {
830
743
  handleError(e, owner && owner.owner || null);
831
744
  }
@@ -833,8 +746,7 @@ function runErrors(err, fns, owner) {
833
746
  function handleError(err, owner = Owner) {
834
747
  const fns = ERROR && owner && owner.context && owner.context[ERROR];
835
748
  const error = castError(err);
836
- if (!fns)
837
- throw error;
749
+ if (!fns) throw error;
838
750
  if (Effects)
839
751
  Effects.push({
840
752
  fn() {
@@ -842,12 +754,10 @@ function handleError(err, owner = Owner) {
842
754
  },
843
755
  state: STALE
844
756
  });
845
- else
846
- runErrors(error, fns, owner);
757
+ else runErrors(error, fns, owner);
847
758
  }
848
759
  function resolveChildren(children2) {
849
- if (typeof children2 === "function" && !children2.length)
850
- return resolveChildren(children2());
760
+ if (typeof children2 === "function" && !children2.length) return resolveChildren(children2());
851
761
  if (Array.isArray(children2)) {
852
762
  const results = [];
853
763
  for (let i = 0; i < children2.length; i++) {
@@ -876,8 +786,7 @@ function createProvider(id, options) {
876
786
  }
877
787
  var FALLBACK = Symbol("fallback");
878
788
  function dispose(d) {
879
- for (let i = 0; i < d.length; i++)
880
- d[i]();
789
+ for (let i = 0; i < d.length; i++) d[i]();
881
790
  }
882
791
  function mapArray(list, mapFn, options = {}) {
883
792
  let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
@@ -915,8 +824,7 @@ function mapArray(list, mapFn, options = {}) {
915
824
  temp = new Array(newLen);
916
825
  tempdisposers = new Array(newLen);
917
826
  indexes && (tempIndexes = new Array(newLen));
918
- for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++)
919
- ;
827
+ for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++) ;
920
828
  for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
921
829
  temp[newEnd] = mapped[end];
922
830
  tempdisposers[newEnd] = disposers[end];
@@ -939,8 +847,7 @@ function mapArray(list, mapFn, options = {}) {
939
847
  indexes && (tempIndexes[j] = indexes[i]);
940
848
  j = newIndicesNext[j];
941
849
  newIndices.set(item, j);
942
- } else
943
- disposers[i]();
850
+ } else disposers[i]();
944
851
  }
945
852
  for (j = start; j < newLen; j++) {
946
853
  if (j in temp) {
@@ -950,8 +857,7 @@ function mapArray(list, mapFn, options = {}) {
950
857
  indexes[j] = tempIndexes[j];
951
858
  indexes[j](j);
952
859
  }
953
- } else
954
- mapped[j] = createRoot(mapper);
860
+ } else mapped[j] = createRoot(mapper);
955
861
  }
956
862
  mapped = mapped.slice(0, len = newLen);
957
863
  items = newItems.slice(0);
@@ -1042,13 +948,11 @@ function trueFn() {
1042
948
  }
1043
949
  var propTraps = {
1044
950
  get(_, property, receiver) {
1045
- if (property === $PROXY)
1046
- return receiver;
951
+ if (property === $PROXY) return receiver;
1047
952
  return _.get(property);
1048
953
  },
1049
954
  has(_, property) {
1050
- if (property === $PROXY)
1051
- return true;
955
+ if (property === $PROXY) return true;
1052
956
  return _.has(property);
1053
957
  },
1054
958
  set: trueFn,
@@ -1074,8 +978,7 @@ function resolveSource(s) {
1074
978
  function resolveSources() {
1075
979
  for (let i = 0, length = this.length; i < length; ++i) {
1076
980
  const v = this[i]();
1077
- if (v !== void 0)
1078
- return v;
981
+ if (v !== void 0) return v;
1079
982
  }
1080
983
  }
1081
984
  function mergeProps(...sources) {
@@ -1091,14 +994,12 @@ function mergeProps(...sources) {
1091
994
  get(property) {
1092
995
  for (let i = sources.length - 1; i >= 0; i--) {
1093
996
  const v = resolveSource(sources[i])[property];
1094
- if (v !== void 0)
1095
- return v;
997
+ if (v !== void 0) return v;
1096
998
  }
1097
999
  },
1098
1000
  has(property) {
1099
1001
  for (let i = sources.length - 1; i >= 0; i--) {
1100
- if (property in resolveSource(sources[i]))
1101
- return true;
1002
+ if (property in resolveSource(sources[i])) return true;
1102
1003
  }
1103
1004
  return false;
1104
1005
  },
@@ -1116,13 +1017,11 @@ function mergeProps(...sources) {
1116
1017
  const defined = /* @__PURE__ */ Object.create(null);
1117
1018
  for (let i = sources.length - 1; i >= 0; i--) {
1118
1019
  const source = sources[i];
1119
- if (!source)
1120
- continue;
1020
+ if (!source) continue;
1121
1021
  const sourceKeys = Object.getOwnPropertyNames(source);
1122
1022
  for (let i2 = sourceKeys.length - 1; i2 >= 0; i2--) {
1123
1023
  const key = sourceKeys[i2];
1124
- if (key === "__proto__" || key === "constructor")
1125
- continue;
1024
+ if (key === "__proto__" || key === "constructor") continue;
1126
1025
  const desc = Object.getOwnPropertyDescriptor(source, key);
1127
1026
  if (!defined[key]) {
1128
1027
  defined[key] = desc.get ? {
@@ -1133,10 +1032,8 @@ function mergeProps(...sources) {
1133
1032
  } else {
1134
1033
  const sources2 = sourcesMap[key];
1135
1034
  if (sources2) {
1136
- if (desc.get)
1137
- sources2.push(desc.get.bind(source));
1138
- else if (desc.value !== void 0)
1139
- sources2.push(() => desc.value);
1035
+ if (desc.get) sources2.push(desc.get.bind(source));
1036
+ else if (desc.value !== void 0) sources2.push(() => desc.value);
1140
1037
  }
1141
1038
  }
1142
1039
  }
@@ -1145,10 +1042,8 @@ function mergeProps(...sources) {
1145
1042
  const definedKeys = Object.keys(defined);
1146
1043
  for (let i = definedKeys.length - 1; i >= 0; i--) {
1147
1044
  const key = definedKeys[i], desc = defined[key];
1148
- if (desc && desc.get)
1149
- Object.defineProperty(target, key, desc);
1150
- else
1151
- target[key] = desc ? desc.value : void 0;
1045
+ if (desc && desc.get) Object.defineProperty(target, key, desc);
1046
+ else target[key] = desc ? desc.value : void 0;
1152
1047
  }
1153
1048
  return target;
1154
1049
  }
@@ -1232,10 +1127,8 @@ function lazy(fn) {
1232
1127
  let Comp;
1233
1128
  return createMemo(
1234
1129
  () => (Comp = comp()) ? untrack(() => {
1235
- if (IS_DEV)
1236
- ;
1237
- if (!ctx || sharedConfig.done)
1238
- return Comp(props);
1130
+ if (IS_DEV) ;
1131
+ if (!ctx || sharedConfig.done) return Comp(props);
1239
1132
  const c = sharedConfig.context;
1240
1133
  setHydrateContext(ctx);
1241
1134
  const r = Comp(props);
@@ -1280,8 +1173,7 @@ function Show(props) {
1280
1173
  return fn ? untrack(
1281
1174
  () => child(
1282
1175
  keyed ? c : () => {
1283
- if (!untrack(condition))
1284
- throw narrowedError("Show");
1176
+ if (!untrack(condition)) throw narrowedError("Show");
1285
1177
  return conditionValue();
1286
1178
  }
1287
1179
  )
@@ -1318,16 +1210,14 @@ function Switch(props) {
1318
1210
  return createMemo(
1319
1211
  () => {
1320
1212
  const sel = switchFunc()();
1321
- if (!sel)
1322
- return props.fallback;
1213
+ if (!sel) return props.fallback;
1323
1214
  const [index, conditionValue, mp] = sel;
1324
1215
  const child = mp.children;
1325
1216
  const fn = typeof child === "function" && child.length > 0;
1326
1217
  return fn ? untrack(
1327
1218
  () => child(
1328
1219
  mp.keyed ? conditionValue() : () => {
1329
- if (untrack(switchFunc)()?.[0] !== index)
1330
- throw narrowedError("Match");
1220
+ if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match");
1331
1221
  return conditionValue();
1332
1222
  }
1333
1223
  )
@@ -1540,12 +1430,10 @@ function reconcileArrays(parentNode, a, b) {
1540
1430
  }
1541
1431
  if (aEnd === aStart) {
1542
1432
  const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
1543
- while (bStart < bEnd)
1544
- parentNode.insertBefore(b[bStart++], node);
1433
+ while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
1545
1434
  } else if (bEnd === bStart) {
1546
1435
  while (aStart < aEnd) {
1547
- if (!map || !map.has(a[aStart]))
1548
- a[aStart].remove();
1436
+ if (!map || !map.has(a[aStart])) a[aStart].remove();
1549
1437
  aStart++;
1550
1438
  }
1551
1439
  } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
@@ -1557,28 +1445,22 @@ function reconcileArrays(parentNode, a, b) {
1557
1445
  if (!map) {
1558
1446
  map = /* @__PURE__ */ new Map();
1559
1447
  let i = bStart;
1560
- while (i < bEnd)
1561
- map.set(b[i], i++);
1448
+ while (i < bEnd) map.set(b[i], i++);
1562
1449
  }
1563
1450
  const index = map.get(a[aStart]);
1564
1451
  if (index != null) {
1565
1452
  if (bStart < index && index < bEnd) {
1566
1453
  let i = aStart, sequence = 1, t;
1567
1454
  while (++i < aEnd && i < bEnd) {
1568
- if ((t = map.get(a[i])) == null || t !== index + sequence)
1569
- break;
1455
+ if ((t = map.get(a[i])) == null || t !== index + sequence) break;
1570
1456
  sequence++;
1571
1457
  }
1572
1458
  if (sequence > index - bStart) {
1573
1459
  const node = a[aStart];
1574
- while (bStart < index)
1575
- parentNode.insertBefore(b[bStart++], node);
1576
- } else
1577
- parentNode.replaceChild(b[bStart++], a[aStart++]);
1578
- } else
1579
- aStart++;
1580
- } else
1581
- a[aStart++].remove();
1460
+ while (bStart < index) parentNode.insertBefore(b[bStart++], node);
1461
+ } else parentNode.replaceChild(b[bStart++], a[aStart++]);
1462
+ } else aStart++;
1463
+ } else a[aStart++].remove();
1582
1464
  }
1583
1465
  }
1584
1466
  }
@@ -1617,78 +1499,61 @@ function delegateEvents(eventNames, document2 = window.document) {
1617
1499
  }
1618
1500
  function clearDelegatedEvents(document2 = window.document) {
1619
1501
  if (document2[$$EVENTS]) {
1620
- for (let name of document2[$$EVENTS].keys())
1621
- document2.removeEventListener(name, eventHandler);
1502
+ for (let name of document2[$$EVENTS].keys()) document2.removeEventListener(name, eventHandler);
1622
1503
  delete document2[$$EVENTS];
1623
1504
  }
1624
1505
  }
1625
1506
  function setAttribute(node, name, value) {
1626
- if (isHydrating(node))
1627
- return;
1628
- if (value == null)
1629
- node.removeAttribute(name);
1630
- else
1631
- node.setAttribute(name, value);
1507
+ if (isHydrating(node)) return;
1508
+ if (value == null) node.removeAttribute(name);
1509
+ else node.setAttribute(name, value);
1632
1510
  }
1633
1511
  function setAttributeNS(node, namespace, name, value) {
1634
- if (isHydrating(node))
1635
- return;
1636
- if (value == null)
1637
- node.removeAttributeNS(namespace, name);
1638
- else
1639
- node.setAttributeNS(namespace, name, value);
1512
+ if (isHydrating(node)) return;
1513
+ if (value == null) node.removeAttributeNS(namespace, name);
1514
+ else node.setAttributeNS(namespace, name, value);
1640
1515
  }
1641
1516
  function setBoolAttribute(node, name, value) {
1642
- if (isHydrating(node))
1643
- return;
1517
+ if (isHydrating(node)) return;
1644
1518
  value ? node.setAttribute(name, "") : node.removeAttribute(name);
1645
1519
  }
1646
1520
  function className(node, value) {
1647
- if (isHydrating(node))
1648
- return;
1649
- if (value == null)
1650
- node.removeAttribute("class");
1651
- else
1652
- node.className = value;
1521
+ if (isHydrating(node)) return;
1522
+ if (value == null) node.removeAttribute("class");
1523
+ else node.className = value;
1653
1524
  }
1654
1525
  function addEventListener(node, name, handler, delegate) {
1655
1526
  if (delegate) {
1656
1527
  if (Array.isArray(handler)) {
1657
1528
  node[`$$${name}`] = handler[0];
1658
1529
  node[`$$${name}Data`] = handler[1];
1659
- } else
1660
- node[`$$${name}`] = handler;
1530
+ } else node[`$$${name}`] = handler;
1661
1531
  } else if (Array.isArray(handler)) {
1662
1532
  const handlerFn = handler[0];
1663
1533
  node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
1664
- } else
1665
- node.addEventListener(name, handler, typeof handler !== "function" && handler);
1534
+ } else node.addEventListener(name, handler, typeof handler !== "function" && handler);
1666
1535
  }
1667
1536
  function classList(node, value, prev = {}) {
1668
1537
  const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
1669
1538
  let i, len;
1670
1539
  for (i = 0, len = prevKeys.length; i < len; i++) {
1671
1540
  const key = prevKeys[i];
1672
- if (!key || key === "undefined" || value[key])
1673
- continue;
1541
+ if (!key || key === "undefined" || value[key]) continue;
1674
1542
  toggleClassKey(node, key, false);
1675
1543
  delete prev[key];
1676
1544
  }
1677
1545
  for (i = 0, len = classKeys.length; i < len; i++) {
1678
1546
  const key = classKeys[i], classValue = !!value[key];
1679
- if (!key || key === "undefined" || prev[key] === classValue || !classValue)
1680
- continue;
1547
+ if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
1681
1548
  toggleClassKey(node, key, true);
1682
1549
  prev[key] = classValue;
1683
1550
  }
1684
1551
  return prev;
1685
1552
  }
1686
1553
  function style(node, value, prev) {
1687
- if (!value)
1688
- return prev ? setAttribute(node, "style") : value;
1554
+ if (!value) return prev ? setAttribute(node, "style") : value;
1689
1555
  const nodeStyle = node.style;
1690
- if (typeof value === "string")
1691
- return nodeStyle.cssText = value;
1556
+ if (typeof value === "string") return nodeStyle.cssText = value;
1692
1557
  typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
1693
1558
  prev || (prev = {});
1694
1559
  value || (value = {});
@@ -1721,18 +1586,15 @@ function use(fn, element, arg) {
1721
1586
  return untrack(() => fn(element, arg));
1722
1587
  }
1723
1588
  function insert(parent, accessor, marker, initial) {
1724
- if (marker !== void 0 && !initial)
1725
- initial = [];
1726
- if (typeof accessor !== "function")
1727
- return insertExpression(parent, accessor, initial, marker);
1589
+ if (marker !== void 0 && !initial) initial = [];
1590
+ if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
1728
1591
  createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
1729
1592
  }
1730
1593
  function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
1731
1594
  props || (props = {});
1732
1595
  for (const prop in prevProps) {
1733
1596
  if (!(prop in props)) {
1734
- if (prop === "children")
1735
- continue;
1597
+ if (prop === "children") continue;
1736
1598
  prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
1737
1599
  }
1738
1600
  }
@@ -1749,8 +1611,7 @@ function getNextElement(template2) {
1749
1611
  if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
1750
1612
  return template2();
1751
1613
  }
1752
- if (sharedConfig.completed)
1753
- sharedConfig.completed.add(node);
1614
+ if (sharedConfig.completed) sharedConfig.completed.add(node);
1754
1615
  sharedConfig.registry.delete(key);
1755
1616
  return node;
1756
1617
  }
@@ -1767,15 +1628,11 @@ function toggleClassKey(node, key, value) {
1767
1628
  }
1768
1629
  function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
1769
1630
  let isCE, isProp, isChildProp, propAlias, forceProp;
1770
- if (prop === "style")
1771
- return style(node, value, prev);
1772
- if (prop === "classList")
1773
- return classList(node, value, prev);
1774
- if (value === prev)
1775
- return prev;
1631
+ if (prop === "style") return style(node, value, prev);
1632
+ if (prop === "classList") return classList(node, value, prev);
1633
+ if (value === prev) return prev;
1776
1634
  if (prop === "ref") {
1777
- if (!skipRef)
1778
- value(node);
1635
+ if (!skipRef) value(node);
1779
1636
  } else if (prop.slice(0, 3) === "on:") {
1780
1637
  const e = prop.slice(3);
1781
1638
  prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
@@ -1803,27 +1660,20 @@ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
1803
1660
  if (forceProp) {
1804
1661
  prop = prop.slice(5);
1805
1662
  isProp = true;
1806
- } else if (isHydrating(node))
1807
- return value;
1808
- if (prop === "class" || prop === "className")
1809
- className(node, value);
1810
- else if (isCE && !isProp && !isChildProp)
1811
- node[toPropertyName(prop)] = value;
1812
- else
1813
- node[propAlias || prop] = value;
1663
+ } else if (isHydrating(node)) return value;
1664
+ if (prop === "class" || prop === "className") className(node, value);
1665
+ else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
1666
+ else node[propAlias || prop] = value;
1814
1667
  } else {
1815
1668
  const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
1816
- if (ns)
1817
- setAttributeNS(node, ns, prop, value);
1818
- else
1819
- setAttribute(node, Aliases[prop] || prop, value);
1669
+ if (ns) setAttributeNS(node, ns, prop, value);
1670
+ else setAttribute(node, Aliases[prop] || prop, value);
1820
1671
  }
1821
1672
  return value;
1822
1673
  }
1823
1674
  function eventHandler(e) {
1824
1675
  if (sharedConfig.registry && sharedConfig.events) {
1825
- if (sharedConfig.events.find(([el, ev]) => ev === e))
1826
- return;
1676
+ if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
1827
1677
  }
1828
1678
  let node = e.target;
1829
1679
  const key = `$$${e.type}`;
@@ -1838,15 +1688,13 @@ function eventHandler(e) {
1838
1688
  if (handler && !node.disabled) {
1839
1689
  const data = node[`${key}Data`];
1840
1690
  data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
1841
- if (e.cancelBubble)
1842
- return;
1691
+ if (e.cancelBubble) return;
1843
1692
  }
1844
1693
  node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
1845
1694
  return true;
1846
1695
  };
1847
1696
  const walkUpTree = () => {
1848
- while (handleNode() && (node = node._$host || node.parentNode || node.host))
1849
- ;
1697
+ while (handleNode() && (node = node._$host || node.parentNode || node.host)) ;
1850
1698
  };
1851
1699
  Object.defineProperty(e, "currentTarget", {
1852
1700
  configurable: true,
@@ -1854,15 +1702,13 @@ function eventHandler(e) {
1854
1702
  return node || document;
1855
1703
  }
1856
1704
  });
1857
- if (sharedConfig.registry && !sharedConfig.done)
1858
- sharedConfig.done = _$HY.done = true;
1705
+ if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
1859
1706
  if (e.composedPath) {
1860
1707
  const path = e.composedPath();
1861
1708
  retarget(path[0]);
1862
1709
  for (let i = 0; i < path.length - 2; i++) {
1863
1710
  node = path[i];
1864
- if (!handleNode())
1865
- break;
1711
+ if (!handleNode()) break;
1866
1712
  if (node._$host) {
1867
1713
  node = node._$host;
1868
1714
  walkUpTree();
@@ -1872,8 +1718,7 @@ function eventHandler(e) {
1872
1718
  break;
1873
1719
  }
1874
1720
  }
1875
- } else
1876
- walkUpTree();
1721
+ } else walkUpTree();
1877
1722
  retarget(oriTarget);
1878
1723
  }
1879
1724
  function insertExpression(parent, value, current, marker, unwrapArray) {
@@ -1883,49 +1728,39 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1883
1728
  let cleaned = [];
1884
1729
  for (let i = 0; i < current.length; i++) {
1885
1730
  const node = current[i];
1886
- if (node.nodeType === 8 && node.data.slice(0, 2) === "!$")
1887
- node.remove();
1888
- else
1889
- cleaned.push(node);
1731
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
1732
+ else cleaned.push(node);
1890
1733
  }
1891
1734
  current = cleaned;
1892
1735
  }
1893
- while (typeof current === "function")
1894
- current = current();
1895
- if (value === current)
1896
- return current;
1736
+ while (typeof current === "function") current = current();
1737
+ if (value === current) return current;
1897
1738
  const t = typeof value, multi = marker !== void 0;
1898
1739
  parent = multi && current[0] && current[0].parentNode || parent;
1899
1740
  if (t === "string" || t === "number") {
1900
- if (hydrating)
1901
- return current;
1741
+ if (hydrating) return current;
1902
1742
  if (t === "number") {
1903
1743
  value = value.toString();
1904
- if (value === current)
1905
- return current;
1744
+ if (value === current) return current;
1906
1745
  }
1907
1746
  if (multi) {
1908
1747
  let node = current[0];
1909
1748
  if (node && node.nodeType === 3) {
1910
1749
  node.data !== value && (node.data = value);
1911
- } else
1912
- node = document.createTextNode(value);
1750
+ } else node = document.createTextNode(value);
1913
1751
  current = cleanChildren(parent, current, marker, node);
1914
1752
  } else {
1915
1753
  if (current !== "" && typeof current === "string") {
1916
1754
  current = parent.firstChild.data = value;
1917
- } else
1918
- current = parent.textContent = value;
1755
+ } else current = parent.textContent = value;
1919
1756
  }
1920
1757
  } else if (value == null || t === "boolean") {
1921
- if (hydrating)
1922
- return current;
1758
+ if (hydrating) return current;
1923
1759
  current = cleanChildren(parent, current, marker);
1924
1760
  } else if (t === "function") {
1925
1761
  createRenderEffect(() => {
1926
1762
  let v = value();
1927
- while (typeof v === "function")
1928
- v = v();
1763
+ while (typeof v === "function") v = v();
1929
1764
  current = insertExpression(parent, v, current, marker);
1930
1765
  });
1931
1766
  return () => current;
@@ -1937,62 +1772,50 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1937
1772
  return () => current;
1938
1773
  }
1939
1774
  if (hydrating) {
1940
- if (!array.length)
1941
- return current;
1942
- if (marker === void 0)
1943
- return current = [...parent.childNodes];
1775
+ if (!array.length) return current;
1776
+ if (marker === void 0) return current = [...parent.childNodes];
1944
1777
  let node = array[0];
1945
- if (node.parentNode !== parent)
1946
- return current;
1778
+ if (node.parentNode !== parent) return current;
1947
1779
  const nodes = [node];
1948
- while ((node = node.nextSibling) !== marker)
1949
- nodes.push(node);
1780
+ while ((node = node.nextSibling) !== marker) nodes.push(node);
1950
1781
  return current = nodes;
1951
1782
  }
1952
1783
  if (array.length === 0) {
1953
1784
  current = cleanChildren(parent, current, marker);
1954
- if (multi)
1955
- return current;
1785
+ if (multi) return current;
1956
1786
  } else if (currentArray) {
1957
1787
  if (current.length === 0) {
1958
1788
  appendNodes(parent, array, marker);
1959
- } else
1960
- reconcileArrays(parent, current, array);
1789
+ } else reconcileArrays(parent, current, array);
1961
1790
  } else {
1962
1791
  current && cleanChildren(parent);
1963
1792
  appendNodes(parent, array);
1964
1793
  }
1965
1794
  current = array;
1966
1795
  } else if (value.nodeType) {
1967
- if (hydrating && value.parentNode)
1968
- return current = multi ? [value] : value;
1796
+ if (hydrating && value.parentNode) return current = multi ? [value] : value;
1969
1797
  if (Array.isArray(current)) {
1970
- if (multi)
1971
- return current = cleanChildren(parent, current, marker, value);
1798
+ if (multi) return current = cleanChildren(parent, current, marker, value);
1972
1799
  cleanChildren(parent, current, null, value);
1973
1800
  } else if (current == null || current === "" || !parent.firstChild) {
1974
1801
  parent.appendChild(value);
1975
- } else
1976
- parent.replaceChild(value, parent.firstChild);
1802
+ } else parent.replaceChild(value, parent.firstChild);
1977
1803
  current = value;
1978
- } else
1979
- ;
1804
+ } else ;
1980
1805
  return current;
1981
1806
  }
1982
1807
  function normalizeIncomingArray(normalized, array, current, unwrap) {
1983
1808
  let dynamic = false;
1984
1809
  for (let i = 0, len = array.length; i < len; i++) {
1985
1810
  let item = array[i], prev = current && current[normalized.length], t;
1986
- if (item == null || item === true || item === false)
1987
- ;
1811
+ if (item == null || item === true || item === false) ;
1988
1812
  else if ((t = typeof item) === "object" && item.nodeType) {
1989
1813
  normalized.push(item);
1990
1814
  } else if (Array.isArray(item)) {
1991
1815
  dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
1992
1816
  } else if (t === "function") {
1993
1817
  if (unwrap) {
1994
- while (typeof item === "function")
1995
- item = item();
1818
+ while (typeof item === "function") item = item();
1996
1819
  dynamic = normalizeIncomingArray(
1997
1820
  normalized,
1998
1821
  Array.isArray(item) ? item : [item],
@@ -2004,21 +1827,17 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
2004
1827
  }
2005
1828
  } else {
2006
1829
  const value = String(item);
2007
- if (prev && prev.nodeType === 3 && prev.data === value)
2008
- normalized.push(prev);
2009
- else
2010
- normalized.push(document.createTextNode(value));
1830
+ if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
1831
+ else normalized.push(document.createTextNode(value));
2011
1832
  }
2012
1833
  }
2013
1834
  return dynamic;
2014
1835
  }
2015
1836
  function appendNodes(parent, array, marker = null) {
2016
- for (let i = 0, len = array.length; i < len; i++)
2017
- parent.insertBefore(array[i], marker);
1837
+ for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
2018
1838
  }
2019
1839
  function cleanChildren(parent, current, marker, replacement) {
2020
- if (marker === void 0)
2021
- return parent.textContent = "";
1840
+ if (marker === void 0) return parent.textContent = "";
2022
1841
  const node = replacement || document.createTextNode("");
2023
1842
  if (current.length) {
2024
1843
  let inserted = false;
@@ -2028,13 +1847,10 @@ function cleanChildren(parent, current, marker, replacement) {
2028
1847
  const isParent = el.parentNode === parent;
2029
1848
  if (!inserted && !i)
2030
1849
  isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
2031
- else
2032
- isParent && el.remove();
2033
- } else
2034
- inserted = true;
1850
+ else isParent && el.remove();
1851
+ } else inserted = true;
2035
1852
  }
2036
- } else
2037
- parent.insertBefore(node, marker);
1853
+ } else parent.insertBefore(node, marker);
2038
1854
  return [node];
2039
1855
  }
2040
1856
  function getHydrationKey() {
@@ -2051,8 +1867,7 @@ function Portal(props) {
2051
1867
  let hydrating = !!sharedConfig.context;
2052
1868
  createEffect(
2053
1869
  () => {
2054
- if (hydrating)
2055
- getOwner().user = hydrating = false;
1870
+ if (hydrating) getOwner().user = hydrating = false;
2056
1871
  content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
2057
1872
  const el = mount();
2058
1873
  if (el instanceof HTMLHeadElement) {
@@ -3023,11 +2838,9 @@ var deleteNestedDataByPath = (oldData, deletePath) => {
3023
2838
  return oldData;
3024
2839
  };
3025
2840
  var setupStyleSheet = (nonce, target) => {
3026
- if (!nonce)
3027
- return;
2841
+ if (!nonce) return;
3028
2842
  const styleExists = document.querySelector("#_goober") || target?.querySelector("#_goober");
3029
- if (styleExists)
3030
- return;
2843
+ if (styleExists) return;
3031
2844
  const styleTag = document.createElement("style");
3032
2845
  const textNode = document.createTextNode("");
3033
2846
  styleTag.appendChild(textNode);