@nyris/nyris-webapp 0.3.33 → 0.3.34
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/build/asset-manifest.json +28 -14
- package/build/index.html +1 -1
- package/build/js/settings.example.js +13 -25
- package/build/{precache-manifest.4cff5b8aafe3d00d59bc2c9725eb6ade.js → precache-manifest.b85c7807a93875355f9f0f6490e6dc8c.js} +70 -14
- package/build/service-worker.js +1 -1
- package/build/static/css/main.f2aa67fc.chunk.css +2 -0
- package/build/static/css/main.f2aa67fc.chunk.css.map +1 -0
- package/build/static/js/2.d1f7e826.chunk.js +3 -0
- package/build/static/js/2.d1f7e826.chunk.js.map +1 -0
- package/build/static/js/main.e9aec8a9.chunk.js +3 -0
- package/build/static/js/main.e9aec8a9.chunk.js.map +1 -0
- package/build/static/media/filter.bc412f08.svg +3 -0
- package/build/static/media/icon_search_image2.fab34be4.svg +3 -0
- package/build/static/media/img-1-1.6144e5f9.png +0 -0
- package/build/static/media/img-1-2.ad943f0f.png +0 -0
- package/build/static/media/img2-1.a87c79c7.png +0 -0
- package/build/static/media/img2-2.39c5b73f.png +0 -0
- package/build/static/media/img3-1.443b0c3a.png +0 -0
- package/build/static/media/img3-2.37db7999.png +0 -0
- package/build/static/media/img4-1.9c34c158.png +0 -0
- package/build/static/media/img4-2.9d280a04.png +0 -0
- package/build/static/media/img5-1.b61dbd4d.png +0 -0
- package/build/static/media/img5-2.1c77c093.png +0 -0
- package/build/static/media/img6-1.8b03dd21.png +0 -0
- package/build/static/media/img6-2.1e3e7fed.png +0 -0
- package/build/static/media/{info-tooltip.5feeef22.svg → info-tooltip.b98e8a9c.svg} +2 -2
- package/build/static/media/take_photo.76423216.svg +5 -0
- package/package.json +3 -3
- package/public/js/settings.example.js +13 -25
- package/src/Store/constants.ts +0 -1
- package/src/Store/search/Search.ts +32 -17
- package/src/Store/search/search.initialState.ts +17 -16
- package/src/Store/search/types.ts +15 -14
- package/src/common/assets/icons/expand.svg +3 -27
- package/src/common/assets/icons/filter.svg +3 -0
- package/src/common/assets/icons/icon_search_image2.svg +2 -25
- package/src/common/assets/icons/info-tooltip.svg +2 -2
- package/src/common/assets/icons/take_photo.svg +5 -0
- package/src/common/assets/images/imageCaptureHelp/img-1-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img-1-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img2-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img2-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img3-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img3-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img4-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img4-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img5-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img5-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img6-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img6-2.png +0 -0
- package/src/components/DetailItem.tsx +54 -73
- package/src/components/FooterMobile.tsx +80 -41
- package/src/components/HeaderMobile.tsx +225 -227
- package/src/components/ImageCaptureHelpModal.tsx +90 -0
- package/src/components/Layout.tsx +39 -9
- package/src/components/MobilePostFilter.tsx +20 -0
- package/src/components/PanelResult/expandable-panel.tsx +21 -21
- package/src/components/PanelResult/index.tsx +52 -19
- package/src/components/ProductList/index.tsx +5 -3
- package/src/components/appMobile.scss +64 -32
- package/src/components/carousel/ImagePreviewCarousel.tsx +1 -1
- package/src/components/drawer/cameraCustom.tsx +8 -33
- package/src/components/input/inputSearch.tsx +68 -80
- package/src/components/pre-filter/index.tsx +31 -22
- package/src/components/results/ItemResult.tsx +79 -84
- package/src/constants.ts +56 -0
- package/src/page/landingPage/AppMobile.tsx +34 -104
- package/src/page/landingPage/common.scss +164 -36
- package/src/page/result/index.tsx +70 -56
- package/src/services/Feedback.ts +20 -2
- package/src/services/types.ts +0 -1
- package/src/translations.ts +4 -0
- package/src/types.ts +3 -2
- package/build/static/css/main.d0b21fa5.chunk.css +0 -2
- package/build/static/css/main.d0b21fa5.chunk.css.map +0 -1
- package/build/static/js/2.69ce0823.chunk.js +0 -3
- package/build/static/js/2.69ce0823.chunk.js.map +0 -1
- package/build/static/js/main.6122377b.chunk.js +0 -3
- package/build/static/js/main.6122377b.chunk.js.map +0 -1
- package/build/static/media/icon_search_image2.e46fdfc5.svg +0 -26
- /package/build/static/js/{2.69ce0823.chunk.js.LICENSE.txt → 2.d1f7e826.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.6122377b.chunk.js.LICENSE.txt → main.e9aec8a9.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see main.e9aec8a9.chunk.js.LICENSE.txt */
|
|
2
|
+
(this["webpackJsonp@nyris/nyris-webapp"]=this["webpackJsonp@nyris/nyris-webapp"]||[]).push([[0],{205:function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=r(0)},function(e,t){e.exports=r(83)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t.Preview=n.default;var a=r(7);t.Capture=a.default,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(14))},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=a(r(0)),c=r(4),l=r(1),u=o(r(5)),s=r(6),f=function(e){return e.dotHover?"pointer":e.tlHover?"nw-resize":e.trHover?"ne-resize":e.blHover?"sw-resize":e.brHover?"se-resize":e.rectHover?"move":"default"};t.default=function(e){var t=e.selection,r=e.image,a=e.maxWidth,o=e.maxHeight,h=e.onSelectionChange,d=e.regions,p=e.dotColor,m=e.minCropWidth,v=e.minCropHeight,g=l.getThumbSizeLongestEdge(a,o,r.width,r.height),y=g.w,b=g.h,w=function(e,t,r,n,a){var o=r.x1,i=r.x2,c=r.y1,l=r.y2,u={x1:Math.max(o*e,5),x2:Math.min(i*e,e-5),y1:Math.max(c*t,5),y2:Math.min(l*t,t-5)};return n&&a&&u.x2-u.x1<n&&u.y2-u.y1<a?{x1:Math.max(o*e-n/2,5),x2:Math.min(i*e+n/2,e-5),y1:Math.max(c*t-a/2,5),y2:Math.min(l*t+a/2,t-5)}:u}(y,b,t,m,v),x=w.x1,E=w.y1,O=w.x2,j=w.y2,C=[100,100],k=C[0],L=C[1],S=i.useRef(null),N=i.useState({tlHover:!1,trHover:!1,blHover:!1,brHover:!1,dotHover:!1,rectHover:!1}),R=N[0],I=N[1],_=function(e){var t={};Object.assign(t,R,e),I(t)},M=function(e,t){if(!(t.target instanceof u.default.Stage)){var r=t.target.getAbsolutePosition(),n=r.x,a=r.y,o=t.target.getSize(),i=o.width,c=o.height,l=function(e,t,r,n,a,o){var i=e.x1,c=e.x2,l=e.y1,u=e.y2;switch(t){case"rect":return{x1:r,y1:n,x2:r+a,y2:n+o};case"tl":return{x1:r,y1:n,x2:c,y2:u};case"tr":return{x2:r,y1:n,x1:i,y2:u};case"bl":return{x1:r,y2:n,x2:c,y1:l};case"br":return{x2:r,y2:n,x1:i,y1:l}}}({x1:x,x2:O,y1:E,y2:j},e,n+("rect"!==e?z:0),a+("rect"!==e?z:0),i,c),s={x1:l.x1/y,x2:l.x2/y,y1:l.y1/b,y2:l.y2/b};G(s)}};i.useEffect((function(){if(S.current){var e=new u.default.Animation((function(e){if(e&&S.current){var t=40*e.time/1e3;S.current.dashOffset(-t)}}),S.current.getLayer());return e.start(),function(){e&&e.stop()}}}),[S]);var T=M.bind(null,"rect"),F=M.bind(null,"tl"),P=M.bind(null,"tr"),H=M.bind(null,"bl"),A=M.bind(null,"br"),G=function(e){h&&h(e)};if(!r)return null;var B=d.map((function(e,t){var r=e.normalizedRect,n=r.x1,a=r.x2,o=r.y1,i=r.y2,c=y*((a-n)/2+n),l=b*((i-o)/2+o);return{region:e,key:c+"-"+l+"-"+t,x:c,y:l,show:e.show}})),z=10;return i.default.createElement(c.Stage,{width:y,height:b,style:{cursor:f(R),width:y,height:b,margin:"auto"}},i.default.createElement(c.Layer,{key:"img"},i.default.createElement(c.Image,{image:r,width:y,height:b})),i.default.createElement(c.Layer,{key:"selection"},i.default.createElement(c.Rect,{stroke:"white",opacity:0,strokeWidth:0,x:x,y:E,width:O-x,height:j-E}),i.default.createElement(c.Rect,{stroke:"black",draggable:!0,onDragMove:T,dragBoundFunc:function(e){var t=e.x,r=e.y,n=O-x+5,a=j-E+5;return{x:Math.max(Math.min(t,y-n),5),y:Math.max(Math.min(r,b-a),5)}},onMouseOver:function(){return _({rectHover:!0})},onMouseOut:function(){return _({rectHover:!1})},opacity:0,strokeWidth:2,x:x,y:E,width:O-x,height:j-E,dash:[0,0],ref:S}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:0,y:0,width:y,height:E}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:0,y:j,width:y,height:b-j}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:0,y:E,width:x,height:j-E}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:O,y:E,width:y-O,height:j-E})),i.default.createElement(c.Layer,null,i.default.createElement(c.Path,{data:"M2 18V10C2 5.58172 5.58172 2 10 2H18",stroke:"white",strokeWidth:5,lineCap:"round",opacity:1,x:x-3,y:E-3,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{draggable:!0,onDragMove:F,dragBoundFunc:function(e){var t=e.x,r=e.y;return{x:Math.max(Math.min(t,O-k),0),y:Math.max(Math.min(r,j-L),0)}},onMouseOver:function(){return _({tlHover:!0})},onMouseOut:function(){return _({tlHover:!1})},opacity:1,width:20+z,height:20+z,x:x-z,y:E-z}),i.default.createElement(c.Path,{data:"M2 2L10 2C14.4183 2 18 5.58172 18 10L18 18",stroke:"white",strokeWidth:5,lineCap:"round",opacity:1,x:O+3,y:E-3,offsetX:20,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{draggable:!0,onDragMove:P,dragBoundFunc:function(e){var t=e.x,r=e.y;return{x:Math.min(Math.max(t,x+k),y),y:Math.max(Math.min(r,j-L),0)}},onMouseOver:function(){return _({trHover:!0})},onMouseOut:function(){return _({trHover:!1})},opacity:1,width:20+z,height:20+z,x:O-z,y:E-z,offsetX:20-z}),i.default.createElement(c.Path,{data:"M18 18L10 18C5.58172 18 2 14.4183 2 10L2 2",stroke:"white",strokeWidth:5,lineCap:"round",opacity:1,x:x-3,y:j+3,offsetY:20,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{draggable:!0,onDragMove:H,dragBoundFunc:function(e){var t=e.x,r=e.y;return{x:Math.max(Math.min(t,O-k),0),y:Math.min(Math.max(r,E+L),b)}},onMouseOver:function(){return _({blHover:!0})},onMouseOut:function(){return _({blHover:!1})},opacity:1,width:20+z,height:20+z,x:x-z,y:j-z,offsetY:20-z}),i.default.createElement(c.Path,{data:"M18 2L18 10C18 14.4183 14.4183 18 10 18L2 18",stroke:"white",strokeWidth:5,lineCap:"round",x:O+3,y:j+3,opacity:1,offsetY:20,offsetX:20,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{opacity:1,draggable:!0,onDragMove:A,dragBoundFunc:function(e){var t=e.x,r=e.y;return{x:Math.min(Math.max(t,x+k),y),y:Math.min(Math.max(r,E+L),b)}},onMouseOver:function(){return _({brHover:!0})},onMouseOut:function(){return _({brHover:!1})},x:O-z,y:j-z,width:20+z,height:20+z,offsetY:20-z,offsetX:20-z})),i.default.createElement(s.NodeGroup,{data:B,keyAccessor:function(e){return e.key},start:function(e,t){return{opacity:0,x:-100,y:e.y}},enter:function(e,t){return{opacity:[1],x:[e.x],y:e.y,timing:{delay:100*t,duration:300}}}},(function(e){return i.default.createElement(c.Layer,{key:"dots"},e.map((function(e){var t=e.key,r=e.data,a=e.state;return i.default.createElement(c.Circle,n({onClick:function(){G(r.region.normalizedRect),_({dotHover:!1})},onTap:function(){G(r.region.normalizedRect),_({dotHover:!1})},onMouseOver:function(){return _({dotHover:!0})},onMouseOut:function(){return _({dotHover:!1})},key:t,radius:7},a,{stroke:p,fill:"white",strokeWidth:5,opacity:r.region.show}))})))})))}},function(e,t){e.exports=r(793)},function(e,t){e.exports=r(451)},function(e,t){e.exports=r(866)},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=o(r(0));r(8);var l=r(1),u=i(r(12)),s=i(r(13));t.default=function(e){var t=e.onCaptureComplete,r=e.onCaptureCanceled,o=e.useAppText,i=c.useRef(null),f=c.useState(),h=f[0],d=f[1];return c.useEffect((function(){navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:640}}).then((function(e){var t=i.current;t&&(t.srcObject=e,d(e))})).catch((function(e){switch(e.name){case"NotFoundError":alert("Camera not found. Try with a file instead.");break;case"NotAllowedError":alert("You have to allow using the camera in order to take pictures. If you are not asked again for permissions, go to site settings and reset permissions there.");break;default:alert("Sorry, something has gone wrong while enabeling the camera. ("+e+")")}}))}),[i]),c.useEffect((function(){return function(){h&&(h.getVideoTracks&&h.getAudioTracks?(h.getVideoTracks().map((function(e){return e.stop()})),h.getAudioTracks().map((function(e){return e.stop()}))):h.stop())}}),[h]),c.default.createElement("div",{className:"nyris-capture-captureUi"},c.default.createElement("video",{autoPlay:!0,playsInline:!0,ref:i,className:"nyris-capture-video"}),c.default.createElement("input",{type:"file",name:"file",id:"capture_file",className:"nyris-capture-inputFile",accept:"image/*",capture:"environment",onChange:function(e){return n(void 0,void 0,void 0,(function(){var r,n;return a(this,(function(a){switch(a.label){case 0:return(r=e.target)&&r.files?[4,l.urlOrBlobToCanvas(r.files[0])]:[3,2];case 1:n=a.sent(),t(n),a.label=2;case 2:return[2]}}))}))}}),c.default.createElement("label",{className:"nyris-capture-app-button",htmlFor:"capture_file"},o),c.default.createElement("button",{className:"nyris-capture-backBtn",onClick:r},c.default.createElement("img",{src:s.default,alt:"back",width:"72"})),c.default.createElement("button",{className:"nyris-capture-searchBtn",onClick:function(){if(i.current){var e=l.elementToCanvas(i.current);t(e)}}},c.default.createElement("img",{src:u.default,alt:"capture"})))}},function(e,t,r){var n=r(9),a=r(10);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);n(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},function(e,t,r){"use strict";var n,a=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),o=[];function i(e){for(var t=-1,r=0;r<o.length;r++)if(o[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},n=[],a=0;a<e.length;a++){var c=e[a],l=t.base?c[0]+t.base:c[0],u=r[l]||0,s="".concat(l," ").concat(u);r[l]=u+1;var f=i(s),h={css:c[1],media:c[2],sourceMap:c[3]};-1!==f?(o[f].references++,o[f].updater(h)):o.push({identifier:s,updater:m(h,t),references:1}),n.push(s)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var u,s=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function f(e,t,r,n){var a=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=s(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function h(e,t,r){var n=r.css,a=r.media,o=r.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var d=null,p=0;function m(e,t){var r,n,a;if(t.singleton){var o=p++;r=d||(d=l(t)),n=f.bind(null,r,o,!1),a=f.bind(null,r,o,!0)}else r=l(t),n=h.bind(null,r,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var a=i(r[n]);o[a].references--}for(var l=c(e,t),u=0;u<r.length;u++){var s=i(r[u]);0===o[s].references&&(o[s].updater(),o.splice(s,1))}r=l}}}},function(e,t,r){(t=r(11)(!1)).push([e.i,".nyris-capture-app-button {\n position: fixed;\n top: 0;\n right: 0;\n color: white;\n margin: 10px;\n padding: 10px;\n background-color: rgba(255,255,255,0.3);\n border-radius: 2px;\n text-shadow: 1px 1px 3px #000;\n line-height: 1em;\n box-shadow: 1px 1px 3px rgba(0, 0, 0,0.5);\n}\n\n.nyris-capture-inputFile {\n visibility: hidden;\n}\n\n.nyris-capture-captureUi {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n background-color: black;\n z-index: 10000;\n}\n\n.nyris-capture-video {\n position: fixed;\n min-height: 100%;\n min-width: 100%;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n width: auto;\n height: auto;\n}\n\n.nyris-capture-searchBtn {\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 10001;\n left: 50%;\n transform: translateX(-50%);\n\n color: black;\n background-color: transparent;\n text-transform: uppercase;\n border: 0;\n margin: auto;\n display: block;\n -webkit-filter: drop-shadow( 1px 1px 5px #000 );\n filter: drop-shadow( 1px 1px 5px #000 );\n\n}\n\n.nyris-capture-backBtn {\n position: fixed;\n bottom: 0;\n left: 0;\n z-index: 10001;\n color: white;\n background-color: transparent;\n border: 0;\n\n text-transform: uppercase;\n border-radius: 50%;\n display: block;\n padding: 0;\n font-size: 16px;\n margin-bottom: 5px;\n margin-left: 5px;\n -webkit-filter: drop-shadow( 1px 1px 5px #000 );\n filter: drop-shadow( 1px 1px 5px #000 );\n}\n\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,a,o=e[1]||"",i=e[3];if(!i)return o;if(t&&"function"==typeof btoa){var c=(r=i,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(a," */")),l=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(l).concat([c]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&a[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},function(e,t,r){"use strict";r.r(t),r.d(t,"ReactComponent",(function(){return l}));var n=r(0);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var o=n.createElement("defs",null,n.createElement("path",{id:"capture_svg__a",d:"M150 540a30 30 0 1160 0 30 30 0 01-60 0z"}),n.createElement("path",{id:"capture_svg__b",d:"M144 540a36 36 0 1172 0 36 36 0 01-72 0zm36 33.95a33.94 33.94 0 100-67.89 33.94 33.94 0 000 67.89z"})),i=n.createElement("use",{fill:"#c00",xlinkHref:"#capture_svg__a",transform:"translate(-144 -504)"}),c=n.createElement("use",{fill:"#c00",fillOpacity:.9,xlinkHref:"#capture_svg__b",opacity:.7,transform:"translate(-144 -504)"});function l(e){return n.createElement("svg",a({width:72,height:72},e),o,i,c)}t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA3MiA3MiI+PGRlZnM+PHBhdGggaWQ9IjFoN3JhIiBkPSJNMTUwIDU0MGEzMCAzMCAwIDEgMSA2MCAwIDMwIDMwIDAgMCAxLTYwIDB6Ii8+PHBhdGggaWQ9IjFoN3JiIiBkPSJNMTQ0IDU0MGEzNiAzNiAwIDEgMSA3MiAwIDM2IDM2IDAgMCAxLTcyIDB6bTM2IDMzLjk1YTMzLjk0IDMzLjk0IDAgMSAwIDAtNjcuODkgMzMuOTQgMzMuOTQgMCAwIDAgMCA2Ny44OXoiLz48L2RlZnM+PGc+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE0NCAtNTA0KSI+PHVzZSBmaWxsPSIjYzAwIiB4bGluazpocmVmPSIjMWg3cmEiLz48L2c+PGcgb3BhY2l0eT0iLjciIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNDQgLTUwNCkiPjx1c2UgZmlsbD0iI2MwMCIgZmlsbC1vcGFjaXR5PSIuOSIgeGxpbms6aHJlZj0iIzFoN3JiIi8+PC9nPjwvZz48L3N2Zz4="},function(e,t,r){"use strict";r.r(t),r.d(t,"ReactComponent",(function(){return c}));var n=r(0);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var o=n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),i=n.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",fill:"#fff"});function c(e){return n.createElement("svg",a({width:24,height:24},e),o,i)}t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KICAgIDxwYXRoIGQ9Ik0yMCAxMUg3LjgzbDUuNTktNS41OUwxMiA0bC04IDggOCA4IDEuNDEtMS40MUw3LjgzIDEzSDIwdi0yeiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg=="},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeFileHandler=function(e){return function(t){var r=null,n=t;if(n&&n.target){var a=n.target;if(a.files&&a.files[0]&&(r=a.files[0]),a.value&&(a.value=""),r)return e(r)}var o=t;if(o&&(r=o.dataTransfer&&o.dataTransfer.files[0]),r)return e(r)}}}])},262:function(e,t,r){e.exports=r.p+"static/media/support3.4a17f96e.svg"},263:function(e,t,r){e.exports=r.p+"static/media/Union.3c6afbb0.svg"},264:function(e,t,r){e.exports=r.p+"static/media/unnamed.f7f1b5cb.png"},413:function(e,t,r){},414:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(t){o(t)}}function c(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(c){o=[6,c],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(735));function c(e,t){return{x1:e.x1*t.w,x2:e.x2*t.w,y1:e.y1*t.h,y2:e.y2*t.h}}function l(e){return{w:e.x2-e.x1,h:e.y2-e.y1}}function u(e){var t=e,r=e;return{w:t.naturalWidth||r.videoWidth||e.width,h:t.naturalHeight||r.videoHeight||e.height}}t.selectFirstCenteredRegion=function(e,t,r){var n=e.filter((function(e){return function(e,t){var r=e[0],n=e[1],a=t[0],o=t[1];return Math.sqrt(Math.pow(r-a,2)+Math.pow(n-o,2))}([.5,.5],function(e){var t=e.x1,r=e.x2,n=e.y1;return[(r-t)/2+t,(e.y2-n)/2+n]}(e.normalizedRect))<t}));return 0===n.length?r:n[0].normalizedRect},t.getUrlParam=function(e){var t=new RegExp("[?&]"+e+"(=([^&#]*))?(&|$|#)","i").exec(window.location.href);return t&&t[2]?(console.log("has value",e,t[2]),decodeURIComponent(t[2])):!!t||void 0},t.getThumbSizeArea=function(e,t,r){var n=e*t,a=Math.sqrt(n*r);return{w:a,h:a/r}},t.getThumbSizeLongestEdge=function(e,t,r,n){return e/t>r/n?{w:r*t/n,h:t}:{w:e,h:n*e/r}},t.scaleRect=c,t.getRectSize=l,t.getRectAspectRatio=function(e,t){var r=l(c(e,t));return r.w/r.h},t.getElementSize=u,t.elementToCanvas=function(e,t,r){var n=u(e),a=n.w,o=n.h,i=r||{x1:0,x2:1,y1:0,y2:1},c=i.x1,l=i.x2,s=i.y1,f=a*c,h=a*(l-c),d=o*s,p=o*(i.y2-s),m=t&&t.w||a,v=t&&t.h||o,g=document.createElement("canvas");g.width=m,g.height=v;var y=g.getContext("2d");if(!y)throw Error("Error converting element to canvas: Can not get 2d context");return y.fillStyle="rgb(255, 255,255)",y.fillRect(0,0,m,v),y.drawImage(e,f,d,h,p,0,0,m,v),g},t.urlOrBlobToCanvas=function(e){return new Promise((function(t,r){i.default(e,(function(e){e?t(e):r()}),{canvas:!0,orientation:!0,crossOrigin:"anonymous"})}))},t.canvasToJpgBlob=function(e,t){return new Promise((function(r,n){e.toBlob((function(e){e?r(e):n()}),"image/jpeg",t)}))},t.cadExtensions=[".stp",".step",".stl",".obj",".glb",".gltf"],t.isCadFile=function(e){return t.cadExtensions.some((function(t){return e.name.endsWith(t)}))},t.isImageFile=function(e){return e.type.startsWith("image/")},t.timePromise=function(e){return n(this,void 0,void 0,(function(){var t,r,n;return a(this,(function(a){switch(a.label){case 0:return t=Date.now(),[4,e];case 1:return r=a.sent(),n=Date.now(),[2,{res:r,durationSeconds:(n-t)/1e3}]}}))}))}},459:function(e,t,r){e.exports=r.p+"static/media/img-1-1.6144e5f9.png"},460:function(e,t,r){e.exports=r.p+"static/media/img-1-2.ad943f0f.png"},461:function(e,t,r){e.exports=r.p+"static/media/img2-1.a87c79c7.png"},462:function(e,t,r){e.exports=r.p+"static/media/img2-2.39c5b73f.png"},463:function(e,t,r){e.exports=r.p+"static/media/img3-1.443b0c3a.png"},464:function(e,t,r){e.exports=r.p+"static/media/img3-2.37db7999.png"},465:function(e,t,r){e.exports=r.p+"static/media/img4-1.9c34c158.png"},466:function(e,t,r){e.exports=r.p+"static/media/img4-2.9d280a04.png"},467:function(e,t,r){e.exports=r.p+"static/media/img5-1.b61dbd4d.png"},468:function(e,t,r){e.exports=r.p+"static/media/img5-2.1c77c093.png"},469:function(e,t,r){e.exports=r.p+"static/media/img6-1.8b03dd21.png"},470:function(e,t,r){e.exports=r.p+"static/media/img6-2.1e3e7fed.png"},472:function(e,t,r){e.exports=r.p+"static/media/reverse_camera.28c80509.svg"},476:function(e,t,r){e.exports=r.p+"static/media/icon_search.373c3cc4.svg"},479:function(e,t,r){e.exports=r.p+"static/media/Icon_Upload.ebf185b4.svg"},483:function(e,t,r){e.exports=r.p+"static/media/camera.ae3f4f51.svg"},487:function(e,t,r){e.exports=r.p+"static/media/email_share.92bbfb8b.svg"},504:function(e,t,r){e.exports=r(865)},733:function(e,t,r){},791:function(e,t,r){},792:function(e,t,r){},83:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(t){o(t)}}function c(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(c){o=[6,c],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),r(734);var c=r(414),l=i(r(740));!function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(414));var u=function(){function e(e){if(this.httpClient=l.default.create(),!e.apiKey)throw new Error("The api-key is not set.");this.apiKey=e.apiKey;var t=e.baseUrl||"https://api.nyris.io";this.imageMatchingUrl=t+"/find/v1.1",this.cadMatchingUrl=t+"/cad/find/v0.1",this.imageMatchingUrlBySku=t+"/recommend/v1/",this.imageMatchingSubmitManualUrl=t+"/find/v1/manual/",this.feedbackUrl=t+"/feedback/v1/",this.regionProposalUrl=t+"/find/v2/regions/",this.findFilters=t+"/find/v1/filters",this.responseFormat=e.responseFormat||"application/offers.complete+json",this.maxHeight=e.maxHeight||500,this.maxWidth=e.maxWidth||500,this.jpegQuality=e.jpegQuality||.92,this.customSearchRequest=e.customSearchRequest,this.responseHook=e.responseHook,this.xOptions=e.xOptions}return e.prototype.prepareImage=function(e,t){return a(this,void 0,void 0,(function(){var r,n,a,i,l;return o(this,(function(o){switch(o.label){case 0:return r=t||{x1:0,x2:1,y1:0,y2:1},n=c.getElementSize(e),a=c.getRectAspectRatio(r,n),i=c.getThumbSizeArea(this.maxWidth,this.maxHeight,a),l=c.elementToCanvas(e,i,r),[4,c.canvasToJpgBlob(l,this.jpegQuality)];case 1:return[2,o.sent()]}}))}))},e.prototype.getSearchRequestHeaders=function(e){var t={"X-Api-Key":this.apiKey,"Accept-Language":"de,*;q=0.5",Accept:this.responseFormat,"Content-Type":e||"application/octet-stream"},r=[];return this.xOptions&&r.push(this.xOptions),r.length>0&&(t["X-Options"]=r.join(" ")),t},e.prototype.getRegionRequestHeaders=function(e){var t={"X-Api-Key":this.apiKey,"Content-Type":e||"application/octet-stream"},r=[];return this.xOptions&&r.push(this.xOptions),r.length>0&&(t["X-Options"]=r.join(" ")),t},e.prototype.getParams=function(e){return e.geoLocation?{lat:e.geoLocation.lat.toString(),lon:e.geoLocation.lon.toString(),dist:e.geoLocation.dist.toString()}:{}},e.prototype.parseCategoryPredictions=function(e){return Object.entries(e||{}).map((function(e){return{name:e[0],score:e[1]}})).sort((function(e,t){return t.score-e.score}))},e.prototype.parseSearchResult=function(e,t){var r=this.parseCategoryPredictions(e.data.predicted_category),a=e.data.barcodes||[],o=this.responseHook?this.responseHook(e.data):e.data;return{results:"offerInfos"in o?o.offerInfos.map((function(e,t){return n(n({},e),{position:t})})):o.results.map((function(e,t){return{position:t,sku:e.sku,title:e.title,img:e.images&&e.images[0]?{url:e.images[0]}:void 0,l:e.links?e.links.main:void 0,p:e.price?{vi:100*parseFloat(e.price),c:e.price.split(" ")[1]}:void 0,score:e.score}})),requestId:e.headers["x-matching-request"],duration:"durationSeconds"in e.data?e.data.durationSeconds:t,categoryPredictions:r,codes:a}},e.prototype.findByCad=function(e,t){return a(this,void 0,void 0,(function(){var r,n,a,i,l,u;return o(this,(function(o){switch(o.label){case 0:return r=e.type,n=this.getSearchRequestHeaders(r),a=this.getParams(t),[4,c.timePromise(this.httpClient.request({method:"POST",url:this.cadMatchingUrl,data:e,params:a,headers:n,responseType:"json"}))];case 1:return i=o.sent(),l=i.res,u=i.durationSeconds,[2,this.parseSearchResult(l,u)]}}))}))},e.prototype.findByImage=function(e,t,r){return a(this,void 0,void 0,(function(){var n,a,i,l,u,s,f,h,d;return o(this,(function(o){switch(o.label){case 0:return[4,this.prepareImage(e,t.cropRect)];case 1:if(n=o.sent(),this.customSearchRequest)return[2,this.customSearchRequest(n,this.httpClient)];if(a=this.getSearchRequestHeaders("image/jpeg"),i=this.getParams(t),(l=new FormData).append("image",n),r&&r.length>0)for(u=0;u<r.length;u++)for(l.append("filters["+u+"].filterType",r[u].key),s=0;s<r[u].values.length;s++)l.append("filters["+u+"].filterValues["+s+"]",r[u].values[s]);return[4,c.timePromise(this.httpClient.request({method:"POST",url:this.imageMatchingUrl,data:l,params:i,headers:a,responseType:"json"}))];case 2:return f=o.sent(),h=f.res,d=f.durationSeconds,[2,this.parseSearchResult(h,d)]}}))}))},e.prototype.findBySku=function(e,t){return a(this,void 0,void 0,(function(){var r,n,a;return o(this,(function(o){switch(o.label){case 0:return r=this.getSearchRequestHeaders(),n=""+this.imageMatchingUrlBySku+encodeURIComponent(e)+"/"+encodeURIComponent(t),[4,this.httpClient.get(n,{headers:r,responseType:"json"})];case 1:return a=o.sent(),this.responseHook&&(a=this.responseHook),[2,a]}}))}))},e.prototype.findRegions=function(e){return a(this,void 0,void 0,(function(){var t,r,n,a,i,l,u,s;return o(this,(function(o){switch(o.label){case 0:return t=c.getElementSize(e),r=t.w,n=t.h,a=c.getThumbSizeArea(this.maxWidth,this.maxHeight,r/n),i=c.elementToCanvas(e,a),[4,c.canvasToJpgBlob(i,this.jpegQuality)];case 1:return l=o.sent(),u=this.getRegionRequestHeaders("image/jpeg"),[4,this.httpClient.request({method:"POST",url:this.regionProposalUrl,data:l,headers:u})];case 2:return s=o.sent(),[2,s.data.regions.map((function(e){return{classId:e.classId,confidence:e.confidence,normalizedRect:{x1:e.region.left/a.w,x2:e.region.right/a.w,y1:e.region.top/a.h,y2:e.region.bottom/a.h}}}))]}}))}))},e.prototype.sendFeedback=function(e,t,r){return a(this,void 0,void 0,(function(){var a,i;return o(this,(function(o){switch(o.label){case 0:return a={"X-Api-Key":this.apiKey,"Content-Type":"application/json"},i=n({request_id:t,timestamp:new Date,session_id:e},r),[4,this.httpClient.request({method:"POST",url:this.feedbackUrl,headers:a,data:i})];case 1:return o.sent(),[2]}}))}))},e.prototype.getFilters=function(e){return a(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return t=this.getSearchRequestHeaders(),r=this.findFilters+"?limit="+e,[4,this.httpClient.get(r,{headers:t,responseType:"json"})];case 1:return[2,n.sent().data]}}))}))},e.prototype.searchFilters=function(e,t,r){return void 0===r&&(r=100),a(this,void 0,void 0,(function(){var n,a;return o(this,(function(o){switch(o.label){case 0:return n=this.getSearchRequestHeaders(),a=this.findFilters+"/"+e+"/"+t+"?limit="+r,[4,this.httpClient.get(a,{headers:n,responseType:"json"})];case 1:return[2,o.sent().data]}}))}))},e}();t.default=u},851:function(e,t,r){},865:function(e,t,r){"use strict";r.r(t);r(330),r(373);var n=r(0),a=r.n(n),o=r(37),i=r.n(o);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=r(206),l=r(902),u=(r(412),r(50)),s=r(93),f=r(43),h=r(5),d=r(24),p=r(8),m=r(905),v=r(261),g=r.n(v),y=r(907),b=r(36),w=r(134),x=r(459),E=r.n(x),O=r(460),j=r.n(O),C=r(461),k=r.n(C),L=r(462),S=r.n(L),N=r(463),R=r.n(N),I=r(464),_=r.n(I),M=r(465),T=r.n(M),F=r(466),P=r.n(F),H=r(467),A=r.n(H),G=r(468),B=r.n(G),z=r(469),D=r.n(z),V=r(470),q=r.n(V),U={x1:0,x2:1,y1:0,y2:1},W=[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"},{value:40,label:"40"},{value:50,label:"50"},{value:60,label:"60"},{value:70,label:"70"},{value:80,label:"80"},{value:90,label:"90"},{value:100,label:"100"}],Z=[{title:"SELECT THE RIGHT IMAGE AREA",description:"The main object should occupy the major part of the image. Use the cropping tool available to crop the image and remove excess background.",imageLeft:E.a,imageRight:j.a},{title:"PICTURE CLARITY",description:"The image should not be blurred or out of focus.",imageLeft:k.a,imageRight:S.a},{title:"OPTIMAL LIGHTING",description:"The images should be taken in a bright area or use your camera\u2019s flash to take a well-lit picture.",imageLeft:R.a,imageRight:_.a},{title:"MONOCHROME BACKGROUND",description:"The object should be placed on a plain and light background and patterned background should be avoided.",imageLeft:T.a,imageRight:P.a},{title:"VISIBILITY OF THE OBJECT",description:"Click an image encapsulating most of the object\u2019s key components.",imageLeft:A.a,imageRight:B.a},{title:"OCR CAPTURE",description:"It is recommended to take a clear picture of the text on the typeplate etc, to ensure that the model can detect the text and give accurate results.",imageLeft:D.a,imageRight:q.a}],Y={categoryPredictions:[],codes:[],configureFilter:{},errorMessage:"",fetchingRegions:!1,fetchingResults:!1,filterOptions:[],filters:[],imageThumbSearchInput:"",isShowModalDetailItemMobile:!1,keyFilter:"",loadingSearchAlgolia:!1,preFilterDropdown:!1,imageCaptureHelpModal:!1,regions:[],requestImage:void 0,results:[],resultSearchText:[],selectedRegion:void 0,textSearchInputMobile:"",valueTextSearch:{configure:{filters:""},page:1,refinementList:""}},K=Object(w.b)({name:"search",initialState:Y,reducers:{setSearchResults:function(e,t){var r=t.payload,n=r.results,a=r.requestId,o=r.categoryPredictions,i=r.codes,c=r.duration,l=r.filters;return Object(h.a)(Object(h.a)({},e),{},{filters:l,results:n,requestId:a,categoryPredictions:o,codes:i,duration:c,sessionId:e.sessionId||a,fetchingResults:!1})},setRegions:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{regions:t.payload})},setSelectedRegion:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{selectedRegion:t.payload})},setRequestImage:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{requestImage:{canvas:t.payload,id:Math.random().toString()},regions:[]})},selectionChanged:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{selectedRegion:r})},loadFileSelectRegion:function(e,t){var r=t.payload,n=r.results,a=r.requestId,o=r.categoryPredictions,i=r.codes,c=r.duration;return Object(h.a)(Object(h.a)({},e),{},{results:n,requestId:a,categoryPredictions:o,codes:i,duration:c,sessionId:e.sessionId||a,fetchingRegions:!1})},loadingActionResults:function(e){return Object(h.a)(Object(h.a)({},e),{},{fetchingResults:!0})},loadingActionRegions:function(e){return Object(h.a)(Object(h.a)({},e),{},{fetchingRegions:!0})},searchFileImageNonRegion:function(e,t){var r=t.payload,n=r.results,a=r.requestId,o=r.duration,i=r.categoryPredictions,c=r.codes;return Object(h.a)(Object(h.a)({},e),{},{results:n,requestId:a,duration:o,categoryPredictions:i,codes:c,fetchingResults:!1})},changeValueTextSearch:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{valueTextSearch:r})},resultSearchText:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{resultSearchText:r})},updateResults:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{results:r})},reset:function(e,t){return{results:[],regions:[],selectedRegion:U,requestImage:void 0,fetchingResults:!1,fetchingRegions:!1,filterOptions:[],categoryPredictions:[],codes:[],errorMessage:"",valueTextSearch:{},resultSearchText:[],filters:[],loadingSearchAlgolia:!1,imageThumbSearchInput:"",textSearchInputMobile:"",isShowModalDetailItemMobile:!1,keyFilter:e.keyFilter||"",preFilterDropdown:!1,imageCaptureHelpModal:!1}},onResetRequestImage:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{requestImage:void 0,imageThumbSearchInput:"",results:[],regions:[]})},configureFilter:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{configureFilter:r})},setUpdateSession:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{sessionId:r})},updateResultChangePosition:function(e,t){var r=t.payload.results;return Object(h.a)(Object(h.a)({},e),{},{fetchingResults:!1,results:r})},setError:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{fetchingRegions:!1,fetchingResults:!1,errorMessage:t.payload})},setImageSearchInput:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{imageThumbSearchInput:r})},updateStatusLoading:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{loadingSearchAlgolia:r})},updateValueTextSearchMobile:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{textSearchInputMobile:r})},onToggleModalItemDetail:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{isShowModalDetailItemMobile:r})},setUpdateKeyFilterDesktop:function(e,t){var r=t.payload;return Object(h.a)(Object(h.a)({},e),{},{keyFilter:r})},setPreFilterDropdown:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{preFilterDropdown:t.payload})},setImageCaptureHelpModal:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{imageCaptureHelpModal:t.payload})},setFilter:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{filter:t.payload})}}}),Q=K.actions,J=Q.changeValueTextSearch,X=(Q.configureFilter,Q.loadFileSelectRegion,Q.loadingActionRegions,Q.loadingActionResults),$=Q.onResetRequestImage,ee=Q.onToggleModalItemDetail,te=Q.reset,re=(Q.resultSearchText,Q.searchFileImageNonRegion,Q.selectionChanged),ne=(Q.setError,Q.setImageCaptureHelpModal),ae=Q.setImageSearchInput,oe=Q.setPreFilterDropdown,ie=Q.setRegions,ce=Q.setRequestImage,le=Q.setSearchResults,ue=Q.setSelectedRegion,se=Q.setUpdateKeyFilterDesktop,fe=Q.setUpdateSession,he=Q.updateResultChangePosition,de=(Q.updateResults,Q.updateStatusLoading),pe=Q.updateValueTextSearchMobile,me=(Q.setFilter,K.reducer),ve=r(94),ge=r(471),ye=r.n(ge),be=Object(w.b)({name:"auth",initialState:{accessToken:null,name:null,role:null},reducers:{login:function(e,t){},logout:function(e){e.accessToken=null,e.name=null,e.role=null,ye.a.remove("token")}}}),we=be.actions,xe=(we.login,we.logout,be.reducer);function Ee(e){var t=new RegExp("[?&]".concat(e,"(=([^&#]*))?(&|$|#)"),"i").exec(window.location.href);return t&&t[2]?(console.log("has value",e,t[2]),decodeURIComponent(t[2])):!!t||void 0}var Oe=Object(w.b)({name:"nyris",initialState:{showPart:"start",feedbackState:"hidden"},reducers:{showStart:function(e){return Object(h.a)(Object(h.a)({},e),{},{showPart:"start"})},showCamera:function(e){return Object(h.a)(Object(h.a)({},e),{},{showPart:"camera"})},showResults:function(e){return Object(h.a)(Object(h.a)({},e),{},{showPart:"results"})},showFeedback:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"question"})},hideFeedback:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"hidden"})},feedbackSubmitPositive:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"positive"})},feedbackNegative:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"negative"})}}}),je=Oe.actions,Ce=(je.showStart,je.showCamera,je.showResults),ke=je.showFeedback,Le=(je.hideFeedback,je.feedbackSubmitPositive,je.feedbackNegative,Oe.reducer),Se=Object(h.a)(Object(h.a)({},{xOptions:!1,apiKey:"UNSET",preview:!0,regions:!1,maxWidth:500,maxHeight:500,jpegQuality:.92,baseUrl:"https://api.nyris.io",instantRedirectPatterns:["^https?://(www.)?youtube.com/","^https?://(www.)?youtu.be/","^https?://(www.)?vimeo.com/","^https?://(www.)?dailymotion.com/","^https?://(www.)?dai.ly/"],theme:{},field:{ctaLinkField:"",productName:"",productDetails:"",manufacturerNumber:"",productTag:"",warehouseNumber:"",warehouseNumberValue:"",warehouseShelfNumber:"",warehouseShelfNumberValue:"",warehouseStock:"",warehouseStockValue:""}}),settings);Se=Object(h.a)(Object(h.a)({},Se),{},{apiKey:Ee("apiKey")||Se.apiKey,xOptions:Ee("xOptions")||Se.xOptions,regions:Ee("use.regions")||Se.regions,preview:Ee("use.preview")||Se.preview});var Ne,Re=Object(ve.b)({auth:xe,settings:function(){return Se},search:me,nyris:Le}),Ie=Object(w.a)({reducer:Re,devTools:!1}),_e=function(){return Object(c.b)()},Me=c.c,Te=(r(733),r(413),r(889)),Fe=["svgRef","title"];function Pe(){return(Pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function He(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var Ae=function(e){var t=e.svgRef,r=e.title,n=He(e,Fe);return a.a.createElement("svg",Pe({width:28,height:28,viewBox:"0 0 28 28",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,Ne||(Ne=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 24C28 24.5523 27.5523 25 27 25H1C0.447715 25 0 24.5523 0 24V7C0 6.44772 0.447715 6 1 6H7.46L9.17 3.45C9.35398 3.17061 9.66548 3.00173 10 3H18C18.3345 3.00173 18.646 3.17061 18.83 3.45L20.54 6H27C27.5523 6 28 6.44772 28 7V24ZM2 23H26V8H20C19.6655 7.99827 19.354 7.82939 19.17 7.55L17.46 5H10.54L8.83 7.55C8.64602 7.82939 8.33452 7.99827 8 8H2V23ZM14 21C10.6863 21 8 18.3137 8 15C8 11.6863 10.6863 9 14 9C17.3137 9 20 11.6863 20 15C20 18.3137 17.3137 21 14 21ZM14 11C11.7909 11 10 12.7909 10 15C10 17.2091 11.7909 19 14 19C16.2091 19 18 17.2091 18 15C18 12.7909 16.2091 11 14 11Z",fill:"currentColor"})))},Ge=a.a.forwardRef((function(e,t){return a.a.createElement(Ae,Pe({svgRef:t},e))})),Be=(r.p,r(909)),ze=r(888),De=r(76),Ve=r.n(De),qe=r(475),Ue=r.n(qe),We=r(472),Ze=r.n(We),Ye=r(172),Ke=r(473),Qe=r.n(Ke),Je=r(83),Xe=r.n(Je),$e=r(45);function et(){et=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var tt=function(){var e=Object(d.a)(et().mark((function e(t){var r;return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof HTMLCanvasElement)){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,Object(Je.urlOrBlobToCanvas)(t);case 6:e.t0=e.sent;case 7:return r=e.t0,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),rt=function(e){return 0===e.length?U:e.reduce((function(e,t){return e.confidence=e.confidence||0,t.confidence=t.confidence||0,e.confidence>=t.confidence?e:t})).normalizedRect},nt=function(){var e=Object(d.a)(et().mark((function e(t,r){var n,a,o;return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Xe.a(r),e.next=3,n.findRegions(t);case 3:return a=e.sent,o=rt(a),e.abrupt("return",{selectedRegion:Object($e.isEqual)(o,U)?U:o,regions:a});case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),at=function(e){var t=e.image,r=e.settings,n=e.region,a=e.filters,o={};return n&&(o={cropRect:n}),new Xe.a(r).findByImage(t,o,a)};function ot(){ot=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var it,ct=function(e){var t,r=e.isToggle,o=e.onToggleModal,i=Object(n.useRef)(null),c=Object(n.useState)("environment"),l=Object(p.a)(c,2),u=l[0],s=l[1],v=Object(n.useState)(1),g=Object(p.a)(v,2),y=g[0],b=g[1],w=Me((function(e){return e})),x=w.search,E=w.settings,O=Object(f.g)(),j=_e(),C=x.keyFilter,k=Object(n.useCallback)((function(){s((function(e){return"environment"===e?"user":"environment"}))}),[]),L=function(){var e=Object(d.a)(ot().mark((function e(t){var r,n,a,o,i;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(de(!0)),j(X()),"/result"!==O.location.pathname&&O.push("/result"),e.next=5,tt(t);case 5:if(n=e.sent,j(ce(n)),j(ae(t)),j(ee(!1)),S(),!E.regions){e.next=17;break}return e.next=13,nt(n,E);case 13:a=e.sent,j(ie(a.regions)),r=a.selectedRegion,j(ue(r));case 17:o=[{key:E.visualSearchFilterKey,values:["".concat(C)]}],i=[],at({image:n,settings:E,filters:C?o:void 0,region:r}).then((function(e){null===e||void 0===e||e.results.map((function(e){i.push({sku:e.sku,score:e.score})}));var t=Object(h.a)(Object(h.a)({},e),{},{filters:i});j(le(t)),j(de(!1))})).catch((function(e){console.log("error input search",e),j(de(!1))}));case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){s("environment"),b(1),o()},N=Object(Ye.a)({onDrop:function(){var e=Object(d.a)(ot().mark((function e(t){var r,n,a,o,i;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],j(de(!0)),j(ae(URL.createObjectURL(t[0]))),e.next=5,tt(t[0]);case 5:if(o=e.sent,j(ce(o)),!E.regions){e.next=14;break}return e.next=10,nt(o,E);case 10:i=e.sent,j(ie(i.regions)),a=i.selectedRegion,j(ue(a));case 14:return e.abrupt("return",at({image:o,settings:E,region:a}).then((function(e){null===e||void 0===e||e.results.map((function(e){n.push({sku:e.sku,score:e.score})})),r=Object(h.a)(Object(h.a)({},e),{},{filters:n}),j(le(r)),setTimeout((function(){j(de(!1)),S(),O.push("/result")}),500)})).catch((function(e){console.log("err camera_custom",e),j(de(!1)),S()})));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).getInputProps;return a.a.createElement(m.a,{className:"box-camera-custom"},a.a.createElement(Be.a,{anchor:"bottom",open:r,onClose:S,className:"modal-togggle-cam"},a.a.createElement(m.a,{className:"wrap-camera"},a.a.createElement("button",{className:"btn-close-modal right",style:{backgroundColor:"#666666"},onClick:S},a.a.createElement(Ve.a,{style:{fontSize:20,color:"#fff"}})),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",height:"100svh",width:"100%"}},a.a.createElement(Qe.a,{audio:!1,height:"100svh",width:"100%",imageSmoothing:!0,screenshotFormat:"image/jpeg",forceScreenshotSourceSize:!0,videoConstraints:Object(h.a)(Object(h.a)({},{width:1080,height:1080,aspectRatio:1.33333333333}),{},{facingMode:u}),ref:i,style:{height:"100%",width:"100%",objectFit:"cover",transform:"scale(".concat(y,")")},screenshotQuality:1},(function(e){var t=e.getScreenshot;return a.a.createElement("button",{onClick:function(){var e=t();L(e)},className:"btn-capture-camera"},a.a.createElement("svg",{width:"63",height:"63",viewBox:"0 0 63 63",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.a.createElement("circle",{cx:"31.5",cy:"31.5",r:"31.5",fill:"white"})))}))),a.a.createElement("button",{className:"btn-switch-camera",onClick:k},a.a.createElement("img",{src:Ze.a,alt:"",width:52,height:52})),a.a.createElement("div",{className:"box-scale-camera",style:{backgroundColor:null===(t=E.theme)||void 0===t?void 0:t.secondaryColor}},a.a.createElement("button",{className:"".concat(1===y&&"active"),style:{backgroundColor:1===y?"white":"",color:1===y?"black":"white"},onClick:function(){return b(1)}},"1"),a.a.createElement("button",{className:"".concat(1.5===y&&"active"),style:{backgroundColor:1.5===y?"white":"",color:1.5===y?"black":"white"},onClick:function(){return b(1.5)}},"1.5"),a.a.createElement("button",{className:"".concat(2===y&&"active"),style:{backgroundColor:2===y?"white":"",color:2===y?"black":"white"},onClick:function(){return b(2)}},"2")),a.a.createElement("div",{className:"wrap-box-input-mobile custom-library"},a.a.createElement("input",Object.assign({id:"icon-button-file",type:"file",style:{display:"none"}},N({accept:"image/png,image/jpeg",onClick:function(e){e.stopPropagation()}}))),a.a.createElement("label",{htmlFor:"icon-button-file"},a.a.createElement(ze.a,{color:"primary","aria-label":"upload picture",component:"span",style:{width:32,height:32,borderRadius:"100%",padding:7,backgroundColor:"#F3F3F5"}},a.a.createElement(Ue.a,{style:{fontSize:20,color:"red"}})))))))},lt=["svgRef","title"];function ut(){return(ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function st(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var ft,ht=function(e){var t=e.svgRef,r=e.title,n=st(e,lt);return a.a.createElement("svg",ut({width:24,height:22,viewBox:"0 0 22 21",style:{enableBackground:"new 0 0 22 20.28"},ref:t},n),r?a.a.createElement("title",null,r):null,it||(it=a.a.createElement("path",{className:"st3",d:"M 10.959 1.845 C 11.109 1.845 11.266 1.886 11.408 1.96 L 19.66 6.661 C 19.935 6.825 20.101 7.112 20.101 7.424 L 20.101 15.776 C 20.101 16.111 19.91 16.415 19.61 16.562 L 15.912 18.384 C 15.787 18.449 15.646 18.474 15.513 18.474 C 15.347 18.474 15.189 18.433 15.048 18.343 C 14.782 18.178 14.624 17.9 14.624 17.596 L 14.624 10.041 L 10.959 7.957 L 7.294 10.041 L 7.294 17.605 C 7.294 17.908 7.136 18.196 6.87 18.351 C 6.728 18.441 6.562 18.483 6.405 18.483 C 6.272 18.483 6.13 18.449 6.006 18.392 L 2.307 16.57 C 2.008 16.415 1.817 16.111 1.817 15.776 L 1.817 7.424 C 1.817 7.112 1.983 6.817 2.265 6.661 L 10.519 1.96 C 10.651 1.886 10.801 1.845 10.959 1.845 M 10.959 0.205 C 10.51 0.205 10.069 0.32 9.679 0.541 L 1.426 5.242 C 0.645 5.693 0.155 6.529 0.155 7.424 L 0.155 15.776 C 0.155 16.735 0.695 17.596 1.568 18.031 L 5.266 19.852 C 5.615 20.025 6.014 20.115 6.405 20.115 C 6.878 20.115 7.343 19.984 7.742 19.738 C 8.499 19.278 8.956 18.474 8.956 17.596 L 8.956 10.984 L 10.959 9.844 L 12.962 10.984 L 12.962 17.596 C 12.962 18.474 13.41 19.278 14.175 19.738 C 14.583 19.984 15.039 20.115 15.522 20.115 C 15.912 20.115 16.311 20.025 16.66 19.852 L 20.359 18.031 C 21.231 17.605 21.771 16.735 21.771 15.776 L 21.771 7.424 C 21.771 6.529 21.281 5.693 20.492 5.242 L 12.239 0.541 C 11.848 0.32 11.408 0.205 10.959 0.205 Z",fill:"currentColor",transform:"matrix(0.999999, 0.00121, -0.00121, 0.999999, 0.012302, -0.013258)"})))},dt=a.a.forwardRef((function(e,t){return a.a.createElement(ht,ut({svgRef:t},e))})),pt=(r.p,["svgRef","title"]);function mt(){return(mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function vt(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var gt=function(e){var t=e.svgRef,r=e.title,n=vt(e,pt);return a.a.createElement("svg",mt({width:12,height:12,viewBox:"0 0 12 12",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,ft||(ft=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.66658 10.9888C3.65328 11.6481 4.81331 12 6 12C7.5913 12 9.11742 11.3679 10.2426 10.2426C11.3679 9.11742 12 7.5913 12 6C12 4.81331 11.6481 3.65328 10.9888 2.66658C10.3295 1.67989 9.39246 0.910851 8.2961 0.456725C7.19975 0.0025997 5.99335 -0.11622 4.82946 0.115291C3.66557 0.346802 2.59648 0.918247 1.75736 1.75736C0.918247 2.59648 0.346802 3.66557 0.115291 4.82946C-0.11622 5.99335 0.0025997 7.19975 0.456725 8.2961C0.910851 9.39246 1.67989 10.3295 2.66658 10.9888ZM3.14278 1.72387C3.98852 1.15877 4.98284 0.857145 6 0.857145C7.36397 0.857145 8.67208 1.39898 9.63655 2.36345C10.601 3.32793 11.1429 4.63603 11.1429 6C11.1429 7.01716 10.8412 8.01148 10.2761 8.85722C9.71103 9.70296 8.90782 10.3621 7.96809 10.7514C7.02835 11.1406 5.9943 11.2425 4.99668 11.044C3.99906 10.8456 3.08269 10.3558 2.36345 9.63655C1.64421 8.91731 1.1544 8.00094 0.955964 7.00332C0.757526 6.00571 0.859372 4.97165 1.24862 4.03192C1.63787 3.09218 2.29705 2.28898 3.14278 1.72387ZM6 2.57143C5.87285 2.57143 5.74857 2.60913 5.64285 2.67977C5.53713 2.75041 5.45473 2.85081 5.40608 2.96827C5.35742 3.08574 5.34469 3.215 5.36949 3.3397C5.3943 3.4644 5.45553 3.57895 5.54543 3.66885C5.63534 3.75876 5.74988 3.81999 5.87458 3.84479C5.99929 3.8696 6.12854 3.85686 6.24601 3.80821C6.36348 3.75955 6.46388 3.67715 6.53452 3.57144C6.60515 3.46572 6.64286 3.34143 6.64286 3.21429C6.64286 3.04379 6.57513 2.88028 6.45457 2.75972C6.33401 2.63916 6.1705 2.57143 6 2.57143ZM6.42857 8.57143V5.14286H4.71428V6H5.57143V8.57143H4.28571V9.42857H7.71428V8.57143H6.42857Z",fill:"currentColor"})))},yt=a.a.forwardRef((function(e,t){return a.a.createElement(gt,mt({svgRef:t},e))}));r.p;var bt,wt=function(e){var t,r,o,i,c,l,s=Object(n.useState)(!1),h=Object(p.a)(s,2),d=h[0],v=h[1],g=Object(f.g)(),y=Me((function(e){return e})),b=y.settings,w=y.search.imageCaptureHelpModal,x=_e();return a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,{className:"box-footer-mobile",display:"flex",position:"relative",alignItems:"center",height:"100%",justifyContent:"space-between",style:{paddingLeft:"40px",paddingRight:"40px"}},a.a.createElement(u.c,{style:{width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"100%",backgroundColor:"/"!==g.location.pathname||w?"":"".concat(null===(t=b.theme)||void 0===t?void 0:t.primaryColor,"21")},activeClassName:"active",to:"/",className:"nav-link p-0 menu-children rounded-0",onClick:function(){x(ne(!1))}},a.a.createElement(dt,{color:"/"!==g.location.pathname||w?"#000":null===(r=b.theme)||void 0===r?void 0:r.primaryColor})),"/"!==(null===(o=g.location)||void 0===o?void 0:o.pathname)&&a.a.createElement(m.a,{className:"box-icon-camera-mobile"},a.a.createElement(Te.a,{onClick:function(){v(!d)}},a.a.createElement(Ge,{color:"#000"}))),"/"!==(null===(i=g.location)||void 0===i?void 0:i.pathname)&&a.a.createElement("div",{style:{width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"100%",backgroundColor:w?"".concat(null===(c=b.theme)||void 0===c?void 0:c.primaryColor,"21"):""},onClick:function(){x(ne(!w))}},a.a.createElement(yt,{fontSize:24,width:24,height:24,color:w?null===(l=b.theme)||void 0===l?void 0:l.primaryColor:"#000"}))),a.a.createElement(m.a,{className:"box-screenshot-camera"},a.a.createElement(ct,{isToggle:d,onToggleModal:function(){v(!d)}})))},xt=["svgRef","title"];function Et(){return(Et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ot(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var jt,Ct=function(e){var t=e.svgRef,r=e.title,n=Ot(e,xt);return a.a.createElement("svg",Et({width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,bt||(bt=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 4H12.95C12.7 2.85 11.7 2 10.5 2C9.3 2 8.3 2.85 8.05 4H1V5H8.05C8.3 6.15 9.3 7 10.5 7C11.7 7 12.7 6.15 12.95 5H15V4ZM10.5 6C9.65 6 9 5.35 9 4.5C9 3.65 9.65 3 10.5 3C11.35 3 12 3.65 12 4.5C12 5.35 11.35 6 10.5 6ZM1 12H3.05C3.3 13.15 4.3 14 5.5 14C6.7 14 7.7 13.15 7.95 12H15V11H7.95C7.7 9.85 6.7 9 5.5 9C4.3 9 3.3 9.85 3.05 11H1V12ZM5.5 10C6.35 10 7 10.65 7 11.5C7 12.35 6.35 13 5.5 13C4.65 13 4 12.35 4 11.5C4 10.65 4.65 10 5.5 10Z",fill:"currentColor"})))},kt=a.a.forwardRef((function(e,t){return a.a.createElement(Ct,Et({svgRef:t},e))})),Lt=(r.p,r(890)),St=r(891),Nt=["svgRef","title"];function Rt(){return(Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function It(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var _t,Mt=function(e){var t=e.svgRef,r=e.title,n=It(e,Nt);return a.a.createElement("svg",Rt({width:24,height:24,viewBox:"0 0 24 24",fill:"none",ref:t},n),r?a.a.createElement("title",null,r):null,jt||(jt=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.3723 22.117C23.719 22.4637 23.719 23.0257 23.3723 23.3723C23.0257 23.719 22.4637 23.719 22.117 23.3723L16.8475 18.1028C16.3904 17.6457 15.6641 17.6208 15.123 17.9745C11.1608 20.5639 5.82363 19.9525 2.55769 16.3754C-0.967972 12.5138 -0.832726 6.56215 2.86471 2.86471C6.56215 -0.832726 12.5138 -0.967972 16.3754 2.55769C19.9525 5.82363 20.5639 11.1608 17.9745 15.123C17.6208 15.6641 17.6457 16.3904 18.1028 16.8475L23.3723 22.117ZM9.79677 1.80687C5.38428 1.80687 1.80725 5.3839 1.80725 9.79639C1.81214 14.2069 5.38631 17.781 9.79677 17.7859C14.2093 17.7859 17.7863 14.2089 17.7863 9.79639C17.7863 5.3839 14.2093 1.80687 9.79677 1.80687Z",fill:"#000"})))},Tt=a.a.forwardRef((function(e,t){return a.a.createElement(Mt,Rt({svgRef:t},e))})),Ft=(r.p,["svgRef","title"]);function Pt(){return(Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ht(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var At=function(e){var t=e.svgRef,r=e.title,n=Ht(e,Ft);return a.a.createElement("svg",Pt({width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,_t||(_t=a.a.createElement("path",{d:"M9.33333 16H6.66667C6.31305 16 5.97391 15.8595 5.72386 15.6095C5.47381 15.3594 5.33333 15.0203 5.33333 14.6667V9.60667L0.393333 4.66667C0.142942 4.41777 0.00148853 4.07972 0 3.72667V1.33333C0 0.979711 0.140476 0.640573 0.390524 0.390524C0.640573 0.140476 0.979711 0 1.33333 0H14.6667C15.0203 0 15.3594 0.140476 15.6095 0.390524C15.8595 0.640573 16 0.979711 16 1.33333V3.72667C15.9985 4.07972 15.8571 4.41777 15.6067 4.66667L10.6667 9.60667V14.6667C10.6667 15.0203 10.5262 15.3594 10.2761 15.6095C10.0261 15.8595 9.68696 16 9.33333 16ZM1.33333 1.33333V3.72667L6.66667 9.06V14.6667H9.33333V9.06L14.6667 3.72667V1.33333H1.33333Z",fill:"currentColor"})))},Gt=a.a.forwardRef((function(e,t){return a.a.createElement(At,Pt({svgRef:t},e))})),Bt=(r.p,function(){var e=Object(f.h)().search;return Object(n.useMemo)((function(){return new URLSearchParams(e)}),[e])});var zt=Object(Lt.a)(Object(n.memo)(Object(St.a)((function(e){var t,r,o,i,c,l,s,d,v,g,y,b,w,x=e.onToggleFilterMobile,E=e.refine,O=_e(),j=Me((function(e){return e})).search,C=j.imageThumbSearchInput,k=j.textSearchInputMobile,L=j.keyFilter,S=j.preFilterDropdown,N=j.valueTextSearch,R=Bt(),I=Object(n.useRef)(null),_=Object(n.useState)(!1),M=Object(p.a)(_,2),T=M[0],F=M[1],P=Object(f.g)(),H=Me((function(e){return e})).settings;Object(n.useEffect)((function(){var e;"/result"===(null===(e=P.location)||void 0===e?void 0:e.pathname)&&(C||k)?F(!0):F(!1)}),[C,P.location,k]),Object(n.useEffect)((function(){""!==C&&(P.push("/result"),O(pe("")),E(""))}),[C,O,E,P]),Object(n.useEffect)((function(){var e=R.get("query")||"";Object($e.isEmpty)(e)||(O(pe(e)),E(e),setTimeout((function(){E(e)}),100))}),[R,E,O]);var A=Object(n.useCallback)(Object($e.debounce)((function(e){e?P.push({pathname:"/result",search:"?query=".concat(e)}):P.push("/result")}),500),[]),G=Object(n.useMemo)((function(){var e=!1;return!!(null===N||void 0===N?void 0:N.refinementList)&&(Object.keys(null===N||void 0===N?void 0:N.refinementList).forEach((function(t){"object"!==typeof N.refinementList[t]||(e=!0)})),e)}),[null===N||void 0===N?void 0:N.refinementList]),B=Object(n.useMemo)((function(){var t;return!(H.postFilterOption&&(null===(t=e.allSearchResults)||void 0===t?void 0:t.hits.length)>0)}),[H.postFilterOption,null===(t=e.allSearchResults)||void 0===t?void 0:t.hits]);return a.a.createElement("div",{style:{width:"100%",background:"#fafafa"}},"/result"!==(null===(r=P.location)||void 0===r?void 0:r.pathname)&&a.a.createElement(m.a,{className:"box-content",style:{display:"flex",alignItems:"center",height:"48px",borderBottom:"1px solid #e9e9ec",background:null===(o=H.theme)||void 0===o?void 0:o.headerColor}},a.a.createElement(u.c,{to:"/",style:{lineHeight:0,paddingLeft:"10px"},onClick:function(){O(te(""))}},a.a.createElement("img",{src:null===(i=H.theme)||void 0===i?void 0:i.appBarLogoUrl,alt:"logo",style:{aspectRatio:1,width:null===(c=H.theme)||void 0===c?void 0:c.logoWidth,height:null===(l=H.theme)||void 0===l?void 0:l.logoHeight}}))),a.a.createElement("div",{style:{margin:"16px 8px 0px 8px",display:"flex",columnGap:"8px",alignItems:"center"}},a.a.createElement("div",{className:"wrap-header-mobile",style:{height:"56px"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",height:"100%"}},a.a.createElement("div",{ref:I,id:"box-input-search",className:"d-flex w-100",style:{alignItems:"center",height:"100%"}},a.a.createElement(m.a,{className:"pre-filter-icon",onClick:function(){H.preFilterOption&&(x(!1),O(oe(!S)))},style:{cursor:H.preFilterOption?"pointer":""}},H.preFilterOption&&a.a.createElement("div",{className:"icon-hover",style:Object(h.a)({},L?{backgroundColor:"".concat(null===(s=H.theme)||void 0===s?void 0:s.primaryColor)}:{backgroundColor:"".concat(null===(d=H.theme)||void 0===d?void 0:d.secondaryColor)})},a.a.createElement(kt,{color:"white"})),!H.preFilterOption&&a.a.createElement(Tt,{width:16,height:16}),L&&a.a.createElement("div",{style:{position:"absolute",top:"10px",left:"31px",display:"flex",justifyContent:"center",alignItems:"center",background:"white",width:"10px",height:"10px",borderRadius:"100%"}},a.a.createElement("div",{style:{width:"8px",height:"8px",background:null===(v=H.theme)||void 0===v?void 0:v.primaryColor,borderRadius:"100%"}}))),a.a.createElement(Dt,{value:k,onChange:function(e){A(e.currentTarget.value),""===e.currentTarget.value?(O(pe("")),E("")):O(pe(e.currentTarget.value))}}),"/"!==(null===(g=P.location)||void 0===g?void 0:g.pathname)&&k&&a.a.createElement(Te.a,{onClick:function(){if(C)return P.push("/result"),O(pe("")),void E("");O(pe("")),O(te("")),E(""),P.push("/")},style:{marginRight:"8px",border:0,width:"40px",height:"40px"}},a.a.createElement(Ve.a,{style:{fontSize:16,color:null===(y=H.theme)||void 0===y?void 0:y.secondaryColor}}))))),T&&H.postFilterOption&&a.a.createElement("div",{style:{position:"relative",width:"56px",height:"56px",padding:" 8px",flexShrink:0,borderRadius:"32px",background:"#FAFAFA",boxShadow:" 0px 0px 8px 0px rgba(0, 0, 0, 0.15)"},onClick:function(){B||(x(),O(oe(!1)))}},a.a.createElement("div",{style:{display:"flex",background:"".concat(B?"#F3F3F5":null===(b=H.theme)||void 0===b?void 0:b.primaryColor),borderRadius:"40px",width:"40px",height:"40px",justifyContent:"center",alignItems:"center"}},a.a.createElement(Gt,{color:"".concat(B?"#E0E0E0":"white")})),G&&!B&&a.a.createElement("div",{style:{position:"absolute",top:"8px",left:"37px",display:"flex",justifyContent:"center",alignItems:"center",background:"white",width:"10px",height:"10px",borderRadius:"100%"}},a.a.createElement("div",{style:{width:"8px",height:"8px",background:null===(w=H.theme)||void 0===w?void 0:w.primaryColor,borderRadius:"100%"}})))))})))),Dt=function(e){var t=e.value,r=e.onChange;return Object(n.useEffect)((function(){var e=document.getElementById("mobile-input-search"),t=function(t){"Enter"===t.key&&(null===e||void 0===e||e.blur())};return null===e||void 0===e||e.addEventListener("keyup",t,!1),function(){null===e||void 0===e||e.removeEventListener("scroll",t,!1)}}),[]),a.a.createElement("input",{style:{border:"0px",width:"100%",display:"flex",flexGrow:1,fontSize:14,paddingLeft:"12px",paddingRight:"4px",color:"#2B2C46",outline:"none",borderRadius:"32px"},className:"input-search",placeholder:"Search",value:t,onChange:r,id:"mobile-input-search"})};var Vt=function(){var e,t,r,n=_e(),o=Me((function(e){return e})).settings;return a.a.createElement(m.a,{className:"box-content",display:"flex"},a.a.createElement(u.c,{to:"/",style:{lineHeight:0,paddingLeft:"10px"},onClick:function(){n(te(""))}},a.a.createElement("img",{src:null===(e=o.theme)||void 0===e?void 0:e.appBarLogoUrl,alt:"logo",style:{aspectRatio:1,width:null===(t=o.theme)||void 0===t?void 0:t.logoWidth,height:null===(r=o.theme)||void 0===r?void 0:r.logoHeight}})))},qt=r(112),Ut=r(892),Wt=r(912),Zt=r(476),Yt=r.n(Zt);function Kt(){Kt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var Qt=function(){var e=Object(d.a)(Kt().mark((function e(){var t,r,n,a=arguments;return Kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:10,r=a.length>1?a[1]:void 0,n=new Xe.a(r),e.abrupt("return",n.getFilters(t));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Jt=function(){var e=Object(d.a)(Kt().mark((function e(){var t,r,n,a,o,i=arguments;return Kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:"",r=i.length>1?i[1]:void 0,n=i.length>2?i[2]:void 0,a=new Xe.a(n),o=r||"",e.abrupt("return",a.searchFilters(t,o));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xt=r(916),$t=r(893),er=r(894);function tr(e,t){return(null===e||void 0===e?void 0:e.length)>t?(null===e||void 0===e?void 0:e.slice(0,t))+"...":e}function rr(){rr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var nr=function(e){var t,r,o=e.handleClose,i=_e(),c=Me((function(e){return e})),l=c.settings,u=c.search.keyFilter,s=Object(n.useState)([]),f=Object(p.a)(s,2),h=f[0],v=f[1],g=Object(n.useState)(u||""),y=Object(p.a)(g,2),w=y[0],x=y[1],E=Object(n.useState)(!1),O=Object(p.a)(E,2),j=O[0],C=O[1],k=Object(n.useState)(0),L=Object(p.a)(k,2),S=L[0],N=L[1],R=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),I=function(){var e=Object(d.a)(rr().mark((function e(){var t;return rr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),t=Qt(1e3,l).then((function(e){var t,r=((null===(t=e.find((function(e){return e.key===l.visualSearchFilterKey})))||void 0===t?void 0:t.values)||[]).sort().reduce((function(e,t){var r=t[0].toLocaleUpperCase();return e[r]?e[r].push(t):e[r]=[t],e}),{});v(r),N(Object.keys(r).length)})).catch((function(e){console.log("err getDataFilterDesktop",e)})).finally((function(){C(!1)})),e.abrupt("return",t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(n.useEffect)((function(){I()}),[]);var _=function(e,t){x(t)},M=function(){var e=Object(d.a)(rr().mark((function e(t){var r;return rr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return I(),e.abrupt("return");case 3:return e.next=5,Jt(l.visualSearchFilterKey,encodeURIComponent(t),l).then((function(e){e.length>0?(v(Object(qt.a)({},e[0][0].toLocaleUpperCase(),e)),e.length<=20?N(1):e.length<=40?N(2):N(4)):(v({}),N(4))})).catch((function(e){console.log("err filterSearchHandler",e)}));case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){i(se(w)),o()};return a.a.createElement(m.a,{className:"box-child-component-filter-desktop",display:"flex",flexDirection:"column",style:{position:"relative"}},a.a.createElement("div",{style:{background:"white",width:"100%",display:"flex",justifyContent:"space-between",position:"sticky",top:0,zIndex:100}},a.a.createElement(Ut.a,{style:{color:"#000",fontSize:"24px",fontWeight:700,paddingLeft:R?"0px":"14px",marginBottom:R?"0px":"-8px",marginTop:R?"0px":"24px"}},l.preFilterTitle),a.a.createElement(Te.a,{onClick:o},a.a.createElement(Ve.a,null))),a.a.createElement(m.a,{className:"box-top",style:R?{padding:0,marginTop:"16px"}:void 0,display:"flex",justifyContent:"space-between",alignItems:"center"},a.a.createElement(m.a,{className:"box-input-search-filter",display:"flex",justifyItems:"center",style:R?{width:"100%"}:void 0},(!w||R)&&a.a.createElement(m.a,{className:"icon-search",style:{marginRight:11},display:"flex",justifyContent:"center",alignItems:"center"},a.a.createElement("img",{style:{maxWidth:"fit-content"},src:Yt.a,alt:"",width:18,height:18})),w&&!R&&a.a.createElement(m.a,{display:"flex",className:"box-keyFilter"},a.a.createElement(Ut.a,{className:"keyFilter max-line-1"},w),a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return x("")}},a.a.createElement(Ve.a,{style:{fontSize:12,color:"#2B2C46"}}))),a.a.createElement("input",{className:"input-search-filter",placeholder:"Search",onChange:function(e){M(e.target.value)}}))),w&&R&&a.a.createElement(m.a,{style:{margin:"10px 16px"}},a.a.createElement(m.a,{display:"flex",className:"box-keyFilter",style:{display:"inline-flex"}},a.a.createElement(Ut.a,{className:"keyFilter"},w),a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return x("")}},a.a.createElement(Ve.a,{style:{fontSize:12,color:"#2B2C46"}})))),a.a.createElement(m.a,{className:"box-bottom",height:"100%",style:R?{columnCount:1,marginBottom:w?"50px":"0px"}:S<=4?{columnCount:S,height:"100%",paddingBottom:20}:{columnCount:4,paddingBottom:20}},Object.entries(h).map((function(e,t){var r=Object(p.a)(e,2),n=r[0],o=r[1];return a.a.createElement(m.a,{className:"box-group-items",style:S<=4?{width:"fit-content"}:{width:"100%"}},a.a.createElement(Ut.a,{style:{fontWeight:"bold",color:"#000",paddingLeft:11}},n),a.a.createElement(Xt.a,{value:w,exclusive:!0,onChange:_,"aria-label":"",className:"box-btn-group"},o.map((function(e,t){return a.a.createElement(Wt.a,{key:e,title:e,placement:"top",arrow:!0,disableHoverListener:e.length<20},a.a.createElement($t.a,{value:e,"aria-label":e,className:"item-btn",onChange:function(){x(e)}},tr(e,R?35:20)))}))))})),j&&a.a.createElement(m.a,{style:{columnCount:R?1:4}},Array(12).fill("").map((function(e,t){return a.a.createElement(m.a,{key:t,mb:5},a.a.createElement(er.a,{animation:"pulse",height:30,width:60}),Array(6).fill("").map((function(e,t){return a.a.createElement(er.a,{animation:"pulse",height:30})})))}))),Object($e.isEmpty)(h)&&!j&&a.a.createElement(Ut.a,null,"No result found")),!R&&a.a.createElement(m.a,{className:"footer",style:{height:64,marginTop:"auto"},display:"flex"},a.a.createElement(Te.a,{className:"button-left",style:{width:"50%",backgroundColor:"#000000",color:"#fff",borderRadius:0,justifyContent:"flex-start"},onClick:function(){return o()}},"Cancel"),a.a.createElement(Te.a,{className:"button-right",style:{width:"50%",backgroundColor:null===(t=l.theme)||void 0===t?void 0:t.primaryColor,color:"#fff",borderRadius:0,justifyContent:"flex-start"},onClick:function(){return T()}},"Apply")),R&&a.a.createElement(m.a,{className:"footer",style:{height:64,marginTop:"auto",position:"fixed",bottom:"0px",left:"0px",width:"100vw"},display:"flex"},a.a.createElement(Te.a,{className:"button-left",style:{width:"50%",backgroundColor:"#000000",color:"#fff",borderRadius:0,justifyContent:"flex-start"},onClick:function(){return o()}},"Cancel"),a.a.createElement(Te.a,{className:"button-right",style:{width:"50%",backgroundColor:null===(r=l.theme)||void 0===r?void 0:r.primaryColor,color:"#fff",borderRadius:0,justifyContent:"flex-start"},onClick:function(){return T()}},"Apply")))},ar=r(478);function or(){or=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var ir=r.n(ar).a.create(),cr=function(){var e=Object(d.a)(or().mark((function e(t){var r,n,a,o;return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.apiKey,n=t.baseUrl,a={"X-Api-Key":r},e.next=4,ir.request({method:"POST",url:"".concat(n,"/find/v1/session"),headers:a});case 4:return o=e.sent,e.abrupt("return",o.data.session);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var lr=function(e){var t=e.handleClose;return a.a.createElement(m.a,{style:{paddingLeft:"24px",paddingRight:"24px"}},a.a.createElement(m.a,{display:"flex",justifyContent:"end",position:"sticky",top:0,style:{background:"white",width:"100%"}},a.a.createElement(Te.a,{onClick:t},a.a.createElement(Ve.a,null))),a.a.createElement("p",{style:{fontSize:"40px",lineHeight:"40px",fontWeight:700,color:"#2B2C46"}},"Six ways to optimize visual search"),a.a.createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"16px",marginTop:"16px"}},Z.map((function(e,t){return a.a.createElement("div",{key:t,style:{display:"flex",flexDirection:"column",rowGap:"8px"}},a.a.createElement("p",{style:{fontSize:"16px",lineHeight:"24px",fontWeight:700,color:"#2B2C46",marginBottom:"0px"}},"".concat(t+1,"- ").concat(e.title)),a.a.createElement("p",{style:{fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"#2B2C46",marginBottom:"0px"}},e.description),a.a.createElement("div",{style:{display:"flex",columnGap:"16px"}},a.a.createElement("div",null,a.a.createElement("img",{src:e.imageLeft,alt:""})),a.a.createElement("div",null,a.a.createElement("img",{src:e.imageRight,alt:""}))))}))))},ur=r(78),sr=["children","enabled"];function fr(e){var t=e.children,r=e.enabled,o=void 0===r||r,i=Object(s.a)(e,sr),c=Object(n.useState)(),l=Object(p.a)(c,2),u=l[0],f=l[1];return Object(n.useEffect)((function(){f(o)}),[o]),u?a.a.createElement("div",i,t):a.a.createElement(a.a.Fragment,null)}var hr=r(250),dr=r.n(hr),pr=r(251),mr=r.n(pr);function vr(e){var t=e.icon,r=e.label,o=(e.labelPosition,e.className,e.classNameLabel),i=void 0===o?"":o,c=Object(n.useState)(""),l=Object(p.a)(c,2),u=l[0],s=l[1];return Object(n.useEffect)((function(){s(t)}),[t]),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},r&&a.a.createElement("div",{className:i},a.a.createElement(Ut.a,{style:{textTransform:"none",fontSize:12,color:"#55566B",fontWeight:600}},r)),"remove"===u?a.a.createElement(dr.a,{style:{color:"#55566B"}}):a.a.createElement(mr.a,{style:{color:"#55566B"}}))}var gr=r(113),yr=r(906),br=r(49),wr=r.n(br),xr=r(914),Er=r(903),Or={collapsed:function(e){return{height:e?"auto":0,opacity:0,pointerEvents:"none",transitionEnd:{display:"none"}}},expanded:function(e){return{height:"auto",opacity:1,pointerEvents:"auto",display:"block"}}},jr={ease:[.16,1,.3,1],duration:.6};function Cr(e){var t=e.isCollapsed,r=e.className,n=e.children,o=Object(xr.a)();return a.a.createElement(a.a.Fragment,null,a.a.createElement(Er.a.div,{key:"collapse",initial:"collapsed",animate:t?"collapsed":"expanded",variants:Or,className:wr()("overflow-hidden",r),transition:jr,custom:o},n))}var kr=r(179),Lr=r(895),Sr=r(104),Nr=r.n(Sr),Rr=Object(gr.atom)({searchResults:void 0,isSearchStalled:void 0}),Ir=Object(kr.selectAtom)(Rr,(function(e){return e.searchResults}),Nr.a);Object(kr.selectAtom)(Rr,(function(e){return e.isSearchStalled}));Object(St.a)(Object(n.memo)((function(e){var t=e.searchResults,r=e.isSearchStalled,a=Object(kr.useUpdateAtom)(Rr);return Object(n.useEffect)((function(){a({searchResults:t,isSearchStalled:r})}),[a,t,r]),null}),Nr.a));var _r=Object(Lr.a)(Object(n.memo)((function(e){var t=e.children,r=e.className,o=e.header,i=e.attributes,c=void 0===i?[]:i,l=e.isOpened,u=void 0!==l&&l,s=(e.items,e.onToggle),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object(n.useMemo)((function(){var t=(null===e||void 0===e?void 0:e.disjunctiveFacets)||[],r=(null===e||void 0===e?void 0:e.hierarchicalFacets)||[];return[].concat(Object(ur.a)(t),Object(ur.a)(r))}),[e]),a=Object(n.useMemo)((function(){var e=!t.length;return r.forEach((function(r){null===t||void 0===t||t.forEach((function(t){r.name===t&&r.data&&(e=!0)}))})),e}),[r,t]);return a}(Object(kr.useAtomValue)(Ir),c),h=Object(b.useMediaQuery)({query:"(max-width: 776px)"});return a.a.createElement(m.a,null,a.a.createElement("div",{className:wr()("border-neutral-light",{hidden:!f},r)},a.a.createElement(Te.a,{className:"w-full flex items-center justify-between group","aria-expanded":u,style:{paddingLeft:0},onClick:function(e){"function"===typeof s&&s(e)}},a.a.createElement("div",{className:"flex items-center w-full subhead"},a.a.createElement(Ut.a,{className:"fw-700",style:{textTransform:"none",fontFamily:"Montserrat !important",fontSize:14}},o||c[0])),!h&&a.a.createElement("div",{className:"text-neutral-dark can-hover:transition-colors can-hover:group-hover:text-neutral-light"},u?a.a.createElement(dr.a,null):a.a.createElement(mr.a,null))),a.a.createElement(Cr,{isCollapsed:!u},a.a.createElement("div",{className:"mt-4"},t))))})));function Mr(e){var t;return(null===e||void 0===e?void 0:e.attributes)?null===(t=e.options)||void 0===t?void 0:t.attributes.join(":"):null===e||void 0===e?void 0:e.attribute}function Tr(e){var t=e.widgets,r=[];return(null===t||void 0===t?void 0:t.length)?t.forEach((function(e){return r.push(Mr(e))})):r.push(Mr(e)),r.join(":")}function Fr(e){return null===e||void 0===e?void 0:e.attribute}var Pr=["children","onToggle","panelId"];var Hr=Object(gr.atom)((function(e){return Boolean(Object.values(e(Ar)).find((function(e){return!0===e})))}),(function(e,t,r){var n,a,o=r(e(Hr));t(Ar,(n=e(Ar),a=o,Object.keys(n).reduce((function(e,t){return Object(h.a)(Object(h.a)({},e),{},Object(qt.a)({},t,a))}),{})))})),Ar=Object(gr.atom)({});function Gr(e){var t=e.children,r=e.onToggle,o=e.panelId,i=Object(s.a)(e,Pr),c=Object(n.useCallback)((function(){return r(o)}),[r,o]);return a.a.createElement(_r,Object.assign({onToggle:c},i),t)}function Br(e){var t,r=e.dynamicWidgets,o=void 0===r||r,i=e.onApply,c=(e.disjunctiveFacets,Me((function(e){return e})).settings),l=c.refinements,u=Object(gr.useAtom)(Ar),s=Object(p.a)(u,2),d=s[0],v=s[1],g=Object(gr.useAtom)(Hr),y=Object(p.a)(g,2),w=y[0],x=y[1],E=Object(f.g)(),O=Object(b.useMediaQuery)({query:"(max-width: 776px)"});Object(n.useEffect)((function(){v((function(e){return Object(h.a)(Object(h.a)({},e),l.reduce((function(e,t){return Object(h.a)(Object(h.a)({},e),{},Object(qt.a)({},Tr(t),Boolean(t.isExpanded)))}),{}))}))}),[]);var j=Object(n.useCallback)((function(e){v((function(t){return Object(h.a)(Object(h.a)({},t),{},Object(qt.a)({},e,!t[e]))}))}),[v]),C=Object(n.useMemo)((function(){return l.map((function(e){return a.a.createElement(yr.a,Object.assign({className:"box-refinement-list",attribute:e.attribute},e.options,{translations:{noResults:"No results",placeholder:""},sortBy:["isRefined:desc","name:asc"]}))}))}),[l]),k=Object(n.useMemo)((function(){return C.map((function(e,t){var r=l[t],n=Tr(r),o=function(e){var t,r=null===(t=e)||void 0===t?void 0:t.widgets,n=[];return(null===r||void 0===r?void 0:r.length)?r.forEach((function(e){return n.push(Fr(e))})):n.push(Fr(e)),n}(r);return e?a.a.createElement(Gr,{key:n,panelId:n,attributes:o,header:r.header,isOpened:O?!d[n]:d[n],onToggle:j},e):a.a.createElement(a.a.Fragment,null)}))}),[C,l,j,d,O]),L=Object(n.useCallback)((function(){x((function(e){return!e}))}),[x]);return a.a.createElement(a.a.Fragment,null,!O&&a.a.createElement("div",{className:"wrap-main-header-panel"},a.a.createElement(m.a,{style:{borderBottom:"1px solid #E0E0E0"}},a.a.createElement(Te.a,{className:"text-neutral-darkest",onClick:L,style:{justifyContent:"flex-end"}},a.a.createElement(vr,{icon:w?"remove":"add",label:"".concat(w?"Collapse":"Expand"," all")})))),a.a.createElement(m.a,null,O&&a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",position:"sticky",top:"0px",zIndex:100,background:"white",alignItems:"center",paddingTop:"10px",paddingRight:"10px"}},a.a.createElement(Te.a,{onClick:i},a.a.createElement(Ve.a,null))),a.a.createElement(m.a,{className:"box-center-filter",style:Object(h.a)({},O?{paddingLeft:"24px",paddingRight:"24px",overflow:"auto"}:{})},a.a.createElement(fr,{enabled:o},k))),O&&a.a.createElement(m.a,{style:{position:"sticky",bottom:0,width:"100%"}},a.a.createElement(Te.a,{className:"text-white",style:{width:"100%",backgroundColor:null===(t=c.theme)||void 0===t?void 0:t.primaryColor,fontWeight:700,fontSize:14,borderRadius:0},onClick:function(){i(),"/result"!==E.location.pathname&&E.push("/result")}},"APPLY")))}var zr=Object(St.a)(Object(n.memo)((function(e){var t;return a.a.createElement(Br,{disjunctiveFacets:null===e||void 0===e||null===(t=e.allSearchResults)||void 0===t?void 0:t.disjunctiveFacets,onApply:e.onApply})})));function Dr(){Dr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var Vr=Object(n.memo)((function(e){var t,r,o,i,c,l=e.children,u=_e(),s=Me((function(e){return e})),v=s.settings,w=s.search,x=w.valueTextSearch,E=w.loadingSearchAlgolia,O=w.preFilterDropdown,j=w.imageCaptureHelpModal,C=v.algolia,k=C.apiKey,L=C.appId,S=C.indexName,N=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),R=Object(n.useState)(!1),I=Object(p.a)(R,2),_=I[0],M=I[1],T=Object(f.g)(),F=N&&"/result"===(null===(t=T.location)||void 0===t?void 0:t.pathname)||"/"===(null===(r=T.location)||void 0===r?void 0:r.pathname);Object(n.useEffect)((function(){(function(){var e=Object(d.a)(Dr().mark((function e(){var t;return Dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cr(v);case 2:t=e.sent,u(fe(t));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()().catch(console.log)}),[]),Object(n.useEffect)((function(){var e;"/"===(null===(e=T.location)||void 0===e?void 0:e.pathname)&&(document.title=v.appTitle||"",u($("")))}),[T.location]);var P="newVersion";N?(P="mobile",c=wt,i=zt):i=Vt;var H=Object(n.useMemo)((function(){var e=g()(L,k);return e.initIndex(S),Object(h.a)(Object(h.a)({},e),{},{search:function(t){return t.every((function(e){var t,r,n;return!(null===(t=e.params)||void 0===t?void 0:t.query)&&(!(null===(r=e.params)||void 0===r?void 0:r.filters)||(null===(n=e.params)||void 0===n?void 0:n.filters.endsWith("<score=1>")))}))?Promise.resolve({results:t.map((function(){return{hits:[],nbHits:0,nbPages:0,processingTimeMS:0}}))}):e.search(t)}})}),[k,L,S]);return a.a.createElement(m.a,{position:"relative",className:"wrap-mobile"},E&&a.a.createElement(m.a,{className:"box-wrap-loading",style:{zIndex:99999999}},a.a.createElement(m.a,{className:"loadingSpinCT",style:{top:0,bottom:0}},a.a.createElement(m.a,{className:"box-content-spin"}))),a.a.createElement(y.a,{indexName:S,searchClient:H,searchState:x,onSearchStateChange:function(e){e.page&&void 0!==e.query&&u(J(e))}},a.a.createElement("div",{className:"layout-main-".concat(P)},a.a.createElement("div",{className:N?F?"box-header-".concat(P,"-main"):"":"box-header-".concat(P,"-main"),style:Object(h.a)({},"newVersion"===P?{background:null===(o=v.theme)||void 0===o?void 0:o.headerColor}:{})},a.a.createElement(i,{onToggleFilterMobile:function(e){M(Object($e.isUndefined)(e)?!_:e)}})),a.a.createElement("div",{className:"box-body-".concat(P,"-wrap-main")},l),N&&a.a.createElement("div",{className:"footer-wrap-main"},a.a.createElement(c,null))),N&&a.a.createElement(m.a,{className:"box-fillter ".concat(_?"open":"close"," "),position:"absolute",style:{top:_?"0px":"",height:"100%"}},a.a.createElement(zr,{onApply:function(){M(!_)}})),N&&O&&a.a.createElement(m.a,{className:"box-fillter open",position:"absolute",style:{top:"0px",height:"100%"}},a.a.createElement("div",{style:{width:N?"100%":"90%"},className:"wrap-filter-desktop"},a.a.createElement("div",{className:"bg-white box-filter-desktop isMobile"},a.a.createElement(nr,{handleClose:function(){return u(oe(!O))}})))),N&&j&&a.a.createElement(m.a,{className:"box-fillter open",position:"absolute",style:{top:"0px",height:"100%"}},a.a.createElement("div",{style:{width:N?"100%":"90%"},className:"wrap-filter-desktop"},a.a.createElement("div",{className:"bg-white box-filter-desktop isMobile"},a.a.createElement(lr,{handleClose:function(){return u(ne(!j))}}))))))})),qr=(r(791),r(792),r(262)),Ur=r.n(qr),Wr=r(205),Zr=r(479),Yr=r.n(Zr),Kr=r(91);function Qr(){Qr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var Jr=Object(n.memo)((function(e){var t=Object(f.g)(),r=_e(),o=e.acceptTypes,i=e.onChangeLoading,c=e.isLoading,l=Me((function(e){return e})),u=l.settings,s=l.search.keyFilter,v=Object(n.useState)(!1),g=Object(p.a)(v,2),y=g[0],b=g[1],w=Object(Kr.b)().t,x=Object(Ye.a)({onDrop:function(){var e=Object(d.a)(Qr().mark((function e(n){var a,o,c,l,f,d;return Qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.push("/result"),r(de(!0)),r(X()),i(!0),o=[],b(!0),console.log("fs",n),r(ae(URL.createObjectURL(n[0]))),e.next=10,tt(n[0]);case 10:if(c=e.sent,r(ce(c)),l=[{key:u.visualSearchFilterKey,values:["".concat(s)]}],!u.regions){e.next=20;break}return e.next=16,nt(c,u);case 16:d=e.sent,r(ie(d.regions)),f=d.selectedRegion,r(ue(f));case 20:return e.abrupt("return",at({image:c,settings:u,region:f,filters:s?l:void 0}).then((function(e){return null===e||void 0===e||e.results.map((function(e){o.push({sku:e.sku,score:e.score})})),a=Object(h.a)(Object(h.a)({},e),{},{filters:o}),r(le(a)),b(!1),i(!1),r(de(!1)),r(ke())})));case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),E=x.getRootProps,O=x.getInputProps,j=x.isDragActive;return a.a.createElement(m.a,{className:j||y?"box-content-main-drop":"box-content-main"},c&&a.a.createElement(m.a,{className:"loadingSpinCT"},a.a.createElement(m.a,{className:"box-content-spin"})),a.a.createElement("div",Object.assign({className:"box-border",style:{position:"relative"}},E({onClick:function(e){e.stopPropagation()}})),j?a.a.createElement(m.a,null,a.a.createElement(Ut.a,{className:"text-drop-file"},"DRAG ",a.a.createElement("span",{className:"tractor"},"&")," DROP"),a.a.createElement("input",Object.assign({},O({onClick:function(e){e.stopPropagation()}}),{type:"file",name:"file",id:"select_file",placeholder:"Choose photo",accept:o,onChange:Object(Wr.makeFileHandler)((function(e){}))}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,Object.assign({className:"box-content-drop"},E({onClick:function(e){e.stopPropagation()}})),a.a.createElement(m.a,{style:{marginBottom:16}},a.a.createElement("img",{src:Yr.a,alt:"",width:48,height:48})),a.a.createElement("label",{htmlFor:"select_file",className:"",style:{color:"#2B2C46",fontSize:14}},a.a.createElement("span",{className:"fw-700",style:{paddingRight:"4px"}},w("Choose an image")),w("or drag it here")),a.a.createElement("input",Object.assign({},O(),{type:"file",name:"file",id:"select_file",className:"inputFile",placeholder:"Choose photo",style:{display:"block"}}))))))})),Xr=r(484),$r=r.n(Xr),en=r(483),tn=r.n(en),rn=r(908);var nn=function(e){var t=e.children,r=e.openModal,n=void 0!==r&&r,o=e.handleClose,i=e.classNameModal,c=e.classNameComponentChild;return a.a.createElement(rn.a,{open:n,onClose:o,className:"modal-container ".concat(i||""),style:{display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("div",{className:c,style:{overflowY:"hidden",maxHeight:"95vh",borderRadius:12}},t))};function an(){an=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var on=Object(Lt.a)(Object(n.memo)((function(e){var t,r,o,i,c,l=e.refine,u=e.onToggleFilterMobile,s=Me((function(e){return e})),v=s.search,g=s.settings,y=v.imageThumbSearchInput,w=v.keyFilter,x=Object(n.useRef)(null),E=Object(f.g)(),O=Object(n.useState)(""),j=Object(p.a)(O,2),C=j[0],k=j[1],L=_e(),S=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),N=Bt(),R=Object(n.useState)(!1),I=Object(p.a)(R,2),_=I[0],M=I[1],T=Object(Kr.b)().t;Object(n.useEffect)((function(){(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||x.current.focus())}),[x]),Object(n.useEffect)((function(){var e=N.get("query")||"";Object($e.isEmpty)(e)||(k(e),l(e),setTimeout((function(){l(e)}),100))}),[N,l]),Object(n.useEffect)((function(){y&&(k(""),l(""),E.push("/result"))}),[y]);var F=Object(n.useCallback)(Object($e.debounce)((function(e){e?E.push({pathname:"/result",search:"?query=".concat(e)}):E.push("/result")}),500),[]),P=Object(Ye.a)({onDrop:function(){var e=Object(d.a)(an().mark((function e(t){var r,n,a,o,i,c;return an().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(de(!0)),L(X()),"/result"!==E.location.pathname&&E.push("/result"),n=[],L(ae(URL.createObjectURL(t[0]))),e.next=7,tt(t[0]);case 7:if(o=e.sent,L(ce(o)),i=[{key:g.visualSearchFilterKey,values:["".concat(w)]}],!g.regions){e.next=17;break}return e.next=13,nt(o,g);case 13:c=e.sent,L(ie(c.regions)),a=c.selectedRegion,L(ue(a));case 17:return e.abrupt("return",at({image:o,settings:g,filters:w?i:void 0,region:a}).then((function(e){null===e||void 0===e||e.results.map((function(e){n.push({sku:e.sku,score:e.score})})),r=Object(h.a)(Object(h.a)({},e),{},{filters:n}),L(le(r)),L(de(!1))})).catch((function(e){console.log("error input search",e),L(de(!1))})));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).getInputProps;return a.a.createElement("div",{className:"wrap-input-search-field"},a.a.createElement("div",{className:"box-input-search d-flex"},a.a.createElement("form",{noValidate:!0,action:"",role:"search"},a.a.createElement(m.a,{className:"box-inp"},a.a.createElement(Wt.a,{title:w||"Add pre-filter",placement:"top",arrow:!0,disableHoverListener:!g.preFilterOption},a.a.createElement(m.a,{className:"pre-filter-icon",style:{cursor:g.preFilterOption?"pointer":"default"},onClick:function(){return!!g.preFilterOption&&M(!0)}},g.preFilterOption&&a.a.createElement("div",{className:"icon-hover",style:Object(h.a)({},w?{backgroundColor:"".concat(null===(t=g.theme)||void 0===t?void 0:t.secondaryColor,"26")}:{})},a.a.createElement(kt,{color:"black"})),!g.preFilterOption&&a.a.createElement(Tt,{width:16,height:16}),w&&a.a.createElement("div",{style:{position:"absolute",top:"6px",left:"31px",display:"flex",justifyContent:"center",alignItems:"center",background:"white",width:"10px",height:"10px",borderRadius:"100%"}},a.a.createElement("div",{style:{width:"8px",height:"8px",background:null===(r=g.theme)||void 0===r?void 0:r.secondaryColor,borderRadius:"100%"}})))),a.a.createElement(m.a,{style:{height:"75%",order:1}},y&&a.a.createElement(m.a,{style:{border:"2px solid ".concat(null===(o=g.theme)||void 0===o?void 0:o.secondaryColor,"c7"),backgroundColor:"".concat(null===(i=g.theme)||void 0===i?void 0:i.secondaryColor,"26"),marginRight:"5px"},className:"box-image-search-thumb",display:"flex"},a.a.createElement("img",{src:y,style:{objectFit:"contain"},alt:"img_search"}),a.a.createElement(Wt.a,{title:"Clear image search",placement:"top",arrow:!0},a.a.createElement("button",{type:"button",onClick:function(){C||(L(te("")),E.push("/")),L(te("")),l(C)}},a.a.createElement(Ve.a,{style:{fontSize:20,color:null===(c=g.theme)||void 0===c?void 0:c.secondaryColor}}))))),a.a.createElement("input",{style:{border:"0px",width:"100%",fontSize:14,color:"#2B2C46"},className:"input-search",placeholder:T("Search"),value:C,onChange:function(e){k(e.currentTarget.value),F(e.currentTarget.value),""===e.currentTarget.value&&(k(""),l(""))},ref:x})),"/result"===E.location.pathname&&C&&a.a.createElement(Te.a,{className:"btn-clear-text",onClick:function(){if(y)return k(""),void l("");k(""),l(""),L(te("")),E.push("/")}},a.a.createElement(Wt.a,{title:T("Clear text search"),placement:"top",arrow:!0},a.a.createElement($r.a,{style:{fontSize:16,color:"#2B2C46"}}))),S?a.a.createElement(m.a,null,a.a.createElement(Te.a,{className:"btn-mobile-filter",onClick:u},a.a.createElement(kt,{width:18,height:18}))):a.a.createElement("div",{className:"wrap-box-input-mobile d-flex"},a.a.createElement("input",Object.assign({accept:"image/*",id:"icon-button-file",type:"file",style:{display:"none"}},P({onClick:function(e){e.stopPropagation()}}))),a.a.createElement(Wt.a,{title:T("Search with an image"),placement:"top",arrow:!0},a.a.createElement("label",{htmlFor:"icon-button-file"},a.a.createElement(ze.a,{color:"primary","aria-label":"upload picture",component:"span",style:{width:32,height:32,borderRadius:"100%",padding:7}},a.a.createElement("img",{src:tn.a,alt:"",width:18,height:18}))))))),g.preFilterOption&&a.a.createElement(nn,{openModal:_,handleClose:function(){return M(!1)},classNameModal:"wrap-filter-desktop",classNameComponentChild:"bg-white box-filter-desktop"},a.a.createElement(nr,{handleClose:function(){return M(!1)}})))}))),cn=r(897);var ln,un=function(){var e=Me((function(e){return e})).settings,t=Object(n.useState)(!1),r=Object(p.a)(t,2),o=r[0],i=r[1],c=e.algolia,l=c.apiKey,s=c.appId,f=c.indexName;g()(s,l).initIndex(f);var h=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),d=["image/*"].concat(e.cadSearch?Je.cadExtensions:[]).join(","),v=Object(cn.a)((function(e){e.hits;return a.a.createElement("div",null)}));return a.a.createElement(m.a,{className:"box-content-main ".concat(o?"loading":"")},h&&a.a.createElement(m.a,{className:"btn-open-support"},a.a.createElement(u.b,{to:"/support",style:{color:"#3E36DC"}},a.a.createElement("img",{src:Ur.a,alt:"",width:16,height:16}))),a.a.createElement(m.a,{className:"box-content_top"},a.a.createElement(m.a,{className:"fw-700 text-f32 text-dark2"},a.a.createElement("h1",null,e.headerText)),a.a.createElement("div",{className:"box-input"},a.a.createElement("div",{className:"wrap-input-search"},a.a.createElement("div",{style:{display:"none"}},a.a.createElement(v,null)),a.a.createElement(on,null)))),a.a.createElement(m.a,{className:"box-content_bottom"},a.a.createElement(Jr,{acceptTypes:d,isLoading:o,onChangeLoading:function(e){i(e)}})))},sn=["svgRef","title"];function fn(){return(fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function hn(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var dn=function(e){var t=e.svgRef,r=e.title,n=hn(e,sn);return a.a.createElement("svg",fn({width:121,height:96,viewBox:"0 0 121 96",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,a.a.createElement("g",{style:{mixBlendMode:"multiply"}},ln||(ln=a.a.createElement("path",{d:"M81.7314 54.5169C81.7314 66.4489 71.985 76.1561 60.0049 76.1561C48.0248 76.1561 38.2785 66.4489 38.2785 54.5169C38.2785 42.5849 48.0248 32.8777 60.0049 32.8777C71.985 32.8777 81.7314 42.5849 81.7314 54.5169ZM120.005 24.1972V84.8366C120.005 90.4872 115.363 95.1111 109.689 95.1111H10.3215C4.64805 95.1111 0.00549316 90.4878 0.00549316 84.8366V24.1972C0.00549316 18.5466 4.64748 13.9227 10.3215 13.9227H34.2641L37.8838 5.57484C39.3502 2.1909 42.6961 0 46.3964 0H73.6134C77.3137 0 80.6602 2.1909 82.1272 5.57484L85.7469 13.9227H109.69C115.363 13.9227 120.005 18.546 120.005 24.1972H120.005ZM21.6286 26.4758C21.6286 25.1029 20.5011 23.98 19.1227 23.98H12.2151C10.8366 23.98 9.7092 25.1029 9.7092 26.4758V29.8484C9.7092 31.2214 10.8366 32.3443 12.2151 32.3443H19.1227C20.5011 32.3443 21.6286 31.2214 21.6286 29.8484V26.4758ZM92.258 54.5169C92.258 50.1826 91.4044 45.975 89.7215 42.0118C88.0965 38.1861 85.7719 34.7512 82.8116 31.8029C79.8514 28.8545 76.4027 26.5392 72.5615 24.9207C68.5818 23.2441 64.3578 22.3944 60.0061 22.3944C55.6543 22.3944 51.4298 23.2446 47.4506 24.9207C43.6094 26.5392 40.1607 28.8545 37.2005 31.8029C34.2403 34.7512 31.9156 38.1861 30.2906 42.0118C28.6072 45.9756 27.7541 50.1826 27.7541 54.5169C27.7541 58.8512 28.6077 63.0588 30.2906 67.022C31.9156 70.8477 34.2403 74.2825 37.2005 77.2309C40.1607 80.1793 43.6094 82.4946 47.4506 84.113C51.4303 85.7897 55.6543 86.6394 60.0061 86.6394C64.3578 86.6394 68.5824 85.7892 72.5615 84.113C76.4027 82.4946 79.8514 80.1793 82.8116 77.2309C85.7719 74.2825 88.0965 70.8477 89.7215 67.022C91.405 63.0582 92.258 58.8512 92.258 54.5169Z",fill:"currentColor"}))))},pn=a.a.forwardRef((function(e,t){return a.a.createElement(dn,fn({svgRef:t},e))}));r.p;var mn=function(){var e=_e(),t=Object(n.useState)(!1),r=Object(p.a)(t,2),o=r[0],i=r[1];return Object(n.useEffect)((function(){e(te(""))}),[e]),a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%"}},a.a.createElement("div",{className:"take-photo"},a.a.createElement("div",{className:"take-photo-wrapper",style:{background:"linear-gradient(90deg, #55566B 0%, #2B2C46 100%)"}},a.a.createElement("div",{className:"outer",onClick:function(){i(!o)}},a.a.createElement("div",{className:"inner"},a.a.createElement(pn,{color:"#2B2C46"}))))),a.a.createElement(m.a,{className:"box-screenshot-camera"},a.a.createElement(ct,{isToggle:o,onToggleModal:function(){i(!o)}})))},vn=r(326);vn.a.use(Kr.a).init({resources:{en:{translation:{Search:"Search","Choose an image":"Choose an image","or drag it here":"or drag it here","Manufacturer Number":"Manufacturer Number","Close group":"Close group","Show group":"Show group","Adjust the search frame around your object for improved results":"Adjust the search frame around your object for improved results","crop the image for better results":"Crop the image for better results","Items per page":"Items per page","Search with an image":"Search with an image","Clear text search":"Clear text search"}},de:{translation:{Search:"Suche","Choose an image":"Bild w\xe4hlen","or drag it here":"oder hierhin ziehen","Manufacturer Number":"Herst. Teile-Nr.","Close group":"Schlie\xdfe Gruppe","Show group":"Zeige Gruppe","Adjust the search frame around your object for improved results":"Anpassen des Rahmens f\xfcr bessere Ergebnisse","crop the image for better results":"Bildausschnitt anpassen f\xfcr bessere Ergebnisse","Items per page":"Artikel pro Seite","Search with an image":"Bildsuche","Clear text search":"Suchtext l\xf6schen"}}},fallbackLng:"en",interpolation:{escapeValue:!1},returnNull:!1});var gn=function(){var e=Me((function(e){return e.settings.language}));vn.a.changeLanguage(e);var t=Object(b.useMediaQuery)({query:"(max-width: 776px)"})?mn:un;return a.a.createElement(t,null)},yn=r(489),bn=r.n(yn),wn=r(490),xn=r.n(wn),En=r(491),On=r.n(En),jn=r(488),Cn=r.n(jn),kn=r(898);var Ln=Object(Lr.a)(Object(n.memo)((function(e){var t=e.children,r=e.type,o=void 0===r?"native":r,i=e.className,c=e.items,l=e.refine,u=Object(n.useCallback)((function(){return l(c)}),[l,c]),s=Me((function(e){return e})).settings;return a.a.createElement(Te.a,{type:o,disabled:!c.length,className:i,onClick:u,style:{color:s.theme.secondaryColor,fontWeight:"bold",textTransform:"capitalize",padding:0}},t)}),Nr.a)),Sn=r(138),Nn=r.n(Sn),Rn=["children","className","selected","closeIcon"];function In(e){var t=e.children,r=e.className,n=(e.selected,e.closeIcon),o=void 0!==n&&n,i=Object(s.a)(e,Rn);return a.a.createElement(Te.a,Object.assign({type:"native",className:r},i),t,o&&a.a.createElement(Nn.a,{style:{fontSize:"16px",fontWeight:"bold"}}))}Object(gr.atom)(0);var _n=Object(Lr.a)((function(e){var t=e.items,r=e.refine,o=e.className,i=e.statusSwitchButton,c=Me((function(e){return e})).settings,l=Object(n.useState)([]),u=Object(p.a)(l,2),s=u[0],f=u[1];Object(n.useEffect)((function(){i&&f(t)}),[t,i]);var h=Object(n.useMemo)((function(){return s.reduce((function(e,t){return[].concat(Object(ur.a)(e),Object(ur.a)(function(e,t){var r,n;switch(t.forEach((function(t){(function(e,t){var r=e.attribute;return(null===r||void 0===r?void 0:r.attributes)?(null===r||void 0===r?void 0:r.attributes[0])===t.attribute:r===t.attribute})(t,e)&&(n=t)})),null===(r=n)||void 0===r?void 0:r.type){case"size":case"list":var a;return(null===e||void 0===e||null===(a=e.items)||void 0===a?void 0:a.map((function(e){var t;return{category:null===(t=n)||void 0===t?void 0:t.header,label:e.label,value:e.value}})))||[];default:return[]}}(t,null===c||void 0===c?void 0:c.refinements)))}),[])}),[c,s]);return h.length?a.a.createElement("div",{className:o,style:{marginBottom:h.length>0?"10px":"0px",marginTop:h.length>0?"16px":"0px"}},a.a.createElement("ul",{className:"flex flex-wrap gap-3"},h.map((function(e){return a.a.createElement(kn.a.li,{key:[e.category,e.label].join(":")},a.a.createElement(In,{closeIcon:!0,onClick:function(){return r(e.value)}},e.category&&a.a.createElement("div",{className:"text-f12"},e.category,":"),a.a.createElement("div",{className:"capitalize fw-700",style:{marginLeft:5,textTransform:"capitalize",marginRight:10}},e.label)))})),a.a.createElement("li",{key:"clear",className:wr()("flex items-center",{hidden:h.length<2})},a.a.createElement(Ln,{className:"text-f12 fw-600"},"Clear all")))):null})),Mn=r(899),Tn=r(900);var Fn,Pn=Object(Tn.a)((function(e){var t=e.children;return a.a.createElement(Mn.a,{container:!0,justifyContent:"space-between",alignItems:"center",style:{height:"100%"}},t,a.a.createElement(Mn.a,{item:!0,className:"item-notify-right",style:{minWidth:32}}))})),Hn=r(325),An=r.n(Hn),Gn=r(263),Bn=r.n(Gn),zn=["svgRef","title"];function Dn(){return(Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Vn(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var qn,Un=function(e){var t=e.svgRef,r=e.title,n=Vn(e,zn);return a.a.createElement("svg",Dn({width:10,height:11,viewBox:"0 0 10 11",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,Fn||(Fn=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.56905 7.91401C6.92789 7.46225 7.47234 7.19773 8.04926 7.19483C9.10003 7.19483 9.95185 8.04665 9.95185 9.09742C9.95185 10.1482 9.10003 11 8.04926 11C6.99849 11 6.14667 10.1482 6.14667 9.09742C6.14847 8.92726 6.17408 8.75819 6.22277 8.59513L3.44118 6.85616C2.93785 7.48979 2.0888 7.73571 1.32474 7.46917C0.560687 7.20264 0.0488281 6.48196 0.0488281 5.67275C0.0488281 4.86354 0.560687 4.14287 1.32474 3.87633C2.0888 3.60979 2.93785 3.85571 3.44118 4.48934L6.22277 2.75037C6.17408 2.58732 6.14847 2.41825 6.14667 2.24809C6.14083 1.32028 6.80508 0.523574 7.7188 0.36244C8.63252 0.201306 9.52922 0.722744 9.84111 1.59657C10.153 2.4704 9.78909 3.44177 8.97983 3.89559C8.17057 4.34941 7.15198 4.15332 6.56905 3.4315L3.78746 5.17047C3.88883 5.49765 3.88883 5.84785 3.78746 6.17504L6.56905 7.91401ZM9.19066 2.24808C9.19066 1.61762 8.67957 1.10653 8.04911 1.10653C7.41864 1.10653 6.90755 1.61762 6.90755 2.24808C6.90755 2.87855 7.41864 3.38964 8.04911 3.38964C8.67957 3.38964 9.19066 2.87855 9.19066 2.24808ZM1.96089 6.81431C1.33043 6.81431 0.819336 6.30322 0.819336 5.67275C0.819336 5.04229 1.33043 4.5312 1.96089 4.5312C2.59136 4.5312 3.10245 5.04229 3.10245 5.67275C3.10245 6.30322 2.59136 6.81431 1.96089 6.81431ZM6.90755 9.09742C6.90755 9.72788 7.41864 10.239 8.04911 10.239C8.67957 10.239 9.19066 9.72788 9.19066 9.09742C9.19066 8.46695 8.67957 7.95586 8.04911 7.95586C7.41864 7.95586 6.90755 8.46695 6.90755 9.09742Z",fill:"currentColor"})))},Wn=a.a.forwardRef((function(e,t){return a.a.createElement(Un,Dn({svgRef:t},e))})),Zn=(r.p,["svgRef","title"]);function Yn(){return(Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Kn(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var Qn,Jn=function(e){var t=e.svgRef,r=e.title,n=Kn(e,Zn);return a.a.createElement("svg",Yn({width:11,height:11,viewBox:"0 0 11 11",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,qn||(qn=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.53059 7.14308H3.81466V9.11675C3.7348 9.90592 4.28699 10.6128 5.04806 10.6957C5.14416 10.7075 5.24128 10.7075 5.33738 10.6957H5.93504C6.19675 10.6882 6.42056 10.4984 6.47941 10.2338V10.1865L6.86009 7.68387L8.20769 5.56415H10.6669V0.0378923H3.43399C0.601741 0.0378923 0.00788307 1.75498 0.00788307 3.19576V5.56415C-0.0719852 6.35332 0.480213 7.06022 1.24128 7.14308C1.33738 7.15493 1.43449 7.15493 1.53059 7.14308ZM8.38276 0.827361H9.90548V4.77469H8.38276V0.827361ZM3.43384 0.827355C1.6142 0.827355 0.769092 1.5813 0.769092 3.19575V5.56415C0.769092 6.13256 0.982271 6.35361 1.53045 6.35361H4.57587V9.11674C4.57587 9.68516 4.78905 9.90621 5.33723 9.90621H5.76739L5.82069 9.51148L6.09858 7.39176L7.6213 5.051V0.827355H3.43384Z",fill:"currentColor"})))},Xn=a.a.forwardRef((function(e,t){return a.a.createElement(Jn,Yn({svgRef:t},e))})),$n=(r.p,["svgRef","title"]);function ea(){return(ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ta(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var ra,na=function(e){var t=e.svgRef,r=e.title,n=ta(e,$n);return a.a.createElement("svg",ea({width:12,height:11,viewBox:"0 0 12 11",fill:"currentColor",ref:t},n),r?a.a.createElement("title",null,r):null,Qn||(Qn=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.80278 3.59938H7.51871V1.62572C7.59858 0.836545 7.04638 0.129649 6.28531 0.0467847C6.18921 0.0349422 6.0921 0.0349422 5.996 0.0467847H5.39833C5.13662 0.0542197 4.91282 0.244093 4.85396 0.508622V0.55599L4.47329 3.0586L3.12568 5.17831H0.666504V10.7046H7.89939C10.7316 10.7046 11.3255 8.98748 11.3255 7.54671V5.17831C11.4054 4.38914 10.8532 3.68224 10.0921 3.59938C9.99599 3.58754 9.89888 3.58754 9.80278 3.59938ZM2.95061 9.9151H1.4279V5.96777H2.95061V9.9151ZM7.89954 9.9151C9.71918 9.9151 10.5643 9.16116 10.5643 7.5467V5.1783C10.5643 4.60989 10.3511 4.38884 9.80293 4.38884H6.7575V1.62571C6.7575 1.05729 6.54432 0.836243 5.99615 0.836243H5.56598L5.51268 1.23098L5.23479 3.35069L3.71208 5.69146V9.9151H7.89954Z",fill:"currentColor"})))},aa=a.a.forwardRef((function(e,t){return a.a.createElement(na,ea({svgRef:t},e))})),oa=(r.p,["svgRef","title"]);function ia(){return(ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ca(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var la=function(e){var t=e.svgRef,r=e.title,n=ca(e,oa);return a.a.createElement("svg",ia({width:16,height:16,viewBox:"0 0 16 16",fill:"none",ref:t},n),r?a.a.createElement("title",null,r):null,ra||(ra=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.42028 4.82804C1.42028 5.22014 1.10221 5.53825 0.710142 5.53825C0.318078 5.53825 0 5.22014 0 4.82804V2.69216C0 1.20767 1.20757 0 2.69193 0H4.87323C5.26529 0 5.58337 0.318104 5.58337 0.710201C5.58337 1.1023 5.26529 1.4204 4.87323 1.4204H2.69193C1.99071 1.4204 1.42028 1.99087 1.42028 2.69216V4.82804ZM13.3081 0H11.1268C10.7347 0 10.4167 0.318104 10.4167 0.710201C10.4167 1.1023 10.7347 1.4204 11.1268 1.4204H13.3081C14.0093 1.4204 14.5798 1.99087 14.5798 2.69216V4.82804C14.5798 5.22014 14.8978 5.53825 15.2899 5.53825C15.682 5.53825 16 5.22014 16 4.82804V2.69216C16 1.20767 14.7925 0 13.3081 0ZM15.2899 10.4614C14.8978 10.4614 14.5798 10.7795 14.5798 11.1716V13.3078C14.5798 14.0091 14.0093 14.5796 13.3081 14.5796H11.1268C10.7347 14.5796 10.4167 14.8977 10.4167 15.2898C10.4167 15.6819 10.7347 16 11.1268 16H13.3081C14.7925 16 16 14.7923 16 13.3078V11.1716C16 10.7795 15.682 10.4614 15.2899 10.4614ZM4.87323 14.5796H2.69193C1.99071 14.5796 1.42028 14.0091 1.42028 13.3078V11.1716C1.42028 10.7795 1.10221 10.4614 0.710142 10.4614C0.318078 10.4614 0 10.7792 0 11.1716V13.3078C0 14.7923 1.20757 16 2.69193 16H4.87323C5.26529 16 5.58337 15.6819 5.58337 15.2898C5.58337 14.8977 5.26529 14.5796 4.87323 14.5796ZM12.6019 12.6029C12.4476 12.7572 12.2425 12.8421 12.0242 12.8421L12.0245 12.8418C11.8062 12.8418 11.6011 12.7569 11.4468 12.6026L10.2604 11.4161C9.59218 11.8613 8.81663 12.0952 8.00047 12.0952C6.90685 12.0952 5.87863 11.6694 5.1054 10.8961C4.33217 10.1228 3.90641 9.09453 3.90641 8.00082C3.90641 6.90711 4.33217 5.87881 5.1054 5.10552C5.87863 4.33222 6.90685 3.90643 8.00047 3.90643C9.09408 3.90643 10.1223 4.33222 10.8955 5.10552C11.6688 5.87881 12.0945 6.90711 12.0945 8.00082C12.0945 8.81706 11.8607 9.59266 11.4154 10.2612L12.6019 11.4478C12.9203 11.7662 12.9203 12.2845 12.6019 12.6029ZM9.73685 9.73702C9.75171 9.72248 9.76723 9.70795 9.78342 9.69407C10.2201 9.23426 10.4605 8.63373 10.4605 8.00082C10.4605 6.64418 9.35667 5.54023 8.00014 5.54023C6.6436 5.54023 5.53974 6.64418 5.53974 8.00082C5.53974 9.35747 6.64327 10.4614 8.00014 10.4614C8.63299 10.4614 9.23347 10.2213 9.69325 9.78425C9.70745 9.76774 9.72198 9.75188 9.73685 9.73702Z",fill:"#AAABB5"})))},ua=a.a.forwardRef((function(e,t){return a.a.createElement(la,ia({svgRef:t},e))})),sa=(r.p,r(264)),fa=r.n(sa),ha=r(901),da=r(486),pa=r.n(da),ma=r(271),va=(r(849),r(850),r(851),function(e){var t=e.imgItem,r=e.onSearchImage,o=e.handlerCloseModal,i=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),c=Object(n.useRef)(null),l=Object(n.useRef)(null),u=Object(n.useMemo)((function(){var e=75+58*t.length,r=i?340:400;return e<r?e:r}),[t.length,i]),s=Object(n.useMemo)((function(){return{type:"slide",perPage:1,perMove:1,gap:"1rem",pagination:!1,arrows:!1,width:i?340:370}}),[i]),f=Object(n.useMemo)((function(){return{type:"slide",rewind:!0,gap:"1rem",pagination:!1,fixedWidth:40,fixedHeight:40,cover:!0,focus:"center",isNavigation:!0,arrows:t.length>1,width:u}}),[t.length,u]),h=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.map((function(t){return a.a.createElement(ma.b,{key:t.url,className:e?"":"img-container"},a.a.createElement("img",{style:{objectFit:"contain",minHeight:"400px"},alt:"preview",src:t.url,onClick:function(){e||(o(),r(t.url))}}))}))};return a.a.useEffect((function(){var e;c.current&&l.current&&(null===(e=l.current)||void 0===e?void 0:e.splide)&&c.current.sync(l.current.splide)}),[]),a.a.createElement(a.a.Fragment,null,a.a.createElement(ma.a,{options:s,ref:c},h()),a.a.createElement("div",{className:"thumbs-list ".concat(t.length<=1?"d-none":"")},a.a.createElement(ma.a,{options:f,ref:l},h(!0))))}),ga=r(485),ya=r.n(ga);var ba=function(e){var t,r,o,i,c,l,u,s,f,h=e.handlerCloseModal,d=e.dataItem,v=e.onSearchImage,g=e.onHandlerModalShare,y=e.handlerFeedback,w=Object(n.useState)(!1),x=Object(p.a)(w,2),E=x[0],O=x[1],j=d.sku,C=Object(n.useState)([]),k=Object(p.a)(C,2),L=k[0],S=k[1],N=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),R=Me((function(e){return e})).settings,I=Object(n.useState)("none"),_=Object(p.a)(I,2),M=_[0],T=_[1],F=Object(n.useState)(""),P=Object(p.a)(F,2),H=P[0],A=P[1],G=d[R.field.productTag];Object(n.useEffect)((function(){d&&(z(d),B(d["image(main_similarity)"]||d.main_image_link))}),[d]);var B=function(e,t){t=t||5e3;var r=new Image;r.onerror=r.onabort=function(){clearTimeout(void 0),A("")},r.onload=function(){return clearTimeout(void 0),void A(e)},r.src=e},z=function(e){var t=function(e){var t=[],r=e;if(!e)return[];for(var n in r)(null===n||void 0===n?void 0:n.includes("image(recognition)"))||(null===n||void 0===n?void 0:n.includes("additional_image_link"))?Object($e.isEmpty)(r[n])||r[n]&&t.push({url:r[n]}):"image(main_similarity)"!==n&&"main_image_link"!==n||r[n]&&t.push({url:r[n]});return t}(e);S(t)},D=Object(Kr.b)().t;return a.a.createElement(m.a,{className:"box-modal-default",borderRadius:12,style:N?{margin:0}:{}},a.a.createElement(m.a,{className:"ml-auto",style:{width:"fit-content",marginRight:4}},a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return null===h||void 0===h?void 0:h()}},a.a.createElement(Nn.a,{style:{fontSize:20,color:"#55566B"}}))),a.a.createElement(m.a,{style:{overflowY:"auto",maxHeight:"90svh"}},a.a.createElement(m.a,{className:"box-carosel",style:0===L.length?{display:"flex",justifyContent:"center"}:{}},L.length>0?a.a.createElement(va,{imgItem:L,onSearchImage:v,handlerCloseModal:function(){return null===h||void 0===h?void 0:h()}}):a.a.createElement("img",{src:fa.a,alt:"image_item",className:"img-style",style:{width:"300px",height:"300px",padding:"8px"}}),L.length>0&&a.a.createElement(Te.a,{className:"icon-style",onClick:function(){if(H.length>1)return v(H),void(null===h||void 0===h||h())}},a.a.createElement(ua,{color:"#AAABB5"}))),a.a.createElement(m.a,{className:"box-content",display:"flex",style:{flexDirection:"column",borderBottomLeftRadius:12,borderBottomRightRadius:12,paddingBottom:19,backgroundColor:"#F3F3F5"}},a.a.createElement(m.a,{className:"box-top"},a.a.createElement(Mn.a,{container:!0,justifyContent:"space-between"},a.a.createElement(Mn.a,{item:!0,xs:12},a.a.createElement(Ut.a,{className:"text-f13 fw-500 max-line-1"},R.itemIdLabel||"SKU",": ",a.a.createElement("span",null," ",j)),d[R.field.manufacturerNumber]&&a.a.createElement(Ut.a,{className:"text-f13 fw-500 max-line-1",style:{marginTop:"12px"}},D("Manufacturer Number"),":"," ",d[R.field.manufacturerNumber]),R.warehouseVariant&&a.a.createElement(Ut.a,{className:"text-f13 max-line-1 fw-500",style:{marginTop:12,display:"inline-block"}},a.a.createElement("span",{style:{marginRight:3}},d[R.field.warehouseStock],":"),a.a.createElement("span",{style:{color:d[R.field.warehouseStockValue]?"#00C070":"#c54545",fontWeight:600}},d[R.field.warehouseStockValue]||0)),(G||R.brandName)&&a.a.createElement(m.a,{borderRadius:16,style:{backgroundColor:"".concat(null===(t=R.theme)||void 0===t?void 0:t.secondaryColor,"26"),width:"fit-content",padding:"3px 5px",marginTop:12}},a.a.createElement(Ut.a,{style:{color:null===(r=R.theme)||void 0===r?void 0:r.secondaryColor,fontSize:12,fontWeight:700}},G||R.brandName))),a.a.createElement(Mn.a,{item:!0,xs:12},a.a.createElement(m.a,{style:{background:"linear-gradient(270deg, ".concat(null===(o=R.theme)||void 0===o?void 0:o.primaryColor,"bb 0%, ").concat(null===(i=R.theme)||void 0===i?void 0:i.primaryColor," 100%)"),boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)",borderRadius:4,marginTop:12},display:"flex",justifyContent:"space-between",alignItems:"center",className:"btn-detail-item"},a.a.createElement(Te.a,{style:{display:"flex",justifyContent:"space-between",width:"100%",padding:"0px 12px",minHeight:64},onClick:function(){return window.open("".concat(d[R.field.ctaLinkField]),"_blank")}},a.a.createElement(Ut.a,{className:"text-f18 fw-700 text-white max-line-2",align:"left",style:{letterSpacing:"0.55px",maxWidth:"300px",paddingRight:"4px"}},d[R.field.productName]),a.a.createElement("img",{src:Bn.a,alt:"",style:{minWidth:23,marginLeft:5}}))),d[R.field.productDetails]&&a.a.createElement(m.a,{className:"w-100"},a.a.createElement(Te.a,{className:"w-100",style:{display:"flex",justifyContent:"space-between",color:null===(c=R.theme)||void 0===c?void 0:c.secondaryColor,fontSize:14,textTransform:"initial",paddingLeft:5,marginTop:12},onClick:function(){return O((function(e){return!e}))}},"View details",E?a.a.createElement(ya.a,{htmlColor:null===(l=R.theme)||void 0===l?void 0:l.secondaryColor}):a.a.createElement(pa.a,{htmlColor:null===(u=R.theme)||void 0===u?void 0:u.secondaryColor})),a.a.createElement(ha.a,{in:E},a.a.createElement(Ut.a,{style:{fontSize:14,paddingTop:5}},d[R.field.productDetails])))))),R.warehouseVariant&&a.a.createElement(m.a,{display:"flex",justifyContent:"space-between",style:{color:"#2B2C46",marginTop:12},gridGap:20},R.field.warehouseNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(s=R.theme)||void 0===s?void 0:s.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:15,fontWeight:500}},d[R.field.warehouseNumber]),a.a.createElement("div",{style:{fontSize:17,fontWeight:700}},d[R.field.warehouseNumberValue]||"N/A")),R.field.warehouseShelfNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(f=R.theme)||void 0===f?void 0:f.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:15,fontWeight:500}},d[R.field.warehouseShelfNumber]),a.a.createElement("div",{style:{fontSize:17,fontWeight:700}},d[R.field.warehouseShelfNumberValue]||"N/A"))),R.showFeedbackAndShare&&a.a.createElement(m.a,{className:"box-bottom",style:{marginBottom:6,marginTop:28}},a.a.createElement(Mn.a,{container:!0,justifyContent:R.shareOption?"space-between":"space-around",alignItems:"center"},a.a.createElement(Mn.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",onClick:function(){y("like"),T("like")}},a.a.createElement(aa,{width:30,height:30,color:"like"===M?"#3E36DC":"#000000"})))),a.a.createElement(Mn.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",onClick:function(){y("dislike"),T("dislike")}},a.a.createElement(Xn,{width:30,height:30,color:"dislike"===M?"#CC1854":"#000000"})))),R.shareOption&&a.a.createElement(Mn.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",onClick:function(){return g()}},a.a.createElement(Wn,{width:30,height:30,color:"#000000"})))))))))},wa=r(885),xa=r(324),Ea=r.n(xa),Oa=r(487),ja=r.n(Oa),Ca=function(e){var t=e.dataItem,r=e.isOpen,n=e.setModalState,o=t["image(main_similarity)"]||t.main_image_link;return a.a.createElement(nn,{openModal:r,handleClose:function(){return n(!1)}},a.a.createElement(m.a,{className:"box-modal-default box-modal-share",style:{padding:"4px"}},a.a.createElement(m.a,{className:"ml-auto",style:{width:"fit-content",marginRight:5}},a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return n(!1)}},a.a.createElement(Nn.a,{style:{fontSize:16,color:"#55566B"}}))),a.a.createElement(m.a,{className:"box-content-box-share"},a.a.createElement(Ut.a,{className:"text-f12 text-gray text-bold",style:{marginBottom:"5px"}},"Share"),o&&a.a.createElement(wa.a,{component:"form",className:"box-input"},a.a.createElement(m.a,{className:"text-f9 text-gray",style:{width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"10px"}},o),a.a.createElement(ze.a,{color:"secondary","aria-label":"directions",style:{padding:"4px"},onClick:function(){navigator.clipboard.writeText(o)}},a.a.createElement(Ea.a,{style:{fontSize:14}}))),a.a.createElement(wa.a,{component:"form",className:"box-input",style:{marginTop:"12px",marginBottom:"8px"}},a.a.createElement(m.a,{className:"text-f9 text-gray",style:{width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"10px",display:"flex",alignItems:"center"}},a.a.createElement("span",{style:{fontWeight:"bold",paddingRight:"4px"}},"SKU:")," ",t.sku),a.a.createElement(ze.a,{color:"secondary","aria-label":"directions",style:{padding:"4px"},onClick:function(){navigator.clipboard.writeText(t.sku)}},a.a.createElement(Ea.a,{style:{fontSize:14}}))),a.a.createElement(m.a,{className:"box-media-share",display:"flex",style:{marginTop:"18px"}},a.a.createElement("a",{style:{padding:0},href:"mailto:support@nyris.io?subject=GF-Sparepart-Search&body= ".concat(encodeURIComponent("SKU: "+t.sku+"\r\n"+(o?"Image Link: ".concat(o):""))," ")},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement("img",{width:40,height:40,src:ja.a,alt:"icon_email"})))))))},ka=r(265),La=r(266),Sa=r(123),Na=r.n(Sa),Ra=function(){function e(){Object(ka.a)(this,e)}return Object(La.a)(e,null,[{key:"success",value:function(e){Na.a.success(e,{duration:3e3,style:{background:"#1E1F31",color:"#fff"}})}}]),e}();function Ia(){Ia=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var _a=function(){var e=Object(d.a)(Ia().mark((function e(t,r){var n,a,o,i,c;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.search,a=t.settings,o=n.sessionId,i=n.requestId||n.sessionId,e.prev=3,e.next=6,Pa(a,o,i,{event:"feedback",data:{success:r}});case 6:return c=e.sent,Sa.toast.dismiss(),Ra.success("Thank you for your feedback."),e.abrupt("return",c);case 12:e.prev=12,e.t0=e.catch(3),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t,r){return e.apply(this,arguments)}}(),Ma=function(){var e=Object(d.a)(Ia().mark((function e(t,r,n){var a,o;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.search,o=t.settings,e.next=3,Pa(o,a.sessionId,a.requestId,{event:"click",data:Object(h.a)({positions:[r]},n?{product_ids:[n]}:{})});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Ta=function(){var e=Object(d.a)(Ia().mark((function e(t,r,n){var a,o;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.search,o=t.settings,e.next=3,Pa(o,a.sessionId,a.requestId,{event:"conversion",data:Object(h.a)({positions:[r]},n?{product_ids:[n]}:{})});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Fa=function(){var e=Object(d.a)(Ia().mark((function e(t,r){var n,a,o,i,c,l,u,s,f;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.settings,a=t.search,o=a.sessionId,i=a.requestId,c=r.x1,l=r.x2,u=r.y1,s=r.y2,f={event:"region",data:{rect:{x:c,y:u,w:l-c,h:s-u}}},e.next=6,Pa(n,o,i,f);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Pa=function(){var e=Object(d.a)(Ia().mark((function e(t,r,n,a){var o;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=new Xe.a(t),!r||!n){e.next=10;break}return e.prev=2,e.next=5,o.sendFeedback(r,n,a).then((function(e){}));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.log("error sendFeedbackByApi321",e.t0);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t,r,n,a){return e.apply(this,arguments)}}();var Ha=Object(n.memo)((function(e){var t,r,o,i,c,l,u,s,f,h,d=e.dataItem,v=e.isHover,g=void 0!==v&&v,y=e.onSearchImage,w=e.handlerGroupItem,x=e.handlerFeedback,E=e.isGroupItem,O=e.handlerCloseGroup,j=e.main_image_link,C=e.indexItem,k=_e(),L=Object(n.useState)(""),S=Object(p.a)(L,2),N=S[0],R=S[1],I=Me((function(e){return e})),_=I.settings,M=Object(n.useState)(!1),T=Object(p.a)(M,2),F=T[0],P=T[1],H=Object(n.useState)(!1),A=Object(p.a)(H,2),G=A[0],B=A[1],z=Object(n.useState)("none"),D=Object(p.a)(z,2),V=D[0],q=D[1],U=Object(Kr.b)().t,W=d.sku,Z=d.collap,Y=d[_.field.productTag],K=Object(b.useMediaQuery)({query:"(max-width: 776px)"});Object(n.useEffect)((function(){j&&Q(j)}),[j]);var Q=function(e,t){t=t||5e3;var r=new Image;r.onerror=r.onabort=function(){clearTimeout(void 0),R("")},r.onload=function(){return clearTimeout(void 0),void R(e)},r.src=e};return a.a.createElement(m.a,{className:"wrap-main-item-result"},a.a.createElement(nn,{openModal:F,handleClose:function(e){P(!1)}},a.a.createElement(ba,{handlerCloseModal:function(){P(!1)},handlerFeedback:x,dataItem:d,onHandlerModalShare:function(){return B(!0)},onSearchImage:function(e){k(de(!0)),y(e)}})),a.a.createElement(Ca,{setModalState:B,dataItem:d,isOpen:G}),a.a.createElement(m.a,{className:"box-top"},E&&Z&&a.a.createElement(m.a,{className:"btn-show-result"},a.a.createElement(Te.a,{onClick:function(){w(d,C)}},U("Show group"),a.a.createElement(An.a,{style:{fontSize:"10px"}}))),E&&!Z&&a.a.createElement(m.a,{className:"btn-show-result"},a.a.createElement(Te.a,{onClick:function(){O(d,C)}},U("Close group"),a.a.createElement(An.a,{style:{fontSize:"10px"}}))),!g&&j&&a.a.createElement(m.a,{className:"box-icon-modal",onClick:function(){N.length>1&&y(j)}},a.a.createElement(ua,{width:16,height:16,color:"#AAABB5"})),a.a.createElement(m.a,{className:"box-image"},a.a.createElement(Te.a,{style:{width:"100%",height:"100%"},onClick:function(e){e.preventDefault(),Ma(I,C,d.sku),P(!0),k(ee(!0)),k(de(!0)),setTimeout((function(){k(de(!1))}),400)}},j?a.a.createElement("img",{src:j,key:j,alt:"image_item",className:"img-style",style:{width:"100%",height:"100%",objectFit:"contain"}}):a.a.createElement("img",{src:fa.a,alt:"image_item",className:"img-style",style:{width:"100%",height:"100%",objectFit:"cover"}})),g&&a.a.createElement(m.a,{className:"box-hover"},a.a.createElement(Te.a,null,"View item")))),a.a.createElement(m.a,{className:"box-content",display:"flex",style:{flexDirection:"column",backgroundColor:"#F3F3F5",flexGrow:1}},a.a.createElement(m.a,{className:"box-top"},a.a.createElement(Mn.a,{container:!0,justifyContent:"space-between"},a.a.createElement(Mn.a,{item:!0,xs:12},a.a.createElement(Wt.a,{title:W,placement:"top",arrow:!0,disableHoverListener:(null===W||void 0===W?void 0:W.length)<19||!W},a.a.createElement(Ut.a,{className:"text-f12 max-line-1 fw-400",style:{color:"#2B2C46",marginTop:12,display:"inline-block"}},a.a.createElement("span",{style:{marginRight:3}},_.itemIdLabel||"SKU",":"),tr(W,20))),_.warehouseVariant&&a.a.createElement(m.a,null,a.a.createElement(Ut.a,{className:"text-f12 max-line-1 fw-400",style:{color:"#2B2C46",display:"inline-block"}},a.a.createElement("span",{style:{marginRight:3}},d[_.field.warehouseStock],":"),a.a.createElement("span",{style:{color:d[_.field.warehouseStockValue]?"#00C070":"#c54545",fontWeight:600}},d[_.field.warehouseStockValue]||0))),(!!Y||!!_.brandName)&&a.a.createElement(Wt.a,{title:Y,placement:"top",arrow:!0,disableHoverListener:(null===Y||void 0===Y?void 0:Y.length)<22||!Y},a.a.createElement(m.a,{style:{background:"".concat(null===(t=_.theme)||void 0===t?void 0:t.secondaryColor,"26"),borderRadius:"6px",display:"flex",width:"fit-content",padding:"2px 5px",marginTop:3}},a.a.createElement(Ut.a,{className:"fw-700",style:{color:null===(r=_.theme)||void 0===r?void 0:r.secondaryColor,fontSize:10,letterSpacing:"1px",maxWidth:"160px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},tr(Y,22)||_.brandName)))))),a.a.createElement("div",null,a.a.createElement(Wt.a,{title:d[_.field.productName],placement:"top",arrow:!0,disableHoverListener:(null===(o=d[_.field.productName])||void 0===o?void 0:o.length)<45},a.a.createElement(m.a,{style:{boxShadow:"-2px 2px 4px rgba(170, 171, 181, 0.5)",height:40,background:"linear-gradient(270deg, ".concat(null===(i=_.theme)||void 0===i?void 0:i.primaryColor,"bb 0%, ").concat(null===(c=_.theme)||void 0===c?void 0:c.primaryColor," 100%)"),borderRadius:4,padding:"0px 8px",marginTop:"12px"},display:"flex",justifyItems:"center",alignItems:"center",justifyContent:"space-between"},a.a.createElement(m.a,{style:{display:"flex",justifyContent:"space-between",width:"100%",padding:0,cursor:d[null===(l=_.field)||void 0===l?void 0:l.ctaLinkField]?"pointer":"normal"},onClick:function(){Ta(I,C,d.sku),window.open("".concat(d[_.field.ctaLinkField]),"_blank")}},a.a.createElement(Ut.a,{className:"text-white max-line-2",style:{overflow:"hidden",textOverflow:"ellipsis",fontWeight:500,fontSize:"11px",letterSpacing:"0.27px",wordBreak:"break-all",maxWidth:!K&&d[null===(u=_.field)||void 0===u?void 0:u.ctaLinkField]?"136px":"164x",paddingRight:"8px"},align:"left"},tr(d[_.field.productName],45)),!K&&d[null===(s=_.field)||void 0===s?void 0:s.ctaLinkField]&&a.a.createElement("img",{src:Bn.a,alt:"more-info",width:20})))),_.warehouseVariant&&a.a.createElement(m.a,{display:"flex",justifyContent:"space-between",style:{color:"#2B2C46",marginTop:"12px"},gridGap:10},_.field.warehouseNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(f=_.theme)||void 0===f?void 0:f.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:10,fontWeight:500}},d[_.field.warehouseNumber]),a.a.createElement("div",{style:{fontSize:13,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},d[_.field.warehouseNumberValue]||"N/A")),_.field.warehouseShelfNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(h=_.theme)||void 0===h?void 0:h.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:10,fontWeight:500}},d[_.field.warehouseShelfNumber]),a.a.createElement("div",{style:{fontSize:13,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},d[_.field.warehouseShelfNumberValue]||"N/A"))),_.showFeedbackAndShare&&a.a.createElement(m.a,{className:"box-bottom",style:{marginBottom:6,marginTop:12}},a.a.createElement(Mn.a,{container:!0,justifyContent:_.shareOption?"space-between":"space-around",alignItems:"center"},a.a.createElement(Mn.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",style:{padding:"6px"},onClick:function(){x("like"),q("like")}},a.a.createElement(aa,{width:16,height:16,color:"like"===V?"#3E36DC":"#000000"})))),a.a.createElement(Mn.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{style:{padding:"6px"},className:"btn-item",onClick:function(){x("dislike"),q("dislike")}},a.a.createElement(Xn,{width:16,height:16,color:"dislike"===V?"#CC1854":"#000000"})))),_.shareOption&&a.a.createElement(Mn.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{style:{padding:"6px"},className:"btn-item",onClick:function(){return B(!0)}},a.a.createElement(Wn,{width:16,height:16,color:"#000000"})))))))))}));var Aa=Object(St.a)(Object(n.memo)((function(e){var t=e.allSearchResults,r=e.getUrlToCanvasFile,o=e.sendFeedBackAction,i=e.moreInfoText,c=e.searchQuery,l=e.requestImage,u=e.isSearchStalled,s=Me((function(e){return e})),f=s.search,d=s.settings,v=f.loadingSearchAlgolia,g=Object(n.useState)({}),y=Object(p.a)(g,2),b=y[0],w=y[1],x=Object(n.useState)([]),E=Object(p.a)(x,2),O=E[0],j=E[1],C=Object(n.useState)(!1),k=Object(p.a)(C,2),L=k[0],S=k[1];Object(n.useEffect)((function(){u&&S(!0)}),[u]),Object(n.useEffect)((function(){var e;if(null===t||void 0===t||null===(e=t.hits)||void 0===e?void 0:e.length){S(!1);var r=d.showGroup?N(null===t||void 0===t?void 0:t.hits):null===t||void 0===t?void 0:t.hits;j(r)}else j([])}),[null===t||void 0===t?void 0:t.hits,null===f||void 0===f?void 0:f.valueTextSearch]);var N=function(e){var t=[],r=[],n=e.map((function(e){return e.group_id?e:Object(h.a)(Object(h.a)({},e),{},{group_id:Object($e.uniqueId)("random-group-id")})})),a=Object($e.groupBy)(n,"group_id");return w(a),0===(t=Object.values(a)).length?e:(t.forEach((function(e){var t;e.length>=2?(t=Object(h.a)(Object(h.a)({},e[0]),{},{isGroup:!0,collap:!0}),r.push(t)):(t=Object(h.a)(Object(h.a)({},e[0]),{},{isGroup:!1,collap:null}),r.push(t))})),r)},R=Object(n.useMemo)((function(){return l||f.valueTextSearch.query||u?0!==O.length||v||u||!L&&!l?O.map((function(e,t){return a.a.createElement(m.a,{key:t},a.a.createElement(Ha,{dataItem:e,indexItem:t,isHover:!1,onSearchImage:function(e){r(e)},handlerFeedback:function(e){o(e)},handlerGroupItem:function(e,t){return function(e,t){var r=e.group_id,n=Object(ur.a)(O),a=n.slice(0,t+1);a.filter((function(e){return e.group_id===r}))[0].collap=!1;var o=n.slice(t+1,n.length),i=Object(ur.a)(b[r]);i.shift(),o=i.concat(o),j(a.concat(o))}(e,t)},handlerCloseGroup:function(e,t){return function(e,t){var r=e.group_id,n=Object(ur.a)(O),a=n.slice(0,t+1);a.filter((function(e){return e.group_id===r}))[0].collap=!0;var o=n.slice(t+1,n.length);o=o.filter((function(e){return e.group_id!==r})),j(a.concat(o))}(e,t)},isGroupItem:!!d.showGroup&&(null===e||void 0===e?void 0:e.isGroup),moreInfoText:i,main_image_link:e["image(main_similarity)"]||e.main_image_link}))})):a.a.createElement(m.a,{style:{marginTop:"50px",width:"100%",textAlign:"center"}},"No products were found matching your search criteria."):a.a.createElement(m.a,{style:{marginTop:"50px",width:"100%",textAlign:"center"}},"Please upload an image or enter a keyword to search.")}),[O,c,l,f.valueTextSearch,u,L,v]);return a.a.createElement(a.a.Fragment,null,R)}))),Ga=r(915),Ba=r(910),za=r(911);function Da(){Da=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return n(i,"_invoke",{value:x(e,r,c)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&r.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function x(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}var Va=Object(St.a)(Object(n.memo)((function(e){var t,r,o=_e(),i=Object(n.useRef)(null),c=Me((function(e){return e})),l=c.search,s=c.settings,f=l.requestImage,v=l.regions,g=l.selectedRegion,y=l.keyFilter,w=l.loadingSearchAlgolia,x=l.imageThumbSearchInput,E=null===s||void 0===s?void 0:s.productCtaText,O=Object(n.useState)(!1),j=Object(p.a)(O,2),C=j[0],k=j[1],L=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),S=Object(n.useState)(null),N=Object(p.a)(S,2),R=N[0],I=N[1],_=function(){return i.current.scrollIntoView("-100px")},M=Object(n.useState)(),T=Object(p.a)(M,2),F=T[0],P=T[1],H=Object(Kr.b)().t,A=Object(n.useState)(!1),G=Object(p.a)(A,2),B=G[0],z=G[1],D=Object(n.useState)(!1),V=Object(p.a)(D,2),q=V[0],Z=V[1],Y=Object(n.useRef)(null);Object(n.useEffect)((function(){if(!w&&(x.includes("blob:")||x.includes("data:"))&&Y.current!==x){z(!0);var e=setTimeout((function(){z(!1)}),2e3);return Y.current=x,function(){clearTimeout(e),z(!1)}}}),[x,w]),Object(n.useEffect)((function(){g&&I(g)}),[g]),Object(n.useEffect)((function(){f&&(_(),I(U))}),[f]);var K=Object(n.useCallback)(function(){var e=Object(d.a)(Da().mark((function e(t,r){var n;return Da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[{key:s.visualSearchFilterKey,values:["".concat(y)]}],o(X()),e.abrupt("return",at({image:t,settings:s,region:r,filters:y?n:void 0}).then((function(e){return o(de(!1)),Object(h.a)({},e)})).catch((function(e){o(de(!1)),console.log("error call api change selection find image",e)})));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),[s,o,y]),Q=Object(n.useCallback)(Object($e.debounce)(function(){var e=Object(d.a)(Da().mark((function e(t){var r;return Da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f){e.next=2;break}return e.abrupt("return");case 2:return o(de(!0)),r=f.canvas,K(r,t).then((function(e){o(he(e)),e.results.find((function(e){return e.score>=.65}))||Z(!0),setTimeout((function(){Z(!1)}),2e3)})),e.abrupt("return",o(ke()));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),250),[f,K]),J=function(){var e=Object(d.a)(Da().mark((function e(t){return Da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_a(c,"like"===t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=Object(d.a)(Da().mark((function e(t){var r,n,a,i;return Da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(de(!0)),L&&(_(),o(ee(!1))),o(Ce()),o(X()),o(ae(t)),e.next=7,tt(t);case 7:if(r=e.sent,o(ce(r)),n=void 0,!s.regions){e.next=17;break}return e.next=13,nt(r,s);case 13:a=e.sent,n=a.selectedRegion,o(ie(a.regions)),o(ue(n));case 17:i=[{key:s.visualSearchFilterKey,values:["".concat(y)]}],at({image:r,settings:s,region:n,filters:y?i:void 0}).then((function(e){o(le(e)),o(ke()),o(de(!1))}));case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=f?["sku:DOES_NOT_EXIST<score=1>"]:[],ne=(null===l||void 0===l?void 0:l.results)?null===l||void 0===l?void 0:l.results.slice().reverse().map((function(e,t){return"sku:'".concat(e.sku,"'<score=").concat(t,"> ")})):"",oe=[].concat(te,Object(ur.a)(ne)).join(" OR ");Object(n.useEffect)((function(){if(document.title="Search results",!f&&!Object($e.isEmpty)(l.valueTextSearch.query)){var e=y?"".concat(s.alogoliaFilterField,":'").concat(y,"'"):"";P(e)}}),[y,f,l.valueTextSearch.query,s.alogoliaFilterField]),Object(n.useEffect)((function(){if(f){o(de(!0));var e=f.canvas;return K(e).then((function(e){o(he(e))})),o(ke()),function(){}}}),[y]),Object(n.useEffect)((function(){if(f){var e=y?oe?"(".concat(oe,") AND ").concat(s.alogoliaFilterField,":'").concat(y,"'"):"".concat(s.alogoliaFilterField,":'").concat(y,"'"):oe;P(e)}}),[oe,s.alogoliaFilterField]);var se=Object(n.useCallback)(Object($e.debounce)((function(e){Fa(c,e),o(re(e)),Q(e)}),500),[Q,c.search]),fe=Object(n.useMemo)((function(){return v.map((function(e){return e.normalizedRect.x1===R.x1&&e.normalizedRect.x2===R.x2&&e.normalizedRect.y1===R.y1&&e.normalizedRect.y2===R.y2||0===R.x1&&1===R.x2&&0===R.y1&&1===R.y2?Object(h.a)(Object(h.a)({},e),{},{show:!1}):Object(h.a)(Object(h.a)({},e),{},{show:!0})}))}),[R,v]),pe=Object(n.useMemo)((function(){var t;return s.postFilterOption&&(null===(t=e.allSearchResults)||void 0===t?void 0:t.hits.length)>0}),[s.postFilterOption,null===(t=e.allSearchResults)||void 0===t?void 0:t.hits]),me=Object(n.useMemo)((function(){return f||s.postFilterOption&&pe}),[pe,s.postFilterOption,f]);return a.a.createElement("div",{className:"wrap-main-result loading",id:"wrap-main-result",ref:i},a.a.createElement(a.a.Fragment,null,F&&a.a.createElement(Ga.a,{query:l.valueTextSearch.query,filters:F}),a.a.createElement(m.a,{className:"box-wrap-result-component"},!L&&a.a.createElement("div",{className:"box-search"},a.a.createElement(on,null)),a.a.createElement(m.a,{className:"box-result"},a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,{className:"btn-open-support"},a.a.createElement(u.b,{to:"/support",style:{color:"#3E36DC"}},a.a.createElement("img",{src:Ur.a,alt:"",width:16,height:16}))),!L&&a.a.createElement(a.a.Fragment,null,me&&a.a.createElement(m.a,{className:"wrap-main-col-left ".concat(C?"toggle":"")},a.a.createElement(m.a,{className:"box-toggle-coloumn"},a.a.createElement(Te.a,{style:{color:"#55566b"},onClick:function(){k(!C)}},C?a.a.createElement(Cn.a,{style:{fontSize:30}}):a.a.createElement(bn.a,{style:{fontSize:20}}))),s.preview&&f&&a.a.createElement(m.a,{className:"col-left"},a.a.createElement(m.a,{className:"box-preview"},a.a.createElement(m.a,{className:"preview-item",style:{backgroundColor:"white",paddingTop:"40px",width:"100%"}},a.a.createElement("div",{style:{backgroundColor:"#AAABB5",width:"100%"}},a.a.createElement(Wr.Preview,{key:null===f||void 0===f?void 0:f.id,onSelectionChange:function(e){I(e),se(e)},image:null===f||void 0===f?void 0:f.canvas,selection:R||U,regions:fe,maxWidth:320,maxHeight:320,dotColor:"#FBD914",minCropWidth:60,minCropHeight:60})))),(q||B)&&a.a.createElement(m.a,{className:"box-title_col-left",alignItems:"center",style:{backgroundColor:"#3E36DC",display:"flex",columnGap:"6px",padding:"5px"}},a.a.createElement(yt,{color:"white"}),a.a.createElement(Ut.a,{style:{fontSize:10,color:"#fff"}},B?H("crop the image for better results"):"crop the image for better results"))),pe&&a.a.createElement(m.a,{className:"col-left__bottom"},a.a.createElement(Br,{disjunctiveFacets:e.allSearchResults.disjunctiveFacets})))),a.a.createElement(m.a,{className:"col-right ".concat(s.preview&&"ml-auto mr-auto"," ").concat(L&&"col-right-result-mobile"),style:{paddingTop:L?"16px":"40px"}},!L&&a.a.createElement(m.a,{className:"wrap-box-refinements"},a.a.createElement(_n,{statusSwitchButton:!0})),L&&s.preview&&f&&a.a.createElement(m.a,{className:"col-left",style:{backgroundColor:"#AAABB5",marginBottom:"15px"}},a.a.createElement(m.a,{className:"box-preview"},a.a.createElement(m.a,{className:"preview-item",style:{backgroundColor:"white"}},a.a.createElement(Wr.Preview,{key:null===f||void 0===f?void 0:f.id,onSelectionChange:function(e){I(e),se(e)},image:null===f||void 0===f?void 0:f.canvas,selection:R||U,regions:fe,maxWidth:240,maxHeight:240,dotColor:"#FBD914",minCropWidth:60,minCropHeight:60})),(q||B)&&a.a.createElement(m.a,{className:"box-title_col-left",alignItems:"center",style:{backgroundColor:"#3E36DC",display:"flex",columnGap:"6px",padding:"5px",width:"fit-content"}},a.a.createElement(yt,{color:"white"}),a.a.createElement(Ut.a,{style:{fontSize:10,color:"#fff"}},B?H("crop the image for better results"):"crop the image for better results")))),a.a.createElement(m.a,{className:"box-item-result ml-auto mr-auto"},a.a.createElement(Aa,{getUrlToCanvasFile:$,setLoading:!1,sendFeedBackAction:J,moreInfoText:E,requestImage:f,searchQuery:l.valueTextSearch.query}),a.a.createElement(m.a,{className:"pagination-result",style:{width:"100%",margin:"20px auto",padding:"0 20%"}},(null===(r=e.allSearchResults)||void 0===r?void 0:r.hits.length)>0&&(f||l.valueTextSearch.query)&&a.a.createElement(Ba.a,{showFirst:!1,translations:{previous:a.a.createElement(xn.a,{style:{color:"#161616"}}),next:a.a.createElement(On.a,{style:{color:"#161616"}})}})))))),!L&&a.a.createElement(m.a,null,a.a.createElement(m.a,{className:"box-notify"},a.a.createElement(Pn,{search:l},a.a.createElement(m.a,{display:"flex",style:{padding:"0 20px"},className:"box-change-hit-items"},a.a.createElement("span",{style:{paddingRight:"10px"}},H("Items per page"),":"),a.a.createElement(za.a,{items:W,defaultRefinement:20}))))))))}))),qa=["component","authed"],Ua=function(e){var t=e.component,r=e.authed,n=Object(s.a)(e,qa);return a.a.createElement(f.b,Object.assign({},n,{render:function(){return r?a.a.createElement(t,null):a.a.createElement(f.a,{to:"/login"})}}))};var Wa=Object(n.memo)((function(){return a.a.createElement(f.d,null,a.a.createElement(Vr,null,a.a.createElement(f.d,null,a.a.createElement(Ua,{authed:!0,exact:!0,strict:!0,path:"/",component:gn}),a.a.createElement(Ua,{authed:!0,exact:!0,strict:!0,path:"/result",component:Va}))))})),Za=(r(864),r(492)),Ya=function(){var e=Object(b.useMediaQuery)({query:"(max-width: 776px)"});return a.a.createElement(Sa.Toaster,{containerStyle:e?{bottom:80}:{top:60},position:e?"bottom-center":"top-right"},(function(e){return a.a.createElement(Sa.ToastBar,{toast:e,style:{padding:0,borderRadius:0}},(function(t){var r=t.icon;return a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{width:5,height:"100%",background:"success"===e.type?"#61d345":"transparent",marginRight:7}}),a.a.createElement("span",{style:{padding:15,display:"inline-flex"}},r,a.a.createElement("span",{style:{fontSize:15,fontWeight:300,margin:"0 10px"}}," ",Object(Sa.resolveValue)(e.message,e)),"loading"!==e.type&&a.a.createElement("span",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Nn.a,{fontSize:"small",style:{cursor:"pointer",marginLeft:10},onClick:function(){return Na.a.dismiss(e.id)}}))))}))}))};document.title=window.location.host;var Ka=Object(Za.a)({overrides:{MuiTooltip:{arrow:{color:"black"},tooltip:{backgroundColor:"black"}}}});i.a.render(a.a.createElement(n.Fragment,null,a.a.createElement(Ya,null),a.a.createElement(c.a,{store:Ie},a.a.createElement(l.a,{theme:Ka},a.a.createElement(u.a,null,a.a.createElement(Wa,null))))),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[504,1,2]]]);
|
|
3
|
+
//# sourceMappingURL=main.e9aec8a9.chunk.js.map
|