vviinn-widgets 2.18.21 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-cb410762.js → Campaign-a94a827a.js} +17 -1
- package/dist/cjs/cropper-handler_29.cjs.entry.js +1418 -0
- package/dist/cjs/{imageSearch.store-98824653.js → index-48c94264.js} +16016 -11171
- package/dist/cjs/{index-7f1325a7.js → index-a4becaff.js} +683 -303
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +150 -270
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +14 -8
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +12 -14
- package/dist/cjs/vviinn-widgets.cjs.js +10 -3
- package/dist/collection/Image/sizing.spec.js +66 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +2 -16
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +11 -7
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -1
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +40 -37
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +73 -67
- package/dist/collection/components/image-search/search-filters/search-filters.css +4 -23
- package/dist/collection/components/image-search/search-filters/search-filters.js +97 -91
- package/dist/collection/components/vviinn-button/vviinn-button.js +34 -31
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +1 -2
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +161 -156
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +12 -14
- package/dist/collection/components/vviinn-error/vviinn-error.js +12 -12
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +35 -30
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +35 -30
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -121
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +75 -75
- package/dist/collection/components/vviinn-icons/index.js +10 -27
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +120 -67
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +81 -69
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -1
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +27 -28
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +7 -36
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +115 -93
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +12 -14
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +12 -14
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +12 -14
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +12 -17
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +1 -12
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +12 -9
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +107 -78
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +1 -11
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +11 -7
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -1
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +12 -16
- package/dist/collection/components/vviinn-product-card/render-helpers.js +6 -14
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -415
- package/dist/collection/components/vviinn-slider/arrow.js +1 -2
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +12 -9
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -1
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +87 -82
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +12 -18
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +12 -64
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +371 -360
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +448 -444
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +545 -542
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +2 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +368 -332
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -5
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.e2e.js +26 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +502 -425
- package/dist/collection/geometry/Clip.spec.js +16 -0
- package/dist/collection/geometry/Rectangle.spec.js +66 -0
- package/dist/collection/geometry/Sized.spec.js +16 -0
- package/dist/collection/interfaces/generated.js +0 -4
- package/dist/collection/network/ion/Form.spec.js +43 -0
- package/dist/esm/{index-b31d86ce.js → Campaign-4aa53f29.js} +15 -2
- package/dist/esm/cropper-handler_29.entry.js +1386 -0
- package/dist/esm/{index-590cb67e.js → index-48ef9564.js} +683 -304
- package/dist/esm/{imageSearch.store-9dde5360.js → index-976acf7e.js} +16124 -11292
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +106 -225
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +13 -7
- package/dist/esm/vviinn-vpr-button.entry.js +11 -13
- package/dist/esm/vviinn-widgets.js +7 -3
- package/dist/loader/index.d.ts +9 -0
- package/dist/loader/package.json +1 -0
- package/dist/types/Image/sizing.d.ts +4 -4
- package/dist/types/campaign/Campaign.d.ts +5 -5
- package/dist/types/campaign/VCSCampaignResponse.d.ts +1 -1
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +2 -2
- package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +4 -0
- package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +2 -0
- package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -3
- package/dist/types/components/vviinn-slider/arrow.d.ts +2 -2
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -2
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +9 -4
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +8 -0
- package/dist/types/components.d.ts +154 -54
- package/dist/types/error.d.ts +1 -1
- package/dist/types/geometry/Point.d.ts +1 -1
- package/dist/types/geometry/Rectangle.d.ts +1 -1
- package/dist/types/geometry/Sized.d.ts +1 -1
- package/dist/types/interfaces/generated.d.ts +192 -371
- package/dist/types/network/ion/File.d.ts +2 -2
- package/dist/types/network/ion/Form.d.ts +5 -5
- package/dist/types/network/ion/Link.d.ts +1 -1
- package/dist/types/network/ion/ValueObject.d.ts +4 -4
- package/dist/types/network/utils.d.ts +3 -3
- package/dist/types/recommendation/events.d.ts +5 -5
- package/dist/types/recommendation/recommendation.d.ts +1 -1
- package/dist/types/searchSession/searchSession.d.ts +7 -7
- package/dist/types/slider/GridMode.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +98 -23
- package/dist/types/store/imageSearch.store.d.ts +1 -1
- package/dist/types/tracking/models.d.ts +2 -2
- package/dist/types/utils/event/Events.d.ts +1 -1
- package/dist/vviinn-widgets/p-312b0eb7.entry.js +1 -0
- package/dist/vviinn-widgets/p-414b2291.js +1 -0
- package/dist/vviinn-widgets/p-5b50c7e5.entry.js +1 -0
- package/dist/vviinn-widgets/p-8deaa5da.entry.js +1 -0
- package/dist/vviinn-widgets/p-c6209bc1.entry.js +1 -0
- package/{www/build/p-2f9ee951.js → dist/vviinn-widgets/p-d08ce429.js} +1 -1
- package/dist/vviinn-widgets/p-fa17e81f.js +2 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +12 -12
- package/www/build/p-312b0eb7.entry.js +1 -0
- package/www/build/p-414b2291.js +1 -0
- package/www/build/p-5b50c7e5.entry.js +1 -0
- package/www/build/p-8deaa5da.entry.js +1 -0
- package/www/build/p-c6209bc1.entry.js +1 -0
- package/{dist/vviinn-widgets/p-2f9ee951.js → www/build/p-d08ce429.js} +1 -1
- package/www/build/p-d39b7d70.js +161 -0
- package/www/build/p-fa17e81f.js +2 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +2 -2
- package/dist/cjs/Campaign-13258569.js +0 -18
- package/dist/cjs/Handler-176539c8.js +0 -331
- package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
- package/dist/cjs/customized-slots-6e56c354.js +0 -54
- package/dist/cjs/highlight-box_22.cjs.entry.js +0 -770
- package/dist/cjs/index-a99edb90.js +0 -3235
- package/dist/cjs/vviinn-button.cjs.entry.js +0 -21
- package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
- package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -65
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -251
- package/dist/esm/Campaign-90ba7e06.js +0 -14
- package/dist/esm/Handler-f9b8735c.js +0 -309
- package/dist/esm/cropper-handler.entry.js +0 -23
- package/dist/esm/customized-slots-00afe247.js +0 -51
- package/dist/esm/highlight-box_22.entry.js +0 -745
- package/dist/esm/index-4d5b52ba.js +0 -3224
- package/dist/esm/vviinn-button.entry.js +0 -17
- package/dist/esm/vviinn-error.entry.js +0 -15
- package/dist/esm/vviinn-preloader.entry.js +0 -22
- package/dist/esm/vviinn-vps-button.entry.js +0 -61
- package/dist/esm/vviinn-vps-widget.entry.js +0 -247
- package/dist/vviinn-widgets/p-11f61564.js +0 -1
- package/dist/vviinn-widgets/p-12851e97.entry.js +0 -1
- package/dist/vviinn-widgets/p-18fd769b.js +0 -1
- package/dist/vviinn-widgets/p-339c6838.js +0 -1
- package/dist/vviinn-widgets/p-3b2c91c0.entry.js +0 -1
- package/dist/vviinn-widgets/p-45df9f28.entry.js +0 -1
- package/dist/vviinn-widgets/p-57ed5303.entry.js +0 -1
- package/dist/vviinn-widgets/p-69850e5b.js +0 -1
- package/dist/vviinn-widgets/p-7c2f762a.entry.js +0 -1
- package/dist/vviinn-widgets/p-7c3b7388.entry.js +0 -1
- package/dist/vviinn-widgets/p-85006f41.entry.js +0 -1
- package/dist/vviinn-widgets/p-8a3dd76d.entry.js +0 -1
- package/dist/vviinn-widgets/p-99e58be7.entry.js +0 -1
- package/dist/vviinn-widgets/p-a2b450b6.entry.js +0 -1
- package/dist/vviinn-widgets/p-bcc1ccf0.js +0 -1
- package/dist/vviinn-widgets/p-e6fee8d2.js +0 -1
- package/www/build/p-11f61564.js +0 -1
- package/www/build/p-12851e97.entry.js +0 -1
- package/www/build/p-18fd769b.js +0 -1
- package/www/build/p-339c6838.js +0 -1
- package/www/build/p-3b2c91c0.entry.js +0 -1
- package/www/build/p-45df9f28.entry.js +0 -1
- package/www/build/p-57ed5303.entry.js +0 -1
- package/www/build/p-69850e5b.js +0 -1
- package/www/build/p-7c2f762a.entry.js +0 -1
- package/www/build/p-7c3b7388.entry.js +0 -1
- package/www/build/p-85006f41.entry.js +0 -1
- package/www/build/p-8a3dd76d.entry.js +0 -1
- package/www/build/p-99e58be7.entry.js +0 -1
- package/www/build/p-9e2c131a.js +0 -125
- package/www/build/p-a2b450b6.entry.js +0 -1
- package/www/build/p-bcc1ccf0.js +0 -1
- package/www/build/p-e6fee8d2.js +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-590cb67e.js';
|
|
2
|
-
import { V as VisualSearchIcon } from './index-b31d86ce.js';
|
|
3
|
-
|
|
4
|
-
const vviinnButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.raw-open-button{background:none;border:none;cursor:pointer}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#f4f4f4;outline:none}";
|
|
5
|
-
|
|
6
|
-
let VviinnButton = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.addStyle = true;
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
return (h(Host, { exportparts: "button" }, h("button", { class: this.addStyle ? "open-button" : "raw-open-button", part: "button" }, h("slot", null, h(VisualSearchIcon, null)))));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
VviinnButton.style = vviinnButtonCss;
|
|
16
|
-
|
|
17
|
-
export { VviinnButton as vviinn_button };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-590cb67e.js';
|
|
2
|
-
|
|
3
|
-
const vviinnErrorCss = ":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";
|
|
4
|
-
|
|
5
|
-
let VviinnError = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("slot", { name: "icon" }), h("slot", { name: "title" }), h("slot", { name: "text" }), h("slot", { name: "action" })));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
VviinnError.style = vviinnErrorCss;
|
|
14
|
-
|
|
15
|
-
export { VviinnError as vviinn_error };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-590cb67e.js';
|
|
2
|
-
import { i as imageSearchState } from './imageSearch.store-9dde5360.js';
|
|
3
|
-
import './Handler-f9b8735c.js';
|
|
4
|
-
|
|
5
|
-
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;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}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
6
|
-
|
|
7
|
-
let VviinnPreloader = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
}
|
|
11
|
-
isActive() {
|
|
12
|
-
return (imageSearchState.loading || imageSearchState.objectDetectionInProgress);
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return (h(Host, { class: {
|
|
16
|
-
active: this.isActive(),
|
|
17
|
-
} }));
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
VviinnPreloader.style = vviinnPreloaderCss;
|
|
21
|
-
|
|
22
|
-
export { VviinnPreloader as vviinn_preloader };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-590cb67e.js';
|
|
2
|
-
import { a as CameraIcon } from './index-b31d86ce.js';
|
|
3
|
-
import { S as SlotSkeleton } from './customized-slots-00afe247.js';
|
|
4
|
-
import { c as campaignTypeNames } from './Campaign-90ba7e06.js';
|
|
5
|
-
|
|
6
|
-
const vviinnVpsButtonCss = ":host{display:block}";
|
|
7
|
-
|
|
8
|
-
let VviinnVpsButton = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.globalSlotsChanged = createEvent(this, "globalSlotsChanged", 7);
|
|
12
|
-
this.vviinnWidgetOpen = createEvent(this, "vviinnWidgetOpen", 7);
|
|
13
|
-
this.vviinnWidgetLoad = createEvent(this, "vviinnWidgetLoad", 7);
|
|
14
|
-
this.vviinnWidgetClose = createEvent(this, "vviinnWidgetClose", 7);
|
|
15
|
-
this.vviinnProductClick = createEvent(this, "vviinnProductClick", 7);
|
|
16
|
-
this.vviinnProductView = createEvent(this, "vviinnProductView", 7);
|
|
17
|
-
this.vviinnProductLoad = createEvent(this, "vviinnProductLoad", 7);
|
|
18
|
-
this.vviinnImageUpload = createEvent(this, "vviinnImageUpload", 7);
|
|
19
|
-
this.vviinnImageCrop = createEvent(this, "vviinnImageCrop", 7);
|
|
20
|
-
this.vviinnSelectObject = createEvent(this, "vviinnSelectObject", 7);
|
|
21
|
-
this.vviinnSelectFilter = createEvent(this, "vviinnSelectFilter", 7);
|
|
22
|
-
this.vviinnNoResult = createEvent(this, "vviinnNoResult", 7);
|
|
23
|
-
/** Currency sign will shown after price */
|
|
24
|
-
this.currencySign = "€";
|
|
25
|
-
/** Locale for currency formatting */
|
|
26
|
-
this.locale = "de-DE";
|
|
27
|
-
/** Add style to the button */
|
|
28
|
-
this.addStyle = false;
|
|
29
|
-
this.pressed = false;
|
|
30
|
-
}
|
|
31
|
-
handleModalClosed() {
|
|
32
|
-
this.pressed = false;
|
|
33
|
-
}
|
|
34
|
-
componentDidLoad() {
|
|
35
|
-
const slots = this.el.querySelectorAll("[slot]");
|
|
36
|
-
this.globalSlotsChanged.emit(Array.from(slots));
|
|
37
|
-
}
|
|
38
|
-
handleKeyDown(ev) {
|
|
39
|
-
if (ev.code !== "Enter" && ev.code !== "Space")
|
|
40
|
-
return;
|
|
41
|
-
this.pressed = true;
|
|
42
|
-
}
|
|
43
|
-
handleClick() {
|
|
44
|
-
this.pressed = true;
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (h(Host, { tabindex: "0", role: "button", pressed: this.pressed, onKeyDown: (ev) => this.handleKeyDown(ev) }, h("vviinn-button", { onClick: () => {
|
|
48
|
-
this.handleClick();
|
|
49
|
-
this.vviinnWidgetOpen.emit({
|
|
50
|
-
widgetType: "VPS",
|
|
51
|
-
campaignTypeId: "VPS",
|
|
52
|
-
campaignTypeName: campaignTypeNames["VPS"],
|
|
53
|
-
widgetId: this.el.id,
|
|
54
|
-
});
|
|
55
|
-
}, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), h(SlotSkeleton, null), h("vviinn-vps-widget", { active: this.pressed, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, example-images", campaignId: this.campaignId, showingInButton: true, buttonElementId: this.el.id })));
|
|
56
|
-
}
|
|
57
|
-
get el() { return getElement(this); }
|
|
58
|
-
};
|
|
59
|
-
VviinnVpsButton.style = vviinnVpsButtonCss;
|
|
60
|
-
|
|
61
|
-
export { VviinnVpsButton as vviinn_vps_button };
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-590cb67e.js';
|
|
2
|
-
import { i as imageSearchState, s as state, a as _function, O as Option, n as isEmpty } from './imageSearch.store-9dde5360.js';
|
|
3
|
-
import { s as slotChangeListener, S as SlotSkeleton } from './customized-slots-00afe247.js';
|
|
4
|
-
import { e as createProductViewVpsEvent, f as createProductClickVpsEvent, g as createSearchEvent, h as createFilterEvent, v as v4, b as createTrackingApi, i as createWidgetVpsEvent } from './index-4d5b52ba.js';
|
|
5
|
-
import { c as campaignTypeNames } from './Campaign-90ba7e06.js';
|
|
6
|
-
import './Handler-f9b8735c.js';
|
|
7
|
-
|
|
8
|
-
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}: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);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #f4f4f4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #f4f4f4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:4px;border:1px solid #f4f4f4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter):hover{background:#eaeaea}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";
|
|
9
|
-
|
|
10
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s)
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
const filterInt = (value) => /^[-+]?(\d+|Infinity)$/.test(value) ? Number(value) : NaN;
|
|
23
|
-
const notEmptyString = (s) => !isEmpty(s);
|
|
24
|
-
const notNan = (n) => !isNaN(n);
|
|
25
|
-
let VviinnVpsWidget = class {
|
|
26
|
-
constructor(hostRef) {
|
|
27
|
-
registerInstance(this, hostRef);
|
|
28
|
-
this.globalSlotsChanged = createEvent(this, "globalSlotsChanged", 7);
|
|
29
|
-
this.vviinnWidgetLoad = createEvent(this, "vviinnWidgetLoad", 7);
|
|
30
|
-
this.vviinnWidgetClose = createEvent(this, "vviinnWidgetClose", 7);
|
|
31
|
-
this.vviinnProductClick = createEvent(this, "vviinnProductClick", 7);
|
|
32
|
-
this.vviinnProductView = createEvent(this, "vviinnProductView", 7);
|
|
33
|
-
this.vviinnProductLoad = createEvent(this, "vviinnProductLoad", 7);
|
|
34
|
-
this.vviinnImageUpload = createEvent(this, "vviinnImageUpload", 7);
|
|
35
|
-
this.vviinnImageCrop = createEvent(this, "vviinnImageCrop", 7);
|
|
36
|
-
this.vviinnSelectObject = createEvent(this, "vviinnSelectObject", 7);
|
|
37
|
-
this.vviinnSelectFilter = createEvent(this, "vviinnSelectFilter", 7);
|
|
38
|
-
this.vviinnNoResult = createEvent(this, "vviinnNoResult", 7);
|
|
39
|
-
/** @internal */
|
|
40
|
-
this.apiPath = "https://api.vviinn.com";
|
|
41
|
-
/** When true modal window with widget will be shown */
|
|
42
|
-
this.active = false;
|
|
43
|
-
/** Currency sign will shown after price */
|
|
44
|
-
this.currencySign = "€";
|
|
45
|
-
/** Locale for currency formatting */
|
|
46
|
-
this.locale = "de-DE";
|
|
47
|
-
/** Set true when showing the widget in button */
|
|
48
|
-
this.showingInButton = false;
|
|
49
|
-
this.slidePosition = 0;
|
|
50
|
-
this.width = 0;
|
|
51
|
-
this.wrongImageFormat = false;
|
|
52
|
-
this.trackingDeactivated = false;
|
|
53
|
-
this.imageSource = null;
|
|
54
|
-
this.setTrackingDeactivated = (result) => {
|
|
55
|
-
if (result.status === "rejected") {
|
|
56
|
-
this.trackingDeactivated = true;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
this.getBasicEventData = () => {
|
|
60
|
-
var _a;
|
|
61
|
-
return {
|
|
62
|
-
widgetType: "VPS",
|
|
63
|
-
campaignTypeId: "VPS",
|
|
64
|
-
campaignTypeName: campaignTypeNames["VPS"],
|
|
65
|
-
widgetId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.id,
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
componentDidLoad() {
|
|
70
|
-
const slots = this.el.querySelectorAll("[slot]");
|
|
71
|
-
this.globalSlotsChanged.emit(Array.from(slots));
|
|
72
|
-
}
|
|
73
|
-
activeWatcher(value) {
|
|
74
|
-
if (value) {
|
|
75
|
-
this.overflow = document.body.style.overflow;
|
|
76
|
-
document.body.style.overflow = "hidden";
|
|
77
|
-
this.trackOpenEvent();
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
document.body.style.overflow = this.overflow;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
trackProductView({ detail }) {
|
|
84
|
-
if (this.trackingDeactivated)
|
|
85
|
-
return;
|
|
86
|
-
const { productRank, productId, productName, widgetType, widgetId, campaignTypeId, campaignTypeName } = detail, rest = __rest(detail, ["productRank", "productId", "productName", "widgetType", "widgetId", "campaignTypeId", "campaignTypeName"]);
|
|
87
|
-
const productViewEvent = createProductViewVpsEvent(Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest));
|
|
88
|
-
this.trackingApi
|
|
89
|
-
.trackEvent(productViewEvent)
|
|
90
|
-
.then(this.setTrackingDeactivated);
|
|
91
|
-
}
|
|
92
|
-
async trackProductClick({ detail }) {
|
|
93
|
-
const { productRank, productId, productName, widgetType, widgetId, campaignTypeId, campaignTypeName } = detail, rest = __rest(detail, ["productRank", "productId", "productName", "widgetType", "widgetId", "campaignTypeId", "campaignTypeName"]);
|
|
94
|
-
const productClickEvent = createProductClickVpsEvent(Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest));
|
|
95
|
-
if (!this.trackingDeactivated) {
|
|
96
|
-
await this.trackingApi
|
|
97
|
-
.trackEvent(this.trackingDeactivated ? null : productClickEvent)
|
|
98
|
-
.then(this.setTrackingDeactivated);
|
|
99
|
-
}
|
|
100
|
-
const product = imageSearchState.results.find((r) => r.productId === detail.productId);
|
|
101
|
-
if (!product || !product.deeplink)
|
|
102
|
-
return;
|
|
103
|
-
window.location.href = product.deeplink;
|
|
104
|
-
}
|
|
105
|
-
trachSearchAreaChanges() {
|
|
106
|
-
if (this.trackingDeactivated)
|
|
107
|
-
return;
|
|
108
|
-
const searchEvent = createSearchEvent({
|
|
109
|
-
session_id: this.uiSessionId,
|
|
110
|
-
source: this.imageSource,
|
|
111
|
-
search_area: "manual-selection",
|
|
112
|
-
});
|
|
113
|
-
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
114
|
-
}
|
|
115
|
-
trackDetectedObject() {
|
|
116
|
-
if (this.trackingDeactivated)
|
|
117
|
-
return;
|
|
118
|
-
const searchEvent = createSearchEvent({
|
|
119
|
-
session_id: this.uiSessionId,
|
|
120
|
-
source: this.imageSource,
|
|
121
|
-
search_area: "attention-point",
|
|
122
|
-
});
|
|
123
|
-
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
124
|
-
}
|
|
125
|
-
trackFilter({ detail }) {
|
|
126
|
-
if (this.trackingDeactivated)
|
|
127
|
-
return;
|
|
128
|
-
const searchEvent = createFilterEvent({
|
|
129
|
-
session_id: this.uiSessionId,
|
|
130
|
-
source: this.imageSource,
|
|
131
|
-
kind: "category",
|
|
132
|
-
action: detail.action,
|
|
133
|
-
});
|
|
134
|
-
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
135
|
-
}
|
|
136
|
-
connectedCallback() {
|
|
137
|
-
state.apiPath = this.apiPath;
|
|
138
|
-
state.currencySign = this.currencySign;
|
|
139
|
-
state.locale = this.locale;
|
|
140
|
-
imageSearchState.token = this.token;
|
|
141
|
-
imageSearchState.campaignId = _function.pipe(this.campaignId, Option.fromNullable, Option.chain(Option.fromPredicate(notEmptyString)), Option.map(filterInt), Option.chain(Option.fromPredicate(notNan)), Option.map((s) => `${s}`));
|
|
142
|
-
this.uiSessionId = v4();
|
|
143
|
-
this.trackingApi = createTrackingApi(this.apiPath, this.token);
|
|
144
|
-
this.id = this.el.id;
|
|
145
|
-
}
|
|
146
|
-
componentWillLoad() {
|
|
147
|
-
var _a;
|
|
148
|
-
slotChangeListener(this, this.el);
|
|
149
|
-
this.vviinnWidgetLoad.emit({
|
|
150
|
-
widgetType: "VPS",
|
|
151
|
-
campaignTypeId: "VPS",
|
|
152
|
-
campaignTypeName: campaignTypeNames["VPS"],
|
|
153
|
-
widgetId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.id,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
trackOpenEvent() {
|
|
157
|
-
if (this.trackingDeactivated)
|
|
158
|
-
return;
|
|
159
|
-
const widgetOpenEvent = createWidgetVpsEvent({
|
|
160
|
-
action: "open",
|
|
161
|
-
session_id: this.uiSessionId,
|
|
162
|
-
});
|
|
163
|
-
this.trackingApi
|
|
164
|
-
.trackEvent(widgetOpenEvent)
|
|
165
|
-
.then(this.setTrackingDeactivated);
|
|
166
|
-
}
|
|
167
|
-
handleImageSelection(source) {
|
|
168
|
-
this.imageSource = source;
|
|
169
|
-
this.slidePosition = 1;
|
|
170
|
-
const root = this.el.shadowRoot.querySelector("vviinn-overlayed-modal");
|
|
171
|
-
const overlay = root.shadowRoot.querySelector("vviinn-overlay");
|
|
172
|
-
const modal = overlay.querySelector("vviinn-modal");
|
|
173
|
-
const modalBody = modal.shadowRoot.querySelector(".body");
|
|
174
|
-
modalBody.scrollTop = 0;
|
|
175
|
-
this.trackInitialSearch();
|
|
176
|
-
}
|
|
177
|
-
trackInitialSearch() {
|
|
178
|
-
if (this.trackingDeactivated)
|
|
179
|
-
return;
|
|
180
|
-
const searchEvent = createSearchEvent({
|
|
181
|
-
session_id: this.uiSessionId,
|
|
182
|
-
source: this.imageSource,
|
|
183
|
-
search_area: "full",
|
|
184
|
-
});
|
|
185
|
-
this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
|
|
186
|
-
}
|
|
187
|
-
resetState() {
|
|
188
|
-
this.resetScroll("onboarding-block");
|
|
189
|
-
this.slidePosition = 0;
|
|
190
|
-
imageSearchState.image = Option.none;
|
|
191
|
-
imageSearchState.imageUrl = Option.none;
|
|
192
|
-
imageSearchState.imageBounds = Option.none;
|
|
193
|
-
imageSearchState.searchArea = Option.none;
|
|
194
|
-
imageSearchState.results = [];
|
|
195
|
-
imageSearchState.filters = [];
|
|
196
|
-
imageSearchState.detectedObjects = [];
|
|
197
|
-
imageSearchState.activeIonLink = undefined;
|
|
198
|
-
imageSearchState.rectangleSearchForm = undefined;
|
|
199
|
-
imageSearchState.loading = false;
|
|
200
|
-
this.resetScroll("results-block");
|
|
201
|
-
}
|
|
202
|
-
haveErrors() {
|
|
203
|
-
return this.wrongImageFormat || imageSearchState.serverError;
|
|
204
|
-
}
|
|
205
|
-
resetScroll(elementId, behavior = "auto") {
|
|
206
|
-
const element = this.el.shadowRoot.getElementById(elementId);
|
|
207
|
-
element.scroll({ top: 0, left: 0, behavior });
|
|
208
|
-
}
|
|
209
|
-
handleModalClose() {
|
|
210
|
-
this.active = false;
|
|
211
|
-
this.resetState();
|
|
212
|
-
const elementsToReset = ["onboarding-block", "results-block"];
|
|
213
|
-
elementsToReset.forEach((name) => this.resetScroll(name));
|
|
214
|
-
if (this.trackingDeactivated)
|
|
215
|
-
return;
|
|
216
|
-
const widgetCloseEvent = createWidgetVpsEvent({
|
|
217
|
-
action: "close",
|
|
218
|
-
session_id: this.uiSessionId,
|
|
219
|
-
});
|
|
220
|
-
this.trackingApi
|
|
221
|
-
.trackEvent(widgetCloseEvent)
|
|
222
|
-
.then(this.setTrackingDeactivated);
|
|
223
|
-
}
|
|
224
|
-
render() {
|
|
225
|
-
var _a;
|
|
226
|
-
return (h(Host, null, !this.showingInButton && h(SlotSkeleton, null), h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, resetState: this.resetState.bind(this), onVviinnWidgetClose: () => this.handleModalClose(), buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.id, exportparts: "secondary-action, title, close-button, example-images" }, h("vviinn-slider", { showBullets: false, position: this.slidePosition }, h("vviinn-slide", { class: { "start-page": true } }, h("div", { class: {
|
|
227
|
-
error: this.haveErrors(),
|
|
228
|
-
"start-page_block": true,
|
|
229
|
-
} }, h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => (this.wrongImageFormat = false) }), h("vviinn-server-error", { class: { hidden: !imageSearchState.serverError }, handler: () => (imageSearchState.serverError = false) }), h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onVviinnImageUpload: () => this.handleImageSelection("upload"), onVviinnNoResult: () => (this.wrongImageFormat = true), basicEventData: this.getBasicEventData(), part: "select-image_button" }, h("span", { slot: "upload-button-text", class: "upload-button-content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, h("defs", null), h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }), h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })), h("slot", { name: "vviinn-image-upload-button-text" }, h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), h("div", { id: "onboarding-block", class: "start-page_block" }, h("div", { class: "onboarding-wrapper" }, h("vviinn-onboarding", null), h("vviinn-example-images", { part: "example-images", onVviinnImageUpload: () => this.handleImageSelection("example"), onVviinnNoResult: () => this.resetScroll("onboarding-block", "smooth"), basicEventData: this.getBasicEventData() })))), h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, h("div", { class: "image-wrapper" }, h("vviinn-image-view", { basicEventData: this.getBasicEventData() }), h("div", { class: "filters-wrapper" }, h("div", { class: "filters" }, imageSearchState.filters.map((filter) => (h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() })))))), h("div", { id: "results-block", class: "products-wrapper" }, h("div", { class: {
|
|
230
|
-
"nothing-found": true,
|
|
231
|
-
hidden: imageSearchState.results.length > 0,
|
|
232
|
-
} }, h("vviinn-empty-results", null), h("vviinn-onboarding", null)), h("div", { class: {
|
|
233
|
-
hidden: imageSearchState.results.length <= 0,
|
|
234
|
-
products: true,
|
|
235
|
-
} }, imageSearchState.results.map((p, i) => {
|
|
236
|
-
var _a;
|
|
237
|
-
return (h("vviinn-product-card", { key: p.productId, hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", campaignTypeId: "VPS", index: i, widgetElementId: this.id, buttonElementId: this.buttonElementId }));
|
|
238
|
-
}))))))));
|
|
239
|
-
}
|
|
240
|
-
get el() { return getElement(this); }
|
|
241
|
-
static get watchers() { return {
|
|
242
|
-
"active": ["activeWatcher"]
|
|
243
|
-
}; }
|
|
244
|
-
};
|
|
245
|
-
VviinnVpsWidget.style = vviinnVpsWidgetCss;
|
|
246
|
-
|
|
247
|
-
export { VviinnVpsWidget as vviinn_vps_widget };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t){return t}function r(t,r,n,e,s,u,c,a,i){switch(arguments.length){case 1:return t;case 2:return function(){return r(t.apply(this,arguments))};case 3:return function(){return n(r(t.apply(this,arguments)))};case 4:return function(){return e(n(r(t.apply(this,arguments))))};case 5:return function(){return s(e(n(r(t.apply(this,arguments)))))};case 6:return function(){return u(s(e(n(r(t.apply(this,arguments))))))};case 7:return function(){return c(u(s(e(n(r(t.apply(this,arguments)))))))};case 8:return function(){return a(c(u(s(e(n(r(t.apply(this,arguments))))))))};case 9:return function(){return i(a(c(u(s(e(n(r(t.apply(this,arguments)))))))))}}}function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t}function e(t,r,n,e,s,u,c,a,i){switch(arguments.length){case 1:return t;case 2:return r(t);case 3:return n(r(t));case 4:return e(n(r(t)));case 5:return s(e(n(r(t))));case 6:return u(s(e(n(r(t)))));case 7:return c(u(s(e(n(r(t))))));case 8:return a(c(u(s(e(n(r(t)))))));case 9:return i(a(c(u(s(e(n(r(t))))))));default:for(var o=arguments[0],f=1;f<arguments.length;f++)o=arguments[f](o);return o}}var s=function(t){return"None"===t._tag},u=function(t){return"Some"===t._tag},c={_tag:"None"},a=function(t){return{_tag:"Some",value:t}},i=function(t){return"Left"===t._tag},o=function(t){return{_tag:"Left",left:t}},f=function(t){return{_tag:"Right",right:t}},h=Object.prototype.hasOwnProperty,x=function(t){return{concat:function(r,n){var e={};for(var s in t)h.call(t,s)&&(e[s]=t[s].concat(r[s],n[s]));return e}}},y=function(){return{concat:t}},z=function(){return{concat:function(t,r){return r}}},d={concat:function(t,r){return t+r}};const g={concat:(t,r)=>t-r},l=({x:t,y:r})=>({x:t,y:r}),p=({clientX:t,clientY:r})=>({x:t,y:r}),v=x({x:g,y:g}),w=x({x:d,y:d});var N;!function(t){t[t.East=0]="East",t[t.North=1]="North",t[t.NorthEast=2]="NorthEast",t[t.NorthWest=3]="NorthWest",t[t.South=4]="South",t[t.SouthEast=5]="SouthEast",t[t.SouthWest=6]="SouthWest",t[t.West=7]="West"}(N||(N={}));const S=t=>{switch(t){case N.East:return"e-resize";case N.North:return"n-resize";case N.NorthEast:return"ne-resize";case N.NorthWest:return"nw-resize";case N.South:return"s-resize";case N.SouthEast:return"se-resize";case N.SouthWest:return"sw-resize";case N.West:return"w-resize";default:return"pointer"}},_=t=>[{position:l(t),direction:N.NorthWest},{position:w.concat(l(t),{x:t.width,y:0}),direction:N.NorthEast},{position:w.concat(l(t),{x:0,y:t.height}),direction:N.SouthWest},{position:w.concat(l(t),{x:t.width,y:t.height}),direction:N.SouthEast}];export{N as H,i as a,t as b,r as c,x as d,z as e,y as f,w as g,h,s as i,l as j,u as k,o as l,_ as m,c as n,v as o,e as p,p as q,f as r,a as s,n as t,S as u}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as o,g as a}from"./p-e6fee8d2.js";import{b as r}from"./p-2f9ee951.js";import{c as n}from"./p-18fd769b.js";let s=class{constructor(e){t(this,e),this.vviinnWidgetClose=i(this,"vviinnWidgetClose",7),this.position="bottom",this.sourceImage=null,this.widgetScrollbar=!1,this.mode="continuity",this.campaigns="",this.imageWidth=300,this.currencySign="€",this.apiPath="https://api.vviinn.com",this.state="idle"}bodyClickListener(t){const{clientX:i,clientY:e}=t,o=this.getSidebarRectangle();o&&(i>=o.left&&i<=o.right&&e>=o.top&&e<=o.bottom||(this.state="closed"))}getClassMap(){return{[this.position]:!0,[this.state]:!0}}getSidebarRectangle(){var t;return null===(t=this.el.shadowRoot.querySelector("aside"))||void 0===t?void 0:t.getBoundingClientRect()}render(){return e(o,{class:this.getClassMap()},e("aside",{class:"sidebar",part:"body",onAnimationEnd:t=>this.handleAnimationEnd(t)},e("header",{class:{"contains-source-img":this.isSourceImageValid()},part:"sidebar-header"},this.isSourceImageValid()?this.renderSourceImage():null,e("span",{class:"title",part:"title"},this.sidebarTitle),e("button",{class:"close-sidebar",onClick:()=>this.state="closed"},e(r,null))),e("main",{part:"sidebar-content"},e("vviinn-vpr-widget",{exportparts:"brand, currency, deeplink, image, image-link, price-amount, price-container, price-prefix, price-outdated, price-regular, price-sale, title: product-title, carousel-button, product-card, items-group",token:this.token,productId:this.productId,imageWidth:this.imageWidth,blockTitle:"",mode:this.mode,useCarousel:"bottom"===this.position,onVviinnRecommendationsLoaded:()=>this.state="open",showScroll:this.widgetScrollbar,campaigns:this.campaigns,color:this.color,currencySign:this.currencySign,apiPath:this.apiPath,buttonElementId:this.buttonElementId,noResultText:this.noResultText,noResultShow:this.noResultShow,gridArrowsDynamic:this.gridArrowsDynamic}))))}renderSourceImage(){return e("img",{class:"source-image",part:"source-image",src:this.sourceImage})}isSourceImageValid(){var t;return(null===(t=this.sourceImage)||void 0===t?void 0:t.length)>0}handleAnimationEnd({animationName:t}){t.includes("slideOut")&&this.vviinnWidgetClose.emit({widgetType:"VPR",campaignTypeId:this.campaignType,campaignTypeName:n[this.campaignType],widgetId:this.buttonElementId})}get el(){return a(this)}};s.style=":host{--vviinn-carousel-columns:4;box-sizing:border-box;display:block;display:flex;height:100vh;left:0;position:fixed;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.open){background:rgba(0, 0, 0, 0.2)}:host(.bottom){flex-direction:column;justify-content:end}:host(.right){flex-direction:row;justify-content:flex-end}header{position:relative;text-align:center;padding:32px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);padding:8px}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 24px;min-height:100px}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-grid){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:24px}:host(.right) vviinn-vpr-widget{overflow:auto}:host(.right) vviinn-vpr-widget::part(image){border:none}.title{font-style:normal;font-weight:500;font-size:28px;line-height:40px;text-align:center;color:#000000}vviinn-vpr-widget::part(title),vviinn-vpr-widget::part(brand),vviinn-vpr-widget::part(type){text-align:left}vviinn-vpr-widget::part(price-container){align-self:start}.close-sidebar{background:transparent;border:none;cursor:pointer;margin:0;padding:0;position:absolute;right:24px;top:24px}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";export{s as vviinn_recommendations_sidebar}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r={VPR:"Similar Products",VPS:"Visual Search",VCS:"Products Cross-Selling"};function t(r,t){return a=>(r=>"VPR"===r._tag)(a)?r():t()}function a(r){return"VPR"===r?{_tag:"VPR"}:{_tag:"VCS"}}export{t as a,r as c,a as f}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as t,l as n}from"./p-bcc1ccf0.js";var e,r=new Uint8Array(16);function i(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(r)}const o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function u(t){return"string"==typeof t&&o.test(t)}for(var a=[],c=0;c<256;++c)a.push((c+256).toString(16).substr(1));function f(t,n,e){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(a[t[n+0]]+a[t[n+1]]+a[t[n+2]]+a[t[n+3]]+"-"+a[t[n+4]]+a[t[n+5]]+"-"+a[t[n+6]]+a[t[n+7]]+"-"+a[t[n+8]]+a[t[n+9]]+"-"+a[t[n+10]]+a[t[n+11]]+a[t[n+12]]+a[t[n+13]]+a[t[n+14]]+a[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e}(r)}var s=function(t,n){if(n=n.split(":")[0],!(t=+t))return!1;switch(n){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t},h=Object.prototype.hasOwnProperty;function l(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function v(t){try{return encodeURIComponent(t)}catch(t){return null}}var d={stringify:function(t,n){n=n||"";var e,r,i=[];for(r in"string"!=typeof n&&(n="?"),t)if(h.call(t,r)){if((e=t[r])||null!=e&&!isNaN(e)||(e=""),r=v(r),e=v(e),null===r||null===e)continue;i.push(r+"="+e)}return i.length?n+i.join("&"):""},parse:function(t){for(var n,e=/([^=?#&]+)=?([^&]*)/g,r={};n=e.exec(t);){var i=l(n[1]),o=l(n[2]);null===i||null===o||i in r||(r[i]=o)}return r}},p=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,m=/[\n\r\t]/g,b=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,y=/:\d+$/,w=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,g=/^[a-zA-Z]:/;function _(t){return(t||"").toString().replace(p,"")}var j=[["#","hash"],["?","query"],function(t,n){return A(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],O={hash:1,query:1};function E(n){var e;e="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var r,i={},o=typeof(n=n||e.location||{});if("blob:"===n.protocol)i=new T(unescape(n.pathname),{});else if("string"===o)for(r in i=new T(n,{}),O)delete i[r];else if("object"===o){for(r in n)r in O||(i[r]=n[r]);void 0===i.slashes&&(i.slashes=b.test(n.href))}return i}function A(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function S(t,n){t=(t=_(t)).replace(m,""),n=n||{};var e,r=w.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],u=!!r[3],a=0;return o?u?(e=r[2]+r[3]+r[4],a=r[2].length+r[3].length):(e=r[2]+r[4],a=r[2].length):u?(e=r[3]+r[4],a=r[3].length):e=r[4],"file:"===i?a>=2&&(e=e.slice(2)):A(i)?e=r[4]:i?o&&(e=e.slice(2)):a>=2&&A(n.protocol)&&(e=r[4]),{protocol:i,slashes:o||A(i),slashesCount:a,rest:e}}function T(t,n,e){if(t=(t=_(t)).replace(m,""),!(this instanceof T))return new T(t,n,e);var r,i,o,u,a,c,f=j.slice(),h=typeof n,l=this,v=0;for("object"!==h&&"string"!==h&&(e=n,n=null),e&&"function"!=typeof e&&(e=d.parse),r=!(i=S(t||"",n=E(n))).protocol&&!i.slashes,l.slashes=i.slashes||r&&n.slashes,l.protocol=i.protocol||n.protocol||"",t=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||g.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!A(l.protocol)))&&(f[3]=[/(.*)/,"pathname"]);v<f.length;v++)"function"!=typeof(u=f[v])?(c=u[1],(o=u[0])!=o?l[c]=t:"string"==typeof o?~(a="@"===o?t.lastIndexOf(o):t.indexOf(o))&&("number"==typeof u[2]?(l[c]=t.slice(0,a),t=t.slice(a+u[2])):(l[c]=t.slice(a),t=t.slice(0,a))):(a=o.exec(t))&&(l[c]=a[1],t=t.slice(0,a.index)),l[c]=l[c]||r&&u[3]&&n[c]||"",u[4]&&(l[c]=l[c].toLowerCase())):t=u(t,l);e&&(l.query=e(l.query)),r&&n.slashes&&"/"!==l.pathname.charAt(0)&&(""!==l.pathname||""!==n.pathname)&&(l.pathname=function(t,n){if(""===t)return n;for(var e=(n||"/").split("/").slice(0,-1).concat(t.split("/")),r=e.length,i=e[r-1],o=!1,u=0;r--;)"."===e[r]?e.splice(r,1):".."===e[r]?(e.splice(r,1),u++):u&&(0===r&&(o=!0),e.splice(r,1),u--);return o&&e.unshift(""),"."!==i&&".."!==i||e.push(""),e.join("/")}(l.pathname,n.pathname)),"/"!==l.pathname.charAt(0)&&A(l.protocol)&&(l.pathname="/"+l.pathname),s(l.port,l.protocol)||(l.host=l.hostname,l.port=""),l.username=l.password="",l.auth&&(~(a=l.auth.indexOf(":"))?(l.username=l.auth.slice(0,a),l.username=encodeURIComponent(decodeURIComponent(l.username)),l.password=l.auth.slice(a+1),l.password=encodeURIComponent(decodeURIComponent(l.password))):l.username=encodeURIComponent(decodeURIComponent(l.auth)),l.auth=l.password?l.username+":"+l.password:l.username),l.origin="file:"!==l.protocol&&A(l.protocol)&&l.host?l.protocol+"//"+l.host:"null",l.href=l.toString()}T.prototype={set:function(t,n,e){var r=this;switch(t){case"query":"string"==typeof n&&n.length&&(n=(e||d.parse)(n)),r[t]=n;break;case"port":r[t]=n,s(n,r.protocol)?n&&(r.host=r.hostname+":"+n):(r.host=r.hostname,r[t]="");break;case"hostname":r[t]=n,r.port&&(n+=":"+r.port),r.host=n;break;case"host":r[t]=n,y.test(n)?(n=n.split(":"),r.port=n.pop(),r.hostname=n.join(":")):(r.hostname=n,r.port="");break;case"protocol":r.protocol=n.toLowerCase(),r.slashes=!e;break;case"pathname":case"hash":if(n){var i="pathname"===t?"/":"#";r[t]=n.charAt(0)!==i?i+n:n}else r[t]=n;break;case"username":case"password":r[t]=encodeURIComponent(n);break;case"auth":var o=n.indexOf(":");~o?(r.username=n.slice(0,o),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=n.slice(o+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(n))}for(var u=0;u<j.length;u++){var a=j[u];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&A(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(t){t&&"function"==typeof t||(t=d.stringify);var n,e=this,r=e.host,i=e.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(e.protocol&&e.slashes||A(e.protocol)?"//":"");return e.username?(o+=e.username,e.password&&(o+=":"+e.password),o+="@"):e.password?(o+=":"+e.password,o+="@"):"file:"!==e.protocol&&A(e.protocol)&&!r&&"/"!==e.pathname&&(o+="@"),(":"===r[r.length-1]||y.test(e.hostname)&&!e.port)&&(r+=":"),o+=r+e.pathname,(n="object"==typeof e.query?t(e.query):e.query)&&(o+="?"!==n.charAt(0)?"?"+n:n),e.hash&&(o+=e.hash),o}},T.extractProtocol=S,T.location=E,T.trimLeft=_,T.qs=d;var N=T,C=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.map=n.mergeMap=n.of=n.from=n.Observable=void 0;var e=function(){function t(t){this.promise=t}return t.prototype.toPromise=function(){return this.promise},t.prototype.pipe=function(n){return new t(this.promise.then(n))},t}();n.Observable=e,n.from=function(t){return new e(t)},n.of=function(t){return new e(Promise.resolve(t))},n.mergeMap=function(t){return function(n){return t(n).toPromise()}},n.map=function(t){return t}})),P="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==P&&P,k="URLSearchParams"in P,M="Symbol"in P&&"iterator"in Symbol,R="FileReader"in P&&"Blob"in P&&function(){try{return new Blob,!0}catch(t){return!1}}(),U="FormData"in P,x="ArrayBuffer"in P;if(x)var I=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],F=ArrayBuffer.isView||function(t){return t&&I.indexOf(Object.prototype.toString.call(t))>-1};function D(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function W(t){return"string"!=typeof t&&(t=String(t)),t}function V(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return M&&(n[Symbol.iterator]=function(){return n}),n}function B(t){this.map={},t instanceof B?t.forEach((function(t,n){this.append(n,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(n){this.append(n,t[n])}),this)}function q(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function z(t){return new Promise((function(n,e){t.onload=function(){n(t.result)},t.onerror=function(){e(t.error)}}))}function G(t){var n=new FileReader,e=z(n);return n.readAsArrayBuffer(t),e}function H(t){if(t.slice)return t.slice(0);var n=new Uint8Array(t.byteLength);return n.set(new Uint8Array(t)),n.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(t){var n;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:R&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:U&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:k&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():x&&R&&(n=t)&&DataView.prototype.isPrototypeOf(n)?(this._bodyArrayBuffer=H(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):x&&(ArrayBuffer.prototype.isPrototypeOf(t)||F(t))?this._bodyArrayBuffer=H(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):k&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},R&&(this.blob=function(){var t=q(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?q(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(G)}),this.text=function(){var t,n,e,r=q(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=z(n=new FileReader),n.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var n=new Uint8Array(t),e=new Array(n.length),r=0;r<n.length;r++)e[r]=String.fromCharCode(n[r]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},U&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}B.prototype.append=function(t,n){t=D(t),n=W(n);var e=this.map[t];this.map[t]=e?e+", "+n:n},B.prototype.delete=function(t){delete this.map[D(t)]},B.prototype.get=function(t){return t=D(t),this.has(t)?this.map[t]:null},B.prototype.has=function(t){return this.map.hasOwnProperty(D(t))},B.prototype.set=function(t,n){this.map[D(t)]=W(n)},B.prototype.forEach=function(t,n){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(n,this.map[e],e,this)},B.prototype.keys=function(){var t=[];return this.forEach((function(n,e){t.push(e)})),V(t)},B.prototype.values=function(){var t=[];return this.forEach((function(n){t.push(n)})),V(t)},B.prototype.entries=function(){var t=[];return this.forEach((function(n,e){t.push([e,n])})),V(t)},M&&(B.prototype[Symbol.iterator]=B.prototype.entries);var J=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function $(t,n){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var e,r,i=(n=n||{}).body;if(t instanceof $){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,n.headers||(this.headers=new B(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new B(n.headers)),this.method=(r=(e=n.method||this.method||"GET").toUpperCase(),J.indexOf(r)>-1?r:e),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function K(t){var n=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),r=e.shift().replace(/\+/g," "),i=e.join("=").replace(/\+/g," ");n.append(decodeURIComponent(r),decodeURIComponent(i))}})),n}function X(t,n){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');n||(n={}),this.type="default",this.status=void 0===n.status?200:n.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===n.statusText?"":""+n.statusText,this.headers=new B(n.headers),this.url=n.url||"",this._initBody(t)}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})},L.call($.prototype),L.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},X.error=function(){var t=new X(null,{status:0,statusText:""});return t.type="error",t};var Z=[301,302,303,307,308];X.redirect=function(t,n){if(-1===Z.indexOf(n))throw new RangeError("Invalid status code");return new X(null,{status:n,headers:{location:t}})};var Q=P.DOMException;try{new Q}catch(t){(Q=function(t,n){this.message=t,this.name=n;var e=Error(t);this.stack=e.stack}).prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function Y(t,n){return new Promise((function(e,r){var i=new $(t,n);if(i.signal&&i.signal.aborted)return r(new Q("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var t,n,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",n=new B,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var i=e.join(":").trim();n.append(r,i)}})),n)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){e(new X(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Q("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&P.location.href?P.location.href:t}catch(n){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(R?o.responseType="blob":x&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof B?i.headers.forEach((function(t,n){o.setRequestHeader(n,t)})):Object.getOwnPropertyNames(n.headers).forEach((function(t){o.setRequestHeader(t,W(n.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",u)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Y.polyfill=!0,P.fetch||(P.fetch=Y,P.Headers=B,P.Request=$,P.Response=X);var tt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.IsomorphicFetchHttpLibrary=void 0;var e=function(){function t(){}return t.prototype.send=function(t){var n=t.getHttpMethod().toString(),e=t.getBody(),r=fetch(t.getUrl(),{method:n,body:e,headers:t.getHeaders(),credentials:"same-origin"}).then((function(t){var n={};t.headers.forEach((function(t,e){n[e]=t}));var e={text:function(){return t.text()},binary:function(){return t.blob()}};return new nt.ResponseContext(t.status,n,e)}));return(0,C.from)(r)},t}();n.IsomorphicFetchHttpLibrary=e})),nt=n((function(n,e){var r,i,o=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),u=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),a=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||u(n,t,e)},c=t&&t.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((r=r.apply(t,n||[])).next())}))},f=t&&t.__generator||function(t,n){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.wrapHttpLibrary=e.ResponseContext=e.SelfDecodingBody=e.RequestContext=e.HttpException=e.HttpMethod=void 0,a(tt,e),(i=e.HttpMethod||(e.HttpMethod={})).GET="GET",i.HEAD="HEAD",i.POST="POST",i.PUT="PUT",i.DELETE="DELETE",i.CONNECT="CONNECT",i.OPTIONS="OPTIONS",i.TRACE="TRACE",i.PATCH="PATCH";var s=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n}(Error);e.HttpException=s;var h=function(){function t(t,n){this.httpMethod=n,this.headers={},this.body=void 0,this.url=new N(t,!0)}return t.prototype.getUrl=function(){return this.url.toString()},t.prototype.setUrl=function(t){this.url=new N(t,!0)},t.prototype.setBody=function(t){this.body=t},t.prototype.getHttpMethod=function(){return this.httpMethod},t.prototype.getHeaders=function(){return this.headers},t.prototype.getBody=function(){return this.body},t.prototype.setQueryParam=function(t,n){var e=this.url.query;e[t]=n,this.url.set("query",e)},t.prototype.addCookie=function(t,n){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=t+"="+n+"; "},t.prototype.setHeaderParam=function(t,n){this.headers[t]=n},t}();e.RequestContext=h;var l=function(){function t(t){this.dataSource=t}return t.prototype.binary=function(){return this.dataSource},t.prototype.text=function(){return c(this,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:return[4,this.dataSource];case 1:return(t=n.sent()).text?[2,t.text()]:[2,new Promise((function(n,e){var r=new FileReader;r.addEventListener("load",(function(){return n(r.result)})),r.addEventListener("error",(function(){return e(r.error)})),r.readAsText(t)}))]}}))}))},t}();e.SelfDecodingBody=l;var v=function(){function t(t,n,e){this.httpStatusCode=t,this.headers=n,this.body=e}return t.prototype.getParsedHeader=function(t){var n={};if(!this.headers[t])return n;for(var e=0,r=this.headers[t].split(";");e<r.length;e++){var i=r[e].split("=",2),o=i[0],u=i[1];o=o.toLowerCase().trim(),void 0===u?n[""]=o:((u=u.trim()).startsWith('"')&&u.endsWith('"')&&(u=u.substring(1,u.length-1)),n[o]=u)}return n},t.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var t,n,e;return f(this,(function(r){switch(r.label){case 0:return[4,this.body.binary()];case 1:t=r.sent(),n=this.getParsedHeader("content-disposition").filename||"",e=this.headers["content-type"]||"";try{return[2,new File([t],n,{type:e})]}catch(r){return[2,Object.assign(t,{name:n,type:e})]}return[2]}}))}))},t.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(t){}try{return this.body.binary()}catch(t){}return Promise.resolve(void 0)},t}();e.ResponseContext=v,e.wrapHttpLibrary=function(t){return{send:function(n){return(0,C.from)(t.send(n))}}}})),et=n((function(n,e){var r=t&&t.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((r=r.apply(t,n||[])).next())}))},i=t&&t.__generator||function(t,n){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureAuthMethods=e.BearerAuthAuthentication=void 0;var o=function(){function t(t){this.tokenProvider=t}return t.prototype.getName=function(){return"bearerAuth"},t.prototype.applySecurityAuthentication=function(t){return r(this,void 0,void 0,(function(){var n,e,r,o;return i(this,(function(i){switch(i.label){case 0:return e=(n=t).setHeaderParam,r=["Authorization"],o="Bearer ",[4,this.tokenProvider.getToken()];case 1:return e.apply(n,r.concat([o+i.sent()])),[2]}}))}))},t}();e.BearerAuthAuthentication=o,e.configureAuthMethods=function(t){var n={};return t?(n.default=t.default,t.bearerAuth&&(n.bearerAuth=new o(t.bearerAuth.tokenProvider)),n):n}})),rt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorObject=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"domain",baseName:"domain",type:"string",format:""},{name:"reason",baseName:"reason",type:"string",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"location",baseName:"location",type:"string",format:""},{name:"location_type",baseName:"location_type",type:"string",format:""},{name:"extended_help",baseName:"extended_help",type:"string",format:""},{name:"send_report",baseName:"send_report",type:"string",format:""}],t}();n.ErrorObject=e})),it=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorResponse=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],t}();n.ErrorResponse=e})),ot=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Event=void 0;var e=function(){function t(){this.typ="Event"}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator="typ",t.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],t}();n.Event=e})),ut=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EventConfirmation=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],t}();n.EventConfirmation=e})),at=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),ct=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.FilterEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="FilterEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(n.attributeTypeMap)},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],n}(ot.Event);e.FilterEvent=o})),ft=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.FilterEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],t}();n.FilterEventAllOf=e})),st=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),ht=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProductClickEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="ProductClickEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(n.attributeTypeMap)},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],n}(ot.Event);e.ProductClickEvent=o})),lt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProductViewEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="ProductViewEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(n.attributeTypeMap)},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],n}(ot.Event);e.ProductViewEvent=o})),vt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ProductViewEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}();n.ProductViewEventAllOf=e})),dt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),pt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.SearchEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="SearchEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(n.attributeTypeMap)},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],n}(ot.Event);e.SearchEvent=o})),mt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SearchEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],t}();n.SearchEventAllOf=e})),bt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),yt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),wt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),gt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="WidgetEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(n.attributeTypeMap)},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],n}(ot.Event);e.WidgetEvent=o})),_t=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}();n.WidgetEventAllOf=e})),jt=n((function(n,e){var r=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),i(rt,e),i(it,e),i(ot,e),i(ut,e),i(at,e),i(ct,e),i(ft,e),i(st,e),i(ht,e),i(lt,e),i(vt,e),i(dt,e),i(pt,e),i(mt,e),i(bt,e),i(yt,e),i(wt,e),i(gt,e),i(_t,e)})),Ot=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PromiseMiddlewareWrapper=void 0;var e=function(){function t(t){this.middleware=t}return t.prototype.pre=function(t){return(0,C.from)(this.middleware.pre(t))},t.prototype.post=function(t){return(0,C.from)(this.middleware.post(t))},t}();n.PromiseMiddlewareWrapper=e})),Et=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.servers=n.server2=n.server1=n.ServerConfiguration=void 0;var e=function(){function t(t,n){this.url=t,this.variableConfiguration=n}return t.prototype.setVariables=function(t){Object.assign(this.variableConfiguration,t)},t.prototype.getConfiguration=function(){return this.variableConfiguration},t.prototype.getUrl=function(){var t=this.url;for(var n in this.variableConfiguration){var e=new RegExp("{"+n+"}","g");t=t.replace(e,this.variableConfiguration[n])}return t},t.prototype.makeRequestContext=function(t,n){return new nt.RequestContext(this.getUrl()+t,n)},t}();n.ServerConfiguration=e,n.server1=new e("https://tracking.vviinn.com",{}),n.server2=new e("https://tracking.stage.vviinn.com",{}),n.servers=[n.server1,n.server2]})),At=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createConfiguration=void 0,n.createConfiguration=function(t){void 0===t&&(t={});var n={baseServer:void 0!==t.baseServer?t.baseServer:Et.server1,httpApi:t.httpApi||new tt.IsomorphicFetchHttpLibrary,middleware:t.middleware||[],authMethods:(0,et.configureAuthMethods)(t.authMethods)};return t.promiseMiddleware&&t.promiseMiddleware.forEach((function(t){return n.middleware.push(new Ot.PromiseMiddlewareWrapper(t))})),n}})),St=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.ApiException=void 0;var o=function(t){function n(n,e,r,i){var o=t.call(this,"HTTP-Code: "+n+"\nMessage: "+e+"\nBody: "+JSON.stringify(r)+"\nHeaders: "+JSON.stringify(i))||this;return o.code=n,o.body=r,o.headers=i,o}return i(n,t),n}(Error);e.ApiException=o})),Tt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.RequiredError=e.BaseAPIRequestFactory=e.COLLECTION_FORMATS=void 0,e.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"},e.BaseAPIRequestFactory=function(t){this.configuration=t};var o=function(t){function n(n,e,r){var i=t.call(this,"Required parameter "+r+" was null or undefined when calling "+n+"."+e+".")||this;return i.api=n,i.method=e,i.field=r,i.name="RequiredError",i}return i(n,t),n}(Error);e.RequiredError=o})),Nt=n((function(n,e){var r=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectSerializer=void 0,i(rt,e),i(it,e),i(ot,e),i(ut,e),i(at,e),i(ct,e),i(ft,e),i(st,e),i(ht,e),i(lt,e),i(vt,e),i(dt,e),i(pt,e),i(mt,e),i(bt,e),i(yt,e),i(wt,e),i(gt,e),i(_t,e);var o=rt,u=it,a=ot,c=ut,f=ct,s=ft,h=ht,l=lt,v=vt,d=pt,p=mt,m=gt,b=_t,y=["string","boolean","double","integer","long","float","number","any"],w={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},g=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),_={ErrorObject:o.ErrorObject,ErrorResponse:u.ErrorResponse,Event:a.Event,EventConfirmation:c.EventConfirmation,FilterEvent:f.FilterEvent,FilterEventAllOf:s.FilterEventAllOf,ProductClickEvent:h.ProductClickEvent,ProductViewEvent:l.ProductViewEvent,ProductViewEventAllOf:v.ProductViewEventAllOf,SearchEvent:d.SearchEvent,SearchEventAllOf:p.SearchEventAllOf,WidgetEvent:m.WidgetEvent,WidgetEventAllOf:b.WidgetEventAllOf},j=function(){function t(){}return t.findCorrectType=function(t,n){if(null==t)return n;if(-1!==y.indexOf(n.toLowerCase()))return n;if("Date"===n)return n;if(g.has(n))return n;if(!_[n])return n;var e=_[n].discriminator;if(null==e)return n;if(t[e]){var r=t[e];return _[r]?r:n}return n},t.serialize=function(n,e,r){if(null==n)return n;if(-1!==y.indexOf(e.toLowerCase()))return n;if(0===e.lastIndexOf("Array<",0)){var i=e.replace("Array<","");i=i.substring(0,i.length-1);var o=[];for(var u in n)o.push(t.serialize(n[u],i,r));return o}if("Date"===e){if("date"==r){var a=n.getMonth()+1;a=a<10?"0"+a.toString():a.toString();var c=n.getDate();return c=c<10?"0"+c.toString():c.toString(),n.getFullYear()+"-"+a+"-"+c}return n.toISOString()}if(g.has(e))return n;if(!_[e])return n;e=this.findCorrectType(n,e);var f=_[e].getAttributeTypeMap(),s={};for(var u in f){var h=f[u];s[h.baseName]=t.serialize(n[h.name],h.type,h.format)}return s},t.deserialize=function(n,e,r){if(e=t.findCorrectType(n,e),null==n)return n;if(-1!==y.indexOf(e.toLowerCase()))return n;if(0===e.lastIndexOf("Array<",0)){var i=e.replace("Array<","");i=i.substring(0,i.length-1);var o=[];for(var u in n)o.push(t.deserialize(n[u],i,r));return o}if("Date"===e)return new Date(n);if(g.has(e))return n;if(!_[e])return n;var a=new _[e],c=_[e].getAttributeTypeMap();for(var u in c){var f=c[u];a[f.name]=t.deserialize(n[f.baseName],f.type,f.format)}return a},t.normalizeMediaType=function(t){if(void 0!==t)return t.split(";")[0].trim().toLowerCase()},t.getPreferredMediaType=function(t){if(!t)return"application/json";for(var n=void 0,e=-1/0,r=0,i=t.map(this.normalizeMediaType);r<i.length;r++){var o=i[r];w[o]>e&&(n=o,e=w[o])}if(void 0===n)throw new Error("None of the given media types are supported: "+t.join(", "));return n},t.stringify=function(t,n){if("application/json"===n)return JSON.stringify(t);throw new Error("The mediaType "+n+" is not supported by ObjectSerializer.stringify.")},t.parse=function(t,n){if(void 0===n)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===n)return JSON.parse(t);throw new Error("The mediaType "+n+" is not supported by ObjectSerializer.parse.")},t}();e.ObjectSerializer=j})),Ct=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.canConsumeForm=n.isCodeInRange=void 0,n.isCodeInRange=function(t,n){if("0"===t)return!0;if(t==n.toString())return!0;var e=n.toString();if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if("X"!=t.charAt(r)&&t.charAt(r)!=e.charAt(r))return!1;return!0},n.canConsumeForm=function(t){return-1!==t.indexOf("multipart/form-data")}})),Pt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),o=t&&t.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((r=r.apply(t,n||[])).next())}))},u=t&&t.__generator||function(t,n){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultApiResponseProcessor=e.DefaultApiRequestFactory=void 0;var a=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.trackEvent=function(t,n){var e,r,i;return o(this,void 0,void 0,(function(){var o,a,c,f,s,h;return u(this,(function(u){switch(u.label){case 0:return(a=(o=n||this.configuration).baseServer.makeRequestContext("/event",nt.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),c=Nt.ObjectSerializer.getPreferredMediaType(["application/json"]),a.setHeaderParam("Content-Type",c),f=Nt.ObjectSerializer.stringify(Nt.ObjectSerializer.serialize(t,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),c),a.setBody(f),(null==(s=o.authMethods.bearerAuth)?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(a)]:[3,2];case 1:u.sent(),u.label=2;case 2:return(null==(h=(null===(e=null==n?void 0:n.authMethods)||void 0===e?void 0:e.default)||(null===(i=null===(r=this.configuration)||void 0===r?void 0:r.authMethods)||void 0===i?void 0:i.default))?void 0:h.applySecurityAuthentication)?[4,null==h?void 0:h.applySecurityAuthentication(a)]:[3,4];case 3:u.sent(),u.label=4;case 4:return[2,a]}}))}))},n}(Tt.BaseAPIRequestFactory);e.DefaultApiRequestFactory=a;var c=function(){function t(){}return t.prototype.trackEvent=function(t){return o(this,void 0,void 0,(function(){var n,e,r,i,o,a,c,f,s,h,l,v,d,p,m,b;return u(this,(function(u){switch(u.label){case 0:return n=Nt.ObjectSerializer.normalizeMediaType(t.headers["content-type"]),(0,Ct.isCodeInRange)("200",t.httpStatusCode)?(r=(e=Nt.ObjectSerializer).deserialize,o=(i=Nt.ObjectSerializer).parse,[4,t.body.text()]):[3,2];case 1:return[2,h=r.apply(e,[o.apply(i,[u.sent(),n]),"EventConfirmation",""])];case 2:return(0,Ct.isCodeInRange)("502",t.httpStatusCode)?(c=(a=Nt.ObjectSerializer).deserialize,s=(f=Nt.ObjectSerializer).parse,[4,t.body.text()]):[3,4];case 3:throw h=c.apply(a,[s.apply(f,[u.sent(),n]),"ErrorResponse",""]),new St.ApiException(502,"an error occurred",h,t.headers);case 4:return t.httpStatusCode>=200&&t.httpStatusCode<=299?(v=(l=Nt.ObjectSerializer).deserialize,p=(d=Nt.ObjectSerializer).parse,[4,t.body.text()]):[3,6];case 5:return[2,h=v.apply(l,[p.apply(d,[u.sent(),n]),"EventConfirmation",""])];case 6:return m=St.ApiException.bind,b=[void 0,t.httpStatusCode,"Unknown API Status Code!"],[4,t.getBodyAsAny()];case 7:throw new(m.apply(St.ApiException,b.concat([u.sent(),t.headers])))}}))}))},t}();e.DefaultApiResponseProcessor=c})),kt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ObservableDefaultApi=void 0;var e=C,r=function(){function t(t,n,e){this.configuration=t,this.requestFactory=n||new Pt.DefaultApiRequestFactory(t),this.responseProcessor=e||new Pt.DefaultApiResponseProcessor}return t.prototype.trackEvent=function(t,n){for(var r=this,i=this.requestFactory.trackEvent(t,n),o=(0,C.from)(i),u=function(t){o=o.pipe((0,e.mergeMap)((function(n){return t.pre(n)})))},a=0,c=this.configuration.middleware;a<c.length;a++)u(c[a]);return o.pipe((0,e.mergeMap)((function(t){return r.configuration.httpApi.send(t)}))).pipe((0,e.mergeMap)((function(t){for(var n=(0,C.of)(t),i=function(t){n=n.pipe((0,e.mergeMap)((function(n){return t.post(n)})))},o=0,u=r.configuration.middleware;o<u.length;o++)i(u[o]);return n.pipe((0,e.map)((function(t){return r.responseProcessor.trackEvent(t)})))})))},t}();n.ObservableDefaultApi=r})),Mt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PromiseDefaultApi=void 0;var e=function(){function t(t,n,e){this.api=new kt.ObservableDefaultApi(t,n,e)}return t.prototype.trackEvent=function(t,n){return this.api.trackEvent(t,n).toPromise()},t}();n.PromiseDefaultApi=e})),Rt=n((function(n,e){var r=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultApi=e.createConfiguration=void 0,i(nt,e),i(et,e),i(jt,e),Object.defineProperty(e,"createConfiguration",{enumerable:!0,get:function(){return At.createConfiguration}}),i(St,e),i(Et,e),Object.defineProperty(e,"DefaultApi",{enumerable:!0,get:function(){return Mt.PromiseDefaultApi}})}));const Ut=(t,n)=>{const e=(t=>(t=>!t.includes("stage"))(t)?Rt.servers[0]:Rt.servers[1])(t),r=(t=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((n=>n(t)))}}}))(n);return new Rt.DefaultApi(Rt.createConfiguration({baseServer:e,authMethods:r}))},xt=t=>n=>Object.assign(Object.assign({},n),t),It=xt({widget:"VPR",typ:"product_view_event"}),Ft=xt({widget:"VPS",typ:"product_view_event"}),Dt=xt({widget:"VPR",typ:"product_click_event"}),Wt=xt({widget:"VPS",typ:"product_click_event"}),Vt=xt({widget:"VPR",typ:"widget_event"}),Bt=xt({widget:"VPS",typ:"widget_event"}),qt=xt({widget:"VPS",typ:"search_event"}),zt=xt({widget:"VPS",typ:"filter_event"});export{Dt as a,Ut as b,It as c,Vt as d,Ft as e,Wt as f,qt as g,zt as h,Bt as i,f as v}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as n}from"./p-e6fee8d2.js";let r=class{constructor(t){e(this,t)}render(){return t(n,null,t("slot",{name:"icon"}),t("slot",{name:"title"}),t("slot",{name:"text"}),t("slot",{name:"action"}))}};r.style=":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";export{r as vviinn_error}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as e,H as t}from"./p-e6fee8d2.js";import{i as o}from"./p-bcc1ccf0.js";import"./p-11f61564.js";let a=class{constructor(e){r(this,e)}isActive(){return o.loading||o.objectDetectionInProgress}render(){return e(t,{class:{active:this.isActive()}})}};a.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;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}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";export{a as vviinn_preloader}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as r,g as s}from"./p-e6fee8d2.js";import{i as a,s as n,a as o,O as d,n as p}from"./p-bcc1ccf0.js";import{s as l,S as c}from"./p-69850e5b.js";import{e as h,f as g,g as v,h as u,v as m,b,i as f}from"./p-339c6838.js";import{c as x}from"./p-18fd769b.js";import"./p-11f61564.js";var w=function(i,t){var e={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&t.indexOf(r)<0&&(e[r]=i[r]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(i);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(i,r[s])&&(e[r[s]]=i[r[s]])}return e};const y=i=>/^[-+]?(\d+|Infinity)$/.test(i)?Number(i):NaN,k=i=>!p(i),I=i=>!isNaN(i);let j=class{constructor(e){i(this,e),this.globalSlotsChanged=t(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnImageUpload=t(this,"vviinnImageUpload",7),this.vviinnImageCrop=t(this,"vviinnImageCrop",7),this.vviinnSelectObject=t(this,"vviinnSelectObject",7),this.vviinnSelectFilter=t(this,"vviinnSelectFilter",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.apiPath="https://api.vviinn.com",this.active=!1,this.currencySign="€",this.locale="de-DE",this.showingInButton=!1,this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1,this.imageSource=null,this.setTrackingDeactivated=i=>{"rejected"===i.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var i;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:x.VPS,widgetId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id}}}componentDidLoad(){const i=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(i))}activeWatcher(i){i?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.trackOpenEvent()):document.body.style.overflow=this.overflow}trackProductView({detail:i}){if(this.trackingDeactivated)return;const{productRank:t,productId:e}=i,r=w(i,["productRank","productId","productName","widgetType","widgetId","campaignTypeId","campaignTypeName"]),s=h(Object.assign({session_id:this.uiSessionId,rank:t,product:e},r));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}async trackProductClick({detail:i}){const{productRank:t,productId:e}=i,r=w(i,["productRank","productId","productName","widgetType","widgetId","campaignTypeId","campaignTypeName"]),s=g(Object.assign({session_id:this.uiSessionId,rank:t,product:e},r));this.trackingDeactivated||await this.trackingApi.trackEvent(this.trackingDeactivated?null:s).then(this.setTrackingDeactivated);const n=a.results.find((t=>t.productId===i.productId));n&&n.deeplink&&(window.location.href=n.deeplink)}trachSearchAreaChanges(){if(this.trackingDeactivated)return;const i=v({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.trackingDeactivated)return;const i=v({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackFilter({detail:i}){if(this.trackingDeactivated)return;const t=u({session_id:this.uiSessionId,source:this.imageSource,kind:"category",action:i.action});this.trackingApi.trackEvent(t).then(this.setTrackingDeactivated)}connectedCallback(){n.apiPath=this.apiPath,n.currencySign=this.currencySign,n.locale=this.locale,a.token=this.token,a.campaignId=o.pipe(this.campaignId,d.fromNullable,d.chain(d.fromPredicate(k)),d.map(y),d.chain(d.fromPredicate(I)),d.map((i=>`${i}`))),this.uiSessionId=m(),this.trackingApi=b(this.apiPath,this.token),this.id=this.el.id}componentWillLoad(){var i;l(this,this.el),this.vviinnWidgetLoad.emit({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:x.VPS,widgetId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id})}trackOpenEvent(){if(this.trackingDeactivated)return;const i=f({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}handleImageSelection(i){this.imageSource=i,this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.trackInitialSearch()}trackInitialSearch(){if(this.trackingDeactivated)return;const i=v({session_id:this.uiSessionId,source:this.imageSource,search_area:"full"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}resetState(){this.resetScroll("onboarding-block"),this.slidePosition=0,a.image=d.none,a.imageUrl=d.none,a.imageBounds=d.none,a.searchArea=d.none,a.results=[],a.filters=[],a.detectedObjects=[],a.activeIonLink=void 0,a.rectangleSearchForm=void 0,a.loading=!1,this.resetScroll("results-block")}haveErrors(){return this.wrongImageFormat||a.serverError}resetScroll(i,t="auto"){this.el.shadowRoot.getElementById(i).scroll({top:0,left:0,behavior:t})}handleModalClose(){if(this.active=!1,this.resetState(),["onboarding-block","results-block"].forEach((i=>this.resetScroll(i))),this.trackingDeactivated)return;const i=f({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}render(){var i;return e(r,null,!this.showingInButton&&e(c,null),e("vviinn-overlayed-modal",{class:{"first-screen":0===this.slidePosition},active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id,exportparts:"secondary-action, title, close-button, example-images"},e("vviinn-slider",{showBullets:!1,position:this.slidePosition},e("vviinn-slide",{class:{"start-page":!0}},e("div",{class:{error:this.haveErrors(),"start-page_block":!0}},e("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.wrongImageFormat=!1}),e("vviinn-server-error",{class:{hidden:!a.serverError},handler:()=>a.serverError=!1}),e("vviinn-teaser",{class:{hidden:this.haveErrors()}}),e("vviinn-image-selector",{class:{hidden:this.haveErrors()},onVviinnImageUpload:()=>this.handleImageSelection("upload"),onVviinnNoResult:()=>this.wrongImageFormat=!0,basicEventData:this.getBasicEventData(),part:"select-image_button"},e("span",{slot:"upload-button-text",class:"upload-button-content"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"28",fill:"none"},e("defs",null),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z","clip-rule":"evenodd"}),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z","clip-rule":"evenodd"})),e("slot",{name:"vviinn-image-upload-button-text"},e("span",null,"Kamera oder Bild auswählen")))),e("vviinn-privacy-badge",{class:{hidden:this.haveErrors()}})),e("div",{id:"onboarding-block",class:"start-page_block"},e("div",{class:"onboarding-wrapper"},e("vviinn-onboarding",null),e("vviinn-example-images",{part:"example-images",onVviinnImageUpload:()=>this.handleImageSelection("example"),onVviinnNoResult:()=>this.resetScroll("onboarding-block","smooth"),basicEventData:this.getBasicEventData()})))),e("vviinn-slide",{class:{"results-page":!0,active:1==this.slidePosition}},e("div",{class:"image-wrapper"},e("vviinn-image-view",{basicEventData:this.getBasicEventData()}),e("div",{class:"filters-wrapper"},e("div",{class:"filters"},a.filters.map((i=>e("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),e("div",{id:"results-block",class:"products-wrapper"},e("div",{class:{"nothing-found":!0,hidden:a.results.length>0}},e("vviinn-empty-results",null),e("vviinn-onboarding",null)),e("div",{class:{hidden:a.results.length<=0,products:!0}},a.results.map(((i,t)=>{var r;return e("vviinn-product-card",{key:i.productId,hidden:!0,productTitle:i.title,productId:i.productId,brand:i.brand,deeplink:i.deeplink,price:i.price.actual,salePrice:i.price.sale,imageWidth:160,image:null!==(r=i.image.thumbnail)&&void 0!==r?r:i.image.original,part:"product-card",campaignTypeId:"VPS",index:t,widgetElementId:this.id,buttonElementId:this.buttonElementId})}))))))))}get el(){return s(this)}static get watchers(){return{active:["activeWatcher"]}}};j.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}: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);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #f4f4f4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #f4f4f4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:4px;border:1px solid #f4f4f4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter):hover{background:#eaeaea}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";export{j as vviinn_vps_widget}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as n}from"./p-e6fee8d2.js";const i=["vviinn-onboarding-title","onboarding-card-1-icon","onboarding-card-1-text","onboarding-card-2-icon","onboarding-card-2-text","onboarding-card-3-icon","onboarding-card-3-text","vviinn-example-images-title","vviinn-example-images-1","vviinn-example-images-2","vviinn-example-images-3","vviinn-example-images-4","vviinn-teaser-text","vviinn-image-upload-button-text","vviinn-privacy-badge-text","vviinn-image-search-modal-title"],a=i=>n("slot",{name:i}),e=()=>i.map(a),t=(n,i)=>{i.innerHTML=n.outerHTML},o=(n,i)=>{n.connectedCallback=function(){document.addEventListener("globalSlotsChanged",(({detail:n})=>{var a;(n=>Array.from(n.shadowRoot.querySelectorAll("slot")))(i).reduce((a=n,(n,i)=>{const e=a.find((t=i,n=>t.getAttribute("name")===n.getAttribute("slot")));var t;return e&&n.set(i,e),n}),new Map).forEach(t)}),!0)},n.connectedCallback.call(n)};export{e as S,o as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,H as h,g as n}from"./p-e6fee8d2.js";import{V as e}from"./p-2f9ee951.js";import{c as o}from"./p-18fd769b.js";let d=class{constructor(s){i(this,s),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.position="bottom",this.sourceImage=null,this.sidebarTitle="Visually similar products",this.modalScrollbar=!1,this.campaigns="",this.campaignType="VPR",this.addStyle=!0,this.mode="continuity",this.imageWidth=300,this.currencySign="€",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.apiPath="https://api.vviinn.com",this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)}}render(){return s(h,{onClick:()=>{this.handleClick(),this.vviinnWidgetOpen.emit({widgetType:"VPR",campaignTypeId:this.campaignType,campaignTypeName:o[this.campaignType],widgetId:this.el.id})},role:"button",tabindex:"0"},s("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(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.sourceImage=this.sourceImage,i.widgetScrollbar=this.modalScrollbar,i.campaigns=this.campaigns,i.campaignType=this.campaignType,i.color=this.color,i.mode="right"===this.position?"grid":this.mode,i.imageWidth=this.imageWidth,i.currencySign=this.currencySign,i.apiPath=this.apiPath,i.buttonElementId=this.el.id,i.noResultText=this.noResultText,i.noResultShow=this.noResultShow,i.gridArrowsDynamic=this.gridArrowsDynamic,this.sidebar=i,i.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar&&(this.sidebar.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.removeChild(this.sidebar))}get el(){return n(this)}};d.style=":host{display:block}";export{d as vviinn_vpr_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,H as n}from"./p-e6fee8d2.js";import{V as r}from"./p-2f9ee951.js";let e=class{constructor(t){o(this,t),this.addStyle=!0}render(){return t(n,{exportparts:"button"},t("button",{class:this.addStyle?"open-button":"raw-open-button",part:"button"},t("slot",null,t(r,null))))}};e.style=":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.raw-open-button{background:none;border:none;cursor:pointer}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#f4f4f4;outline:none}";export{e as vviinn_button}
|