vviinn-widgets 2.97.0 → 2.97.2

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.
Files changed (55) hide show
  1. package/dist/cjs/{emitRequestFiltersMore-8b713194.js → emitRequestFiltersMore-35a9fed4.js} +1 -1
  2. package/dist/cjs/{index-105aee62.js → index-3035bd2b.js} +1 -1
  3. package/dist/cjs/{package-c4d4f888.js → package-721c5a8c.js} +1 -1
  4. package/dist/cjs/search-filters_19.cjs.entry.js +4 -4
  5. package/dist/cjs/{search.store-d2b420fd.js → search.store-4593a19d.js} +9 -0
  6. package/dist/cjs/vviinn-carousel_8.cjs.entry.js +4 -4
  7. package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
  8. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -8
  9. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
  10. package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
  11. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +3 -3
  12. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +2 -7
  13. package/dist/collection/geometry/Rectangle.js +8 -0
  14. package/dist/esm/{emitRequestFiltersMore-3b8ae486.js → emitRequestFiltersMore-d84828f1.js} +1 -1
  15. package/dist/esm/{index-279b5fe1.js → index-60812b71.js} +1 -1
  16. package/dist/esm/{package-4ceb52bb.js → package-40e32dab.js} +1 -1
  17. package/dist/esm/search-filters_19.entry.js +4 -4
  18. package/dist/esm/{search.store-24896fcf.js → search.store-a11affa8.js} +9 -1
  19. package/dist/esm/vviinn-carousel_8.entry.js +4 -4
  20. package/dist/esm/vviinn-preloader.entry.js +1 -1
  21. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -8
  22. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  23. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  24. package/dist/esm/vviinn-vps-widget.entry.js +3 -3
  25. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +1 -4
  26. package/dist/types/geometry/Rectangle.d.ts +5 -0
  27. package/dist/vviinn-widgets/{p-91937557.entry.js → p-19671ffc.entry.js} +1 -1
  28. package/dist/vviinn-widgets/{p-67e72877.entry.js → p-1d31a842.entry.js} +1 -1
  29. package/dist/vviinn-widgets/{p-aad518d7.js → p-25a4ca73.js} +1 -1
  30. package/dist/vviinn-widgets/{p-263f64ad.entry.js → p-299751a4.entry.js} +1 -1
  31. package/{www/build/p-e3199f82.entry.js → dist/vviinn-widgets/p-3bada1d3.entry.js} +1 -1
  32. package/{www/build/p-042b091b.js → dist/vviinn-widgets/p-43242068.js} +1 -1
  33. package/{www/build/p-707f4189.js → dist/vviinn-widgets/p-57e0dbdb.js} +1 -1
  34. package/dist/vviinn-widgets/{p-926b0a0f.entry.js → p-cd704fa1.entry.js} +1 -1
  35. package/dist/vviinn-widgets/p-df78d39a.js +1 -0
  36. package/{www/build/p-fb2e2d42.entry.js → dist/vviinn-widgets/p-e2f8874f.entry.js} +1 -1
  37. package/dist/vviinn-widgets/p-e61fa361.entry.js +1 -0
  38. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  39. package/package.json +1 -1
  40. package/www/build/{p-91937557.entry.js → p-19671ffc.entry.js} +1 -1
  41. package/www/build/{p-67e72877.entry.js → p-1d31a842.entry.js} +1 -1
  42. package/www/build/{p-aad518d7.js → p-25a4ca73.js} +1 -1
  43. package/www/build/{p-263f64ad.entry.js → p-299751a4.entry.js} +1 -1
  44. package/{dist/vviinn-widgets/p-e3199f82.entry.js → www/build/p-3bada1d3.entry.js} +1 -1
  45. package/{dist/vviinn-widgets/p-042b091b.js → www/build/p-43242068.js} +1 -1
  46. package/{dist/vviinn-widgets/p-707f4189.js → www/build/p-57e0dbdb.js} +1 -1
  47. package/www/build/{p-926b0a0f.entry.js → p-cd704fa1.entry.js} +1 -1
  48. package/www/build/p-df78d39a.js +1 -0
  49. package/{dist/vviinn-widgets/p-fb2e2d42.entry.js → www/build/p-e2f8874f.entry.js} +1 -1
  50. package/www/build/p-e61fa361.entry.js +1 -0
  51. package/www/build/vviinn-widgets.esm.js +1 -1
  52. package/dist/vviinn-widgets/p-6963f7bf.entry.js +0 -1
  53. package/dist/vviinn-widgets/p-fc276eec.js +0 -1
  54. package/www/build/p-6963f7bf.entry.js +0 -1
  55. package/www/build/p-fc276eec.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const search_store = require('./search.store-d2b420fd.js');
3
+ const search_store = require('./search.store-4593a19d.js');
4
4
  const index = require('./index-4474431a.js');
5
5
 
6
6
  const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon" },
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const search_store = require('./search.store-d2b420fd.js');
3
+ const search_store = require('./search.store-4593a19d.js');
4
4
 
5
5
  const consoleLogger = {
6
6
  type: 'logger',
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "2.97.0";
3
+ const version = "2.97.2";
4
4
 
5
5
  exports.version = version;
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const search_store = require('./search.store-d2b420fd.js');
7
- const index$1 = require('./index-105aee62.js');
6
+ const search_store = require('./search.store-4593a19d.js');
7
+ const index$1 = require('./index-3035bd2b.js');
8
8
  const customizedSlots = require('./customized-slots-ee9418c1.js');
9
- const emitRequestFiltersMore = require('./emitRequestFiltersMore-8b713194.js');
10
- const _package = require('./package-c4d4f888.js');
9
+ const emitRequestFiltersMore = require('./emitRequestFiltersMore-35a9fed4.js');
10
+ const _package = require('./package-721c5a8c.js');
11
11
 
12
12
  const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13
13
  index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -16618,6 +16618,14 @@ const center = (r) => {
16618
16618
  y: r.y + r.height * 0.5,
16619
16619
  };
16620
16620
  };
16621
+ const isClickedInRectBound = (event, rect) => {
16622
+ const { clientX, clientY } = event;
16623
+ const inLeftBound = clientX >= rect.left;
16624
+ const inRightBound = clientX <= rect.right;
16625
+ const inTopBound = clientY >= rect.top;
16626
+ const inBottomBound = clientY <= rect.bottom;
16627
+ return inLeftBound && inRightBound && inTopBound && inBottomBound;
16628
+ };
16621
16629
 
16622
16630
  var FormMemberName;
