vviinn-widgets 2.195.0 → 2.196.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/cjs/{Rectangle-DVEulpFu.js → Rectangle-DfUOGfXS.js} +2 -0
  2. package/dist/cjs/{checkDeviceType-iUhpuLlH.js → cropperUtils-Bam-BTEk.js} +0 -23
  3. package/dist/cjs/{index-DDfB2zej.js → index-B-eF0nQu.js} +1 -1
  4. package/dist/cjs/{package-BPYUOfCB.js → package-Dp3CQTMp.js} +1 -1
  5. package/dist/cjs/{resources-DKz1qCqs.js → resources-CuHgJnvC.js} +18 -8
  6. package/dist/cjs/{search.store-DzzR8sHn.js → search.store-B_KXvC4d.js} +90 -6
  7. package/dist/cjs/vviinn-button_6.cjs.entry.js +18 -7
  8. package/dist/cjs/vviinn-camera_11.cjs.entry.js +40 -35
  9. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +5 -5
  10. package/dist/cjs/vviinn-detected-object_2.cjs.entry.js +1 -1
  11. package/dist/cjs/vviinn-selected-filters.cjs.entry.js +3 -3
  12. package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +15 -15
  13. package/dist/cjs/vviinn-text-search.cjs.entry.js +5 -3
  14. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  15. package/dist/collection/Image/error.js +46 -3
  16. package/dist/collection/Image/fromFile.js +10 -2
  17. package/dist/collection/components/vviinn-error/index.js +6 -0
  18. package/dist/collection/components/vviinn-error/vviinn-error.css +1 -2
  19. package/dist/collection/components/vviinn-error/vviinn-error.js +9 -3
  20. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +6 -6
  21. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +1 -1
  22. package/dist/collection/components/vviinn-results/vviinn-results.js +2 -2
  23. package/dist/collection/components/vviinn-shop-the-look/render-helpers.js +2 -2
  24. package/dist/collection/components/vviinn-shop-the-look/vviinn-shop-the-look.js +3 -3
  25. package/dist/collection/components/vviinn-text-search/helpers/permitSpeechRecognition.js +1 -1
  26. package/dist/collection/components/vviinn-text-search/helpers/speechTooltip.js +1 -1
  27. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +2 -2
  28. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +5 -5
  29. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +22 -17
  30. package/dist/collection/error.js +2 -0
  31. package/dist/collection/{components/vviinn-text-search/helpers → helpers/device}/browserType.js +2 -0
  32. package/dist/collection/helpers/device/checkDeviceType.js +10 -0
  33. package/dist/collection/locale/resources.js +18 -8
  34. package/dist/esm/{Rectangle-DGBESJrE.js → Rectangle-DM-Jf7YJ.js} +2 -0
  35. package/dist/esm/{checkDeviceType-BFZcnzQf.js → cropperUtils-BpgcCYJQ.js} +1 -22
  36. package/dist/esm/{index-B4sPBNCP.js → index-lFn09yLT.js} +1 -1
  37. package/dist/esm/{package-r7VcI4Kg.js → package-DjzQfs4n.js} +1 -1
  38. package/dist/esm/{resources-TrBn4zuN.js → resources-Cvip80t1.js} +18 -8
  39. package/dist/esm/{search.store-Xb_yLlSl.js → search.store-LhkDttfN.js} +87 -6
  40. package/dist/esm/vviinn-button_6.entry.js +18 -7
  41. package/dist/esm/vviinn-camera_11.entry.js +29 -24
  42. package/dist/esm/vviinn-carousel_10.entry.js +5 -5
  43. package/dist/esm/vviinn-detected-object_2.entry.js +1 -1
  44. package/dist/esm/vviinn-selected-filters.entry.js +3 -3
  45. package/dist/esm/vviinn-shop-the-look.entry.js +6 -6
  46. package/dist/esm/vviinn-text-search.entry.js +5 -3
  47. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  48. package/dist/storybook/helpers/industryToken.js +1 -1
  49. package/dist/types/Image/error.d.ts +2 -1
  50. package/dist/types/components/vviinn-error/index.d.ts +1 -1
  51. package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +1 -1
  52. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -1
  53. package/dist/types/components/vviinn-results/vviinn-results.d.ts +2 -2
  54. package/dist/types/components/vviinn-shop-the-look/vviinn-shop-the-look.d.ts +1 -1
  55. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +1 -1
  56. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +3 -3
  57. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +4 -4
  58. package/dist/types/components.d.ts +15 -15
  59. package/dist/types/error.d.ts +2 -0
  60. package/dist/types/helpers/device/checkDeviceType.d.ts +1 -0
  61. package/dist/types/recommendation/events.d.ts +3 -1
  62. package/{www/build/p-ea92a5d2.entry.js → dist/vviinn-widgets/p-2c1a8263.entry.js} +1 -1
  63. package/dist/vviinn-widgets/{p-4884f92e.entry.js → p-3be1bd0e.entry.js} +1 -1
  64. package/dist/vviinn-widgets/{p-eca58a88.entry.js → p-4bce3cbd.entry.js} +1 -1
  65. package/dist/vviinn-widgets/p-5hlq91W8.js +1 -0
  66. package/dist/vviinn-widgets/p-7339b95e.entry.js +1 -0
  67. package/dist/vviinn-widgets/{p-Brw7iReF.js → p-ByDRCwbj.js} +1 -1
  68. package/dist/vviinn-widgets/p-CltlHN8F.js +10 -0
  69. package/dist/vviinn-widgets/p-Cvip80t1.js +1 -0
  70. package/{www/build/p-D3T7gXzV.js → dist/vviinn-widgets/p-DGkMd91j.js} +1 -1
  71. package/dist/vviinn-widgets/{p-r7VcI4Kg.js → p-DjzQfs4n.js} +1 -1
  72. package/dist/vviinn-widgets/{p-047eb1c9.entry.js → p-a2c30a99.entry.js} +1 -1
  73. package/dist/vviinn-widgets/p-cdab8bc8.entry.js +1 -0
  74. package/dist/vviinn-widgets/{p-66fe6950.entry.js → p-d5889e8d.entry.js} +1 -1
  75. package/dist/vviinn-widgets/{p-882aeddc.entry.js → p-e59e023d.entry.js} +1 -1
  76. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  77. package/package.json +1 -1
  78. package/{dist/vviinn-widgets/p-ea92a5d2.entry.js → www/build/p-2c1a8263.entry.js} +1 -1
  79. package/www/build/{p-4884f92e.entry.js → p-3be1bd0e.entry.js} +1 -1
  80. package/www/build/{p-eca58a88.entry.js → p-4bce3cbd.entry.js} +1 -1
  81. package/www/build/{p-bda61d00.js → p-4c361181.js} +1 -1
  82. package/www/build/p-5hlq91W8.js +1 -0
  83. package/www/build/p-7339b95e.entry.js +1 -0
  84. package/www/build/{p-Brw7iReF.js → p-ByDRCwbj.js} +1 -1
  85. package/www/build/p-CltlHN8F.js +10 -0
  86. package/www/build/p-Cvip80t1.js +1 -0
  87. package/{dist/vviinn-widgets/p-D3T7gXzV.js → www/build/p-DGkMd91j.js} +1 -1
  88. package/www/build/{p-r7VcI4Kg.js → p-DjzQfs4n.js} +1 -1
  89. package/www/build/{p-047eb1c9.entry.js → p-a2c30a99.entry.js} +1 -1
  90. package/www/build/p-cdab8bc8.entry.js +1 -0
  91. package/www/build/{p-66fe6950.entry.js → p-d5889e8d.entry.js} +1 -1
  92. package/www/build/{p-882aeddc.entry.js → p-e59e023d.entry.js} +1 -1
  93. package/www/build/vviinn-widgets.esm.js +1 -1
  94. package/www/index.html +1 -1
  95. package/dist/vviinn-widgets/p-08d6a7a3.entry.js +0 -1
  96. package/dist/vviinn-widgets/p-BmijCx0f.js +0 -10
  97. package/dist/vviinn-widgets/p-D72-6sYj.js +0 -1
  98. package/dist/vviinn-widgets/p-TrBn4zuN.js +0 -1
  99. package/dist/vviinn-widgets/p-fef8c137.entry.js +0 -1
  100. package/www/build/p-08d6a7a3.entry.js +0 -1
  101. package/www/build/p-BmijCx0f.js +0 -10
  102. package/www/build/p-D72-6sYj.js +0 -1
  103. package/www/build/p-TrBn4zuN.js +0 -1
  104. package/www/build/p-fef8c137.entry.js +0 -1
  105. /package/dist/types/{components/vviinn-text-search/helpers → helpers/device}/browserType.d.ts +0 -0
