vviinn-widgets 2.114.13 → 2.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,7 +120,7 @@ const slotChangeListener = (component, element) => {
120
120
  component.connectedCallback.call(component);
121
121
  };
122
122
 
123
- const version = "2.114.13";
123
+ const version = "2.115.0";
124
124
 
125
125
  exports.SlotSkeleton = SlotSkeleton;
126
126
  exports.campaignTypeNames = campaignTypeNames;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-4474431a.js');
6
6
  const search_store = require('./search.store-fc473b98.js');
7
7
  const index$1 = require('./index-4022a185.js');
8
- const _package = require('./package-5be52908.js');
8
+ const _package = require('./package-e20a71ae.js');
9
9
  const index$2 = require('./index-1854036f.js');
10
10
  const SearchModalUploadIcon = require('./SearchModalUploadIcon-b6db8026.js');
11
11
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
6
  const search_store = require('./search.store-fc473b98.js');
7
- const _package = require('./package-5be52908.js');
7
+ const _package = require('./package-e20a71ae.js');
8
8
  const index$1 = require('./index-1854036f.js');
9
9
  const index$2 = require('./index-4022a185.js');
10
10
  const triggerFilter = require('./triggerFilter-1c2503d4.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const _package = require('./package-5be52908.js');
6
+ const _package = require('./package-e20a71ae.js');
7
7
  const SearchModalUploadIcon = require('./SearchModalUploadIcon-b6db8026.js');
8
8
  const constants = require('./constants-7684cbfc.js');
9
9
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-4474431a.js');
6
6
  const search_store = require('./search.store-fc473b98.js');
7
7
  const index$1 = require('./index-4022a185.js');
8
- const _package = require('./package-5be52908.js');
8
+ const _package = require('./package-e20a71ae.js');
9
9
  const constants = require('./constants-7684cbfc.js');
10
10
 
11
11
  const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
@@ -118,6 +118,6 @@ const slotChangeListener = (component, element) => {
118
118
  component.connectedCallback.call(component);
119
119
  };
120
120
 
121
- const version = "2.114.13";
121
+ const version = "2.115.0";
122
122
 
123
123
  export { SlotSkeleton as S, fold as a, campaignTypeNames as c, fromString as f, slotChangeListener as s, version as v };
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
2
  import { s as searchState, _ as _function, O as Option, l as fromAlt, n as foldValueObject, o as scaleWithSized, q as center, r as makeRectangularSearchRequest, u as detectedObjectEq, v as toFile, w as processSelectedFile, E as Either, x as match, j as createCommonjsModule, e as commonjsGlobal, y as sequenceToOption, z as fromImage, B as dimensionsFromImage, C as scaleByLargestSide, d as state, D as makeSearchIdRequest, F as getOrElse, G as makeTextSearchRequest, H as makeSearchQueryRequest, I as makeProductListingPageRequest, N as NonEmptyArray } from './search.store-d779cff4.js';
3
3
  import { i as instance, l as createFilterEvent, r as resources, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-58ea7199.js';
4
- import { s as slotChangeListener, c as campaignTypeNames, v as version } from './package-4eda7756.js';
4
+ import { s as slotChangeListener, c as campaignTypeNames, v as version } from './package-daf2ab63.js';
5
5
  import { P as PlusIcon, g as getCustomLabels } from './index-f1b5fbda.js';
6
6
  import { S as SearchModalUploadIcon } from './SearchModalUploadIcon-ef6e9c6c.js';
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-abf408d8.js';
2
2
  import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, i as isClickedInRectBound, O as Option, S as Semigroup, E as Either, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither } from './search.store-d779cff4.js';
3
- import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton, f as fromString, a as fold, v as version } from './package-4eda7756.js';
3
+ import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton, f as fromString, a as fold, v as version } from './package-daf2ab63.js';
4
4
  import { g as getCustomLabels, P as PlusIcon, a as getRecommendationsBody } from './index-f1b5fbda.js';
