@frybynite/image-cloud 0.10.0 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue.js CHANGED
@@ -77,16 +77,16 @@ const mt = Object.freeze({
77
77
  // No variance by default
78
78
  max: 1
79
79
  })
80
- }), Vt = Object.freeze({
80
+ }), Jt = Object.freeze({
81
81
  mode: "none",
82
82
  range: Object.freeze({
83
83
  min: -15,
84
84
  max: 15
85
85
  })
86
- }), zt = Object.freeze({
87
- sizing: Yt,
88
- rotation: Vt
89
86
  }), Ot = Object.freeze({
87
+ sizing: Yt,
88
+ rotation: Jt
89
+ }), zt = Object.freeze({
90
90
  validateUrls: !0,
91
91
  validationTimeout: 5e3,
92
92
  validationMethod: "head",
@@ -95,16 +95,16 @@ const mt = Object.freeze({
95
95
  enabled: !1,
96
96
  centers: !1,
97
97
  loaders: !1
98
- }), Jt = Object.freeze({ maxAngle: 5, speed: 2e3, sync: "random" }), Kt = Object.freeze({ minScale: 0.95, maxScale: 1.05, speed: 2400, sync: "random" }), Zt = Object.freeze({ onRatio: 0.7, speed: 3e3, style: "snap" }), Qt = Object.freeze({ speed: 4e3, direction: "clockwise" }), $t = Object.freeze({ type: "none" }), C = Object.freeze({
98
+ }), Vt = Object.freeze({ maxAngle: 5, speed: 2e3, sync: "random" }), Kt = Object.freeze({ minScale: 0.95, maxScale: 1.05, speed: 2400, sync: "random" }), Zt = Object.freeze({ onRatio: 0.7, speed: 3e3, style: "snap" }), Qt = Object.freeze({ speed: 4e3, direction: "clockwise" }), $t = Object.freeze({ type: "none" }), C = Object.freeze({
99
99
  // Loader configuration (always an array, composite behavior is implicit)
100
100
  loaders: [],
101
101
  // Shared loader settings and debug config
102
102
  config: Object.freeze({
103
- loaders: Ot,
103
+ loaders: zt,
104
104
  debug: Dt
105
105
  }),
106
106
  // Image sizing and rotation configuration
107
- image: zt,
107
+ image: Ot,
108
108
  // Pattern-based layout configuration
109
109
  layout: Object.freeze({
110
110
  algorithm: "radial",
@@ -173,9 +173,7 @@ const mt = Object.freeze({
173
173
  }),
174
174
  navigation: Object.freeze({
175
175
  keyboard: !0,
176
- swipe: !0,
177
- mouseWheel: void 0
178
- // STUB: Not implemented yet
176
+ swipe: !0
179
177
  }),
180
178
  dragging: !0
181
179
  }),
@@ -229,79 +227,48 @@ function ee(o, t) {
229
227
  }
230
228
  return i;
231
229
  }
232
- function ie(o) {
233
- const t = o.layout?.rotation;
234
- if (t && "enabled" in t)
235
- return {
236
- rotation: {
237
- mode: t.enabled ? "random" : "none",
238
- range: t.range
239
- }
240
- };
241
- }
242
- function ne(o) {
243
- const t = o.layout?.sizing?.variance;
244
- if (t)
245
- return {
246
- sizing: {
247
- mode: "adaptive",
248
- // Legacy variance config implies adaptive mode
249
- variance: t
250
- }
251
- };
252
- }
253
- function oe(o = {}) {
254
- const t = ie(o), i = ne(o);
255
- let e = o.image;
256
- (t || i) && (e = {
257
- ...i || {},
258
- ...t || {},
259
- ...e
260
- }, e.rotation && t?.rotation && o.image?.rotation && (e.rotation = {
261
- ...t.rotation,
262
- ...o.image.rotation
263
- }));
264
- const n = [...o.loaders ?? []];
265
- o.images && o.images.length > 0 && n.unshift({
230
+ function ie(o = {}) {
231
+ const t = o.image, i = [...o.loaders ?? []];
232
+ o.images && o.images.length > 0 && i.unshift({
266
233
  static: {
267
234
  sources: [{ urls: o.images }]
268
235
  }
269
236
  });
270
- const r = {
237
+ const n = {
271
238
  loaders: {
272
- ...Ot,
239
+ ...zt,
273
240
  ...o.config?.loaders ?? {}
274
241
  }
275
- }, a = {
276
- loaders: n,
277
- config: r,
278
- image: ee(zt, e),
242
+ }, s = {
243
+ loaders: i,
244
+ config: n,
245
+ image: ee(Ot, t),
279
246
  layout: { ...C.layout },
280
247
  animation: { ...C.animation },
281
248
  interaction: { ...C.interaction },
282
249
  ui: { ...C.ui },
283
250
  styling: te(Ft, o.styling)
284
251
  };
285
- o.layout && (a.layout = {
252
+ if (o.layout && (s.layout = {
286
253
  ...C.layout,
287
254
  ...o.layout
288
- }, o.layout.responsive && (a.layout.responsive = {
255
+ }, o.layout.responsive && (s.layout.responsive = {
289
256
  ...C.layout.responsive,
290
257
  mobile: o.layout.responsive.mobile ? { ...C.layout.responsive.mobile, ...o.layout.responsive.mobile } : C.layout.responsive.mobile,
291
258
  tablet: o.layout.responsive.tablet ? { ...C.layout.responsive.tablet, ...o.layout.responsive.tablet } : C.layout.responsive.tablet
292
- }), o.layout.spacing && (a.layout.spacing = {
259
+ }), o.layout.spacing && (s.layout.spacing = {
293
260
  ...C.layout.spacing,
294
261
  ...o.layout.spacing
295
- })), o.animation && (a.animation = {
262
+ })), o.animation && (s.animation = {
296
263
  ...C.animation,
297
264
  ...o.animation
298
- }, o.animation.easing && (a.animation.easing = {
265
+ }, o.animation.easing && (s.animation.easing = {
299
266
  ...C.animation.easing,
300
267
  ...o.animation.easing
301
- }), o.animation.queue && (a.animation.queue = {
268
+ }), o.animation.queue && (s.animation.queue = {
302
269
  ...C.animation.queue,
303
270
  ...o.animation.queue
304
- }), o.animation.entry && (a.animation.entry = {
271
+ }), o.animation.entry && (s.animation.entry = {
305
272
  ...C.animation.entry,
306
273
  ...o.animation.entry,
307
274
  start: o.animation.entry.start ? {
@@ -313,48 +280,45 @@ function oe(o = {}) {
313
280
  path: o.animation.entry.path ? { ...yt, ...o.animation.entry.path } : C.animation.entry.path,
314
281
  rotation: o.animation.entry.rotation ? { ...vt, ...o.animation.entry.rotation } : C.animation.entry.rotation,
315
282
  scale: o.animation.entry.scale ? { ...Et, ...o.animation.entry.scale } : C.animation.entry.scale
316
- }), o.animation.idle && (a.animation.idle = {
283
+ }), o.animation.idle && (s.animation.idle = {
317
284
  ...$t,
318
285
  ...o.animation.idle
319
- })), o.interaction && (a.interaction = {
286
+ })), o.interaction && (s.interaction = {
320
287
  ...C.interaction,
321
288
  ...o.interaction
322
- }, o.interaction.focus && (a.interaction.focus = {
289
+ }, o.interaction.focus && (s.interaction.focus = {
323
290
  ...C.interaction.focus,
324
291
  ...o.interaction.focus
325
- }), o.interaction.navigation && (a.interaction.navigation = {
292
+ }), o.interaction.navigation && (s.interaction.navigation = {
326
293
  ...C.interaction.navigation,
327
294
  ...o.interaction.navigation
328
- }));
329
- const c = o.rendering?.ui;
330
- if (c && console.warn("[ImageCloud] rendering.ui is deprecated. Use top-level ui instead."), a.ui = {
295
+ })), s.ui = {
331
296
  ...C.ui,
332
- ...c,
333
297
  ...o.ui
334
- }, a.config.debug = {
298
+ }, s.config.debug = {
335
299
  ...Dt,
336
300
  ...o.config?.debug ?? {}
337
- }, a.layout.algorithm === "honeycomb" && a.styling) {
338
- const l = { shape: "hexagon", mode: "height-relative" };
339
- a.styling = {
340
- ...a.styling,
341
- default: { ...a.styling.default, clipPath: l },
342
- hover: { ...a.styling.hover, clipPath: l }
301
+ }, s.layout.algorithm === "honeycomb" && s.styling) {
302
+ const r = { shape: "hexagon", mode: "height-relative" };
303
+ s.styling = {
304
+ ...s.styling,
305
+ default: { ...s.styling.default, clipPath: r },
306
+ hover: { ...s.styling.hover, clipPath: r }
343
307
  // focused: untouched — user config respected
344
308
  };
345
309
  }
346
- return a;
310
+ return s;
347
311
  }
348
- function se(o, t) {
312
+ function ne(o, t) {
349
313
  return { ...o ? Ct[o] : Ct.playful, ...t };
350
314
  }
351
- function ae(o, t) {
315
+ function oe(o, t) {
352
316
  return { ...o ? At[o] : At.gentle, ...t };
353
317
  }
354
- function re(o, t) {
318
+ function se(o, t) {
355
319
  return { ...o ? Rt[o] : Rt.gentle, ...t };
356
320
  }
357
- class ce {
321
+ class ae {
358
322
  constructor(t) {
359
323
  this.activeAnimations = /* @__PURE__ */ new Map(), this.animationIdCounter = 0, this.config = t;
360
324
  }
@@ -510,34 +474,34 @@ class ce {
510
474
  return new Promise((i) => setTimeout(i, t));
511
475
  }
512
476
  }
513
- function J(o, t, i) {
477
+ function V(o, t, i) {
514
478
  return o + (t - o) * i;
515
479
  }
516
- function le(o, t, i, e) {
517
- const { overshoot: n, bounces: s, decayRatio: r } = e, a = i.x - t.x, c = i.y - t.y, l = he(s, r);
518
- let u = 0, h = 0, d = 1, g = n, b = !1;
480
+ function re(o, t, i, e) {
481
+ const { overshoot: n, bounces: s, decayRatio: r } = e, a = i.x - t.x, c = i.y - t.y, l = ce(s, r);
482
+ let u = 0, h = 0, d = 1, g = n, p = !1;
519
483
  for (let f = 0; f < l.length; f++)
520
484
  if (o <= l[f].time) {
521
- h = f === 0 ? 0 : l[f - 1].time, d = l[f].time, g = l[f].overshoot, b = l[f].isOvershoot;
485
+ h = f === 0 ? 0 : l[f - 1].time, d = l[f].time, g = l[f].overshoot, p = l[f].isOvershoot;
522
486
  break;
523
487
  }
524
- const p = (o - h) / (d - h);
525
- if (b)
526
- u = 1 + g * at(p);
488
+ const b = (o - h) / (d - h);
489
+ if (p)
490
+ u = 1 + g * at(b);
527
491
  else if (h === 0)
528
- u = at(p);
492
+ u = at(b);
529
493
  else {
530
494
  const m = 1 + (l.find(
531
495
  (y, E) => y.time > h && E > 0 && l[E - 1].isOvershoot
532
496
  )?.overshoot || g);
533
- u = J(m, 1, at(p));
497
+ u = V(m, 1, at(b));
534
498
  }
535
499
  return {
536
500
  x: t.x + a * u,
537
501
  y: t.y + c * u
538
502
  };
539
503
  }
540
- function he(o, t) {
504
+ function ce(o, t) {
541
505
  const i = [];
542
506
  let e = 0.6;
543
507
  i.push({ time: e, overshoot: 0, isOvershoot: !1 });
@@ -547,12 +511,12 @@ function he(o, t) {
547
511
  e += r, i.push({ time: e, overshoot: n, isOvershoot: !0 }), e += r, i.push({ time: e, overshoot: n * t, isOvershoot: !1 }), n *= t;
548
512
  return i.push({ time: 1, overshoot: 0, isOvershoot: !1 }), i;
549
513
  }
550
- function de(o, t, i, e) {
514
+ function le(o, t, i, e) {
551
515
  const { stiffness: n, damping: s, mass: r, oscillations: a } = e, c = i.x - t.x, l = i.y - t.y, u = Math.sqrt(n / r), h = s / (2 * Math.sqrt(n * r));
552
516
  let d;
553
517
  if (h < 1) {
554
- const g = u * Math.sqrt(1 - h * h), b = Math.exp(-h * u * o * 3), p = Math.cos(g * o * a * Math.PI);
555
- d = 1 - b * p;
518
+ const g = u * Math.sqrt(1 - h * h), p = Math.exp(-h * u * o * 3), b = Math.cos(g * o * a * Math.PI);
519
+ d = 1 - p * b;
556
520
  } else
557
521
  d = 1 - Math.exp(-u * o * 3);
558
522
  return d = Math.max(0, Math.min(d, 1.3)), {
@@ -560,24 +524,24 @@ function de(o, t, i, e) {
560
524
  y: t.y + l * d
561
525
  };
562
526
  }
563
- function ue(o, t, i, e) {
564
- const { amplitude: n, frequency: s, decay: r, decayRate: a, phase: c } = e, l = i.x - t.x, u = i.y - t.y, h = Math.sqrt(l * l + u * u), d = h > 0 ? -u / h : 0, g = h > 0 ? l / h : 1, b = s * Math.PI * 2 * o + c, p = r ? Math.pow(1 - o, a) : 1, f = n * Math.sin(b) * p, m = fe(o);
527
+ function he(o, t, i, e) {
528
+ const { amplitude: n, frequency: s, decay: r, decayRate: a, phase: c } = e, l = i.x - t.x, u = i.y - t.y, h = Math.sqrt(l * l + u * u), d = h > 0 ? -u / h : 0, g = h > 0 ? l / h : 1, p = s * Math.PI * 2 * o + c, b = r ? Math.pow(1 - o, a) : 1, f = n * Math.sin(p) * b, m = de(o);
565
529
  return {
566
- x: J(t.x, i.x, m) + f * d,
567
- y: J(t.y, i.y, m) + f * g
530
+ x: V(t.x, i.x, m) + f * d,
531
+ y: V(t.y, i.y, m) + f * g
568
532
  };
569
533
  }
570
534
  function at(o) {
571
535
  return 1 - (1 - o) * (1 - o);
572
536
  }
573
- function fe(o) {
537
+ function de(o) {
574
538
  return 1 - Math.pow(1 - o, 3);
575
539
  }
576
- function ge(o, t, i) {
540
+ function ue(o, t, i) {
577
541
  const { amplitude: e, frequency: n, decay: s } = i, r = Math.sin(o * n * Math.PI * 2), a = s ? Math.pow(1 - o, 2) : 1, c = e * r * a;
578
542
  return t + c;
579
543
  }
580
- function me(o, t, i) {
544
+ function fe(o, t, i) {
581
545
  const { overshoot: e, bounces: n } = i, s = [];
582
546
  s.push({ time: 0.5, scale: e });
583
547
  let r = e;
@@ -591,13 +555,13 @@ function me(o, t, i) {
591
555
  let h = 1;
592
556
  for (let d = 0; d < s.length; d++)
593
557
  if (o <= s[d].time) {
594
- const g = d === 0 ? 0 : s[d - 1].time, b = d === 0 ? 1 : s[d - 1].scale, p = (o - g) / (s[d].time - g), f = at(p);
595
- h = b + (s[d].scale - b) * f;
558
+ const g = d === 0 ? 0 : s[d - 1].time, p = d === 0 ? 1 : s[d - 1].scale, b = (o - g) / (s[d].time - g), f = at(b);
559
+ h = p + (s[d].scale - p) * f;
596
560
  break;
597
561
  }
598
562
  return h * t;
599
563
  }
600
- function pe(o) {
564
+ function ge(o) {
601
565
  const {
602
566
  element: t,
603
567
  startPosition: i,
@@ -612,59 +576,59 @@ function pe(o) {
612
576
  rotationConfig: h,
613
577
  startRotation: d,
614
578
  scaleConfig: g,
615
- startScale: b
616
- } = o, p = n.type, f = d !== void 0 && d !== c, m = h?.mode === "wobble", y = h?.wobble || { amplitude: 15, frequency: 3, decay: !0 }, E = f || m, v = b !== void 0 && b !== l, S = g?.mode === "pop", w = g?.pop || { overshoot: 1.2, bounces: 1 };
617
- if ((p === "linear" || p === "arc") && !E && !(v || S)) {
579
+ startScale: p
580
+ } = o, b = n.type, f = d !== void 0 && d !== c, m = h?.mode === "wobble", y = h?.wobble || { amplitude: 15, frequency: 3, decay: !0 }, E = f || m, v = p !== void 0 && p !== l, S = g?.mode === "pop", w = g?.pop || { overshoot: 1.2, bounces: 1 };
581
+ if (b === "linear" && !E && !(v || S)) {
618
582
  u && u();
619
583
  return;
620
584
  }
621
- const z = performance.now(), L = -r / 2, _ = -a / 2;
622
- function O(H) {
623
- const N = H - z, A = Math.min(N / s, 1);
585
+ const O = performance.now(), L = -r / 2, _ = -a / 2;
586
+ function z(H) {
587
+ const N = H - O, A = Math.min(N / s, 1);
624
588
  let D;
625
- switch (p) {
589
+ switch (b) {
626
590
  case "bounce": {
627
- const k = se(
591
+ const k = ne(
628
592
  n.bouncePreset,
629
593
  n.bounce
630
594
  );
631
- D = le(A, i, e, k);
595
+ D = re(A, i, e, k);
632
596
  break;
633
597
  }
634
598
  case "elastic": {
635
- const k = ae(
599
+ const k = oe(
636
600
  n.elasticPreset,
637
601
  n.elastic
638
602
  );
639
- D = de(A, i, e, k);
603
+ D = le(A, i, e, k);
640
604
  break;
641
605
  }
642
606
  case "wave": {
643
- const k = re(
607
+ const k = se(
644
608
  n.wavePreset,
645
609
  n.wave
646
610
  );
647
- D = ue(A, i, e, k);
611
+ D = he(A, i, e, k);
648
612
  break;
649
613
  }
650
614
  default:
651
615
  D = {
652
- x: J(i.x, e.x, A),
653
- y: J(i.y, e.y, A)
616
+ x: V(i.x, e.x, A),
617
+ y: V(i.y, e.y, A)
654
618
  };
655
619
  }
656
620
  const W = D.x - e.x, U = D.y - e.y;
657
621
  let M;
658
- m ? M = ge(A, c, y) : f ? M = J(d, c, A) : M = c;
622
+ m ? M = ue(A, c, y) : f ? M = V(d, c, A) : M = c;
659
623
  let R;
660
- S ? R = me(A, l, w) : v ? R = J(b, l, A) : R = l, t.style.transform = `translate(${L}px, ${_}px) translate(${W}px, ${U}px) rotate(${M}deg) scale(${R})`, A < 1 ? requestAnimationFrame(O) : (t.style.transform = `translate(${L}px, ${_}px) rotate(${c}deg) scale(${l})`, u && u());
624
+ S ? R = fe(A, l, w) : v ? R = V(p, l, A) : R = l, t.style.transform = `translate(${L}px, ${_}px) translate(${W}px, ${U}px) rotate(${M}deg) scale(${R})`, A < 1 ? requestAnimationFrame(z) : (t.style.transform = `translate(${L}px, ${_}px) rotate(${c}deg) scale(${l})`, u && u());
661
625
  }
662
- requestAnimationFrame(O);
626
+ requestAnimationFrame(z);
663
627
  }
664
- function be(o) {
628
+ function me(o) {
665
629
  return o === "bounce" || o === "elastic" || o === "wave";
666
630
  }
667
- const ye = {
631
+ const pe = {
668
632
  radial: "center",
669
633
  spiral: "center",
670
634
  grid: "top",
@@ -673,7 +637,7 @@ const ye = {
673
637
  wave: "left",
674
638
  honeycomb: "center"
675
639
  };
676
- class ve {
640
+ class be {
677
641
  constructor(t, i) {
678
642
  this.config = t, this.layoutAlgorithm = i, this.resolvedStartPosition = this.resolveStartPosition(), this.pathConfig = t.path || yt, this.rotationConfig = t.rotation || vt, this.scaleConfig = t.scale || Et;
679
643
  }
@@ -681,7 +645,7 @@ class ve {
681
645
  * Get the effective start position, considering layout-aware defaults
682
646
  */
683
647
  resolveStartPosition() {
684
- return this.config.start.position ? this.config.start.position : ye[this.layoutAlgorithm] || "nearest-edge";
648
+ return this.config.start.position ? this.config.start.position : pe[this.layoutAlgorithm] || "nearest-edge";
685
649
  }
686
650
  /**
687
651
  * Calculate the starting position for an image's entry animation
@@ -771,16 +735,16 @@ class ve {
771
735
  let c;
772
736
  const l = r.radius || "120%";
773
737
  if (typeof l == "string" && l.endsWith("%")) {
774
- const p = parseFloat(l) / 100;
738
+ const b = parseFloat(l) / 100;
775
739
  c = Math.sqrt(
776
740
  e.width ** 2 + e.height ** 2
777
- ) * p / 2;
741
+ ) * b / 2;
778
742
  } else
779
743
  c = typeof l == "number" ? l : 500;
780
744
  let u;
781
745
  a === "even" ? u = n / s * 2 * Math.PI : u = Math.random() * 2 * Math.PI;
782
- const h = e.width / 2, d = e.height / 2, g = h + Math.cos(u) * c, b = d + Math.sin(u) * c;
783
- return { x: g, y: b };
746
+ const h = e.width / 2, d = e.height / 2, g = h + Math.cos(u) * c, p = d + Math.sin(u) * c;
747
+ return { x: g, y: p };
784
748
  }
785
749
  /**
786
750
  * Get animation parameters for an image
@@ -800,8 +764,8 @@ class ve {
800
764
  * Uses pixel-based centering offset for reliable cross-browser behavior
801
765
  */
802
766
  buildStartTransform(t, i, e, n, s, r, a, c) {
803
- const l = t.x - i.x, u = t.y - i.y, h = a !== void 0 ? a : e, d = c !== void 0 ? c : n, g = s !== void 0 ? -s / 2 : 0, b = r !== void 0 ? -r / 2 : 0, p = s !== void 0 ? `translate(${g}px, ${b}px)` : "translate(-50%, -50%)";
804
- return t.useScale ? `${p} translate(${l}px, ${u}px) rotate(${h}deg) scale(0)` : `${p} translate(${l}px, ${u}px) rotate(${h}deg) scale(${d})`;
767
+ const l = t.x - i.x, u = t.y - i.y, h = a !== void 0 ? a : e, d = c !== void 0 ? c : n, g = s !== void 0 ? -s / 2 : 0, p = r !== void 0 ? -r / 2 : 0, b = s !== void 0 ? `translate(${g}px, ${p}px)` : "translate(-50%, -50%)";
768
+ return t.useScale ? `${b} translate(${l}px, ${u}px) rotate(${h}deg) scale(0)` : `${b} translate(${l}px, ${u}px) rotate(${h}deg) scale(${d})`;
805
769
  }
806
770
  /**
807
771
  * Build the final CSS transform string
@@ -826,7 +790,7 @@ class ve {
826
790
  * Check if the current path type requires JavaScript animation
827
791
  */
828
792
  requiresJSAnimation() {
829
- return be(this.pathConfig.type);
793
+ return me(this.pathConfig.type);
830
794
  }
831
795
  /**
832
796
  * Get the path configuration
@@ -1017,7 +981,7 @@ class ve {
1017
981
  return 1 - (1 - t) * (1 - t);
1018
982
  }
1019
983
  }
1020
- class Ee {
984
+ class ye {
1021
985
  constructor(t, i = 600) {
1022
986
  this.entries = /* @__PURE__ */ new Map(), this.togetherRafId = null, this.togetherSpeed = 0, this.config = t, this.entryDurationMs = i;
1023
987
  }
@@ -1102,7 +1066,7 @@ class Ee {
1102
1066
  }
1103
1067
  }
1104
1068
  _startWiggle(t) {
1105
- const i = { ...Jt, ...this.config.wiggle }, e = [
1069
+ const i = { ...Vt, ...this.config.wiggle }, e = [
1106
1070
  { transform: "rotate(0deg)", offset: 0 },
1107
1071
  { transform: `rotate(${i.maxAngle}deg)`, offset: 0.25 },
1108
1072
  { transform: "rotate(0deg)", offset: 0.5 },
@@ -1203,7 +1167,7 @@ class Ee {
1203
1167
  t.animation && (t.animation.cancel(), t.animation = null), t.blinkAnimation && (t.blinkAnimation.cancel(), t.blinkAnimation = null), t.customTeardown && (t.customTeardown(), t.customTeardown = null);
1204
1168
  }
1205
1169
  }
1206
- class we {
1170
+ class ve {
1207
1171
  constructor(t, i = {}) {
1208
1172
  this.config = t, this.imageConfig = i;
1209
1173
  }
@@ -1215,15 +1179,15 @@ class we {
1215
1179
  * @returns Array of layout objects with position, rotation, scale
1216
1180
  */
1217
1181
  generate(t, i, e = {}) {
1218
- const n = [], { width: s, height: r } = i, a = this.config.spacing.padding, c = e.fixedHeight ?? 200, l = this.imageConfig.rotation?.mode ?? "none", u = this.imageConfig.rotation?.range?.min ?? -15, h = this.imageConfig.rotation?.range?.max ?? 15, d = this.imageConfig.sizing?.variance?.min ?? 1, g = this.imageConfig.sizing?.variance?.max ?? 1, b = d !== 1 || g !== 1, f = c * 1.5 / 2, m = c / 2, y = s - a - f, E = r - a - m, v = a + f, S = a + m;
1182
+ const n = [], { width: s, height: r } = i, a = this.config.spacing.padding, c = e.fixedHeight ?? 200, l = this.imageConfig.rotation?.mode ?? "none", u = this.imageConfig.rotation?.range?.min ?? -15, h = this.imageConfig.rotation?.range?.max ?? 15, d = this.imageConfig.sizing?.variance?.min ?? 1, g = this.imageConfig.sizing?.variance?.max ?? 1, p = d !== 1 || g !== 1, f = c * 1.5 / 2, m = c / 2, y = s - a - f, E = r - a - m, v = a + f, S = a + m;
1219
1183
  for (let w = 0; w < t; w++) {
1220
- const I = this.random(v, y), z = this.random(S, E), L = l === "random" ? this.random(u, h) : 0, _ = b ? this.random(d, g) : 1, O = c * _, H = {
1184
+ const I = this.random(v, y), O = this.random(S, E), L = l === "random" ? this.random(u, h) : 0, _ = p ? this.random(d, g) : 1, z = c * _, H = {
1221
1185
  id: w,
1222
1186
  x: I,
1223
- y: z,
1187
+ y: O,
1224
1188
  rotation: L,
1225
1189
  scale: _,
1226
- baseSize: O
1190
+ baseSize: z
1227
1191
  };
1228
1192
  n.push(H);
1229
1193
  }
@@ -1239,7 +1203,7 @@ class we {
1239
1203
  return Math.random() * (i - t) + t;
1240
1204
  }
1241
1205
  }
1242
- class xe {
1206
+ class Ee {
1243
1207
  constructor(t, i = {}) {
1244
1208
  this.config = t, this.imageConfig = i;
1245
1209
  }
@@ -1251,7 +1215,7 @@ class xe {
1251
1215
  * @returns Array of layout objects with position, rotation, scale
1252
1216
  */
1253
1217
  generate(t, i, e = {}) {
1254
- const n = [], { width: s, height: r } = i, a = e.fixedHeight ?? 200, c = this.imageConfig.rotation?.mode ?? "none", l = this.imageConfig.rotation?.range?.min ?? -15, u = this.imageConfig.rotation?.range?.max ?? 15, h = this.imageConfig.sizing?.variance?.min ?? 1, d = this.imageConfig.sizing?.variance?.max ?? 1, g = h !== 1 || d !== 1, b = this.config.scaleDecay ?? 0, p = {
1218
+ const n = [], { width: s, height: r } = i, a = e.fixedHeight ?? 200, c = this.imageConfig.rotation?.mode ?? "none", l = this.imageConfig.rotation?.range?.min ?? -15, u = this.imageConfig.rotation?.range?.max ?? 15, h = this.imageConfig.sizing?.variance?.min ?? 1, d = this.imageConfig.sizing?.variance?.max ?? 1, g = h !== 1 || d !== 1, p = this.config.scaleDecay ?? 0, b = {
1255
1219
  ...Wt,
1256
1220
  ...this.config.radial
1257
1221
  }, f = e.fixedHeight ?? a, m = s / 2, y = r / 2, E = Math.ceil(Math.sqrt(t)), v = this.config.spacing.padding ?? 50, S = Math.max(f * 0.8, Math.min(
@@ -1259,14 +1223,14 @@ class xe {
1259
1223
  y - v - f / 2
1260
1224
  ));
1261
1225
  if (t > 0) {
1262
- const z = g ? this.random(h, d) : 1, L = f * z;
1226
+ const O = g ? this.random(h, d) : 1, L = f * O;
1263
1227
  n.push({
1264
1228
  id: 0,
1265
1229
  x: m,
1266
1230
  y,
1267
1231
  rotation: c === "random" ? this.random(l * 0.33, u * 0.33) : 0,
1268
1232
  // Less rotation for center
1269
- scale: z,
1233
+ scale: O,
1270
1234
  baseSize: L,
1271
1235
  zIndex: 100
1272
1236
  // Center image is highest
@@ -1274,7 +1238,7 @@ class xe {
1274
1238
  }
1275
1239
  let w = 1, I = 1;
1276
1240
  for (; w < t; ) {
1277
- const z = I / E, L = b > 0 ? 1 - z * b * 0.5 : 1, _ = Math.max(f * 0.8, S / E * 1.5 / p.tightness), O = I * _, H = O * 1.5, N = Math.PI * (3 * (H + O) - Math.sqrt((3 * H + O) * (H + 3 * O))), A = this.estimateWidth(f), D = Math.floor(N / (A * 0.7));
1241
+ const O = I / E, L = p > 0 ? 1 - O * p * 0.5 : 1, _ = Math.max(f * 0.8, S / E * 1.5 / b.tightness), z = I * _, H = z * 1.5, N = Math.PI * (3 * (H + z) - Math.sqrt((3 * H + z) * (H + 3 * z))), A = this.estimateWidth(f), D = Math.floor(N / (A * 0.7));
1278
1242
  if (D === 0) {
1279
1243
  I++;
1280
1244
  continue;
@@ -1282,7 +1246,7 @@ class xe {
1282
1246
  const W = 2 * Math.PI / D, U = I * (20 * Math.PI / 180);
1283
1247
  for (let M = 0; M < D && w < t; M++) {
1284
1248
  const R = M * W + U, k = g ? this.random(h, d) : 1, q = L * k, T = f * q;
1285
- let $ = m + Math.cos(R) * H, F = y + Math.sin(R) * O;
1249
+ let $ = m + Math.cos(R) * H, F = y + Math.sin(R) * z;
1286
1250
  const P = T * 1.5 / 2, B = T / 2;
1287
1251
  $ - P < v ? $ = v + P : $ + P > s - v && ($ = s - v - P), F - B < v ? F = v + B : F + B > r - v && (F = r - v - B);
1288
1252
  const Y = c === "random" ? this.random(l, u) : 0;
@@ -1320,7 +1284,7 @@ class xe {
1320
1284
  return Math.random() * (i - t) + t;
1321
1285
  }
1322
1286
  }
1323
- const Se = {
1287
+ const we = {
1324
1288
  columns: "auto",
1325
1289
  rows: "auto",
1326
1290
  stagger: "none",
@@ -1348,7 +1312,7 @@ const Se = {
1348
1312
  { x: 0, y: 1 }
1349
1313
  // down
1350
1314
  ];
1351
- class Ie {
1315
+ class xe {
1352
1316
  constructor(t, i = {}) {
1353
1317
  this.config = t, this.imageConfig = i;
1354
1318
  }
@@ -1360,13 +1324,13 @@ class Ie {
1360
1324
  * @returns Array of layout objects with position, rotation, scale
1361
1325
  */
1362
1326
  generate(t, i, e = {}) {
1363
- const n = [], { width: s, height: r } = i, a = { ...Se, ...this.config.grid }, c = this.config.spacing.padding, l = e.fixedHeight ?? 200, u = this.imageConfig.rotation?.mode ?? "none", h = this.imageConfig.sizing?.variance?.min ?? 1, d = this.imageConfig.sizing?.variance?.max ?? 1, g = h !== 1 || d !== 1, b = s - 2 * c, p = r - 2 * c, { columns: f, rows: m } = this.calculateGridDimensions(
1327
+ const n = [], { width: s, height: r } = i, a = { ...we, ...this.config.grid }, c = this.config.spacing.padding, l = e.fixedHeight ?? 200, u = this.imageConfig.rotation?.mode ?? "none", h = this.imageConfig.sizing?.variance?.min ?? 1, d = this.imageConfig.sizing?.variance?.max ?? 1, g = h !== 1 || d !== 1, p = s - 2 * c, b = r - 2 * c, { columns: f, rows: m } = this.calculateGridDimensions(
1364
1328
  t,
1365
- b,
1366
1329
  p,
1330
+ b,
1367
1331
  l,
1368
1332
  a
1369
- ), y = a.stagger === "row", E = a.stagger === "column", v = y ? f + 0.5 : f, S = E ? m + 0.5 : m, w = (b - a.gap * (f - 1)) / v, I = (p - a.gap * (m - 1)) / S, z = y ? w / 2 : 0, L = E ? I / 2 : 0, _ = 1 + a.overlap, O = Math.min(w, I) * _, H = e.fixedHeight ? Math.min(e.fixedHeight, O) : O, N = f * w + (f - 1) * a.gap + z, A = m * I + (m - 1) * a.gap + L, D = c + (b - N) / 2, W = c + (p - A) / 2, U = f * m, M = a.columns !== "auto" && a.rows !== "auto", R = M && t > U;
1333
+ ), y = a.stagger === "row", E = a.stagger === "column", v = y ? f + 0.5 : f, S = E ? m + 0.5 : m, w = (p - a.gap * (f - 1)) / v, I = (b - a.gap * (m - 1)) / S, O = y ? w / 2 : 0, L = E ? I / 2 : 0, _ = 1 + a.overlap, z = Math.min(w, I) * _, H = e.fixedHeight ? Math.min(e.fixedHeight, z) : z, N = f * w + (f - 1) * a.gap + O, A = m * I + (m - 1) * a.gap + L, D = c + (p - N) / 2, W = c + (b - A) / 2, U = f * m, M = a.columns !== "auto" && a.rows !== "auto", R = M && t > U;
1370
1334
  typeof window < "u" && (window.__gridOverflowDebug = {
1371
1335
  gridConfigColumns: a.columns,
1372
1336
  gridConfigRows: a.rows,
@@ -1394,7 +1358,7 @@ class Ie {
1394
1358
  const G = w / 2 * a.jitter, j = I / 2 * a.jitter;
1395
1359
  P += this.random(-G, G), B += this.random(-j, j);
1396
1360
  }
1397
- let Y = P, V = B;
1361
+ let Y = P, J = B;
1398
1362
  if (!R && a.fillDirection === "row") {
1399
1363
  const G = t % f || f;
1400
1364
  if (F === Math.floor((t - 1) / f) && G < f) {
@@ -1404,7 +1368,7 @@ class Ie {
1404
1368
  }
1405
1369
  }
1406
1370
  const ct = g ? this.random(h, d) : 1, K = H * ct, nt = K * 1.5 / 2, ot = K / 2, ht = c + nt, dt = s - c - nt, _t = c + ot, Ut = r - c - ot;
1407
- Y = Math.max(ht, Math.min(Y, dt)), V = Math.max(_t, Math.min(V, Ut));
1371
+ Y = Math.max(ht, Math.min(Y, dt)), J = Math.max(_t, Math.min(J, Ut));
1408
1372
  let ut = 0;
1409
1373
  if (u === "random") {
1410
1374
  const G = this.imageConfig.rotation?.range?.min ?? -15, j = this.imageConfig.rotation?.range?.max ?? 15;
@@ -1414,7 +1378,7 @@ class Ie {
1414
1378
  R && X > 0 ? ft = 50 - X : ft = R ? 100 + T : T + 1, n.push({
1415
1379
  id: T,
1416
1380
  x: Y,
1417
- y: V,
1381
+ y: J,
1418
1382
  rotation: ut,
1419
1383
  scale: ct,
1420
1384
  baseSize: K,
@@ -1448,14 +1412,14 @@ class Ie {
1448
1412
  return Math.random() * (i - t) + t;
1449
1413
  }
1450
1414
  }
1451
- const Ce = Math.PI * (3 - Math.sqrt(5)), Ae = {
1415
+ const Se = Math.PI * (3 - Math.sqrt(5)), Ie = {
1452
1416
  spiralType: "golden",
1453
1417
  direction: "counterclockwise",
1454
1418
  tightness: 1,
1455
1419
  scaleDecay: 0,
1456
1420
  startAngle: 0
1457
1421
  };
1458
- class Re {
1422
+ class Ce {
1459
1423
  constructor(t, i = {}) {
1460
1424
  this.config = t, this.imageConfig = i;
1461
1425
  }
@@ -1467,14 +1431,14 @@ class Re {
1467
1431
  * @returns Array of layout objects with position, rotation, scale
1468
1432
  */
1469
1433
  generate(t, i, e = {}) {
1470
- const n = [], { width: s, height: r } = i, a = { ...Ae, ...this.config.spiral }, c = this.config.spacing.padding, l = e.fixedHeight ?? 200, u = this.imageConfig.rotation?.mode ?? "none", h = this.imageConfig.rotation?.range?.min ?? -15, d = this.imageConfig.rotation?.range?.max ?? 15, g = this.imageConfig.sizing?.variance?.min ?? 1, b = this.imageConfig.sizing?.variance?.max ?? 1, p = g !== 1 || b !== 1, f = this.config.scaleDecay ?? a.scaleDecay, m = s / 2, y = r / 2, E = Math.min(
1434
+ const n = [], { width: s, height: r } = i, a = { ...Ie, ...this.config.spiral }, c = this.config.spacing.padding, l = e.fixedHeight ?? 200, u = this.imageConfig.rotation?.mode ?? "none", h = this.imageConfig.rotation?.range?.min ?? -15, d = this.imageConfig.rotation?.range?.max ?? 15, g = this.imageConfig.sizing?.variance?.min ?? 1, p = this.imageConfig.sizing?.variance?.max ?? 1, b = g !== 1 || p !== 1, f = this.config.scaleDecay ?? a.scaleDecay, m = s / 2, y = r / 2, E = Math.min(
1471
1435
  m - c - l / 2,
1472
1436
  y - c - l / 2
1473
1437
  ), v = a.direction === "clockwise" ? -1 : 1;
1474
1438
  for (let S = 0; S < t; S++) {
1475
1439
  let w, I;
1476
1440
  if (a.spiralType === "golden")
1477
- w = S * Ce * v + a.startAngle, I = this.calculateGoldenRadius(S, t, E, a.tightness);
1441
+ w = S * Se * v + a.startAngle, I = this.calculateGoldenRadius(S, t, E, a.tightness);
1478
1442
  else if (a.spiralType === "archimedean") {
1479
1443
  const P = S * 0.5 * a.tightness;
1480
1444
  w = P * v + a.startAngle, I = this.calculateArchimedeanRadius(P, t, E, a.tightness);
@@ -1482,7 +1446,7 @@ class Re {
1482
1446
  const P = S * 0.3 * a.tightness;
1483
1447
  w = P * v + a.startAngle, I = this.calculateLogarithmicRadius(P, t, E, a.tightness);
1484
1448
  }
1485
- const z = m + Math.cos(w) * I, L = y + Math.sin(w) * I, _ = I / E, O = f > 0 ? 1 - _ * f * 0.5 : 1, H = p ? this.random(g, b) : 1, N = O * H, A = l * N, W = A * 1.5 / 2, U = A / 2, M = c + W, R = s - c - W, k = c + U, q = r - c - U, T = Math.max(M, Math.min(z, R)), $ = Math.max(k, Math.min(L, q));
1449
+ const O = m + Math.cos(w) * I, L = y + Math.sin(w) * I, _ = I / E, z = f > 0 ? 1 - _ * f * 0.5 : 1, H = b ? this.random(g, p) : 1, N = z * H, A = l * N, W = A * 1.5 / 2, U = A / 2, M = c + W, R = s - c - W, k = c + U, q = r - c - U, T = Math.max(M, Math.min(O, R)), $ = Math.max(k, Math.min(L, q));
1486
1450
  let F = 0;
1487
1451
  if (u === "random") {
1488
1452
  const P = w * 180 / Math.PI % 360, B = this.random(h, d);
@@ -1549,7 +1513,7 @@ class Re {
1549
1513
  return Math.random() * (i - t) + t;
1550
1514
  }
1551
1515
  }
1552
- const Te = {
1516
+ const Ae = {
1553
1517
  clusterCount: "auto",
1554
1518
  clusterSpread: 150,
1555
1519
  clusterSpacing: 200,
@@ -1557,7 +1521,7 @@ const Te = {
1557
1521
  overlap: 0.3,
1558
1522
  distribution: "gaussian"
1559
1523
  };
1560
- class Le {
1524
+ class Re {
1561
1525
  constructor(t, i = {}) {
1562
1526
  this.config = t, this.imageConfig = i;
1563
1527
  }
@@ -1569,7 +1533,7 @@ class Le {
1569
1533
  * @returns Array of layout objects with position, rotation, scale
1570
1534
  */
1571
1535
  generate(t, i, e = {}) {
1572
- const n = [], { width: s, height: r } = i, a = { ...Te, ...this.config.cluster }, c = this.config.spacing.padding, l = e.fixedHeight ?? 200, u = this.imageConfig.rotation?.mode ?? "none", h = this.imageConfig.rotation?.range?.min ?? -15, d = this.imageConfig.rotation?.range?.max ?? 15, g = this.imageConfig.sizing?.variance?.min ?? 1, b = this.imageConfig.sizing?.variance?.max ?? 1, p = g !== 1 || b !== 1, f = this.calculateClusterCount(
1536
+ const n = [], { width: s, height: r } = i, a = { ...Ae, ...this.config.cluster }, c = this.config.spacing.padding, l = e.fixedHeight ?? 200, u = this.imageConfig.rotation?.mode ?? "none", h = this.imageConfig.rotation?.range?.min ?? -15, d = this.imageConfig.rotation?.range?.max ?? 15, g = this.imageConfig.sizing?.variance?.min ?? 1, p = this.imageConfig.sizing?.variance?.max ?? 1, b = g !== 1 || p !== 1, f = this.calculateClusterCount(
1573
1537
  t,
1574
1538
  a.clusterCount,
1575
1539
  s,
@@ -1588,20 +1552,20 @@ class Le {
1588
1552
  for (let v = 0; v < f; v++) {
1589
1553
  const S = m[v], w = y[v];
1590
1554
  for (let I = 0; I < w; I++) {
1591
- let z, L;
1555
+ let O, L;
1592
1556
  if (a.distribution === "gaussian")
1593
- z = this.gaussianRandom() * S.spread, L = this.gaussianRandom() * S.spread;
1557
+ O = this.gaussianRandom() * S.spread, L = this.gaussianRandom() * S.spread;
1594
1558
  else {
1595
1559
  const F = this.random(0, Math.PI * 2), X = this.random(0, S.spread);
1596
- z = Math.cos(F) * X, L = Math.sin(F) * X;
1560
+ O = Math.cos(F) * X, L = Math.sin(F) * X;
1597
1561
  }
1598
- const _ = 1 + a.overlap * 0.5, O = 1 + a.overlap * 0.3;
1599
- z /= _, L /= _;
1600
- const H = p ? this.random(g, b) : 1, N = O * H, A = l * N;
1601
- let D = S.x + z, W = S.y + L;
1562
+ const _ = 1 + a.overlap * 0.5, z = 1 + a.overlap * 0.3;
1563
+ O /= _, L /= _;
1564
+ const H = b ? this.random(g, p) : 1, N = z * H, A = l * N;
1565
+ let D = S.x + O, W = S.y + L;
1602
1566
  const M = A * 1.5 / 2, R = A / 2;
1603
1567
  D = Math.max(c + M, Math.min(D, s - c - M)), W = Math.max(c + R, Math.min(W, r - c - R));
1604
- const k = u === "random" ? this.random(h, d) : 0, T = Math.sqrt(z * z + L * L) / S.spread, $ = Math.round((1 - T) * 50) + 1;
1568
+ const k = u === "random" ? this.random(h, d) : 0, T = Math.sqrt(O * O + L * L) / S.spread, $ = Math.round((1 - T) * 50) + 1;
1605
1569
  n.push({
1606
1570
  id: E,
1607
1571
  x: D,
@@ -1632,8 +1596,8 @@ class Le {
1632
1596
  generateClusterCenters(t, i, e, n, s) {
1633
1597
  const r = [], c = n + s.clusterSpread, l = i - n - s.clusterSpread, u = n + s.clusterSpread, h = e - n - s.clusterSpread;
1634
1598
  for (let d = 0; d < t; d++) {
1635
- let g = null, b = -1;
1636
- for (let p = 0; p < 100; p++) {
1599
+ let g = null, p = -1;
1600
+ for (let b = 0; b < 100; b++) {
1637
1601
  const f = {
1638
1602
  x: this.random(c, l),
1639
1603
  y: this.random(u, h),
@@ -1644,7 +1608,7 @@ class Le {
1644
1608
  const E = f.x - y.x, v = f.y - y.y, S = Math.sqrt(E * E + v * v);
1645
1609
  m = Math.min(m, S);
1646
1610
  }
1647
- if ((r.length === 0 || m > b) && (g = f, b = m), m >= s.clusterSpacing)
1611
+ if ((r.length === 0 || m > p) && (g = f, p = m), m >= s.clusterSpacing)
1648
1612
  break;
1649
1613
  }
1650
1614
  g && r.push(g);
@@ -1675,7 +1639,7 @@ class Le {
1675
1639
  return Math.random() * (i - t) + t;
1676
1640
  }
1677
1641
  }
1678
- class Me {
1642
+ class Te {
1679
1643
  constructor(t, i = {}) {
1680
1644
  this.config = t, this.imageConfig = i;
1681
1645
  }
@@ -1687,25 +1651,25 @@ class Me {
1687
1651
  * @returns Array of layout objects with position, rotation, scale
1688
1652
  */
1689
1653
  generate(t, i, e = {}) {
1690
- const n = [], { width: s, height: r } = i, a = e.fixedHeight ?? 200, c = this.config.spacing.padding ?? 50, l = this.imageConfig.rotation?.mode ?? "none", u = this.imageConfig.rotation?.range?.min ?? -15, h = this.imageConfig.rotation?.range?.max ?? 15, d = this.imageConfig.sizing?.variance?.min ?? 1, g = this.imageConfig.sizing?.variance?.max ?? 1, b = d !== 1 || g !== 1, p = e.fixedHeight ?? a, f = {
1654
+ const n = [], { width: s, height: r } = i, a = e.fixedHeight ?? 200, c = this.config.spacing.padding ?? 50, l = this.imageConfig.rotation?.mode ?? "none", u = this.imageConfig.rotation?.range?.min ?? -15, h = this.imageConfig.rotation?.range?.max ?? 15, d = this.imageConfig.sizing?.variance?.min ?? 1, g = this.imageConfig.sizing?.variance?.max ?? 1, p = d !== 1 || g !== 1, b = e.fixedHeight ?? a, f = {
1691
1655
  ...Gt,
1692
1656
  ...this.config.wave
1693
- }, { rows: m, amplitude: y, frequency: E, phaseShift: v, synchronization: S } = f, w = Math.ceil(t / m), L = p * 1.5 / 2, _ = c + L, O = s - c - L, H = O - _, N = w > 1 ? H / (w - 1) : 0, A = c + y + p / 2, D = r - c - y - p / 2, W = D - A, U = m > 1 ? W / (m - 1) : 0;
1657
+ }, { rows: m, amplitude: y, frequency: E, phaseShift: v, synchronization: S } = f, w = Math.ceil(t / m), L = b * 1.5 / 2, _ = c + L, z = s - c - L, H = z - _, N = w > 1 ? H / (w - 1) : 0, A = c + y + b / 2, D = r - c - y - b / 2, W = D - A, U = m > 1 ? W / (m - 1) : 0;
1694
1658
  let M = 0;
1695
1659
  for (let R = 0; R < m && M < t; R++) {
1696
1660
  const k = m === 1 ? (A + D) / 2 : A + R * U;
1697
1661
  let q = 0;
1698
1662
  S === "offset" ? q = R * v : S === "alternating" && (q = R * Math.PI);
1699
1663
  for (let T = 0; T < w && M < t; T++) {
1700
- const $ = w === 1 ? (_ + O) / 2 : _ + T * N, F = this.calculateWaveY($, s, y, E, q), X = $, P = k + F, B = b ? this.random(d, g) : 1, Y = p * B;
1701
- let V = 0;
1702
- l === "tangent" ? V = this.calculateRotation($, s, y, E, q) : l === "random" && (V = this.random(u, h));
1664
+ const $ = w === 1 ? (_ + z) / 2 : _ + T * N, F = this.calculateWaveY($, s, y, E, q), X = $, P = k + F, B = p ? this.random(d, g) : 1, Y = b * B;
1665
+ let J = 0;
1666
+ l === "tangent" ? J = this.calculateRotation($, s, y, E, q) : l === "random" && (J = this.random(u, h));
1703
1667
  const K = Y * 1.5 / 2, lt = Y / 2, nt = c + K, ot = s - c - K, ht = c + lt, dt = r - c - lt;
1704
1668
  n.push({
1705
1669
  id: M,
1706
1670
  x: Math.max(nt, Math.min(X, ot)),
1707
1671
  y: Math.max(ht, Math.min(P, dt)),
1708
- rotation: V,
1672
+ rotation: J,
1709
1673
  scale: B,
1710
1674
  baseSize: Y,
1711
1675
  zIndex: M + 1
@@ -1765,21 +1729,21 @@ const wt = 100, Q = 100 / Math.sqrt(3), xt = [
1765
1729
  // lower-left
1766
1730
  [0, 50]
1767
1731
  // left
1768
- ], Fe = xt[1][0] / wt, ze = xt[2][1] / wt;
1769
- function Oe(o) {
1732
+ ], Le = xt[1][0] / wt, Me = xt[2][1] / wt;
1733
+ function Fe(o) {
1770
1734
  return {
1771
- colStep: Fe * o,
1772
- rowOffset: ze * o
1735
+ colStep: Le * o,
1736
+ rowOffset: Me * o
1773
1737
  };
1774
1738
  }
1775
- function De(o, t, i, e, n, s) {
1776
- const { colStep: r } = Oe(s);
1739
+ function Oe(o, t, i, e, n, s) {
1740
+ const { colStep: r } = Fe(s);
1777
1741
  return {
1778
1742
  px: e + r * o,
1779
1743
  py: n + s * (t + o / 2)
1780
1744
  };
1781
1745
  }
1782
- const $e = [
1746
+ const ze = [
1783
1747
  [1, 0, -1],
1784
1748
  [0, 1, -1],
1785
1749
  [-1, 1, 0],
@@ -1787,16 +1751,16 @@ const $e = [
1787
1751
  [0, -1, 1],
1788
1752
  [1, -1, 0]
1789
1753
  ];
1790
- function Pe(o) {
1754
+ function De(o) {
1791
1755
  if (o === 0) return [[0, 0, 0]];
1792
1756
  const t = [];
1793
1757
  let [i, e, n] = [0, -o, o];
1794
- for (const [s, r, a] of $e)
1758
+ for (const [s, r, a] of ze)
1795
1759
  for (let c = 0; c < o; c++)
1796
1760
  t.push([i, e, n]), i += s, e += r, n += a;
1797
1761
  return t;
1798
1762
  }
1799
- class _e {
1763
+ class $e {
1800
1764
  // imageConfig intentionally not stored — honeycomb forces uniform sizing (rotation/variance
1801
1765
  // would break hex tiling). Kept as parameter for interface compatibility.
1802
1766
  constructor(t, i = {}) {
@@ -1807,12 +1771,12 @@ class _e {
1807
1771
  ...qt,
1808
1772
  ...this.config.honeycomb
1809
1773
  }.spacing ?? 0, d = l + h;
1810
- let g = 0, b = 0;
1774
+ let g = 0, p = 0;
1811
1775
  for (; g < t; ) {
1812
- const p = Pe(b);
1813
- for (const [f, m, y] of p) {
1776
+ const b = De(p);
1777
+ for (const [f, m, y] of b) {
1814
1778
  if (g >= t) break;
1815
- const { px: E, py: v } = De(f, m, y, a, c, d);
1779
+ const { px: E, py: v } = Oe(f, m, y, a, c, d);
1816
1780
  n.push({
1817
1781
  id: g,
1818
1782
  x: E,
@@ -1821,15 +1785,15 @@ class _e {
1821
1785
  scale: 1,
1822
1786
  baseSize: l,
1823
1787
  // Inner rings render above outer rings
1824
- zIndex: Math.max(1, 100 - b)
1788
+ zIndex: Math.max(1, 100 - p)
1825
1789
  }), g++;
1826
1790
  }
1827
- b++;
1791
+ p++;
1828
1792
  }
1829
1793
  return n;
1830
1794
  }
1831
1795
  }
1832
- class Ue {
1796
+ class Pe {
1833
1797
  constructor(t) {
1834
1798
  this.config = t.layout, this.imageConfig = t.image, this.layouts = /* @__PURE__ */ new Map(), this.placementLayout = this.initLayout();
1835
1799
  }
@@ -1840,19 +1804,19 @@ class Ue {
1840
1804
  initLayout() {
1841
1805
  switch (this.config.algorithm) {
1842
1806
  case "radial":
1843
- return new xe(this.config, this.imageConfig);
1807
+ return new Ee(this.config, this.imageConfig);
1844
1808
  case "grid":
1845
- return new Ie(this.config, this.imageConfig);
1809
+ return new xe(this.config, this.imageConfig);
1846
1810
  case "spiral":
1847
- return new Re(this.config, this.imageConfig);
1811
+ return new Ce(this.config, this.imageConfig);
1848
1812
  case "cluster":
1849
- return new Le(this.config, this.imageConfig);
1813
+ return new Re(this.config, this.imageConfig);
1850
1814
  case "wave":
1851
- return new Me(this.config, this.imageConfig);
1815
+ return new Te(this.config, this.imageConfig);
1852
1816
  case "honeycomb":
1853
- return new _e(this.config, this.imageConfig);
1817
+ return new $e(this.config, this.imageConfig);
1854
1818
  default:
1855
- return new we(this.config, this.imageConfig);
1819
+ return new ve(this.config, this.imageConfig);
1856
1820
  }
1857
1821
  }
1858
1822
  /**
@@ -1934,8 +1898,8 @@ class Ue {
1934
1898
  const s = this.imageConfig.sizing, r = this.resolveBaseHeight(n);
1935
1899
  if (r !== void 0)
1936
1900
  return { height: r };
1937
- const a = s?.minSize ?? 50, c = s?.maxSize ?? 400, l = this.config.targetCoverage ?? 0.6, u = this.config.densityFactor ?? 1, { width: h, height: d } = t, p = h * d * l / i;
1938
- let m = Math.sqrt(p / 1.4);
1901
+ const a = s?.minSize ?? 50, c = s?.maxSize ?? 400, l = this.config.targetCoverage ?? 0.6, u = this.config.densityFactor ?? 1, { width: h, height: d } = t, b = h * d * l / i;
1902
+ let m = Math.sqrt(b / 1.4);
1939
1903
  m *= u, m = Math.min(m, e);
1940
1904
  let y = this.clamp(m, a, c);
1941
1905
  if (y === a && m < a) {
@@ -1974,7 +1938,7 @@ const Lt = {
1974
1938
  hexagon: "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)",
1975
1939
  octagon: "polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",
1976
1940
  diamond: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)"
1977
- }, He = {
1941
+ }, _e = {
1978
1942
  // Circle - uses radius in pixels (refHeight of 100px = 50px radius)
1979
1943
  circle: {
1980
1944
  refHeight: 100,
@@ -2012,29 +1976,29 @@ const Lt = {
2012
1976
  points: [[50, 0], [100, 50], [50, 100], [0, 50]]
2013
1977
  }
2014
1978
  };
2015
- function Ne(o) {
1979
+ function Ue(o) {
2016
1980
  if (o)
2017
1981
  return o in Lt ? Lt[o] : o;
2018
1982
  }
2019
- function ke(o, t, i) {
2020
- const e = He[o];
1983
+ function He(o, t, i) {
1984
+ const e = _e[o];
2021
1985
  if (!e) return "";
2022
1986
  const n = t / e.refHeight;
2023
1987
  if (o === "circle")
2024
1988
  return `circle(${Math.round(50 * n * 100) / 100}px)`;
2025
- const s = e.points.map(([p]) => p), r = e.points.map(([, p]) => p), a = (Math.min(...s) + Math.max(...s)) / 2 * n, c = (Math.min(...r) + Math.max(...r)) / 2 * n, l = (Math.max(...s) - Math.min(...s)) * n, u = (i ?? l) / 2, h = t / 2, d = u - a, g = h - c;
2026
- return `polygon(${e.points.map(([p, f]) => {
2027
- const m = Math.round((p * n + d) * 100) / 100, y = Math.round((f * n + g) * 100) / 100;
1989
+ const s = e.points.map(([b]) => b), r = e.points.map(([, b]) => b), a = (Math.min(...s) + Math.max(...s)) / 2 * n, c = (Math.min(...r) + Math.max(...r)) / 2 * n, l = (Math.max(...s) - Math.min(...s)) * n, u = (i ?? l) / 2, h = t / 2, d = u - a, g = h - c;
1990
+ return `polygon(${e.points.map(([b, f]) => {
1991
+ const m = Math.round((b * n + d) * 100) / 100, y = Math.round((f * n + g) * 100) / 100;
2028
1992
  return `${m}px ${y}px`;
2029
1993
  }).join(", ")})`;
2030
1994
  }
2031
- function Be(o) {
1995
+ function Ne(o) {
2032
1996
  return o in mt;
2033
1997
  }
2034
- function je(o) {
2035
- return o ? Be(o) ? mt[o] : o : mt.md;
1998
+ function ke(o) {
1999
+ return o ? Ne(o) ? mt[o] : o : mt.md;
2036
2000
  }
2037
- function We(o) {
2001
+ function Be(o) {
2038
2002
  if (!o) return "";
2039
2003
  const t = [];
2040
2004
  if (o.grayscale !== void 0 && t.push(`grayscale(${o.grayscale})`), o.blur !== void 0 && t.push(`blur(${o.blur}px)`), o.brightness !== void 0 && t.push(`brightness(${o.brightness})`), o.contrast !== void 0 && t.push(`contrast(${o.contrast})`), o.saturate !== void 0 && t.push(`saturate(${o.saturate})`), o.opacity !== void 0 && t.push(`opacity(${o.opacity})`), o.sepia !== void 0 && t.push(`sepia(${o.sepia})`), o.hueRotate !== void 0 && t.push(`hue-rotate(${o.hueRotate}deg)`), o.invert !== void 0 && t.push(`invert(${o.invert})`), o.dropShadow !== void 0)
@@ -2063,8 +2027,8 @@ function it(o, t, i) {
2063
2027
  const a = o.border || {}, c = { ...a, ...o.borderTop }, l = { ...a, ...o.borderRight }, u = { ...a, ...o.borderBottom }, h = { ...a, ...o.borderLeft };
2064
2028
  e.borderTop = tt(c), e.borderRight = tt(l), e.borderBottom = tt(u), e.borderLeft = tt(h);
2065
2029
  } else o.border && (e.border = tt(o.border));
2066
- o.shadow !== void 0 && (e.boxShadow = je(o.shadow));
2067
- const r = We(o.filter);
2030
+ o.shadow !== void 0 && (e.boxShadow = ke(o.shadow));
2031
+ const r = Be(o.filter);
2068
2032
  if (e.filter = r || "none", o.opacity !== void 0 && (e.opacity = String(o.opacity)), o.cursor !== void 0 && (e.cursor = o.cursor), o.outline && o.outline.style !== "none" && (o.outline.width ?? 0) > 0) {
2069
2033
  const a = o.outline.width ?? 0, c = o.outline.style ?? "solid", l = o.outline.color ?? "#000000";
2070
2034
  e.outline = `${a}px ${c} ${l}`, o.outline.offset !== void 0 && (e.outlineOffset = `${o.outline.offset}px`);
@@ -2073,21 +2037,21 @@ function it(o, t, i) {
2073
2037
  let a;
2074
2038
  const c = typeof o.clipPath == "object" && o.clipPath !== null && "shape" in o.clipPath, l = c ? o.clipPath : void 0;
2075
2039
  if (l?.mode === "height-relative" && t)
2076
- a = ke(l.shape, t, i);
2040
+ a = He(l.shape, t, i);
2077
2041
  else {
2078
2042
  const u = c && l ? l.shape : o.clipPath;
2079
- a = Ne(u);
2043
+ a = Ue(u);
2080
2044
  }
2081
2045
  a && (a === "none" ? e.clipPath = "unset" : (e.clipPath = a, e.overflow = "hidden"));
2082
2046
  }
2083
2047
  return e;
2084
2048
  }
2085
- function Ge(o, t) {
2049
+ function je(o, t) {
2086
2050
  t.borderRadius !== void 0 && (o.style.borderRadius = t.borderRadius), t.borderTopLeftRadius !== void 0 && (o.style.borderTopLeftRadius = t.borderTopLeftRadius), t.borderTopRightRadius !== void 0 && (o.style.borderTopRightRadius = t.borderTopRightRadius), t.borderBottomRightRadius !== void 0 && (o.style.borderBottomRightRadius = t.borderBottomRightRadius), t.borderBottomLeftRadius !== void 0 && (o.style.borderBottomLeftRadius = t.borderBottomLeftRadius), t.border !== void 0 && (o.style.border = t.border), t.borderTop !== void 0 && (o.style.borderTop = t.borderTop), t.borderRight !== void 0 && (o.style.borderRight = t.borderRight), t.borderBottom !== void 0 && (o.style.borderBottom = t.borderBottom), t.borderLeft !== void 0 && (o.style.borderLeft = t.borderLeft), t.boxShadow !== void 0 && (o.style.boxShadow = t.boxShadow), t.filter !== void 0 && (o.style.filter = t.filter), t.opacity !== void 0 && (o.style.opacity = t.opacity), t.cursor !== void 0 && (o.style.cursor = t.cursor), t.outline !== void 0 && (o.style.outline = t.outline), t.outlineOffset !== void 0 && (o.style.outlineOffset = t.outlineOffset), t.objectFit !== void 0 && (o.style.objectFit = t.objectFit), t.aspectRatio !== void 0 && (o.style.aspectRatio = t.aspectRatio), t.clipPath !== void 0 && (o.style.clipPath = t.clipPath), t.overflow !== void 0 && (o.style.overflow = t.overflow);
2087
2051
  }
2088
2052
  function st(o, t, i, e) {
2089
2053
  const n = it(t, i, e);
2090
- Ge(o, n);
2054
+ je(o, n);
2091
2055
  }
2092
2056
  function Pt(o) {
2093
2057
  return o ? Array.isArray(o) ? o.join(" ") : o : "";
@@ -2108,7 +2072,7 @@ const Mt = {
2108
2072
  UNFOCUSING: 999,
2109
2073
  FOCUSING: 1e3
2110
2074
  };
2111
- class qe {
2075
+ class We {
2112
2076
  constructor(t, i, e) {
2113
2077
  this.state = x.IDLE, this.currentFocus = null, this.focusData = null, this.outgoing = null, this.incoming = null, this.focusGeneration = 0, this.onUnfocusComplete = null, this.config = t, this.animationEngine = i, this.styling = e, this.focusedClassName = e?.focused?.className;
2114
2078
  }
@@ -2247,19 +2211,19 @@ class qe {
2247
2211
  rotation: e.rotation,
2248
2212
  scale: 1
2249
2213
  // No scale - using dimensions
2250
- }, g = s?.width ?? a, b = s?.height ?? c, p = this.animateWithDimensions(
2214
+ }, g = s?.width ?? a, p = s?.height ?? c, b = this.animateWithDimensions(
2251
2215
  t,
2252
2216
  d,
2253
2217
  u,
2254
2218
  g,
2255
- b,
2219
+ p,
2256
2220
  l.width,
2257
2221
  l.height,
2258
2222
  h
2259
2223
  ), f = {
2260
2224
  id: `focus-${Date.now()}`,
2261
2225
  element: t,
2262
- animation: p,
2226
+ animation: b,
2263
2227
  fromState: d,
2264
2228
  toState: u,
2265
2229
  startTime: performance.now(),
@@ -2599,7 +2563,7 @@ class qe {
2599
2563
  ), this.state = x.IDLE, this.currentFocus = null, this.focusData = null, this.outgoing = null, this.incoming = null;
2600
2564
  }
2601
2565
  }
2602
- const Xe = 50, Ye = 0.5, Ve = 20, Je = 0.3, Ke = 150, Ze = 30, rt = class rt {
2566
+ const Ge = 50, qe = 0.5, Xe = 20, Ye = 0.3, Je = 150, Ve = 30, rt = class rt {
2603
2567
  constructor(t, i) {
2604
2568
  this.enabled = !1, this.touchState = null, this.recentTouchTimestamp = 0, this.container = t, this.callbacks = i, this.boundTouchStart = this.handleTouchStart.bind(this), this.boundTouchMove = this.handleTouchMove.bind(this), this.boundTouchEnd = this.handleTouchEnd.bind(this), this.boundTouchCancel = this.handleTouchCancel.bind(this);
2605
2569
  }
@@ -2646,11 +2610,11 @@ const Xe = 50, Ye = 0.5, Ve = 20, Je = 0.3, Ke = 150, Ze = 30, rt = class rt {
2646
2610
  const i = t.touches[0], e = i.clientX - this.touchState.startX, n = i.clientY - this.touchState.startY;
2647
2611
  if (this.touchState.isHorizontalSwipe === null && Math.sqrt(e * e + n * n) > 10) {
2648
2612
  const a = Math.atan2(Math.abs(n), Math.abs(e)) * (180 / Math.PI);
2649
- this.touchState.isHorizontalSwipe = a <= Ze;
2613
+ this.touchState.isHorizontalSwipe = a <= Ve;
2650
2614
  }
2651
2615
  if (this.touchState.isHorizontalSwipe !== !1 && this.touchState.isHorizontalSwipe === !0) {
2652
2616
  t.preventDefault(), this.touchState.isDragging = !0, this.touchState.currentX = i.clientX;
2653
- const s = e * Je;
2617
+ const s = e * Ye;
2654
2618
  this.callbacks.onDragOffset(s);
2655
2619
  }
2656
2620
  }
@@ -2659,7 +2623,7 @@ const Xe = 50, Ye = 0.5, Ve = 20, Je = 0.3, Ke = 150, Ze = 30, rt = class rt {
2659
2623
  this.recentTouchTimestamp = Date.now();
2660
2624
  const i = this.touchState.currentX - this.touchState.startX, e = performance.now() - this.touchState.startTime, n = Math.abs(i) / e, s = Math.abs(i);
2661
2625
  let r = !1;
2662
- this.touchState.isHorizontalSwipe === !0 && this.touchState.isDragging && (s >= Xe || n >= Ye && s >= Ve) && (r = !0, i < 0 ? this.callbacks.onNext() : this.callbacks.onPrev()), this.touchState.isDragging && this.callbacks.onDragEnd(r), this.touchState = null;
2626
+ this.touchState.isHorizontalSwipe === !0 && this.touchState.isDragging && (s >= Ge || n >= qe && s >= Xe) && (r = !0, i < 0 ? this.callbacks.onNext() : this.callbacks.onPrev()), this.touchState.isDragging && this.callbacks.onDragEnd(r), this.touchState = null;
2663
2627
  }
2664
2628
  handleTouchCancel(t) {
2665
2629
  this.touchState?.isDragging && this.callbacks.onDragEnd(!1), this.touchState = null;
@@ -2667,7 +2631,7 @@ const Xe = 50, Ye = 0.5, Ve = 20, Je = 0.3, Ke = 150, Ze = 30, rt = class rt {
2667
2631
  };
2668
2632
  rt.TOUCH_CLICK_DELAY = 300;
2669
2633
  let bt = rt;
2670
- class Qe {
2634
+ class Ke {
2671
2635
  constructor(t) {
2672
2636
  if (this._prepared = !1, this._discoveredUrls = [], this.apiKey = t.apiKey ?? "", this.apiEndpoint = t.apiEndpoint ?? "https://www.googleapis.com/drive/v3/files", this.debugLogging = t.debugLogging ?? !1, this.sources = t.sources ?? [], !this.sources || this.sources.length === 0)
2673
2637
  throw new Error("GoogleDriveLoader requires at least one source to be configured");
@@ -2888,7 +2852,7 @@ class Qe {
2888
2852
  this.debugLogging && typeof console < "u" && console.log(...t);
2889
2853
  }
2890
2854
  }
2891
- class ti {
2855
+ class Ze {
2892
2856
  constructor(t) {
2893
2857
  if (this._prepared = !1, this._discoveredUrls = [], this.validateUrls = t.validateUrls !== !1, this.validationTimeout = t.validationTimeout ?? 5e3, this.validationMethod = t.validationMethod ?? "head", this.debugLogging = t.debugLogging ?? !1, this.sources = t.sources ?? [], !this.sources || this.sources.length === 0)
2894
2858
  throw new Error("StaticImageLoader requires at least one source to be configured");
@@ -3068,7 +3032,7 @@ class ti {
3068
3032
  this.debugLogging && typeof console < "u" && console.log(...t);
3069
3033
  }
3070
3034
  }
3071
- class ei {
3035
+ class Qe {
3072
3036
  constructor(t) {
3073
3037
  if (this._prepared = !1, this._discoveredUrls = [], this.loaders = t.loaders, this.debugLogging = t.debugLogging ?? !1, !this.loaders || this.loaders.length === 0)
3074
3038
  throw new Error("CompositeLoader requires at least one loader to be configured");
@@ -3125,7 +3089,7 @@ class ei {
3125
3089
  this.debugLogging && typeof console < "u" && console.log("[CompositeLoader]", ...t);
3126
3090
  }
3127
3091
  }
3128
- class ii {
3092
+ class ti {
3129
3093
  /**
3130
3094
  * Create a new ImageFilter
3131
3095
  * @param extensions - Array of allowed file extensions (without dots)
@@ -3162,7 +3126,7 @@ class ii {
3162
3126
  // isAllowedDate(date: Date): boolean
3163
3127
  // isAllowedDimensions(width: number, height: number): boolean
3164
3128
  }
3165
- const ni = `
3129
+ const ei = `
3166
3130
  .fbn-ic-gallery {
3167
3131
  position: relative;
3168
3132
  width: 100%;
@@ -3243,26 +3207,26 @@ const ni = `
3243
3207
  display: none !important;
3244
3208
  }
3245
3209
  `;
3246
- function oi() {
3210
+ function ii() {
3247
3211
  if (typeof document > "u") return;
3248
3212
  const o = "fbn-ic-functional-styles";
3249
3213
  if (document.getElementById(o)) return;
3250
3214
  const t = document.createElement("style");
3251
- t.id = o, t.textContent = ni, document.head.appendChild(t);
3215
+ t.id = o, t.textContent = ei, document.head.appendChild(t);
3252
3216
  }
3253
- let si = class {
3217
+ let ni = class {
3254
3218
  constructor(t = {}) {
3255
- this.fullConfig = oe(t), t.container instanceof HTMLElement ? (this.containerRef = t.container, this.containerId = null) : (this.containerRef = null, this.containerId = t.container || "imageCloud"), this.imagesLoaded = !1, this.imageElements = [], this.imageLayouts = [], this.currentImageHeight = 225, this.currentFocusIndex = null, this.hoveredImage = null, this.resizeTimeout = null, this.displayQueue = [], this.queueInterval = null, this.loadGeneration = 0, this.loadingElAutoCreated = !1, this.errorElAutoCreated = !1, this.counterEl = null, this.counterElAutoCreated = !1, this.prevButtonEl = null, this.nextButtonEl = null, this.prevButtonElAutoCreated = !1, this.nextButtonElAutoCreated = !1, this.animationEngine = new ce(this.fullConfig.animation), this.layoutEngine = new Ue({
3219
+ this.fullConfig = ie(t), t.container instanceof HTMLElement ? (this.containerRef = t.container, this.containerId = null) : (this.containerRef = null, this.containerId = t.container || "imageCloud"), this.imagesLoaded = !1, this.imageElements = [], this.imageLayouts = [], this.currentImageHeight = 225, this.currentFocusIndex = null, this.hoveredImage = null, this.resizeTimeout = null, this.displayQueue = [], this.queueInterval = null, this.loadGeneration = 0, this.loadingElAutoCreated = !1, this.errorElAutoCreated = !1, this.counterEl = null, this.counterElAutoCreated = !1, this.prevButtonEl = null, this.nextButtonEl = null, this.prevButtonElAutoCreated = !1, this.nextButtonElAutoCreated = !1, this.animationEngine = new ae(this.fullConfig.animation), this.layoutEngine = new Pe({
3256
3220
  layout: this.fullConfig.layout,
3257
3221
  image: this.fullConfig.image
3258
- }), this.zoomEngine = new qe(this.fullConfig.interaction.focus, this.animationEngine, this.fullConfig.styling), this.defaultStyles = it(this.fullConfig.styling?.default), this.defaultClassName = this.fullConfig.styling?.default?.className, this.hoverClassName = this.fullConfig.styling?.hover?.className;
3222
+ }), this.zoomEngine = new We(this.fullConfig.interaction.focus, this.animationEngine, this.fullConfig.styling), this.defaultStyles = it(this.fullConfig.styling?.default), this.defaultClassName = this.fullConfig.styling?.default?.className, this.hoverClassName = this.fullConfig.styling?.hover?.className;
3259
3223
  const i = this.fullConfig.animation.entry || C.animation.entry;
3260
- this.entryAnimationEngine = new ve(
3224
+ this.entryAnimationEngine = new be(
3261
3225
  i,
3262
3226
  this.fullConfig.layout.algorithm
3263
3227
  );
3264
3228
  const e = this.fullConfig.animation.idle;
3265
- e && e.type !== "none" ? this.idleAnimationEngine = new Ee(
3229
+ e && e.type !== "none" ? this.idleAnimationEngine = new ye(
3266
3230
  e,
3267
3231
  i.timing?.duration ?? 600
3268
3232
  ) : this.idleAnimationEngine = null, this.zoomEngine.setOnUnfocusCompleteCallback((n) => {
@@ -3284,7 +3248,7 @@ let si = class {
3284
3248
  */
3285
3249
  createImageFilter() {
3286
3250
  const t = this.fullConfig.config.loaders?.allowedExtensions;
3287
- return new ii(t);
3251
+ return new ti(t);
3288
3252
  }
3289
3253
  /**
3290
3254
  * Create appropriate image loader based on config
@@ -3295,7 +3259,7 @@ let si = class {
3295
3259
  if (!t || t.length === 0)
3296
3260
  throw new Error("No loaders configured. Provide `images`, `loaders`, or both.\n Example: imageCloud({ container: 'id', images: ['https://...'] })");
3297
3261
  const e = t.map((n) => this.createLoaderFromEntry(n, i));
3298
- return e.length === 1 ? e[0] : new ei({
3262
+ return e.length === 1 ? e[0] : new Qe({
3299
3263
  loaders: e,
3300
3264
  debugLogging: this.fullConfig.config.debug?.loaders
3301
3265
  });
@@ -3313,14 +3277,14 @@ let si = class {
3313
3277
  allowedExtensions: e.allowedExtensions ?? i.allowedExtensions,
3314
3278
  debugLogging: e.debugLogging ?? this.fullConfig.config.debug?.loaders
3315
3279
  };
3316
- return new ti(n);
3280
+ return new Ze(n);
3317
3281
  } else if ("googleDrive" in t) {
3318
3282
  const e = t.googleDrive, n = {
3319
3283
  ...e,
3320
3284
  allowedExtensions: e.allowedExtensions ?? i.allowedExtensions,
3321
3285
  debugLogging: e.debugLogging ?? this.fullConfig.config.debug?.loaders
3322
3286
  };
3323
- return new Qe(n);
3287
+ return new Ke(n);
3324
3288
  } else
3325
3289
  throw new Error(`Unknown loader entry: ${JSON.stringify(t)}`);
3326
3290
  }
@@ -3329,7 +3293,7 @@ let si = class {
3329
3293
  */
3330
3294
  async init() {
3331
3295
  try {
3332
- if (oi(), this.containerRef)
3296
+ if (ii(), this.containerRef)
3333
3297
  this.containerEl = this.containerRef;
3334
3298
  else if (this.containerEl = document.getElementById(this.containerId), !this.containerEl)
3335
3299
  throw new Error(`Container "#${this.containerId}" not found. Ensure an element with id="${this.containerId}" exists in the DOM before calling imageCloud().`);
@@ -3338,7 +3302,7 @@ let si = class {
3338
3302
  onPrev: () => this.navigateToPreviousImage(),
3339
3303
  onDragOffset: (t) => this.zoomEngine.setDragOffset(t),
3340
3304
  onDragEnd: (t) => {
3341
- t ? this.zoomEngine.clearDragOffset(!1) : this.zoomEngine.clearDragOffset(!0, Ke);
3305
+ t ? this.zoomEngine.clearDragOffset(!1) : this.zoomEngine.clearDragOffset(!0, Je);
3342
3306
  }
3343
3307
  })), this.setupUI(), this.setupEventListeners(), this.logDebug("ImageCloud initialized"), await this.loadImages();
3344
3308
  } catch (t) {
@@ -3480,15 +3444,15 @@ let si = class {
3480
3444
  }, g = {
3481
3445
  x: parseFloat(l.dataset.endX),
3482
3446
  y: parseFloat(l.dataset.endY)
3483
- }, b = parseFloat(l.dataset.imageWidth), p = parseFloat(l.dataset.imageHeight), f = parseFloat(l.dataset.rotation), m = parseFloat(l.dataset.scale), y = l.dataset.startRotation ? parseFloat(l.dataset.startRotation) : f, E = l.dataset.startScale ? parseFloat(l.dataset.startScale) : m, v = this.entryAnimationEngine.getTiming();
3484
- pe({
3447
+ }, p = parseFloat(l.dataset.imageWidth), b = parseFloat(l.dataset.imageHeight), f = parseFloat(l.dataset.rotation), m = parseFloat(l.dataset.scale), y = l.dataset.startRotation ? parseFloat(l.dataset.startRotation) : f, E = l.dataset.startScale ? parseFloat(l.dataset.startScale) : m, v = this.entryAnimationEngine.getTiming();
3448
+ ge({
3485
3449
  element: l,
3486
3450
  startPosition: d,
3487
3451
  endPosition: g,
3488
3452
  pathConfig: this.entryAnimationEngine.getPathConfig(),
3489
3453
  duration: v.duration,
3490
- imageWidth: b,
3491
- imageHeight: p,
3454
+ imageWidth: p,
3455
+ imageHeight: b,
3492
3456
  rotation: f,
3493
3457
  scale: m,
3494
3458
  rotationConfig: this.entryAnimationEngine.getRotationConfig(),
@@ -3572,10 +3536,10 @@ let si = class {
3572
3536
  }), h.style.opacity = "0", h.style.transition = this.entryAnimationEngine.getTransitionCSS(), h.onload = () => {
3573
3537
  if (n !== this.loadGeneration)
3574
3538
  return;
3575
- const g = h.naturalWidth / h.naturalHeight, b = i * g;
3576
- h.dataset.onloadCalled = "true", window.DEBUG_CLIPPATH && console.log(`[onload #${u}] Called with imageHeight=${i}, renderedWidth=${b}`), h.style.width = `${b}px`, h.cachedRenderedWidth = b, h.aspectRatio = g, st(h, this.fullConfig.styling?.default, i, b);
3577
- const p = { x: d.x, y: d.y }, f = { width: b, height: i }, m = this.entryAnimationEngine.calculateStartPosition(
3578
- p,
3539
+ const g = h.naturalWidth / h.naturalHeight, p = i * g;
3540
+ h.dataset.onloadCalled = "true", window.DEBUG_CLIPPATH && console.log(`[onload #${u}] Called with imageHeight=${i}, renderedWidth=${p}`), h.style.width = `${p}px`, h.cachedRenderedWidth = p, h.aspectRatio = g, st(h, this.fullConfig.styling?.default, i, p);
3541
+ const b = { x: d.x, y: d.y }, f = { width: p, height: i }, m = this.entryAnimationEngine.calculateStartPosition(
3542
+ b,
3579
3543
  f,
3580
3544
  e,
3581
3545
  u,
@@ -3583,27 +3547,27 @@ let si = class {
3583
3547
  ), y = this.entryAnimationEngine.calculateStartRotation(d.rotation), E = this.entryAnimationEngine.calculateStartScale(d.scale), v = this.entryAnimationEngine.buildFinalTransform(
3584
3548
  d.rotation,
3585
3549
  d.scale,
3586
- b,
3550
+ p,
3587
3551
  i
3588
3552
  ), S = this.entryAnimationEngine.buildStartTransform(
3589
3553
  m,
3590
- p,
3554
+ b,
3591
3555
  d.rotation,
3592
3556
  d.scale,
3593
- b,
3557
+ p,
3594
3558
  i,
3595
3559
  y,
3596
3560
  E
3597
3561
  );
3598
3562
  this.fullConfig.config.debug?.enabled && u < 3 && console.log(`Image ${u}:`, {
3599
- finalPosition: p,
3563
+ finalPosition: b,
3600
3564
  imageSize: f,
3601
3565
  left: d.x,
3602
3566
  top: d.y,
3603
3567
  finalTransform: v,
3604
- renderedWidth: b,
3568
+ renderedWidth: p,
3605
3569
  renderedHeight: i
3606
- }), h.style.transform = S, h.dataset.finalTransform = v, (this.entryAnimationEngine.requiresJSAnimation() || this.entryAnimationEngine.requiresJSRotation() || this.entryAnimationEngine.requiresJSScale() || y !== d.rotation || E !== d.scale) && (h.dataset.startX = String(m.x), h.dataset.startY = String(m.y), h.dataset.endX = String(p.x), h.dataset.endY = String(p.y), h.dataset.imageWidth = String(b), h.dataset.imageHeight = String(i), h.dataset.rotation = String(d.rotation), h.dataset.scale = String(d.scale), h.dataset.startRotation = String(y), h.dataset.startScale = String(E)), this.displayQueue.push(h);
3570
+ }), h.style.transform = S, h.dataset.finalTransform = v, (this.entryAnimationEngine.requiresJSAnimation() || this.entryAnimationEngine.requiresJSRotation() || this.entryAnimationEngine.requiresJSScale() || y !== d.rotation || E !== d.scale) && (h.dataset.startX = String(m.x), h.dataset.startY = String(m.y), h.dataset.endX = String(b.x), h.dataset.endY = String(b.y), h.dataset.imageWidth = String(p), h.dataset.imageHeight = String(i), h.dataset.rotation = String(d.rotation), h.dataset.scale = String(d.scale), h.dataset.startRotation = String(y), h.dataset.startScale = String(E)), this.displayQueue.push(h);
3607
3571
  }, h.onerror = () => r++, h.src = l;
3608
3572
  });
3609
3573
  }
@@ -3661,7 +3625,7 @@ let si = class {
3661
3625
  this.clearImageCloud(), this.loadingElAutoCreated && this.loadingEl && (this.loadingEl.remove(), this.loadingEl = null), this.errorElAutoCreated && this.errorEl && (this.errorEl.remove(), this.errorEl = null), this.counterElAutoCreated && this.counterEl && (this.counterEl.remove(), this.counterEl = null), this.prevButtonElAutoCreated && this.prevButtonEl && (this.prevButtonEl.remove(), this.prevButtonEl = null), this.nextButtonElAutoCreated && this.nextButtonEl && (this.nextButtonEl.remove(), this.nextButtonEl = null), this.resizeTimeout !== null && clearTimeout(this.resizeTimeout), this.swipeEngine?.destroy(), this.idleAnimationEngine?.stopAll(), this.idleAnimationEngine = null;
3662
3626
  }
3663
3627
  };
3664
- const ci = Ht({
3628
+ const ai = Ht({
3665
3629
  name: "ImageCloud",
3666
3630
  props: {
3667
3631
  options: {
@@ -3674,7 +3638,7 @@ const ci = Ht({
3674
3638
  function n() {
3675
3639
  if (!i.value) return;
3676
3640
  e.value?.destroy();
3677
- const s = new si({
3641
+ const s = new ni({
3678
3642
  container: i.value,
3679
3643
  ...o.options
3680
3644
  });
@@ -3698,6 +3662,6 @@ const ci = Ht({
3698
3662
  }
3699
3663
  });
3700
3664
  export {
3701
- ci as ImageCloud
3665
+ ai as ImageCloud
3702
3666
  };
3703
3667
  //# sourceMappingURL=vue.js.map