@magicx-eng/ai-autocomplete-angular 0.42.1 → 0.44.0

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.
@@ -1,12 +1,13 @@
1
- import { WEEKDAY_LABELS as WEEKDAY_LABELS$1, cellIso as cellIso$1, monthLabel as monthLabel$1, cellDay as cellDay$1, isoDate as isoDate$1, dateCellMarks as dateCellMarks$1, visibleDateRange as visibleDateRange$1, SMART_SUGGESTION_SPARKLE_SVG, isSmartSuggestion, isTraditionalAutocompleteSuggestion, uiStringsFor, productInitial, productImageSources as productImageSources$1, attachProductRowWheel, optionsGridTemplateColumns, highlightParts, optionLabel as optionLabel$1, optionImageSources as optionImageSources$1, formatOptionCount as formatOptionCount$1, sanitizeOptionIconSvg as sanitizeOptionIconSvg$1, planOptionsGrid, optionsShowLeadingVisuals as optionsShowLeadingVisuals$1, sameOptionRows, isOptionsGridMobileViewport, needsOptionsGridMeasurement, measureOptionsGrid, optionEnterDelayMs, buildAttributionUrl, containScroll, attachScrollArrow, attachViewportFit, hasSkippablePill, isCalendarFormat, labelTraditionalAutocomplete, getFooterHint, AIAutocomplete, withoutTraditionalAutocomplete, dateSelectionFor, identifiedParamLabel, renderEditableContent, chipIdFromTap, keepCaretOnChip, getCursorOffset, extractPlainText, plainTextLength, setCursorOffset, ModeController, buildSubmitResult as buildSubmitResult$1, withSkippedParams as withSkippedParams$1, formatDate as formatDate$1, parseDate as parseDate$1, parseLooseDate as parseLooseDate$1, DATE_RANGE_META_END as DATE_RANGE_META_END$1, DATE_RANGE_META_START as DATE_RANGE_META_START$1, formatDateRange as formatDateRange$1, parseLooseDateRange as parseLooseDateRange$1, selectedRangeFor as selectedRangeFor$1, DEFAULT_OPTION_COUNT_UNIT as DEFAULT_OPTION_COUNT_UNIT$1, optionCountLabel as optionCountLabel$1, optionHasImage as optionHasImage$1, optionImageSrc as optionImageSrc$1, PRODUCT_PATH_PREFIX as PRODUCT_PATH_PREFIX$1, productFromMatchedItem as productFromMatchedItem$1, productsFromCustomFields as productsFromCustomFields$1 } from '@magicx-eng/ai-autocomplete-vanilla';
1
+ import { WEEKDAY_LABELS as WEEKDAY_LABELS$1, cellIso as cellIso$1, monthLabel as monthLabel$1, cellDay as cellDay$1, isoDate as isoDate$1, dateCellMarks as dateCellMarks$1, visibleDateRange as visibleDateRange$1, SMART_SUGGESTION_SPARKLE_SVG, isSmartSuggestion, isTraditionalAutocompleteSuggestion, uiStringsFor, productInitial, productImageSources as productImageSources$1, productPhotoFill, attachProductRowWheel, optionsGridTemplateColumns, highlightParts, optionLabel as optionLabel$1, optionImageSources as optionImageSources$1, formatOptionCount as formatOptionCount$1, sanitizeOptionIconSvg as sanitizeOptionIconSvg$1, planOptionsGrid, optionsShowLeadingVisuals as optionsShowLeadingVisuals$1, sameOptionRows, isOptionsGridMobileViewport, needsOptionsGridMeasurement, measureOptionsGrid, optionEnterDelayMs, buildAttributionUrl, containScroll, attachScrollArrow, attachViewportFit, hasSkippablePill, isCalendarFormat, labelTraditionalAutocomplete, getFooterHint, AIAutocomplete, withoutTraditionalAutocomplete, dateSelectionFor, identifiedParamLabel, renderEditableContent, chipIdFromTap, keepCaretOnChip, getCursorOffset, extractPlainText, plainTextLength, setCursorOffset, ModeController, buildSubmitResult as buildSubmitResult$1, withSkippedParams as withSkippedParams$1, formatDate as formatDate$1, parseDate as parseDate$1, parseLooseDate as parseLooseDate$1, DATE_RANGE_META_END as DATE_RANGE_META_END$1, DATE_RANGE_META_START as DATE_RANGE_META_START$1, formatDateRange as formatDateRange$1, parseLooseDateRange as parseLooseDateRange$1, selectedRangeFor as selectedRangeFor$1, DEFAULT_OPTION_COUNT_UNIT as DEFAULT_OPTION_COUNT_UNIT$1, optionCountLabel as optionCountLabel$1, optionHasImage as optionHasImage$1, optionImageSrc as optionImageSrc$1, PRODUCT_PATH_PREFIX as PRODUCT_PATH_PREFIX$1, productFromMatchedItem as productFromMatchedItem$1, productsFromCustomFields as productsFromCustomFields$1 } from '@magicx-eng/ai-autocomplete-vanilla';
2
2
  import * as i1 from '@angular/common';
3
3
  import { CommonModule, isPlatformBrowser } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, inject, ViewChild, ChangeDetectorRef, HostListener, ElementRef, NgZone, Renderer2, Directive, PLATFORM_ID, forwardRef, NgModule } from '@angular/core';
5
+ import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, inject, ChangeDetectorRef, ViewChild, HostListener, ElementRef, NgZone, Renderer2, Directive, PLATFORM_ID, forwardRef, NgModule } from '@angular/core';
6
6
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import { BehaviorSubject, combineLatest, map as map$1, distinctUntilChanged, shareReplay, Subject, takeUntil } from 'rxjs';
8
8
  import { map } from 'rxjs/operators';
9
9
  import { DomSanitizer } from '@angular/platform-browser';
10
+ import { __rest } from 'tslib';
10
11
 
11
12
  /**
12
13
  * The dropdown's calendar body, rendered in place of the options grid when the
@@ -288,6 +289,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
288
289
  type: Output
289
290
  }] } });
290
291
 
292
+ /**
293
+ * What makes a card's product "the same" for its cart button: every field
294
+ * vanilla's `cardKey` rebuilds the card on. A price-only change keeps it.
295
+ */
296
+ function cartIdentity(product) {
297
+ return [product.id, product.title, product.url, product.imageUrl, product.vendor]
298
+ .map((field) => field !== null && field !== void 0 ? field : "")
299
+ .join("\0");
300
+ }
291
301
  /**
292
302
  * Internal product strip rendered below the dropdown's options grid. Mirrors
293
303
  * `packages/react/src/components/ProductStrip.tsx` and the vanilla core's
@@ -324,6 +334,11 @@ class ProductStripComponent {
324
334
  this.imageFallback = "image";
325
335
  /** The words of the widget language. Default: English. */
326
336
  this.strings = uiStringsFor();
337
+ /**
338
+ * Set when the integration adds to cart: each card that is not sold out
339
+ * draws a cart button, whose press calls this instead of emitting `select`.
340
+ */
341
+ this.addToCart = null;
327
342
  this.initial = productInitial;
328
343
  /**
329
344
  * Per product id, the `src`s that failed to load: a card moves on to the
@@ -333,6 +348,8 @@ class ProductStripComponent {
333
348
  this.failedImages = new Map();
334
349
  /** Per product id, the `src` that last finished loading; its tile drops the fill. */
335
350
  this.loadedImages = new Map();
351
+ /** Per product id, how much of the tile the loaded photo fills (productPhotoFill). */
352
+ this.photoFills = new Map();
336
353
  this.select = new EventEmitter();
337
354
  /**
338
355
  * Focus moved into / out of the strip. The panel closes on blur by default
@@ -342,6 +359,14 @@ class ProductStripComponent {
342
359
  */
343
360
  this.focusChange = new EventEmitter();
344
361
  this.detachWheel = null;
362
+ this.cdr = inject(ChangeDetectorRef);
363
+ /**
364
+ * Per product id, the cart button's state while it isn't at rest, with the
365
+ * product identity it belongs to and the press that set it (a settle from an
366
+ * earlier press, or for a card since reset, is dropped).
367
+ */
368
+ this.carts = new Map();
369
+ this.destroyed = false;
345
370
  this.trackByProduct = (_, product) => product.id;
346
371
  }
347
372
  ngOnChanges() {
@@ -352,6 +377,15 @@ class ProductStripComponent {
352
377
  if (!failed.every((src) => current.includes(src)))
353
378
  this.failedImages.delete(id);
354
379
  }
380
+ // A card whose product changed, left the strip or lost its button puts the
381
+ // button back at rest — what rebuilding the card does in vanilla.
382
+ const byId = new Map(this.products.map((product) => [product.id, product]));
383
+ for (const [id, cart] of this.carts) {
384
+ const product = byId.get(id);
385
+ if (!product || !this.hasCart(product) || cartIdentity(product) !== cart.identity) {
386
+ this.carts.delete(id);
387
+ }
388
+ }
355
389
  }