5
5
  import { i as instance, r as resources, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-58ea7199.js';
6
6
  import { t as triggerFilter, e as emitRequestFiltersMore, C as CheckFilterIcon, S as SquareFilterIcon, s as showActiveOnSubButton, R as RenderButton } from './triggerFilter-ff49b90d.js';
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { c as campaignTypeNames, v as version, S as SlotSkeleton } from './package-4eda7756.js';
2
+ import { c as campaignTypeNames, v as version, S as SlotSkeleton } from './package-daf2ab63.js';
3
3
  import { S as SearchModalUploadIcon } from './SearchModalUploadIcon-ef6e9c6c.js';
4
4
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
2
2
  import { s as searchState, d as state, k as parseExcludedToParams, O as Option } from './search.store-d779cff4.js';
3
3
  import { i as instance, r as resources, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-58ea7199.js';
4
- import { c as campaignTypeNames, v as version, s as slotChangeListener, S as SlotSkeleton } from './package-4eda7756.js';
4
+ import { c as campaignTypeNames, v as version, s as slotChangeListener, S as SlotSkeleton } from './package-daf2ab63.js';
5
5
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
6
6
 
7
7
  const CameraActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
@@ -1,4 +1,4 @@
1
- import{h as t,r as i,c as e,H as o,g as r}from"./p-1c863deb.js";import{s as n,_ as s,O as a,l as c,n as h,o as l,q as d,r as p,u as f,v as u,w as b,E as g,x as v,j as x,e as m,y as w,z as y,B as k,C,d as M,D as z,F as j,G as S,H as O,I as T,N as H}from"./p-a072d202.js";import{i as I,l as V,r as L,c as E,v as N,n as R,o as P}from"./p-77015b82.js";import{s as B,c as _,v as A}from"./p-10cfcc62.js";import{P as W,g as D}from"./p-0de955e0.js";import{S as F}from"./p-7b35f782.js";const Z=()=>t("svg",{width:"12",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z"})),U=()=>t("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z",fill:"currentColor"})),Y=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"80",height:"80",viewBox:"0 0 80 80",fill:"none"},t("circle",{cx:"40",cy:"40",r:"36",fill:"white"}),t("circle",{cx:"40",cy:"40",r:"39",fill:"white","fill-opacity":"0.16",stroke:"white","stroke-width":"2"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48 29.3333H50.6667C53.6133 29.3333 56 31.72 56 34.6667V45.3333H53.3333V34.6667C53.3333 33.2 52.1333 32 50.6667 32H46.5733L45.7867 30.8133L43.9067 28H36.0933L34.2133 30.8133L33.4267 32H29.3333C27.8667 32 26.6667 33.2 26.6667 34.6667V48C26.6667 49.4667 27.8667 50.6667 29.3333 50.6667H36V53.3333H29.3333C26.3867 53.3333 24 50.9467 24 48V34.6667C24 31.72 26.3867 29.3333 29.3333 29.3333H32L34.6667 25.3333H45.3333L48 29.3333ZM40 34.6667C43.68 34.6667 46.6667 37.6533 46.6667 41.3333L46.6533 41.3467C46.6533 42.6933 46.24 43.96 45.5467 45.0133L51.6 51.0667L49.72 52.9467L43.6667 46.8933C42.6133 47.5867 41.36 48 40 48C36.32 48 33.3333 45.0133 33.3333 41.3333C33.3333 37.6533 36.32 34.6667 40 34.6667ZM36 41.3333C36 43.5333 37.8 45.3333 40 45.3333C42.2 45.3333 44 43.5333 44 41.3333C44 39.1333 42.2 37.3333 40 37.3333C37.8 37.3333 36 39.1333 36 41.3333Z",fill:"#161616"})),X=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z",fill:"currentColor"})),K=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),t("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),$=()=>t("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z",fill:"#525252"}),t("path",{d:"M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",fill:"#525252"})),q=({className:i})=>t("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:i},t("path",{d:"M31 3H15C8.37258 3 3 8.37258 3 15V31",stroke:"white","stroke-width":"6","stroke-linecap":"square"})),Q=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z"}),t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z"}),t("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z"}),t("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z"}),t("path",{d:"M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z"}),t("path",{d:"M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z"}),t("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z"}),t("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z"})),G=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z"}));const J=(t,i)=>{var e;if(!t)return"";const o={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,e]=t.split("%3A");o[i]=e})),"categories"===i?null!==(e=o.product_type)&&void 0!==e?e:o.google_product_category:o[i]},tt=class{constructor(t){var o;i(this,t),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.filterType=null===(o=this.filter)||void 0===o?void 0:o.name,this.filter=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}isCategoriesFilterType(){return"categories"===this.filterType}getFilterKind(){return this.isCategoriesFilterType()?"category":this.filterType}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){n.activeIonLink=t,this.selectedFilter=J(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",kind:this.getFilterKind()}))}clearSelectedFilter(t){n.activeIonLink=t.clear,this.selectedFilter=J(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect",kind:this.getFilterKind()}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return this.isCategoriesFilterType()?this.selectedFilter===J(t,"categories"):this.selectedFilter===t.name}render(){var i;const e=(null===(i=this.filter)||void 0===i?void 0:i.filters)||[];return t(o,{exportparts:"filter, show-more-filters"},t("div",{class:{filters:!0,"no-scrollbar-mobile":this.isCategoriesFilterType(),"no-scrollbar":!this.isCategoriesFilterType()}},!!e.length&&e.filter(((t,i)=>!this.hideFilters||i<4)).map(((i,e)=>{const o="categories"===this.filter.name?this.selectedFilter===J(i,"categories"):this.selectedFilter===i.name;return t("div",{role:"button",tabindex:"0",key:e,part:o?"filter active":"filter",class:{filter:!0,active:o},style:{"animation-delay":10*e+"ms"},onPointerUp:t=>{n.loading||(t.stopPropagation(),this.handleFilterSelection(i))},onKeyPress:t=>{n.loading||this.handleEnter(t,i)}},i.name)})),this.hideFilters&&t("div",{class:{"show-more":!0,hidden:e.length<=4,active:!this.hideFilters},role:"button",tabindex:"0","aria-role":"button",onClick:()=>{setTimeout((()=>this.toggleFilters()),300)},onKeyPress:t=>{"Enter"===t.key&&this.toggleFilters()},part:"show-more-filters"})))}get el(){return r(this)}};tt.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}.filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px 6px 24px;scrollbar-width:thin}:host(:not(:first-child)) .filters{margin-top:6px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;font-family:var(--font-family, var(--font-family-base));-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";const it=class{constructor(t){i(this,t),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return s.pipe(n.imageBounds,a.map((t=>{const i=c(h(this.detectedObject).rectangle),{x:e,y:o}=s.pipe(i,l(t),d);return[`${e}px`,`${o}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){s.pipe(n.imageBounds,a.map((t=>{const i=h(this.detectedObject).rectangle,e=c(i),o=l(t)(e);n.detectedObject=this.detectedObject,n.searchArea=a.some(o)}))),p(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!n.detectedObject)return!1;const t=h(this.detectedObject),i=h(n.detectedObject);return f.equals(t,i)}render(){return t(o,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};it.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}:host::before,:host::after{content:"";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}';const et=class{constructor(t){i(this,t),this.handler=void 0}render(){return t(o,null,t("vviinn-error",null,t($,null),t("h4",{slot:"title"},I.t("emptyResultsBlock.title")),"image"===n.searchType&&t("button",{slot:"action",onClick:this.handler},I.t("emptyResultsBlock.button"))))}},ot=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.vviinnCameraEnabled=e(this,"vviinnCameraEnabled",7),this.videoTrack=null,this.initializeZoom=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};"zoom"in i&&(this.zoomCapabilities=i.zoom,await this.videoTrack.applyConstraints({advanced:[{zoom:this.zoomCapabilities.min}]}))},this.onZoom=async t=>{var i;if(!this.videoTrack||!this.zoomCapabilities)return;const{max:e,min:o}=this.zoomCapabilities,r=null!==(i=this.videoTrack.getSettings().zoom)&&void 0!==i?i:o,n=Math.round((e-o)/3*10)/10;let s;s="in"===t?r+n:r-n,s<o&&(s=o),s>e&&(s=e),await this.videoTrack.applyConstraints({advanced:[{zoom:s}]})},this.exampleImageSource=void 0,this.width=0,this.height=0,this.basicEventData=void 0,this.srcObject=void 0,this.cameraButtonClicked=!1,this.selected=!1,this.videoInitialized=!1,this.zoomCapabilities=null}componentWillLoad(){B(this,this.el)}componentDidLoad(){this.videoElement=this.el.shadowRoot.getElementById("camera-preview")}createPlaceholderImageCanvas(){const t=this.el.shadowRoot.getElementById("captured-image-placeholder"),i=this.videoElement,{videoWidth:e,videoHeight:o}=i,r=document.createElement("canvas");r.width=e,r.height=o,r.getContext("2d").drawImage(i,0,0,r.width,r.height);const n=r.toDataURL("image/jpeg");t.src=n}async selectImage(){if(!this.srcObject)return;let t;this.vviinnImageUpload.emit(this.basicEventData);const i=this.el.shadowRoot.getElementById("photo-frame"),e=this.videoElement,o=i.getBoundingClientRect(),r=e.getBoundingClientRect(),{videoWidth:n,videoHeight:a}=e,c=document.createElement("canvas");this.selected=!0,this.videoElement.pause(),this.createPlaceholderImageCanvas();const h=n/r.width,l=a/r.height,d=Math.min(o.width*h,o.height*l);c.width=d,c.height=d;const p=(o.left-r.left+(o.width-d/h)/2)*h,f=(o.top-r.top+(o.height-d/l)/2)*l;c.getContext("2d").drawImage(e,p,f,d,d,0,0,c.width,c.height);const v=c.toDataURL("image/jpeg");t=await u(v),s.pipe(await b(t),g.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUploadFinished.emit()))),this.selected=!1,this.videoInitialized=!1,this.vviinnCameraEnabled.emit(!1)}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}handleSrcObjectChange(){this.srcObject?(this.videoElement.srcObject=this.srcObject,this.videoTrack=this.srcObject.getVideoTracks()[0],this.initializeZoom(),this.videoElement.onloadedmetadata=()=>{this.vviinnCameraEnabled.emit(!0),this.videoInitialized=!0}):this.videoInitialized=!1}render(){return t(o,{onKeyUp:t=>this.handleKeyPress(t),class:{"video-expanded":this.cameraButtonClicked}},t("video",{id:"camera-preview",class:{hidden:!this.videoInitialized||this.selected},autoplay:!0,playsinline:!0,muted:!0}),t("img",{src:this.exampleImageSource,width:this.width,height:this.height,tabindex:1,class:{hidden:this.videoInitialized||this.selected}}),t("img",{id:"captured-image-placeholder",class:{hidden:!this.selected}}),t("div",{class:{container:!0,hidden:!this.videoInitialized}},t("div",{class:"photo-frame-container"},t("div",{id:"photo-frame"},t(q,{className:"photo-frame-corner top-left"}),t(q,{className:"photo-frame-corner top-right"}),t(q,{className:"photo-frame-corner bottom-left"}),t(q,{className:"photo-frame-corner bottom-right"})),t("div",{class:{"zoom-buttons":!0,hidden:!this.zoomCapabilities}},t("button",{onClick:()=>this.onZoom("out")},t(U,null)),t("button",{onClick:()=>this.onZoom("in")},t(W,null)))),t("div",{class:"photo-button-container"},t("button",{class:"photo-button",onClick:()=>this.selectImage()},t(Y,null)))))}get el(){return r(this)}static get watchers(){return{srcObject:["handleSrcObjectChange"]}}};ot.style=":host{display:block;width:100%;height:100%;min-height:0;position:relative;overflow:hidden;flex-grow:1;transition:min-height 1s}:host(.video-expanded){min-height:100%;transition:min-height 0.8s}img{width:100%;height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}#camera-preview{width:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:relative}#captured-image-placeholder{height:auto}.container{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;flex-direction:column;gap:12px;padding:68px 0 48px;justify-content:space-around;align-content:center;box-sizing:border-box}.photo-frame-container{width:100%;height:100%;display:flex;flex-direction:column;gap:12px}#photo-frame{position:relative;aspect-ratio:1/1;border-radius:16px;box-shadow:0 0 0 100vmax rgba(0, 0, 0, 0.32);width:100%;height:auto;max-width:80%;margin:0 auto}@media (max-width: 960px){.photo-frame-container{width:auto;height:auto}}@media (max-width: 380px){#photo-frame{max-width:70%}}.photo-frame-corner{position:absolute;--delta:-3px}.photo-frame-corner.top-left{top:var(--delta);left:var(--delta)}.photo-frame-corner.top-right{top:var(--delta);right:var(--delta);transform:rotate(90deg)}.photo-frame-corner.bottom-left{bottom:var(--delta);left:var(--delta);transform:rotate(-90deg)}.photo-frame-corner.bottom-right{bottom:var(--delta);right:var(--delta);transform:rotate(180deg)}.photo-button-container{display:flex;width:100%;align-items:center;justify-self:flex-end}.photo-button{cursor:pointer;border:none;position:relative;z-index:1;padding:0;color:#6f6f6f;background-color:transparent;-webkit-tap-highlight-color:transparent;line-height:0;margin:0 auto}.zoom-buttons{display:flex;position:relative;justify-content:center;gap:12px}.zoom-buttons button{color:white;display:flex;width:48px;height:48px;justify-content:center;align-items:center;border-radius:var(--border-radius-100, 8px);background-color:rgba(0, 0, 0, 0.48);border:none;cursor:pointer}.hidden{display:none}";const rt=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.basicEventData=void 0,this.startUpload=void 0,this.loading=!1,this.accept="image",this.resetVpsButton=void 0,this.token=void 0,this.apiPath=void 0,this.showInTextSearch=!1,this.uploadStartedHandler=void 0}async handleInputChange(t){this.vviinnImageUpload.emit(this.basicEventData);const i=t.target;this.uploadStartedHandler&&this.uploadStartedHandler();const e=await b(i.files[0],this.showInTextSearch,this.token,this.apiPath);s.pipe(e,v((({kind:t})=>{this.vviinnNoResult.emit(Object.assign(Object.assign({},this.basicEventData),{reason:t}))}),(({links:t})=>{this.vviinnImageUploadFinished.emit({searchId:t.self.href})}))),i.value=null}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return t(o,{exportparts:"button"},this.loading?t("vviinn-preloader",null):t("label",{htmlFor:"fileInput",part:"button"},t("slot",{name:"upload-button-text"},"Upload image")),t("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image"===this.accept?"image/*":"application/octet-stream",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};rt.style=".visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}label{cursor:pointer;display:grid;width:100%;height:100%;transition:background 0.1s ease-in-out}";var nt=x((function(t){
1
+ import{h as t,r as i,c as e,H as o,g as r}from"./p-1c863deb.js";import{s as n,_ as s,O as a,l as c,n as h,o as l,q as d,r as p,u as f,v as u,w as b,E as g,x as v,j as x,e as m,y as w,z as y,B as k,C,d as M,D as z,F as j,G as S,H as O,I as T,N as H}from"./p-a072d202.js";import{i as I,l as V,r as L,c as E,v as N,n as R,o as P}from"./p-77015b82.js";import{s as B,c as _,v as A}from"./p-eb5ff85d.js";import{P as W,g as D}from"./p-0de955e0.js";import{S as F}from"./p-7b35f782.js";const Z=()=>t("svg",{width:"12",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z"})),U=()=>t("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z",fill:"currentColor"})),Y=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"80",height:"80",viewBox:"0 0 80 80",fill:"none"},t("circle",{cx:"40",cy:"40",r:"36",fill:"white"}),t("circle",{cx:"40",cy:"40",r:"39",fill:"white","fill-opacity":"0.16",stroke:"white","stroke-width":"2"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48 29.3333H50.6667C53.6133 29.3333 56 31.72 56 34.6667V45.3333H53.3333V34.6667C53.3333 33.2 52.1333 32 50.6667 32H46.5733L45.7867 30.8133L43.9067 28H36.0933L34.2133 30.8133L33.4267 32H29.3333C27.8667 32 26.6667 33.2 26.6667 34.6667V48C26.6667 49.4667 27.8667 50.6667 29.3333 50.6667H36V53.3333H29.3333C26.3867 53.3333 24 50.9467 24 48V34.6667C24 31.72 26.3867 29.3333 29.3333 29.3333H32L34.6667 25.3333H45.3333L48 29.3333ZM40 34.6667C43.68 34.6667 46.6667 37.6533 46.6667 41.3333L46.6533 41.3467C46.6533 42.6933 46.24 43.96 45.5467 45.0133L51.6 51.0667L49.72 52.9467L43.6667 46.8933C42.6133 47.5867 41.36 48 40 48C36.32 48 33.3333 45.0133 33.3333 41.3333C33.3333 37.6533 36.32 34.6667 40 34.6667ZM36 41.3333C36 43.5333 37.8 45.3333 40 45.3333C42.2 45.3333 44 43.5333 44 41.3333C44 39.1333 42.2 37.3333 40 37.3333C37.8 37.3333 36 39.1333 36 41.3333Z",fill:"#161616"})),X=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z",fill:"currentColor"})),K=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),t("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),$=()=>t("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z",fill:"#525252"}),t("path",{d:"M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",fill:"#525252"})),q=({className:i})=>t("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:i},t("path",{d:"M31 3H15C8.37258 3 3 8.37258 3 15V31",stroke:"white","stroke-width":"6","stroke-linecap":"square"})),Q=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},t("path",{d:"M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z"}),t("path",{d:"M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z"}),t("path",{d:"M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z"}),t("path",{d:"M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z"}),t("path",{d:"M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z"}),t("path",{d:"M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z"}),t("path",{d:"M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z"}),t("path",{d:"M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z"})),G=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z"}));const J=(t,i)=>{var e;if(!t)return"";const o={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,e]=t.split("%3A");o[i]=e})),"categories"===i?null!==(e=o.product_type)&&void 0!==e?e:o.google_product_category:o[i]},tt=class{constructor(t){var o;i(this,t),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.filterType=null===(o=this.filter)||void 0===o?void 0:o.name,this.filter=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}isCategoriesFilterType(){return"categories"===this.filterType}getFilterKind(){return this.isCategoriesFilterType()?"category":this.filterType}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){n.activeIonLink=t,this.selectedFilter=J(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",kind:this.getFilterKind()}))}clearSelectedFilter(t){n.activeIonLink=t.clear,this.selectedFilter=J(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect",kind:this.getFilterKind()}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return this.isCategoriesFilterType()?this.selectedFilter===J(t,"categories"):this.selectedFilter===t.name}render(){var i;const e=(null===(i=this.filter)||void 0===i?void 0:i.filters)||[];return t(o,{exportparts:"filter, show-more-filters"},t("div",{class:{filters:!0,"no-scrollbar-mobile":this.isCategoriesFilterType(),"no-scrollbar":!this.isCategoriesFilterType()}},!!e.length&&e.filter(((t,i)=>!this.hideFilters||i<4)).map(((i,e)=>{const o="categories"===this.filter.name?this.selectedFilter===J(i,"categories"):this.selectedFilter===i.name;return t("div",{role:"button",tabindex:"0",key:e,part:o?"filter active":"filter",class:{filter:!0,active:o},style:{"animation-delay":10*e+"ms"},onPointerUp:t=>{n.loading||(t.stopPropagation(),this.handleFilterSelection(i))},onKeyPress:t=>{n.loading||this.handleEnter(t,i)}},i.name)})),this.hideFilters&&t("div",{class:{"show-more":!0,hidden:e.length<=4,active:!this.hideFilters},role:"button",tabindex:"0","aria-role":"button",onClick:()=>{setTimeout((()=>this.toggleFilters()),300)},onKeyPress:t=>{"Enter"===t.key&&this.toggleFilters()},part:"show-more-filters"})))}get el(){return r(this)}};tt.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}.filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px 6px 24px;scrollbar-width:thin}:host(:not(:first-child)) .filters{margin-top:6px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;font-family:var(--font-family, var(--font-family-base));-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";const it=class{constructor(t){i(this,t),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return s.pipe(n.imageBounds,a.map((t=>{const i=c(h(this.detectedObject).rectangle),{x:e,y:o}=s.pipe(i,l(t),d);return[`${e}px`,`${o}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){s.pipe(n.imageBounds,a.map((t=>{const i=h(this.detectedObject).rectangle,e=c(i),o=l(t)(e);n.detectedObject=this.detectedObject,n.searchArea=a.some(o)}))),p(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!n.detectedObject)return!1;const t=h(this.detectedObject),i=h(n.detectedObject);return f.equals(t,i)}render(){return t(o,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};it.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#525252;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}:host::before,:host::after{content:"";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}';const et=class{constructor(t){i(this,t),this.handler=void 0}render(){return t(o,null,t("vviinn-error",null,t($,null),t("h4",{slot:"title"},I.t("emptyResultsBlock.title")),"image"===n.searchType&&t("button",{slot:"action",onClick:this.handler},I.t("emptyResultsBlock.button"))))}},ot=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.vviinnCameraEnabled=e(this,"vviinnCameraEnabled",7),this.videoTrack=null,this.initializeZoom=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};"zoom"in i&&(this.zoomCapabilities=i.zoom,await this.videoTrack.applyConstraints({advanced:[{zoom:this.zoomCapabilities.min}]}))},this.onZoom=async t=>{var i;if(!this.videoTrack||!this.zoomCapabilities)return;const{max:e,min:o}=this.zoomCapabilities,r=null!==(i=this.videoTrack.getSettings().zoom)&&void 0!==i?i:o,n=Math.round((e-o)/3*10)/10;let s;s="in"===t?r+n:r-n,s<o&&(s=o),s>e&&(s=e),await this.videoTrack.applyConstraints({advanced:[{zoom:s}]})},this.exampleImageSource=void 0,this.width=0,this.height=0,this.basicEventData=void 0,this.srcObject=void 0,this.cameraButtonClicked=!1,this.selected=!1,this.videoInitialized=!1,this.zoomCapabilities=null}componentWillLoad(){B(this,this.el)}componentDidLoad(){this.videoElement=this.el.shadowRoot.getElementById("camera-preview")}createPlaceholderImageCanvas(){const t=this.el.shadowRoot.getElementById("captured-image-placeholder"),i=this.videoElement,{videoWidth:e,videoHeight:o}=i,r=document.createElement("canvas");r.width=e,r.height=o,r.getContext("2d").drawImage(i,0,0,r.width,r.height);const n=r.toDataURL("image/jpeg");t.src=n}async selectImage(){if(!this.srcObject)return;let t;this.vviinnImageUpload.emit(this.basicEventData);const i=this.el.shadowRoot.getElementById("photo-frame"),e=this.videoElement,o=i.getBoundingClientRect(),r=e.getBoundingClientRect(),{videoWidth:n,videoHeight:a}=e,c=document.createElement("canvas");this.selected=!0,this.videoElement.pause(),this.createPlaceholderImageCanvas();const h=n/r.width,l=a/r.height,d=Math.min(o.width*h,o.height*l);c.width=d,c.height=d;const p=(o.left-r.left+(o.width-d/h)/2)*h,f=(o.top-r.top+(o.height-d/l)/2)*l;c.getContext("2d").drawImage(e,p,f,d,d,0,0,c.width,c.height);const v=c.toDataURL("image/jpeg");t=await u(v),s.pipe(await b(t),g.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUploadFinished.emit()))),this.selected=!1,this.videoInitialized=!1,this.vviinnCameraEnabled.emit(!1)}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}handleSrcObjectChange(){this.srcObject?(this.videoElement.srcObject=this.srcObject,this.videoTrack=this.srcObject.getVideoTracks()[0],this.initializeZoom(),this.videoElement.onloadedmetadata=()=>{this.vviinnCameraEnabled.emit(!0),this.videoInitialized=!0}):this.videoInitialized=!1}render(){return t(o,{onKeyUp:t=>this.handleKeyPress(t),class:{"video-expanded":this.cameraButtonClicked}},t("video",{id:"camera-preview",class:{hidden:!this.videoInitialized||this.selected},autoplay:!0,playsinline:!0,muted:!0}),t("img",{src:this.exampleImageSource,width:this.width,height:this.height,tabindex:1,class:{hidden:this.videoInitialized||this.selected}}),t("img",{id:"captured-image-placeholder",class:{hidden:!this.selected}}),t("div",{class:{container:!0,hidden:!this.videoInitialized}},t("div",{class:"photo-frame-container"},t("div",{id:"photo-frame"},t(q,{className:"photo-frame-corner top-left"}),t(q,{className:"photo-frame-corner top-right"}),t(q,{className:"photo-frame-corner bottom-left"}),t(q,{className:"photo-frame-corner bottom-right"})),t("div",{class:{"zoom-buttons":!0,hidden:!this.zoomCapabilities}},t("button",{onClick:()=>this.onZoom("out")},t(U,null)),t("button",{onClick:()=>this.onZoom("in")},t(W,null)))),t("div",{class:"photo-button-container"},t("button",{class:"photo-button",onClick:()=>this.selectImage()},t(Y,null)))))}get el(){return r(this)}static get watchers(){return{srcObject:["handleSrcObjectChange"]}}};ot.style=":host{display:block;width:100%;height:100%;min-height:0;position:relative;overflow:hidden;flex-grow:1;transition:min-height 1s}:host(.video-expanded){min-height:100%;transition:min-height 0.8s}img{width:100%;height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}#camera-preview{width:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:relative}#captured-image-placeholder{height:auto}.container{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;flex-direction:column;gap:12px;padding:68px 0 48px;justify-content:space-around;align-content:center;box-sizing:border-box}.photo-frame-container{width:100%;height:100%;display:flex;flex-direction:column;gap:12px}#photo-frame{position:relative;aspect-ratio:1/1;border-radius:16px;box-shadow:0 0 0 100vmax rgba(0, 0, 0, 0.32);width:100%;height:auto;max-width:80%;margin:0 auto}@media (max-width: 960px){.photo-frame-container{width:auto;height:auto}}@media (max-width: 380px){#photo-frame{max-width:70%}}.photo-frame-corner{position:absolute;--delta:-3px}.photo-frame-corner.top-left{top:var(--delta);left:var(--delta)}.photo-frame-corner.top-right{top:var(--delta);right:var(--delta);transform:rotate(90deg)}.photo-frame-corner.bottom-left{bottom:var(--delta);left:var(--delta);transform:rotate(-90deg)}.photo-frame-corner.bottom-right{bottom:var(--delta);right:var(--delta);transform:rotate(180deg)}.photo-button-container{display:flex;width:100%;align-items:center;justify-self:flex-end}.photo-button{cursor:pointer;border:none;position:relative;z-index:1;padding:0;color:#6f6f6f;background-color:transparent;-webkit-tap-highlight-color:transparent;line-height:0;margin:0 auto}.zoom-buttons{display:flex;position:relative;justify-content:center;gap:12px}.zoom-buttons button{color:white;display:flex;width:48px;height:48px;justify-content:center;align-items:center;border-radius:var(--border-radius-100, 8px);background-color:rgba(0, 0, 0, 0.48);border:none;cursor:pointer}.hidden{display:none}";const rt=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.basicEventData=void 0,this.startUpload=void 0,this.loading=!1,this.accept="image",this.resetVpsButton=void 0,this.token=void 0,this.apiPath=void 0,this.showInTextSearch=!1,this.uploadStartedHandler=void 0}async handleInputChange(t){this.vviinnImageUpload.emit(this.basicEventData);const i=t.target;this.uploadStartedHandler&&this.uploadStartedHandler();const e=await b(i.files[0],this.showInTextSearch,this.token,this.apiPath);s.pipe(e,v((({kind:t})=>{this.vviinnNoResult.emit(Object.assign(Object.assign({},this.basicEventData),{reason:t}))}),(({links:t})=>{this.vviinnImageUploadFinished.emit({searchId:t.self.href})}))),i.value=null}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return t(o,{exportparts:"button"},this.loading?t("vviinn-preloader",null):t("label",{htmlFor:"fileInput",part:"button"},t("slot",{name:"upload-button-text"},"Upload image")),t("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image"===this.accept?"image/*":"application/octet-stream",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};rt.style=".visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}label{cursor:pointer;display:grid;width:100%;height:100%;transition:background 0.1s ease-in-out}";var nt=x((function(t){
2
2
  /*!
3
3
  * Cropper.js v1.5.13
4
4
  * https://fengyuanchen.github.io/cropperjs