@depict-ai/ui 4.0.18 → 4.0.20

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.
@@ -89,7 +89,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
89
89
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
90
90
  $parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
91
91
  /*! Depict.ai search and product listing SDK */
92
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.18";
92
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.20";
93
93
 
94
94
  /**
95
95
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
@@ -2146,8 +2146,8 @@ function $3a1c4fee88fb8672$export$9ca09caa9c849d9c() {
2146
2146
  var $1f3b5fa875714dea$var$_tmpl$ = ["<a", ">", "</a>"],
2147
2147
  $1f3b5fa875714dea$var$_tmpl$2 = ["<div", ' class="', '"><div class="image-part" style="', '">', "</div><!--$-->", '<!--/--><h3 class="title">', "</h3></div>"],
2148
2148
  $1f3b5fa875714dea$var$_tmpl$3 = ["<div", ' class="empty-image" style="', '">', "</div>"];
2149
- const $1f3b5fa875714dea$var$aspectRatioWidthComponent = 402.67;
2150
- const $1f3b5fa875714dea$var$aspectRatioHeightComponent = 203.64;
2149
+ const $1f3b5fa875714dea$var$aspectRatioWidthComponent = 400;
2150
+ const $1f3b5fa875714dea$var$aspectRatioHeightComponent = 200;
2151
2151
  const $1f3b5fa875714dea$var$listingSuggestionCollageAspectRatio = $1f3b5fa875714dea$var$aspectRatioWidthComponent / $1f3b5fa875714dea$var$aspectRatioHeightComponent;
2152
2152
  function $1f3b5fa875714dea$export$67152d26d4f56ee8({
2153
2153
  listing_: listing_,
@@ -2709,9 +2709,10 @@ function $3b9f2020814c7876$export$66d1697a0f27069c(modalLayoutStacked) {
2709
2709
  };
2710
2710
  }
2711
2711
  var $11597ae03e703a47$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
2712
- $11597ae03e703a47$var$_tmpl$2 = ["<div", ' class="', '"></div>'],
2713
- $11597ae03e703a47$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div><div class="discover-more"><button class="major" type="button">', "</button></div></div><!--$-->", "<!--/--></div>"],
2714
- $11597ae03e703a47$var$_tmpl$4 = ["<b", ">", "</b>"];
2712
+ $11597ae03e703a47$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
2713
+ $11597ae03e703a47$var$_tmpl$3 = ["<b", ">", "</b>"],
2714
+ $11597ae03e703a47$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
2715
+ $11597ae03e703a47$var$_tmpl$5 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div></div><!--$-->', "<!--/--></div>"];
2715
2716
  /**
2716
2717
  * Second generation search modal - the solid component that gets added to <body> when the search modal is opened
2717
2718
  */
@@ -2986,6 +2987,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
2986
2987
  if (forceUseDiv_) return $5vyXB$solidjsweb.ssrElement("div", props, () => $5vyXB$solidjsweb.escape(props.children), true);
2987
2988
  return $5vyXB$solidjsweb.ssrElement("dialog", props, () => $5vyXB$solidjsweb.escape(props.children), true);
2988
2989
  };