356
390
  imageSource(product) {
357
391
  var _a, _b;
@@ -363,14 +397,36 @@ class ProductStripComponent {
363
397
  const src = this.imageSource(product);
364
398
  return src !== null && this.loadedImages.get(product.id) === src;
365
399
  }
366
- onImageLoad(product, src) {
400
+ onImageLoad(product, src, event) {
367
401
  this.loadedImages.set(product.id, src);
402
+ const img = event === null || event === void 0 ? void 0 : event.target;
403
+ const fill = img ? productPhotoFill(img.naturalWidth, img.naturalHeight) : null;
404
+ if (fill)
405
+ this.photoFills.set(product.id, fill);
406
+ else
407
+ this.photoFills.delete(product.id);
368
408
  }
369
409
  onImageError(product) {
370
410
  var _a;
371
411
  const src = this.imageSource(product);
372
412
  if (src)
373
413
  this.failedImages.set(product.id, [...((_a = this.failedImages.get(product.id)) !== null && _a !== void 0 ? _a : []), src]);
414
+ // The next source, or the placeholder, fills the tile until it loads.
415
+ this.photoFills.delete(product.id);
416
+ }
417
+ /**
418
+ * The card's photo-fill custom properties, which put the cart button inside
419
+ * the photo's own corner. Null until the photo loads.
420
+ */
421
+ photoFillStyle(product) {
422
+ const fill = this.photoFills.get(product.id);
423
+ // Only the photo on screen counts: a changed or removed image drops it.
424
+ if (!fill || !this.imageLoaded(product))
425
+ return null;
426
+ return {
427
+ "--aia-product-photo-fill-x": String(fill.x),
428
+ "--aia-product-photo-fill-y": String(fill.y),
429
+ };
374
430
  }
375
431
  /**
376
432
  * A mouse wheel over the row scrolls it sideways. The row sits inside the
@@ -384,9 +440,57 @@ class ProductStripComponent {
384
440
  }
385
441
  ngOnDestroy() {
386
442
  var _a;
443
+ this.destroyed = true;
387
444
  (_a = this.detachWheel) === null || _a === void 0 ? void 0 : _a.call(this);
388
445
  this.detachWheel = null;
389
446
  }
447
+ /** A sold-out product can't be added, so its card has no button at all. */
448
+ hasCart(product) {
449
+ return this.addToCart !== null && product.available !== false;
450
+ }
451
+ cartState(product) {
452
+ var _a, _b;
453
+ return (_b = (_a = this.carts.get(product.id)) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : null;
454
+ }
455
+ onCartKeyDown(event, product) {
456
+ // Keys never reach the card, whose own Enter / Space would select it.
457
+ if (event.key !== "Enter" && event.key !== " ")
458
+ return;
459
+ this.onCartPress(event, product);
460
+ }
461
+ /**
462
+ * Mirrors vanilla's `buildCartButton` press: adding → added, or rest on a
463
+ * rejection. The check stays until the product changes; another press adds again.
464
+ */
465
+ onCartPress(event, product) {
466
+ event.preventDefault();
467
+ event.stopPropagation();
468
+ const handler = this.addToCart;
469
+ if (!handler || this.cartState(product) === "adding")
470
+ return;
471
+ const id = product.id;
472
+ const press = {};
473
+ this.carts.set(id, { state: "adding", identity: cartIdentity(product), press });
474
+ this.cdr.markForCheck();
475
+ let pending;
476
+ try {
477
+ pending = Promise.resolve(handler(product));
478
+ }
479
+ catch (error) {
480
+ pending = Promise.reject(error);
481
+ }
482
+ pending.then(() => this.settleCart(id, press, "added"), () => this.settleCart(id, press, null));
483
+ }
484
+ settleCart(id, press, state) {
485
+ const cart = this.carts.get(id);
486
+ if (this.destroyed || (cart === null || cart === void 0 ? void 0 : cart.press) !== press)
487
+ return;
488
+ if (state)
489
+ cart.state = state;
490
+ else
491
+ this.carts.delete(id);
492
+ this.cdr.markForCheck();
493
+ }
390
494
  get labelId() {
391
495
  return `${this.listboxId}-products-label`;
392
496
  }
@@ -420,10 +524,10 @@ class ProductStripComponent {
420
524
  }
421
525
  }
422
526
  ProductStripComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ProductStripComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
423
- ProductStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ProductStripComponent, isStandalone: true, selector: "aia-product-strip", inputs: { products: "products", listboxId: "listboxId", focusable: "focusable", layout: "layout", imageFallback: "imageFallback", strings: "strings" }, outputs: { select: "select", focusChange: "focusChange" }, viewQueries: [{ propertyName: "row", first: true, predicate: ["row"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- `group` is the one role a listbox accepts around a set of options, so the\n strip stays inside the listbox without breaking its content model. -->\n<section\n *ngIf=\"products.length > 0\"\n class=\"aia-products\"\n data-aia-products=\"\"\n [attr.data-aia-products-layout]=\"layout\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n>\n <!-- data-aia-products-label: the scroll arrow centres itself on this row. -->\n <div class=\"aia-products-label\" [id]=\"labelId\" data-aia-products-label=\"\">{{ strings.products }}</div>\n\n <!-- #row: the component binds wheel-to-sideways scrolling on it. -->\n <div #row class=\"aia-products-row\" data-aia-products-row=\"\">\n <!-- A real <a href> rather than a <div>: it keeps the browser's own link\n affordances \u2014 cmd/ctrl-click for a new tab, middle-click, right-click \u2192\n \"copy link address\". role=\"option\" overrides how assistive tech\n announces it, which is correct inside a listbox; the deliberate trade\n is that AT no longer calls it a link. An attribute binding, so a\n product without a url gets no href at all rather than \"null\". -->\n <a\n *ngFor=\"let product of products; let i = index; trackBy: trackByProduct\"\n [id]=\"cardId(i)\"\n class=\"aia-product\"\n data-aia-product=\"\"\n [attr.data-aia-product-sold-out]=\"product.available === false ? '' : null\"\n role=\"option\"\n [attr.aria-selected]=\"false\"\n [attr.href]=\"product.url ?? null\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (click)=\"onClick($event, product)\"\n (keydown)=\"onKeyDown($event, product)\"\n (focus)=\"onCardFocus()\"\n (blur)=\"onCardBlur($event)\"\n >\n <span\n class=\"aia-product-media\"\n aria-hidden=\"true\"\n [attr.data-aia-product-placeholder]=\"!imageSource(product) && imageFallback === 'image' ? '' : null\"\n [attr.data-aia-product-initial]=\"!imageSource(product) && imageFallback === 'initial' ? '' : null\"\n [attr.data-aia-image-loaded]=\"imageLoaded(product) ? '' : null\"\n >\n <!-- alt=\"\" on purpose: the title is already the card's accessible\n name, and repeating it would have a screen reader read it twice. -->\n <img\n *ngIf=\"imageSource(product) as src\"\n class=\"aia-product-image\"\n [src]=\"src\"\n (load)=\"onImageLoad(product, src)\"\n (error)=\"onImageError(product)\"\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n <ng-container *ngIf=\"!imageSource(product) && imageFallback === 'initial'\">{{ initial(product.title) }}</ng-container>\n </span>\n\n <!-- Every field but the title is optional, so absent ones render no\n element at all \u2014 the column gap can't leave a hole for a box that\n isn't there. -->\n <span class=\"aia-product-body\">\n <span *ngIf=\"product.vendor\" class=\"aia-product-vendor\">{{ product.vendor }}</span>\n <span class=\"aia-product-title\">{{ product.title }}</span>\n <span *ngIf=\"product.price\" class=\"aia-product-price\">{{ product.price }}</span>\n <!-- In the text column rather than the aria-hidden media tile, so the\n card's accessible name says it; the stylesheet lifts it over the\n image. -->\n <span *ngIf=\"product.available === false\" class=\"aia-product-badge\">{{ strings.soldOut }}</span>\n </span>\n </a>\n </div>\n</section>\n", styles: [".aia-products{display:flex;flex-direction:column;gap:6px;padding:0 10px;min-width:0}.aia-products-label{font-family:inherit;font-size:var(--aia-products-label-font-size, 11px);font-weight:500;line-height:18px;letter-spacing:.02em;color:var( --aia-products-label-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) )}.aia-products-row{display:flex;gap:var(--aia-product-gap, 8px);min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding-bottom:2px;margin-inline:-6px;scrollbar-width:none;-ms-overflow-style:none}.aia-products-row::-webkit-scrollbar{display:none}.aia-product{flex:0 0 auto;display:flex;flex-direction:column;gap:6px;width:var(--aia-product-card-width, 116px);padding:6px;border-radius:10px;background:var(--aia-product-bg, transparent);color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));text-decoration:none;cursor:pointer;transition:background-color .15s ease;position:relative}.aia-product:hover{background:var(--aia-product-bg-active, var(--aia-option-bg, transparent))}.aia-product:focus-visible{outline:2px solid var(--aia-product-focus-ring, var(--aia-option-color-selected, currentColor));outline-offset:-2px}.aia-product-media{display:block;position:relative;width:100%;aspect-ratio:1 / 1;border-radius:8px;overflow:hidden;background:var(--aia-product-media-bg, var(--aia-skeleton-bg, rgba(189, 189, 189, .25)))}.aia-product-media[data-aia-image-loaded]{background:transparent}.aia-product-image{display:block;width:auto;max-width:100%;height:100%;margin:0 auto;border-radius:var(--aia-product-image-radius, 8px);object-fit:contain}.aia-product-media:where([data-aia-product-initial]){display:flex;align-items:center;justify-content:center;color:var(--aia-product-title-color, var(--aia-option-color-selected, currentColor));font-size:24px;font-weight:600;line-height:1}.aia-product-media[data-aia-product-placeholder]:after{content:\"\";position:absolute;inset:22%;background:var( --aia-product-placeholder-image, url(\"data:image/svg+xml,%3Csvg viewBox='0 -0.5 32 32' fill-rule='evenodd' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='matrix(1,0,0,1,-384,-144)'%3E%3Cg transform='matrix(0.875,0,0,0.875,90.25,19.125)'%3E%3Cpath d='M340.924,147.74C341.224,146.789 342.107,146.143 343.104,146.143C347.705,146.143 360.491,146.143 364.985,146.143C365.965,146.143 366.836,146.768 367.15,147.697C368.119,150.386 370,155.73 370,157C370,159.208 368.208,161 366,161C363.792,161 362,159.208 362,157C362,159.208 360.208,161 358,161C355.792,161 354,159.208 354,157C354,159.208 352.208,161 350,161C347.792,161 346,159.208 346,157C346,159.208 344.208,161 342,161C340.53,161 339.244,160.205 338.549,159.022C338.057,158.185 337.944,157.179 338.236,156.254C338.787,154.507 340.172,150.121 340.924,147.74Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1.32454,48,-56.1457)'%3E%3Cpath d='M341.026,160.675C341.026,160.675 341.01,168.196 341.003,171.488C341.002,171.889 341.213,172.273 341.588,172.557C341.963,172.841 342.472,173 343.003,173C347.188,173 356.817,173 361,173C361.53,173 362.039,172.841 362.414,172.558C362.789,172.275 363,171.891 363,171.49C363,168.2 363,160.675 363,160.675' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1,48,0)'%3E%3Cpath d='M355,168C355,166.895 354.105,166 353,166C352.356,166 351.644,166 351,166C349.895,166 349,166.895 349,168C349,170.069 349,173 349,173L355,173L355,168Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1.11111,0,0,1.11111,-47.2678,-87.5361)'%3E%3Ccircle cx='411.5' cy='213.5' r='4.5' fill='%2390e0ef'%3E%3C/circle%3E%3C/g%3E%3Cpath d='M405.529,146C406.628,144.773 408.225,144 410,144C413.311,144 416,146.689 416,150C416,151.549 415.412,152.962 414.446,154.027C414.775,155.15 415,156.076 415,156.5C415,158.459 413.746,160.127 411.998,160.744L411.998,171C411.998,171.796 411.682,172.559 411.119,173.121C410.557,173.684 409.794,174 408.998,174L391.002,174C390.205,174 389.441,173.683 388.879,173.119C388.316,172.555 388,171.79 388.002,170.994L388.024,160.752C387.007,160.399 386.155,159.691 385.618,158.776L385.618,158.776C385.044,157.799 384.912,156.626 385.253,155.546L387.605,148.097C387.999,146.849 389.157,146 390.466,146L405.529,146ZM409.998,160.972C408.79,160.838 407.726,160.225 407,159.327C406.175,160.347 404.913,161 403.5,161C402.087,161 400.825,160.347 400,159.327C399.175,160.347 397.913,161 396.5,161C395.087,161 393.825,160.347 393,159.327C392.278,160.219 391.222,160.831 390.023,160.97L390.002,170.998C390.002,171.263 390.107,171.518 390.294,171.706C390.482,171.894 390.736,172 391.002,172L396,172L396,168C396,166.343 397.343,165 399,165L401,165C402.657,165 404,166.343 404,168L404,172L408.998,172C409.263,172 409.517,171.895 409.705,171.707C409.893,171.52 409.998,171.265 409.998,171L409.998,160.972ZM402,172L398,172L398,168C398,167.448 398.448,167 399,167C399,167 401,167 401,167C401.552,167 402,167.448 402,168L402,172ZM404.342,148L390.466,148C390.03,148 389.644,148.283 389.512,148.699L387.16,156.148C386.99,156.688 387.056,157.275 387.342,157.763C387.777,158.503 388.581,159 389.5,159C390.88,159 392,157.88 392,156.5C392,155.003 394,155.003 394,156.5C394,157.88 395.12,159 396.5,159C397.88,159 399,157.88 399,156.5C399,155.004 401,155.004 401,156.5C401,157.88 402.12,159 403.5,159C404.88,159 406,157.88 406,156.5C406,154.986 408,154.986 408,156.5C408,157.88 409.12,159 410.5,159C411.88,159 413,157.88 413,156.5C413,156.259 412.917,155.843 412.779,155.318C411.948,155.753 411.003,156 410,156C406.689,156 404,153.311 404,150C404,149.299 404.12,148.626 404.342,148ZM410,146C412.208,146 414,147.792 414,150C414,152.208 412.208,154 410,154C407.792,154 406,152.208 406,150C406,147.792 407.792,146 410,146ZM407.543,151.207L408.546,152.21C408.733,152.397 408.988,152.503 409.253,152.503C409.519,152.503 409.773,152.397 409.961,152.209L412.458,149.706C412.848,149.316 412.847,148.682 412.456,148.292C412.066,147.902 411.432,147.903 411.042,148.294L409.252,150.088C409.252,150.088 408.957,149.793 408.957,149.793C408.567,149.403 407.933,149.403 407.543,149.793C407.153,150.183 407.153,150.817 407.543,151.207Z' fill='%231990a7'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\") ) center / contain no-repeat}.aia-product-body{display:flex;flex-direction:column;gap:2px;min-width:0}.aia-product-vendor{font-family:inherit;font-size:var(--aia-product-vendor-font-size, 10px);line-height:14px;color:var( --aia-product-vendor-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );opacity:.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.aia-product-title{font-family:inherit;font-size:var(--aia-product-title-font-size, 12px);font-weight:400;line-height:16px;color:var( --aia-product-title-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) );display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.aia-product-price{font-family:inherit;font-size:var(--aia-product-price-font-size, 11px);font-weight:500;line-height:15px;color:var( --aia-product-price-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}.aia-product-badge{position:absolute;top:var(--aia-product-badge-inset, 12px);left:var(--aia-product-badge-inset, 12px);padding:3px 6px;border-radius:4px;background:var(--aia-product-badge-bg, rgba(255, 255, 255, .94));color:var(--aia-product-badge-color, #1f2328);box-shadow:0 0 0 1px #00000014,0 1px 2px #0000002e;font-family:inherit;font-size:var(--aia-product-badge-font-size, 9px);font-weight:600;line-height:1;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;pointer-events:none}.aia-product[data-aia-product-sold-out] .aia-product-image{filter:grayscale(.55)}.aia-products[data-aia-products-layout=list] .aia-products-row{flex-direction:column;gap:var(--aia-product-list-gap, 2px);max-height:var(--aia-product-list-max-height, 320px);overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}.aia-products[data-aia-products-layout=list] .aia-product{flex-direction:row;align-items:center;gap:10px;width:auto;padding:6px 8px}.aia-products[data-aia-products-layout=list] .aia-product-media{flex:0 0 auto;width:var(--aia-product-list-media-size, 44px);height:var(--aia-product-list-media-size, 44px)}.aia-products[data-aia-products-layout=list] .aia-product-body{flex:1 1 auto}.aia-products[data-aia-products-layout=list] .aia-product-badge{top:calc(50% + var(--aia-product-list-media-size, 44px) / 2);left:8px;width:var(--aia-product-list-media-size, 44px);transform:translateY(-100%);padding:2px 0;border-radius:0 0 8px 8px;background:var(--aia-product-badge-list-bg, rgba(17, 17, 17, .72));color:var(--aia-product-badge-list-color, #fff);box-shadow:none;font-size:var(--aia-product-badge-list-font-size, 7px);letter-spacing:.02em;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
527
+ ProductStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ProductStripComponent, isStandalone: true, selector: "aia-product-strip", inputs: { products: "products", listboxId: "listboxId", focusable: "focusable", layout: "layout", imageFallback: "imageFallback", strings: "strings", addToCart: "addToCart" }, outputs: { select: "select", focusChange: "focusChange" }, viewQueries: [{ propertyName: "row", first: true, predicate: ["row"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- `group` is the one role a listbox accepts around a set of options, so the\n strip stays inside the listbox without breaking its content model. -->\n<section\n *ngIf=\"products.length > 0\"\n class=\"aia-products\"\n data-aia-products=\"\"\n [attr.data-aia-products-layout]=\"layout\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n>\n <!-- data-aia-products-label: the scroll arrow centres itself on this row. -->\n <div class=\"aia-products-label\" [id]=\"labelId\" data-aia-products-label=\"\">{{ strings.products }}</div>\n\n <!-- #row: the component binds wheel-to-sideways scrolling on it. -->\n <div #row class=\"aia-products-row\" data-aia-products-row=\"\">\n <!-- A real <a href> rather than a <div>: it keeps the browser's own link\n affordances \u2014 cmd/ctrl-click for a new tab, middle-click, right-click \u2192\n \"copy link address\". role=\"option\" overrides how assistive tech\n announces it, which is correct inside a listbox; the deliberate trade\n is that AT no longer calls it a link. An attribute binding, so a\n product without a url gets no href at all rather than \"null\". -->\n <a\n *ngFor=\"let product of products; let i = index; trackBy: trackByProduct\"\n [id]=\"cardId(i)\"\n class=\"aia-product\"\n data-aia-product=\"\"\n [attr.data-aia-product-sold-out]=\"product.available === false ? '' : null\"\n [attr.data-aia-product-has-cart]=\"hasCart(product) ? '' : null\"\n [style]=\"photoFillStyle(product)\"\n role=\"option\"\n [attr.aria-selected]=\"false\"\n [attr.href]=\"product.url ?? null\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (click)=\"onClick($event, product)\"\n (keydown)=\"onKeyDown($event, product)\"\n (focus)=\"onCardFocus()\"\n (blur)=\"onCardBlur($event)\"\n >\n <span\n class=\"aia-product-media\"\n aria-hidden=\"true\"\n [attr.data-aia-product-placeholder]=\"!imageSource(product) && imageFallback === 'image' ? '' : null\"\n [attr.data-aia-product-initial]=\"!imageSource(product) && imageFallback === 'initial' ? '' : null\"\n [attr.data-aia-image-loaded]=\"imageLoaded(product) ? '' : null\"\n >\n <!-- alt=\"\" on purpose: the title is already the card's accessible\n name, and repeating it would have a screen reader read it twice. -->\n <img\n *ngIf=\"imageSource(product) as src\"\n class=\"aia-product-image\"\n [src]=\"src\"\n (load)=\"onImageLoad(product, src, $event)\"\n (error)=\"onImageError(product)\"\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n <ng-container *ngIf=\"!imageSource(product) && imageFallback === 'initial'\">{{ initial(product.title) }}</ng-container>\n </span>\n\n <!-- Every field but the title is optional, so absent ones render no\n element at all \u2014 the column gap can't leave a hole for a box that\n isn't there. -->\n <span class=\"aia-product-body\">\n <span *ngIf=\"product.vendor\" class=\"aia-product-vendor\">{{ product.vendor }}</span>\n <span class=\"aia-product-title\">{{ product.title }}</span>\n <span *ngIf=\"product.price\" class=\"aia-product-price\">{{ product.price }}</span>\n <!-- In the text column rather than the aria-hidden media tile, so the\n card's accessible name says it; the stylesheet lifts it over the\n image. -->\n <span *ngIf=\"product.available === false\" class=\"aia-product-badge\">{{ strings.soldOut }}</span>\n </span>\n\n <!-- The add-to-cart button: a child of the card rather than of the\n aria-hidden media tile; the stylesheet lifts it over the tile's\n bottom right corner. A role=\"button\" span, not a <button>:\n interactive content inside an <a> is invalid HTML. Its press never\n reaches the card, so it never selects. Sold-out cards have none. -->\n <span\n *ngIf=\"hasCart(product)\"\n class=\"aia-product-cart\"\n data-aia-product-cart=\"\"\n role=\"button\"\n [attr.aria-label]=\"strings.addToCart + ': ' + product.title\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n [attr.data-aia-cart-state]=\"cartState(product)\"\n [attr.aria-busy]=\"cartState(product) === 'adding' ? 'true' : null\"\n (click)=\"onCartPress($event, product)\"\n (keydown)=\"onCartKeyDown($event, product)\"\n (focus)=\"onCardFocus()\"\n (blur)=\"onCardBlur($event)\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path class=\"aia-product-cart-glyph\" d=\"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6\" />\n <path class=\"aia-product-cart-glyph\" d=\"M13.5 6.5v-4M11.5 4.5h4\" />\n <path class=\"aia-product-cart-check\" d=\"M5 12.5l4.5 4.5L19 7.5\" />\n <path class=\"aia-product-cart-spinner\" d=\"M12 4a8 8 0 1 0 8 8\" />\n <circle class=\"aia-product-cart-glyph\" cx=\"9\" cy=\"20\" r=\"1.3\" />\n <circle class=\"aia-product-cart-glyph\" cx=\"17.5\" cy=\"20\" r=\"1.3\" />\n </svg>\n </span>\n </a>\n </div>\n</section>\n", styles: [".aia-products{display:flex;flex-direction:column;gap:6px;padding:0 10px;min-width:0}.aia-products-label{font-family:inherit;font-size:var(--aia-products-label-font-size, 11px);font-weight:500;line-height:18px;letter-spacing:.02em;color:var( --aia-products-label-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) )}.aia-products-row{display:flex;gap:var(--aia-product-gap, 8px);min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding-bottom:2px;margin-inline:-6px;scrollbar-width:none;-ms-overflow-style:none}.aia-products-row::-webkit-scrollbar{display:none}.aia-product{flex:0 0 auto;display:flex;flex-direction:column;gap:6px;width:var(--aia-product-card-width, 116px);padding:6px;border-radius:10px;background:var(--aia-product-bg, transparent);color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));text-decoration:none;cursor:pointer;transition:background-color .15s ease;position:relative}.aia-product:hover{background:var(--aia-product-bg-active, var(--aia-option-bg, transparent))}.aia-product:focus-visible{outline:2px solid var(--aia-product-focus-ring, var(--aia-option-color-selected, currentColor));outline-offset:-2px}.aia-product-media{display:block;position:relative;width:100%;aspect-ratio:1 / 1;border-radius:8px;overflow:hidden;background:var(--aia-product-media-bg, var(--aia-skeleton-bg, rgba(189, 189, 189, .25)))}.aia-product-media[data-aia-image-loaded]{background:transparent}.aia-product-image{display:block;width:auto;max-width:100%;height:100%;margin:0 auto;border-radius:var(--aia-product-image-radius, 8px);object-fit:contain}.aia-product-media:where([data-aia-product-initial]){display:flex;align-items:center;justify-content:center;color:var(--aia-product-title-color, var(--aia-option-color-selected, currentColor));font-size:24px;font-weight:600;line-height:1}.aia-product-media[data-aia-product-placeholder]:after{content:\"\";position:absolute;inset:22%;background:var( --aia-product-placeholder-image, url(\"data:image/svg+xml,%3Csvg viewBox='0 -0.5 32 32' fill-rule='evenodd' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='matrix(1,0,0,1,-384,-144)'%3E%3Cg transform='matrix(0.875,0,0,0.875,90.25,19.125)'%3E%3Cpath d='M340.924,147.74C341.224,146.789 342.107,146.143 343.104,146.143C347.705,146.143 360.491,146.143 364.985,146.143C365.965,146.143 366.836,146.768 367.15,147.697C368.119,150.386 370,155.73 370,157C370,159.208 368.208,161 366,161C363.792,161 362,159.208 362,157C362,159.208 360.208,161 358,161C355.792,161 354,159.208 354,157C354,159.208 352.208,161 350,161C347.792,161 346,159.208 346,157C346,159.208 344.208,161 342,161C340.53,161 339.244,160.205 338.549,159.022C338.057,158.185 337.944,157.179 338.236,156.254C338.787,154.507 340.172,150.121 340.924,147.74Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1.32454,48,-56.1457)'%3E%3Cpath d='M341.026,160.675C341.026,160.675 341.01,168.196 341.003,171.488C341.002,171.889 341.213,172.273 341.588,172.557C341.963,172.841 342.472,173 343.003,173C347.188,173 356.817,173 361,173C361.53,173 362.039,172.841 362.414,172.558C362.789,172.275 363,171.891 363,171.49C363,168.2 363,160.675 363,160.675' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1,48,0)'%3E%3Cpath d='M355,168C355,166.895 354.105,166 353,166C352.356,166 351.644,166 351,166C349.895,166 349,166.895 349,168C349,170.069 349,173 349,173L355,173L355,168Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1.11111,0,0,1.11111,-47.2678,-87.5361)'%3E%3Ccircle cx='411.5' cy='213.5' r='4.5' fill='%2390e0ef'%3E%3C/circle%3E%3C/g%3E%3Cpath d='M405.529,146C406.628,144.773 408.225,144 410,144C413.311,144 416,146.689 416,150C416,151.549 415.412,152.962 414.446,154.027C414.775,155.15 415,156.076 415,156.5C415,158.459 413.746,160.127 411.998,160.744L411.998,171C411.998,171.796 411.682,172.559 411.119,173.121C410.557,173.684 409.794,174 408.998,174L391.002,174C390.205,174 389.441,173.683 388.879,173.119C388.316,172.555 388,171.79 388.002,170.994L388.024,160.752C387.007,160.399 386.155,159.691 385.618,158.776L385.618,158.776C385.044,157.799 384.912,156.626 385.253,155.546L387.605,148.097C387.999,146.849 389.157,146 390.466,146L405.529,146ZM409.998,160.972C408.79,160.838 407.726,160.225 407,159.327C406.175,160.347 404.913,161 403.5,161C402.087,161 400.825,160.347 400,159.327C399.175,160.347 397.913,161 396.5,161C395.087,161 393.825,160.347 393,159.327C392.278,160.219 391.222,160.831 390.023,160.97L390.002,170.998C390.002,171.263 390.107,171.518 390.294,171.706C390.482,171.894 390.736,172 391.002,172L396,172L396,168C396,166.343 397.343,165 399,165L401,165C402.657,165 404,166.343 404,168L404,172L408.998,172C409.263,172 409.517,171.895 409.705,171.707C409.893,171.52 409.998,171.265 409.998,171L409.998,160.972ZM402,172L398,172L398,168C398,167.448 398.448,167 399,167C399,167 401,167 401,167C401.552,167 402,167.448 402,168L402,172ZM404.342,148L390.466,148C390.03,148 389.644,148.283 389.512,148.699L387.16,156.148C386.99,156.688 387.056,157.275 387.342,157.763C387.777,158.503 388.581,159 389.5,159C390.88,159 392,157.88 392,156.5C392,155.003 394,155.003 394,156.5C394,157.88 395.12,159 396.5,159C397.88,159 399,157.88 399,156.5C399,155.004 401,155.004 401,156.5C401,157.88 402.12,159 403.5,159C404.88,159 406,157.88 406,156.5C406,154.986 408,154.986 408,156.5C408,157.88 409.12,159 410.5,159C411.88,159 413,157.88 413,156.5C413,156.259 412.917,155.843 412.779,155.318C411.948,155.753 411.003,156 410,156C406.689,156 404,153.311 404,150C404,149.299 404.12,148.626 404.342,148ZM410,146C412.208,146 414,147.792 414,150C414,152.208 412.208,154 410,154C407.792,154 406,152.208 406,150C406,147.792 407.792,146 410,146ZM407.543,151.207L408.546,152.21C408.733,152.397 408.988,152.503 409.253,152.503C409.519,152.503 409.773,152.397 409.961,152.209L412.458,149.706C412.848,149.316 412.847,148.682 412.456,148.292C412.066,147.902 411.432,147.903 411.042,148.294L409.252,150.088C409.252,150.088 408.957,149.793 408.957,149.793C408.567,149.403 407.933,149.403 407.543,149.793C407.153,150.183 407.153,150.817 407.543,151.207Z' fill='%231990a7'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\") ) center / contain no-repeat}.aia-product-body{display:flex;flex-direction:column;gap:2px;min-width:0}.aia-product-vendor{font-family:inherit;font-size:var(--aia-product-vendor-font-size, 10px);line-height:14px;color:var( --aia-product-vendor-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );opacity:.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.aia-product-title{font-family:inherit;font-size:var(--aia-product-title-font-size, 12px);font-weight:400;line-height:16px;color:var( --aia-product-title-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) );display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.aia-product-price{font-family:inherit;font-size:var(--aia-product-price-font-size, 11px);font-weight:500;line-height:15px;color:var( --aia-product-price-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}.aia-product-badge{position:absolute;top:var(--aia-product-badge-inset, 12px);left:var(--aia-product-badge-inset, 12px);padding:3px 6px;border-radius:4px;background:var(--aia-product-badge-bg, rgba(255, 255, 255, .94));color:var(--aia-product-badge-color, #1f2328);box-shadow:0 0 0 1px #00000014,0 1px 2px #0000002e;font-family:inherit;font-size:var(--aia-product-badge-font-size, 9px);font-weight:600;line-height:1;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;pointer-events:none}.aia-product-cart{position:absolute;top:calc(var(--aia-product-card-width, 116px) - 12px - var(--aia-product-cart-size, 28px) - (var(--aia-product-card-width, 116px) - 12px) * (1 - var(--aia-product-photo-fill-y, 1)) / 2);right:calc(12px + (var(--aia-product-card-width, 116px) - 12px) * (1 - var(--aia-product-photo-fill-x, 1)) / 2);display:flex;align-items:center;justify-content:center;width:var(--aia-product-cart-size, 28px);height:var(--aia-product-cart-size, 28px);border-radius:999px;background:var(--aia-product-cart-bg, rgba(255, 255, 255, .94));color:var(--aia-product-cart-color, #1f2328);box-shadow:0 0 0 1px #00000014,0 1px 3px #00000038;cursor:pointer;transition:transform .15s ease,opacity .15s ease}.aia-product-cart:hover{transform:scale(1.08)}.aia-product-cart:focus-visible{outline:2px solid var(--aia-product-focus-ring, var(--aia-option-color-selected, currentColor));outline-offset:2px}.aia-product-cart svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.aia-product-cart svg path{fill:none;stroke:currentColor}.aia-product-cart svg circle{fill:none;stroke:currentColor}.aia-product-cart-check{display:none}.aia-product-cart[data-aia-cart-state=adding]{cursor:progress}.aia-product-cart[data-aia-cart-state=added] .aia-product-cart-glyph{display:none}.aia-product-cart[data-aia-cart-state=added] .aia-product-cart-check{display:inline}.aia-product-cart-spinner,.aia-product-cart[data-aia-cart-state=adding] .aia-product-cart-glyph{display:none}.aia-product-cart[data-aia-cart-state=adding] .aia-product-cart-spinner{display:inline}.aia-product-cart[data-aia-cart-state=adding] svg{animation:magicx-aia-product-cart-spin .8s linear infinite}@keyframes magicx-aia-product-cart-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.aia-product-cart[data-aia-cart-state=adding] svg{animation-duration:2s}}.aia-product[data-aia-product-sold-out] .aia-product-image{filter:grayscale(.55)}.aia-products[data-aia-products-layout=list] .aia-products-row{flex-direction:column;gap:var(--aia-product-list-gap, 2px);max-height:var(--aia-product-list-max-height, 320px);overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}.aia-products[data-aia-products-layout=list] .aia-product{flex-direction:row;align-items:center;gap:10px;width:auto;padding:6px 8px}.aia-products[data-aia-products-layout=list] .aia-product-media{flex:0 0 auto;width:var(--aia-product-list-media-size, 44px);height:var(--aia-product-list-media-size, 44px)}.aia-products[data-aia-products-layout=list] .aia-product-body{flex:1 1 auto}.aia-products[data-aia-products-layout=list] .aia-product-badge{top:calc(50% + var(--aia-product-list-media-size, 44px) / 2);left:8px;width:var(--aia-product-list-media-size, 44px);transform:translateY(-100%);padding:2px 0;border-radius:0 0 8px 8px;background:var(--aia-product-badge-list-bg, rgba(17, 17, 17, .72));color:var(--aia-product-badge-list-color, #fff);box-shadow:none;font-size:var(--aia-product-badge-list-font-size, 7px);letter-spacing:.02em;text-align:center}.aia-products[data-aia-products-layout=list] .aia-product-cart{top:50%;right:8px;transform:translateY(-50%)}.aia-products[data-aia-products-layout=list] .aia-product-cart:hover{transform:translateY(-50%) scale(1.08)}.aia-products[data-aia-products-layout=list] .aia-product[data-aia-product-has-cart]{padding-right:calc(var(--aia-product-cart-size, 28px) + 16px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
424
528
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ProductStripComponent, decorators: [{
425
529
  type: Component,
426
- args: [{ selector: "aia-product-strip", standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- `group` is the one role a listbox accepts around a set of options, so the\n strip stays inside the listbox without breaking its content model. -->\n<section\n *ngIf=\"products.length > 0\"\n class=\"aia-products\"\n data-aia-products=\"\"\n [attr.data-aia-products-layout]=\"layout\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n>\n <!-- data-aia-products-label: the scroll arrow centres itself on this row. -->\n <div class=\"aia-products-label\" [id]=\"labelId\" data-aia-products-label=\"\">{{ strings.products }}</div>\n\n <!-- #row: the component binds wheel-to-sideways scrolling on it. -->\n <div #row class=\"aia-products-row\" data-aia-products-row=\"\">\n <!-- A real <a href> rather than a <div>: it keeps the browser's own link\n affordances \u2014 cmd/ctrl-click for a new tab, middle-click, right-click \u2192\n \"copy link address\". role=\"option\" overrides how assistive tech\n announces it, which is correct inside a listbox; the deliberate trade\n is that AT no longer calls it a link. An attribute binding, so a\n product without a url gets no href at all rather than \"null\". -->\n <a\n *ngFor=\"let product of products; let i = index; trackBy: trackByProduct\"\n [id]=\"cardId(i)\"\n class=\"aia-product\"\n data-aia-product=\"\"\n [attr.data-aia-product-sold-out]=\"product.available === false ? '' : null\"\n role=\"option\"\n [attr.aria-selected]=\"false\"\n [attr.href]=\"product.url ?? null\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (click)=\"onClick($event, product)\"\n (keydown)=\"onKeyDown($event, product)\"\n (focus)=\"onCardFocus()\"\n (blur)=\"onCardBlur($event)\"\n >\n <span\n class=\"aia-product-media\"\n aria-hidden=\"true\"\n [attr.data-aia-product-placeholder]=\"!imageSource(product) && imageFallback === 'image' ? '' : null\"\n [attr.data-aia-product-initial]=\"!imageSource(product) && imageFallback === 'initial' ? '' : null\"\n [attr.data-aia-image-loaded]=\"imageLoaded(product) ? '' : null\"\n >\n <!-- alt=\"\" on purpose: the title is already the card's accessible\n name, and repeating it would have a screen reader read it twice. -->\n <img\n *ngIf=\"imageSource(product) as src\"\n class=\"aia-product-image\"\n [src]=\"src\"\n (load)=\"onImageLoad(product, src)\"\n (error)=\"onImageError(product)\"\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n <ng-container *ngIf=\"!imageSource(product) && imageFallback === 'initial'\">{{ initial(product.title) }}</ng-container>\n </span>\n\n <!-- Every field but the title is optional, so absent ones render no\n element at all \u2014 the column gap can't leave a hole for a box that\n isn't there. -->\n <span class=\"aia-product-body\">\n <span *ngIf=\"product.vendor\" class=\"aia-product-vendor\">{{ product.vendor }}</span>\n <span class=\"aia-product-title\">{{ product.title }}</span>\n <span *ngIf=\"product.price\" class=\"aia-product-price\">{{ product.price }}</span>\n <!-- In the text column rather than the aria-hidden media tile, so the\n card's accessible name says it; the stylesheet lifts it over the\n image. -->\n <span *ngIf=\"product.available === false\" class=\"aia-product-badge\">{{ strings.soldOut }}</span>\n </span>\n </a>\n </div>\n</section>\n", styles: [".aia-products{display:flex;flex-direction:column;gap:6px;padding:0 10px;min-width:0}.aia-products-label{font-family:inherit;font-size:var(--aia-products-label-font-size, 11px);font-weight:500;line-height:18px;letter-spacing:.02em;color:var( --aia-products-label-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) )}.aia-products-row{display:flex;gap:var(--aia-product-gap, 8px);min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding-bottom:2px;margin-inline:-6px;scrollbar-width:none;-ms-overflow-style:none}.aia-products-row::-webkit-scrollbar{display:none}.aia-product{flex:0 0 auto;display:flex;flex-direction:column;gap:6px;width:var(--aia-product-card-width, 116px);padding:6px;border-radius:10px;background:var(--aia-product-bg, transparent);color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));text-decoration:none;cursor:pointer;transition:background-color .15s ease;position:relative}.aia-product:hover{background:var(--aia-product-bg-active, var(--aia-option-bg, transparent))}.aia-product:focus-visible{outline:2px solid var(--aia-product-focus-ring, var(--aia-option-color-selected, currentColor));outline-offset:-2px}.aia-product-media{display:block;position:relative;width:100%;aspect-ratio:1 / 1;border-radius:8px;overflow:hidden;background:var(--aia-product-media-bg, var(--aia-skeleton-bg, rgba(189, 189, 189, .25)))}.aia-product-media[data-aia-image-loaded]{background:transparent}.aia-product-image{display:block;width:auto;max-width:100%;height:100%;margin:0 auto;border-radius:var(--aia-product-image-radius, 8px);object-fit:contain}.aia-product-media:where([data-aia-product-initial]){display:flex;align-items:center;justify-content:center;color:var(--aia-product-title-color, var(--aia-option-color-selected, currentColor));font-size:24px;font-weight:600;line-height:1}.aia-product-media[data-aia-product-placeholder]:after{content:\"\";position:absolute;inset:22%;background:var( --aia-product-placeholder-image, url(\"data:image/svg+xml,%3Csvg viewBox='0 -0.5 32 32' fill-rule='evenodd' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='matrix(1,0,0,1,-384,-144)'%3E%3Cg transform='matrix(0.875,0,0,0.875,90.25,19.125)'%3E%3Cpath d='M340.924,147.74C341.224,146.789 342.107,146.143 343.104,146.143C347.705,146.143 360.491,146.143 364.985,146.143C365.965,146.143 366.836,146.768 367.15,147.697C368.119,150.386 370,155.73 370,157C370,159.208 368.208,161 366,161C363.792,161 362,159.208 362,157C362,159.208 360.208,161 358,161C355.792,161 354,159.208 354,157C354,159.208 352.208,161 350,161C347.792,161 346,159.208 346,157C346,159.208 344.208,161 342,161C340.53,161 339.244,160.205 338.549,159.022C338.057,158.185 337.944,157.179 338.236,156.254C338.787,154.507 340.172,150.121 340.924,147.74Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1.32454,48,-56.1457)'%3E%3Cpath d='M341.026,160.675C341.026,160.675 341.01,168.196 341.003,171.488C341.002,171.889 341.213,172.273 341.588,172.557C341.963,172.841 342.472,173 343.003,173C347.188,173 356.817,173 361,173C361.53,173 362.039,172.841 362.414,172.558C362.789,172.275 363,171.891 363,171.49C363,168.2 363,160.675 363,160.675' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1,48,0)'%3E%3Cpath d='M355,168C355,166.895 354.105,166 353,166C352.356,166 351.644,166 351,166C349.895,166 349,166.895 349,168C349,170.069 349,173 349,173L355,173L355,168Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1.11111,0,0,1.11111,-47.2678,-87.5361)'%3E%3Ccircle cx='411.5' cy='213.5' r='4.5' fill='%2390e0ef'%3E%3C/circle%3E%3C/g%3E%3Cpath d='M405.529,146C406.628,144.773 408.225,144 410,144C413.311,144 416,146.689 416,150C416,151.549 415.412,152.962 414.446,154.027C414.775,155.15 415,156.076 415,156.5C415,158.459 413.746,160.127 411.998,160.744L411.998,171C411.998,171.796 411.682,172.559 411.119,173.121C410.557,173.684 409.794,174 408.998,174L391.002,174C390.205,174 389.441,173.683 388.879,173.119C388.316,172.555 388,171.79 388.002,170.994L388.024,160.752C387.007,160.399 386.155,159.691 385.618,158.776L385.618,158.776C385.044,157.799 384.912,156.626 385.253,155.546L387.605,148.097C387.999,146.849 389.157,146 390.466,146L405.529,146ZM409.998,160.972C408.79,160.838 407.726,160.225 407,159.327C406.175,160.347 404.913,161 403.5,161C402.087,161 400.825,160.347 400,159.327C399.175,160.347 397.913,161 396.5,161C395.087,161 393.825,160.347 393,159.327C392.278,160.219 391.222,160.831 390.023,160.97L390.002,170.998C390.002,171.263 390.107,171.518 390.294,171.706C390.482,171.894 390.736,172 391.002,172L396,172L396,168C396,166.343 397.343,165 399,165L401,165C402.657,165 404,166.343 404,168L404,172L408.998,172C409.263,172 409.517,171.895 409.705,171.707C409.893,171.52 409.998,171.265 409.998,171L409.998,160.972ZM402,172L398,172L398,168C398,167.448 398.448,167 399,167C399,167 401,167 401,167C401.552,167 402,167.448 402,168L402,172ZM404.342,148L390.466,148C390.03,148 389.644,148.283 389.512,148.699L387.16,156.148C386.99,156.688 387.056,157.275 387.342,157.763C387.777,158.503 388.581,159 389.5,159C390.88,159 392,157.88 392,156.5C392,155.003 394,155.003 394,156.5C394,157.88 395.12,159 396.5,159C397.88,159 399,157.88 399,156.5C399,155.004 401,155.004 401,156.5C401,157.88 402.12,159 403.5,159C404.88,159 406,157.88 406,156.5C406,154.986 408,154.986 408,156.5C408,157.88 409.12,159 410.5,159C411.88,159 413,157.88 413,156.5C413,156.259 412.917,155.843 412.779,155.318C411.948,155.753 411.003,156 410,156C406.689,156 404,153.311 404,150C404,149.299 404.12,148.626 404.342,148ZM410,146C412.208,146 414,147.792 414,150C414,152.208 412.208,154 410,154C407.792,154 406,152.208 406,150C406,147.792 407.792,146 410,146ZM407.543,151.207L408.546,152.21C408.733,152.397 408.988,152.503 409.253,152.503C409.519,152.503 409.773,152.397 409.961,152.209L412.458,149.706C412.848,149.316 412.847,148.682 412.456,148.292C412.066,147.902 411.432,147.903 411.042,148.294L409.252,150.088C409.252,150.088 408.957,149.793 408.957,149.793C408.567,149.403 407.933,149.403 407.543,149.793C407.153,150.183 407.153,150.817 407.543,151.207Z' fill='%231990a7'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\") ) center / contain no-repeat}.aia-product-body{display:flex;flex-direction:column;gap:2px;min-width:0}.aia-product-vendor{font-family:inherit;font-size:var(--aia-product-vendor-font-size, 10px);line-height:14px;color:var( --aia-product-vendor-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );opacity:.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.aia-product-title{font-family:inherit;font-size:var(--aia-product-title-font-size, 12px);font-weight:400;line-height:16px;color:var( --aia-product-title-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) );display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.aia-product-price{font-family:inherit;font-size:var(--aia-product-price-font-size, 11px);font-weight:500;line-height:15px;color:var( --aia-product-price-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}.aia-product-badge{position:absolute;top:var(--aia-product-badge-inset, 12px);left:var(--aia-product-badge-inset, 12px);padding:3px 6px;border-radius:4px;background:var(--aia-product-badge-bg, rgba(255, 255, 255, .94));color:var(--aia-product-badge-color, #1f2328);box-shadow:0 0 0 1px #00000014,0 1px 2px #0000002e;font-family:inherit;font-size:var(--aia-product-badge-font-size, 9px);font-weight:600;line-height:1;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;pointer-events:none}.aia-product[data-aia-product-sold-out] .aia-product-image{filter:grayscale(.55)}.aia-products[data-aia-products-layout=list] .aia-products-row{flex-direction:column;gap:var(--aia-product-list-gap, 2px);max-height:var(--aia-product-list-max-height, 320px);overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}.aia-products[data-aia-products-layout=list] .aia-product{flex-direction:row;align-items:center;gap:10px;width:auto;padding:6px 8px}.aia-products[data-aia-products-layout=list] .aia-product-media{flex:0 0 auto;width:var(--aia-product-list-media-size, 44px);height:var(--aia-product-list-media-size, 44px)}.aia-products[data-aia-products-layout=list] .aia-product-body{flex:1 1 auto}.aia-products[data-aia-products-layout=list] .aia-product-badge{top:calc(50% + var(--aia-product-list-media-size, 44px) / 2);left:8px;width:var(--aia-product-list-media-size, 44px);transform:translateY(-100%);padding:2px 0;border-radius:0 0 8px 8px;background:var(--aia-product-badge-list-bg, rgba(17, 17, 17, .72));color:var(--aia-product-badge-list-color, #fff);box-shadow:none;font-size:var(--aia-product-badge-list-font-size, 7px);letter-spacing:.02em;text-align:center}\n"] }]
530
+ args: [{ selector: "aia-product-strip", standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- `group` is the one role a listbox accepts around a set of options, so the\n strip stays inside the listbox without breaking its content model. -->\n<section\n *ngIf=\"products.length > 0\"\n class=\"aia-products\"\n data-aia-products=\"\"\n [attr.data-aia-products-layout]=\"layout\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n>\n <!-- data-aia-products-label: the scroll arrow centres itself on this row. -->\n <div class=\"aia-products-label\" [id]=\"labelId\" data-aia-products-label=\"\">{{ strings.products }}</div>\n\n <!-- #row: the component binds wheel-to-sideways scrolling on it. -->\n <div #row class=\"aia-products-row\" data-aia-products-row=\"\">\n <!-- A real <a href> rather than a <div>: it keeps the browser's own link\n affordances \u2014 cmd/ctrl-click for a new tab, middle-click, right-click \u2192\n \"copy link address\". role=\"option\" overrides how assistive tech\n announces it, which is correct inside a listbox; the deliberate trade\n is that AT no longer calls it a link. An attribute binding, so a\n product without a url gets no href at all rather than \"null\". -->\n <a\n *ngFor=\"let product of products; let i = index; trackBy: trackByProduct\"\n [id]=\"cardId(i)\"\n class=\"aia-product\"\n data-aia-product=\"\"\n [attr.data-aia-product-sold-out]=\"product.available === false ? '' : null\"\n [attr.data-aia-product-has-cart]=\"hasCart(product) ? '' : null\"\n [style]=\"photoFillStyle(product)\"\n role=\"option\"\n [attr.aria-selected]=\"false\"\n [attr.href]=\"product.url ?? null\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (click)=\"onClick($event, product)\"\n (keydown)=\"onKeyDown($event, product)\"\n (focus)=\"onCardFocus()\"\n (blur)=\"onCardBlur($event)\"\n >\n <span\n class=\"aia-product-media\"\n aria-hidden=\"true\"\n [attr.data-aia-product-placeholder]=\"!imageSource(product) && imageFallback === 'image' ? '' : null\"\n [attr.data-aia-product-initial]=\"!imageSource(product) && imageFallback === 'initial' ? '' : null\"\n [attr.data-aia-image-loaded]=\"imageLoaded(product) ? '' : null\"\n >\n <!-- alt=\"\" on purpose: the title is already the card's accessible\n name, and repeating it would have a screen reader read it twice. -->\n <img\n *ngIf=\"imageSource(product) as src\"\n class=\"aia-product-image\"\n [src]=\"src\"\n (load)=\"onImageLoad(product, src, $event)\"\n (error)=\"onImageError(product)\"\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n <ng-container *ngIf=\"!imageSource(product) && imageFallback === 'initial'\">{{ initial(product.title) }}</ng-container>\n </span>\n\n <!-- Every field but the title is optional, so absent ones render no\n element at all \u2014 the column gap can't leave a hole for a box that\n isn't there. -->\n <span class=\"aia-product-body\">\n <span *ngIf=\"product.vendor\" class=\"aia-product-vendor\">{{ product.vendor }}</span>\n <span class=\"aia-product-title\">{{ product.title }}</span>\n <span *ngIf=\"product.price\" class=\"aia-product-price\">{{ product.price }}</span>\n <!-- In the text column rather than the aria-hidden media tile, so the\n card's accessible name says it; the stylesheet lifts it over the\n image. -->\n <span *ngIf=\"product.available === false\" class=\"aia-product-badge\">{{ strings.soldOut }}</span>\n </span>\n\n <!-- The add-to-cart button: a child of the card rather than of the\n aria-hidden media tile; the stylesheet lifts it over the tile's\n bottom right corner. A role=\"button\" span, not a <button>:\n interactive content inside an <a> is invalid HTML. Its press never\n reaches the card, so it never selects. Sold-out cards have none. -->\n <span\n *ngIf=\"hasCart(product)\"\n class=\"aia-product-cart\"\n data-aia-product-cart=\"\"\n role=\"button\"\n [attr.aria-label]=\"strings.addToCart + ': ' + product.title\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n [attr.data-aia-cart-state]=\"cartState(product)\"\n [attr.aria-busy]=\"cartState(product) === 'adding' ? 'true' : null\"\n (click)=\"onCartPress($event, product)\"\n (keydown)=\"onCartKeyDown($event, product)\"\n (focus)=\"onCardFocus()\"\n (blur)=\"onCardBlur($event)\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path class=\"aia-product-cart-glyph\" d=\"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6\" />\n <path class=\"aia-product-cart-glyph\" d=\"M13.5 6.5v-4M11.5 4.5h4\" />\n <path class=\"aia-product-cart-check\" d=\"M5 12.5l4.5 4.5L19 7.5\" />\n <path class=\"aia-product-cart-spinner\" d=\"M12 4a8 8 0 1 0 8 8\" />\n <circle class=\"aia-product-cart-glyph\" cx=\"9\" cy=\"20\" r=\"1.3\" />\n <circle class=\"aia-product-cart-glyph\" cx=\"17.5\" cy=\"20\" r=\"1.3\" />\n </svg>\n </span>\n </a>\n </div>\n</section>\n", styles: [".aia-products{display:flex;flex-direction:column;gap:6px;padding:0 10px;min-width:0}.aia-products-label{font-family:inherit;font-size:var(--aia-products-label-font-size, 11px);font-weight:500;line-height:18px;letter-spacing:.02em;color:var( --aia-products-label-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) )}.aia-products-row{display:flex;gap:var(--aia-product-gap, 8px);min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding-bottom:2px;margin-inline:-6px;scrollbar-width:none;-ms-overflow-style:none}.aia-products-row::-webkit-scrollbar{display:none}.aia-product{flex:0 0 auto;display:flex;flex-direction:column;gap:6px;width:var(--aia-product-card-width, 116px);padding:6px;border-radius:10px;background:var(--aia-product-bg, transparent);color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));text-decoration:none;cursor:pointer;transition:background-color .15s ease;position:relative}.aia-product:hover{background:var(--aia-product-bg-active, var(--aia-option-bg, transparent))}.aia-product:focus-visible{outline:2px solid var(--aia-product-focus-ring, var(--aia-option-color-selected, currentColor));outline-offset:-2px}.aia-product-media{display:block;position:relative;width:100%;aspect-ratio:1 / 1;border-radius:8px;overflow:hidden;background:var(--aia-product-media-bg, var(--aia-skeleton-bg, rgba(189, 189, 189, .25)))}.aia-product-media[data-aia-image-loaded]{background:transparent}.aia-product-image{display:block;width:auto;max-width:100%;height:100%;margin:0 auto;border-radius:var(--aia-product-image-radius, 8px);object-fit:contain}.aia-product-media:where([data-aia-product-initial]){display:flex;align-items:center;justify-content:center;color:var(--aia-product-title-color, var(--aia-option-color-selected, currentColor));font-size:24px;font-weight:600;line-height:1}.aia-product-media[data-aia-product-placeholder]:after{content:\"\";position:absolute;inset:22%;background:var( --aia-product-placeholder-image, url(\"data:image/svg+xml,%3Csvg viewBox='0 -0.5 32 32' fill-rule='evenodd' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='matrix(1,0,0,1,-384,-144)'%3E%3Cg transform='matrix(0.875,0,0,0.875,90.25,19.125)'%3E%3Cpath d='M340.924,147.74C341.224,146.789 342.107,146.143 343.104,146.143C347.705,146.143 360.491,146.143 364.985,146.143C365.965,146.143 366.836,146.768 367.15,147.697C368.119,150.386 370,155.73 370,157C370,159.208 368.208,161 366,161C363.792,161 362,159.208 362,157C362,159.208 360.208,161 358,161C355.792,161 354,159.208 354,157C354,159.208 352.208,161 350,161C347.792,161 346,159.208 346,157C346,159.208 344.208,161 342,161C340.53,161 339.244,160.205 338.549,159.022C338.057,158.185 337.944,157.179 338.236,156.254C338.787,154.507 340.172,150.121 340.924,147.74Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1.32454,48,-56.1457)'%3E%3Cpath d='M341.026,160.675C341.026,160.675 341.01,168.196 341.003,171.488C341.002,171.889 341.213,172.273 341.588,172.557C341.963,172.841 342.472,173 343.003,173C347.188,173 356.817,173 361,173C361.53,173 362.039,172.841 362.414,172.558C362.789,172.275 363,171.891 363,171.49C363,168.2 363,160.675 363,160.675' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1,0,0,1,48,0)'%3E%3Cpath d='M355,168C355,166.895 354.105,166 353,166C352.356,166 351.644,166 351,166C349.895,166 349,166.895 349,168C349,170.069 349,173 349,173L355,173L355,168Z' fill='%2390e0ef'%3E%3C/path%3E%3C/g%3E%3Cg transform='matrix(1.11111,0,0,1.11111,-47.2678,-87.5361)'%3E%3Ccircle cx='411.5' cy='213.5' r='4.5' fill='%2390e0ef'%3E%3C/circle%3E%3C/g%3E%3Cpath d='M405.529,146C406.628,144.773 408.225,144 410,144C413.311,144 416,146.689 416,150C416,151.549 415.412,152.962 414.446,154.027C414.775,155.15 415,156.076 415,156.5C415,158.459 413.746,160.127 411.998,160.744L411.998,171C411.998,171.796 411.682,172.559 411.119,173.121C410.557,173.684 409.794,174 408.998,174L391.002,174C390.205,174 389.441,173.683 388.879,173.119C388.316,172.555 388,171.79 388.002,170.994L388.024,160.752C387.007,160.399 386.155,159.691 385.618,158.776L385.618,158.776C385.044,157.799 384.912,156.626 385.253,155.546L387.605,148.097C387.999,146.849 389.157,146 390.466,146L405.529,146ZM409.998,160.972C408.79,160.838 407.726,160.225 407,159.327C406.175,160.347 404.913,161 403.5,161C402.087,161 400.825,160.347 400,159.327C399.175,160.347 397.913,161 396.5,161C395.087,161 393.825,160.347 393,159.327C392.278,160.219 391.222,160.831 390.023,160.97L390.002,170.998C390.002,171.263 390.107,171.518 390.294,171.706C390.482,171.894 390.736,172 391.002,172L396,172L396,168C396,166.343 397.343,165 399,165L401,165C402.657,165 404,166.343 404,168L404,172L408.998,172C409.263,172 409.517,171.895 409.705,171.707C409.893,171.52 409.998,171.265 409.998,171L409.998,160.972ZM402,172L398,172L398,168C398,167.448 398.448,167 399,167C399,167 401,167 401,167C401.552,167 402,167.448 402,168L402,172ZM404.342,148L390.466,148C390.03,148 389.644,148.283 389.512,148.699L387.16,156.148C386.99,156.688 387.056,157.275 387.342,157.763C387.777,158.503 388.581,159 389.5,159C390.88,159 392,157.88 392,156.5C392,155.003 394,155.003 394,156.5C394,157.88 395.12,159 396.5,159C397.88,159 399,157.88 399,156.5C399,155.004 401,155.004 401,156.5C401,157.88 402.12,159 403.5,159C404.88,159 406,157.88 406,156.5C406,154.986 408,154.986 408,156.5C408,157.88 409.12,159 410.5,159C411.88,159 413,157.88 413,156.5C413,156.259 412.917,155.843 412.779,155.318C411.948,155.753 411.003,156 410,156C406.689,156 404,153.311 404,150C404,149.299 404.12,148.626 404.342,148ZM410,146C412.208,146 414,147.792 414,150C414,152.208 412.208,154 410,154C407.792,154 406,152.208 406,150C406,147.792 407.792,146 410,146ZM407.543,151.207L408.546,152.21C408.733,152.397 408.988,152.503 409.253,152.503C409.519,152.503 409.773,152.397 409.961,152.209L412.458,149.706C412.848,149.316 412.847,148.682 412.456,148.292C412.066,147.902 411.432,147.903 411.042,148.294L409.252,150.088C409.252,150.088 408.957,149.793 408.957,149.793C408.567,149.403 407.933,149.403 407.543,149.793C407.153,150.183 407.153,150.817 407.543,151.207Z' fill='%231990a7'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\") ) center / contain no-repeat}.aia-product-body{display:flex;flex-direction:column;gap:2px;min-width:0}.aia-product-vendor{font-family:inherit;font-size:var(--aia-product-vendor-font-size, 10px);line-height:14px;color:var( --aia-product-vendor-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );opacity:.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.aia-product-title{font-family:inherit;font-size:var(--aia-product-title-font-size, 12px);font-weight:400;line-height:16px;color:var( --aia-product-title-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) );display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.aia-product-price{font-family:inherit;font-size:var(--aia-product-price-font-size, 11px);font-weight:500;line-height:15px;color:var( --aia-product-price-color, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}.aia-product-badge{position:absolute;top:var(--aia-product-badge-inset, 12px);left:var(--aia-product-badge-inset, 12px);padding:3px 6px;border-radius:4px;background:var(--aia-product-badge-bg, rgba(255, 255, 255, .94));color:var(--aia-product-badge-color, #1f2328);box-shadow:0 0 0 1px #00000014,0 1px 2px #0000002e;font-family:inherit;font-size:var(--aia-product-badge-font-size, 9px);font-weight:600;line-height:1;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;pointer-events:none}.aia-product-cart{position:absolute;top:calc(var(--aia-product-card-width, 116px) - 12px - var(--aia-product-cart-size, 28px) - (var(--aia-product-card-width, 116px) - 12px) * (1 - var(--aia-product-photo-fill-y, 1)) / 2);right:calc(12px + (var(--aia-product-card-width, 116px) - 12px) * (1 - var(--aia-product-photo-fill-x, 1)) / 2);display:flex;align-items:center;justify-content:center;width:var(--aia-product-cart-size, 28px);height:var(--aia-product-cart-size, 28px);border-radius:999px;background:var(--aia-product-cart-bg, rgba(255, 255, 255, .94));color:var(--aia-product-cart-color, #1f2328);box-shadow:0 0 0 1px #00000014,0 1px 3px #00000038;cursor:pointer;transition:transform .15s ease,opacity .15s ease}.aia-product-cart:hover{transform:scale(1.08)}.aia-product-cart:focus-visible{outline:2px solid var(--aia-product-focus-ring, var(--aia-option-color-selected, currentColor));outline-offset:2px}.aia-product-cart svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.aia-product-cart svg path{fill:none;stroke:currentColor}.aia-product-cart svg circle{fill:none;stroke:currentColor}.aia-product-cart-check{display:none}.aia-product-cart[data-aia-cart-state=adding]{cursor:progress}.aia-product-cart[data-aia-cart-state=added] .aia-product-cart-glyph{display:none}.aia-product-cart[data-aia-cart-state=added] .aia-product-cart-check{display:inline}.aia-product-cart-spinner,.aia-product-cart[data-aia-cart-state=adding] .aia-product-cart-glyph{display:none}.aia-product-cart[data-aia-cart-state=adding] .aia-product-cart-spinner{display:inline}.aia-product-cart[data-aia-cart-state=adding] svg{animation:magicx-aia-product-cart-spin .8s linear infinite}@keyframes magicx-aia-product-cart-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.aia-product-cart[data-aia-cart-state=adding] svg{animation-duration:2s}}.aia-product[data-aia-product-sold-out] .aia-product-image{filter:grayscale(.55)}.aia-products[data-aia-products-layout=list] .aia-products-row{flex-direction:column;gap:var(--aia-product-list-gap, 2px);max-height:var(--aia-product-list-max-height, 320px);overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}.aia-products[data-aia-products-layout=list] .aia-product{flex-direction:row;align-items:center;gap:10px;width:auto;padding:6px 8px}.aia-products[data-aia-products-layout=list] .aia-product-media{flex:0 0 auto;width:var(--aia-product-list-media-size, 44px);height:var(--aia-product-list-media-size, 44px)}.aia-products[data-aia-products-layout=list] .aia-product-body{flex:1 1 auto}.aia-products[data-aia-products-layout=list] .aia-product-badge{top:calc(50% + var(--aia-product-list-media-size, 44px) / 2);left:8px;width:var(--aia-product-list-media-size, 44px);transform:translateY(-100%);padding:2px 0;border-radius:0 0 8px 8px;background:var(--aia-product-badge-list-bg, rgba(17, 17, 17, .72));color:var(--aia-product-badge-list-color, #fff);box-shadow:none;font-size:var(--aia-product-badge-list-font-size, 7px);letter-spacing:.02em;text-align:center}.aia-products[data-aia-products-layout=list] .aia-product-cart{top:50%;right:8px;transform:translateY(-50%)}.aia-products[data-aia-products-layout=list] .aia-product-cart:hover{transform:translateY(-50%) scale(1.08)}.aia-products[data-aia-products-layout=list] .aia-product[data-aia-product-has-cart]{padding-right:calc(var(--aia-product-cart-size, 28px) + 16px)}\n"] }]
427
531
  }], propDecorators: { products: [{
428
532
  type: Input
429
533
  }], listboxId: [{
@@ -436,6 +540,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
436
540
  type: Input
437
541
  }], strings: [{
438
542
  type: Input
543
+ }], addToCart: [{
544
+ type: Input
439
545
  }], select: [{
440
546
  type: Output
441
547
  }], focusChange: [{
@@ -957,6 +1063,11 @@ class AIAutocompleteDropdownComponent {
957
1063
  // close fade so the populated dropdown fades out as one — see initVm.
958
1064
  this.lastVisibleContent = null;
959
1065
  this.trackByWidth = (_, w) => w;
1066
+ /**
1067
+ * The strip's cart buttons. A stable arrow reading the current controller,
1068
+ * so the strip's input doesn't change on every pass.
1069
+ */
1070
+ this.addProductToCart = (product) => this.controller.addProductToCart(product);
960
1071
  }
961
1072
  /** Root class list — adds `magicx-aia` only when self-scoping via `mode`. */
962
1073
  get rootClass() {
@@ -1201,6 +1312,7 @@ class AIAutocompleteDropdownComponent {
1201
1312
  },
1202
1313
  showsFallbackSkeleton,
1203
1314
  products: dd.products,
1315
+ hasProductAddToCart: Boolean(dd.hasProductAddToCart),
1204
1316
  groupKey: activeSuggestion
1205
1317
  ? `${activeSuggestion.parameter} ${activeSuggestion.text}`
1206
1318
  : "",
@@ -1255,7 +1367,7 @@ class AIAutocompleteDropdownComponent {
1255
1367
  }
1256
1368
  }
1257
1369
  AIAutocompleteDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIAutocompleteDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1258
- AIAutocompleteDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIAutocompleteDropdownComponent, isStandalone: true, selector: "ai-autocomplete-dropdown", inputs: { controller: "controller", showPills: "showPills", showSkipButton: "showSkipButton", showOptionIcons: "showOptionIcons", showOptionImages: "showOptionImages", showOptionCounts: "showOptionCounts", productsLayout: "productsLayout", productImageFallback: "productImageFallback", className: "className", mode: "mode", language: "language" }, viewQueries: [{ propertyName: "dropdownRootRef", first: true, predicate: ["dropdownRoot"], descendants: true }, { propertyName: "scrollArrowRef", first: true, predicate: ["scrollArrow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"vm$ | async as vm\"\n #dropdownRoot\n [id]=\"controller.listboxId\"\n role=\"listbox\"\n data-aia-dropdown=\"\"\n [attr.data-aia-loading]=\"vm.isLoading ? '' : null\"\n [attr.data-aia-skeleton-exiting]=\"vm.skeletonExiting ? '' : null\"\n [attr.data-mode]=\"resolvedMode\"\n [attr.data-options-position]=\"vm.optionsPosition\"\n [attr.data-aia-has-products]=\"vm.products.length > 0 ? '' : null\"\n [class]=\"rootClass\"\n [class.magicx-aia-dropdown-visible]=\"vm.isVisible\"\n (mousedown)=\"preventBlur($event)\"\n>\n <aia-stack space=\"8px\">\n <aia-cluster\n *ngIf=\"vm.showsPills || vm.showsSkip\"\n class=\"magicx-aia-dropdown-pillbar\"\n data-aia-pillbar=\"\"\n [noWrap]=\"true\"\n >\n <!-- The scroll + right-edge fade live on this wrapper (not the bar) so\n the skip button stays outside the masked region \u2014 pinned and fully\n opaque while overflowing pills fade under it. Absent in a skip-only\n row (pills rendered elsewhere via pillPlacement inline/hidden). -->\n <span *ngIf=\"vm.showsPills\" class=\"magicx-aia-pill-scroll\" data-aia-pill-scroll=\"\">\n <aia-pill-list\n [pills]=\"vm.pills\"\n [activePillIndex]=\"0\"\n [activeSelected]=\"vm.isActivePillSelected\"\n [rounded]=\"true\"\n [loading]=\"vm.isLoading\"\n (selectPill)=\"onPillClick($event)\"\n ></aia-pill-list>\n </span>\n <button\n *ngIf=\"vm.showsSkip\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-skip\"\n data-aia-skip=\"\"\n [disabled]=\"vm.skipDisabled\"\n [attr.aria-label]=\"\n vm.activePillLabel ? vm.strings.skipLabel + ' ' + vm.activePillLabel : vm.strings.skipLabel\n \"\n (click)=\"onSkip()\"\n >\n {{ vm.strings.skip }}\n </button>\n </aia-cluster>\n\n <aia-suggestion-grid\n *ngIf=\"vm.showsOptions\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [loading]=\"vm.isLoading\"\n [groupKey]=\"vm.groupKey\"\n [optionsPosition]=\"vm.optionsPosition\"\n [showIcons]=\"vm.showOptionIcons\"\n [showImages]=\"vm.showOptionImages\"\n [showCounts]=\"vm.showOptionCounts\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n ></aia-suggestion-grid>\n\n <aia-date-grid\n *ngIf=\"vm.showsDateGrid\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [view]=\"vm.dateView\"\n [selection]=\"vm.dateSelection\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n (previousMonth)=\"onPreviousMonth()\"\n (nextMonth)=\"onNextMonth()\"\n ></aia-date-grid>\n\n <div\n *ngIf=\"vm.showsFallbackSkeleton\"\n class=\"magicx-aia-dropdown-skeleton-bars\"\n data-aia-skeleton-bars=\"\"\n >\n <span\n *ngFor=\"let w of fallbackSkeletonBarWidths; trackBy: trackByWidth\"\n class=\"magicx-aia-dropdown-skeleton-bar\"\n [style.width.px]=\"w\"\n ></span>\n </div>\n\n <!-- *ngIf, not just the section's own guard inside the component: the host\n element is an in-flow child of .aia-stack (display:flex; gap:8px), so\n an always-instantiated zero-height host would add a SECOND 8px gap\n between the grid and the footer \u2014 in every dropdown, products or not.\n The grid's --aia-grid-overlap-bottom is tuned for exactly one gap, so\n the footer would land 8px below the band it is meant to cover. -->\n <aia-product-strip\n *ngIf=\"vm.products.length > 0\"\n [products]=\"vm.products\"\n [listboxId]=\"controller.listboxId\"\n [focusable]=\"vm.isVisible\"\n [layout]=\"productsLayout\"\n [imageFallback]=\"productImageFallback\"\n [strings]=\"vm.strings\"\n (select)=\"onProductSelect($event)\"\n (focusChange)=\"onProductFocusChange($event)\"\n ></aia-product-strip>\n\n <footer class=\"magicx-aia-footer\" data-aia-footer=\"\">\n <div class=\"magicx-aia-footer-row\">\n <span class=\"magicx-aia-footer-hint-group\">\n <kbd class=\"magicx-aia-footer-key\">{{ vm.footerKey }}</kbd>\n <span class=\"magicx-aia-footer-hint\">{{ vm.footerHint }}</span>\n </span>\n <a\n class=\"magicx-aia-footer-brand-link\"\n [href]=\"brandHref\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span class=\"magicx-aia-footer-brand\">AI</span>\n <span class=\"magicx-aia-footer-badge\">Autocomplete</span>\n </a>\n </div>\n </footer>\n </aia-stack>\n <!-- \"More below\" arrow \u2014 an overlay on the panel, not a section of the\n stack. Shown/positioned by the core's scroll-arrow controller (see\n syncScrollArrow); markup mirrors vanilla's createScrollArrowButton. -->\n <button\n #scrollArrow\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-scroll-arrow\"\n data-aia-scroll-arrow=\"\"\n [attr.aria-label]=\"scrollArrowLabel\"\n aria-hidden=\"true\"\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M4 6.5 8 10.5l4-4\" />\n </svg>\n </button>\n</div>\n", styles: [":where(.magicx-aia){box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html),:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):before,:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):after{all:revert;box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-dropdown]):not(html):not(html):not(html):not(html):not(html){line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;text-shadow:none;font-style:normal;font-variant:normal;white-space:normal;visibility:visible;cursor:auto}:where([data-aia-input-wrapper] svg,[data-aia-dropdown] svg):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){display:revert;vertical-align:revert;position:revert;inset:revert;float:revert;margin:revert;padding:revert;border:revert;border-radius:revert;outline:revert;background:revert;box-shadow:revert;min-width:revert;max-width:revert;min-height:revert;max-height:revert;flex:revert;transition:revert;animation:revert;rotate:revert;scale:revert;translate:revert}:where([data-aia-input-wrapper] svg *,[data-aia-dropdown] svg *):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){transition:revert;animation:revert}:where(.magicx-aia){--aia-primitive-neutral-0: #000000;--aia-primitive-neutral-150: #1a1b1d;--aia-primitive-neutral-250: #323232;--aia-primitive-neutral-300: #333539;--aia-primitive-neutral-400: #4a4a4a;--aia-primitive-neutral-500: #505050;--aia-primitive-neutral-700: #b0b0b0;--aia-primitive-neutral-750: #bdbdbd;--aia-primitive-neutral-900: #e7e7e7;--aia-primitive-neutral-1000: #ffffff;--aia-primitive-blue-50: #eef2ff;--aia-primitive-neutral-750-a50: rgba(189, 189, 189, .51);--aia-primitive-neutral-750-a25: rgba(189, 189, 189, .25);--aia-primitive-neutral-750-a8: rgba(189, 189, 189, .083);--aia-primitive-neutral-750-a35: rgba(189, 189, 189, .35);--aia-primitive-neutral-750-a30: rgba(189, 189, 189, .3);--aia-primitive-neutral-750-a15: rgba(189, 189, 189, .15);--aia-primitive-neutral-750-a105: rgba(189, 189, 189, .105);--aia-primitive-neutral-700-a40: rgba(176, 176, 176, .4);--aia-primitive-neutral-900-a50: rgba(231, 231, 231, .5);--aia-primitive-neutral-400-a50: rgba(74, 74, 74, .5)}:where(.magicx-aia),:where(.magicx-aia[data-mode=\"light\"]){--aia-surface: var(--aia-primitive-neutral-1000);--aia-border: var(--aia-primitive-neutral-700);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-900-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-300);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #b84549;--aia-smart-suggestion-glint: #f3c4c5;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a105);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-0);--aia-option-bg: var(--aia-primitive-blue-50);--aia-option-color: var(--aia-primitive-neutral-150);--aia-option-color-selected: var(--aia-primitive-neutral-0);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-0);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #000000);--aia-submit-bg: var(--aia-primitive-neutral-0);--aia-submit-color: var(--aia-primitive-neutral-1000);--aia-color-text-muted: #6b7280;--aia-skeleton-bg: var(--aia-primitive-neutral-750-a8);--aia-streak-rgb: 99, 102, 241;--aia-footer-hint-color: var(--aia-primitive-neutral-500);--aia-footer-brand-color: var(--aia-primitive-neutral-700);--aia-footer-badge-border: var(--aia-primitive-neutral-750-a50)}:where(.magicx-aia[data-mode=\"dark\"]){--aia-surface: var(--aia-primitive-neutral-0);--aia-border: var(--aia-primitive-neutral-500);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-400-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-700);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #e0787b;--aia-smart-suggestion-glint: #ffe1e1;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a15);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-1000);--aia-option-bg: var(--aia-primitive-neutral-250);--aia-option-color: var(--aia-primitive-neutral-900);--aia-option-color-selected: var(--aia-primitive-neutral-1000);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-1000);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #ffffff);--aia-submit-bg: var(--aia-primitive-neutral-1000);--aia-submit-color: var(--aia-primitive-neutral-0);--aia-color-text-muted: #c1c4cb;--aia-skeleton-bg: var(--aia-primitive-neutral-150);--aia-streak-rgb: 255, 255, 255;--aia-footer-hint-color: var(--aia-primitive-neutral-700);--aia-footer-brand-color: var(--aia-primitive-neutral-500);--aia-footer-badge-border: var(--aia-primitive-neutral-500)}[data-aia-dropdown]{--aia-footer-row-height: 23px;--aia-footer-band: calc(var(--aia-footer-gap, 12px) + var(--aia-footer-row-height, 23px));--aia-grid-scroll-bottom: var(--aia-footer-band);--aia-grid-overlap-bottom: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-lead: 20px;--aia-footer-fade-inset: calc(-1 * var(--aia-footer-fade-lead)) 0 0}[data-aia-dropdown] [data-aia-pillbar] .aia-pill-list{padding-inline:10px}[data-aia-dropdown] [data-aia-pillbar] .aia-pill{justify-content:flex-start;border-inline-width:0;padding-inline:0}[data-aia-dropdown] .aia-grid[data-scroll]{padding-top:var(--aia-grid-scroll-top, 0);padding-bottom:var(--aia-grid-scroll-bottom, 0);margin-top:var(--aia-grid-overlap-top, 0);margin-bottom:var(--aia-grid-overlap-bottom, 0)}[data-aia-dropdown] [data-aia-footer]:before{content:\"\";position:absolute;inset:var(--aia-footer-fade-inset, -20px 0 0);z-index:-1;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}[data-aia-dropdown][data-aia-surface=glass]{--aia-footer-chip-bg: transparent}[data-aia-dropdown][data-aia-surface=glass] [data-aia-footer]:before{display:none}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown],[data-aia-dropdown][data-options-position=above]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: var(--aia-footer-band);--aia-grid-overlap-top: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-inset: 0 0 calc(-1 * var(--aia-footer-fade-lead));transform-origin:50% 100%;top:auto;bottom:100%;margin-top:0;margin-bottom:6px}[data-aia-dropdown][data-aia-has-products]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .aia-stack,[data-aia-dropdown][data-options-position=above] .aia-stack{flex-direction:column-reverse}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer],[data-aia-dropdown][data-options-position=above] [data-aia-footer]{padding:0 0 var(--aia-footer-gap, 12px) 8px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before{background:linear-gradient(to top,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .magicx-aia-footer,[data-aia-dropdown][data-options-position=above] .magicx-aia-footer{flex-direction:column-reverse}@media (min-width: 769px){[data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before,:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before{inset:0;background:var(--aia-surface, #ffffff)}}[data-aia-dropdown][data-aia-fit]{max-height:var(--aia-dropdown-fit-height, none);--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}[data-aia-dropdown][data-aia-fit]>.aia-stack{flex:1 1 auto;min-height:0;margin-inline:-6px;padding-inline:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}[data-aia-dropdown][data-aia-fit]>.aia-stack::-webkit-scrollbar{display:none}[data-aia-dropdown][data-aia-fit]>.aia-stack>*{flex-shrink:0}[data-aia-dropdown][data-aia-fit] .aia-grid[data-scroll]{max-height:none;overflow:visible}\n", ".magicx-aia-dropdown{position:absolute;left:0;right:0;top:100%;max-width:544px;margin-top:6px;display:flex;flex-direction:column;box-sizing:border-box;padding:10px 8px 10px max(0px,calc(var(--aia-content-inset-left, 16px) - 10px));overflow:hidden;container-type:inline-size;z-index:10;opacity:0;pointer-events:none;transform-origin:50% 0;transform:scaleY(var(--aia-dropdown-reveal-scale, .02));transition:opacity .4s cubic-bezier(.4,0,.2,1),transform 0s .4s;background:var(--aia-surface, #ffffff);border:1px solid var(--aia-dropdown-border, rgba(231, 231, 231, .5));border-radius:9px;box-shadow:var(--aia-dropdown-shadow, none)}.magicx-aia-dropdown:has([data-aia-datepicker]){max-width:var(--aia-date-panel-width, 312px)}.magicx-aia-dropdown[data-aia-surface=glass]{background:transparent;border-color:transparent;box-shadow:#fff -3.2px -3.2px 3.2px -3.2px inset,#fff 6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) -6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) 6.4px -6.4px 1.6px -8px inset,#ffffff26 -1.6px 0 0 -1.6px inset,#ffffff26 0 -1.6px 0 -1.6px inset,#ffffff4d 0 1.6px inset,#ffffff4d 1.6px 0 inset,inset 0 0 30px 5px #0000000d;backdrop-filter:blur(30px)}.magicx-aia-dropdown-visible{opacity:1;pointer-events:auto;transform:scaleY(1);transition:opacity .1s cubic-bezier(.4,0,.2,1),transform .32s cubic-bezier(.22,1.28,.36,1)}.magicx-aia-scroll-arrow{position:absolute;left:50%;bottom:var(--aia-scroll-arrow-bottom, 8px);z-index:4;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin:0 0 0 -16px;padding:0;border:0;border-radius:0;background:transparent;color:var( --aia-scroll-arrow-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );box-shadow:none;cursor:pointer;pointer-events:none;opacity:0;transition:opacity 1s cubic-bezier(.4,0,.2,1);animation:magicx-aia-scroll-arrow-bob 2.6s ease-in-out infinite}@keyframes magicx-aia-scroll-arrow-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}.magicx-aia-scroll-arrow[data-aia-visible]{pointer-events:auto;opacity:1}.magicx-aia-scroll-arrow:disabled{cursor:default}.magicx-aia-scroll-arrow svg{width:14px;height:14px;fill:none;stroke:currentColor}.magicx-aia-scroll-arrow svg path{fill:none;stroke:currentColor}.magicx-aia-scroll-arrow:hover{color:var( --aia-scroll-arrow-color-hover, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}@media (prefers-reduced-motion: reduce){.magicx-aia-scroll-arrow,.magicx-aia-dropdown{animation-duration:0s;animation-delay:0s;transition-duration:0s}}.magicx-aia-dropdown-pillbar{overflow:hidden}.magicx-aia-pill-scroll{display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%);-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%)}.magicx-aia-pill-scroll::-webkit-scrollbar{display:none}.magicx-aia-skip{display:inline-flex;align-items:center;margin-inline-start:auto;flex-shrink:0;padding:5px 8px;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:var(--aia-skip-font-size, 10px);line-height:18px;color:var(--aia-skip-color, var(--aia-footer-hint-color, #505050));cursor:pointer;white-space:nowrap;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-skip:hover{color:var(--aia-skip-color-hover, var(--aia-pill-color, var(--aia-color-text-muted, #c1c4cb)));background:var(--aia-skip-hover-bg, var(--aia-option-bg, transparent))}.magicx-aia-skip:disabled{pointer-events:none;cursor:default;opacity:.5}.magicx-aia-footer{display:flex;flex-direction:column;gap:8px;padding:var(--aia-footer-gap, 12px) 0 0 8px;position:relative;z-index:3;pointer-events:none}.magicx-aia-footer-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--aia-footer-row-min-height, var(--aia-footer-row-height, 23px))}.magicx-aia-footer-hint-group{display:inline-flex;align-items:center;gap:5px}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{pointer-events:auto}.magicx-aia-footer-brand-link{display:inline-flex;align-items:center;gap:2px;text-decoration:none;cursor:pointer;transition:opacity .15s ease-out}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{background:var( --aia-footer-chip-bg, color-mix(in srgb, var(--aia-surface, #ffffff) 65%, transparent) );padding-inline:4px;border-radius:6px}.magicx-aia-footer-brand-link{background:var(--aia-footer-brand-pill-bg, var(--aia-surface, #ffffff));border-radius:999px;padding:2px 4px;gap:4px}.magicx-aia-footer-brand-link:hover{opacity:.7}.magicx-aia-footer-key{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:22px;padding:2px 6px;border:.5px solid var(--aia-footer-hint-color, #505050);border-radius:5px;font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-hint{font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-brand{font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}.magicx-aia-footer-badge{display:inline-flex;align-items:center;height:var(--aia-footer-row-height, 23px);padding:2.5px 5.5px;border:.5px solid var(--aia-footer-badge-border, rgba(189, 189, 189, .51));border-radius:999px;font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}@media (max-width: 768px){.magicx-aia-footer-hint-group{display:none}.magicx-aia-footer-row{justify-content:flex-end}}.magicx-aia-dropdown-skeleton-bars{display:flex;flex-direction:column;gap:20px;padding:7px 8px;animation:aiaSkeletonBarsIn .1s ease-out}[data-aia-skeleton-exiting] .magicx-aia-dropdown-skeleton-bars{animation:aiaSkeletonBarsOut .1s ease-in forwards}@keyframes aiaSkeletonBarsOut{to{opacity:0}}@keyframes aiaSkeletonBarsIn{0%{opacity:0}}.magicx-aia-dropdown-skeleton-bar{display:block;height:14px;border-radius:999px;background:var(--aia-skeleton-bg, var(--aia-pill-bg, rgba(189, 189, 189, .25)));opacity:.5;animation:aiaDropdownSkeletonPulse 1.4s ease-in-out infinite}.magicx-aia-dropdown-skeleton-bar:nth-child(2){animation-delay:.15s}.magicx-aia-dropdown-skeleton-bar:nth-child(3){animation-delay:.3s}@keyframes aiaDropdownSkeletonPulse{0%,to{opacity:.5}50%{opacity:.25}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: PillListComponent, selector: "aia-pill-list", inputs: ["pills", "activePillIndex", "rounded", "loading", "activeSelected"], outputs: ["selectPill"] }, { kind: "component", type: ProductStripComponent, selector: "aia-product-strip", inputs: ["products", "listboxId", "focusable", "layout", "imageFallback", "strings"], outputs: ["select", "focusChange"] }, { kind: "component", type: SuggestionGridComponent, selector: "aia-suggestion-grid", inputs: ["options", "activeIndex", "listboxId", "loading", "groupKey", "optionsPosition", "showIcons", "showImages", "showCounts"], outputs: ["select", "highlight", "unhighlight"] }, { kind: "component", type: DateGridComponent, selector: "aia-date-grid", inputs: ["options", "activeIndex", "listboxId", "view", "selection"], outputs: ["select", "highlight", "unhighlight", "previousMonth", "nextMonth"] }, { kind: "component", type: StackComponent, selector: "aia-stack", inputs: ["space", "align"] }, { kind: "component", type: ClusterComponent, selector: "aia-cluster", inputs: ["gap", "align", "justify", "noWrap", "inline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1370
+ AIAutocompleteDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIAutocompleteDropdownComponent, isStandalone: true, selector: "ai-autocomplete-dropdown", inputs: { controller: "controller", showPills: "showPills", showSkipButton: "showSkipButton", showOptionIcons: "showOptionIcons", showOptionImages: "showOptionImages", showOptionCounts: "showOptionCounts", productsLayout: "productsLayout", productImageFallback: "productImageFallback", className: "className", mode: "mode", language: "language" }, viewQueries: [{ propertyName: "dropdownRootRef", first: true, predicate: ["dropdownRoot"], descendants: true }, { propertyName: "scrollArrowRef", first: true, predicate: ["scrollArrow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"vm$ | async as vm\"\n #dropdownRoot\n [id]=\"controller.listboxId\"\n role=\"listbox\"\n data-aia-dropdown=\"\"\n [attr.data-aia-loading]=\"vm.isLoading ? '' : null\"\n [attr.data-aia-skeleton-exiting]=\"vm.skeletonExiting ? '' : null\"\n [attr.data-mode]=\"resolvedMode\"\n [attr.data-options-position]=\"vm.optionsPosition\"\n [attr.data-aia-has-products]=\"vm.products.length > 0 ? '' : null\"\n [class]=\"rootClass\"\n [class.magicx-aia-dropdown-visible]=\"vm.isVisible\"\n (mousedown)=\"preventBlur($event)\"\n>\n <aia-stack space=\"8px\">\n <aia-cluster\n *ngIf=\"vm.showsPills || vm.showsSkip\"\n class=\"magicx-aia-dropdown-pillbar\"\n data-aia-pillbar=\"\"\n [noWrap]=\"true\"\n >\n <!-- The scroll + right-edge fade live on this wrapper (not the bar) so\n the skip button stays outside the masked region \u2014 pinned and fully\n opaque while overflowing pills fade under it. Absent in a skip-only\n row (pills rendered elsewhere via pillPlacement inline/hidden). -->\n <span *ngIf=\"vm.showsPills\" class=\"magicx-aia-pill-scroll\" data-aia-pill-scroll=\"\">\n <aia-pill-list\n [pills]=\"vm.pills\"\n [activePillIndex]=\"0\"\n [activeSelected]=\"vm.isActivePillSelected\"\n [rounded]=\"true\"\n [loading]=\"vm.isLoading\"\n (selectPill)=\"onPillClick($event)\"\n ></aia-pill-list>\n </span>\n <button\n *ngIf=\"vm.showsSkip\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-skip\"\n data-aia-skip=\"\"\n [disabled]=\"vm.skipDisabled\"\n [attr.aria-label]=\"\n vm.activePillLabel ? vm.strings.skipLabel + ' ' + vm.activePillLabel : vm.strings.skipLabel\n \"\n (click)=\"onSkip()\"\n >\n {{ vm.strings.skip }}\n </button>\n </aia-cluster>\n\n <aia-suggestion-grid\n *ngIf=\"vm.showsOptions\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [loading]=\"vm.isLoading\"\n [groupKey]=\"vm.groupKey\"\n [optionsPosition]=\"vm.optionsPosition\"\n [showIcons]=\"vm.showOptionIcons\"\n [showImages]=\"vm.showOptionImages\"\n [showCounts]=\"vm.showOptionCounts\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n ></aia-suggestion-grid>\n\n <aia-date-grid\n *ngIf=\"vm.showsDateGrid\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [view]=\"vm.dateView\"\n [selection]=\"vm.dateSelection\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n (previousMonth)=\"onPreviousMonth()\"\n (nextMonth)=\"onNextMonth()\"\n ></aia-date-grid>\n\n <div\n *ngIf=\"vm.showsFallbackSkeleton\"\n class=\"magicx-aia-dropdown-skeleton-bars\"\n data-aia-skeleton-bars=\"\"\n >\n <span\n *ngFor=\"let w of fallbackSkeletonBarWidths; trackBy: trackByWidth\"\n class=\"magicx-aia-dropdown-skeleton-bar\"\n [style.width.px]=\"w\"\n ></span>\n </div>\n\n <!-- *ngIf, not just the section's own guard inside the component: the host\n element is an in-flow child of .aia-stack (display:flex; gap:8px), so\n an always-instantiated zero-height host would add a SECOND 8px gap\n between the grid and the footer \u2014 in every dropdown, products or not.\n The grid's --aia-grid-overlap-bottom is tuned for exactly one gap, so\n the footer would land 8px below the band it is meant to cover. -->\n <aia-product-strip\n *ngIf=\"vm.products.length > 0\"\n [products]=\"vm.products\"\n [listboxId]=\"controller.listboxId\"\n [focusable]=\"vm.isVisible\"\n [layout]=\"productsLayout\"\n [imageFallback]=\"productImageFallback\"\n [strings]=\"vm.strings\"\n [addToCart]=\"vm.hasProductAddToCart ? addProductToCart : null\"\n (select)=\"onProductSelect($event)\"\n (focusChange)=\"onProductFocusChange($event)\"\n ></aia-product-strip>\n\n <footer class=\"magicx-aia-footer\" data-aia-footer=\"\">\n <div class=\"magicx-aia-footer-row\">\n <span class=\"magicx-aia-footer-hint-group\">\n <kbd class=\"magicx-aia-footer-key\">{{ vm.footerKey }}</kbd>\n <span class=\"magicx-aia-footer-hint\">{{ vm.footerHint }}</span>\n </span>\n <a\n class=\"magicx-aia-footer-brand-link\"\n [href]=\"brandHref\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span class=\"magicx-aia-footer-brand\">AI</span>\n <span class=\"magicx-aia-footer-badge\">Autocomplete</span>\n </a>\n </div>\n </footer>\n </aia-stack>\n <!-- \"More below\" arrow \u2014 an overlay on the panel, not a section of the\n stack. Shown/positioned by the core's scroll-arrow controller (see\n syncScrollArrow); markup mirrors vanilla's createScrollArrowButton. -->\n <button\n #scrollArrow\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-scroll-arrow\"\n data-aia-scroll-arrow=\"\"\n [attr.aria-label]=\"scrollArrowLabel\"\n aria-hidden=\"true\"\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M4 6.5 8 10.5l4-4\" />\n </svg>\n </button>\n</div>\n", styles: [":where(.magicx-aia){box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html),:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):before,:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):after{all:revert;box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-dropdown]):not(html):not(html):not(html):not(html):not(html){line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;text-shadow:none;font-style:normal;font-variant:normal;white-space:normal;visibility:visible;cursor:auto}:where([data-aia-input-wrapper] svg,[data-aia-dropdown] svg):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){display:revert;vertical-align:revert;position:revert;inset:revert;float:revert;margin:revert;padding:revert;border:revert;border-radius:revert;outline:revert;background:revert;box-shadow:revert;min-width:revert;max-width:revert;min-height:revert;max-height:revert;flex:revert;transition:revert;animation:revert;rotate:revert;scale:revert;translate:revert}:where([data-aia-input-wrapper] svg *,[data-aia-dropdown] svg *):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){transition:revert;animation:revert}:where(.magicx-aia){--aia-primitive-neutral-0: #000000;--aia-primitive-neutral-150: #1a1b1d;--aia-primitive-neutral-250: #323232;--aia-primitive-neutral-300: #333539;--aia-primitive-neutral-400: #4a4a4a;--aia-primitive-neutral-500: #505050;--aia-primitive-neutral-700: #b0b0b0;--aia-primitive-neutral-750: #bdbdbd;--aia-primitive-neutral-900: #e7e7e7;--aia-primitive-neutral-1000: #ffffff;--aia-primitive-blue-50: #eef2ff;--aia-primitive-neutral-750-a50: rgba(189, 189, 189, .51);--aia-primitive-neutral-750-a25: rgba(189, 189, 189, .25);--aia-primitive-neutral-750-a8: rgba(189, 189, 189, .083);--aia-primitive-neutral-750-a35: rgba(189, 189, 189, .35);--aia-primitive-neutral-750-a30: rgba(189, 189, 189, .3);--aia-primitive-neutral-750-a15: rgba(189, 189, 189, .15);--aia-primitive-neutral-750-a105: rgba(189, 189, 189, .105);--aia-primitive-neutral-700-a40: rgba(176, 176, 176, .4);--aia-primitive-neutral-900-a50: rgba(231, 231, 231, .5);--aia-primitive-neutral-400-a50: rgba(74, 74, 74, .5)}:where(.magicx-aia),:where(.magicx-aia[data-mode=\"light\"]){--aia-surface: var(--aia-primitive-neutral-1000);--aia-border: var(--aia-primitive-neutral-700);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-900-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-300);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #b84549;--aia-smart-suggestion-glint: #f3c4c5;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a105);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-0);--aia-option-bg: var(--aia-primitive-blue-50);--aia-option-color: var(--aia-primitive-neutral-150);--aia-option-color-selected: var(--aia-primitive-neutral-0);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-0);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #000000);--aia-submit-bg: var(--aia-primitive-neutral-0);--aia-submit-color: var(--aia-primitive-neutral-1000);--aia-color-text-muted: #6b7280;--aia-skeleton-bg: var(--aia-primitive-neutral-750-a8);--aia-streak-rgb: 99, 102, 241;--aia-footer-hint-color: var(--aia-primitive-neutral-500);--aia-footer-brand-color: var(--aia-primitive-neutral-700);--aia-footer-badge-border: var(--aia-primitive-neutral-750-a50)}:where(.magicx-aia[data-mode=\"dark\"]){--aia-surface: var(--aia-primitive-neutral-0);--aia-border: var(--aia-primitive-neutral-500);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-400-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-700);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #e0787b;--aia-smart-suggestion-glint: #ffe1e1;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a15);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-1000);--aia-option-bg: var(--aia-primitive-neutral-250);--aia-option-color: var(--aia-primitive-neutral-900);--aia-option-color-selected: var(--aia-primitive-neutral-1000);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-1000);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #ffffff);--aia-submit-bg: var(--aia-primitive-neutral-1000);--aia-submit-color: var(--aia-primitive-neutral-0);--aia-color-text-muted: #c1c4cb;--aia-skeleton-bg: var(--aia-primitive-neutral-150);--aia-streak-rgb: 255, 255, 255;--aia-footer-hint-color: var(--aia-primitive-neutral-700);--aia-footer-brand-color: var(--aia-primitive-neutral-500);--aia-footer-badge-border: var(--aia-primitive-neutral-500)}[data-aia-dropdown]{--aia-footer-row-height: 23px;--aia-footer-band: calc(var(--aia-footer-gap, 12px) + var(--aia-footer-row-height, 23px));--aia-grid-scroll-bottom: var(--aia-footer-band);--aia-grid-overlap-bottom: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-lead: 20px;--aia-footer-fade-inset: calc(-1 * var(--aia-footer-fade-lead)) 0 0}[data-aia-dropdown] [data-aia-pillbar] .aia-pill-list{padding-inline:10px}[data-aia-dropdown] [data-aia-pillbar] .aia-pill{justify-content:flex-start;border-inline-width:0;padding-inline:0}[data-aia-dropdown] .aia-grid[data-scroll]{padding-top:var(--aia-grid-scroll-top, 0);padding-bottom:var(--aia-grid-scroll-bottom, 0);margin-top:var(--aia-grid-overlap-top, 0);margin-bottom:var(--aia-grid-overlap-bottom, 0)}[data-aia-dropdown] [data-aia-footer]:before{content:\"\";position:absolute;inset:var(--aia-footer-fade-inset, -20px 0 0);z-index:-1;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}[data-aia-dropdown][data-aia-surface=glass]{--aia-footer-chip-bg: transparent}[data-aia-dropdown][data-aia-surface=glass] [data-aia-footer]:before{display:none}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown],[data-aia-dropdown][data-options-position=above]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: var(--aia-footer-band);--aia-grid-overlap-top: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-inset: 0 0 calc(-1 * var(--aia-footer-fade-lead));transform-origin:50% 100%;top:auto;bottom:100%;margin-top:0;margin-bottom:6px}[data-aia-dropdown][data-aia-has-products]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .aia-stack,[data-aia-dropdown][data-options-position=above] .aia-stack{flex-direction:column-reverse}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer],[data-aia-dropdown][data-options-position=above] [data-aia-footer]{padding:0 0 var(--aia-footer-gap, 12px) 8px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before{background:linear-gradient(to top,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .magicx-aia-footer,[data-aia-dropdown][data-options-position=above] .magicx-aia-footer{flex-direction:column-reverse}@media (min-width: 769px){[data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before,:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before{inset:0;background:var(--aia-surface, #ffffff)}}[data-aia-dropdown][data-aia-fit]{max-height:var(--aia-dropdown-fit-height, none);--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}[data-aia-dropdown][data-aia-fit]>.aia-stack{flex:1 1 auto;min-height:0;margin-inline:-6px;padding-inline:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}[data-aia-dropdown][data-aia-fit]>.aia-stack::-webkit-scrollbar{display:none}[data-aia-dropdown][data-aia-fit]>.aia-stack>*{flex-shrink:0}[data-aia-dropdown][data-aia-fit] .aia-grid[data-scroll]{max-height:none;overflow:visible}\n", ".magicx-aia-dropdown{position:absolute;left:0;right:0;top:100%;max-width:544px;margin-top:6px;display:flex;flex-direction:column;box-sizing:border-box;padding:10px 8px 10px max(0px,calc(var(--aia-content-inset-left, 16px) - 10px));overflow:hidden;container-type:inline-size;z-index:10;opacity:0;pointer-events:none;transform-origin:50% 0;transform:scaleY(var(--aia-dropdown-reveal-scale, .02));transition:opacity .4s cubic-bezier(.4,0,.2,1),transform 0s .4s;background:var(--aia-surface, #ffffff);border:1px solid var(--aia-dropdown-border, rgba(231, 231, 231, .5));border-radius:9px;box-shadow:var(--aia-dropdown-shadow, none)}.magicx-aia-dropdown:has([data-aia-datepicker]){max-width:var(--aia-date-panel-width, 312px)}.magicx-aia-dropdown[data-aia-surface=glass]{background:transparent;border-color:transparent;box-shadow:#fff -3.2px -3.2px 3.2px -3.2px inset,#fff 6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) -6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) 6.4px -6.4px 1.6px -8px inset,#ffffff26 -1.6px 0 0 -1.6px inset,#ffffff26 0 -1.6px 0 -1.6px inset,#ffffff4d 0 1.6px inset,#ffffff4d 1.6px 0 inset,inset 0 0 30px 5px #0000000d;backdrop-filter:blur(30px)}.magicx-aia-dropdown-visible{opacity:1;pointer-events:auto;transform:scaleY(1);transition:opacity .1s cubic-bezier(.4,0,.2,1),transform .32s cubic-bezier(.22,1.28,.36,1)}.magicx-aia-scroll-arrow{position:absolute;left:50%;bottom:var(--aia-scroll-arrow-bottom, 8px);z-index:4;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin:0 0 0 -16px;padding:0;border:0;border-radius:0;background:transparent;color:var( --aia-scroll-arrow-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );box-shadow:none;cursor:pointer;pointer-events:none;opacity:0;transition:opacity 1s cubic-bezier(.4,0,.2,1);animation:magicx-aia-scroll-arrow-bob 2.6s ease-in-out infinite}@keyframes magicx-aia-scroll-arrow-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}.magicx-aia-scroll-arrow[data-aia-visible]{pointer-events:auto;opacity:1}.magicx-aia-scroll-arrow:disabled{cursor:default}.magicx-aia-scroll-arrow svg{width:14px;height:14px;fill:none;stroke:currentColor}.magicx-aia-scroll-arrow svg path{fill:none;stroke:currentColor}.magicx-aia-scroll-arrow:hover{color:var( --aia-scroll-arrow-color-hover, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}@media (prefers-reduced-motion: reduce){.magicx-aia-scroll-arrow,.magicx-aia-dropdown{animation-duration:0s;animation-delay:0s;transition-duration:0s}}.magicx-aia-dropdown-pillbar{overflow:hidden}.magicx-aia-pill-scroll{display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%);-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%)}.magicx-aia-pill-scroll::-webkit-scrollbar{display:none}.magicx-aia-skip{display:inline-flex;align-items:center;margin-inline-start:auto;flex-shrink:0;padding:5px 8px;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:var(--aia-skip-font-size, 10px);line-height:18px;color:var(--aia-skip-color, var(--aia-footer-hint-color, #505050));cursor:pointer;white-space:nowrap;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-skip:hover{color:var(--aia-skip-color-hover, var(--aia-pill-color, var(--aia-color-text-muted, #c1c4cb)));background:var(--aia-skip-hover-bg, var(--aia-option-bg, transparent))}.magicx-aia-skip:disabled{pointer-events:none;cursor:default;opacity:.5}.magicx-aia-footer{display:flex;flex-direction:column;gap:8px;padding:var(--aia-footer-gap, 12px) 0 0 8px;position:relative;z-index:3;pointer-events:none}.magicx-aia-footer-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--aia-footer-row-min-height, var(--aia-footer-row-height, 23px))}.magicx-aia-footer-hint-group{display:inline-flex;align-items:center;gap:5px}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{pointer-events:auto}.magicx-aia-footer-brand-link{display:inline-flex;align-items:center;gap:2px;text-decoration:none;cursor:pointer;transition:opacity .15s ease-out}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{background:var( --aia-footer-chip-bg, color-mix(in srgb, var(--aia-surface, #ffffff) 65%, transparent) );padding-inline:4px;border-radius:6px}.magicx-aia-footer-brand-link{background:var(--aia-footer-brand-pill-bg, var(--aia-surface, #ffffff));border-radius:999px;padding:2px 4px;gap:4px}.magicx-aia-footer-brand-link:hover{opacity:.7}.magicx-aia-footer-key{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:22px;padding:2px 6px;border:.5px solid var(--aia-footer-hint-color, #505050);border-radius:5px;font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-hint{font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-brand{font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}.magicx-aia-footer-badge{display:inline-flex;align-items:center;height:var(--aia-footer-row-height, 23px);padding:2.5px 5.5px;border:.5px solid var(--aia-footer-badge-border, rgba(189, 189, 189, .51));border-radius:999px;font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}@media (max-width: 768px){.magicx-aia-footer-hint-group{display:none}.magicx-aia-footer-row{justify-content:flex-end}}.magicx-aia-dropdown-skeleton-bars{display:flex;flex-direction:column;gap:20px;padding:7px 8px;animation:aiaSkeletonBarsIn .1s ease-out}[data-aia-skeleton-exiting] .magicx-aia-dropdown-skeleton-bars{animation:aiaSkeletonBarsOut .1s ease-in forwards}@keyframes aiaSkeletonBarsOut{to{opacity:0}}@keyframes aiaSkeletonBarsIn{0%{opacity:0}}.magicx-aia-dropdown-skeleton-bar{display:block;height:14px;border-radius:999px;background:var(--aia-skeleton-bg, var(--aia-pill-bg, rgba(189, 189, 189, .25)));opacity:.5;animation:aiaDropdownSkeletonPulse 1.4s ease-in-out infinite}.magicx-aia-dropdown-skeleton-bar:nth-child(2){animation-delay:.15s}.magicx-aia-dropdown-skeleton-bar:nth-child(3){animation-delay:.3s}@keyframes aiaDropdownSkeletonPulse{0%,to{opacity:.5}50%{opacity:.25}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: PillListComponent, selector: "aia-pill-list", inputs: ["pills", "activePillIndex", "rounded", "loading", "activeSelected"], outputs: ["selectPill"] }, { kind: "component", type: ProductStripComponent, selector: "aia-product-strip", inputs: ["products", "listboxId", "focusable", "layout", "imageFallback", "strings", "addToCart"], outputs: ["select", "focusChange"] }, { kind: "component", type: SuggestionGridComponent, selector: "aia-suggestion-grid", inputs: ["options", "activeIndex", "listboxId", "loading", "groupKey", "optionsPosition", "showIcons", "showImages", "showCounts"], outputs: ["select", "highlight", "unhighlight"] }, { kind: "component", type: DateGridComponent, selector: "aia-date-grid", inputs: ["options", "activeIndex", "listboxId", "view", "selection"], outputs: ["select", "highlight", "unhighlight", "previousMonth", "nextMonth"] }, { kind: "component", type: StackComponent, selector: "aia-stack", inputs: ["space", "align"] }, { kind: "component", type: ClusterComponent, selector: "aia-cluster", inputs: ["gap", "align", "justify", "noWrap", "inline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1259
1371
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIAutocompleteDropdownComponent, decorators: [{
1260
1372
  type: Component,
1261
1373
  args: [{ selector: "ai-autocomplete-dropdown", standalone: true, imports: [
@@ -1266,7 +1378,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1266
1378
  DateGridComponent,
1267
1379
  StackComponent,
1268
1380
  ClusterComponent,
1269
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n *ngIf=\"vm$ | async as vm\"\n #dropdownRoot\n [id]=\"controller.listboxId\"\n role=\"listbox\"\n data-aia-dropdown=\"\"\n [attr.data-aia-loading]=\"vm.isLoading ? '' : null\"\n [attr.data-aia-skeleton-exiting]=\"vm.skeletonExiting ? '' : null\"\n [attr.data-mode]=\"resolvedMode\"\n [attr.data-options-position]=\"vm.optionsPosition\"\n [attr.data-aia-has-products]=\"vm.products.length > 0 ? '' : null\"\n [class]=\"rootClass\"\n [class.magicx-aia-dropdown-visible]=\"vm.isVisible\"\n (mousedown)=\"preventBlur($event)\"\n>\n <aia-stack space=\"8px\">\n <aia-cluster\n *ngIf=\"vm.showsPills || vm.showsSkip\"\n class=\"magicx-aia-dropdown-pillbar\"\n data-aia-pillbar=\"\"\n [noWrap]=\"true\"\n >\n <!-- The scroll + right-edge fade live on this wrapper (not the bar) so\n the skip button stays outside the masked region \u2014 pinned and fully\n opaque while overflowing pills fade under it. Absent in a skip-only\n row (pills rendered elsewhere via pillPlacement inline/hidden). -->\n <span *ngIf=\"vm.showsPills\" class=\"magicx-aia-pill-scroll\" data-aia-pill-scroll=\"\">\n <aia-pill-list\n [pills]=\"vm.pills\"\n [activePillIndex]=\"0\"\n [activeSelected]=\"vm.isActivePillSelected\"\n [rounded]=\"true\"\n [loading]=\"vm.isLoading\"\n (selectPill)=\"onPillClick($event)\"\n ></aia-pill-list>\n </span>\n <button\n *ngIf=\"vm.showsSkip\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-skip\"\n data-aia-skip=\"\"\n [disabled]=\"vm.skipDisabled\"\n [attr.aria-label]=\"\n vm.activePillLabel ? vm.strings.skipLabel + ' ' + vm.activePillLabel : vm.strings.skipLabel\n \"\n (click)=\"onSkip()\"\n >\n {{ vm.strings.skip }}\n </button>\n </aia-cluster>\n\n <aia-suggestion-grid\n *ngIf=\"vm.showsOptions\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [loading]=\"vm.isLoading\"\n [groupKey]=\"vm.groupKey\"\n [optionsPosition]=\"vm.optionsPosition\"\n [showIcons]=\"vm.showOptionIcons\"\n [showImages]=\"vm.showOptionImages\"\n [showCounts]=\"vm.showOptionCounts\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n ></aia-suggestion-grid>\n\n <aia-date-grid\n *ngIf=\"vm.showsDateGrid\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [view]=\"vm.dateView\"\n [selection]=\"vm.dateSelection\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n (previousMonth)=\"onPreviousMonth()\"\n (nextMonth)=\"onNextMonth()\"\n ></aia-date-grid>\n\n <div\n *ngIf=\"vm.showsFallbackSkeleton\"\n class=\"magicx-aia-dropdown-skeleton-bars\"\n data-aia-skeleton-bars=\"\"\n >\n <span\n *ngFor=\"let w of fallbackSkeletonBarWidths; trackBy: trackByWidth\"\n class=\"magicx-aia-dropdown-skeleton-bar\"\n [style.width.px]=\"w\"\n ></span>\n </div>\n\n <!-- *ngIf, not just the section's own guard inside the component: the host\n element is an in-flow child of .aia-stack (display:flex; gap:8px), so\n an always-instantiated zero-height host would add a SECOND 8px gap\n between the grid and the footer \u2014 in every dropdown, products or not.\n The grid's --aia-grid-overlap-bottom is tuned for exactly one gap, so\n the footer would land 8px below the band it is meant to cover. -->\n <aia-product-strip\n *ngIf=\"vm.products.length > 0\"\n [products]=\"vm.products\"\n [listboxId]=\"controller.listboxId\"\n [focusable]=\"vm.isVisible\"\n [layout]=\"productsLayout\"\n [imageFallback]=\"productImageFallback\"\n [strings]=\"vm.strings\"\n (select)=\"onProductSelect($event)\"\n (focusChange)=\"onProductFocusChange($event)\"\n ></aia-product-strip>\n\n <footer class=\"magicx-aia-footer\" data-aia-footer=\"\">\n <div class=\"magicx-aia-footer-row\">\n <span class=\"magicx-aia-footer-hint-group\">\n <kbd class=\"magicx-aia-footer-key\">{{ vm.footerKey }}</kbd>\n <span class=\"magicx-aia-footer-hint\">{{ vm.footerHint }}</span>\n </span>\n <a\n class=\"magicx-aia-footer-brand-link\"\n [href]=\"brandHref\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span class=\"magicx-aia-footer-brand\">AI</span>\n <span class=\"magicx-aia-footer-badge\">Autocomplete</span>\n </a>\n </div>\n </footer>\n </aia-stack>\n <!-- \"More below\" arrow \u2014 an overlay on the panel, not a section of the\n stack. Shown/positioned by the core's scroll-arrow controller (see\n syncScrollArrow); markup mirrors vanilla's createScrollArrowButton. -->\n <button\n #scrollArrow\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-scroll-arrow\"\n data-aia-scroll-arrow=\"\"\n [attr.aria-label]=\"scrollArrowLabel\"\n aria-hidden=\"true\"\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M4 6.5 8 10.5l4-4\" />\n </svg>\n </button>\n</div>\n", styles: [":where(.magicx-aia){box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html),:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):before,:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):after{all:revert;box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-dropdown]):not(html):not(html):not(html):not(html):not(html){line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;text-shadow:none;font-style:normal;font-variant:normal;white-space:normal;visibility:visible;cursor:auto}:where([data-aia-input-wrapper] svg,[data-aia-dropdown] svg):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){display:revert;vertical-align:revert;position:revert;inset:revert;float:revert;margin:revert;padding:revert;border:revert;border-radius:revert;outline:revert;background:revert;box-shadow:revert;min-width:revert;max-width:revert;min-height:revert;max-height:revert;flex:revert;transition:revert;animation:revert;rotate:revert;scale:revert;translate:revert}:where([data-aia-input-wrapper] svg *,[data-aia-dropdown] svg *):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){transition:revert;animation:revert}:where(.magicx-aia){--aia-primitive-neutral-0: #000000;--aia-primitive-neutral-150: #1a1b1d;--aia-primitive-neutral-250: #323232;--aia-primitive-neutral-300: #333539;--aia-primitive-neutral-400: #4a4a4a;--aia-primitive-neutral-500: #505050;--aia-primitive-neutral-700: #b0b0b0;--aia-primitive-neutral-750: #bdbdbd;--aia-primitive-neutral-900: #e7e7e7;--aia-primitive-neutral-1000: #ffffff;--aia-primitive-blue-50: #eef2ff;--aia-primitive-neutral-750-a50: rgba(189, 189, 189, .51);--aia-primitive-neutral-750-a25: rgba(189, 189, 189, .25);--aia-primitive-neutral-750-a8: rgba(189, 189, 189, .083);--aia-primitive-neutral-750-a35: rgba(189, 189, 189, .35);--aia-primitive-neutral-750-a30: rgba(189, 189, 189, .3);--aia-primitive-neutral-750-a15: rgba(189, 189, 189, .15);--aia-primitive-neutral-750-a105: rgba(189, 189, 189, .105);--aia-primitive-neutral-700-a40: rgba(176, 176, 176, .4);--aia-primitive-neutral-900-a50: rgba(231, 231, 231, .5);--aia-primitive-neutral-400-a50: rgba(74, 74, 74, .5)}:where(.magicx-aia),:where(.magicx-aia[data-mode=\"light\"]){--aia-surface: var(--aia-primitive-neutral-1000);--aia-border: var(--aia-primitive-neutral-700);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-900-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-300);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #b84549;--aia-smart-suggestion-glint: #f3c4c5;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a105);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-0);--aia-option-bg: var(--aia-primitive-blue-50);--aia-option-color: var(--aia-primitive-neutral-150);--aia-option-color-selected: var(--aia-primitive-neutral-0);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-0);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #000000);--aia-submit-bg: var(--aia-primitive-neutral-0);--aia-submit-color: var(--aia-primitive-neutral-1000);--aia-color-text-muted: #6b7280;--aia-skeleton-bg: var(--aia-primitive-neutral-750-a8);--aia-streak-rgb: 99, 102, 241;--aia-footer-hint-color: var(--aia-primitive-neutral-500);--aia-footer-brand-color: var(--aia-primitive-neutral-700);--aia-footer-badge-border: var(--aia-primitive-neutral-750-a50)}:where(.magicx-aia[data-mode=\"dark\"]){--aia-surface: var(--aia-primitive-neutral-0);--aia-border: var(--aia-primitive-neutral-500);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-400-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-700);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #e0787b;--aia-smart-suggestion-glint: #ffe1e1;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a15);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-1000);--aia-option-bg: var(--aia-primitive-neutral-250);--aia-option-color: var(--aia-primitive-neutral-900);--aia-option-color-selected: var(--aia-primitive-neutral-1000);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-1000);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #ffffff);--aia-submit-bg: var(--aia-primitive-neutral-1000);--aia-submit-color: var(--aia-primitive-neutral-0);--aia-color-text-muted: #c1c4cb;--aia-skeleton-bg: var(--aia-primitive-neutral-150);--aia-streak-rgb: 255, 255, 255;--aia-footer-hint-color: var(--aia-primitive-neutral-700);--aia-footer-brand-color: var(--aia-primitive-neutral-500);--aia-footer-badge-border: var(--aia-primitive-neutral-500)}[data-aia-dropdown]{--aia-footer-row-height: 23px;--aia-footer-band: calc(var(--aia-footer-gap, 12px) + var(--aia-footer-row-height, 23px));--aia-grid-scroll-bottom: var(--aia-footer-band);--aia-grid-overlap-bottom: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-lead: 20px;--aia-footer-fade-inset: calc(-1 * var(--aia-footer-fade-lead)) 0 0}[data-aia-dropdown] [data-aia-pillbar] .aia-pill-list{padding-inline:10px}[data-aia-dropdown] [data-aia-pillbar] .aia-pill{justify-content:flex-start;border-inline-width:0;padding-inline:0}[data-aia-dropdown] .aia-grid[data-scroll]{padding-top:var(--aia-grid-scroll-top, 0);padding-bottom:var(--aia-grid-scroll-bottom, 0);margin-top:var(--aia-grid-overlap-top, 0);margin-bottom:var(--aia-grid-overlap-bottom, 0)}[data-aia-dropdown] [data-aia-footer]:before{content:\"\";position:absolute;inset:var(--aia-footer-fade-inset, -20px 0 0);z-index:-1;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}[data-aia-dropdown][data-aia-surface=glass]{--aia-footer-chip-bg: transparent}[data-aia-dropdown][data-aia-surface=glass] [data-aia-footer]:before{display:none}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown],[data-aia-dropdown][data-options-position=above]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: var(--aia-footer-band);--aia-grid-overlap-top: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-inset: 0 0 calc(-1 * var(--aia-footer-fade-lead));transform-origin:50% 100%;top:auto;bottom:100%;margin-top:0;margin-bottom:6px}[data-aia-dropdown][data-aia-has-products]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .aia-stack,[data-aia-dropdown][data-options-position=above] .aia-stack{flex-direction:column-reverse}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer],[data-aia-dropdown][data-options-position=above] [data-aia-footer]{padding:0 0 var(--aia-footer-gap, 12px) 8px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before{background:linear-gradient(to top,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .magicx-aia-footer,[data-aia-dropdown][data-options-position=above] .magicx-aia-footer{flex-direction:column-reverse}@media (min-width: 769px){[data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before,:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before{inset:0;background:var(--aia-surface, #ffffff)}}[data-aia-dropdown][data-aia-fit]{max-height:var(--aia-dropdown-fit-height, none);--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}[data-aia-dropdown][data-aia-fit]>.aia-stack{flex:1 1 auto;min-height:0;margin-inline:-6px;padding-inline:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}[data-aia-dropdown][data-aia-fit]>.aia-stack::-webkit-scrollbar{display:none}[data-aia-dropdown][data-aia-fit]>.aia-stack>*{flex-shrink:0}[data-aia-dropdown][data-aia-fit] .aia-grid[data-scroll]{max-height:none;overflow:visible}\n", ".magicx-aia-dropdown{position:absolute;left:0;right:0;top:100%;max-width:544px;margin-top:6px;display:flex;flex-direction:column;box-sizing:border-box;padding:10px 8px 10px max(0px,calc(var(--aia-content-inset-left, 16px) - 10px));overflow:hidden;container-type:inline-size;z-index:10;opacity:0;pointer-events:none;transform-origin:50% 0;transform:scaleY(var(--aia-dropdown-reveal-scale, .02));transition:opacity .4s cubic-bezier(.4,0,.2,1),transform 0s .4s;background:var(--aia-surface, #ffffff);border:1px solid var(--aia-dropdown-border, rgba(231, 231, 231, .5));border-radius:9px;box-shadow:var(--aia-dropdown-shadow, none)}.magicx-aia-dropdown:has([data-aia-datepicker]){max-width:var(--aia-date-panel-width, 312px)}.magicx-aia-dropdown[data-aia-surface=glass]{background:transparent;border-color:transparent;box-shadow:#fff -3.2px -3.2px 3.2px -3.2px inset,#fff 6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) -6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) 6.4px -6.4px 1.6px -8px inset,#ffffff26 -1.6px 0 0 -1.6px inset,#ffffff26 0 -1.6px 0 -1.6px inset,#ffffff4d 0 1.6px inset,#ffffff4d 1.6px 0 inset,inset 0 0 30px 5px #0000000d;backdrop-filter:blur(30px)}.magicx-aia-dropdown-visible{opacity:1;pointer-events:auto;transform:scaleY(1);transition:opacity .1s cubic-bezier(.4,0,.2,1),transform .32s cubic-bezier(.22,1.28,.36,1)}.magicx-aia-scroll-arrow{position:absolute;left:50%;bottom:var(--aia-scroll-arrow-bottom, 8px);z-index:4;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin:0 0 0 -16px;padding:0;border:0;border-radius:0;background:transparent;color:var( --aia-scroll-arrow-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );box-shadow:none;cursor:pointer;pointer-events:none;opacity:0;transition:opacity 1s cubic-bezier(.4,0,.2,1);animation:magicx-aia-scroll-arrow-bob 2.6s ease-in-out infinite}@keyframes magicx-aia-scroll-arrow-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}.magicx-aia-scroll-arrow[data-aia-visible]{pointer-events:auto;opacity:1}.magicx-aia-scroll-arrow:disabled{cursor:default}.magicx-aia-scroll-arrow svg{width:14px;height:14px;fill:none;stroke:currentColor}.magicx-aia-scroll-arrow svg path{fill:none;stroke:currentColor}.magicx-aia-scroll-arrow:hover{color:var( --aia-scroll-arrow-color-hover, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}@media (prefers-reduced-motion: reduce){.magicx-aia-scroll-arrow,.magicx-aia-dropdown{animation-duration:0s;animation-delay:0s;transition-duration:0s}}.magicx-aia-dropdown-pillbar{overflow:hidden}.magicx-aia-pill-scroll{display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%);-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%)}.magicx-aia-pill-scroll::-webkit-scrollbar{display:none}.magicx-aia-skip{display:inline-flex;align-items:center;margin-inline-start:auto;flex-shrink:0;padding:5px 8px;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:var(--aia-skip-font-size, 10px);line-height:18px;color:var(--aia-skip-color, var(--aia-footer-hint-color, #505050));cursor:pointer;white-space:nowrap;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-skip:hover{color:var(--aia-skip-color-hover, var(--aia-pill-color, var(--aia-color-text-muted, #c1c4cb)));background:var(--aia-skip-hover-bg, var(--aia-option-bg, transparent))}.magicx-aia-skip:disabled{pointer-events:none;cursor:default;opacity:.5}.magicx-aia-footer{display:flex;flex-direction:column;gap:8px;padding:var(--aia-footer-gap, 12px) 0 0 8px;position:relative;z-index:3;pointer-events:none}.magicx-aia-footer-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--aia-footer-row-min-height, var(--aia-footer-row-height, 23px))}.magicx-aia-footer-hint-group{display:inline-flex;align-items:center;gap:5px}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{pointer-events:auto}.magicx-aia-footer-brand-link{display:inline-flex;align-items:center;gap:2px;text-decoration:none;cursor:pointer;transition:opacity .15s ease-out}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{background:var( --aia-footer-chip-bg, color-mix(in srgb, var(--aia-surface, #ffffff) 65%, transparent) );padding-inline:4px;border-radius:6px}.magicx-aia-footer-brand-link{background:var(--aia-footer-brand-pill-bg, var(--aia-surface, #ffffff));border-radius:999px;padding:2px 4px;gap:4px}.magicx-aia-footer-brand-link:hover{opacity:.7}.magicx-aia-footer-key{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:22px;padding:2px 6px;border:.5px solid var(--aia-footer-hint-color, #505050);border-radius:5px;font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-hint{font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-brand{font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}.magicx-aia-footer-badge{display:inline-flex;align-items:center;height:var(--aia-footer-row-height, 23px);padding:2.5px 5.5px;border:.5px solid var(--aia-footer-badge-border, rgba(189, 189, 189, .51));border-radius:999px;font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}@media (max-width: 768px){.magicx-aia-footer-hint-group{display:none}.magicx-aia-footer-row{justify-content:flex-end}}.magicx-aia-dropdown-skeleton-bars{display:flex;flex-direction:column;gap:20px;padding:7px 8px;animation:aiaSkeletonBarsIn .1s ease-out}[data-aia-skeleton-exiting] .magicx-aia-dropdown-skeleton-bars{animation:aiaSkeletonBarsOut .1s ease-in forwards}@keyframes aiaSkeletonBarsOut{to{opacity:0}}@keyframes aiaSkeletonBarsIn{0%{opacity:0}}.magicx-aia-dropdown-skeleton-bar{display:block;height:14px;border-radius:999px;background:var(--aia-skeleton-bg, var(--aia-pill-bg, rgba(189, 189, 189, .25)));opacity:.5;animation:aiaDropdownSkeletonPulse 1.4s ease-in-out infinite}.magicx-aia-dropdown-skeleton-bar:nth-child(2){animation-delay:.15s}.magicx-aia-dropdown-skeleton-bar:nth-child(3){animation-delay:.3s}@keyframes aiaDropdownSkeletonPulse{0%,to{opacity:.5}50%{opacity:.25}}\n"] }]
1381
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n *ngIf=\"vm$ | async as vm\"\n #dropdownRoot\n [id]=\"controller.listboxId\"\n role=\"listbox\"\n data-aia-dropdown=\"\"\n [attr.data-aia-loading]=\"vm.isLoading ? '' : null\"\n [attr.data-aia-skeleton-exiting]=\"vm.skeletonExiting ? '' : null\"\n [attr.data-mode]=\"resolvedMode\"\n [attr.data-options-position]=\"vm.optionsPosition\"\n [attr.data-aia-has-products]=\"vm.products.length > 0 ? '' : null\"\n [class]=\"rootClass\"\n [class.magicx-aia-dropdown-visible]=\"vm.isVisible\"\n (mousedown)=\"preventBlur($event)\"\n>\n <aia-stack space=\"8px\">\n <aia-cluster\n *ngIf=\"vm.showsPills || vm.showsSkip\"\n class=\"magicx-aia-dropdown-pillbar\"\n data-aia-pillbar=\"\"\n [noWrap]=\"true\"\n >\n <!-- The scroll + right-edge fade live on this wrapper (not the bar) so\n the skip button stays outside the masked region \u2014 pinned and fully\n opaque while overflowing pills fade under it. Absent in a skip-only\n row (pills rendered elsewhere via pillPlacement inline/hidden). -->\n <span *ngIf=\"vm.showsPills\" class=\"magicx-aia-pill-scroll\" data-aia-pill-scroll=\"\">\n <aia-pill-list\n [pills]=\"vm.pills\"\n [activePillIndex]=\"0\"\n [activeSelected]=\"vm.isActivePillSelected\"\n [rounded]=\"true\"\n [loading]=\"vm.isLoading\"\n (selectPill)=\"onPillClick($event)\"\n ></aia-pill-list>\n </span>\n <button\n *ngIf=\"vm.showsSkip\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-skip\"\n data-aia-skip=\"\"\n [disabled]=\"vm.skipDisabled\"\n [attr.aria-label]=\"\n vm.activePillLabel ? vm.strings.skipLabel + ' ' + vm.activePillLabel : vm.strings.skipLabel\n \"\n (click)=\"onSkip()\"\n >\n {{ vm.strings.skip }}\n </button>\n </aia-cluster>\n\n <aia-suggestion-grid\n *ngIf=\"vm.showsOptions\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [loading]=\"vm.isLoading\"\n [groupKey]=\"vm.groupKey\"\n [optionsPosition]=\"vm.optionsPosition\"\n [showIcons]=\"vm.showOptionIcons\"\n [showImages]=\"vm.showOptionImages\"\n [showCounts]=\"vm.showOptionCounts\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n ></aia-suggestion-grid>\n\n <aia-date-grid\n *ngIf=\"vm.showsDateGrid\"\n [options]=\"vm.options\"\n [activeIndex]=\"vm.activeIndex\"\n [listboxId]=\"controller.listboxId\"\n [view]=\"vm.dateView\"\n [selection]=\"vm.dateSelection\"\n (select)=\"onSelect($event)\"\n (highlight)=\"onHighlight($event)\"\n (unhighlight)=\"onUnhighlight($event)\"\n (previousMonth)=\"onPreviousMonth()\"\n (nextMonth)=\"onNextMonth()\"\n ></aia-date-grid>\n\n <div\n *ngIf=\"vm.showsFallbackSkeleton\"\n class=\"magicx-aia-dropdown-skeleton-bars\"\n data-aia-skeleton-bars=\"\"\n >\n <span\n *ngFor=\"let w of fallbackSkeletonBarWidths; trackBy: trackByWidth\"\n class=\"magicx-aia-dropdown-skeleton-bar\"\n [style.width.px]=\"w\"\n ></span>\n </div>\n\n <!-- *ngIf, not just the section's own guard inside the component: the host\n element is an in-flow child of .aia-stack (display:flex; gap:8px), so\n an always-instantiated zero-height host would add a SECOND 8px gap\n between the grid and the footer \u2014 in every dropdown, products or not.\n The grid's --aia-grid-overlap-bottom is tuned for exactly one gap, so\n the footer would land 8px below the band it is meant to cover. -->\n <aia-product-strip\n *ngIf=\"vm.products.length > 0\"\n [products]=\"vm.products\"\n [listboxId]=\"controller.listboxId\"\n [focusable]=\"vm.isVisible\"\n [layout]=\"productsLayout\"\n [imageFallback]=\"productImageFallback\"\n [strings]=\"vm.strings\"\n [addToCart]=\"vm.hasProductAddToCart ? addProductToCart : null\"\n (select)=\"onProductSelect($event)\"\n (focusChange)=\"onProductFocusChange($event)\"\n ></aia-product-strip>\n\n <footer class=\"magicx-aia-footer\" data-aia-footer=\"\">\n <div class=\"magicx-aia-footer-row\">\n <span class=\"magicx-aia-footer-hint-group\">\n <kbd class=\"magicx-aia-footer-key\">{{ vm.footerKey }}</kbd>\n <span class=\"magicx-aia-footer-hint\">{{ vm.footerHint }}</span>\n </span>\n <a\n class=\"magicx-aia-footer-brand-link\"\n [href]=\"brandHref\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span class=\"magicx-aia-footer-brand\">AI</span>\n <span class=\"magicx-aia-footer-badge\">Autocomplete</span>\n </a>\n </div>\n </footer>\n </aia-stack>\n <!-- \"More below\" arrow \u2014 an overlay on the panel, not a section of the\n stack. Shown/positioned by the core's scroll-arrow controller (see\n syncScrollArrow); markup mirrors vanilla's createScrollArrowButton. -->\n <button\n #scrollArrow\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-scroll-arrow\"\n data-aia-scroll-arrow=\"\"\n [attr.aria-label]=\"scrollArrowLabel\"\n aria-hidden=\"true\"\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M4 6.5 8 10.5l4-4\" />\n </svg>\n </button>\n</div>\n", styles: [":where(.magicx-aia){box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html),:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):before,:where([data-aia-input-wrapper],[data-aia-input-wrapper] *,[data-aia-dropdown],[data-aia-dropdown] *):not(:where(svg,svg *,[data-aia-submit-slot],[data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html):after{all:revert;box-sizing:border-box}:where([data-aia-input-wrapper],[data-aia-dropdown]):not(html):not(html):not(html):not(html):not(html){line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;text-shadow:none;font-style:normal;font-variant:normal;white-space:normal;visibility:visible;cursor:auto}:where([data-aia-input-wrapper] svg,[data-aia-dropdown] svg):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){display:revert;vertical-align:revert;position:revert;inset:revert;float:revert;margin:revert;padding:revert;border:revert;border-radius:revert;outline:revert;background:revert;box-shadow:revert;min-width:revert;max-width:revert;min-height:revert;max-height:revert;flex:revert;transition:revert;animation:revert;rotate:revert;scale:revert;translate:revert}:where([data-aia-input-wrapper] svg *,[data-aia-dropdown] svg *):not(:where([data-aia-submit-slot] *)):not(html):not(html):not(html):not(html):not(html){transition:revert;animation:revert}:where(.magicx-aia){--aia-primitive-neutral-0: #000000;--aia-primitive-neutral-150: #1a1b1d;--aia-primitive-neutral-250: #323232;--aia-primitive-neutral-300: #333539;--aia-primitive-neutral-400: #4a4a4a;--aia-primitive-neutral-500: #505050;--aia-primitive-neutral-700: #b0b0b0;--aia-primitive-neutral-750: #bdbdbd;--aia-primitive-neutral-900: #e7e7e7;--aia-primitive-neutral-1000: #ffffff;--aia-primitive-blue-50: #eef2ff;--aia-primitive-neutral-750-a50: rgba(189, 189, 189, .51);--aia-primitive-neutral-750-a25: rgba(189, 189, 189, .25);--aia-primitive-neutral-750-a8: rgba(189, 189, 189, .083);--aia-primitive-neutral-750-a35: rgba(189, 189, 189, .35);--aia-primitive-neutral-750-a30: rgba(189, 189, 189, .3);--aia-primitive-neutral-750-a15: rgba(189, 189, 189, .15);--aia-primitive-neutral-750-a105: rgba(189, 189, 189, .105);--aia-primitive-neutral-700-a40: rgba(176, 176, 176, .4);--aia-primitive-neutral-900-a50: rgba(231, 231, 231, .5);--aia-primitive-neutral-400-a50: rgba(74, 74, 74, .5)}:where(.magicx-aia),:where(.magicx-aia[data-mode=\"light\"]){--aia-surface: var(--aia-primitive-neutral-1000);--aia-border: var(--aia-primitive-neutral-700);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-900-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-300);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #b84549;--aia-smart-suggestion-glint: #f3c4c5;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a105);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-0);--aia-option-bg: var(--aia-primitive-blue-50);--aia-option-color: var(--aia-primitive-neutral-150);--aia-option-color-selected: var(--aia-primitive-neutral-0);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-0);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #000000);--aia-submit-bg: var(--aia-primitive-neutral-0);--aia-submit-color: var(--aia-primitive-neutral-1000);--aia-color-text-muted: #6b7280;--aia-skeleton-bg: var(--aia-primitive-neutral-750-a8);--aia-streak-rgb: 99, 102, 241;--aia-footer-hint-color: var(--aia-primitive-neutral-500);--aia-footer-brand-color: var(--aia-primitive-neutral-700);--aia-footer-badge-border: var(--aia-primitive-neutral-750-a50)}:where(.magicx-aia[data-mode=\"dark\"]){--aia-surface: var(--aia-primitive-neutral-0);--aia-border: var(--aia-primitive-neutral-500);--aia-shadow: none;--aia-dropdown-border: var(--aia-primitive-neutral-400-a50);--aia-dropdown-shadow: none;--aia-pill-bg: var(--aia-primitive-neutral-750);--aia-pill-color: var(--aia-primitive-neutral-700);--aia-pill-font-size: 16px;--aia-smart-suggestion-accent: #e0787b;--aia-smart-suggestion-glint: #ffe1e1;--aia-completed-pill-bg: var(--aia-primitive-neutral-750-a15);--aia-completed-pill-bg-active: var(--aia-primitive-neutral-750-a35);--aia-completed-pill-color: var(--aia-primitive-neutral-1000);--aia-option-bg: var(--aia-primitive-neutral-250);--aia-option-color: var(--aia-primitive-neutral-900);--aia-option-color-selected: var(--aia-primitive-neutral-1000);--aia-option-font-size: 16px;--aia-written-text-color: var(--aia-primitive-neutral-1000);--aia-written-text-font-size: 16px;--aia-caret-color: var(--aia-written-text-color, #ffffff);--aia-submit-bg: var(--aia-primitive-neutral-1000);--aia-submit-color: var(--aia-primitive-neutral-0);--aia-color-text-muted: #c1c4cb;--aia-skeleton-bg: var(--aia-primitive-neutral-150);--aia-streak-rgb: 255, 255, 255;--aia-footer-hint-color: var(--aia-primitive-neutral-700);--aia-footer-brand-color: var(--aia-primitive-neutral-500);--aia-footer-badge-border: var(--aia-primitive-neutral-500)}[data-aia-dropdown]{--aia-footer-row-height: 23px;--aia-footer-band: calc(var(--aia-footer-gap, 12px) + var(--aia-footer-row-height, 23px));--aia-grid-scroll-bottom: var(--aia-footer-band);--aia-grid-overlap-bottom: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-lead: 20px;--aia-footer-fade-inset: calc(-1 * var(--aia-footer-fade-lead)) 0 0}[data-aia-dropdown] [data-aia-pillbar] .aia-pill-list{padding-inline:10px}[data-aia-dropdown] [data-aia-pillbar] .aia-pill{justify-content:flex-start;border-inline-width:0;padding-inline:0}[data-aia-dropdown] .aia-grid[data-scroll]{padding-top:var(--aia-grid-scroll-top, 0);padding-bottom:var(--aia-grid-scroll-bottom, 0);margin-top:var(--aia-grid-overlap-top, 0);margin-bottom:var(--aia-grid-overlap-bottom, 0)}[data-aia-dropdown] [data-aia-footer]:before{content:\"\";position:absolute;inset:var(--aia-footer-fade-inset, -20px 0 0);z-index:-1;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}[data-aia-dropdown][data-aia-surface=glass]{--aia-footer-chip-bg: transparent}[data-aia-dropdown][data-aia-surface=glass] [data-aia-footer]:before{display:none}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown],[data-aia-dropdown][data-options-position=above]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: var(--aia-footer-band);--aia-grid-overlap-top: calc(-1 * (var(--aia-footer-band) + 8px));--aia-footer-fade-inset: 0 0 calc(-1 * var(--aia-footer-fade-lead));transform-origin:50% 100%;top:auto;bottom:100%;margin-top:0;margin-bottom:6px}[data-aia-dropdown][data-aia-has-products]{--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .aia-stack,[data-aia-dropdown][data-options-position=above] .aia-stack{flex-direction:column-reverse}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer],[data-aia-dropdown][data-options-position=above] [data-aia-footer]{padding:0 0 var(--aia-footer-gap, 12px) 8px}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before{background:linear-gradient(to top,transparent,var(--aia-surface, #ffffff) var(--aia-footer-fade-lead, 20px))}:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] .magicx-aia-footer,[data-aia-dropdown][data-options-position=above] .magicx-aia-footer{flex-direction:column-reverse}@media (min-width: 769px){[data-aia-dropdown] [data-aia-footer]:before,[data-aia-dropdown][data-options-position=above] [data-aia-footer]:before,:where(.magicx-aia[data-options-position=\"above\"]) [data-aia-dropdown] [data-aia-footer]:before{inset:0;background:var(--aia-surface, #ffffff)}}[data-aia-dropdown][data-aia-fit]{max-height:var(--aia-dropdown-fit-height, none);--aia-grid-scroll-bottom: 0px;--aia-grid-overlap-bottom: 0px;--aia-grid-scroll-top: 0px;--aia-grid-overlap-top: 0px;--aia-footer-fade-lead: 0px;--aia-footer-row-min-height: 0px}[data-aia-dropdown][data-aia-fit]>.aia-stack{flex:1 1 auto;min-height:0;margin-inline:-6px;padding-inline:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}[data-aia-dropdown][data-aia-fit]>.aia-stack::-webkit-scrollbar{display:none}[data-aia-dropdown][data-aia-fit]>.aia-stack>*{flex-shrink:0}[data-aia-dropdown][data-aia-fit] .aia-grid[data-scroll]{max-height:none;overflow:visible}\n", ".magicx-aia-dropdown{position:absolute;left:0;right:0;top:100%;max-width:544px;margin-top:6px;display:flex;flex-direction:column;box-sizing:border-box;padding:10px 8px 10px max(0px,calc(var(--aia-content-inset-left, 16px) - 10px));overflow:hidden;container-type:inline-size;z-index:10;opacity:0;pointer-events:none;transform-origin:50% 0;transform:scaleY(var(--aia-dropdown-reveal-scale, .02));transition:opacity .4s cubic-bezier(.4,0,.2,1),transform 0s .4s;background:var(--aia-surface, #ffffff);border:1px solid var(--aia-dropdown-border, rgba(231, 231, 231, .5));border-radius:9px;box-shadow:var(--aia-dropdown-shadow, none)}.magicx-aia-dropdown:has([data-aia-datepicker]){max-width:var(--aia-date-panel-width, 312px)}.magicx-aia-dropdown[data-aia-surface=glass]{background:transparent;border-color:transparent;box-shadow:#fff -3.2px -3.2px 3.2px -3.2px inset,#fff 6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) -6.4px 6.4px 1.6px -8px inset,var(--aia-dropdown-bg, transparent) 6.4px -6.4px 1.6px -8px inset,#ffffff26 -1.6px 0 0 -1.6px inset,#ffffff26 0 -1.6px 0 -1.6px inset,#ffffff4d 0 1.6px inset,#ffffff4d 1.6px 0 inset,inset 0 0 30px 5px #0000000d;backdrop-filter:blur(30px)}.magicx-aia-dropdown-visible{opacity:1;pointer-events:auto;transform:scaleY(1);transition:opacity .1s cubic-bezier(.4,0,.2,1),transform .32s cubic-bezier(.22,1.28,.36,1)}.magicx-aia-scroll-arrow{position:absolute;left:50%;bottom:var(--aia-scroll-arrow-bottom, 8px);z-index:4;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin:0 0 0 -16px;padding:0;border:0;border-radius:0;background:transparent;color:var( --aia-scroll-arrow-color, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)) );box-shadow:none;cursor:pointer;pointer-events:none;opacity:0;transition:opacity 1s cubic-bezier(.4,0,.2,1);animation:magicx-aia-scroll-arrow-bob 2.6s ease-in-out infinite}@keyframes magicx-aia-scroll-arrow-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}.magicx-aia-scroll-arrow[data-aia-visible]{pointer-events:auto;opacity:1}.magicx-aia-scroll-arrow:disabled{cursor:default}.magicx-aia-scroll-arrow svg{width:14px;height:14px;fill:none;stroke:currentColor}.magicx-aia-scroll-arrow svg path{fill:none;stroke:currentColor}.magicx-aia-scroll-arrow:hover{color:var( --aia-scroll-arrow-color-hover, var(--aia-option-color-selected, var(--aia-color-text-default, #fff)) )}@media (prefers-reduced-motion: reduce){.magicx-aia-scroll-arrow,.magicx-aia-dropdown{animation-duration:0s;animation-delay:0s;transition-duration:0s}}.magicx-aia-dropdown-pillbar{overflow:hidden}.magicx-aia-pill-scroll{display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%);-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 48px),transparent 100%)}.magicx-aia-pill-scroll::-webkit-scrollbar{display:none}.magicx-aia-skip{display:inline-flex;align-items:center;margin-inline-start:auto;flex-shrink:0;padding:5px 8px;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:var(--aia-skip-font-size, 10px);line-height:18px;color:var(--aia-skip-color, var(--aia-footer-hint-color, #505050));cursor:pointer;white-space:nowrap;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-skip:hover{color:var(--aia-skip-color-hover, var(--aia-pill-color, var(--aia-color-text-muted, #c1c4cb)));background:var(--aia-skip-hover-bg, var(--aia-option-bg, transparent))}.magicx-aia-skip:disabled{pointer-events:none;cursor:default;opacity:.5}.magicx-aia-footer{display:flex;flex-direction:column;gap:8px;padding:var(--aia-footer-gap, 12px) 0 0 8px;position:relative;z-index:3;pointer-events:none}.magicx-aia-footer-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--aia-footer-row-min-height, var(--aia-footer-row-height, 23px))}.magicx-aia-footer-hint-group{display:inline-flex;align-items:center;gap:5px}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{pointer-events:auto}.magicx-aia-footer-brand-link{display:inline-flex;align-items:center;gap:2px;text-decoration:none;cursor:pointer;transition:opacity .15s ease-out}.magicx-aia-footer-hint-group,.magicx-aia-footer-brand-link{background:var( --aia-footer-chip-bg, color-mix(in srgb, var(--aia-surface, #ffffff) 65%, transparent) );padding-inline:4px;border-radius:6px}.magicx-aia-footer-brand-link{background:var(--aia-footer-brand-pill-bg, var(--aia-surface, #ffffff));border-radius:999px;padding:2px 4px;gap:4px}.magicx-aia-footer-brand-link:hover{opacity:.7}.magicx-aia-footer-key{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:22px;padding:2px 6px;border:.5px solid var(--aia-footer-hint-color, #505050);border-radius:5px;font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-hint{font-family:inherit;font-size:11px;line-height:18px;color:var(--aia-footer-hint-color, #505050)}.magicx-aia-footer-brand{font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}.magicx-aia-footer-badge{display:inline-flex;align-items:center;height:var(--aia-footer-row-height, 23px);padding:2.5px 5.5px;border:.5px solid var(--aia-footer-badge-border, rgba(189, 189, 189, .51));border-radius:999px;font-family:inherit;font-size:10px;line-height:18px;color:var(--aia-footer-brand-color, #b0b0b0)}@media (max-width: 768px){.magicx-aia-footer-hint-group{display:none}.magicx-aia-footer-row{justify-content:flex-end}}.magicx-aia-dropdown-skeleton-bars{display:flex;flex-direction:column;gap:20px;padding:7px 8px;animation:aiaSkeletonBarsIn .1s ease-out}[data-aia-skeleton-exiting] .magicx-aia-dropdown-skeleton-bars{animation:aiaSkeletonBarsOut .1s ease-in forwards}@keyframes aiaSkeletonBarsOut{to{opacity:0}}@keyframes aiaSkeletonBarsIn{0%{opacity:0}}.magicx-aia-dropdown-skeleton-bar{display:block;height:14px;border-radius:999px;background:var(--aia-skeleton-bg, var(--aia-pill-bg, rgba(189, 189, 189, .25)));opacity:.5;animation:aiaDropdownSkeletonPulse 1.4s ease-in-out infinite}.magicx-aia-dropdown-skeleton-bar:nth-child(2){animation-delay:.15s}.magicx-aia-dropdown-skeleton-bar:nth-child(3){animation-delay:.3s}@keyframes aiaDropdownSkeletonPulse{0%,to{opacity:.5}50%{opacity:.25}}\n"] }]
1270
1382
  }], propDecorators: { controller: [{
1271
1383
  type: Input
1272
1384
  }], showPills: [{
@@ -1344,6 +1456,7 @@ class AIAutocompleteController {
1344
1456
  // here and fold it into `dropdown$` so the dropdown can read placement from
1345
1457
  // the controller — configured once, kept in sync through update().
1346
1458
  this.optionsPosition$ = new BehaviorSubject("below");
1459
+ this.hasProductAddToCart$ = new BehaviorSubject(false);
1347
1460
  this.isDestroyed = false;
1348
1461
  if (typeof document === "undefined") {
1349
1462
  throw new Error("AIAutocompleteController requires a browser environment. " +
@@ -1352,7 +1465,10 @@ class AIAutocompleteController {
1352
1465
  // Headless mode never renders to the host, so a throwaway div is fine —
1353
1466
  // it's required by the core's signature for symmetry with full mode.
1354
1467
  const host = document.createElement("div");
1355
- this.core = new AIAutocomplete(host, Object.assign(Object.assign({}, opts), { renderMode: "headless", source: (_a = opts.source) !== null && _a !== void 0 ? _a : "headless-sdk",
1468
+ const { onProductAddToCart } = opts, coreOpts = __rest(opts, ["onProductAddToCart"]);
1469
+ this.productAddToCart = onProductAddToCart;
1470
+ this.hasProductAddToCart$.next(typeof onProductAddToCart === "function");
1471
+ this.core = new AIAutocomplete(host, Object.assign(Object.assign({}, coreOpts), { onProductAddToCart: (product) => { var _a; return (_a = this.productAddToCart) === null || _a === void 0 ? void 0 : _a.call(this, product); }, renderMode: "headless", source: (_a = opts.source) !== null && _a !== void 0 ? _a : "headless-sdk",
1356
1472
  // Headless mode never renders the dropdown DOM, but the keyboard
1357
1473
  // controller still reads `optionsPosition` to decide which vertical
1358
1474
  // arrow opens the dropdown from the input.
@@ -1420,7 +1536,11 @@ class AIAutocompleteController {
1420
1536
  // at the pre-click position.
1421
1537
  this.state$ = this.rawState$.pipe(map$1(computeState), shareReplay({ bufferSize: 1, refCount: true }));
1422
1538
  this.optionsPosition$.next((_c = opts.optionsPosition) !== null && _c !== void 0 ? _c : "below");
1423
- this.dropdown$ = combineLatest([this.rawState$, this.optionsPosition$]).pipe(map$1(([s, optionsPosition]) => computeDropdown(s, optionsPosition)), shareReplay({ bufferSize: 1, refCount: true }));
1539
+ this.dropdown$ = combineLatest([
1540
+ this.rawState$,
1541
+ this.optionsPosition$,
1542
+ this.hasProductAddToCart$,
1543
+ ]).pipe(map$1(([s, optionsPosition, hasCart]) => computeDropdown(s, optionsPosition, hasCart)), shareReplay({ bufferSize: 1, refCount: true }));
1424
1544
  }
1425
1545
  // === Read-only accessors ===
1426
1546
  /** Stable ARIA listbox ID for the dropdown. Pass to `<textarea aria-controls="...">`. */
@@ -1499,6 +1619,22 @@ class AIAutocompleteController {
1499
1619
  return;
1500
1620
  this.core.selectProduct(product);
1501
1621
  }
1622
+ /**
1623
+ * Add a product to the cart through `onProductAddToCart`.
1624
+ * `<ai-autocomplete-dropdown>`'s cart buttons call this for you; consumers
1625
+ * rendering their own strip call it themselves. Resolves once the handler's
1626
+ * promise settles and rejects with its error. Without a handler it does
1627
+ * nothing.
1628
+ */
1629
+ addProductToCart(product) {
1630
+ if (this.isDestroyed || !this.productAddToCart)
1631
+ return Promise.resolve();
1632
+ return this.core.addProductToCart(product);
1633
+ }
1634
+ /** Whether cards draw a cart button: an `onProductAddToCart` handler is set. */
1635
+ hasProductAddToCart() {
1636
+ return typeof this.productAddToCart === "function";
1637
+ }
1502
1638
  /** Promote the pill at `index` to active (front of the list). */
1503
1639
  setActivePill(index) {
1504
1640
  if (this.isDestroyed)
@@ -1631,12 +1767,19 @@ class AIAutocompleteController {
1631
1767
  * (`onSubmit`, `onResult`, `onError`, etc.) cannot be swapped this way — they are
1632
1768
  * registered once at construction (matches the React hook's design). For
1633
1769
  * dynamic event reactivity, subscribe to the corresponding observable
1634
- * (e.g. `text$` instead of `onChange`).
1770
+ * (e.g. `text$` instead of `onChange`). The exception is
1771
+ * `onProductAddToCart`, a handler rather than an event: passing the key sets,
1772
+ * swaps or (with `undefined`) removes it, and the cart buttons follow.
1635
1773
  */
1636
1774
  update(opts) {
1637
1775
  if (this.isDestroyed)
1638
1776
  return;
1639
- this.core.update(opts);
1777
+ const { onProductAddToCart } = opts, coreOpts = __rest(opts, ["onProductAddToCart"]);
1778
+ if ("onProductAddToCart" in opts) {
1779
+ this.productAddToCart = onProductAddToCart;
1780
+ this.hasProductAddToCart$.next(typeof onProductAddToCart === "function");
1781
+ }
1782
+ this.core.update(coreOpts);
1640
1783
  if (opts.optionsPosition !== undefined) {
1641
1784
  this.optionsPosition$.next(opts.optionsPosition);
1642
1785
  }
@@ -1703,7 +1846,7 @@ function computeState(s) {
1703
1846
  caretOffset: s.caretOffset,
1704
1847
  };
1705
1848
  }
1706
- function computeDropdown(s, optionsPosition) {
1849
+ function computeDropdown(s, optionsPosition, hasProductAddToCart) {
1707
1850
  var _a, _b;
1708
1851
  const editingParam = s.editingParam;
1709
1852
  const editingIdentified = s.editingIdentified;
@@ -1750,6 +1893,7 @@ function computeDropdown(s, optionsPosition) {
1750
1893
  selectedDateRange: dateSelection.selectedRange,
1751
1894
  dateRangeStart: dateSelection.rangeStart,
1752
1895
  optionsPosition,
1896
+ hasProductAddToCart,
1753
1897
  };
1754
1898
  }
1755
1899
 
@@ -2239,6 +2383,7 @@ class AIAutocompleteComponent {
2239
2383
  onParamsChange: (params) => this.completedParamsChange.emit(params),
2240
2384
  onFocus: () => this.focused.emit(),
2241
2385
  onProductSelect: (product) => this.productSelect.emit(product),
2386
+ onProductAddToCart: this.onProductAddToCart,
2242
2387
  onBlur: () => {
2243
2388
  this.blurred.emit();
2244
2389
  this.onTouchedFn();
@@ -2335,6 +2480,9 @@ class AIAutocompleteComponent {
2335
2480
  mapProducts: this.mapProducts,
2336
2481
  });
2337
2482
  }
2483
+ if (changes["onProductAddToCart"]) {
2484
+ this.controller.update({ onProductAddToCart: this.onProductAddToCart });
2485
+ }
2338
2486
  if (changes["mode"]) {
2339
2487
  // Keep the binding correct even when ModeController doesn't exist yet
2340
2488
  // (SSR / pre-ngAfterViewInit). On the browser, setMode triggers the
@@ -2537,7 +2685,7 @@ class AIAutocompleteComponent {
2537
2685
  }
2538
2686
  }
2539
2687
  AIAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2540
- AIAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIAutocompleteComponent, isStandalone: true, selector: "ai-autocomplete", inputs: { apiConfig: "apiConfig", additionalContext: "additionalContext", language: "language", currency: "currency", productId: "productId", visitorId: "visitorId", optionOverrides: "optionOverrides", maskCompletedText: "maskCompletedText", columns: "columns", pillPlacement: "pillPlacement", mode: "mode", optionsPosition: "optionsPosition", animations: "animations", dropdownTrigger: "dropdownTrigger", closeDropdownOnBlur: "closeDropdownOnBlur", showNonTappableOptions: "showNonTappableOptions", showSkipButton: "showSkipButton", showOptionIcons: "showOptionIcons", showOptionImages: "showOptionImages", showOptionCounts: "showOptionCounts", productsLayout: "productsLayout", productImageFallback: "productImageFallback", showChipIcons: "showChipIcons", showChipImages: "showChipImages", autoFocus: "autoFocus", value: "value", completedParams: "completedParams", showProducts: "showProducts", products: "products", mapProducts: "mapProducts", submitButton: "submitButton", resetOnSubmit: "resetOnSubmit" }, outputs: { submitted: "submitted", resultChange: "resultChange", errored: "errored", valueChange: "valueChange", completedParamsChange: "completedParamsChange", focused: "focused", blurred: "blurred", productSelect: "productSelect" }, providers: [
2688
+ AIAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIAutocompleteComponent, isStandalone: true, selector: "ai-autocomplete", inputs: { apiConfig: "apiConfig", additionalContext: "additionalContext", language: "language", currency: "currency", productId: "productId", visitorId: "visitorId", optionOverrides: "optionOverrides", maskCompletedText: "maskCompletedText", columns: "columns", pillPlacement: "pillPlacement", mode: "mode", optionsPosition: "optionsPosition", animations: "animations", dropdownTrigger: "dropdownTrigger", closeDropdownOnBlur: "closeDropdownOnBlur", showNonTappableOptions: "showNonTappableOptions", showSkipButton: "showSkipButton", showOptionIcons: "showOptionIcons", showOptionImages: "showOptionImages", showOptionCounts: "showOptionCounts", productsLayout: "productsLayout", productImageFallback: "productImageFallback", showChipIcons: "showChipIcons", showChipImages: "showChipImages", autoFocus: "autoFocus", value: "value", completedParams: "completedParams", showProducts: "showProducts", products: "products", mapProducts: "mapProducts", onProductAddToCart: "onProductAddToCart", submitButton: "submitButton", resetOnSubmit: "resetOnSubmit" }, outputs: { submitted: "submitted", resultChange: "resultChange", errored: "errored", valueChange: "valueChange", completedParamsChange: "completedParamsChange", focused: "focused", blurred: "blurred", productSelect: "productSelect" }, providers: [
2541
2689
  {
2542
2690
  provide: NG_VALUE_ACCESSOR,
2543
2691
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
@@ -2621,6 +2769,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2621
2769
  type: Input
2622
2770
  }], mapProducts: [{
2623
2771
  type: Input
2772
+ }], onProductAddToCart: [{
2773
+ type: Input
2624
2774
  }], submitButton: [{
2625
2775
  type: Input
2626
2776
  }], resetOnSubmit: [{