@depict-ai/ui 4.8.23 → 4.8.25

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/ES10/index.cjs CHANGED
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.23";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.25";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $52FdA$solidjs.createSignal(false);
121
121
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -7632,6 +7632,52 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
7632
7632
  }, timeout + 1000);
7633
7633
  return cancel;
7634
7634
  }
7635
+ function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
7636
+ const worstCaseIdleDeadline = 15000;
7637
+ const cancelFrameCheck = $4692443b324db9ee$var$checkForFrameDipsUntil(2000, () => {
7638
+ cancelIdleCallback();
7639
+ callback({
7640
+ didTimeout: false,
7641
+ timeRemaining: () => 300
7642
+ });
7643
+ });
7644
+ const cancelIdleCallback = $e4e98e5080f4386e$export$2972b890694ced75(deadline => {
7645
+ cancelFrameCheck();
7646
+ callback(deadline);
7647
+ }, {
7648
+ timeout: worstCaseIdleDeadline
7649
+ });
7650
+ }
7651
+ /**
7652
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7653
+ */
7654
+ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7655
+ const start = performance.now();
7656
+ const maxDips = 3;
7657
+ const noDipsBelow = 20;
7658
+ const fpsOverTime = [];
7659
+ let dipsLeft = maxDips;
7660
+ let cleanedUp = false;
7661
+ let lastTime;
7662
+ const check = () => requestAnimationFrame($52FdA$depictaiutilishared.catchify(time => {
7663
+ if (cleanedUp) return;
7664
+ if (lastTime != undefined) {
7665
+ const fps = 1000 / (time - lastTime);
7666
+ fpsOverTime.push(fps);
7667
+ if (fps < noDipsBelow && !dipsLeft--) {
7668
+ $52FdA$depictaiutilishared.dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
7669
+ return;
7670
+ }
7671
+ }
7672
+ lastTime = time;
7673
+ if (time <= start + checkDuration) check();else {
7674
+ $52FdA$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7675
+ runWhenNoDips();
7676
+ }
7677
+ }));
7678
+ check();
7679
+ return () => cleanedUp = true;
7680
+ }
7635
7681
  const $858fdcf73148519f$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
7636
7682
  const $858fdcf73148519f$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
7637
7683
  const $858fdcf73148519f$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -7696,7 +7742,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
7696
7742
  if (existingStack) return existingStack.add(fn);
7697
7743
  const newStack = new Set([fn]);
7698
7744
  if (listingContext) listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol] = newStack;
7699
- const processStackWhenIdle = () => $e4e98e5080f4386e$export$2972b890694ced75($52FdA$depictaiutilishared.catchify(deadline => {
7745
+ const processStackWhenIdle = () => $4692443b324db9ee$export$566cd7e46bad5c2d($52FdA$depictaiutilishared.catchify(deadline => {
7700
7746
  const start = performance.now();
7701
7747
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
7702
7748
  for (const fn of newStack) {
@@ -7711,11 +7757,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
7711
7757
  }
7712
7758
  // Stack is empty
7713
7759
  if (listingContext) delete listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol];
7714
- }), {
7715
- timeout: 15000
7716
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
7717
- );
7718
-
7760
+ }));
7719
7761
  processStackWhenIdle();
7720
7762
  };
7721
7763
  let sizeSetFastPath = false;
package/ES10/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.23";
14
+ export const version = "4.8.25";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared/latest").Node_Array;
1621
+ }): import("@depict-ai/utilishared").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
package/ES10/index.js CHANGED
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.23";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.25";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $8tj43$createSignal(false);
16
16
  $8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
@@ -7527,6 +7527,52 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
7527
7527
  }, timeout + 1000);
7528
7528
  return cancel;
7529
7529
  }