2990
+ const discoverMoreSection = $5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), get_search_field_value_() ? $5vyXB$solidjsweb.escape(i18n_.modal_view_all_results_()($5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(formattedTotalNumberResults())))) : $5vyXB$solidjsweb.escape(i18n_.modal_discover_more_()));
2989
2991
  const search_field = $66b8b9a9613c141d$export$b94867ecbd698f21({
2990
2992
  BackIcon_: () => $5vyXB$solidjsweb.createComponent((0, $b8660a70353e03cf$export$11e9f390c90a537f), {}),
2991
2993
  input_field_ref_: element => set_input_field(element),
@@ -3019,7 +3021,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
3019
3021
  },
3020
3022
  onClose: close_modal_,
3021
3023
  get children() {
3022
- return [$5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), `depict-search-modal-backdrop ${$5vyXB$solidjsweb.escape($5vyXB$solidjsweb.escape(backdropRandomClassname, true), true)}`), $5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), `depict-search-modal ${modalLayoutStacked_() ? "stacked" : ""}`, `body ${$5vyXB$solidjsweb.escape($5vyXB$solidjsweb.escape(random_classname_body, true), true)}`, $5vyXB$solidjsweb.escape(search_field), `padded ${noResults() ? "no-results" : ""}`, get_search_field_value_() ? $5vyXB$solidjsweb.escape(i18n_.modal_view_all_results_()($5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$4, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(formattedTotalNumberResults())))) : $5vyXB$solidjsweb.escape(i18n_.modal_discover_more_()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $b776f25acdda22eb$export$f021bdedd3ec901a), {
3024
+ return [$5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$4, $5vyXB$solidjsweb.ssrHydrationKey(), `depict-search-modal-backdrop ${$5vyXB$solidjsweb.escape($5vyXB$solidjsweb.escape(backdropRandomClassname, true), true)}`), $5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$5, $5vyXB$solidjsweb.ssrHydrationKey(), `depict-search-modal ${modalLayoutStacked_() ? "stacked" : ""}`, `body ${$5vyXB$solidjsweb.escape($5vyXB$solidjsweb.escape(random_classname_body, true), true)}`, $5vyXB$solidjsweb.escape(search_field), `padded ${noResults() ? "no-results" : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $b776f25acdda22eb$export$f021bdedd3ec901a), {
3023
3025
  styles: mergedCssObject
3024
3026
  })))];
3025
3027
  }
@@ -10428,6 +10430,67 @@ function $3716b8caf7f959e2$var$make_state_saved_rows(
10428
10430
  }));
10429
10431
  return rows;
10430
10432
  }
10433
+ function $6892e0748f94faa6$export$e06dee46ebe7faa9({
10434
+ setBackdropStyle_: setBackdropStyle_,
10435
+ setBodyAlignment_: setBodyAlignment_,
10436
+ openDuration_: openDuration_
10437
+ }) {
10438
+ setBackdropStyle_(prev => ({
10439
+ ...prev,
10440
+ opacity: 0,
10441
+ transition: `opacity ${openDuration_}ms ease-in`
10442
+ }));
10443
+ requestAnimationFrame(() => setBackdropStyle_(prev => ({
10444
+ ...prev,
10445
+ opacity: 1
10446
+ })));
10447
+ setBodyAlignment_(prev => ({
10448
+ ...prev,
10449
+ opacity: 0,
10450
+ transition: `opacity ${openDuration_}ms ease-in ${openDuration_ / 5}ms`,
10451
+ // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
10452
+ "--js-animation-duration": `${openDuration_}ms`
10453
+ }));
10454
+ requestAnimationFrame(() => setBodyAlignment_(prev => ({
10455
+ ...prev,
10456
+ opacity: 1
10457
+ })));
10458
+ }
10459
+ function $6892e0748f94faa6$export$23d40cc5971c3acd({
10460
+ setBackdropStyle_: setBackdropStyle_,
10461
+ setBodyAlignment_: setBodyAlignment_,
10462
+ closeDuration_: closeDuration_
10463
+ }) {
10464
+ setBackdropStyle_(prev => ({
10465
+ ...prev,
10466
+ opacity: 0,
10467
+ transition: `opacity ${closeDuration_}ms ease-out`
10468
+ }));
10469
+ setBodyAlignment_(prev => ({
10470
+ ...prev,
10471
+ opacity: 0,
10472
+ transition: `opacity ${closeDuration_}ms ease-out`
10473
+ }));
10474
+ }
10475
+ function $6892e0748f94faa6$export$dab9321f3c157061(alignmentSignals, modalVersion) {
10476
+ const [, setBodyAlignment_] = alignmentSignals.body_;
10477
+ const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $5vyXB$solidjs.createSignal({});
10478
+ // For default centered modal, also run our fading animations if search modal v2
10479
+ modalVersion === 2 && $6892e0748f94faa6$export$e06dee46ebe7faa9({
10480
+ openDuration_: 125,
10481
+ setBodyAlignment_: setBodyAlignment_,
10482
+ setBackdropStyle_: setBackdropStyle_
10483
+ });
10484
+ const closingAnimation = modalVersion === 2 ? async () => {
10485
+ $6892e0748f94faa6$export$23d40cc5971c3acd({
10486
+ closeDuration_: 100,
10487
+ setBodyAlignment_: setBodyAlignment_,
10488
+ setBackdropStyle_: setBackdropStyle_
10489
+ });
10490
+ await new Promise(r => setTimeout(r, 100));
10491
+ } : undefined;
10492
+ return closingAnimation;
10493
+ }
10431
10494
  var $5cbaffcb5602e671$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
10432
10495
  function $5cbaffcb5602e671$export$44f738469d5570cf({
10433
10496
  actualField_: actualField_,
@@ -10441,7 +10504,15 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
10441
10504
  }) {
10442
10505
  return $5vyXB$solidjs.createRoot(dispose => {
10443
10506
  const [innerWidthReactive, setInnerWidthReactive] = $5vyXB$solidjs.createSignal(innerWidth);
10444
- const resizeObserver = new ResizeObserver(records => setInnerWidthReactive(records.at(-1).contentRect.width));
10507
+ const [innerHeightReactive, setInnerHeightReactive] = $5vyXB$solidjs.createSignal(innerHeight);
10508
+ const resizeObserver = new ResizeObserver(records => {
10509
+ const {
10510
+ width: width,
10511
+ height: height
10512
+ } = records.at(-1).contentRect;
10513
+ setInnerWidthReactive(width);
10514
+ setInnerHeightReactive(height);
10515
+ });
10445
10516
  const {
10446
10517
  left: left,
10447
10518
  top: top,
@@ -10470,6 +10541,12 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
10470
10541
  zIndex: +zIndexOfFake + 1
10471
10542
  } : {})
10472
10543
  });
10544
+ const absoluteFieldTop = $5vyXB$solidjs.createMemo(() => {
10545
+ innerHeightReactive();
10546
+ innerWidthReactive();
10547
+ // This is very semi-scientific but I hope it works (seems to, albeit laggy see comment where this value gets used)
10548
+ return fakeField.getBoundingClientRect().top;
10549
+ });
10473
10550
  const pxOffCenter = Math.abs($5vyXB$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
10474
10551
  const openDuration_ = pxOffCenter > 100 ? 250 : 125; // faster animations if little left-right movement
10475
10552
  const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
@@ -10503,7 +10580,10 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
10503
10580
  Object.assign(addedToBody.style, {
10504
10581
  // This is left: 50%, transform: translateX(-50) with extra steps but when using it safari and firefox glitch out like crazy
10505
10582
  left: `${innerWidthReactive() / 2 - inModalFieldWidth() / 2}px`,
10506
- width: inModalFieldWidthPx()
10583
+ width: inModalFieldWidthPx(),
10584
+ // Lord forgive me for this is laggy. Example: on preview browser when resizing the screen in both x and y direction at the sam time. But it's too hard to change the code now, so that it doesn't happen.
10585
+ // Basically we'd want one align_field running in only the y-axis on the field that's still in the DOM and another one in the x-axis on the fake field. Or something…
10586
+ top: absoluteFieldTop() + "px"
10507
10587
  });
10508
10588
  // We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
10509
10589
  setPollAlignment_(true);
@@ -10521,7 +10601,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
10521
10601
  clearTimeout(disableResizePollingTimeout);
10522
10602
  setPollAlignment_(false);
10523
10603
  });
10524
- $5cbaffcb5602e671$export$e06dee46ebe7faa9({
10604
+ $6892e0748f94faa6$export$e06dee46ebe7faa9({
10525
10605
  setBackdropStyle_: setBackdropStyle_,
10526
10606
  setBodyAlignment_: setBodyAlignment_,
10527
10607
  openDuration_: openDuration_
@@ -10535,7 +10615,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
10535
10615
  width: width,
10536
10616
  left: left
10537
10617
  } = fakeField.getBoundingClientRect();
10538
- $5cbaffcb5602e671$export$23d40cc5971c3acd({
10618
+ $6892e0748f94faa6$export$23d40cc5971c3acd({
10539
10619
  setBackdropStyle_: setBackdropStyle_,
10540
10620
  setBodyAlignment_: setBodyAlignment_,
10541
10621
  closeDuration_: closeDuration_
@@ -10564,67 +10644,6 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
10564
10644
  };
10565
10645
  });
10566
10646
  }
10567
- function $5cbaffcb5602e671$export$e06dee46ebe7faa9({
10568
- setBackdropStyle_: setBackdropStyle_,
10569
- setBodyAlignment_: setBodyAlignment_,
10570
- openDuration_: openDuration_
10571
- }) {
10572
- setBackdropStyle_(prev => ({
10573
- ...prev,
10574
- opacity: 0,
10575
- transition: `opacity ${openDuration_}ms ease-in`
10576
- }));
10577
- requestAnimationFrame(() => setBackdropStyle_(prev => ({
10578
- ...prev,
10579
- opacity: 1
10580
- })));
10581
- setBodyAlignment_(prev => ({
10582
- ...prev,
10583
- opacity: 0,
10584
- transition: `opacity ${openDuration_}ms ease-in ${openDuration_ / 5}ms`,
10585
- // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
10586
- "--js-animation-duration": `${openDuration_}ms`
10587
- }));
10588
- requestAnimationFrame(() => setBodyAlignment_(prev => ({
10589
- ...prev,
10590
- opacity: 1
10591
- })));
10592
- }
10593
- function $5cbaffcb5602e671$export$23d40cc5971c3acd({
10594
- setBackdropStyle_: setBackdropStyle_,
10595
- setBodyAlignment_: setBodyAlignment_,
10596
- closeDuration_: closeDuration_
10597
- }) {
10598
- setBackdropStyle_(prev => ({
10599
- ...prev,
10600
- opacity: 0,
10601
- transition: `opacity ${closeDuration_}ms ease-out`
10602
- }));
10603
- setBodyAlignment_(prev => ({
10604
- ...prev,
10605
- opacity: 0,
10606
- transition: `opacity ${closeDuration_}ms ease-out`
10607
- }));
10608
- }
10609
- function $5cbaffcb5602e671$export$dab9321f3c157061(alignmentSignals, modalVersion) {
10610
- const [, setBodyAlignment_] = alignmentSignals.body_;
10611
- const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $5vyXB$solidjs.createSignal({});
10612
- // For default centered modal, also run our fading animations if search modal v2
10613
- modalVersion === 2 && $5cbaffcb5602e671$export$e06dee46ebe7faa9({
10614
- openDuration_: 125,
10615
- setBodyAlignment_: setBodyAlignment_,
10616
- setBackdropStyle_: setBackdropStyle_
10617
- });
10618
- const closingAnimation = modalVersion === 2 ? async () => {
10619
- $5cbaffcb5602e671$export$23d40cc5971c3acd({
10620
- closeDuration_: 100,
10621
- setBodyAlignment_: setBodyAlignment_,
10622
- setBackdropStyle_: setBackdropStyle_
10623
- });
10624
- await new Promise(r => setTimeout(r, 100));
10625
- } : undefined;
10626
- return closingAnimation;
10627
- }
10628
10647
  var $f1d7cb69f839a526$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
10629
10648
  $f1d7cb69f839a526$var$_tmpl$2 = ["<div", ' class="depict plp search"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
10630
10649
  function $f1d7cb69f839a526$export$a54ec244c8863715({
@@ -11214,7 +11233,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
11214
11233
  if (!open_signal_value[0]?.alignmentSignals_ && search_page_aligned_modal_alignment_signals_) {
11215
11234
  // Open modal aligned with search page if no alignment specified and possible to align with search page
11216
11235
  const [options_arg, ...rest] = open_signal_value === true ? [{}] : open_signal_value;
11217
- const closingAnimation = $5cbaffcb5602e671$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
11236
+ const closingAnimation = $6892e0748f94faa6$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
11218
11237
  open_modal_({
11219
11238
  closing_animation_: closingAnimation,
11220
11239
  ...options_arg,
@@ -11224,7 +11243,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
11224
11243
  }
11225
11244
  // Open centered modal
11226
11245
  const centeredModalAlignmentSignals = $2005eec80e40088f$export$41b4894022a3580f();
11227
- const closingAnimation = $5cbaffcb5602e671$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
11246
+ const closingAnimation = $6892e0748f94faa6$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
11228
11247
  if (signal_value_is_options) {
11229
11248
  const [options_arg, ...rest] = open_signal_value;
11230
11249
  open_modal_({
@@ -11461,7 +11480,7 @@ const $9c143d25df1fc2a2$export$d86a33413558014e = openModalParams => {
11461
11480
  field_: $5vyXB$solidjs.createSignal({}),
11462
11481
  backdrop_: $5vyXB$solidjs.createSignal({})
11463
11482
  };
11464
- const closingAnimation = $5cbaffcb5602e671$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
11483
+ const closingAnimation = $6892e0748f94faa6$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
11465
11484
  $5vyXB$solidjs.createRoot(dispose => {
11466
11485
  dispose_aligner = () => {
11467
11486
  cleanup?.();
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.0.18";
13
+ export const version = "4.0.20";
14
14
  /**
15
15
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
16
16
  */
@@ -1211,7 +1211,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1211
1211
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1212
1212
  content_blocks_by_row?: ContentBlocksByRow;
1213
1213
  layout?: PossibleLayout;
1214
- }): import("@depict-ai/utilishared").Node_Array;
1214
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1215
1215
  export function BreadCrumbs<T extends Display>({
1216
1216
  depict_category
1217
1217
  }: {
@@ -1351,7 +1351,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1351
1351
  * Open the modal with support for alignment.
1352
1352
  * @returns {void}
1353
1353
  */
1354
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1354
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1355
1355
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1356
1356
  export interface PageReplacer {
1357
1357
  readonly render_: () => Node_Array;
@@ -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.0.18";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.20";
11
11
 
12
12
  /**
13
13
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
@@ -2064,8 +2064,8 @@ function $0eb1f9e7ee46f1c2$export$9ca09caa9c849d9c() {
2064
2064
  var $4ce5b8892775b62d$var$_tmpl$ = ["<a", ">", "</a>"],
2065
2065
  $4ce5b8892775b62d$var$_tmpl$2 = ["<div", ' class="', '"><div class="image-part" style="', '">', "</div><!--$-->", '<!--/--><h3 class="title">', "</h3></div>"],
2066
2066
  $4ce5b8892775b62d$var$_tmpl$3 = ["<div", ' class="empty-image" style="', '">', "</div>"];
2067
- const $4ce5b8892775b62d$var$aspectRatioWidthComponent = 402.67;
2068
- const $4ce5b8892775b62d$var$aspectRatioHeightComponent = 203.64;
2067
+ const $4ce5b8892775b62d$var$aspectRatioWidthComponent = 400;
2068
+ const $4ce5b8892775b62d$var$aspectRatioHeightComponent = 200;
2069
2069
  const $4ce5b8892775b62d$var$listingSuggestionCollageAspectRatio = $4ce5b8892775b62d$var$aspectRatioWidthComponent / $4ce5b8892775b62d$var$aspectRatioHeightComponent;
2070
2070
  function $4ce5b8892775b62d$export$67152d26d4f56ee8({
2071
2071
  listing_: listing_,
@@ -2627,9 +2627,10 @@ function $140dbdee2e0b252f$export$66d1697a0f27069c(modalLayoutStacked) {
2627
2627
  };
2628
2628
  }
2629
2629
  var $500a16dd18ee5a71$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
2630
- $500a16dd18ee5a71$var$_tmpl$2 = ["<div", ' class="', '"></div>'],
2631
- $500a16dd18ee5a71$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div><div class="discover-more"><button class="major" type="button">', "</button></div></div><!--$-->", "<!--/--></div>"],
2632
- $500a16dd18ee5a71$var$_tmpl$4 = ["<b", ">", "</b>"];
2630
+ $500a16dd18ee5a71$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
2631
+ $500a16dd18ee5a71$var$_tmpl$3 = ["<b", ">", "</b>"],
2632
+ $500a16dd18ee5a71$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
2633
+ $500a16dd18ee5a71$var$_tmpl$5 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div></div><!--$-->', "<!--/--></div>"];
2633
2634
  /**
2634
2635
  * Second generation search modal - the solid component that gets added to <body> when the search modal is opened
2635
2636
  */
@@ -2904,6 +2905,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
2904
2905
  if (forceUseDiv_) return $i7OB2$ssrElement("div", props, () => $i7OB2$escape(props.children), true);
2905
2906
  return $i7OB2$ssrElement("dialog", props, () => $i7OB2$escape(props.children), true);
2906
2907
  };
2908
+ const discoverMoreSection = $i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$2, $i7OB2$ssrHydrationKey(), get_search_field_value_() ? $i7OB2$escape(i18n_.modal_view_all_results_()($i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$escape(formattedTotalNumberResults())))) : $i7OB2$escape(i18n_.modal_discover_more_()));
2907
2909
  const search_field = $5285d2814d0fac0c$export$b94867ecbd698f21({
2908
2910
  BackIcon_: () => $i7OB2$createComponent((0, $5cec65dd06ade2c4$export$11e9f390c90a537f), {}),
2909
2911
  input_field_ref_: element => set_input_field(element),
@@ -2937,7 +2939,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
2937
2939
  },
2938
2940
  onClose: close_modal_,
2939
2941
  get children() {
2940
- return [$i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$2, $i7OB2$ssrHydrationKey(), `depict-search-modal-backdrop ${$i7OB2$escape($i7OB2$escape(backdropRandomClassname, true), true)}`), $i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$3, $i7OB2$ssrHydrationKey(), `depict-search-modal ${modalLayoutStacked_() ? "stacked" : ""}`, `body ${$i7OB2$escape($i7OB2$escape(random_classname_body, true), true)}`, $i7OB2$escape(search_field), `padded ${noResults() ? "no-results" : ""}`, get_search_field_value_() ? $i7OB2$escape(i18n_.modal_view_all_results_()($i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$4, $i7OB2$ssrHydrationKey(), $i7OB2$escape(formattedTotalNumberResults())))) : $i7OB2$escape(i18n_.modal_discover_more_()), $i7OB2$escape($i7OB2$createComponent((0, $19f1f3e588d63502$export$f021bdedd3ec901a), {
2942
+ return [$i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$4, $i7OB2$ssrHydrationKey(), `depict-search-modal-backdrop ${$i7OB2$escape($i7OB2$escape(backdropRandomClassname, true), true)}`), $i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$5, $i7OB2$ssrHydrationKey(), `depict-search-modal ${modalLayoutStacked_() ? "stacked" : ""}`, `body ${$i7OB2$escape($i7OB2$escape(random_classname_body, true), true)}`, $i7OB2$escape(search_field), `padded ${noResults() ? "no-results" : ""}`, $i7OB2$escape($i7OB2$createComponent((0, $19f1f3e588d63502$export$f021bdedd3ec901a), {
2941
2943
  styles: mergedCssObject
2942
2944
  })))];
2943
2945
  }
@@ -10346,6 +10348,67 @@ function $49de9d31aeea1b5e$var$make_state_saved_rows(
10346
10348
  }));
10347
10349
  return rows;
10348
10350
  }
10351
+ function $0a901077d5c8a2b2$export$e06dee46ebe7faa9({
10352
+ setBackdropStyle_: setBackdropStyle_,
10353
+ setBodyAlignment_: setBodyAlignment_,
10354
+ openDuration_: openDuration_
10355
+ }) {
10356
+ setBackdropStyle_(prev => ({
10357
+ ...prev,
10358
+ opacity: 0,
10359
+ transition: `opacity ${openDuration_}ms ease-in`
10360
+ }));
10361
+ requestAnimationFrame(() => setBackdropStyle_(prev => ({
10362
+ ...prev,
10363
+ opacity: 1
10364
+ })));
10365
+ setBodyAlignment_(prev => ({
10366
+ ...prev,
10367
+ opacity: 0,
10368
+ transition: `opacity ${openDuration_}ms ease-in ${openDuration_ / 5}ms`,
10369
+ // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
10370
+ "--js-animation-duration": `${openDuration_}ms`
10371
+ }));
10372
+ requestAnimationFrame(() => setBodyAlignment_(prev => ({
10373
+ ...prev,
10374
+ opacity: 1
10375
+ })));
10376
+ }
10377
+ function $0a901077d5c8a2b2$export$23d40cc5971c3acd({
10378
+ setBackdropStyle_: setBackdropStyle_,
10379
+ setBodyAlignment_: setBodyAlignment_,
10380
+ closeDuration_: closeDuration_
10381
+ }) {
10382
+ setBackdropStyle_(prev => ({
10383
+ ...prev,
10384
+ opacity: 0,
10385
+ transition: `opacity ${closeDuration_}ms ease-out`
10386
+ }));
10387
+ setBodyAlignment_(prev => ({
10388
+ ...prev,
10389
+ opacity: 0,
10390
+ transition: `opacity ${closeDuration_}ms ease-out`
10391
+ }));
10392
+ }
10393
+ function $0a901077d5c8a2b2$export$dab9321f3c157061(alignmentSignals, modalVersion) {
10394
+ const [, setBodyAlignment_] = alignmentSignals.body_;
10395
+ const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $i7OB2$createSignal({});
10396
+ // For default centered modal, also run our fading animations if search modal v2
10397
+ modalVersion === 2 && $0a901077d5c8a2b2$export$e06dee46ebe7faa9({
10398
+ openDuration_: 125,
10399
+ setBodyAlignment_: setBodyAlignment_,
10400
+ setBackdropStyle_: setBackdropStyle_
10401
+ });
10402
+ const closingAnimation = modalVersion === 2 ? async () => {
10403
+ $0a901077d5c8a2b2$export$23d40cc5971c3acd({
10404
+ closeDuration_: 100,
10405
+ setBodyAlignment_: setBodyAlignment_,
10406
+ setBackdropStyle_: setBackdropStyle_
10407
+ });
10408
+ await new Promise(r => setTimeout(r, 100));
10409
+ } : undefined;
10410
+ return closingAnimation;
10411
+ }
10349
10412
  var $0e562a5b247b1fc2$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
10350
10413
  function $0e562a5b247b1fc2$export$44f738469d5570cf({
10351
10414
  actualField_: actualField_,
@@ -10359,7 +10422,15 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
10359
10422
  }) {
10360
10423
  return $i7OB2$createRoot(dispose => {
10361
10424
  const [innerWidthReactive, setInnerWidthReactive] = $i7OB2$createSignal(innerWidth);
10362
- const resizeObserver = new ResizeObserver(records => setInnerWidthReactive(records.at(-1).contentRect.width));
10425
+ const [innerHeightReactive, setInnerHeightReactive] = $i7OB2$createSignal(innerHeight);
10426
+ const resizeObserver = new ResizeObserver(records => {
10427
+ const {
10428
+ width: width,
10429
+ height: height
10430
+ } = records.at(-1).contentRect;
10431
+ setInnerWidthReactive(width);
10432
+ setInnerHeightReactive(height);
10433
+ });
10363
10434
  const {
10364
10435
  left: left,
10365
10436
  top: top,
@@ -10388,6 +10459,12 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
10388
10459
  zIndex: +zIndexOfFake + 1
10389
10460
  } : {})
10390
10461
  });
10462
+ const absoluteFieldTop = $i7OB2$createMemo(() => {
10463
+ innerHeightReactive();
10464
+ innerWidthReactive();
10465
+ // This is very semi-scientific but I hope it works (seems to, albeit laggy see comment where this value gets used)
10466
+ return fakeField.getBoundingClientRect().top;
10467
+ });
10391
10468
  const pxOffCenter = Math.abs($i7OB2$untrack(innerWidthReactive) / 2 - (left + width / 2));
10392
10469
  const openDuration_ = pxOffCenter > 100 ? 250 : 125; // faster animations if little left-right movement
10393
10470
  const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
@@ -10421,7 +10498,10 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
10421
10498
  Object.assign(addedToBody.style, {
10422
10499
  // This is left: 50%, transform: translateX(-50) with extra steps but when using it safari and firefox glitch out like crazy
10423
10500
  left: `${innerWidthReactive() / 2 - inModalFieldWidth() / 2}px`,
10424
- width: inModalFieldWidthPx()
10501
+ width: inModalFieldWidthPx(),
10502
+ // Lord forgive me for this is laggy. Example: on preview browser when resizing the screen in both x and y direction at the sam time. But it's too hard to change the code now, so that it doesn't happen.
10503
+ // Basically we'd want one align_field running in only the y-axis on the field that's still in the DOM and another one in the x-axis on the fake field. Or something…
10504
+ top: absoluteFieldTop() + "px"
10425
10505
  });
10426
10506
  // We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
10427
10507
  setPollAlignment_(true);
@@ -10439,7 +10519,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
10439
10519
  clearTimeout(disableResizePollingTimeout);
10440
10520
  setPollAlignment_(false);
10441
10521
  });
10442
- $0e562a5b247b1fc2$export$e06dee46ebe7faa9({
10522
+ $0a901077d5c8a2b2$export$e06dee46ebe7faa9({
10443
10523
  setBackdropStyle_: setBackdropStyle_,
10444
10524
  setBodyAlignment_: setBodyAlignment_,
10445
10525
  openDuration_: openDuration_
@@ -10453,7 +10533,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
10453
10533
  width: width,
10454
10534
  left: left
10455
10535
  } = fakeField.getBoundingClientRect();
10456
- $0e562a5b247b1fc2$export$23d40cc5971c3acd({
10536
+ $0a901077d5c8a2b2$export$23d40cc5971c3acd({
10457
10537
  setBackdropStyle_: setBackdropStyle_,
10458
10538
  setBodyAlignment_: setBodyAlignment_,
10459
10539
  closeDuration_: closeDuration_
@@ -10482,67 +10562,6 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
10482
10562
  };
10483
10563
  });
10484
10564
  }
10485
- function $0e562a5b247b1fc2$export$e06dee46ebe7faa9({
10486
- setBackdropStyle_: setBackdropStyle_,
10487
- setBodyAlignment_: setBodyAlignment_,
10488
- openDuration_: openDuration_
10489
- }) {
10490
- setBackdropStyle_(prev => ({
10491
- ...prev,
10492
- opacity: 0,
10493
- transition: `opacity ${openDuration_}ms ease-in`
10494
- }));
10495
- requestAnimationFrame(() => setBackdropStyle_(prev => ({
10496
- ...prev,
10497
- opacity: 1
10498
- })));
10499
- setBodyAlignment_(prev => ({
10500
- ...prev,
10501
- opacity: 0,
10502
- transition: `opacity ${openDuration_}ms ease-in ${openDuration_ / 5}ms`,
10503
- // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
10504
- "--js-animation-duration": `${openDuration_}ms`
10505
- }));
10506
- requestAnimationFrame(() => setBodyAlignment_(prev => ({
10507
- ...prev,
10508
- opacity: 1
10509
- })));
10510
- }
10511
- function $0e562a5b247b1fc2$export$23d40cc5971c3acd({
10512
- setBackdropStyle_: setBackdropStyle_,
10513
- setBodyAlignment_: setBodyAlignment_,
10514
- closeDuration_: closeDuration_
10515
- }) {
10516
- setBackdropStyle_(prev => ({
10517
- ...prev,
10518
- opacity: 0,
10519
- transition: `opacity ${closeDuration_}ms ease-out`
10520
- }));
10521
- setBodyAlignment_(prev => ({
10522
- ...prev,
10523
- opacity: 0,
10524
- transition: `opacity ${closeDuration_}ms ease-out`
10525
- }));
10526
- }
10527
- function $0e562a5b247b1fc2$export$dab9321f3c157061(alignmentSignals, modalVersion) {
10528
- const [, setBodyAlignment_] = alignmentSignals.body_;
10529
- const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $i7OB2$createSignal({});
10530
- // For default centered modal, also run our fading animations if search modal v2
10531
- modalVersion === 2 && $0e562a5b247b1fc2$export$e06dee46ebe7faa9({
10532
- openDuration_: 125,
10533
- setBodyAlignment_: setBodyAlignment_,
10534
- setBackdropStyle_: setBackdropStyle_
10535
- });
10536
- const closingAnimation = modalVersion === 2 ? async () => {
10537
- $0e562a5b247b1fc2$export$23d40cc5971c3acd({
10538
- closeDuration_: 100,
10539
- setBodyAlignment_: setBodyAlignment_,
10540
- setBackdropStyle_: setBackdropStyle_
10541
- });
10542
- await new Promise(r => setTimeout(r, 100));
10543
- } : undefined;
10544
- return closingAnimation;
10545
- }
10546
10565
  var $7097477c78a89208$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
10547
10566
  $7097477c78a89208$var$_tmpl$2 = ["<div", ' class="depict plp search"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
10548
10567
  function $7097477c78a89208$export$a54ec244c8863715({
@@ -11132,7 +11151,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
11132
11151
  if (!open_signal_value[0]?.alignmentSignals_ && search_page_aligned_modal_alignment_signals_) {
11133
11152
  // Open modal aligned with search page if no alignment specified and possible to align with search page
11134
11153
  const [options_arg, ...rest] = open_signal_value === true ? [{}] : open_signal_value;
11135
- const closingAnimation = $0e562a5b247b1fc2$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
11154
+ const closingAnimation = $0a901077d5c8a2b2$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
11136
11155
  open_modal_({
11137
11156
  closing_animation_: closingAnimation,
11138
11157
  ...options_arg,
@@ -11142,7 +11161,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
11142
11161
  }
11143
11162
  // Open centered modal
11144
11163
  const centeredModalAlignmentSignals = $1801dbce7adb3f19$export$41b4894022a3580f();
11145
- const closingAnimation = $0e562a5b247b1fc2$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
11164
+ const closingAnimation = $0a901077d5c8a2b2$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
11146
11165
  if (signal_value_is_options) {
11147
11166
  const [options_arg, ...rest] = open_signal_value;
11148
11167
  open_modal_({
@@ -11379,7 +11398,7 @@ const $6891c018a834cfdd$export$d86a33413558014e = openModalParams => {
11379
11398
  field_: $i7OB2$createSignal({}),
11380
11399
  backdrop_: $i7OB2$createSignal({})
11381
11400
  };
11382
- const closingAnimation = $0e562a5b247b1fc2$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
11401
+ const closingAnimation = $0a901077d5c8a2b2$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
11383
11402
  $i7OB2$createRoot(dispose => {
11384
11403
  dispose_aligner = () => {
11385
11404
  cleanup?.();