16623
16631
  (function (FormMemberName) {
@@ -17440,6 +17448,7 @@ exports.fromImage = fromImage;
17440
17448
  exports.getApiPath = getApiPath;
17441
17449
  exports.getOrElse = getOrElse$1;
17442
17450
  exports.has = has;
17451
+ exports.isClickedInRectBound = isClickedInRectBound;
17443
17452
  exports.makeProductListingPageRequest = makeProductListingPageRequest;
17444
17453
  exports.makeRectangularSearchRequest = makeRectangularSearchRequest;
17445
17454
  exports.makeRequest = makeRequest;
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const search_store = require('./search.store-d2b420fd.js');
6
+ const search_store = require('./search.store-4593a19d.js');
7
7
  const customizedSlots = require('./customized-slots-ee9418c1.js');
8
- const emitRequestFiltersMore = require('./emitRequestFiltersMore-8b713194.js');
9
- const index$1 = require('./index-105aee62.js');
10
- const _package = require('./package-c4d4f888.js');
8
+ const emitRequestFiltersMore = require('./emitRequestFiltersMore-35a9fed4.js');
9
+ const index$1 = require('./index-3035bd2b.js');
10
+ const _package = require('./package-721c5a8c.js');
11
11
 
12
12
  const BasketIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13
13
  index.h("g", { id: "shopping-bag" },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const search_store = require('./search.store-d2b420fd.js');
6
+ const search_store = require('./search.store-4593a19d.js');
7
7
 
8
8
  const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const search_store = require('./search.store-d2b420fd.js');
6
+ const search_store = require('./search.store-4593a19d.js');
7
7
 
8
8
  const CrossIcon = () => (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
9
9
  index.h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
@@ -61,16 +61,10 @@ const RecommendationsSidebar = class {
61
61
  }
62
62
  }
63
63
  bodyClickListener(event) {
64
- const { clientX, clientY } = event;
65
64
  const sidebarRect = this.getSidebarRectangle();
66
65
  if (!sidebarRect)
67
66
  return;
68
- const inLeftBound = clientX >= sidebarRect.left;
69
- const inRightBound = clientX <= sidebarRect.right;
70
- const inTopBound = clientY >= sidebarRect.top;
71
- const inBottomBound = clientY <= sidebarRect.bottom;
72
- const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
73
- if (!inBound) {
67
+ if (!search_store.isClickedInRectBound(event, sidebarRect)) {
74
68
  this.state = "closed";
75
69
  }
76
70
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const _package = require('./package-c4d4f888.js');
6
+ const _package = require('./package-721c5a8c.js');
7
7
 
8
8
  const SimilarProductsIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
9
9
  index.h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const _package = require('./package-c4d4f888.js');
6
+ const _package = require('./package-721c5a8c.js');
7
7
  const customizedSlots = require('./customized-slots-ee9418c1.js');
8
8
  const constants = require('./constants-7684cbfc.js');
9
9
 
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const search_store = require('./search.store-d2b420fd.js');
7
- const index$1 = require('./index-105aee62.js');
8
- const _package = require('./package-c4d4f888.js');
6
+ const search_store = require('./search.store-4593a19d.js');
7
+ const index$1 = require('./index-3035bd2b.js');
8
+ const _package = require('./package-721c5a8c.js');
9
9
  const customizedSlots = require('./customized-slots-ee9418c1.js');
10
10
  const constants = require('./constants-7684cbfc.js');
11
11
 
@@ -1,6 +1,7 @@
1
1
  import { Host, h, } from "@stencil/core";
2
2
  import { CrossIcon } from "../../vviinn-icons";
3
3
  import { searchState } from "../../../store/search.store";
4
+ import { isClickedInRectBound } from "../../../geometry/Rectangle";
4
5
  export class RecommendationsSidebar {
5
6
  constructor() {
6
7
  this.isSourceImageValid = () => { var _a; return !!((_a = searchState === null || searchState === void 0 ? void 0 : searchState.sourceProduct) === null || _a === void 0 ? void 0 : _a.image); };
@@ -50,16 +51,10 @@ export class RecommendationsSidebar {
50
51
  }
51
52
  }
52
53
  bodyClickListener(event) {
53
- const { clientX, clientY } = event;
54
54
  const sidebarRect = this.getSidebarRectangle();
55
55
  if (!sidebarRect)
56
56
  return;
57
- const inLeftBound = clientX >= sidebarRect.left;
58
- const inRightBound = clientX <= sidebarRect.right;
59
- const inTopBound = clientY >= sidebarRect.top;
60
- const inBottomBound = clientY <= sidebarRect.bottom;
61
- const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
62
- if (!inBound) {
57
+ if (!isClickedInRectBound(event, sidebarRect)) {
63
58
  this.state = "closed";
64
59
  }
65
60
  }
@@ -59,3 +59,11 @@ export const center = (r) => {
59
59
  y: r.y + r.height * 0.5,
60
60
  };
61
61
  };
62
+ export const isClickedInRectBound = (event, rect) => {
63
+ const { clientX, clientY } = event;
64
+ const inLeftBound = clientX >= rect.left;
65
+ const inRightBound = clientX <= rect.right;
66
+ const inTopBound = clientY >= rect.top;
67
+ const inBottomBound = clientY <= rect.bottom;
68
+ return inLeftBound && inRightBound && inTopBound && inBottomBound;
69
+ };
@@ -1,4 +1,4 @@
1
- import { _ as _function, E as Either } from './search.store-24896fcf.js';
1
+ import { _ as _function, E as Either } from './search.store-a11affa8.js';
2
2
  import { h, F as Fragment } from './index-abf408d8.js';
3
3
 
4
4
  const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon" },
@@ -1,4 +1,4 @@
1
- import { e as commonjsGlobal, i as createCommonjsModule } from './search.store-24896fcf.js';
1
+ import { e as commonjsGlobal, i as createCommonjsModule } from './search.store-a11affa8.js';
2
2
 
3
3
  const consoleLogger = {
4
4
  type: 'logger',
@@ -1,3 +1,3 @@
1
- const version = "2.97.0";
1
+ const version = "2.97.2";
2
2
 
3
3
  export { version as v };
@@ -1,9 +1,9 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { s as searchState, _ as _function, O as Option, k as fromAlt, l as foldValueObject, n as scaleWithSized, o as center, q as makeRectangularSearchRequest, r as detectedObjectEq, u as toFile, v as processSelectedFile, E as Either, w as match, i as createCommonjsModule, e as commonjsGlobal, x as sequenceToOption, y as fromImage, z as dimensionsFromImage, B as scaleByLargestSide, d as state, C as makeSearchIdRequest, D as getOrElse, F as makeTextSearchRequest, G as makeSearchQueryRequest, H as makeProductListingPageRequest, N as NonEmptyArray } from './search.store-24896fcf.js';
3
- import { i as instance, r as resources, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-279b5fe1.js';
2
+ import { s as searchState, _ as _function, O as Option, l as fromAlt, n as foldValueObject, o as scaleWithSized, q as center, r as makeRectangularSearchRequest, u as detectedObjectEq, v as toFile, w as processSelectedFile, E as Either, x as match, i as createCommonjsModule, e as commonjsGlobal, y as sequenceToOption, z as fromImage, B as dimensionsFromImage, C as scaleByLargestSide, d as state, D as makeSearchIdRequest, F as getOrElse, G as makeTextSearchRequest, H as makeSearchQueryRequest, I as makeProductListingPageRequest, N as NonEmptyArray } from './search.store-a11affa8.js';
3
+ import { i as instance, r as resources, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-60812b71.js';
4
4
  import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-7fa3856f.js';
5
- import { d as PlusIcon, c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, a as showActiveOnSubButton, R as RenderButton } from './emitRequestFiltersMore-3b8ae486.js';
6
- import { v as version } from './package-4ceb52bb.js';
5
+ import { d as PlusIcon, c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, a as showActiveOnSubButton, R as RenderButton } from './emitRequestFiltersMore-d84828f1.js';
6
+ import { v as version } from './package-40e32dab.js';
7
7
 
8
8
  const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
9
9
  h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -16616,6 +16616,14 @@ const center = (r) => {
16616
16616
  y: r.y + r.height * 0.5,
16617
16617
  };
16618
16618
  };
16619
+ const isClickedInRectBound = (event, rect) => {
16620
+ const { clientX, clientY } = event;
16621
+ const inLeftBound = clientX >= rect.left;
16622
+ const inRightBound = clientX <= rect.right;
16623
+ const inTopBound = clientY >= rect.top;
16624
+ const inBottomBound = clientY <= rect.bottom;
16625
+ return inLeftBound && inRightBound && inTopBound && inBottomBound;
16626
+ };
16619
16627
 
16620
16628
  var FormMemberName;
16621
16629
  (function (FormMemberName) {
@@ -17416,4 +17424,4 @@ const processSelectedFile = async (file, fromTextSearch = false, token, apiPath)
17416
17424
  return session;
17417
17425
  };
17418
17426
 
17419
- export { Apply as A, scaleByLargestSide as B, makeSearchIdRequest as C, getOrElse$1 as D, Either as E, makeTextSearchRequest as F, makeSearchQueryRequest as G, makeProductListingPageRequest as H, NonEmptyArray as N, Option as O, Semigroup$1 as S, TaskEither as T, _function as _, _Array as a, createInitPostRequest as b, chainW as c, state$1 as d, commonjsGlobal as e, fromEither as f, getApiPath as g, has as h, createCommonjsModule as i, parseExcludedToParams as j, fromAlt as k, foldValueObject as l, makeRequest as m, scaleWithSized as n, center as o, pipe as p, makeRectangularSearchRequest as q, detectedObjectEq as r, searchState as s, tuple as t, toFile as u, processSelectedFile as v, match$1 as w, sequenceToOption as x, fromImage as y, dimensionsFromImage as z };
17427
+ export { Apply as A, dimensionsFromImage as B, scaleByLargestSide as C, makeSearchIdRequest as D, Either as E, getOrElse$1 as F, makeTextSearchRequest as G, makeSearchQueryRequest as H, makeProductListingPageRequest as I, NonEmptyArray as N, Option as O, Semigroup$1 as S, TaskEither as T, _function as _, _Array as a, createInitPostRequest as b, chainW as c, state$1 as d, commonjsGlobal as e, fromEither as f, getApiPath as g, has as h, createCommonjsModule as i, isClickedInRectBound as j, parseExcludedToParams as k, fromAlt as l, makeRequest as m, foldValueObject as n, scaleWithSized as o, pipe as p, center as q, makeRectangularSearchRequest as r, searchState as s, tuple as t, detectedObjectEq as u, toFile as v, processSelectedFile as w, match$1 as x, sequenceToOption as y, fromImage as z };
@@ -1,9 +1,9 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-abf408d8.js';
2
- import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither, E as Either } from './search.store-24896fcf.js';
2
+ import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither, E as Either } from './search.store-a11affa8.js';
3
3
  import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton, f as fromString, a as fold } from './customized-slots-7fa3856f.js';
4
- import { c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, C as CheckFilterIcon, S as SquareFilterIcon, a as showActiveOnSubButton, R as RenderButton, b as ResponsiveImage, I as Image, L as Linked, P as Price, p as parseBasePrice } from './emitRequestFiltersMore-3b8ae486.js';
5
- import { i as instance, r as resources, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-279b5fe1.js';
6
- import { v as version } from './package-4ceb52bb.js';
4
+ import { c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, C as CheckFilterIcon, S as SquareFilterIcon, a as showActiveOnSubButton, R as RenderButton, b as ResponsiveImage, I as Image, L as Linked, P as Price, p as parseBasePrice } from './emitRequestFiltersMore-d84828f1.js';
5
+ import { i as instance, r as resources, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-60812b71.js';
6
+ import { v as version } from './package-40e32dab.js';
7
7
 
8
8
  const BasketIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
9
9
  h("g", { id: "shopping-bag" },
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-abf408d8.js';
2
- import { s as searchState } from './search.store-24896fcf.js';
2
+ import { s as searchState } from './search.store-a11affa8.js';
3
3
 
4
4
  const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { s as searchState } from './search.store-24896fcf.js';
2
+ import { s as searchState, j as isClickedInRectBound } from './search.store-a11affa8.js';
3
3
 
4
4
  const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
5
5
  h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
@@ -57,16 +57,10 @@ const RecommendationsSidebar = class {
57
57
  }
58
58
  }
59
59
  bodyClickListener(event) {
60
- const { clientX, clientY } = event;
61
60
  const sidebarRect = this.getSidebarRectangle();
62
61
  if (!sidebarRect)
63
62
  return;
64
- const inLeftBound = clientX >= sidebarRect.left;
65
- const inRightBound = clientX <= sidebarRect.right;
66
- const inTopBound = clientY >= sidebarRect.top;
67
- const inBottomBound = clientY <= sidebarRect.bottom;
68
- const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
69
- if (!inBound) {
63
+ if (!isClickedInRectBound(event, sidebarRect)) {
70
64
  this.state = "closed";
71
65
  }
72
66
  }
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { v as version } from './package-4ceb52bb.js';
2
+ import { v as version } from './package-40e32dab.js';
3
3
 
4
4
  const SimilarProductsIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
5
5
  h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { v as version } from './package-4ceb52bb.js';
2
+ import { v as version } from './package-40e32dab.js';
3
3
  import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-7fa3856f.js';
4
4
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { s as searchState, d as state, j as parseExcludedToParams, O as Option } from './search.store-24896fcf.js';
3
- import { i as instance, r as resources, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-279b5fe1.js';
4
- import { v as version } from './package-4ceb52bb.js';
2
+ import { s as searchState, d as state, k as parseExcludedToParams, O as Option } from './search.store-a11affa8.js';
3
+ import { i as instance, r as resources, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-60812b71.js';
4
+ import { v as version } from './package-40e32dab.js';
5
5
  import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-7fa3856f.js';
6
6
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
7
7
 
@@ -4,11 +4,8 @@ import { BasicEventData } from "../../../recommendation/events";
4
4
  import { CampaignName } from "../../../campaign/Campaign";
5
5
  import { Locale } from "../../../locale";
6
6
  import { UpdateButtonLocation } from "../../vviinn-vpr-widget/vviinn-vpr-widget";
7
+ import { ClickEvent } from "../../../geometry/Rectangle";
7
8
  type SidebarState = "idle" | "open" | "closed";
8
- type ClickEvent = Event & {
9
- clientX: number;
10
- clientY: number;
11
- };
12
9
  export declare class RecommendationsSidebar {
13
10
  el: HTMLElement;
14
11
  sidebarTitle: string;
@@ -2,6 +2,10 @@ import { Point } from "./Point";
2
2
  import { Sized } from "./Sized";
3
3
  import { RectangleAlt } from "./RectangleAlt";
4
4
  export type Rectangle = Point & Sized;
5
+ export type ClickEvent = Event & {
6
+ clientX: number;
7
+ clientY: number;
8
+ };
5
9
  export declare const move: (origin: Rectangle, position: Point) => Rectangle;
6
10
  export declare const fromImage: (image: HTMLImageElement) => Rectangle;
7
11
  export declare const fromNaturalImage: (image: HTMLImageElement) => Rectangle;
@@ -11,3 +15,4 @@ export declare const fromAlt: (r: RectangleAlt) => Rectangle;
11
15
  export declare const scaleWithSized: (s: Sized) => (r: Rectangle) => Rectangle;
12
16
  export declare const divideOnSized: (s: Sized) => (r: Rectangle) => Rectangle;
13
17
  export declare const center: (r: Rectangle) => Point;
18
+ export declare const isClickedInRectBound: (event: ClickEvent, rect: DOMRect) => boolean;
@@ -1 +1 @@
1
- import{h as i,r as t,c as s,H as h,g as n}from"./p-1c863deb.js";import{v as l}from"./p-fc276eec.js";const e=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},i("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z",fill:"#161616"}),i("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z",fill:"#161616"}),i("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z",fill:"#161616"}),i("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z",fill:"#161616"}),i("path",{d:"M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z",fill:"#161616"}),i("path",{d:"M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z",fill:"#161616"}),i("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z",fill:"#161616"}),i("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z",fill:"#161616"})),C=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z",fill:"#161616"})),o=class{constructor(i){t(this,i),this.vviinnWidgetLoad=s(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=s(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.vviinnProductLoad=s(this,"vviinnProductLoad",7),this.vviinnProductClick=s(this,"vviinnProductClick",7),this.vviinnProductView=s(this,"vviinnProductView",7),this.vviinnResultLoad=s(this,"vviinnResultLoad",7),this.vviinnResultView=s(this,"vviinnResultView",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnAddToBasket=s(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)},this.token=void 0,this.productId=void 0,this.mode="continuity",this.campaigns="",this.excluded="",this.campaignType="VPR",this.locale="de-DE",this.color="",this.imageWidth=300,this.imageRatio=1,this.cssUrl=null,this.currencySign="€",this.pricePrefix="",this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.productDetailsNewTab=!1,this.productDetailsRedirect=!0,this.addToBasketShow=!1,this.showFilters=!1,this.setModeDiscounts="set"===this.mode?"5, 10, 15":"",this.updateButtonLocation="topAndItem",this.sidebarTitle="set"===this.mode?"":"Visually similar products",this.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.apiPath="https://api.vviinn.com"}render(){return i(h,{onClick:()=>{this.handleClick()},role:"button",tabindex:"0"},i("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},i("slot",null,i("VCS"===this.campaignType?C:e,null))))}handleClick(){const i=document.createElement("vviinn-recommendations-sidebar");i.sidebarTitle=this.sidebarTitle,i.productId=this.productId,i.token=this.token,i.position=this.position,i.widgetScrollbar=this.modalScrollbar,i.campaigns=this.campaigns,i.campaignType=this.campaignType,i.color=this.color,i.locale=this.locale,i.mode="right"===this.position?"grid":this.mode,i.imageWidth=this.imageWidth,i.currencySign=this.currencySign,i.pricePrefix=this.pricePrefix,i.apiPath=this.apiPath,i.buttonElementId=this.el.id,i.noResultText=this.noResultText,i.noResultShow=this.noResultShow,i.gridArrowsDynamic=this.gridArrowsDynamic,i.productDetailsNewTab=this.productDetailsNewTab,i.productDetailsRedirect=this.productDetailsRedirect,i.widgetVersion=l,i.showingInButton=!0,i.excluded=this.excluded,i.addToBasketShow=this.addToBasketShow,i.buttonChildren=this.el.children,i.showFilters=this.showFilters,i.cssUrl=this.cssUrl,i.imageRatio=this.imageRatio,i.setModeDiscounts=this.setModeDiscounts,i.updateButtonLocation=this.updateButtonLocation,this.sidebar=i,i.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar&&this.sidebar.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener)}get el(){return n(this)}};o.style=":host{display:block}";export{o as vviinn_vpr_button}
1
+ import{h as i,r as t,c as s,H as h,g as n}from"./p-1c863deb.js";import{v as l}from"./p-df78d39a.js";const C=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},i("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z",fill:"#161616"}),i("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z",fill:"#161616"}),i("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z",fill:"#161616"}),i("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z",fill:"#161616"}),i("path",{d:"M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z",fill:"#161616"}),i("path",{d:"M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z",fill:"#161616"}),i("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z",fill:"#161616"}),i("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z",fill:"#161616"})),e=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z",fill:"#161616"})),o=class{constructor(i){t(this,i),this.vviinnWidgetLoad=s(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=s(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.vviinnProductLoad=s(this,"vviinnProductLoad",7),this.vviinnProductClick=s(this,"vviinnProductClick",7),this.vviinnProductView=s(this,"vviinnProductView",7),this.vviinnResultLoad=s(this,"vviinnResultLoad",7),this.vviinnResultView=s(this,"vviinnResultView",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnAddToBasket=s(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)},this.token=void 0,this.productId=void 0,this.mode="continuity",this.campaigns="",this.excluded="",this.campaignType="VPR",this.locale="de-DE",this.color="",this.imageWidth=300,this.imageRatio=1,this.cssUrl=null,this.currencySign="€",this.pricePrefix="",this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.productDetailsNewTab=!1,this.productDetailsRedirect=!0,this.addToBasketShow=!1,this.showFilters=!1,this.setModeDiscounts="set"===this.mode?"5, 10, 15":"",this.updateButtonLocation="topAndItem",this.sidebarTitle="set"===this.mode?"":"Visually similar products",this.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.apiPath="https://api.vviinn.com"}render(){return i(h,{onClick:()=>{this.handleClick()},role:"button",tabindex:"0"},i("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},i("slot",null,i("VCS"===this.campaignType?e:C,null))))}handleClick(){const i=document.createElement("vviinn-recommendations-sidebar");i.sidebarTitle=this.sidebarTitle,i.productId=this.productId,i.token=this.token,i.position=this.position,i.widgetScrollbar=this.modalScrollbar,i.campaigns=this.campaigns,i.campaignType=this.campaignType,i.color=this.color,i.locale=this.locale,i.mode="right"===this.position?"grid":this.mode,i.imageWidth=this.imageWidth,i.currencySign=this.currencySign,i.pricePrefix=this.pricePrefix,i.apiPath=this.apiPath,i.buttonElementId=this.el.id,i.noResultText=this.noResultText,i.noResultShow=this.noResultShow,i.gridArrowsDynamic=this.gridArrowsDynamic,i.productDetailsNewTab=this.productDetailsNewTab,i.productDetailsRedirect=this.productDetailsRedirect,i.widgetVersion=l,i.showingInButton=!0,i.excluded=this.excluded,i.addToBasketShow=this.addToBasketShow,i.buttonChildren=this.el.children,i.showFilters=this.showFilters,i.cssUrl=this.cssUrl,i.imageRatio=this.imageRatio,i.setModeDiscounts=this.setModeDiscounts,i.updateButtonLocation=this.updateButtonLocation,this.sidebar=i,i.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar&&this.sidebar.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener)}get el(){return n(this)}};o.style=":host{display:block}";export{o as vviinn_vpr_button}
@@ -1 +1 @@
1
- import{h as t,r as i,c as e,F as s,H as o,g as r}from"./p-1c863deb.js";import{s as a,d as n,j as l,O as c}from"./p-042b091b.js";import{i as h,r as p,k as d,l as g,v as u,c as f,m as v}from"./p-707f4189.js";import{v as b}from"./p-fc276eec.js";import{c as m,s as x,S as y}from"./p-499b1c72.js";import{D as w}from"./p-cc013cd2.js";const C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M12 17.5C13.25 17.5 14.3125 17.0625 15.1875 16.1875C16.0625 15.3125 16.5 14.25 16.5 13C16.5 11.75 16.0625 10.6875 15.1875 9.8125C14.3125 8.9375 13.25 8.5 12 8.5C10.75 8.5 9.6875 8.9375 8.8125 9.8125C7.9375 10.6875 7.5 11.75 7.5 13C7.5 14.25 7.9375 15.3125 8.8125 16.1875C9.6875 17.0625 10.75 17.5 12 17.5ZM12 15.5C11.3 15.5 10.7083 15.2583 10.225 14.775C9.74167 14.2917 9.5 13.7 9.5 13C9.5 12.3 9.74167 11.7083 10.225 11.225C10.7083 10.7417 11.3 10.5 12 10.5C12.7 10.5 13.2917 10.7417 13.775 11.225C14.2583 11.7083 14.5 12.3 14.5 13C14.5 13.7 14.2583 14.2917 13.775 14.775C13.2917 15.2583 12.7 15.5 12 15.5ZM4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V7C2 6.45 2.19583 5.97917 2.5875 5.5875C2.97917 5.19583 3.45 5 4 5H7.15L8.4 3.65C8.58333 3.45 8.80417 3.29167 9.0625 3.175C9.32083 3.05833 9.59167 3 9.875 3H14.125C14.4083 3 14.6792 3.05833 14.9375 3.175C15.1958 3.29167 15.4167 3.45 15.6 3.65L16.85 5H20C20.55 5 21.0208 5.19583 21.4125 5.5875C21.8042 5.97917 22 6.45 22 7V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4Z",fill:"currentColor"})),k=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4.5 21C4.1 21 3.75 20.85 3.45 20.55C3.15 20.25 3 19.9 3 19.5V4.5C3 4.1 3.15 3.75 3.45 3.45C3.75 3.15 4.1 3 4.5 3H19.5C19.9 3 20.25 3.15 20.55 3.45C20.85 3.75 21 4.1 21 4.5V19.5C21 19.9 20.85 20.25 20.55 20.55C20.25 20.85 19.9 21 19.5 21H4.5ZM6.65 17.075H17.375C17.525 17.075 17.6333 17.0083 17.7 16.875C17.7667 16.7417 17.7583 16.6083 17.675 16.475L14.75 12.575C14.6667 12.475 14.5667 12.425 14.45 12.425C14.3333 12.425 14.2333 12.475 14.15 12.575L11.15 16.45L9.125 13.675C9.04167 13.575 8.94167 13.525 8.825 13.525C8.70833 13.525 8.60833 13.575 8.525 13.675L6.375 16.475C6.275 16.6083 6.25833 16.7417 6.325 16.875C6.39167 17.0083 6.5 17.075 6.65 17.075Z",fill:"currentColor"})),S={facingMode:"environment",width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}};var I=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)i.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(e[s[o]]=t[s[o]])}return e};const j=class{constructor(s){i(this,s),this.globalSlotsChanged=e(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=e(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=e(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.vviinnImageCrop=e(this,"vviinnImageCrop",7),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.imageSource=null,this.cameraAvailable=!1,this.isDesktop=!1,this.videoTrack=null,this.handleVviinnImageUpload=t=>{this.trackInitialSearch(),this.uploadSource=t},this.handleVviinnImageUploadFinished=()=>{this.handleImageSelection(),"upload"===this.mode&&this.showingInButton&&(this.active=!0)},this.handleVviinnNoResult=t=>{"client"===t.reason&&(this.wrongImageFormat=!0)},this.adjustCameraSettings=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};if("focusMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{focusMode:"continuous"}]})}catch(t){console.error("Failed to apply focus mode constraints",t)}if("exposureMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{exposureMode:"continuous"}]})}catch(t){console.error("Failed to apply exposure mode constraints",t)}if("whiteBalanceMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{whiteBalanceMode:"continuous"}]})}catch(t){console.error("Failed to apply white balance mode constraints",t)}},this.handleStartCameraClick=async()=>{this.stream?this.resetState():(this.cameraInitializing=!0,setTimeout((async()=>{this.cameraButtonClicked=!0;try{const t=await navigator.mediaDevices.getUserMedia({video:S});this.videoTrack=t.getVideoTracks()[0],this.adjustCameraSettings(),this.stream=t,this.uploadSource="startCamera"}catch(t){console.log("Error accessing camera: ",t.message),this.resetState(),this.cameraInitializing=!1}}),500))},this.setShowAspectRatioError=t=>{this.showAspectRatioError=t},this.setTrackingDeactivated=t=>{"rejected"===t.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var t;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:m.VPS,widgetId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.widgetElementId,widgetVersion:b}},this.LinkText=({href:i,children:e})=>t("a",{href:i||""},e),this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=250,this.exampleImageSource=w,this.textSearchShow=!1,this.apiPath="https://api.vviinn.com",this.showingInButton=!1,this.buttonElementId=void 0,this.buttonPressed=void 0,this.mode="modal",this.resetVpsButton=void 0,this.replaceSlotsContentInButton=void 0,this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1,this.stream=null,this.cameraInitializing=!1,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.uploadSource=void 0,this.showAspectRatioError=!1,this.products=[],this.searchQuery=""}initResultEvents(){a.resultLoaded=!1,a.resultViewed=!1}replaceSlotsContent(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit({slots:Array.from(t),element:this.el})}stopStreamTracks(){var t;null===(t=this.stream)||void 0===t||t.getTracks().forEach((t=>{t.stop()}))}isOnboardingSlide(){return 0===this.slidePosition}isResultSlide(){return 1===this.slidePosition}async componentWillLoad(){await h.init({lng:this.locale,fallbackLng:"en",resources:p}),x(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData()),this.trackWidgetEvent("load")}componentDidLoad(){this.replaceSlotsContent()}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.vviinnWidgetOpen.emit(this.getBasicEventData()),"camera"===this.mode&&this.handleStartCameraClick(),this.trackWidgetEvent("open")):(document.body.style.overflow=this.overflow,this.initResultEvents())}textSearchFinishedHandler({detail:t}){this.searchQuery=t.query,this.slidePosition=1}resultLoadHandler(){a.resultLoaded=!0}resultViewHandler(){a.resultViewed=!0}trackCameraEnabled({detail:t}){this.cameraEnabled=t,this.cameraInitializing=!1}trachSearchAreaChanges(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=d(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=d(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackFilterSelected({detail:t}){if(this.initResultEvents(),this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId"]),s=g(Object.assign({session_id:this.uiSessionId,source:this.imageSource,kind:t.kind,action:t.action},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}connectedCallback(){this.isDesktop="desktop"===(()=>{const t=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(t)?"mobile":"desktop"})(),n.apiPath=this.apiPath,n.currencySign=this.currencySign,n.locale=this.locale,this.cameraAvailable=!!navigator.mediaDevices&&!!navigator.mediaDevices.getUserMedia,this.excluded&&(this.excluded=l(this.excluded)),a.token=this.token,a.campaignId=this.campaignId,a.excluded=this.excluded,this.uiSessionId=u(),this.trackingApi=f(this.apiPath,this.token),this.widgetElementId=this.el.id}trackWidgetEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]),s=Object.assign({action:t,session_id:this.uiSessionId},e),o=v(s);this.trackingApi.trackEvent(o).then(this.setTrackingDeactivated)}trackInitialSearch(){if(this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId","widgetType"]),e=d(Object.assign({session_id:this.uiSessionId,search_area:"full",source:"upload"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}handleImageSelection(){this.imageSource="upload",this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.stopStreamTracks()}renderButtons(){const i=a.loading&&"image"===a.searchType&&"startCamera"===this.uploadSource||this.cameraInitializing,e=[this.cameraAvailable&&t("button",{class:"action-button",part:"start-camera_button",onClick:()=>{this.handleStartCameraClick()}},t("vviinn-preloader",{class:{hidden:!i}}),t("span",{class:{"action-button-content":!0,hidden:i}},t("slot",{name:"vviinn-camera-icon"},t(C,null)),t("span",{class:{hidden:!this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-stop"},h.t("cameraButtonTextStop"))),t("span",{class:{hidden:this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-start"},h.t("cameraButtonTextStart"))))),t("vviinn-image-selector",{class:"action-button",onClick:()=>this.uploadSource="uploadPhoto",onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("uploadPhoto")},onVviinnNoResult:({detail:t})=>this.handleVviinnNoResult(t),resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"upload-photo_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode,loading:a.loading&&"image"===a.searchType&&"uploadPhoto"===this.uploadSource},t("span",{slot:"upload-button-text",class:"action-button-content"},t("slot",{name:"vviinn-image-upload-icon"},t(k,null)),t("slot",{name:"vviinn-image-upload-button-text"},t("span",null,h.t("imageUploadButtonText")))))];return this.isDesktop?e.reverse():e}resetState(){this.resetScroll("start-page_block"),this.slidePosition=0,a.resetCategoryLink=void 0,a.activeIonLink=void 0,a.image=c.none,a.imageUrl=c.none,a.imageBounds=c.none,a.searchArea=c.none,a.results=[],a.filters=[],a.textSearchFilters=[],a.detectedObjects=[],a.rectangleSearchForm=void 0,a.loading=!1,a.serverError=!1,a.searchType=void 0,this.searchQuery="",this.wrongImageFormat=!1,this.resetScroll("results-block"),this.stopStreamTracks(),this.initResultEvents(),this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.cameraInitializing=!1,this.setShowAspectRatioError(!1)}haveErrors(){return this.wrongImageFormat||a.serverError}resetScroll(t,i="auto"){const e=this.el.shadowRoot.getElementById(t);null==e||e.scroll({top:0,left:0,behavior:i})}handleModalClose(){this.active=!1,this.resetState(),["start-page_block","results-block"].forEach((t=>this.resetScroll(t))),this.trackWidgetEvent("close")}render(){var i,e;return t(o,{exportparts:"brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-amount-base-regular, price-amount-base-sale, price-amount-base-outdated, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, upload-photo_button, show-files_button, start-camera_button, text-search-input, close-button, secondary-action, close-button, price-label, price-label-0, price-label-1, price-label-2, price-label-3, price-label-4, energy-label-container, energy-label-icon, energy-label-product-type, energy-label-data-sheet-link"},!this.showingInButton&&y("vps"),t("vviinn-overlayed-modal",{class:{"first-screen":this.isOnboardingSlide()},isFirstScreen:this.isOnboardingSlide(),active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.widgetElementId,widgetVersion:b,hideBackButton:"upload"===this.mode&&this.showingInButton||!this.cameraEnabled&&this.isOnboardingSlide(),exportparts:"secondary-action, title, close-button"},t("vviinn-slider",{showBullets:!1,position:this.slidePosition},t("vviinn-slide",{class:{"start-page":!0,"camera-enabled":this.cameraEnabled}},t("vviinn-example-image",{onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("startCamera")},basicEventData:this.getBasicEventData(),srcObject:this.stream,cameraButtonClicked:this.cameraButtonClicked,exampleImageSource:this.exampleImageSource}),t("div",{class:{error:this.haveErrors()},id:"start-page_block"},t("div",{class:"start-page_main-content"},t("div",{class:{"start-page_errors-block":!0,hidden:!this.wrongImageFormat&&!a.serverError}},t("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.resetState()}),t("vviinn-server-error",{class:{hidden:!a.serverError},handler:()=>this.resetState()})),!this.haveErrors()&&t(s,null,t("vviinn-teaser",null),t("div",{class:"buttons-group"},this.renderButtons()),this.textSearchShow&&t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}))),t("vviinn-privacy-badge",{privacyBadgeText:h.t("privacyBadgeText",{interpolation:{escapeValue:!1}}),class:{invisible:this.haveErrors()}}))),t("vviinn-slide",{class:{"results-page":!0,active:this.isResultSlide()}},this.isResultSlide()&&"image"===a.searchType&&t("div",{class:"source-wrapper image-wrapper"},t("vviinn-image-view",{basicEventData:this.getBasicEventData(),setShowAspectRatioError:this.setShowAspectRatioError,showAspectRatioError:this.showAspectRatioError}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"filters"},a.filters.map((i=>t("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),this.isResultSlide()&&"text"===a.searchType&&t("div",{class:"source-wrapper text-search-wrapper"},t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"vviinn-filters-container"},t("vviinn-filters",{filters:a.textSearchFilters,showInWidget:!0}),t("vviinn-selected-filters",{showInWidget:!0})))),this.isResultSlide()&&t("vviinn-results",{token:this.token,uiSessionId:this.uiSessionId,apiPath:this.apiPath,widgetElementId:null!==(e=this.buttonElementId)&&void 0!==e?e:this.widgetElementId,showInWidget:!0,buttonElementId:this.buttonElementId,imageResolutionWidth:this.imageResolutionWidth,"currency-sign":this.currencySign,locale:this.locale,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,showAspectRatioError:this.showAspectRatioError,trackingDeactivated:this.trackingDeactivated,resetState:this.resetState.bind(this),replaceSlotsContentInWidget:this.replaceSlotsContent.bind(this),replaceSlotsContentInButton:this.replaceSlotsContentInButton,textSearchQuery:this.searchQuery})))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"]}}};j.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:40px 62px}#start-page_block.error{align-content:center}#start-page_block vviinn-text-search{margin-top:12px}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;font-family:var(--font-family, var(--font-family-base));transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--button-bg-color-primary));border-color:var(--color-primary, var(--button-bg-color-primary));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--button-bg-color-primary-hover));border-color:var(\n --color-primary-hover,\n var(--button-bg-color-primary-hover)\n )}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;font-family:var(--font-family, var(--font-family-base));grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--button-bg-color-primary));color:white}.results-page:not(.active){display:none}.results-page vviinn-text-search{width:calc(100% + 24px)}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.results-page vviinn-text-search{width:auto}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px 20px}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{j as vviinn_vps_widget}
1
+ import{h as t,r as i,c as e,F as s,H as o,g as r}from"./p-1c863deb.js";import{s as a,d as n,k as l,O as c}from"./p-43242068.js";import{i as h,r as p,k as d,l as g,v as u,c as v,m as b}from"./p-57e0dbdb.js";import{v as f}from"./p-df78d39a.js";import{c as m,s as x,S as y}from"./p-499b1c72.js";import{D as w}from"./p-cc013cd2.js";const C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M12 17.5C13.25 17.5 14.3125 17.0625 15.1875 16.1875C16.0625 15.3125 16.5 14.25 16.5 13C16.5 11.75 16.0625 10.6875 15.1875 9.8125C14.3125 8.9375 13.25 8.5 12 8.5C10.75 8.5 9.6875 8.9375 8.8125 9.8125C7.9375 10.6875 7.5 11.75 7.5 13C7.5 14.25 7.9375 15.3125 8.8125 16.1875C9.6875 17.0625 10.75 17.5 12 17.5ZM12 15.5C11.3 15.5 10.7083 15.2583 10.225 14.775C9.74167 14.2917 9.5 13.7 9.5 13C9.5 12.3 9.74167 11.7083 10.225 11.225C10.7083 10.7417 11.3 10.5 12 10.5C12.7 10.5 13.2917 10.7417 13.775 11.225C14.2583 11.7083 14.5 12.3 14.5 13C14.5 13.7 14.2583 14.2917 13.775 14.775C13.2917 15.2583 12.7 15.5 12 15.5ZM4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V7C2 6.45 2.19583 5.97917 2.5875 5.5875C2.97917 5.19583 3.45 5 4 5H7.15L8.4 3.65C8.58333 3.45 8.80417 3.29167 9.0625 3.175C9.32083 3.05833 9.59167 3 9.875 3H14.125C14.4083 3 14.6792 3.05833 14.9375 3.175C15.1958 3.29167 15.4167 3.45 15.6 3.65L16.85 5H20C20.55 5 21.0208 5.19583 21.4125 5.5875C21.8042 5.97917 22 6.45 22 7V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4Z",fill:"currentColor"})),k=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4.5 21C4.1 21 3.75 20.85 3.45 20.55C3.15 20.25 3 19.9 3 19.5V4.5C3 4.1 3.15 3.75 3.45 3.45C3.75 3.15 4.1 3 4.5 3H19.5C19.9 3 20.25 3.15 20.55 3.45C20.85 3.75 21 4.1 21 4.5V19.5C21 19.9 20.85 20.25 20.55 20.55C20.25 20.85 19.9 21 19.5 21H4.5ZM6.65 17.075H17.375C17.525 17.075 17.6333 17.0083 17.7 16.875C17.7667 16.7417 17.7583 16.6083 17.675 16.475L14.75 12.575C14.6667 12.475 14.5667 12.425 14.45 12.425C14.3333 12.425 14.2333 12.475 14.15 12.575L11.15 16.45L9.125 13.675C9.04167 13.575 8.94167 13.525 8.825 13.525C8.70833 13.525 8.60833 13.575 8.525 13.675L6.375 16.475C6.275 16.6083 6.25833 16.7417 6.325 16.875C6.39167 17.0083 6.5 17.075 6.65 17.075Z",fill:"currentColor"})),S={facingMode:"environment",width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}};var I=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)i.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(e[s[o]]=t[s[o]])}return e};const _=class{constructor(s){i(this,s),this.globalSlotsChanged=e(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=e(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=e(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.vviinnImageCrop=e(this,"vviinnImageCrop",7),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.imageSource=null,this.cameraAvailable=!1,this.isDesktop=!1,this.videoTrack=null,this.handleVviinnImageUpload=t=>{this.trackInitialSearch(),this.uploadSource=t},this.handleVviinnImageUploadFinished=()=>{this.handleImageSelection(),"upload"===this.mode&&this.showingInButton&&(this.active=!0)},this.handleVviinnNoResult=t=>{"client"===t.reason&&(this.wrongImageFormat=!0)},this.adjustCameraSettings=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};if("focusMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{focusMode:"continuous"}]})}catch(t){console.error("Failed to apply focus mode constraints",t)}if("exposureMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{exposureMode:"continuous"}]})}catch(t){console.error("Failed to apply exposure mode constraints",t)}if("whiteBalanceMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{whiteBalanceMode:"continuous"}]})}catch(t){console.error("Failed to apply white balance mode constraints",t)}},this.handleStartCameraClick=async()=>{this.stream?this.resetState():(this.cameraInitializing=!0,setTimeout((async()=>{this.cameraButtonClicked=!0;try{const t=await navigator.mediaDevices.getUserMedia({video:S});this.videoTrack=t.getVideoTracks()[0],this.adjustCameraSettings(),this.stream=t,this.uploadSource="startCamera"}catch(t){console.log("Error accessing camera: ",t.message),this.resetState(),this.cameraInitializing=!1}}),500))},this.setShowAspectRatioError=t=>{this.showAspectRatioError=t},this.setTrackingDeactivated=t=>{"rejected"===t.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var t;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:m.VPS,widgetId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.widgetElementId,widgetVersion:f}},this.LinkText=({href:i,children:e})=>t("a",{href:i||""},e),this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=250,this.exampleImageSource=w,this.textSearchShow=!1,this.apiPath="https://api.vviinn.com",this.showingInButton=!1,this.buttonElementId=void 0,this.buttonPressed=void 0,this.mode="modal",this.resetVpsButton=void 0,this.replaceSlotsContentInButton=void 0,this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1,this.stream=null,this.cameraInitializing=!1,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.uploadSource=void 0,this.showAspectRatioError=!1,this.products=[],this.searchQuery=""}initResultEvents(){a.resultLoaded=!1,a.resultViewed=!1}replaceSlotsContent(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit({slots:Array.from(t),element:this.el})}stopStreamTracks(){var t;null===(t=this.stream)||void 0===t||t.getTracks().forEach((t=>{t.stop()}))}isOnboardingSlide(){return 0===this.slidePosition}isResultSlide(){return 1===this.slidePosition}async componentWillLoad(){await h.init({lng:this.locale,fallbackLng:"en",resources:p}),x(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData()),this.trackWidgetEvent("load")}componentDidLoad(){this.replaceSlotsContent()}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.vviinnWidgetOpen.emit(this.getBasicEventData()),"camera"===this.mode&&this.handleStartCameraClick(),this.trackWidgetEvent("open")):(document.body.style.overflow=this.overflow,this.initResultEvents())}textSearchFinishedHandler({detail:t}){this.searchQuery=t.query,this.slidePosition=1}resultLoadHandler(){a.resultLoaded=!0}resultViewHandler(){a.resultViewed=!0}trackCameraEnabled({detail:t}){this.cameraEnabled=t,this.cameraInitializing=!1}trachSearchAreaChanges(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=d(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=d(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackFilterSelected({detail:t}){if(this.initResultEvents(),this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId"]),s=g(Object.assign({session_id:this.uiSessionId,source:this.imageSource,kind:t.kind,action:t.action},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}connectedCallback(){this.isDesktop="desktop"===(()=>{const t=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(t)?"mobile":"desktop"})(),n.apiPath=this.apiPath,n.currencySign=this.currencySign,n.locale=this.locale,this.cameraAvailable=!!navigator.mediaDevices&&!!navigator.mediaDevices.getUserMedia,this.excluded&&(this.excluded=l(this.excluded)),a.token=this.token,a.campaignId=this.campaignId,a.excluded=this.excluded,this.uiSessionId=u(),this.trackingApi=v(this.apiPath,this.token),this.widgetElementId=this.el.id}trackWidgetEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]),s=Object.assign({action:t,session_id:this.uiSessionId},e),o=b(s);this.trackingApi.trackEvent(o).then(this.setTrackingDeactivated)}trackInitialSearch(){if(this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId","widgetType"]),e=d(Object.assign({session_id:this.uiSessionId,search_area:"full",source:"upload"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}handleImageSelection(){this.imageSource="upload",this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.stopStreamTracks()}renderButtons(){const i=a.loading&&"image"===a.searchType&&"startCamera"===this.uploadSource||this.cameraInitializing,e=[this.cameraAvailable&&t("button",{class:"action-button",part:"start-camera_button",onClick:()=>{this.handleStartCameraClick()}},t("vviinn-preloader",{class:{hidden:!i}}),t("span",{class:{"action-button-content":!0,hidden:i}},t("slot",{name:"vviinn-camera-icon"},t(C,null)),t("span",{class:{hidden:!this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-stop"},h.t("cameraButtonTextStop"))),t("span",{class:{hidden:this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-start"},h.t("cameraButtonTextStart"))))),t("vviinn-image-selector",{class:"action-button",onClick:()=>this.uploadSource="uploadPhoto",onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("uploadPhoto")},onVviinnNoResult:({detail:t})=>this.handleVviinnNoResult(t),resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"upload-photo_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode,loading:a.loading&&"image"===a.searchType&&"uploadPhoto"===this.uploadSource},t("span",{slot:"upload-button-text",class:"action-button-content"},t("slot",{name:"vviinn-image-upload-icon"},t(k,null)),t("slot",{name:"vviinn-image-upload-button-text"},t("span",null,h.t("imageUploadButtonText")))))];return this.isDesktop?e.reverse():e}resetState(){this.resetScroll("start-page_block"),this.slidePosition=0,a.resetCategoryLink=void 0,a.activeIonLink=void 0,a.image=c.none,a.imageUrl=c.none,a.imageBounds=c.none,a.searchArea=c.none,a.results=[],a.filters=[],a.textSearchFilters=[],a.detectedObjects=[],a.rectangleSearchForm=void 0,a.loading=!1,a.serverError=!1,a.searchType=void 0,this.searchQuery="",this.wrongImageFormat=!1,this.resetScroll("results-block"),this.stopStreamTracks(),this.initResultEvents(),this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.cameraInitializing=!1,this.setShowAspectRatioError(!1)}haveErrors(){return this.wrongImageFormat||a.serverError}resetScroll(t,i="auto"){const e=this.el.shadowRoot.getElementById(t);null==e||e.scroll({top:0,left:0,behavior:i})}handleModalClose(){this.active=!1,this.resetState(),["start-page_block","results-block"].forEach((t=>this.resetScroll(t))),this.trackWidgetEvent("close")}render(){var i,e;return t(o,{exportparts:"brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-amount-base-regular, price-amount-base-sale, price-amount-base-outdated, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, upload-photo_button, show-files_button, start-camera_button, text-search-input, close-button, secondary-action, close-button, price-label, price-label-0, price-label-1, price-label-2, price-label-3, price-label-4, energy-label-container, energy-label-icon, energy-label-product-type, energy-label-data-sheet-link"},!this.showingInButton&&y("vps"),t("vviinn-overlayed-modal",{class:{"first-screen":this.isOnboardingSlide()},isFirstScreen:this.isOnboardingSlide(),active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.widgetElementId,widgetVersion:f,hideBackButton:"upload"===this.mode&&this.showingInButton||!this.cameraEnabled&&this.isOnboardingSlide(),exportparts:"secondary-action, title, close-button"},t("vviinn-slider",{showBullets:!1,position:this.slidePosition},t("vviinn-slide",{class:{"start-page":!0,"camera-enabled":this.cameraEnabled}},t("vviinn-example-image",{onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("startCamera")},basicEventData:this.getBasicEventData(),srcObject:this.stream,cameraButtonClicked:this.cameraButtonClicked,exampleImageSource:this.exampleImageSource}),t("div",{class:{error:this.haveErrors()},id:"start-page_block"},t("div",{class:"start-page_main-content"},t("div",{class:{"start-page_errors-block":!0,hidden:!this.wrongImageFormat&&!a.serverError}},t("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.resetState()}),t("vviinn-server-error",{class:{hidden:!a.serverError},handler:()=>this.resetState()})),!this.haveErrors()&&t(s,null,t("vviinn-teaser",null),t("div",{class:"buttons-group"},this.renderButtons()),this.textSearchShow&&t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}))),t("vviinn-privacy-badge",{privacyBadgeText:h.t("privacyBadgeText",{interpolation:{escapeValue:!1}}),class:{invisible:this.haveErrors()}}))),t("vviinn-slide",{class:{"results-page":!0,active:this.isResultSlide()}},this.isResultSlide()&&"image"===a.searchType&&t("div",{class:"source-wrapper image-wrapper"},t("vviinn-image-view",{basicEventData:this.getBasicEventData(),setShowAspectRatioError:this.setShowAspectRatioError,showAspectRatioError:this.showAspectRatioError}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"filters"},a.filters.map((i=>t("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),this.isResultSlide()&&"text"===a.searchType&&t("div",{class:"source-wrapper text-search-wrapper"},t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"vviinn-filters-container"},t("vviinn-filters",{filters:a.textSearchFilters,showInWidget:!0}),t("vviinn-selected-filters",{showInWidget:!0})))),this.isResultSlide()&&t("vviinn-results",{token:this.token,uiSessionId:this.uiSessionId,apiPath:this.apiPath,widgetElementId:null!==(e=this.buttonElementId)&&void 0!==e?e:this.widgetElementId,showInWidget:!0,buttonElementId:this.buttonElementId,imageResolutionWidth:this.imageResolutionWidth,"currency-sign":this.currencySign,locale:this.locale,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,showAspectRatioError:this.showAspectRatioError,trackingDeactivated:this.trackingDeactivated,resetState:this.resetState.bind(this),replaceSlotsContentInWidget:this.replaceSlotsContent.bind(this),replaceSlotsContentInButton:this.replaceSlotsContentInButton,textSearchQuery:this.searchQuery})))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"]}}};_.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:40px 62px}#start-page_block.error{align-content:center}#start-page_block vviinn-text-search{margin-top:12px}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;font-family:var(--font-family, var(--font-family-base));transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--button-bg-color-primary));border-color:var(--color-primary, var(--button-bg-color-primary));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--button-bg-color-primary-hover));border-color:var(\n --color-primary-hover,\n var(--button-bg-color-primary-hover)\n )}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;font-family:var(--font-family, var(--font-family-base));grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--button-bg-color-primary));color:white}.results-page:not(.active){display:none}.results-page vviinn-text-search{width:calc(100% + 24px)}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.results-page vviinn-text-search{width:auto}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px 20px}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{_ as vviinn_vps_widget}
@@ -1 +1 @@
1
- import{_ as e,E as l}from"./p-042b091b.js";import{h as r,F as a}from"./p-1c863deb.js";const t=()=>r("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"plus-icon"},r("path",{d:"M14.6667 17.3333H8.00001C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H14.6667V8.00001C14.6667 7.62223 14.7944 7.30556 15.05 7.05001C15.3056 6.79445 15.6222 6.66667 16 6.66667C16.3778 6.66667 16.6944 6.79445 16.95 7.05001C17.2056 7.30556 17.3333 7.62223 17.3333 8.00001V14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H17.3333V24C17.3333 24.3778 17.2056 24.6944 16.95 24.95C16.6944 25.2056 16.3778 25.3333 16 25.3333C15.6222 25.3333 15.3056 25.2056 15.05 24.95C14.7944 24.6944 14.6667 24.3778 14.6667 24V17.3333Z",fill:"currentColor"})),s=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("rect",{x:"2",y:"2",width:"20",height:"20",rx:"4",fill:"white"}),r("path",{d:"M10.8765 13.5061L16.1943 8.30769C16.4041 8.10256 16.6526 8 16.9398 8C17.2269 8 17.4754 8.10256 17.6852 8.30769C17.8951 8.51282 18 8.75574 18 9.03644C18 9.31714 17.8951 9.56005 17.6852 9.76518L11.622 15.6923C11.4121 15.8974 11.1637 16 10.8765 16C10.5894 16 10.3409 15.8974 10.131 15.6923L7.31476 12.9393C7.10492 12.7341 7 12.4912 7 12.2105C7 11.9298 7.10492 11.6869 7.31476 11.4818C7.5246 11.2767 7.77309 11.1741 8.06024 11.1741C8.34739 11.1741 8.59588 11.2767 8.80572 11.4818L10.8765 13.5061Z",fill:"#161616"})),i=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("path",{d:"M12 13.4L7.09999 18.3C6.91665 18.4834 6.68332 18.575 6.39999 18.575C6.11665 18.575 5.88332 18.4834 5.69999 18.3C5.51665 18.1167 5.42499 17.8834 5.42499 17.6C5.42499 17.3167 5.51665 17.0834 5.69999 16.9L10.6 12L5.69999 7.10005C5.51665 6.91672 5.42499 6.68338 5.42499 6.40005C5.42499 6.11672 5.51665 5.88338 5.69999 5.70005C5.88332 5.51672 6.11665 5.42505 6.39999 5.42505C6.68332 5.42505 6.91665 5.51672 7.09999 5.70005L12 10.6L16.9 5.70005C17.0833 5.51672 17.3167 5.42505 17.6 5.42505C17.8833 5.42505 18.1167 5.51672 18.3 5.70005C18.4833 5.88338 18.575 6.11672 18.575 6.40005C18.575 6.68338 18.4833 6.91672 18.3 7.10005L13.4 12L18.3 16.9C18.4833 17.0834 18.575 17.3167 18.575 17.6C18.575 17.8834 18.4833 18.1167 18.3 18.3C18.1167 18.4834 17.8833 18.575 17.6 18.575C17.3167 18.575 17.0833 18.4834 16.9 18.3L12 13.4Z",fill:"#8D8D8D"})),c=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("rect",{x:"3",y:"3",width:"20",height:"20",rx:"3",fill:"white",stroke:"#E0E0E0","stroke-width":"2"})),n=/fit\/\d+\//,o=(r,a)=>e.pipe((r=>e.pipe(r.match(n),l.fromNullable(r),l.map((()=>r))))(r),l.map((e=>e.replace(n,`fit/${a}/`))),l.getOrElse((()=>r))),p=(e,l)=>e.deeplink?r("a",{class:e.part,part:e.part,href:e.deeplink},l):l,u=(e,l)=>new Intl.NumberFormat(l,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e),C=e=>{const l=e.priceType,a=u(e.price,e.locale),t=e.prefix?r("span",{part:"price-prefix"},e.prefix+" "):null,s=e.currency?r("span",{part:"currency",class:"currency"},e.currency):null;return r("span",{class:"price-amount",part:"price-amount"+(l?"-"+l:"")},t,a,s)},d=({currency:e,basePrice:l,priceType:a,locale:t})=>{if(!(null==l?void 0:l.price))return null;const s=u(l.price,t);return r("span",{class:"price-amount price-amount--base",part:"price-amount-base"+(a?"-"+a:"")},s,(null==e?void 0:e.length)>0&&r("span",{part:"currency",class:"currency"},e),"/",(null==l?void 0:l.quantity)>1&&(null==l?void 0:l.quantity),null==l?void 0:l.measure)},g=e=>e?"string"==typeof e?JSON.parse(e):e:null,m=({custom_label_0:e,custom_label_1:l,custom_label_2:t,custom_label_3:s,custom_label_4:i})=>{const c=(e,l)=>{if(!e)return"";const a=`price-label-${l}`;return r("span",{part:a,class:a},e)};return r(a,null,c(e,0),c(l,1),c(t,2),c(s,3),c(i,4))},f=e=>r("span",{class:"price-container",part:"price-container"},e.priceLabel&&r("span",{part:"price-label",class:"price-label"},e.priceLabel),e.salePrice?[r("span",{class:"price-outdated",part:"price-outdated"},r(C,{prefix:e.prefix,currency:e.currency,price:e.price,locale:e.locale,priceType:"outdated"}),r(d,{currency:e.currency,basePrice:e.basePrice,locale:e.locale,priceType:"outdated"})),r("span",{class:"price-sale",part:"price-sale"},r(C,{prefix:e.prefix,currency:e.currency,price:e.salePrice,locale:e.locale,priceType:"sale"}),r(d,{currency:e.currency,basePrice:e.baseSalePrice,locale:e.locale,priceType:"sale"}))]:r("span",{class:"price-regular",part:"price-regular"},r(C,{prefix:e.prefix,currency:e.currency,price:e.price,locale:e.locale,priceType:"regular"}),r(d,{currency:e.currency,basePrice:e.basePrice,locale:e.locale,priceType:"regular"}))),h=(e,l=(()=>{}))=>r("picture",null,r("img",{loading:e.lazy?"lazy":"eager",part:"image",class:"image",width:e.width,height:e.height,src:o(e.src,e.width),alt:e.title,ref:e.ref,onLoad:l}),e.isSource&&r(t,null)),w=(e,l=(()=>{}))=>r("picture",null,r("img",{loading:e.lazy?"lazy":"eager",part:"image",class:"image responsive",src:o(e.src,e.width),alt:e.title,ref:e.ref,onLoad:l})),b=(e,{column:l},r)=>{var a,t,s;const i=null!==(t=null!==(a=r.interval)&&void 0!==a?a:r.value)&&void 0!==t?t:r,c=e.findIndex((({column:e})=>e===l)),n=null===(s=e[c])||void 0===s?void 0:s.values.findIndex((e=>e===i)),o=-1===c||"price"===l?{column:l,values:[]}:e[c];return n>-1?o.values.splice(n,1):o.values.push(i),-1===c?(e=[...e,o],document.getElementById("filters-footer")&&(document.getElementById("filters-footer").scrollLeft=0)):(e[c]=o,e=0===e[c].values.length?[...e.filter((l=>e[c]!==l))]:[...e]),e},v=(e,l,a,t,n,o=!1,p=!1)=>{const u=l.hexCode;return r("li",{onClick:()=>t?e(l,n):null},r("button",{class:`filters-sub-button${o?"-selected":""} ${u?"filters-sub-button-color":""} ${o?"active":""}`,style:{backgroundColor:u},disabled:!t,part:"filters-sub-button"},r("span",null,r("span",null,a),p?null:r(o?s:c,null))),o&&p&&r(i,null))},y=(e,l,r)=>{if(!r||!e)return!1;const a=e.find((({column:e})=>e===r.column));return!!a&&!!a.values.some((e=>e===l||e===l.interval||e===l.value))},x=(e,l,r)=>{r.emit({filters:e,el:l})};export{s as C,h as I,p as L,f as P,v as R,c as S,y as a,w as b,m as c,t as d,x as e,g as p,b as s}
1
+ import{_ as e,E as l}from"./p-43242068.js";import{h as r,F as a}from"./p-1c863deb.js";const t=()=>r("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"plus-icon"},r("path",{d:"M14.6667 17.3333H8.00001C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H14.6667V8.00001C14.6667 7.62223 14.7944 7.30556 15.05 7.05001C15.3056 6.79445 15.6222 6.66667 16 6.66667C16.3778 6.66667 16.6944 6.79445 16.95 7.05001C17.2056 7.30556 17.3333 7.62223 17.3333 8.00001V14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H17.3333V24C17.3333 24.3778 17.2056 24.6944 16.95 24.95C16.6944 25.2056 16.3778 25.3333 16 25.3333C15.6222 25.3333 15.3056 25.2056 15.05 24.95C14.7944 24.6944 14.6667 24.3778 14.6667 24V17.3333Z",fill:"currentColor"})),s=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("rect",{x:"2",y:"2",width:"20",height:"20",rx:"4",fill:"white"}),r("path",{d:"M10.8765 13.5061L16.1943 8.30769C16.4041 8.10256 16.6526 8 16.9398 8C17.2269 8 17.4754 8.10256 17.6852 8.30769C17.8951 8.51282 18 8.75574 18 9.03644C18 9.31714 17.8951 9.56005 17.6852 9.76518L11.622 15.6923C11.4121 15.8974 11.1637 16 10.8765 16C10.5894 16 10.3409 15.8974 10.131 15.6923L7.31476 12.9393C7.10492 12.7341 7 12.4912 7 12.2105C7 11.9298 7.10492 11.6869 7.31476 11.4818C7.5246 11.2767 7.77309 11.1741 8.06024 11.1741C8.34739 11.1741 8.59588 11.2767 8.80572 11.4818L10.8765 13.5061Z",fill:"#161616"})),i=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("path",{d:"M12 13.4L7.09999 18.3C6.91665 18.4834 6.68332 18.575 6.39999 18.575C6.11665 18.575 5.88332 18.4834 5.69999 18.3C5.51665 18.1167 5.42499 17.8834 5.42499 17.6C5.42499 17.3167 5.51665 17.0834 5.69999 16.9L10.6 12L5.69999 7.10005C5.51665 6.91672 5.42499 6.68338 5.42499 6.40005C5.42499 6.11672 5.51665 5.88338 5.69999 5.70005C5.88332 5.51672 6.11665 5.42505 6.39999 5.42505C6.68332 5.42505 6.91665 5.51672 7.09999 5.70005L12 10.6L16.9 5.70005C17.0833 5.51672 17.3167 5.42505 17.6 5.42505C17.8833 5.42505 18.1167 5.51672 18.3 5.70005C18.4833 5.88338 18.575 6.11672 18.575 6.40005C18.575 6.68338 18.4833 6.91672 18.3 7.10005L13.4 12L18.3 16.9C18.4833 17.0834 18.575 17.3167 18.575 17.6C18.575 17.8834 18.4833 18.1167 18.3 18.3C18.1167 18.4834 17.8833 18.575 17.6 18.575C17.3167 18.575 17.0833 18.4834 16.9 18.3L12 13.4Z",fill:"#8D8D8D"})),c=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("rect",{x:"3",y:"3",width:"20",height:"20",rx:"3",fill:"white",stroke:"#E0E0E0","stroke-width":"2"})),n=/fit\/\d+\//,o=(r,a)=>e.pipe((r=>e.pipe(r.match(n),l.fromNullable(r),l.map((()=>r))))(r),l.map((e=>e.replace(n,`fit/${a}/`))),l.getOrElse((()=>r))),p=(e,l)=>e.deeplink?r("a",{class:e.part,part:e.part,href:e.deeplink},l):l,u=(e,l)=>new Intl.NumberFormat(l,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e),C=e=>{const l=e.priceType,a=u(e.price,e.locale),t=e.prefix?r("span",{part:"price-prefix"},e.prefix+" "):null,s=e.currency?r("span",{part:"currency",class:"currency"},e.currency):null;return r("span",{class:"price-amount",part:"price-amount"+(l?"-"+l:"")},t,a,s)},d=({currency:e,basePrice:l,priceType:a,locale:t})=>{if(!(null==l?void 0:l.price))return null;const s=u(l.price,t);return r("span",{class:"price-amount price-amount--base",part:"price-amount-base"+(a?"-"+a:"")},s,(null==e?void 0:e.length)>0&&r("span",{part:"currency",class:"currency"},e),"/",(null==l?void 0:l.quantity)>1&&(null==l?void 0:l.quantity),null==l?void 0:l.measure)},g=e=>e?"string"==typeof e?JSON.parse(e):e:null,m=({custom_label_0:e,custom_label_1:l,custom_label_2:t,custom_label_3:s,custom_label_4:i})=>{const c=(e,l)=>{if(!e)return"";const a=`price-label-${l}`;return r("span",{part:a,class:a},e)};return r(a,null,c(e,0),c(l,1),c(t,2),c(s,3),c(i,4))},f=e=>r("span",{class:"price-container",part:"price-container"},e.priceLabel&&r("span",{part:"price-label",class:"price-label"},e.priceLabel),e.salePrice?[r("span",{class:"price-outdated",part:"price-outdated"},r(C,{prefix:e.prefix,currency:e.currency,price:e.price,locale:e.locale,priceType:"outdated"}),r(d,{currency:e.currency,basePrice:e.basePrice,locale:e.locale,priceType:"outdated"})),r("span",{class:"price-sale",part:"price-sale"},r(C,{prefix:e.prefix,currency:e.currency,price:e.salePrice,locale:e.locale,priceType:"sale"}),r(d,{currency:e.currency,basePrice:e.baseSalePrice,locale:e.locale,priceType:"sale"}))]:r("span",{class:"price-regular",part:"price-regular"},r(C,{prefix:e.prefix,currency:e.currency,price:e.price,locale:e.locale,priceType:"regular"}),r(d,{currency:e.currency,basePrice:e.basePrice,locale:e.locale,priceType:"regular"}))),h=(e,l=(()=>{}))=>r("picture",null,r("img",{loading:e.lazy?"lazy":"eager",part:"image",class:"image",width:e.width,height:e.height,src:o(e.src,e.width),alt:e.title,ref:e.ref,onLoad:l}),e.isSource&&r(t,null)),w=(e,l=(()=>{}))=>r("picture",null,r("img",{loading:e.lazy?"lazy":"eager",part:"image",class:"image responsive",src:o(e.src,e.width),alt:e.title,ref:e.ref,onLoad:l})),b=(e,{column:l},r)=>{var a,t,s;const i=null!==(t=null!==(a=r.interval)&&void 0!==a?a:r.value)&&void 0!==t?t:r,c=e.findIndex((({column:e})=>e===l)),n=null===(s=e[c])||void 0===s?void 0:s.values.findIndex((e=>e===i)),o=-1===c||"price"===l?{column:l,values:[]}:e[c];return n>-1?o.values.splice(n,1):o.values.push(i),-1===c?(e=[...e,o],document.getElementById("filters-footer")&&(document.getElementById("filters-footer").scrollLeft=0)):(e[c]=o,e=0===e[c].values.length?[...e.filter((l=>e[c]!==l))]:[...e]),e},v=(e,l,a,t,n,o=!1,p=!1)=>{const u=l.hexCode;return r("li",{onClick:()=>t?e(l,n):null},r("button",{class:`filters-sub-button${o?"-selected":""} ${u?"filters-sub-button-color":""} ${o?"active":""}`,style:{backgroundColor:u},disabled:!t,part:"filters-sub-button"},r("span",null,r("span",null,a),p?null:r(o?s:c,null))),o&&p&&r(i,null))},y=(e,l,r)=>{if(!r||!e)return!1;const a=e.find((({column:e})=>e===r.column));return!!a&&!!a.values.some((e=>e===l||e===l.interval||e===l.value))},x=(e,l,r)=>{r.emit({filters:e,el:l})};export{s as C,h as I,p as L,f as P,v as R,c as S,y as a,w as b,m as c,t as d,x as e,g as p,b as s}
@@ -1 +1 @@
1
- import{r,h as e,H as o}from"./p-1c863deb.js";import{s as t}from"./p-042b091b.js";const a=class{constructor(e){r(this,e)}isActive(){return t.loading||t.objectDetectionInProgress}render(){return e(o,{class:{active:this.isActive()}})}};a.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";export{a as vviinn_preloader}
1
+ import{r,h as e,H as o}from"./p-1c863deb.js";import{s as t}from"./p-43242068.js";const a=class{constructor(e){r(this,e)}isActive(){return t.loading||t.objectDetectionInProgress}render(){return e(o,{class:{active:this.isActive()}})}};a.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";export{a as vviinn_preloader}