7530
+ function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
7531
+ const worstCaseIdleDeadline = 15000;
7532
+ const cancelFrameCheck = $29b3cf99ce390e3b$var$checkForFrameDipsUntil(2000, () => {
7533
+ cancelIdleCallback();
7534
+ callback({
7535
+ didTimeout: false,
7536
+ timeRemaining: () => 300
7537
+ });
7538
+ });
7539
+ const cancelIdleCallback = $6db93f70c2db1486$export$2972b890694ced75(deadline => {
7540
+ cancelFrameCheck();
7541
+ callback(deadline);
7542
+ }, {
7543
+ timeout: worstCaseIdleDeadline
7544
+ });
7545
+ }
7546
+ /**
7547
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7548
+ */
7549
+ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7550
+ const start = performance.now();
7551
+ const maxDips = 3;
7552
+ const noDipsBelow = 20;
7553
+ const fpsOverTime = [];
7554
+ let dipsLeft = maxDips;
7555
+ let cleanedUp = false;
7556
+ let lastTime;
7557
+ const check = () => requestAnimationFrame($8tj43$catchify1(time => {
7558
+ if (cleanedUp) return;
7559
+ if (lastTime != undefined) {
7560
+ const fps = 1000 / (time - lastTime);
7561
+ fpsOverTime.push(fps);
7562
+ if (fps < noDipsBelow && !dipsLeft--) {
7563
+ $8tj43$dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
7564
+ return;
7565
+ }
7566
+ }
7567
+ lastTime = time;
7568
+ if (time <= start + checkDuration) check();else {
7569
+ $8tj43$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7570
+ runWhenNoDips();
7571
+ }
7572
+ }));
7573
+ check();
7574
+ return () => cleanedUp = true;
7575
+ }
7530
7576
  const $56047603f9d212b6$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
7531
7577
  const $56047603f9d212b6$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
7532
7578
  const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -7591,7 +7637,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
7591
7637
  if (existingStack) return existingStack.add(fn);
7592
7638
  const newStack = new Set([fn]);
7593
7639
  if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
7594
- const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$catchify1(deadline => {
7640
+ const processStackWhenIdle = () => $29b3cf99ce390e3b$export$566cd7e46bad5c2d($8tj43$catchify1(deadline => {
7595
7641
  const start = performance.now();
7596
7642
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
7597
7643
  for (const fn of newStack) {
@@ -7606,11 +7652,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
7606
7652
  }
7607
7653
  // Stack is empty
7608
7654
  if (listingContext) delete listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol];
7609
- }), {
7610
- timeout: 15000
7611
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
7612
- );
7613
-
7655
+ }));
7614
7656
  processStackWhenIdle();
7615
7657
  };
7616
7658
  let sizeSetFastPath = false;
package/latest/index.cjs CHANGED
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.23";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.25";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $gVhhF$solidjs.createSignal(false);
115
115
  $gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
@@ -7216,6 +7216,52 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
7216
7216
  }, timeout + 1000);
7217
7217
  return cancel;
7218
7218
  }
7219
+ function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
7220
+ const worstCaseIdleDeadline = 15000;
7221
+ const cancelFrameCheck = $7ea61486b66872b6$var$checkForFrameDipsUntil(2000, () => {
7222
+ cancelIdleCallback();
7223
+ callback({
7224
+ didTimeout: false,
7225
+ timeRemaining: () => 300
7226
+ });
7227
+ });
7228
+ const cancelIdleCallback = $3ea8e0af95b5b7d2$export$2972b890694ced75(deadline => {
7229
+ cancelFrameCheck();
7230
+ callback(deadline);
7231
+ }, {
7232
+ timeout: worstCaseIdleDeadline
7233
+ });
7234
+ }
7235
+ /**
7236
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7237
+ */
7238
+ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7239
+ const start = performance.now();
7240
+ const maxDips = 3;
7241
+ const noDipsBelow = 20;
7242
+ const fpsOverTime = [];
7243
+ let dipsLeft = maxDips;
7244
+ let cleanedUp = false;
7245
+ let lastTime;
7246
+ const check = () => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(time => {
7247
+ if (cleanedUp) return;
7248
+ if (lastTime != undefined) {
7249
+ const fps = 1000 / (time - lastTime);
7250
+ fpsOverTime.push(fps);
7251
+ if (fps < noDipsBelow && !dipsLeft--) {
7252
+ $gVhhF$depictaiutilishared.dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
7253
+ return;
7254
+ }
7255
+ }
7256
+ lastTime = time;
7257
+ if (time <= start + checkDuration) check();else {
7258
+ $gVhhF$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7259
+ runWhenNoDips();
7260
+ }
7261
+ }));
7262
+ check();
7263
+ return () => cleanedUp = true;
7264
+ }
7219
7265
  const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
7220
7266
  const $19950faaac026e09$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
7221
7267
  const $19950faaac026e09$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -7279,7 +7325,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
7279
7325
  if (existingStack) return existingStack.add(fn);
7280
7326
  const newStack = new Set([fn]);
7281
7327
  if (listingContext) listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol] = newStack;
7282
- const processStackWhenIdle = () => $3ea8e0af95b5b7d2$export$2972b890694ced75($gVhhF$depictaiutilishared.catchify(deadline => {
7328
+ const processStackWhenIdle = () => $7ea61486b66872b6$export$566cd7e46bad5c2d($gVhhF$depictaiutilishared.catchify(deadline => {
7283
7329
  const start = performance.now();
7284
7330
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
7285
7331
  for (const fn of newStack) {
@@ -7294,11 +7340,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
7294
7340
  }
7295
7341
  // Stack is empty
7296
7342
  if (listingContext) delete listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol];
7297
- }), {
7298
- timeout: 15000
7299
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
7300
- );
7301
-
7343
+ }));
7302
7344
  processStackWhenIdle();
7303
7345
  };
7304
7346
  let sizeSetFastPath = false;
package/latest/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.23";
14
+ export const version = "4.8.25";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared/latest").Node_Array;
1621
+ }): import("@depict-ai/utilishared").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
package/latest/index.js CHANGED
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.23";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.25";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $9HbP8$createSignal(false);
13
13
  $9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
@@ -7114,6 +7114,52 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
7114
7114
  }, timeout + 1000);
7115
7115
  return cancel;
7116
7116
  }
7117
+ function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
7118
+ const worstCaseIdleDeadline = 15000;
7119
+ const cancelFrameCheck = $f71681eb5d5aae0a$var$checkForFrameDipsUntil(2000, () => {
7120
+ cancelIdleCallback();
7121
+ callback({
7122
+ didTimeout: false,
7123
+ timeRemaining: () => 300
7124
+ });
7125
+ });
7126
+ const cancelIdleCallback = $4ea56971d92eb0cd$export$2972b890694ced75(deadline => {
7127
+ cancelFrameCheck();
7128
+ callback(deadline);
7129
+ }, {
7130
+ timeout: worstCaseIdleDeadline
7131
+ });
7132
+ }
7133
+ /**
7134
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7135
+ */
7136
+ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7137
+ const start = performance.now();
7138
+ const maxDips = 3;
7139
+ const noDipsBelow = 20;
7140
+ const fpsOverTime = [];
7141
+ let dipsLeft = maxDips;
7142
+ let cleanedUp = false;
7143
+ let lastTime;
7144
+ const check = () => requestAnimationFrame($9HbP8$catchify1(time => {
7145
+ if (cleanedUp) return;
7146
+ if (lastTime != undefined) {
7147
+ const fps = 1000 / (time - lastTime);
7148
+ fpsOverTime.push(fps);
7149
+ if (fps < noDipsBelow && !dipsLeft--) {
7150
+ $9HbP8$dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
7151
+ return;
7152
+ }
7153
+ }
7154
+ lastTime = time;
7155
+ if (time <= start + checkDuration) check();else {
7156
+ $9HbP8$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7157
+ runWhenNoDips();
7158
+ }
7159
+ }));
7160
+ check();
7161
+ return () => cleanedUp = true;
7162
+ }
7117
7163
  const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
7118
7164
  const $e8ffe11ed01df0fe$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
7119
7165
  const $e8ffe11ed01df0fe$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -7177,7 +7223,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
7177
7223
  if (existingStack) return existingStack.add(fn);
7178
7224
  const newStack = new Set([fn]);
7179
7225
  if (listingContext) listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol] = newStack;
7180
- const processStackWhenIdle = () => $4ea56971d92eb0cd$export$2972b890694ced75($9HbP8$catchify1(deadline => {
7226
+ const processStackWhenIdle = () => $f71681eb5d5aae0a$export$566cd7e46bad5c2d($9HbP8$catchify1(deadline => {
7181
7227
  const start = performance.now();
7182
7228
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
7183
7229
  for (const fn of newStack) {
@@ -7192,11 +7238,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
7192
7238
  }
7193
7239
  // Stack is empty
7194
7240
  if (listingContext) delete listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
7195
- }), {
7196
- timeout: 15000
7197
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
7198
- );
7199
-
7241
+ }));
7200
7242
  processStackWhenIdle();
7201
7243
  };
7202
7244
  let sizeSetFastPath = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.8.23",
3
+ "version": "4.8.25",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.23";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.25";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $3hooq$solidjs.createSignal(false);
121
121
  $3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -6217,6 +6217,52 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