@@ -8870,10 +8870,12 @@ const basicErrorFromResponse = (error) => {
8870
8870
  const invalidTokenError = {
8871
8871
  kind: "client",
8872
8872
  inner: "Token not exist or empty",
8873
+ code: "invalid-token",
8873
8874
  };
8874
8875
  const emptyApiPathError = {
8875
8876
  kind: "client",
8876
8877
  inner: "Api path empty or missing",
8878
+ code: "empty-api-path",
8877
8879
  };
8878
8880
 
8879
8881
  const stringMonoid = getMonoid(Monoid);
@@ -3327,34 +3327,11 @@ const getCropBoxData = (cropper) => {
3327
3327
  return { left, top, width, height };
3328
3328
  };
3329
3329
 
3330
- // Responsive breakpoints - can be customized per component needs
3331
- const DEFAULT_BREAKPOINTS = {
3332
- DESKTOP: 768};
3333
- // User agent based device detection
3334
- const checkDeviceType = () => {
3335
- const ua = navigator.userAgent;
3336
- if (/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(ua)) {
3337
- return "tablet";
3338
- }
3339
- else if (/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(ua)) {
3340
- return "mobile";
3341
- }
3342
- return "desktop";
3343
- };
3344
- // Screen size based responsive detection
3345
- const isDesktop = (breakpoint = DEFAULT_BREAKPOINTS.DESKTOP) => {
3346
- if (typeof window === "undefined")
3347
- return false;
3348
- return window.innerWidth >= breakpoint;
3349
- };
3350
-
3351
3330
  exports.Cropper = Cropper;
3352
3331
  exports.DEFAULT_IMAGE_SIZE = DEFAULT_IMAGE_SIZE;
3353
3332
  exports.MIN_IMAGE_SIDE_FOR_CROPPER = MIN_IMAGE_SIDE_FOR_CROPPER;
3354
3333
  exports.MIN_SEARCH_AREA_SIZE = MIN_SEARCH_AREA_SIZE;
3355
3334
  exports.SUPPORTED_ASPECT_RATIO = SUPPORTED_ASPECT_RATIO;
3356
- exports.checkDeviceType = checkDeviceType;
3357
3335
  exports.cropperOptions = cropperOptions;
3358
3336
  exports.getCropBoxData = getCropBoxData;
3359
3337
  exports.isCropBoxChangeMinimal = isCropBoxChangeMinimal;
3360
- exports.isDesktop = isDesktop;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-OrE9ITel.js');
4
- var search_store = require('./search.store-DzzR8sHn.js');
4
+ var search_store = require('./search.store-B_KXvC4d.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", "aria-hidden": "true" },
7
7
  index.h("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" })));
@@ -14,7 +14,7 @@ function fromString(s) {
14
14
  return s === "VPR" ? { _tag: "VPR" } : { _tag: "VCS" };
15
15
  }
16
16
 
17
- const version = "2.195.0";
17
+ const version = "2.196.0";
18
18
 
19
19
  exports.campaignTypeNames = campaignTypeNames;
20
20
  exports.fold = fold;
@@ -42,7 +42,7 @@ const resources = {
42
42
  },
43
43
  emptyResultsBlock: {
44
44
  title: "Leider nichts gefunden",
45
- button: "Neues Bild hochladen",
45
+ button: "Erneut versuchen",
46
46
  },