6217
6217
  }, timeout + 1000);
6218
6218
  return cancel;
6219
6219
  }
6220
+ function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
6221
+ const worstCaseIdleDeadline = 15000;
6222
+ const cancelFrameCheck = $4692443b324db9ee$var$checkForFrameDipsUntil(2000, () => {
6223
+ cancelIdleCallback();
6224
+ callback({
6225
+ didTimeout: false,
6226
+ timeRemaining: () => 300
6227
+ });
6228
+ });
6229
+ const cancelIdleCallback = $e4e98e5080f4386e$export$2972b890694ced75(deadline => {
6230
+ cancelFrameCheck();
6231
+ callback(deadline);
6232
+ }, {
6233
+ timeout: worstCaseIdleDeadline
6234
+ });
6235
+ }
6236
+ /**
6237
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
6238
+ */
6239
+ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
6240
+ const start = performance.now();
6241
+ const maxDips = 3;
6242
+ const noDipsBelow = 20;
6243
+ const fpsOverTime = [];
6244
+ let dipsLeft = maxDips;
6245
+ let cleanedUp = false;
6246
+ let lastTime;
6247
+ const check = () => requestAnimationFrame($3hooq$depictaiutilishared.catchify(time => {
6248
+ if (cleanedUp) return;
6249
+ if (lastTime != undefined) {
6250
+ const fps = 1000 / (time - lastTime);
6251
+ fpsOverTime.push(fps);
6252
+ if (fps < noDipsBelow && !dipsLeft--) {
6253
+ $3hooq$depictaiutilishared.dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
6254
+ return;
6255
+ }
6256
+ }
6257
+ lastTime = time;
6258
+ if (time <= start + checkDuration) check();else {
6259
+ $3hooq$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
6260
+ runWhenNoDips();
6261
+ }
6262
+ }));
6263
+ check();
6264
+ return () => cleanedUp = true;
6265
+ }
6220
6266
  const $858fdcf73148519f$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
6221
6267
  const $858fdcf73148519f$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
6222
6268
  const $858fdcf73148519f$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -6281,7 +6327,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
6281
6327
  if (existingStack) return existingStack.add(fn);
6282
6328
  const newStack = new Set([fn]);
6283
6329
  if (listingContext) listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol] = newStack;
6284
- const processStackWhenIdle = () => $e4e98e5080f4386e$export$2972b890694ced75($3hooq$depictaiutilishared.catchify(deadline => {
6330
+ const processStackWhenIdle = () => $4692443b324db9ee$export$566cd7e46bad5c2d($3hooq$depictaiutilishared.catchify(deadline => {
6285
6331
  const start = performance.now();
6286
6332
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
6287
6333
  for (const fn of newStack) {
@@ -6296,11 +6342,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
6296
6342
  }
6297
6343
  // Stack is empty
6298
6344
  if (listingContext) delete listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol];
6299
- }), {
6300
- timeout: 15000
6301
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
6302
- );
6303
-
6345
+ }));
6304
6346
  processStackWhenIdle();
6305
6347
  };
6306
6348
  let sizeSetFastPath = false;
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.23";
14
+ export const version = "4.8.25";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared/latest").Node_Array;
1621
+ }): import("@depict-ai/utilishared").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.23";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.25";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $b8hua$createSignal(false);
16
16
  $b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
@@ -6112,6 +6112,52 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
6112
6112
  }, timeout + 1000);
6113
6113
  return cancel;
6114
6114
  }
6115
+ function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
6116
+ const worstCaseIdleDeadline = 15000;
6117
+ const cancelFrameCheck = $29b3cf99ce390e3b$var$checkForFrameDipsUntil(2000, () => {
6118
+ cancelIdleCallback();
6119
+ callback({
6120
+ didTimeout: false,
6121
+ timeRemaining: () => 300
6122
+ });
6123
+ });
6124
+ const cancelIdleCallback = $6db93f70c2db1486$export$2972b890694ced75(deadline => {
6125
+ cancelFrameCheck();
6126
+ callback(deadline);
6127
+ }, {
6128
+ timeout: worstCaseIdleDeadline
6129
+ });
6130
+ }
6131
+ /**
6132
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
6133
+ */
6134
+ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
6135
+ const start = performance.now();
6136
+ const maxDips = 3;
6137
+ const noDipsBelow = 20;
6138
+ const fpsOverTime = [];
6139
+ let dipsLeft = maxDips;
6140
+ let cleanedUp = false;
6141
+ let lastTime;
6142
+ const check = () => requestAnimationFrame($b8hua$catchify1(time => {
6143
+ if (cleanedUp) return;
6144
+ if (lastTime != undefined) {
6145
+ const fps = 1000 / (time - lastTime);
6146
+ fpsOverTime.push(fps);
6147
+ if (fps < noDipsBelow && !dipsLeft--) {
6148
+ $b8hua$dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
6149
+ return;
6150
+ }
6151
+ }
6152
+ lastTime = time;
6153
+ if (time <= start + checkDuration) check();else {
6154
+ $b8hua$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
6155
+ runWhenNoDips();
6156
+ }
6157
+ }));
6158
+ check();
6159
+ return () => cleanedUp = true;
6160
+ }
6115
6161
  const $56047603f9d212b6$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
6116
6162
  const $56047603f9d212b6$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
6117
6163
  const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -6176,7 +6222,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
6176
6222
  if (existingStack) return existingStack.add(fn);
6177
6223
  const newStack = new Set([fn]);
6178
6224
  if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
6179
- const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($b8hua$catchify1(deadline => {
6225
+ const processStackWhenIdle = () => $29b3cf99ce390e3b$export$566cd7e46bad5c2d($b8hua$catchify1(deadline => {
6180
6226
  const start = performance.now();
6181
6227
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
6182
6228
  for (const fn of newStack) {
@@ -6191,11 +6237,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
6191
6237
  }
6192
6238
  // Stack is empty
6193
6239
  if (listingContext) delete listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol];
6194
- }), {
6195
- timeout: 15000
6196
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
6197
- );
6198
-
6240
+ }));
6199
6241
  processStackWhenIdle();
6200
6242
  };
6201
6243
  let sizeSetFastPath = false;
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.23";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.25";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $5vyXB$solidjs.createSignal(false);
115
115
  $5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
@@ -5854,6 +5854,52 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
5854
5854
  }, timeout + 1000);
5855
5855
  return cancel;
5856
5856
  }
5857
+ function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
5858
+ const worstCaseIdleDeadline = 15000;
5859
+ const cancelFrameCheck = $7ea61486b66872b6$var$checkForFrameDipsUntil(2000, () => {
5860
+ cancelIdleCallback();
5861
+ callback({
5862
+ didTimeout: false,
5863
+ timeRemaining: () => 300
5864
+ });
5865
+ });
5866
+ const cancelIdleCallback = $3ea8e0af95b5b7d2$export$2972b890694ced75(deadline => {
5867
+ cancelFrameCheck();
5868
+ callback(deadline);
5869
+ }, {
5870
+ timeout: worstCaseIdleDeadline
5871
+ });
5872
+ }
5873
+ /**
5874
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
5875
+ */
5876
+ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
5877
+ const start = performance.now();
5878
+ const maxDips = 3;
5879
+ const noDipsBelow = 20;
5880
+ const fpsOverTime = [];
5881
+ let dipsLeft = maxDips;
5882
+ let cleanedUp = false;
5883
+ let lastTime;
5884
+ const check = () => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(time => {
5885
+ if (cleanedUp) return;
5886
+ if (lastTime != undefined) {
5887
+ const fps = 1000 / (time - lastTime);
5888
+ fpsOverTime.push(fps);
5889
+ if (fps < noDipsBelow && !dipsLeft--) {
5890
+ $5vyXB$depictaiutilishared.dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
5891
+ return;
5892
+ }
5893
+ }
5894
+ lastTime = time;
5895
+ if (time <= start + checkDuration) check();else {
5896
+ $5vyXB$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
5897
+ runWhenNoDips();
5898
+ }
5899
+ }));
5900
+ check();
5901
+ return () => cleanedUp = true;
5902
+ }
5857
5903
  const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
5858
5904
  const $19950faaac026e09$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
5859
5905
  const $19950faaac026e09$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -5917,7 +5963,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
5917
5963
  if (existingStack) return existingStack.add(fn);
5918
5964
  const newStack = new Set([fn]);
5919
5965
  if (listingContext) listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol] = newStack;
5920
- const processStackWhenIdle = () => $3ea8e0af95b5b7d2$export$2972b890694ced75($5vyXB$depictaiutilishared.catchify(deadline => {
5966
+ const processStackWhenIdle = () => $7ea61486b66872b6$export$566cd7e46bad5c2d($5vyXB$depictaiutilishared.catchify(deadline => {
5921
5967
  const start = performance.now();
5922
5968
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
5923
5969
  for (const fn of newStack) {
@@ -5932,11 +5978,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
5932
5978
  }
5933
5979
  // Stack is empty
5934
5980
  if (listingContext) delete listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol];
5935
- }), {
5936
- timeout: 15000
5937
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
5938
- );
5939
-
5981
+ }));
5940
5982
  processStackWhenIdle();
5941
5983
  };
5942
5984
  let sizeSetFastPath = false;
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.23";
14
+ export const version = "4.8.25";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1538
1538
  * Open the modal with support for alignment.
1539
1539
  * @returns {void}
1540
1540
  */
1541
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1541
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1542
1542
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1543
1543
  export interface PageReplacer {
1544
1544
  readonly render_: () => Node_Array;
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1618
1618
  layout?: PossibleLayout;
1619
1619
  filterModalParent_?: HTMLElement | ShadowRoot;
1620
1620
  showSliderArrow_?: boolean;
1621
- }): import("@depict-ai/utilishared/latest").Node_Array;
1621
+ }): import("@depict-ai/utilishared").Node_Array;
1622
1622
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.23";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.25";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $i7OB2$createSignal(false);
13
13
  $i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
@@ -5752,6 +5752,52 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
5752
5752
  }, timeout + 1000);
5753
5753
  return cancel;
5754
5754
  }
5755
+ function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
5756
+ const worstCaseIdleDeadline = 15000;
5757
+ const cancelFrameCheck = $f71681eb5d5aae0a$var$checkForFrameDipsUntil(2000, () => {
5758
+ cancelIdleCallback();
5759
+ callback({
5760
+ didTimeout: false,
5761
+ timeRemaining: () => 300
5762
+ });
5763
+ });
5764
+ const cancelIdleCallback = $4ea56971d92eb0cd$export$2972b890694ced75(deadline => {
5765
+ cancelFrameCheck();
5766
+ callback(deadline);
5767
+ }, {
5768
+ timeout: worstCaseIdleDeadline
5769
+ });
5770
+ }
5771
+ /**
5772
+ * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
5773
+ */
5774
+ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
5775
+ const start = performance.now();
5776
+ const maxDips = 3;
5777
+ const noDipsBelow = 20;
5778
+ const fpsOverTime = [];
5779
+ let dipsLeft = maxDips;
5780
+ let cleanedUp = false;
5781
+ let lastTime;
5782
+ const check = () => requestAnimationFrame($i7OB2$catchify1(time => {
5783
+ if (cleanedUp) return;
5784
+ if (lastTime != undefined) {
5785
+ const fps = 1000 / (time - lastTime);
5786
+ fpsOverTime.push(fps);
5787
+ if (fps < noDipsBelow && !dipsLeft--) {
5788
+ $i7OB2$dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
5789
+ return;
5790
+ }
5791
+ }
5792
+ lastTime = time;
5793
+ if (time <= start + checkDuration) check();else {
5794
+ $i7OB2$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
5795
+ runWhenNoDips();
5796
+ }
5797
+ }));
5798
+ check();
5799
+ return () => cleanedUp = true;
5800
+ }
5755
5801
  const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
5756
5802
  const $e8ffe11ed01df0fe$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
5757
5803
  const $e8ffe11ed01df0fe$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
@@ -5815,7 +5861,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
5815
5861
  if (existingStack) return existingStack.add(fn);
5816
5862
  const newStack = new Set([fn]);
5817
5863
  if (listingContext) listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol] = newStack;
5818
- const processStackWhenIdle = () => $4ea56971d92eb0cd$export$2972b890694ced75($i7OB2$catchify1(deadline => {
5864
+ const processStackWhenIdle = () => $f71681eb5d5aae0a$export$566cd7e46bad5c2d($i7OB2$catchify1(deadline => {
5819
5865
  const start = performance.now();
5820
5866
  const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
5821
5867
  for (const fn of newStack) {
@@ -5830,11 +5876,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
5830
5876
  }
5831
5877
  // Stack is empty
5832
5878
  if (listingContext) delete listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
5833
- }), {
5834
- timeout: 15000
5835
- } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
5836
- );
5837
-
5879
+ }));
5838
5880
  processStackWhenIdle();
5839
5881
  };
5840
5882
  let sizeSetFastPath = false;