47
47
  serverErrorBlock: {
48
48
  title: "Keine Verbindung",
@@ -50,12 +50,17 @@ const resources = {
50
50
  },
51
51
  wrongFormatBlock: {
52
52
  title: "Dateityp wird nicht unterstützt",
53
- text: "Bitte laden Sie eine .jpg, .png, .webp oder .avif Bilddatei hoch.",
54
- button: "Neues Bild hochladen",
53
+ text: "Bitte laden Sie ein Bild im {{formats}} Format hoch.",
54
+ button: "Erneut versuchen",
55
+ },
56
+ heicNotSupportedBlock: {
57
+ title: "HEIC wird nicht unterstützt",
58
+ text: "HEIC-Dateien werden nur in Safari und iOS-Browsern unterstützt. Bitte verwenden Sie ein anderes Format.",
59
+ button: "Erneut versuchen",
55
60
  },
56
61
  wrongAspectRatioBlock: {
57
62
  title: "Das Bild ist zu schmal",
58
- button: "Neues Bild hochladen",
63
+ button: "Erneut versuchen",
59
64
  },
60
65
  filters: {
61
66
  modal: {
@@ -168,7 +173,7 @@ const resources = {
168
173
  },
169
174
  emptyResultsBlock: {
170
175
  title: "Sorry, nothing found",
171
- button: "Upload another image",
176
+ button: "Try again",
172
177
  },
173
178
  serverErrorBlock: {
174
179
  title: "Something went wrong",
@@ -176,12 +181,17 @@ const resources = {
176
181
  },
177
182
  wrongFormatBlock: {
178
183
  title: "Wrong file format",
179
- text: "Please upload a .jpg, .png, .webp or .avif image file.",
180
- button: "Upload another file",
184
+ text: "Please upload an image in {{formats}} format.",
185
+ button: "Try again",
186
+ },
187
+ heicNotSupportedBlock: {
188
+ title: "HEIC not supported",
189
+ text: "HEIC files are only supported in Safari and iOS browsers. Please use a different format.",
190
+ button: "Try again",
181
191
  },
182
192
  wrongAspectRatioBlock: {
183
193
  title: "The image is too narrow",
184
- button: "Upload another image",
194
+ button: "Try again",
185
195
  },
186
196
  filters: {
187
197
  modal: {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var store = require('./store-CrCuJC55.js');
4
- var Rectangle = require('./Rectangle-DVEulpFu.js');
4
+ var Rectangle = require('./Rectangle-DfUOGfXS.js');
5
5
 
6
6
  var _Array = {};
7
7
 
@@ -7702,14 +7702,87 @@ var findFirstMap$1 = function (f) {
7702
7702
  */
7703
7703
  var findFirstMap = findFirstMap$1;
7704
7704
 
7705
- const SUPPORTED_FILE_TYPES = ["jpg", "jpeg", "png", "webp", "avif"];
7706
- const acceptableFileFormats = SUPPORTED_FILE_TYPES.map((type) => `.${type}`).join(", ");
7705
+ // Responsive breakpoints - can be customized per component needs
7706
+ const DEFAULT_BREAKPOINTS = {
7707
+ DESKTOP: 768};
7708
+ // User agent based device detection
7709
+ const checkDeviceType = () => {
7710
+ const ua = navigator.userAgent;
7711
+ if (/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(ua)) {
7712
+ return "tablet";
7713
+ }
7714
+ else if (/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(ua)) {
7715
+ return "mobile";
7716
+ }
7717
+ return "desktop";
7718
+ };
7719
+ const isWebKitEngine = () => {
7720
+ if (typeof navigator === "undefined")
7721
+ return false;
7722
+ const ua = navigator.userAgent;
7723
+ // On iOS, all browsers use WebKit under the hood (Apple requirement)
7724
+ if (/iPhone|iPad|iPod/.test(ua))
7725
+ return true;
7726
+ // On desktop, check for WebKit but exclude Chrome, Edge, and Opera
7727
+ return /WebKit/.test(ua) && !/Chrome|Edg|OPR/.test(ua);
7728
+ };
7729
+ // Screen size based responsive detection
7730
+ const isDesktop = (breakpoint = DEFAULT_BREAKPOINTS.DESKTOP) => {
7731
+ if (typeof window === "undefined")
7732
+ return false;
7733
+ return window.innerWidth >= breakpoint;
7734
+ };
7735
+
7736
+ // Browsers may report the same file as either "image/heic" or "image/heif"
7737
+ const SUPPORTED_FILE_TYPES = [
7738
+ "jpg",
7739
+ "jpeg",
7740
+ "png",
7741
+ "webp",
7742
+ "avif",
7743
+ "heic",
7744
+ "heif",
7745
+ ];
7746
+ const BASE_FILE_FORMATS = ["jpg", "jpeg", "png", "webp", "avif"];
7747
+ const getFormatToMime = (format) => {
7748
+ // jpg and jpeg both map to image/jpeg
7749
+ return format === "jpg" ? "image/jpeg" : `image/${format}`;
7750
+ };
7751
+ const FORMAT_TO_MIME = Object.fromEntries(SUPPORTED_FILE_TYPES.map((format) => [format, getFormatToMime(format)]));
7752
+ const getAcceptableFileFormats = () => {
7753
+ const formats = isWebKitEngine()
7754
+ ? [...BASE_FILE_FORMATS, "heic"]
7755
+ : BASE_FILE_FORMATS;
7756
+ // Include both MIME types and file extensions for better browser compatibility
7757
+ const mimeTypes = formats.map((type) => FORMAT_TO_MIME[type]);
7758
+ const extensions = formats.map((type) => `.${type}`);
7759
+ return [...mimeTypes, ...extensions].join(",");
7760
+ };
7761
+ const getAcceptableFileFormatsForDisplay = () => {
7762
+ const formats = isWebKitEngine()
7763
+ ? [...BASE_FILE_FORMATS, "heic"]
7764
+ : BASE_FILE_FORMATS;
7765
+ const formattedTypes = formats
7766
+ .filter((type) => type !== "jpeg")
7767
+ .map((type) => `.${type}`);
7768
+ const lastFormat = formattedTypes.pop();
7769
+ return `${formattedTypes.join(", ")}, or ${lastFormat}`;
7770
+ };
7707
7771
  const unsupportedFileTypeError = {
7708
7772
  kind: "client",
7709
7773
  inner: "File format not supported",
7774
+ code: "unsupported-file-type",
7775
+ };
7776
+ const heicNotSupportedError = {
7777
+ kind: "client",
7778
+ inner: "HEIC format is only supported in Safari and iOS browsers",
7779
+ code: "heic-not-supported",
7710
7780
  };
7711
7781
  const checkImageType = (file) => {
7712
7782
  const fileType = file.type.split("/")[1];
7783
+ if ((fileType === "heic" || fileType === "heif") && !isWebKitEngine()) {
7784
+ return Rectangle.EitherExports.left(heicNotSupportedError);
7785
+ }
7713
7786
  const supportedFileType = findFirstMap((supportedType) => supportedType === fileType ? Rectangle.OptionExports.some(file) : Rectangle.OptionExports.none)(SUPPORTED_FILE_TYPES);
7714
7787
  return Rectangle._functionExports.pipe(supportedFileType, Rectangle.EitherExports.fromOption(() => unsupportedFileTypeError));
7715
7788
  };
@@ -7726,13 +7799,21 @@ const fileToB64 = async (f) => new Promise((resolve) => {
7726
7799
  reader.readAsDataURL(f);
7727
7800
  });
7728
7801
 
7729
- const imageFromFileTask = (f) => () => new Promise((resolve, _) => {
7802
+ const imageFromFileTask = (f) => () => new Promise((resolve, reject) => {
7730
7803
  const reader = new FileReader();
7731
7804
  const image = new Image();
7732
7805
  reader.onload = (e) => {
7733
7806
  image.src = e.target.result;
7734
7807
  };
7735
- image.onload = () => resolve(image);
7808
+ reader.onerror = () => {
7809
+ reject(new Error("Failed to read file"));
7810
+ };
7811
+ image.onload = () => {
7812
+ resolve(image);
7813
+ };
7814
+ image.onerror = () => {
7815
+ reject(new Error("Failed to load image"));
7816
+ };
7736
7817
  reader.readAsDataURL(f);
7737
7818
  });
7738
7819
 
@@ -8476,11 +8557,14 @@ const useSearchStore = (showInWidget) => showInWidget
8476
8557
  };
8477
8558
 
8478
8559
  exports._ArrayExports = _ArrayExports;
8479
- exports.acceptableFileFormats = acceptableFileFormats;
8480
8560
  exports.addIfNotEmpty = addIfNotEmpty;
8561
+ exports.checkDeviceType = checkDeviceType;
8481
8562
  exports.checkImageType = checkImageType;
8563
+ exports.getAcceptableFileFormats = getAcceptableFileFormats;
8564
+ exports.getAcceptableFileFormatsForDisplay = getAcceptableFileFormatsForDisplay;
8482
8565
  exports.getImageSizes = getImageSizes;
8483
8566
  exports.imageFromFileTask = imageFromFileTask;
8567
+ exports.isDesktop = isDesktop;
8484
8568
  exports.makeProductListingPageRequest = makeProductListingPageRequest;
8485
8569
  exports.makeTextSearchRequest = makeTextSearchRequest;
8486
8570
  exports.makeUploadFileRequest = makeUploadFileRequest;
@@ -2,13 +2,13 @@
2
2
 
3
3
  var index = require('./index-OrE9ITel.js');
4
4
  var i18next = require('./i18next-DkN_8H9H.js');
5
+ var search_store = require('./search.store-B_KXvC4d.js');
5
6
  var customizedSlots = require('./customized-slots-BzqsGchC.js');
6
- var _package = require('./package-BPYUOfCB.js');
7
+ var _package = require('./package-Dp3CQTMp.js');
7
8
  var SecondaryActionIcon = require('./SecondaryActionIcon-BZg-ADIW.js');
8
9
  var index$1 = require('./index-CpJcNhVM.js');
9
- var search_store = require('./search.store-DzzR8sHn.js');
10
10
  var constants = require('./constants-BlwqMvns.js');
11
- var Rectangle = require('./Rectangle-DVEulpFu.js');
11
+ var Rectangle = require('./Rectangle-DfUOGfXS.js');
12
12
  var index$2 = require('./index-tXcMfW9y.js');
13
13
  require('./store-CrCuJC55.js');
14
14
 
@@ -65,9 +65,15 @@ const errorTypeConfig = {
65
65
  hasText: true,
66
66
  hasButton: true,
67
67
  },
68
+ "heic-not-supported": {
69
+ i18nKey: "heicNotSupportedBlock",
70
+ hasTopMargin: false,
71
+ hasText: true,
72
+ hasButton: true,
73
+ },
68
74
  };
69
75
 
70
- const vviinnErrorCss = ":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--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-display:40px;--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:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--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:#707070;--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;--button-bg-color-positive:#dcfce7;--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;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--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;--sidebar-animation-duration:0.5s;}:host{display:block;font-family:var(--font-family, var(--font-family-base))}:host(.add-background){background:var(--surface-bg-color-01)}:host(.add-top-margin){margin-top:var(--spacing-400)}.error-content{display:grid;grid-gap:var(--spacing-150);text-align:center;justify-items:center;width:356px;padding:var(--spacing-200);max-width:calc(100vw - 2 * var(--spacing-300));border-radius:var(--border-radius-200);box-sizing:border-box;margin:0 auto}.error-content.add-background{background:var(--surface-bg-color-01)}svg,::slotted(svg){display:grid;align-self:center}h4,::slotted(h4){margin:unset;font-weight:var(--font-weight-600);font-size:var(--font-size-headline);line-height:var(--line-height-headline)}span,::slotted(span){font-size:14px;line-height:20px}button,::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;font-size:var(--font-size-label);font-weight:var(--font-weight-500);background:var(--color-primary, var(--button-bg-color-primary));border-radius:var(--border-radius-100);padding:var(--spacing-100);font-size:var(--font-size-body);color:var(--color-text-inverse);font-family:var(--font-family, var(--font-family-base))}button:hover,::slotted(button:hover){background:var(--button-bg-color-primary-hover)}";
76
+ const vviinnErrorCss = ":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--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-display:40px;--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:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--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:#707070;--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;--button-bg-color-positive:#dcfce7;--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;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--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;--sidebar-animation-duration:0.5s;}:host{display:block;font-family:var(--font-family, var(--font-family-base))}:host(.add-background){background:var(--surface-bg-color-01)}:host(.add-top-margin){margin-top:var(--spacing-400)}.error-content{display:grid;grid-gap:var(--spacing-150);text-align:center;justify-items:center;max-width:356px;padding:var(--spacing-200);border-radius:var(--border-radius-200);box-sizing:border-box;margin:0 auto}.error-content.add-background{background:var(--surface-bg-color-01)}svg,::slotted(svg){display:grid;align-self:center}h4,::slotted(h4){margin:unset;font-weight:var(--font-weight-600);font-size:var(--font-size-headline);line-height:var(--line-height-headline)}span,::slotted(span){font-size:14px;line-height:20px}button,::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;font-size:var(--font-size-label);font-weight:var(--font-weight-500);background:var(--color-primary, var(--button-bg-color-primary));border-radius:var(--border-radius-100);padding:var(--spacing-100);font-size:var(--font-size-body);color:var(--color-text-inverse);font-family:var(--font-family, var(--font-family-base))}button:hover,::slotted(button:hover){background:var(--button-bg-color-primary-hover)}";
71
77
 
72
78
  const VviinnError = class {
73
79
  constructor(hostRef) {
@@ -79,9 +85,14 @@ const VviinnError = class {
79
85
  if (!this.errorType)
80
86
  return null;
81
87
  const config = errorTypeConfig[this.errorType];
88
+ const translationOptions = this.errorType === "wrong-format"
89
+ ? { formats: search_store.getAcceptableFileFormatsForDisplay() }
90
+ : undefined;
82
91
  return {
83
92
  title: i18next.instance.t(`${config.i18nKey}.title`),
84
- text: config.hasText ? i18next.instance.t(`${config.i18nKey}.text`) : null,
93
+ text: config.hasText
94
+ ? i18next.instance.t(`${config.i18nKey}.text`, translationOptions)
95
+ : null,
85
96
  buttonText: this.hasButton()
86
97
  ? i18next.instance.t(`${config.i18nKey}.button`)
87
98
  : null,
@@ -118,7 +129,7 @@ const VviinnError = class {
118
129
  index.h("slot", { name: "text" }),
119
130
  index.h("slot", { name: "action" }),
120
131
  ];
121
- return (index.h(index.Host, { key: 'bbb411a22626197b25a8630b67aa618099330bff', class: hostClasses }, index.h("div", { key: 'ae22222ddd6ff1a146c39c6d8742f7e5e8de43ae', class: contentClasses }, errorContent)));
132
+ return (index.h(index.Host, { key: '114a7b3790c7dc137b7bdd0032f3459296dab45b', class: hostClasses }, index.h("div", { key: '1d6bb34d1483a3d1ef972e01d25312e1784cd304', class: contentClasses }, errorContent)));
122
133
  }
123
134
  };
124
135
  VviinnError.style = vviinnErrorCss;
@@ -415,7 +426,7 @@ const VviinnVprButton = class {
415
426
  this.showFilters = false;
416
427
  /** Wrap the Product Card's price values in the container. */
417
428
  this.addPriceContainer = false;
418
- /** One click Discovery mode*/
429
+ /** One-Click Discovery mode*/
419
430
  this.oneClickDiscoveryMode = "modal";
420
431
  /** List of discounts for Set mode. Example: "5, 10, 15, 20" (could be less than 4 numbers) */
421
432
  this.setModeDiscounts = this.mode === "set" ? "5, 10, 15" : "";
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-OrE9ITel.js');
4
- var Rectangle = require('./Rectangle-DVEulpFu.js');
5
- var search_store = require('./search.store-DzzR8sHn.js');
4
+ var Rectangle = require('./Rectangle-DfUOGfXS.js');
5
+ var search_store = require('./search.store-B_KXvC4d.js');
6
6
  var customizedSlots = require('./customized-slots-BzqsGchC.js');
7
- var index$2 = require('./index-DDfB2zej.js');
7
+ var index$2 = require('./index-B-eF0nQu.js');
8
8
  var index$1 = require('./index-C3G9W48a.js');
9
9
  var i18next = require('./i18next-DkN_8H9H.js');
10
- var checkDeviceType = require('./checkDeviceType-iUhpuLlH.js');
10
+ var cropperUtils = require('./cropperUtils-Bam-BTEk.js');
11
11
  var store = require('./store-CrCuJC55.js');
12
12
  var index$3 = require('./index-tXcMfW9y.js');
13
- var _package = require('./package-BPYUOfCB.js');
14
- var resources = require('./resources-DKz1qCqs.js');
13
+ var _package = require('./package-Dp3CQTMp.js');
14
+ var resources = require('./resources-CuHgJnvC.js');
15
15
  var index$4 = require('./index-CpJcNhVM.js');
16
16
  var constants = require('./constants-BlwqMvns.js');
17
17
  var triggerFilter = require('./triggerFilter-DFGg92Xh.js');
@@ -184,7 +184,7 @@ const vviinnCropperCss = ".cropper-container{direction:ltr;font-size:0;line-heig
184
184
 
185
185
  const ValidateCropBoxData = (cropBoxData) => {
186
186
  const { width, height, left, top } = cropBoxData;
187
- const minSize = checkDeviceType.MIN_SEARCH_AREA_SIZE;
187
+ const minSize = cropperUtils.MIN_SEARCH_AREA_SIZE;
188
188
  let result = {
189
189
  width,
190
190
  height,
@@ -224,7 +224,7 @@ const VviinnCropper = class {
224
224
  this.initPreloadedImage = () => {
225
225
  var _a;
226
226
  if (this.showInWidget) {
227
- const [width, height] = search_store.getImageSizes(this.state.image, checkDeviceType.DEFAULT_IMAGE_SIZE);
227
+ const [width, height] = search_store.getImageSizes(this.state.image, cropperUtils.DEFAULT_IMAGE_SIZE);
228
228
  this.width = width;
229
229
  this.height = height;
230
230
  }
@@ -291,24 +291,24 @@ const VviinnCropper = class {
291
291
  imageBounds,
292
292
  });
293
293
  this.state.imageBounds = imageBounds;
294
- if (width / height < checkDeviceType.SUPPORTED_ASPECT_RATIO ||
295
- height / width < checkDeviceType.SUPPORTED_ASPECT_RATIO) {
294
+ if (width / height < cropperUtils.SUPPORTED_ASPECT_RATIO ||
295
+ height / width < cropperUtils.SUPPORTED_ASPECT_RATIO) {
296
296
  this.vviinnCropperAspectRatioError.emit(true);
297
297
  return;
298
298
  }
299
- if (width < checkDeviceType.MIN_IMAGE_SIDE_FOR_CROPPER ||
300
- height < checkDeviceType.MIN_IMAGE_SIDE_FOR_CROPPER) {
299
+ if (width < cropperUtils.MIN_IMAGE_SIDE_FOR_CROPPER ||
300
+ height < cropperUtils.MIN_IMAGE_SIDE_FOR_CROPPER) {
301
301
  return;
302
302
  }
303
- this.cropper = new checkDeviceType.Cropper(renderedImageElement, Object.assign(Object.assign({}, checkDeviceType.cropperOptions), { cropstart: this.cropStart, cropend: this.cropEnd, ready: () => this.cropper.reset(), data }));
303
+ this.cropper = new cropperUtils.Cropper(renderedImageElement, Object.assign(Object.assign({}, cropperUtils.cropperOptions), { cropstart: this.cropStart, cropend: this.cropEnd, ready: () => this.cropper.reset(), data }));
304
304
  }
305
305
  };
306
306
  this.cropStart = () => {
307
- this.startEndCropBoxData = checkDeviceType.getCropBoxData(this.cropper);
307
+ this.startEndCropBoxData = cropperUtils.getCropBoxData(this.cropper);
308
308
  };
309
309
  this.cropEnd = () => {
310
- const cropboxData = checkDeviceType.getCropBoxData(this.cropper);
311
- if (checkDeviceType.isCropBoxChangeMinimal(this.startEndCropBoxData, cropboxData))
310
+ const cropboxData = cropperUtils.getCropBoxData(this.cropper);
311
+ if (cropperUtils.isCropBoxChangeMinimal(this.startEndCropBoxData, cropboxData))
312
312
  return;
313
313
  this.vviinnCropperCropEnd.emit(cropboxData);
314
314
  this.state.searchArea = cropboxData;
@@ -405,7 +405,7 @@ const VviinnImageSelector = class {
405
405
  return;
406
406
  const validationResult = search_store.checkImageType(file);
407
407
  if (Rectangle.isLeft(validationResult)) {
408
- this.vviinnNoResult.emit(Object.assign(Object.assign({}, this.basicEventData), { reason: validationResult.left.kind }));
408
+ this.vviinnNoResult.emit(Object.assign(Object.assign({}, this.basicEventData), { reason: validationResult.left.kind, errorMessage: validationResult.left.inner, errorCode: validationResult.left.code }));
409
409
  input.value = "";
410
410
  return;
411
411
  }
@@ -431,13 +431,13 @@ const VviinnImageSelector = class {
431
431
  }
432
432
  }
433
433
  render() {
434
- return (index.h(index.Host, { key: 'eeb20543974f863300028f7faaacb6b7786662f0', exportparts: "button" }, this.loading ? (index.h("vviinn-preloader", null)) : (index.h("label", { htmlFor: "fileInput", part: "button", tabindex: "0", onKeyDown: (e) => {
434
+ return (index.h(index.Host, { key: 'd0124580081d2f3bf70d1e37511cb6c98d7090b4', exportparts: "button" }, this.loading ? (index.h("vviinn-preloader", null)) : (index.h("label", { htmlFor: "fileInput", part: "button", tabindex: "0", onKeyDown: (e) => {
435
435
  var _a;
436
436
  if (e.key === "Enter" || e.key === " ") {
437
437
  e.preventDefault();
438
438
  (_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click();
439
439
  }
440
- } }, index.h("slot", { name: "upload-button-text" }, "Upload image"))), index.h("input", { key: '1f113939572e0e268aa4e21b188a33ea3a8104cd', id: "fileInput", class: "visually-hidden", type: "file", tabindex: "-1", accept: search_store.acceptableFileFormats, onChange: (event) => this.handleInputChange(event), ref: (el) => (this.fileInput = el) })));
440
+ } }, index.h("slot", { name: "upload-button-text" }, "Upload image"))), index.h("input", { key: '7e23c76be62e2ca38cb772c293162effe0fb2598', id: "fileInput", class: "visually-hidden", type: "file", tabindex: "-1", accept: search_store.getAcceptableFileFormats(), onChange: (event) => this.handleInputChange(event), ref: (el) => (this.fileInput = el) })));
441
441
  }
442
442
  static get watchers() { return {
443
443
  "startUpload": ["startUploadWatcher"]
@@ -543,7 +543,7 @@ const VviinnResults = class {
543
543
  this.filterColumn = "product_type";
544
544
  /** Wrap the Product Card's price values in the container. */
545
545
  this.addPriceContainer = false;
546
- /** One-click Discovery Mode */
546
+ /** One-Click Discovery Mode */
547
547
  this.oneClickDiscoveryMode = "append-grid";
548
548
  /** Comma-separated list of campaign IDs */
549
549
  this.oneClickDiscoveryCampaigns = "";
@@ -1400,7 +1400,7 @@ const VviinnVpsWidget = class {
1400
1400
  this.addToBasketShow = false;
1401
1401
  /** Show or hide Favorite button */
1402
1402
  this.favoriteShow = false;
1403
- /** One click Discovery mode, restricted to append only (no modal supported for this component)*/
1403
+ /** One-Click Discovery mode, restricted to append only (no modal supported for this component)*/
1404
1404
  this.oneClickDiscoveryMode = "append-grid";
1405
1405
  /** Comma-separated list of campaign IDs */
1406
1406
  this.oneClickDiscoveryCampaigns = "";
@@ -1444,7 +1444,12 @@ const VviinnVpsWidget = class {
1444
1444
  };
1445
1445
  this.handleVviinnNoResult = (detail) => {
1446
1446
  if (detail.reason === "client") {
1447
- this.wrongImageFormat = true;
1447
+ if (detail.errorCode === "heic-not-supported") {
1448
+ this.wrongImageFormat = "heic-not-supported";
1449
+ }
1450
+ else {
1451
+ this.wrongImageFormat = "wrong-format";
1452
+ }
1448
1453
  }
1449
1454
  };
1450
1455
  this.adjustCameraSettings = async () => {
@@ -1648,7 +1653,7 @@ const VviinnVpsWidget = class {
1648
1653
  }
1649
1654
  connectedCallback() {
1650
1655
  store.updateGlobalState(this);
1651
- this.isDesktop = checkDeviceType.checkDeviceType() === "desktop";
1656
+ this.isDesktop = search_store.checkDeviceType() === "desktop";
1652
1657
  const { state, storeName } = search_store.useSearchStore(this.showInWidget);
1653
1658
  this.storeName = storeName;
1654
1659
  this.state = state;
@@ -1706,11 +1711,11 @@ const VviinnVpsWidget = class {
1706
1711
  return this.isDesktop ? buttons.reverse() : buttons;
1707
1712
  }
1708
1713
  haveErrors() {
1709
- return this.wrongImageFormat || this.state.searchStatus === "error";
1714
+ return !!this.wrongImageFormat || this.state.searchStatus === "error";
1710
1715
  }
1711
1716
  getCurrentErrorType() {
1712
1717
  if (this.wrongImageFormat)
1713
- return "wrong-format";
1718
+ return this.wrongImageFormat;
1714
1719
  if (this.state.searchStatus === "error")
1715
1720
  return "server-error";
1716
1721
  return null;
@@ -1728,31 +1733,31 @@ const VviinnVpsWidget = class {
1728
1733
  }
1729
1734
  render() {
1730
1735
  var _a, _b, _c;
1731
- return (index.h(index.Host, { key: '152cf0eb3a078a9f70d4348bca33145492e2a910', exportparts: `${index$4.modalParts}, ${index$4.productCardParts}, ${index$4.searchBarParts}, ${index$4.searchWidgetFilterParts}, ${index$4.searchWidgetButtonParts}, ${index$4.productCardsGridPart}, ${index$4.suggestionsParts}` }, !this.showingInButton && customizedSlots.SlotSkeleton("search"), index.h("vviinn-overlayed-modal", { key: '6f085a9cd82b90de2bdab8acf5582d467a97c4d0', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
1736
+ return (index.h(index.Host, { key: '512e84afac136a17d4277d121d7788d365e701c4', exportparts: `${index$4.modalParts}, ${index$4.productCardParts}, ${index$4.searchBarParts}, ${index$4.searchWidgetFilterParts}, ${index$4.searchWidgetButtonParts}, ${index$4.productCardsGridPart}, ${index$4.suggestionsParts}` }, !this.showingInButton && customizedSlots.SlotSkeleton("search"), index.h("vviinn-overlayed-modal", { key: '0bf7bb64115aaa74310710854c0b63649ee2ab97', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
1732
1737
  if (detail.campaignTypeId !== "VPR")
1733
1738
  this.handleModalClose();
1734
1739
  }, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: _package.version, hideBackButton: (this.mode === "upload" && this.showingInButton) ||
1735
- (!this.isCameraEnabled && this.isOnboardingSlide()), exportparts: index$4.modalParts }, index.h("vviinn-slider", { key: '7a378453adce3fb127ef441397d2d076cb83f670', position: this.slidePosition }, index.h("vviinn-slide", { key: 'a235f63d6e6ad580ab11830e93f17448516aebf7', class: {
1740
+ (!this.isCameraEnabled && this.isOnboardingSlide()), exportparts: index$4.modalParts }, index.h("vviinn-slider", { key: '1c7263f154d94e9b514adbde5eac726dc7072f49', position: this.slidePosition }, index.h("vviinn-slide", { key: '66c0c5a630306ed49a71635eb9c0b8a9437ea13b', class: {
1736
1741
  "start-page": true,
1737
1742
  "camera-enabled": this.isCameraEnabled,
1738
- } }, index.h("vviinn-camera", { key: '9930467401150d6a3d268dab4b70f2ef128c58d5', onVviinnImageUploadFinished: this.handleVviinnImageUploadFinished, onVviinnImageUploadStarted: () => {
1743
+ } }, index.h("vviinn-camera", { key: '6ef14a6e264bcb80dc7d55ee975485fc5c508d89', onVviinnImageUploadFinished: this.handleVviinnImageUploadFinished, onVviinnImageUploadStarted: () => {
1739
1744
  this.handleVviinnImageUpload("startCamera");
1740
- }, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), index.h("div", { key: '94edca192eecf6e6b86d9aa887eb40e0eada759c', class: {
1745
+ }, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), index.h("div", { key: '7b8424c741ce780ace289dc5097cd0baaaf3c1c7', class: {
1741
1746
  error: this.haveErrors(),
1742
- }, id: "start-page_block" }, index.h("div", { key: '9786a4e70b20481b8df764256cccc497ae751aee', class: "start-page_main-content" }, (this.wrongImageFormat ||
1743
- this.state.searchStatus === "error") && (index.h("div", { key: '36793f03bac1bf95f08502ef8b9c93f7d08bc49d', class: "start-page_errors-block" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '2a8e3c276d5e676929a8ceb9ea72d3ec0ee8fd12', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: this.showInWidget, searchType: this.state.searchType })))), !this.haveErrors() && (index.h(index.Fragment, { key: '38e2ca51e336a2af6ec0940c3078c9fd95973ef4' }, index.h("vviinn-teaser", { key: 'c4cb04f7105fdff07f2d6fede283ce14c1570b85' }), index.h("div", { key: '079246053331158053c1efa9f7e080ce9215e42f', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && (index.h("vviinn-text-search", { key: '5cacf0c79dde67167bd48c467142c4587c3ad3bc', token: store.globalState.token, apiPath: store.globalState.apiPath, locale: store.globalState.locale, showInWidget: true, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), "save-image-mode": "never" }))))), index.h("vviinn-privacy-badge", { key: 'a5faa0e35d6d380cba513a9eca4d603fda657acf', privacyBadgeText: i18next.instance.t("privacyBadgeText", {
1747
+ }, id: "start-page_block" }, index.h("div", { key: 'fb8fb7994ef7cdc85ae9324a3f139edc1a1820e4', class: "start-page_main-content" }, (this.wrongImageFormat ||
1748
+ this.state.searchStatus === "error") && (index.h("div", { key: '453f1f1918cbc5648c1c3e553f479159dc46c678', class: "start-page_errors-block" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '63c33a0744c8f1b65e747846613eeae98337725b', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (index.h(index.Fragment, { key: 'e051291ac25269ab5479372f4c3c0f5f16eea417' }, index.h("vviinn-teaser", { key: 'b640a81ef046eb60aaa343c1a020fa39ef6bf7ca' }), index.h("div", { key: '210fffcdaf2e27df4ce826faae8c526a598ee67e', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && (index.h("vviinn-text-search", { key: '796313b87d0c8dbfbceb606d6f5b0d4c6ec8fc4a', token: store.globalState.token, apiPath: store.globalState.apiPath, locale: store.globalState.locale, showInWidget: true, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), "save-image-mode": "never" }))))), index.h("vviinn-privacy-badge", { key: '0878f0616c972ee5d0007d886fc5f2fdac65e65b', privacyBadgeText: i18next.instance.t("privacyBadgeText", {
1744
1749
  interpolation: { escapeValue: false },
1745
- }), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { key: '8974a51f6d9780f815ba5eba0e036308dc256a34', class: {
1750
+ }), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { key: '60d313ef6374f80e3719cfcc8308fd82fcae3c7d', class: {
1746
1751
  "results-page": true,
1747
1752
  active: this.isResultSlide(),
1748
- } }, this.isResultSlide() && (index.h("div", { key: '9fcbb518c5d9280b3f9314e7c9c4d7eca0aad134', class: "source-wrapper" }, this.isTextSearch() ? (index.h(index.Fragment, null, index.h("vviinn-text-search", { token: this.token, showInWidget: true, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), "save-image-mode": "never" }), index.h("vviinn-suggestions", { showInWidget: true, token: this.token, apiPath: this.apiPath, locale: this.locale }))) : (index.h("vviinn-cropper", { basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: true, "save-image-mode": "never" })), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("div", { key: 'a38894fe6c7ce126ea5100c584c6e9b1bd2a541f', class: {
1753
+ } }, this.isResultSlide() && (index.h("div", { key: 'eefe890a59fc3f4f8b1f0a53427c53d99d5f7f06', class: "source-wrapper" }, this.isTextSearch() ? (index.h(index.Fragment, null, index.h("vviinn-text-search", { token: this.token, showInWidget: true, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), "save-image-mode": "never" }), index.h("vviinn-suggestions", { showInWidget: true, token: this.token, apiPath: this.apiPath, locale: this.locale }))) : (index.h("vviinn-cropper", { basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: true, "save-image-mode": "never" })), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("div", { key: '3b366c34c1d55c7509614af04823b3e362173097', class: {
1749
1754
  "filters-wrapper": true,
1750
1755
  hidden: this.showAspectRatioError,
1751
- } }, index.h("vviinn-filters", { key: '10641914efdd0f2c45bee1e3eb5685ce495058e5', class: "preview-filters", showInWidget: true, showIntervalInputs: this.showIntervalInputs, exportparts: index$4.filtersParts }), index.h("vviinn-extended-filters", { key: '499f32d23e53aaa091a59ddb5b10e39e8ae145e9', class: "preview-extended-filters", mode: "preview", showHeader: false, exportparts: index$4.extendedFiltersParts, showInWidget: true, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters-button", { key: '6ea940a127bc2eb58e7961d117f86f9ad1e22c5f', class: {
1756
+ } }, index.h("vviinn-filters", { key: '37811e1f5e7fc4a71dfcd317ac6cef9cce90c2f9', class: "preview-filters", showInWidget: true, showIntervalInputs: this.showIntervalInputs, exportparts: index$4.filtersParts }), index.h("vviinn-extended-filters", { key: '0d05c58e2955e1329415f3a4df8c78d14a4505eb', class: "preview-extended-filters", mode: "preview", showHeader: false, exportparts: index$4.extendedFiltersParts, showInWidget: true, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters-button", { key: 'f96b9a14f5318c1f22862ac68ffb3658bdab5da9', class: {
1752
1757
  "extended-filters-button": true,
1753
1758
  "has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
1754
1759
  .length > 0,
1755
- }, exportparts: "extended-filters-button", showInWidget: true }))))), this.isResultSlide() && (index.h("vviinn-results", { key: '49a9fbf5311208b5f963bf95a7ff1e6cb8263437', token: store.globalState.token, locale: store.globalState.locale, pricePrefix: store.globalState.pricePrefix, "currency-sign": store.globalState.currencySign, apiPath: store.globalState.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: true, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody })))), index.h("vviinn-extended-filters", { key: '0e06fb1687958edef866927a77108492bfbbb692', class: "modal-extended-filters", mode: "modal", exportparts: index$4.extendedFiltersParts, showInWidget: true, showIntervalInputs: this.showIntervalInputs }))));
1760
+ }, exportparts: "extended-filters-button", showInWidget: true }))))), this.isResultSlide() && (index.h("vviinn-results", { key: '870f8ccad55c7bb96635bb243bd01db7575dc290', token: store.globalState.token, locale: store.globalState.locale, pricePrefix: store.globalState.pricePrefix, "currency-sign": store.globalState.currencySign, apiPath: store.globalState.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: true, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody })))), index.h("vviinn-extended-filters", { key: '46956fb1d9a549177dcd71662125c1e3dcad4d64', class: "modal-extended-filters", mode: "modal", exportparts: index$4.extendedFiltersParts, showInWidget: true, showIntervalInputs: this.showIntervalInputs }))));
1756
1761
  }
1757
1762
  get el() { return index.getElement(this); }
1758
1763
  static get watchers() { return {
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-OrE9ITel.js');
4
- var search_store = require('./search.store-DzzR8sHn.js');
5
- var Rectangle = require('./Rectangle-DVEulpFu.js');
4
+ var search_store = require('./search.store-B_KXvC4d.js');
5
+ var Rectangle = require('./Rectangle-DfUOGfXS.js');
6
6
  var i18next = require('./i18next-DkN_8H9H.js');
7
- var _package = require('./package-BPYUOfCB.js');
8
- var index$1 = require('./index-DDfB2zej.js');
7
+ var _package = require('./package-Dp3CQTMp.js');
8
+ var index$1 = require('./index-B-eF0nQu.js');
9
9
  var constants = require('./constants-BlwqMvns.js');
10
10
  var customizedSlots = require('./customized-slots-BzqsGchC.js');
11
11
  var index$2 = require('./index-CpJcNhVM.js');
12
12
  var RenderFilterButton = require('./RenderFilterButton-CSLqPags.js');
13
- var resources = require('./resources-DKz1qCqs.js');
13
+ var resources = require('./resources-CuHgJnvC.js');
14
14
  var triggerFilter = require('./triggerFilter-DFGg92Xh.js');
15
15
  var store = require('./store-CrCuJC55.js');
16
16
  var index$3 = require('./index-tXcMfW9y.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-OrE9ITel.js');
4
- var Rectangle = require('./Rectangle-DVEulpFu.js');
4
+ var Rectangle = require('./Rectangle-DfUOGfXS.js');
5
5
  var i18next = require('./i18next-DkN_8H9H.js');
6
6
  require('./store-CrCuJC55.js');
7
7
 
@@ -3,13 +3,13 @@
3
3
  var index = require('./index-OrE9ITel.js');
4
4
  var RenderFilterButton = require('./RenderFilterButton-CSLqPags.js');
5
5
  var triggerFilter = require('./triggerFilter-DFGg92Xh.js');
6
- var search_store = require('./search.store-DzzR8sHn.js');
6
+ var search_store = require('./search.store-B_KXvC4d.js');
7
7
  var store = require('./store-CrCuJC55.js');
8
8
  var i18next = require('./i18next-DkN_8H9H.js');
9
- var resources = require('./resources-DKz1qCqs.js');
9
+ var resources = require('./resources-CuHgJnvC.js');
10
10
  var index$1 = require('./index-C3G9W48a.js');
11
11
  var index$2 = require('./index-tXcMfW9y.js');
12
- require('./Rectangle-DVEulpFu.js');
12
+ require('./Rectangle-DfUOGfXS.js');
13
13
 
14
14
  const TextIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" },
15
15
  index.h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },