enqueueScripts([function(){ (window.webpackJsonpvtex_flex_layout_0_21_5=window.webpackJsonpvtex_flex_layout_0_21_5||[]).push([["Col"],[function(t,n){t.exports=React},function(t,n){t.exports=R},function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return a})),e.d(n,"c",(function(){return u}));var r,o=e(0),c=e.n(o);!function(t){t.NONE="none",t.ROW="row",t.COL="col"}(r||(r={}));var i=c.a.createContext({parent:r.NONE,colGap:0,rowGap:0}),a=function(t){var n=t.parent,e=t.colGap,r=t.rowGap,a=t.children,u=Object(o.useMemo)((function(){return{parent:n,colGap:e,rowGap:r}}),[n,e,r]);return c.a.createElement(i.Provider,{value:u},a)},u=function(){return Object(o.useContext)(i)}},function(t,n,e){"use strict";e.d(n,"d",(function(){return a})),e.d(n,"e",(function(){return l})),e.d(n,"c",(function(){return f})),e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return b}));var r,o=e(7),c=e(1),i=function(t,n){return t?Object(c.range)(0,12).map(String).includes(String(t))?"string"==typeof t?parseInt(t,10):t:(n&&console.warn("Invalid ".concat(n,' value ("').concat(t,'"). It should be an integer between 0 and ').concat(11,".")),0):0},a=function(t){var n=Object(c.toPairs)(t).map((function(t){var n=Object(o.a)(t,2),e=n[0],r=n[1];return[e,i(r,e)]}));return Object(c.fromPairs)(n)},u=function(t){if("string"!=typeof t)return null;if("grow"===t)return"grow";var n=t.match(new RegExp("(\\d*)(".concat(["%"].join("|"),")")));if(!n)return null;var e=n[1];return null==e?null:parseInt(e,10)},l=(r=u,function(t){return function(t){return t&&null!=t.mobile&&null!=t.desktop}(t)?{mobile:r(t.mobile),desktop:r(t.desktop)}:r(t)}),d=function(t){return function(n){var e=Object(c.pick)(Object.keys(t),n),r=a(e);return Object(c.toPairs)(r).map((function(n){var e=Object(o.a)(n,2),r=e[0],c=e[1];return"".concat(t[r]).concat(c)})).join(" ")}},f=d({paddingTop:"pt",paddingBottom:"pb",paddingLeft:"pl",paddingRight:"pr"}),p=d({marginTop:"mt",marginBottom:"mb",marginLeft:"ml",marginRight:"mr"}),s={top:"bt",right:"br",bottom:"bb",left:"bl",all:"ba"},b=function(t){var n=t.border,e=t.borderWidth,r=t.borderColor,o=n?[].concat(n).map((function(t){return s[t]})).join(" "):"",c=e?"bw".concat(i(e,"bw")):"",a=r?"b--".concat(r.split(" ")[0]):"";return"".concat(o," ").concat(c," ").concat(a)}},,function(t,n){t.exports=ReactIntl},function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},,,function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValues"]},,,,,,,,function(t,n,e){"use strict";e.r(n),function(t){var n=e(4);e.p=Object(n.getPublicPath)("vtex.flex-layout@0.21.5");var r=Object(n.register)((function(){return e(18)}),t,"vtex.flex-layout@0.21.5","vtex.flex-layout@0.x","Col");r.renderHotReload,r.setupHMR}.call(this,e(10)(t))},function(t,n,e){"use strict";e.r(n);var r,o,c=e(11),i=e(0),a=e.n(i),u=e(5),l=e(9),d=e.n(l),f=e(6),p=e.n(f),s=e(2),b=e(3),m=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);ot.length)&&(n=t.length);for(var e=0,r=new Array(n);e0?{cleanUrl:c[0],vParam:a}:{cleanUrl:e}}(e),i=r.vParam,c=r.cleanUrl;return i?"".concat(c,"-").concat(n,"-").concat(t,"?v=").concat(i):"".concat(c,"-").concat(n,"-").concat(t)}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){"number"==typeof n&&(n=Math.min(n,3e3)),"number"==typeof t&&(t=Math.min(t,4e3));var r=o(e,n,t),i=r.includes("?")?"&":"?";return"".concat(r).concat(i,"width=").concat(n,"&height=").concat(t,"&aspect=true")}}function s(e){return e.commertialOffer.Price}function f(e){var n=e.commertialOffer.AvailableQuantity;return null!=n&&n>0}function d(e,n){var t=e.filter(v);if(0===t.length)return e[0];if(1===t.length)return t[0];var r=t.map((function(e){return function(e,n){var t=e.sellers;if(1===t.length)return t[0].commertialOffer.Price;var r=t.filter(f).map(s);return"highest"===n?r.reduce((function(e,n){return n>e?n:e})):r.reduce((function(e,n){return nr[e]?t:e}),0):r.reduce((function(e,n,t){return n1&&void 0!==arguments[1]?arguments[1]:"FIRST_AVAILABLE",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;if(!e)return null;var l,s=Object.assign({},e),f=s.items||[],d=s.properties||[],m=null!==(n=d.find((function(e){return"DefaultSKUSelected"===e.name})))&&void 0!==n?n:null;if(l=1===f.length?f[0]:m?p(f,m.values,a):h(f,a)){var v=null!==(t=Object(c.a)(null==l?void 0:l.sellers))&&void 0!==t?t:P,_=null!==(i=null==l?void 0:l.referenceId)&&void 0!==i?i:[],E=Object(r.a)(_,1),S=E[0],y=void 0===S?O:S,A=null!==(u=null==l?void 0:l.images)&&void 0!==u?u:[],I=A.map((function(e){return Object.assign(Object.assign({},e),{imageUrl:b(e.imageUrl,o)})})),j=Object(r.a)(I,1),L=j[0],w=void 0===L?g:L;s.sku=Object.assign(Object.assign({},l),{seller:v,referenceId:y,image:w,images:I})}return s}},49:function(e,n,t){"use strict";t.r(n),t.d(n,"PRODUCT_LIST_PLACEMENT",(function(){return g}));var r=t(0),i=t.n(r),c=t(50),u=t.n(c),a=t(51),o=t.n(a),l=t(21),s=t.n(l),f=t(8),d=t(52),m=t.n(d);var v=function(){return m()(),null},p=t(22),h=s.a.ProductListProvider,g="home_shelf";function O(e){var n=e.children,t=e.products,c=e.ProductSummary,a=e.listName,l=e.actionOnProductClick,s=e.preferredSKU,d=o()().list,m=Object(f.useTreePath)().treePath,v=Object(r.useMemo)((function(){var e=null==t?void 0:t.map((function(e,n){var t=Object(p.b)(e,s),r=d.length+n+1,u=function(){"function"==typeof l&&l(t,{position:r})};return"function"==typeof c?i.a.createElement(c,{key:t.cacheId,product:t,listName:a,actionOnClick:u,position:r,placement:g}):i.a.createElement(f.ExtensionPoint,{id:"product-summary",key:e.cacheId,treePath:m,product:t,listName:a,actionOnClick:u,position:r,placement:g})}));return d.concat(null!=e?e:[])}),[t,d,s,c,m,a,l]);return i.a.createElement(u.a,{list:v},n)}n.default=function(e){var n=e.children,t=e.products,r=e.listName,c=e.ProductSummary,u=e.actionOnProductClick,a=e.preferredSKU;return i.a.createElement(h,{listName:null!=r?r:""},i.a.createElement(O,{preferredSKU:a,products:t,listName:r,ProductSummary:c,actionOnProductClick:u},n),i.a.createElement(v,null))}}}]); },function(){ (window.webpackJsonpvtex_product_summary_2_90_7=window.webpackJsonpvtex_product_summary_2_90_7||[]).push([["ProductSummaryList"],{0:function(t,e){t.exports=React},109:function(t,e,r){"use strict";r.r(e);var i=r(31),o=r.n(i),n=r(36),a=r(11),s=r(0),u=r.n(s),d=r(29),c=r(70),m=r.n(c),p=r(71),l=r.n(p),y=r(72),S=r.n(y),_=r(2),v=r(8),E=r(49),L=function(){var t=Object(v.useRuntime)().rootPath;return{getShippingOptionFromSession:Object(s.useCallback)(Object(n.a)(o.a.mark((function e(){var r,i,n,a,s,u,d,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=new Headers).append("Content-Type","application/json"),u={method:"GET",headers:s,redirect:"follow"},e.next=5,fetch("".concat(null!=t?t:"","/api/sessions?items=public.shippingOption"),u);case 5:return d=e.sent,e.next=8,d.json();case 8:if(c=e.sent,null===(n=null===(i=null===(r=null==c?void 0:c.namespaces)||void 0===r?void 0:r.public)||void 0===i?void 0:i.shippingOption)||void 0===n?void 0:n.value){e.next=11;break}return e.abrupt("return",null);case 11:return e.abrupt("return",null===(a=JSON.parse(c.namespaces.public.shippingOption.value))||void 0===a?void 0:a.map((function(t){return t.value})));case 12:case"end":return e.stop()}}),e)}))),[t])}},f={RELEVANCE:{name:"admin/editor.productSummaryList.orderType.relevance",value:""},TOP_SALE_DESC:{name:"admin/editor.productSummaryList.orderType.sales",value:"OrderByTopSaleDESC"},PRICE_DESC:{name:"admin/editor.productSummaryList.orderType.priceDesc",value:"OrderByPriceDESC"},PRICE_ASC:{name:"admin/editor.productSummaryList.orderType.priceAsc",value:"OrderByPriceASC"},NAME_ASC:{name:"admin/editor.productSummaryList.orderType.nameAsc",value:"OrderByNameASC"},NAME_DESC:{name:"admin/editor.productSummaryList.orderType.nameDesc",value:"OrderByNameDESC"},RELEASE_DATE_DESC:{name:"admin/editor.productSummaryList.orderType.releaseDate",value:"OrderByReleaseDateDESC"},BEST_DISCOUNT_DESC:{name:"admin/editor.productSummaryList.orderType.discount",value:"OrderByBestDiscountDESC"}};function x(t){if(!v.canUseDOM)return null;for(var e="".concat(t,"="),r=decodeURIComponent(document.cookie).split(";"),i=0;i0?o.sku.seller=null!==(r=o.sku.sellers.find((function(e){return e.sellerDefault})))&&void 0!==r?r:o.sku.sellers[0]:o.sku.seller={commertialOffer:{Price:0,ListPrice:0}},o.sku.image=t.sku.image,n(o)}}})},S=r(38),R=r.n(S),T=r(61),j=r.n(T),k=g.a.useProductSummaryDispatch;var L=function(){var e,t=(null!==(e=R()())&&void 0!==e?e:{}).selectedItem,r=k(),n=j()();return function(e){var i=t&&e.items.find((function(e){return e.itemId===t.itemId}));r({type:"SET_PRODUCT",args:{product:e}}),null==n||n({type:"SET_PRODUCT",args:{product:e}}),null==n||n({type:"SET_SELECTED_ITEM",args:{item:i}})}};var D=function(e){var t=e.product,r=e.inView,n=e.children,i=e.priceBehavior,a=g.a.useProductSummaryDispatch(),o=L();return C({product:t,inView:r,priceBehavior:i,onError:function(){a({type:"SET_PRICE_LOADING",args:{isPriceLoading:!1}})},onComplete:function(e){o(e),a({type:"SET_PRICE_LOADING",args:{isPriceLoading:!1}})}}),c.a.createElement(c.a.Fragment,null,n)},w=r(32),A=r.n(w),M=["sponsoredBadgeContainer","sponsoredBadgeText"],B=function(e){var t=e.label,r=void 0===t?"store/sponsoredBadge.title":t,n=s()(M).handles,i=a()(n.sponsoredBadgeContainer,"absolute z-1"),o=a()(n.sponsoredBadgeText,"c-muted-1 t-mini-s");return c.a.createElement("div",{className:i},c.a.createElement("span",{className:o},c.a.createElement(A.a,{id:r})))},V=function(e){var t,r=e.product,n=e.position,i=e.placement;if(!(null===(t=r.advertisement)||void 0===t?void 0:t.adId))return{};var a=r.productId,o=r.productName,c=r.advertisement;return{"data-van-prod-id":a,"data-van-prod-name":o,"data-van-position":n,"data-van-aid":c.adId,"data-van-cid":c.campaignId,"data-van-req-id":c.adRequestId,"data-van-res-id":c.adResponseId,"data-van-cpc":c.actionCost,"data-van-placement":i}},U=r(22),H=r(39),q=g.a.ProductSummaryProvider,Q=g.a.useProductSummaryDispatch,W=g.a.useProductSummary,F=["container","containerNormal","element","clearLink"];function G(e){var t,r,i=e.product,u=e.actionOnClick,l=e.children,m=e.href,p=e.priceBehavior,_=void 0===p?"default":p,g=e.placement,x=e.position,b=e.classes,I=W(),P=I.isLoading,y=I.isHovering,N=I.selectedItem,C=I.listName,S=I.query,R=I.inView,T=I.sponsoredBadge,j=Q(),k=s()(F,{classes:b}).handles,L=v.a.useProductListDispatch(),w=v.a.useProductListState(),A="autocomplete-result-list"===(null==w?void 0:w.listName),M=Object(o.useRef)(null),U=Object(o.useCallback)((function(){null==L||L({type:"SEND_IMPRESSION",args:{product:i,position:x}}),j({type:"SET_IN_VIEW",args:{inView:!0}})}),[j,L,i,x]);d()({ref:M,once:!0,onView:U}),Object(o.useEffect)((function(){i&&j({type:"SET_PRODUCT",args:{product:i}})}),[i,j]),Object(o.useEffect)((function(){x&&j({type:"SET_POSITION",args:{position:x}})}),[x,j]);var q=Object(o.useCallback)((function(){j({type:"SET_HOVER",args:{isHovering:!1}})}),[j]),G=Object(o.useCallback)((function(){j({type:"SET_HOVER",args:{isHovering:!0}})}),[j]),J=Object(o.useCallback)((function(e){j({type:"SET_LOADING",args:{isLoading:e}})}),[j]),z=Object(o.useMemo)((function(){return{product:i,isLoading:P,isHovering:y,handleItemsStateUpdate:J}}),[i,P,y,J]),K=a()(k.container,k.containerNormal,"overflow-hidden br3 h-100 w-100 flex flex-column justify-between center tc"),X=a()(k.element,"pointer pt3 pb4 flex flex-column h-100"),Y=a()(k.clearLink,"h-100 flex flex-column"),Z=null!==(t=null==N?void 0:N.itemId)&&void 0!==t?t:null===(r=null==i?void 0:i.sku)||void 0===r?void 0:r.itemId,$=m?{to:m,onClick:A?u:void 0,onClickCapture:A?void 0:u,"aria-label":"View product details for ".concat((null==i?void 0:i.productName)||"product")}:{page:"store.product",params:{slug:null==i?void 0:i.linkText,id:null==i?void 0:i.productId,__listName:C},query:S,onClick:A?u:void 0,onClickCapture:A?void 0:u,"aria-label":"View product details for ".concat((null==i?void 0:i.productName)||"product")},ee=V({product:i,position:x,placement:g}),te=Object(H.a)(i,null==T?void 0:T.position,"containerTopLeft"),re=Object(O.useIntl)();return c.a.createElement(h.default.Provider,{value:z},c.a.createElement(f.a,{product:i,query:{skuId:Z}},c.a.createElement(D,{product:i,inView:R,priceBehavior:_},c.a.createElement("section",Object(n.a)({"aria-label":re.formatMessage({id:"store/product-summary.shelf.aria-label"},{productName:i.productName}),className:K,onMouseEnter:G,onMouseLeave:q,style:{maxWidth:300},ref:M},ee),c.a.createElement(E.Link,Object(n.a)({className:Y},$),c.a.createElement("article",{className:X},te?c.a.createElement(B,{label:null==T?void 0:T.label}):null,l))))))}function J(e){var t=e.product,r=e.actionOnClick,n=e.href,i=e.priceBehavior,a=void 0===i?"default":i,o=e.trackListName,u=void 0===o||o,s=e.listName,l=e.position,d=e.sponsoredBadgePosition,m=e.sponsoredBadgeLabel,f=e.placement,p=e.classes,v=e.children,_={position:d,label:m};return c.a.createElement(q,{product:t,listName:u?s:void 0,sponsoredBadge:_,isPriceLoading:"async"===a||"asyncOnly1P"===a},c.a.createElement(G,{product:t,href:n,actionOnClick:r,priceBehavior:a,position:l,placement:f,classes:p},v))}J.schema={title:"admin/editor.productSummary.title",description:"admin/editor.productSummary.description"},J.mapCatalogProductToProductSummary=U.b;t.default=J},20:function(e,t,r){"use strict";function n(e){if(e&&0!==e.length){var t=e.find((function(e){return e.sellerDefault}));return t||e[0]}}r.d(t,"a",(function(){return n}))},21:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-list-context@0.x/ProductListContext"]},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return x}));var n=r(11),i=r(37),a=r(20),o=new RegExp(/.+ids\/(\d+)/),c=new RegExp(/http:\/\//);function u(e,t,r){if(!e.includes("/arquivos/ids/"))return e;var n=function(e){var t,r,n,i,a=o.exec(e),c=(r="v",null===(i=null!==(n=null==(t=e)?void 0:t.split("".concat(r,"="))[1])&&void 0!==n?n:"")||void 0===i?void 0:i.split("&")[0]);return a&&a.length>0?{cleanUrl:a[0],vParam:c}:{cleanUrl:e}}(e),i=n.vParam,a=n.cleanUrl;return i?"".concat(a,"-").concat(t,"-").concat(r,"?v=").concat(i):"".concat(a,"-").concat(t,"-").concat(r)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){"number"==typeof t&&(t=Math.min(t,3e3)),"number"==typeof r&&(r=Math.min(r,4e3));var n=u(e,t,r),i=n.includes("?")?"&":"?";return"".concat(n).concat(i,"width=").concat(t,"&height=").concat(r,"&aspect=true")}}function l(e){return e.commertialOffer.Price}function d(e){var t=e.commertialOffer.AvailableQuantity;return null!=t&&t>0}function m(e,t){var r=e.filter(p);if(0===r.length)return e[0];if(1===r.length)return r[0];var n=r.map((function(e){return function(e,t){var r=e.sellers;if(1===r.length)return r[0].commertialOffer.Price;var n=r.filter(d).map(l);return"highest"===t?n.reduce((function(e,t){return t>e?t:e})):n.reduce((function(e,t){return tn[e]?r:e}),0):n.reduce((function(e,t,r){return t1&&void 0!==arguments[1]?arguments[1]:"FIRST_AVAILABLE",u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;if(!e)return null;var s,l=Object.assign({},e),d=l.items||[],m=l.properties||[],f=null!==(t=m.find((function(e){return"DefaultSKUSelected"===e.name})))&&void 0!==t?t:null;if(s=1===d.length?d[0]:f?v(d,f.values,c):_(d,c)){var p=null!==(r=Object(a.a)(null==s?void 0:s.sellers))&&void 0!==r?r:O,x=null!==(i=null==s?void 0:s.referenceId)&&void 0!==i?i:[],b=Object(n.a)(x,1),I=b[0],P=void 0===I?E:I,y=null!==(o=null==s?void 0:s.images)&&void 0!==o?o:[],N=y.map((function(e){return Object.assign(Object.assign({},e),{imageUrl:h(e.imageUrl,u)})})),C=Object(n.a)(N,1),S=C[0],R=void 0===S?g:S;l.sku=Object.assign(Object.assign({},s),{seller:p,referenceId:P,image:R,images:N})}return l}},29:function(e,t){e.exports=ReactApollo},32:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/IOMessage"]},38:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]},39:function(e,t,r){"use strict";t.a=function(e,t,r){var n;return!!(null===(n=null==e?void 0:e.advertisement)||void 0===n?void 0:n.adId)&&t===r}},44:function(e,t,r){"use strict";r.r(t);var n=r(0),i=r.n(n),a=i.a.createContext(void 0),o=a.Consumer;a.Consumer=function(e){return console.error("If you are seeing this, a component it's using ProductSummaryContext from vtex.product-summary, which is deprecated. Please see the issue https://github.com/vtex-apps/store-issues#28 on how to migrate to the new component."),i.a.createElement(o,e)},t.default=a},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},58:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.on-view@1.x/useOnView"]},59:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContextProvider"]},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},60:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/QueryItemsWithSimulation"]},61:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProductDispatch"]},7:function(e,t){e.exports=Classnames},8:function(e,t){e.exports=__RENDER_8_RUNTIME__},85:function(e,t,r){"use strict";r.r(t),function(e){var t=r(4);r.p=Object(t.getPublicPath)("vtex.product-summary@2.90.7");var n=Object(t.register)((function(){return r(105)}),e,"vtex.product-summary@2.90.7","vtex.product-summary@2.x","ProductSummaryCustom");n.renderHotReload,n.setupHMR}.call(this,r(13)(e))}},[[85,"common"]]]); },function(){ (window.webpackJsonpvtex_product_summary_2_90_7=window.webpackJsonpvtex_product_summary_2_90_7||[]).push([["ProductSummaryImage"],{0:function(e,t){e.exports=React},10:function(e,t){e.exports=ReactIntl},108:function(e,t,r){"use strict";r.r(t);var a=r(11),i=r(0),n=r.n(i),o=r(40),u=r.n(o),c=r(41),l=r.n(c),m=r(7),s=r.n(m),d=r(53),p=r.n(d),v=r(63),g=r.n(v),h=r(5),f=r.n(h),x=r(38),y=r.n(x),b=r(6),C=r.n(b),I=r(10),E=r(42),_=r(3),w=r.n(_),S=r(22),N=function(e,t,r,i){var n,o=t,u="auto";return i&&"auto"!==i?(u=t*(null!==(n=function(e){if(!e)return null;if("string"==typeof e){if("auto"===e)return null;var t=e.split(":");if(2!==t.length)return null;var r=Object(a.a)(t,2),i=r[0],n=r[1],o=parseFloat(n)/parseFloat(i);return"number"!=typeof o||Number.isNaN(o)?null:o}return"number"==typeof e?e:null}(i))&&void 0!==n?n:1),o>r&&(u/=o/r,o=r),u>r&&(o/=u/r,u=r),o=Math.round(o),u=Math.round(u)):o=Math.min(r,o),Object(S.a)(e,o,u)},P=C.a.useProductSummary,O=["image","imageWrapper","imageContainer","product","imagePlaceholder","mainImageHovered"];function R(e){var t=e.src,r=e.width,a=e.height,i=e.dpi,n=e.aspectRatio;return r||a?Object(S.a)(t,r*i,a*i):n?N(t,300,500,n):t}function L(e){var t=e.images,r=e.hoverImage,a=e.hoverImageLabel,i=null!=r?r:{},n=i.criteria,o=void 0===n?"label":n,u=i.label,c=void 0===u?a:u,l=i.labelMatchCriteria,m=void 0===l?"exact":l,s=i.index;return"label"===o?j(t,c,m):"index"===o?function(e,t){return null==t||Number.isNaN(t)?null:e[t]}(t,s):null}function B(e){var t=e.width,r=e.height,a=e.aspectRatio,i=e.maxHeight;return t||r?{width:"100%",height:r,objectFit:"contain",maxHeight:"unset",maxWidth:t}:a||i?{width:"100%",height:"100%",objectFit:"contain",maxHeight:null!=i?i:"unset"}:void 0}function M(e){var t=e.showCollections,r=e.productClusters,a=e.children;if(!t||!r||0===r.length)return n.a.createElement(n.a.Fragment,null,a);var i=r.map((function(e){return e.name}));return n.a.createElement(u.a,{collectionBadgesText:i},a)}function H(e){var t=e.showBadge,r=e.commertialOffer,a=e.badgeText,i=e.children;return t?n.a.createElement(l.a,{listPrice:r.ListPrice,sellingPrice:r.Price,label:a},i):n.a.createElement(n.a.Fragment,null,i)}function j(e,t,r){return t?"contains"===r?e.find((function(e){var r=e.imageLabel;return null==r?void 0:r.includes(t)})):e.find((function(e){return e.imageLabel===t})):null}function k(e){var t=e.src,r=e.width,a=e.height,i=e.onError,o=e.alt,u=e.className,c=e.aspectRatio,l=e.maxHeight,m=e.fetchpriority,s=void 0===m?"auto":m,d=p()().isMobile?2:1;return n.a.createElement("img",{src:R({src:t,width:r,height:a,dpi:d,aspectRatio:c}),style:B({width:r,height:a,aspectRatio:c,maxHeight:l}),loading:"low"===s?"lazy":"eager",alt:o,className:u,onError:i,fetchpriority:s})}function T(e){var t,r,o,u,c,l,m,d,v,h=e.showBadge,x=void 0===h||h,b=e.badgeText,C=e.displayMode,_=void 0===C?"normal":C,S=e.mainImageLabel,N=void 0===S?"":S,R=e.hoverImageLabel,B=void 0===R?"":R,T=e.hoverImage,A=e.showCollections,F=void 0!==A&&A,U=e.placeholder,D=e.width,W=e.height,V=e.aspectRatio,K=e.maxHeight,q=e.classes,z=e.fetchpriority,J=void 0===z?"byPosition":z,Z=P(),Q=Z.product,G=Z.position,X=f()(O,{classes:q}),Y=X.handles,$=X.withModifiers,ee=Object(I.useIntl)(),te=Object(i.useState)(!1),re=Object(a.a)(te,2),ae=re[0],ie=re[1],ne=function(){return ie(!0)},oe=p()().isMobile,ue=(null!==(t=y()())&&void 0!==t?t:{}).skuSelector,ce=(ue=void 0===ue?{}:ue).selectedImageVariationSKU,le=null!=Q?Q:{},me=le.productClusters,se=le.productName,de=null==Q?void 0:Q.sku,pe=g()({widthProp:D,heightProp:W,aspectRatioProp:V,maxHeightProp:K}),ve=pe.widthProp,ge=pe.heightProp,he=pe.aspectRatioProp,fe=pe.maxHeightProp,xe=s()(w.a.imageContainer,Y.imageWrapper,"inline"!==_&&"db w-100 center"),ye=[parseFloat(null!==(r=null!=ve?ve:ge)&&void 0!==r?r:0),parseFloat(null!==(o=null!=ge?ge:ve)&&void 0!==o?o:0)],be=ye[0],Ce=ye[1],Ie=s()(w.a.imageStackContainer,!oe&&w.a.hoverEffect),Ee=s()("dib relative",Y.imageContainer,Ie),_e=null!==(c=null===(u=null==de?void 0:de.image)||void 0===u?void 0:u.imageUrl)&&void 0!==c?c:"",we=!_e||ae;if(!U&&we)return n.a.createElement("div",{className:xe},n.a.createElement("div",{className:Ee},n.a.createElement(E.a,{cssHandle:Y.imagePlaceholder})));var Se=null!==(l=null==de?void 0:de.images)&&void 0!==l?l:[],Ne=L({images:Se,hoverImage:T,hoverImageLabel:B});if(null==ce&&N){var Pe="string"==typeof N?j(Se,N):j(Se,N.label,N.labelMatchCriteria);Pe&&(_e=Pe.imageUrl)}var Oe=s()("inline"===_?w.a.imageInline:w.a.imageNormal),Re=null!==(v=null===(d=null===(m=Q.sku)||void 0===m?void 0:m.seller)||void 0===d?void 0:d.commertialOffer)&&void 0!==v?v:{},Le=s()(Oe,Y.image,Boolean(Ne)&&Y.mainImageHovered),Be=s()("w-100 h-100 dn absolute top-0 left-0 z-999",$("image","hover"),Oe,!oe&&w.a.hoverImage),Me=function(e,t){return t?e?1===t?"high":"low":t<3?"high":"low":"low"};return n.a.createElement("div",{className:xe,"aria-label":ee.formatMessage({id:"store/product-summary.image.aria-label"},{productName:Q.productName})},n.a.createElement(M,{showCollections:F,productClusters:me},n.a.createElement(H,{showBadge:x,commertialOffer:Re,badgeText:b},n.a.createElement("div",{className:Ee},n.a.createElement(k,{src:we?U:_e,width:be,height:Ce,aspectRatio:he,maxHeight:fe,alt:se,className:Le,onError:ne,fetchpriority:"byPosition"===J?Me(oe,G):J}),Ne&&!oe&&n.a.createElement(k,{src:Ne.imageUrl,width:be,height:Ce,aspectRatio:he,maxHeight:fe,alt:se,className:Be,onError:ne,fetchpriority:"byPosition"===J?Me(oe,G):J})))))}T.schema={title:"admin/editor.productSummaryImage.title",description:"admin/editor.productSummaryImage.description",type:"object",properties:{showBadge:{type:"boolean",title:"admin/editor.productSummary.showBadge.title",default:!0,isLayout:!0},showCollections:{type:"boolean",title:"admin/editor.productSummary.showCollections.title",default:!1,isLayout:!0},displayMode:{title:"admin/editor.productSummary.displayMode.title",type:"string",enum:["normal","inline"],default:"normal",isLayout:!0},hoverImageLabel:{title:"admin/editor.productSummaryImage.hoverImageLabel.title",description:"admin/editor.productSummaryImage.hoverImageLabel.description",type:"string",default:"",isLayout:!1},hoverImage:{type:"object",properties:{criteria:{title:"admin/editor.productSummaryImage.hoverImage.criteria.title",enum:["index","label"]}},dependencies:{criteria:{oneOf:[{properties:{criteria:{enum:["index"]},index:{title:"admin/editor.productSummaryImage.hoverImage.criteria.index",type:"number"}}},{properties:{criteria:{enum:["label"]},label:{title:"admin/editor.productSummaryImage.hoverImage.criteria.label",type:"string"},labelMatchCriteria:{title:"admin/editor.productSummaryImage.hoverImage.criteria.matchCriteria",widget:{"ui:widget":"radio"},type:"string",enum:["exact","contains"],default:"exact"}}}]}}},fetchpriority:{title:"admin/editor.productSummaryImage.fetchpriority.title",enum:["high","low","auto","byPosition"],enumNames:["admin/editor.productSummaryImage.fetchpriority.high","admin/editor.productSummaryImage.fetchpriority.low","admin/editor.productSummaryImage.fetchpriority.auto","admin/editor.productSummaryImage.fetchpriority.byPosition"],widget:{"ui:widget":"radio"},default:"byPosition"}}};t.default=T},20:function(e,t,r){"use strict";function a(e){if(e&&0!==e.length){var t=e.find((function(e){return e.sellerDefault}));return t||e[0]}}r.d(t,"a",(function(){return a}))},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return C}));var a=r(11),i=r(37),n=r(20),o=new RegExp(/.+ids\/(\d+)/),u=new RegExp(/http:\/\//);function c(e,t,r){if(!e.includes("/arquivos/ids/"))return e;var a=function(e){var t,r,a,i,n=o.exec(e),u=(r="v",null===(i=null!==(a=null==(t=e)?void 0:t.split("".concat(r,"="))[1])&&void 0!==a?a:"")||void 0===i?void 0:i.split("&")[0]);return n&&n.length>0?{cleanUrl:n[0],vParam:u}:{cleanUrl:e}}(e),i=a.vParam,n=a.cleanUrl;return i?"".concat(n,"-").concat(t,"-").concat(r,"?v=").concat(i):"".concat(n,"-").concat(t,"-").concat(r)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){"number"==typeof t&&(t=Math.min(t,3e3)),"number"==typeof r&&(r=Math.min(r,4e3));var a=c(e,t,r),i=a.includes("?")?"&":"?";return"".concat(a).concat(i,"width=").concat(t,"&height=").concat(r,"&aspect=true")}}function m(e){return e.commertialOffer.Price}function s(e){var t=e.commertialOffer.AvailableQuantity;return null!=t&&t>0}function d(e,t){var r=e.filter(v);if(0===r.length)return e[0];if(1===r.length)return r[0];var a=r.map((function(e){return function(e,t){var r=e.sellers;if(1===r.length)return r[0].commertialOffer.Price;var a=r.filter(s).map(m);return"highest"===t?a.reduce((function(e,t){return t>e?t:e})):a.reduce((function(e,t){return ta[e]?r:e}),0):a.reduce((function(e,t,r){return t1&&void 0!==arguments[1]?arguments[1]:"FIRST_AVAILABLE",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;if(!e)return null;var l,m=Object.assign({},e),s=m.items||[],d=m.properties||[],p=null!==(t=d.find((function(e){return"DefaultSKUSelected"===e.name})))&&void 0!==t?t:null;if(l=1===s.length?s[0]:p?g(s,p.values,u):h(s,u)){var v=null!==(r=Object(n.a)(null==l?void 0:l.sellers))&&void 0!==r?r:y,C=null!==(i=null==l?void 0:l.referenceId)&&void 0!==i?i:[],I=Object(a.a)(C,1),E=I[0],_=void 0===E?x:E,w=null!==(o=null==l?void 0:l.images)&&void 0!==o?o:[],S=w.map((function(e){return Object.assign(Object.assign({},e),{imageUrl:b(e.imageUrl,c)})})),N=Object(a.a)(S,1),P=N[0],O=void 0===P?f:P;m.sku=Object.assign(Object.assign({},l),{seller:v,referenceId:_,image:O,images:S})}return m}},3:function(e,t,r){e.exports={containerInline:"vtex-product-summary-2-x-containerInline",imageContainer:"vtex-product-summary-2-x-imageContainer",container:"vtex-product-summary-2-x-container",containerSmall:"vtex-product-summary-2-x-containerSmall",containerInlinePrice:"vtex-product-summary-2-x-containerInlinePrice",information:"vtex-product-summary-2-x-information",element:"vtex-product-summary-2-x-element",image:"vtex-product-summary-2-x-image",buyButtonContainer:"vtex-product-summary-2-x-buyButtonContainer",buyButton:"vtex-product-summary-2-x-buyButton",description:"vtex-product-summary-2-x-description",quantityStepperContainer:"vtex-product-summary-2-x-quantityStepperContainer",imageInline:"vtex-product-summary-2-x-imageInline",isHidden:"vtex-product-summary-2-x-isHidden",containerNormal:"vtex-product-summary-2-x-containerNormal",nameContainer:"vtex-product-summary-2-x-nameContainer",clearLink:"vtex-product-summary-2-x-clearLink",aspectRatio:"vtex-product-summary-2-x-aspectRatio",priceContainer:"vtex-product-summary-2-x-priceContainer",SKUSelectorContainer:"vtex-product-summary-2-x-SKUSelectorContainer",attachmentListContainer:"vtex-product-summary-2-x-attachmentListContainer",attachmentItemContainer:"vtex-product-summary-2-x-attachmentItemContainer",imageNormal:"vtex-product-summary-2-x-imageNormal",addToListBtn:"vtex-product-summary-2-x-addToListBtn",imagePlaceholder:"vtex-product-summary-2-x-imagePlaceholder",attachmentChildrenContainer:"vtex-product-summary-2-x-attachmentChildrenContainer",imageStackContainer:"vtex-product-summary-2-x-imageStackContainer",hoverEffect:"vtex-product-summary-2-x-hoverEffect",hoverImage:"vtex-product-summary-2-x-hoverImage",mainImageHovered:"vtex-product-summary-2-x-mainImageHovered",priceSpinner:"vtex-product-summary-2-x-priceSpinner",spin:"vtex-product-summary-2-x-spin",sponsoredBadgeContainer:"vtex-product-summary-2-x-sponsoredBadgeContainer",sponsoredBadgeText:"vtex-product-summary-2-x-sponsoredBadgeText"}},38:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]},40:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/CollectionBadges"]},41:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/DiscountBadge"]},42:function(e,t,r){"use strict";var a=r(0),i=r.n(a);t.a=function(e){var t=e.cssHandle;return i.a.createElement("div",{className:"relative"},i.a.createElement("div",{className:"".concat(t," absolute w-100 h-100 contain bg-center")}),i.a.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"image-placeholder"},i.a.createElement("rect",{width:"512",height:"512",fill:"#F2F2F2"}),i.a.createElement("rect",{x:"183.857",y:"180.2",width:"144.286",height:"150.474",stroke:"#CACBCC",strokeWidth:"2"}),i.a.createElement("path",{d:"M183.78 303.688H328.214",stroke:"#CACBCC",strokeWidth:"2"}),i.a.createElement("path",{d:"M205.082 279.563L223.599 240.507L242.116 260.035L269.892 220.979L306.926 279.563H205.082Z",stroke:"#CACBCC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.a.createElement("path",{d:"M252.225 213.939C252.225 219.822 247.66 224.52 242.114 224.52C236.569 224.52 232.004 219.822 232.004 213.939C232.004 208.057 236.569 203.359 242.114 203.359C247.66 203.359 252.225 208.057 252.225 213.939Z",stroke:"#CACBCC",strokeWidth:"2"})))}},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},53:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/useDevice"]},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},63:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.responsive-values@0.x/useResponsiveValues"]},7:function(e,t){e.exports=Classnames},88:function(e,t,r){"use strict";r.r(t),function(e){var t=r(4);r.p=Object(t.getPublicPath)("vtex.product-summary@2.90.7");var a=Object(t.register)((function(){return r(108)}),e,"vtex.product-summary@2.90.7","vtex.product-summary@2.x","ProductSummaryImage");a.renderHotReload,a.setupHMR}.call(this,r(13)(e))}},[[88,"common"]]]); },function(){ (window.webpackJsonpvtex_product_summary_2_90_7=window.webpackJsonpvtex_product_summary_2_90_7||[]).push([["ProductSummaryBrand"],{0:function(t,r){t.exports=React},57:function(t,r){t.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/ProductBrand"]},6:function(t,r){t.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},80:function(t,r,e){"use strict";e.r(r),function(t){var r=e(4);e.p=Object(r.getPublicPath)("vtex.product-summary@2.90.7");var o=Object(r.register)((function(){return e(81)}),t,"vtex.product-summary@2.90.7","vtex.product-summary@2.x","ProductSummaryBrand");o.renderHotReload,o.setupHMR}.call(this,e(13)(t))},81:function(t,r,e){"use strict";e.r(r);var o=e(0),n=e.n(o),a=e(57),u=e.n(a),c=e(6),d=e.n(c).a.useProductSummary;r.default=function(t){var r=t.displayMode,e=t.fallbackToText,o=t.height,a=t.excludeBrands,c=t.logoWithLink,s=void 0!==c&&c,m=d().product;return n.a.createElement(u.a,{displayMode:r,fallbackToText:e,height:o,excludeBrands:a,logoWithLink:s,brandName:m.brand,brandId:m.brandId})}}},[[80,"common"]]]); },function(){ (window.webpackJsonpvtex_product_summary_2_90_7=window.webpackJsonpvtex_product_summary_2_90_7||[]).push([["ProductSummaryName"],{0:function(e,t){e.exports=React},10:function(e,t){e.exports=ReactIntl},33:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/ProductName"]},39:function(e,t,a){"use strict";t.a=function(e,t,a){var o;return!!(null===(o=null==e?void 0:e.advertisement)||void 0===o?void 0:o.adId)&&t===a}},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},94:function(e,t,a){"use strict";a.r(t),function(e){var t=a(4);a.p=Object(t.getPublicPath)("vtex.product-summary@2.90.7");var o=Object(t.register)((function(){return a(95)}),e,"vtex.product-summary@2.90.7","vtex.product-summary@2.x","ProductSummaryName");o.renderHotReload,o.setupHMR}.call(this,a(13)(e))},95:function(e,t,a){"use strict";a.r(t);var o=a(9),r=a(0),n=a.n(r),s=a(33),c=a.n(s),u=a(5),d=a.n(u),m=a(6),l=a.n(m),i=a(10),p=a(39),v=l.a.useProductSummary,N=["nameContainer","nameWrapper","brandName","skuName","productReference","productNameLoader"],_={showProductReference:!1,showBrandName:!1,showSku:!1};function f(e){var t,a=e.showFieldsProps,r=void 0===a?_:a,s=e.tag,u=void 0===s?"h3":s,m=e.classes,l=v(),f=l.product,b=l.sponsoredBadge,x=d()(N,{classes:m}).handles,h=null==f?void 0:f.productName,y=null===(t=null==f?void 0:f.sku)||void 0===t?void 0:t.name,w=null==f?void 0:f.brand,R=Object(p.a)(f,null==b?void 0:b.position,"titleTop"),P="".concat(x.nameContainer," flex items-start justify-center pv6"),C="".concat(x.nameWrapper," overflow-hidden c-on-base f5"),E="".concat(x.brandName," t-body"),O="".concat(x.skuName," t-small"),S="".concat(x.productNameLoader," pt5 overflow-hidden"),g=Object(i.useIntl)();return n.a.createElement("div",{className:P,"aria-label":g.formatMessage({id:"store/product-summary.name.aria-label"},{productName:f.productName})},n.a.createElement(c.a,Object(o.a)({className:C,brandNameClass:E,skuNameClass:O,loaderClass:S,showSponsoredBadge:R,sponsoredBadgeLabel:null==b?void 0:b.label,productReferenceClass:x.productReference,name:h,skuName:y,brandName:w,tag:u},r)))}f.schema={title:"admin/editor.productSummaryName.title",type:"object",properties:{showFieldsProps:c.a.schema}},t.default=f}},[[94,"common"]]]); },function(){ (window.webpackJsonpvtex_product_summary_2_90_7=window.webpackJsonpvtex_product_summary_2_90_7||[]).push([["Spacer"],{0:function(e,t){e.exports=React},100:function(e,t,r){"use strict";r.r(t),function(e){var t=r(4);r.p=Object(t.getPublicPath)("vtex.product-summary@2.90.7");var c=Object(t.register)((function(){return r(101)}),e,"vtex.product-summary@2.90.7","vtex.product-summary@2.x","Spacer");c.renderHotReload,c.setupHMR}.call(this,r(13)(e))},101:function(e,t,r){"use strict";r.r(t);var c=r(0),n=r.n(c),s=r(5),a=r.n(s),u=["spacer"];t.default=function(){var e=a()(u).handles;return n.a.createElement("div",{className:"".concat(e.spacer," flex flex-grow-1")})}},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]}},[[100,"common"]]]); },function(){ (window.webpackJsonpvtex_product_summary_2_90_7=window.webpackJsonpvtex_product_summary_2_90_7||[]).push([["ProductSummarySKUSelector"],{0:function(e,t){e.exports=React},20:function(e,t,o){"use strict";function r(e){if(e&&0!==e.length){var t=e.find((function(e){return e.sellerDefault}));return t||e[0]}}o.d(t,"a",(function(){return r}))},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},73:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-components@3.x/SKUSelector"]},74:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCustomClasses"]},96:function(e,t,o){"use strict";o.r(t),function(e){var t=o(4);o.p=Object(t.getPublicPath)("vtex.product-summary@2.90.7");var r=Object(t.register)((function(){return o(97)}),e,"vtex.product-summary@2.90.7","vtex.product-summary@2.x","ProductSummarySKUSelector");r.renderHotReload,r.setupHMR}.call(this,o(13)(e))},97:function(e,t,o){"use strict";o.r(t);var r=o(9),n=o(0),s=o.n(n),a=o(73),c=o.n(a),u=o(5),l=o.n(u),m=o(74),i=o.n(m),p=o(6),S=o.n(p),x=o(20),k=S.a.useProductSummary,d=S.a.useProductSummaryDispatch,f=["SKUSelectorContainer","frameAround","seeMoreButton","skuSelectorContainer","skuSelectorInternalBox","skuSelectorItemImageValue","skuSelectorItemImage","skuSelectorItemTextValue","skuSelectorItem","skuSelectorNameContainer","skuSelectorNameSeparator","skuSelectorName","skuSelectorOptionsList","skuSelectorSelectorImageValue","skuSelectorSubcontainer","skuSelectorTextContainer","valueWrapper"];t.default=function(e){var t=l()(f,{classes:e.classes}).handles,o=d(),n=k().product,a=i()((function(){return{frameAround:[{name:"".concat(t.frameAround," vtex-store-components-3-x-frameAround"),applyModifiers:!0}],seeMoreButton:[{name:"".concat(t.seeMoreButton," vtex-store-components-3-x-seeMoreButton"),applyModifiers:!0}],skuSelectorContainer:[{name:"".concat(t.skuSelectorContainer," vtex-store-components-3-x-skuSelectorContainer"),applyModifiers:!0}],skuSelectorInternalBox:[{name:"".concat(t.skuSelectorInternalBox," vtex-store-components-3-x-skuSelectorInternalBox"),applyModifiers:!0}],skuSelectorItemImageValue:[{name:"".concat(t.skuSelectorItemImageValue," vtex-store-components-3-x-skuSelectorItemImageValue"),applyModifiers:!0}],skuSelectorItemImage:[{name:"".concat(t.skuSelectorItemImage," vtex-store-components-3-x-skuSelectorItemImage"),applyModifiers:!0}],skuSelectorItemTextValue:[{name:"".concat(t.skuSelectorItemTextValue," vtex-store-components-3-x-skuSelectorItemTextValue"),applyModifiers:!0}],skuSelectorItem:[{name:"".concat(t.skuSelectorItem," vtex-store-components-3-x-skuSelectorItem"),applyModifiers:!0}],skuSelectorNameContainer:[{name:"".concat(t.skuSelectorNameContainer," vtex-store-components-3-x-skuSelectorNameContainer"),applyModifiers:!0}],skuSelectorNameSeparator:[{name:"".concat(t.skuSelectorNameSeparator," vtex-store-components-3-x-skuSelectorNameSeparator"),applyModifiers:!0}],skuSelectorName:[{name:"".concat(t.skuSelectorName," vtex-store-components-3-x-skuSelectorName"),applyModifiers:!0}],skuSelectorOptionsList:[{name:"".concat(t.skuSelectorOptionsList," vtex-store-components-3-x-skuSelectorOptionsList"),applyModifiers:!0}],skuSelectorSelectorImageValue:[{name:"".concat(t.skuSelectorSelectorImageValue," vtex-store-components-3-x-skuSelectorSelectorImageValue"),applyModifiers:!0}],skuSelectorSubcontainer:[{name:"".concat(t.skuSelectorSubcontainer," vtex-store-components-3-x-skuSelectorSubcontainer"),applyModifiers:!0}],skuSelectorTextContainer:[{name:"".concat(t.skuSelectorTextContainer," vtex-store-components-3-x-skuSelectorTextContainer"),applyModifiers:!0}],valueWrapper:[{name:"".concat(t.valueWrapper," vtex-store-components-3-x-valueWrapper"),applyModifiers:!0}]}}),[t]);return s.a.createElement("div",{onClick:function(e){e.preventDefault(),e.stopPropagation()},className:t.SKUSelectorContainer},s.a.createElement(c.a,Object(r.a)({onSKUSelected:function(e){if(null!=e){var t=n.items&&n.items.find((function(t){return t.itemId===e})),r=Object.assign(Object.assign({},t),{image:t.images[0],seller:Object(x.a)(t.sellers)}),s=Object.assign(Object.assign({},n),{selectedItem:t,sku:r});o({type:"SET_PRODUCT",args:{product:s}}),o({type:"SET_PRODUCT_QUERY",args:{query:"skuId=".concat(e)}})}else o({type:"SET_PRODUCT_QUERY",args:{query:""}})}},e,{classes:a})))}}},[[96,"common"]]]); },function(){ !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];s=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",(function(){return r}))},13:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},15:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{e=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),e?(void 0===n[r]&&(n[r]={}),n[r][e[1]]=t):n[r]=t};case"bracket":return(r,t,n)=>{e=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),e?void 0!==n[r]?n[r]=[].concat(n[r],t):n[r]=[t]:n[r]=t};case"comma":case"separator":return(e,t,n)=>{const o="string"==typeof t&&t.includes(r.arrayFormatSeparator),a="string"==typeof t&&!o&&l(t,r).includes(r.arrayFormatSeparator);t=a?l(t,r):t;const s=o||a?t.split(r.arrayFormatSeparator).map(e=>l(e,r)):null===t?t:l(t,r);n[e]=s};case"bracket-separator":return(e,t,n)=>{const o=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!o)return void(n[e]=t?l(t,r):t);const a=null===t?[]:t.split(r.arrayFormatSeparator).map(e=>l(e,r));void 0!==n[e]?n[e]=[].concat(n[e],a):n[e]=a};default:return(r,e,t)=>{void 0!==t[r]?t[r]=[].concat(t[r],e):t[r]=e}}}(e),n=Object.create(null);if("string"!=typeof r)return n;if(!(r=r.trim().replace(/^[?#&]/,"")))return n;for(const o of r.split("&")){if(""===o)continue;let[r,s]=a(e.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?s:l(s,e),t(l(r,e),s,n)}for(const r of Object.keys(n)){const t=n[r];if("object"==typeof t&&null!==t)for(const r of Object.keys(t))t[r]=y(t[r],e);else n[r]=y(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((r,e)=>{const t=n[e];return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)?r[e]=function r(e){return Array.isArray(e)?e.sort():"object"==typeof e?r(Object.keys(e)).sort((r,e)=>Number(r)-Number(e)).map(r=>e[r]):e}(t):r[e]=t,r},Object.create(null))}e.extract=f,e.parse=d,e.stringify=(r,e)=>{if(!r)return"";i((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const t=t=>e.skipNull&&null==r[t]||e.skipEmptyString&&""===r[t],n=function(r){switch(r.arrayFormat){case"index":return e=>(t,n)=>{const o=t.length;return void 0===n||r.skipNull&&null===n||r.skipEmptyString&&""===n?t:null===n?[...t,[u(e,r),"[",o,"]"].join("")]:[...t,[u(e,r),"[",u(o,r),"]=",u(n,r)].join("")]};case"bracket":return e=>(t,n)=>void 0===n||r.skipNull&&null===n||r.skipEmptyString&&""===n?t:null===n?[...t,[u(e,r),"[]"].join("")]:[...t,[u(e,r),"[]=",u(n,r)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===r.arrayFormat?"[]=":"=";return t=>(n,o)=>void 0===o||r.skipNull&&null===o||r.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[u(t,r),e,u(o,r)].join("")]:[[n,u(o,r)].join(r.arrayFormatSeparator)])}default:return e=>(t,n)=>void 0===n||r.skipNull&&null===n||r.skipEmptyString&&""===n?t:null===n?[...t,u(e,r)]:[...t,[u(e,r),"=",u(n,r)].join("")]}}(e),o={};for(const e of Object.keys(r))t(e)||(o[e]=r[e]);const a=Object.keys(o);return!1!==e.sort&&a.sort(e.sort),a.map(t=>{const o=r[t];return void 0===o?"":null===o?u(t,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?u(t,e)+"[]":o.reduce(n(t),[]).join("&"):u(t,e)+"="+u(o,e)}).filter(r=>r.length>0).join("&")},e.parseUrl=(r,e)=>{e=Object.assign({decode:!0},e);const[t,n]=a(r,"#");return Object.assign({url:t.split("?")[0]||"",query:d(f(r),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:l(n,e)}:{})},e.stringifyUrl=(r,t)=>{t=Object.assign({encode:!0,strict:!0,[c]:!0},t);const n=p(r.url).split("?")[0]||"",o=e.extract(r.url),a=e.parse(o,{sort:!1}),s=Object.assign(a,r.query);let i=e.stringify(s,t);i&&(i="?"+i);let l=function(r){let e="";const t=r.indexOf("#");return-1!==t&&(e=r.slice(t)),e}(r.url);return r.fragmentIdentifier&&(l="#"+(t[c]?u(r.fragmentIdentifier,t):r.fragmentIdentifier)),`${n}${i}${l}`},e.pick=(r,t,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[c]:!1},n);const{url:o,query:a,fragmentIdentifier:i}=e.parseUrl(r,n);return e.stringifyUrl({url:o,query:s(a,t),fragmentIdentifier:i},n)},e.exclude=(r,t,n)=>{const o=Array.isArray(t)?r=>!t.includes(r):(r,e)=>!t(r,e);return e.pick(r,o,n)}},67:function(r,e,t){"use strict";r.exports=r=>encodeURIComponent(r).replace(/[!'()*]/g,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase())},68:function(r,e,t){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(r,e){try{return decodeURIComponent(r.join(""))}catch(r){}if(1===r.length)return r;e=e||1;var t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],a(t),a(n))}function s(r){try{return decodeURIComponent(r)}catch(o){for(var e=r.match(n),t=1;t{if("string"!=typeof r||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[r];const t=r.indexOf(e);return-1===t?[r]:[r.slice(0,t),r.slice(t+e.length)]}},70:function(r,e,t){"use strict";r.exports=function(r,e){for(var t={},n=Object.keys(r),o=Array.isArray(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(o.usePixel)(),c=i.push,u=Object(n.useRef)(null),s=u.current;Object(n.useEffect)((function(){if(t&&!r&&s!==t){if(!e||Object(a.isEmpty)(e))return;Array.isArray(e)?e.forEach(c):c(e),u.current=t}}),[e,r,t,s,c])}},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/PixelContext"]},,function(e,t){e.exports=ReactApollo},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i}));var n=r(0),o=r(1),a=r(4),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,r=e.cacheKey,i=e.skip,c=Object(o.useRuntime)(),u=c.route,s=c.account,l=null!=r?r:u.routeId,p=Object(n.useMemo)((function(){return!o.canUseDOM||i?null:{event:"pageView",pageTitle:null!=t?t:document.title,pageUrl:location.href,referrer:0===document.referrer.indexOf(location.origin)?void 0:document.referrer,accountName:s,routeId:(null==u?void 0:u.routeId)?u.routeId:""}}),[s,t,o.canUseDOM,l]);Object(a.a)(i?null:p,l)},c=["store.search","store.product"];t.a=function(e){var t=e.title,r=Object(o.useRuntime)().route,n=r&&c.some((function(e){return 0===r.routeId.indexOf(e)}));return i({title:t,skip:n}),null}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1);function o(){var e=Object(n.useRuntime)(),t=e.route,r=e.rootPath,o=void 0===r?"":r,a=t.canonicalPath,i=window.__hostname__||window.location&&window.location.hostname;return i&&a?"https://".concat(i).concat(o).concat(a):null}},,,function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e){var t=e.children,r=e.className;return o.a.createElement("div",{className:r},o.a.createElement("div",{className:"flex flex-column min-vh-100 w-100"},t))}},,,,,,,function(e,t){e.exports=ReactIntl},,,,,,,,,,,,,,function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/ToastProvider"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/PWAContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.order-manager@0.x/OrderQueue"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.order-items@0.x/OrderItems"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.order-manager@0.x/OrderForm"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.shipping-option-components@1.x/ShippingOptionContext"]},,,function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/MutationAddToCart"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/MutationUpdateItems"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/MutationUpdateOrderFormProfile"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/MutationUpdateOrderFormShipping"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/MutationUpdateOrderFormCheckin"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/OrderFormContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-resources@0.x/QueryOrderForm"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/ToastContext"]},,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t),function(e){var t=r(3);r.p=Object(t.getPublicPath)("vtex.store@2.142.0");var n=Object(t.register)((function(){return r(73)}),e,"vtex.store@2.142.0","vtex.store@2.x","StoreWrapper");n.renderHotReload,n.setupHMR}.call(this,r(9)(e))},,function(e,t,r){"use strict";r.r(t);var n=r(19),o=r(6),a=r(8),i=r(0),c=r.n(i),u=r(1),s=r(5),l=r(35),p=r.n(l),d=r(36),f=r(37),m=r(38),O=r(39),h=r(40),_=["firstName","lastName","document","id","email","phone","isAuthenticated"];var v=function(){var e=Object(s.usePixel)().push;return Object(i.useEffect)((function(){(window.__RENDER_8_SESSION__&&window.__RENDER_8_SESSION__.sessionPromise?window.__RENDER_8_SESSION__.sessionPromise:Promise.resolve(null)).then((function(t){var r,n,o=null===(n=null===(r=null==t?void 0:t.response)||void 0===r?void 0:r.namespaces)||void 0===n?void 0:n.profile;if(o){var a=function(e){return e?_.reduce((function(t,r){var n,o=null===(n=e[r])||void 0===n?void 0:n.value;return o&&(t[r]="isAuthenticated"===r?function(e){return"true"===e.toLowerCase()}(o):o),t}),{}):{}}(o);e(Object.assign({event:"userData"},a))}}))}),[e]),null},b=r(10),g=r(41),E=r(42),x=r(13),j=r(51),y=r(52),N=r(20),R=r(7),w=r(43),S=r.n(w),P=r(44),C=r.n(P),F=r(45),M=r.n(F),T=r(46),D=r.n(T),I=r(47),A=r.n(I),k=r(48),U=r(49),q=r.n(U);function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(N.a)(e);if(t){var o=Object(N.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(y.a)(this,r)}}var L=function(e){Object(j.a)(r,e);var t=W(r);function r(){var e;Object(g.a)(this,r);for(var n=arguments.length,o=new Array(n),i=0;i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0})),script:[T&&{type:"text/javascript",src:"".concat(C,"/register.js").concat(X).concat(H?"":"&__disableSW=true","&scope=").concat(encodeURIComponent(C)),defer:!0}].filter(Boolean),link:[].concat(Object(n.a)(Z||[]),Object(n.a)(!l&&Y?[{rel:"canonical",href:encodeURI(Y)}]:[])).filter(Boolean)}),c.a.createElement(s.PixelProvider,{currency:x},c.a.createElement(d.PWAProvider,{rootPath:C},c.a.createElement(b.a,{title:J}),c.a.createElement(v,null),c.a.createElement(p.a,{positioning:"window"},c.a.createElement(K,null),L?oe:c.a.createElement(z,null,oe)))),function(){try{return u.canUseDOM&&window.top!==window.self&&window.top.__provideRuntime}catch(e){return!1}}()&&c.a.createElement(u.NoSSR,null,c.a.createElement(u.ExtensionPoint,{id:"highlight-overlay"})))}}],[[71,"common",0]]]); },function(){ (window.webpackJsonpvtex_store_2_142_0=window.webpackJsonpvtex_store_2_142_0||[]).push([["DefaultChallenge"],{55:function(e,t,n){"use strict";n.r(t),function(e){var t=n(3);n.p=Object(t.getPublicPath)("vtex.store@2.142.0");var r=Object(t.register)((function(){return n(56)}),e,"vtex.store@2.142.0","vtex.store@2.x","DefaultChallenge");r.renderHotReload,r.setupHMR}.call(this,n(9)(e))},56:function(e,t,n){"use strict";n.r(t);t.default=function(e){return e.children}}},[[55,"common"]]]); },function(){ !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];s3&&void 0!==arguments[3]?arguments[3]:"/",i="";if(n&&n>0){var o=new Date;o.setTime((new Date).getTime()+n),i="expires=".concat(o.toUTCString(),";")}document.cookie="".concat(e,"=").concat(encodeURIComponent(t),";").concat(i,"path=").concat(r)}var f=function(){function e(t){Object(a.a)(this,e),this.client=t,this.historyKey="biggy-search-history"}var t,n,r;return Object(s.a)(e,[{key:"topSearches",value:(r=Object(o.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.query({query:d.a}));case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"suggestionSearches",value:(n=Object(o.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.client.query({query:p.a,variables:{fullText:t}}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"suggestionProducts",value:(t=Object(o.a)(i.a.mark((function e(t,n,r){var o,a,s,c,l,p,m,d=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>3&&void 0!==d[3]&&d[3],a=d.length>4&&void 0!==d[4]?d[4]:"default",s=d.length>5&&void 0!==d[5]&&d[5],c=d.length>6?d[6]:void 0,l=d.length>7?d[7]:void 0,p=d.length>8?d[8]:void 0,m=d.length>9?d[9]:void 0,e.abrupt("return",this.client.query({query:u.a,variables:{simulationBehavior:a,advertisementOptions:m,hideUnavailableItems:s,orderBy:c,fullText:t,facetKey:n,facetValue:r,productOriginVtex:o,count:l,shippingOptions:p,variant:h("sp-variant")},fetchPolicy:"network-only"}));case 8:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})},{key:"searchHistory",value:function(){return(h(this.historyKey)||"").split(",").filter((function(e){return!!e}))}},{key:"prependSearchHistory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(null!=e&&""!==e.trim()){var n=this.searchHistory();n.indexOf(e)<0&&(n.unshift(e),n=n.slice(0,t)),v(this.historyKey,n.join(","))}}}]),e}()},,,function(e,t){e.exports=regeneratorRuntime},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/IconClose"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/IconClock"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-list-context@0.x/ProductListContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/withDevice"]},function(e,t){function n(e,t,n){var r,i,o,a,s;function c(){var u=Date.now()-a;u=0?r=setTimeout(c,t-u):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var u=function(){o=this,i=arguments,a=Date.now();var u=n&&!r;return r||(r=setTimeout(c,t)),u&&(s=e.apply(o,i),o=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}n.debounce=n,e.exports=n},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/PixelContext"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Spinner"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary@2.x/ProductSummaryCustom"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-price@1.x/SellingPrice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-price@1.x/ListPrice"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContextProvider"]},,,,,function(e,t,n){"use strict";n.r(t),function(e){var t=n(4);n.p=Object(t.getPublicPath)("vtex.search@2.18.3");var r=Object(t.register)((function(){return n(46)}),e,"vtex.search@2.18.3","vtex.search@2.x","Autocomplete");r.renderHotReload,r.setupHMR}.call(this,n(16)(e))},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),o=n(5),a=n(9),s=n(10),c=n(23),u=n(22),l=n(13),p=n(0),m=n.n(p),d=n(7),h=n(3),v=n(25),f=n.n(v),g=n(26),x=n.n(g),y=n(27),E=n.n(y),_=n(28),b=n.n(_),k=n(29),S=n.n(k),L=n(30),O=n(21),P=n(14),N=n.n(P),T=n(2),w=n(31),C=n.n(w),I=n(32),M=n.n(I),R=n(11),H=n.n(R),j=n(33),D=n.n(j),F=n(34),V=n.n(F),q=n(35),A=n.n(q),W=n(12),U=n.n(W),B=function(e){var t,n,r,i,o=e.product,a=e.onClick,s=null==o?void 0:o.sku,c=null===(r=null===(n=null===(t=null==s?void 0:s.sellers)||void 0===t?void 0:t[0])||void 0===n?void 0:n.commertialOffer)||void 0===r?void 0:r.taxPercentage;return m.a.createElement("div",null,m.a.createElement(T.Link,{params:{slug:null==o?void 0:o.linkText,id:null==o?void 0:o.productId},page:"store.product",className:"no-underline",onClick:a},m.a.createElement("article",{className:"".concat(U.a.element," flex flex-row justify-start items-center pa3 bg-animate hover-bg-light-gray")},m.a.createElement("div",{className:"".concat(U.a.imageContainer," h3")},m.a.createElement("img",{className:"".concat(U.a.image," h-100 w-auto mw-none"),src:null===(i=null==s?void 0:s.image)||void 0===i?void 0:i.imageUrl})),m.a.createElement("div",{className:"".concat(U.a.information," flex flex-column justify-between items-start ml4")},m.a.createElement("div",{className:U.a.productNameContainer},m.a.createElement("span",{className:"".concat(U.a.productBrand," f5 c-on-base")},o.productName)),m.a.createElement("div",{className:U.a.priceContainer},m.a.createElement(A.a,{product:o,query:{skuId:null==s?void 0:s.itemId}},m.a.createElement("span",{className:"db f7 c-muted-2"},m.a.createElement(V.a,{message:c?"{listPriceWithTax}":"{listPriceValue}"})),m.a.createElement("span",{className:"dib t-small c-muted-2"},m.a.createElement(D.a,{message:c?"{sellingPriceWithTax}":"{sellingPriceValue}"}))))))))},z=function(e){var t=e.term,n=e.title,r=e.products,i=e.showTitle,o=e.totalProducts,a=e.layout,s=e.isLoading,c=e.onProductClick,u=e.onSeeAllClick,l=e.HorizontalProductSummary,p=e.customPage;return 0!==r.length||s?m.a.createElement("section",{className:H.a.tileList},i?m.a.createElement("p",{className:"".concat(H.a.tileListTitle," c-on-base")},n):null,s?m.a.createElement("div",{className:H.a.tileListSpinner},m.a.createElement(C.a,null)):m.a.createElement(m.a.Fragment,null,m.a.createElement("ul",{className:H.a.tileListList,style:{flexDirection:a===re.Horizontal?"column":"row"}},r.map((function(e,n){var r=M.a.mapCatalogProductToProductSummary(e);return m.a.createElement("li",{key:e.productId,className:H.a.tileListItem},a===re.Horizontal?l?m.a.createElement(l,{product:r,placement:"autocomplete",actionOnClick:function(){c(r.productId,n,t)}}):m.a.createElement(B,{product:r,onClick:function(){c(r.productId,n,t)}}):m.a.createElement(T.ExtensionPoint,{id:"product-summary",product:r,placement:"autocomplete",actionOnClick:function(){c(r.productId,n,t)}}))}))),m.a.createElement("footer",{className:H.a.tileListFooter},o>0?m.a.createElement(T.Link,{query:"map=ft&_q=".concat(t),params:{term:t},page:p||"store.search",className:H.a.tileListSeeMore,onClick:function(){return u(t)}},m.a.createElement(h.FormattedMessage,{id:"store/seeMore",values:{count:o}})):null))):null};var Q=n(6),K=n.n(Q),J=function(e){var t;return(null===(t=e.item)||void 0===t?void 0:t.attributes)?m.a.createElement("ul",{className:K.a.itemListSubList},e.item.attributes.map((function(t,n){return m.a.createElement("li",{key:n,className:"".concat(K.a.itemListSubItem," c-on-base pointer"),onMouseOver:function(n){return e.onMouseOver(n,t)},onFocus:function(n){return e.onMouseOver(n,t)},onMouseOut:function(){return e.onMouseOut()},onBlur:function(){return e.onMouseOut()}},m.a.createElement(T.Link,{className:"".concat(K.a.itemListSubItemLink," c-on-base"),to:"/".concat(e.item.value,"/").concat(t.value),query:"map=ft,".concat(t.key),onClick:function(){e.closeModal(),e.onItemClick(t.label,n)}},t.label))}))):null};function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var G=function(e){Object(c.a)(n,e);var t=$(n);function n(){var e;return Object(a.a)(this,n),(e=t.apply(this,arguments)).state={currentTimeoutId:null},e.handleMouseOver=function(t,n){if(t.stopPropagation(),!e.state.currentTimeoutId){var r=setTimeout((function(){e.props.onItemHover&&e.props.onItemHover(n),e.setState({currentTimeoutId:null})}),100);e.setState({currentTimeoutId:r})}},e.handleMouseOut=function(){var t=e.state.currentTimeoutId;t&&(clearTimeout(t),e.setState({currentTimeoutId:null}))},e}return Object(s.a)(n,[{key:"render",value:function(){var e=this;if(0===this.props.items.length&&!this.props.showTitleOnEmpty)return null;var t=this.props.modifier?K.a["itemList--".concat(this.props.modifier)]:"";return p.createElement("article",{className:"".concat(K.a.itemList," ").concat(t)},this.props.showTitle?p.createElement("p",{className:"".concat(K.a.itemListTitle," c-on-base")},this.props.title):null,this.props.items.length>0&&p.createElement("ol",{className:K.a.itemListList},this.props.items.map((function(t,n){var r;return p.createElement("li",{key:t.value,className:"".concat(K.a.itemListItem),onMouseOver:function(n){return e.handleMouseOver(n,t)},onFocus:function(n){return e.handleMouseOver(n,t)},onMouseOut:function(){return e.handleMouseOut()},onBlur:function(){return e.handleMouseOut()}},p.createElement(T.Link,{page:null!==(r=e.props.customPage)&&void 0!==r?r:"store.search",params:{term:t.value},query:"map=ft&_q=".concat(t.value),onClick:function(){return e.props.onItemClick(t.value,n)},className:K.a.itemListLink},t.icon?p.createElement("span",{className:K.a.itemListIcon},t.icon):null,t.prefix?p.createElement("span",{className:K.a.itemListPrefix},t.prefix):null,p.createElement("span",{className:"".concat(K.a.itemListLinkTitle," c-on-base")},t.label)),p.createElement(J,{item:t,onMouseOver:e.handleMouseOver,onMouseOut:e.handleMouseOut,closeModal:e.props.closeModal,onItemClick:e.props.onItemClick}))}))))}}]),n}(p.Component),X=n(36);var Z;function Y(e,t,n){return function(r,i){e({page:t,event:"autocomplete",eventType:n,search:{term:r,position:i}})}}function ee(e,t,n,r,i){try{e({event:"autocomplete",eventType:Z.Search,search:{operator:t,misspelled:n,text:decodeURI(i),match:r}})}catch(o){e({event:"autocomplete",eventType:Z.Search,search:{operator:t,misspelled:n,text:i,match:r}})}}!function(e){e.ProductClick="product_click",e.SearchSuggestionClick="search_suggestion_click",e.TopSearchClick="top_search_click",e.HistoryClick="history_click",e.Search="search",e.SeeAllClick="see_all_click"}(Z||(Z={}));var te=function(){var e=Object(o.a)(i.a.mark((function e(t){var n,r,o,a,s,c,u;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=new Headers).append("Content-Type","application/json"),s={method:"GET",headers:a,redirect:"follow"},e.next=5,fetch("".concat(t||"","/api/sessions?items=public.shippingOption"),s);case 5:return c=e.sent,e.next=8,c.json();case 8:if(u=e.sent,null===(o=null===(r=null===(n=null==u?void 0:u.namespaces)||void 0===n?void 0:n.public)||void 0===r?void 0:r.shippingOption)||void 0===o?void 0:o.value){e.next=11;break}return e.abrupt("return",null);case 11:return e.abrupt("return",JSON.parse(u.namespaces.public.shippingOption.value));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var re;!function(e){e.Horizontal="HORIZONTAL",e.Vertical="VERTICAL"}(re||(re={}));var ie,oe=E.a.ProductListProvider,ae=function(e){Object(c.a)(l,e);var t,n,r,u=ne(l);function l(e){var t;return Object(a.a)(this,l),(t=u.call(this,e)).state={topSearchedItems:[],history:[],products:[],suggestionItems:[],totalProducts:0,queryFromHover:{},dynamicTerm:"",isProductsLoading:!1,currentHeightWhenOpen:0},t.handleItemHover=function(e){"groupValue"in e?(t.setState({dynamicTerm:e.groupValue,queryFromHover:{key:e.key,value:e.value}}),t.updateProducts(e.groupValue)):(t.setState({dynamicTerm:e.value,queryFromHover:{key:void 0,value:void 0}}),t.updateProducts(e.value))},t.getProductLayout=function(){var e=t.props,n=e.productLayout,r=e.isMobile;return void 0!==n?n:r?re.Horizontal:re.Vertical},t.client=new O.a(t.props.client),t.autocompleteRef=m.a.createRef(),t.isIOS=navigator&&!!navigator.userAgent.match(/(iPod|iPhone|iPad)/),t}return Object(s.a)(l,[{key:"fitAutocompleteInWindow",value:function(){if(window&&this.autocompleteRef.current&&this.props.isMobile&&!this.isIOS){var e=window.innerHeight,t=this.autocompleteRef.current.getBoundingClientRect().y,n=this.autocompleteRef.current.offsetHeight,r=n-(t+n-e);this.autocompleteRef.current.style.maxHeight="".concat(r,"px")}}},{key:"addEvents",value:function(){window.addEventListener("resize",S()(this.fitAutocompleteInWindow.bind(this),100))}},{key:"componentDidMount",value:function(){this.updateTopSearches(),this.updateHistory(),this.addEvents()}},{key:"shouldUpdate",value:function(e){return e.inputValue!==this.props.inputValue||!e.isOpen&&this.props.isOpen}},{key:"addTermToHistory",value:function(){var e=window.location.href.split("_q=");if(e[1]){var t=e[1].split("&")[0];try{return this.client.prependSearchHistory(decodeURI(t))}catch(e){return this.client.prependSearchHistory(t)}}}},{key:"closeModal",value:function(){this.props.closeMenu&&this.props.closeMenu()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.shouldUpdate(e)){this.addTermToHistory(),this.fitAutocompleteInWindow();var n=this.props.inputValue;this.setState({dynamicTerm:n,queryFromHover:void 0}),null===n||""===n?(this.updateTopSearches(),this.updateHistory(),this.setState({suggestionItems:[],products:[]})):this.updateSuggestions().then((function(){return t.fitAutocompleteInWindow(),t.updateProducts(n)})).then((function(){return t.fitAutocompleteInWindow()}))}}},{key:"highlightTerm",value:function(e,t){var n=e.split(t);return m.a.createElement(m.a.Fragment,null,n.map((function(e,r){return m.a.createElement(m.a.Fragment,null,e,r!==n.length-1?m.a.createElement("span",{className:"b"},t):null)})))}},{key:"updateSuggestions",value:(r=Object(o.a)(i.a.mark((function e(){var t,n,r,o,a,s,c=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.suggestionSearches(this.props.inputValue);case 2:t=e.sent,n=t.data.autocompleteSearchSuggestions.searches,r=this.props.maxSuggestedTerms,o=void 0===r?5:r,a=n.slice(0,o).map((function(e){var t=e.attributes||[];return{term:e.term,attributes:t.map((function(t){return{label:t.labelValue,value:t.value,link:"/".concat(e.term,"/").concat(t.value,"/?map=ft,").concat(t.key),groupValue:e.term,key:t.key}}))}})),s=a.map((function(e){return{label:c.highlightTerm(e.term.toLowerCase(),c.props.inputValue.toLocaleLowerCase()),value:e.term,groupValue:e.term,link:"/".concat(e.term,"?map=ft"),attributes:e.attributes}})),this.setState({suggestionItems:s});case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"updateProducts",value:(n=Object(o.a)(i.a.mark((function e(t){var n,r,o,a,s,c,u,l,p,m,d,h,v,f,g,x,y,E,_,b,k,S;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t,o=this.props,a=o.__unstableProductOrigin,s=o.__unstableProductOriginVtex,c=void 0!==s&&s,u=o.simulationBehavior,l=void 0===u?"default":u,p=o.hideUnavailableItems,m=void 0!==p&&p,d=o.orderBy,h=this.state.queryFromHover,r){e.next=6;break}return this.setState({products:[],totalProducts:0}),e.abrupt("return");case 6:return a&&console.warn("The prop `__unstableProductOrigin` has been deprecated. Use the boolean prop `__unstableProductOriginVtex` instead."),this.setState({isProductsLoading:!0}),e.next=10,te(this.props.runtime.rootPath);case 10:return v=e.sent,f=null!==(n=null==v?void 0:v.map((function(e){return e.value})))&&void 0!==n?n:[],g={showSponsored:!0,sponsoredCount:2,repeatSponsoredProducts:!1,advertisementPlacement:"autocomplete"},e.next=15,this.client.suggestionProducts(r,h?h.key:void 0,h?h.value:void 0,"VTEX"===a||c,l,m,d,this.props.maxSuggestedProducts||3,f,g);case 15:x=e.sent,h||(y=x.data.productSuggestions,E=y.count,_=y.operator,b=y.misspelled,ee(this.props.push,_,b,E,r)),this.setState({isProductsLoading:!1}),k=x.data.productSuggestions,S=k.products.slice(0,this.getProductCount()),this.setState({products:S,totalProducts:k.count});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"updateTopSearches",value:(t=Object(o.a)(i.a.mark((function e(){var t,n,r,o,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.topSearches();case 2:t=e.sent,n=t.data.topSearches.searches,r=this.props.maxTopSearches,o=void 0===r?10:r,a=n.slice(0,o).map((function(e,t){return{prefix:m.a.createElement(m.a.Fragment,null,"".concat(t+1),m.a.createElement(h.FormattedMessage,{id:"store/ordinalNumber"})),value:e.term,label:e.term,link:"/".concat(e.term,"?map=ft")}})),this.setState({topSearchedItems:a});case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateHistory",value:function(){var e=this.client.searchHistory().slice(0,this.props.maxHistory||5).map((function(e){return{label:(t=e,t.replace(/\$2F/gi,"/")),value:e,link:"/".concat(e,"?map=ft"),icon:m.a.createElement(x.a,null)};var t}));this.setState({history:e})}},{key:"renderSuggestions",value:function(){var e=this,t=!!this.state.suggestionItems&&this.state.suggestionItems.length>0,n=t?m.a.createElement(h.FormattedMessage,{id:"store/suggestions"}):m.a.createElement(h.FormattedMessage,{id:"store/emptySuggestion"});return m.a.createElement(G,{title:n,items:this.state.suggestionItems||[],modifier:"suggestion",showTitle:!t||!this.props.hideTitles,onItemHover:this.handleItemHover,showTitleOnEmpty:0!==this.props.maxSuggestedTerms,onItemClick:function(t,n){Y(e.props.push,e.props.runtime.page,Z.SearchSuggestionClick)(t,n),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}})}},{key:"contentWhenQueryIsEmpty",value:function(){var e=this;return m.a.createElement("div",{className:N.a["history-and-top-wrapper"],style:{flexDirection:this.props.historyFirst?"row-reverse":"row"}},!this.props.isMobile||this.props.isMobile&&!this.props.historyFirst||0===this.state.history.length?m.a.createElement(G,{modifier:"top-search",title:m.a.createElement(h.FormattedMessage,{id:"store/topSearches"}),items:this.state.topSearchedItems||[],showTitle:!this.props.hideTitles,onItemClick:function(t,n){Y(e.props.push,e.props.runtime.page,Z.TopSearchClick)(t,n),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}}):null,!this.props.isMobile||this.props.isMobile&&this.props.historyFirst?m.a.createElement(G,{modifier:"history",title:m.a.createElement(h.FormattedMessage,{id:"store/history"}),items:this.state.history||[],showTitle:!this.props.hideTitles,onItemClick:function(t,n){Y(e.props.push,e.props.runtime.page,Z.HistoryClick)(t,n),e.closeModal()},customPage:this.props.customPage,closeModal:function(){return e.closeModal()}}):null)}},{key:"contentWhenQueryIsNotEmpty",value:function(){var e=this,t=this.state,n=t.products,r=t.totalProducts,i=t.isProductsLoading,o=this.props,a=o.hideTitles,s=o.push,c=o.runtime,u=o.inputValue,l=u.replace(/\//gi,"$2F");return m.a.createElement(m.a.Fragment,null,this.renderSuggestions(),m.a.createElement(z,{term:l||"",customPage:this.props.customPage,shelfProductCount:this.getProductCount(),title:m.a.createElement(h.FormattedMessage,{id:"store/suggestedProducts",values:{term:u}}),products:n||[],showTitle:!a,totalProducts:r||0,layout:this.getProductLayout(),isLoading:i,onProductClick:function(t,n,r){!function(e,t){return function(n,r,i){return e({page:t,event:"autocomplete",eventType:Z.ProductClick,product:{productId:n,position:r},term:i})}}(s,c.page)(t,n,r),e.closeModal()},onSeeAllClick:function(t){!function(e,t){return function(n){return e({page:t,event:"autocomplete",eventType:Z.SeeAllClick,search:{term:n}})}}(s,c.page)(t),e.closeModal()},HorizontalProductSummary:this.props.HorizontalProductSummary}))}},{key:"renderContent",value:function(){var e=this.props.inputValue.trim();return e&&""!==e?this.contentWhenQueryIsNotEmpty():this.contentWhenQueryIsEmpty()}},{key:"hasContent",value:function(){var e=this.state,t=e.topSearchedItems,n=e.suggestionItems,r=e.history,i=e.products;return t.length>0||n.length>0||r.length>0||i.length>0}},{key:"getProductCount",value:function(){var e=this.props,t=e.customBreakpoints,n=e.isMobile,r=e.maxSuggestedProducts,i=void 0===r?3:r;if(!window||n||!t)return i;var o=window.innerWidth;return t.md&&t.lg&&t.xlg?o>=t.xlg.width?t.xlg.maxSuggestedProducts:o>=t.lg.width?t.lg.maxSuggestedProducts:o>=t.md.width?t.md.maxSuggestedProducts:i:i}},{key:"render",value:function(){var e=this,t=this.props.isOpen&&this.hasContent()?"":N.a["biggy-js-container--hidden"];return m.a.createElement("div",{className:N.a["biggy-autocomplete-wrapper"],style:{width:this.props.autocompleteWidth?"".concat(this.props.autocompleteWidth,"vw"):void 0}},m.a.createElement("section",{ref:this.autocompleteRef,className:"".concat(N.a["biggy-autocomplete"]," ").concat(t," w-100"),style:{flexDirection:this.getProductLayout()===re.Horizontal?"column":"row"}},m.a.createElement(oe,{listName:"autocomplete-result-list"},this.renderContent(),this.props.isMobile?m.a.createElement("button",{onClick:function(){return e.closeModal()},className:N.a["close-btn"]},m.a.createElement(f.a,null)):null)))}}]),l}(m.a.Component),se=Object(L.withPixel)(b()(Object(d.withApollo)((ie=ae,function(e){return m.a.createElement(ie,Object(X.a)({},e,{runtime:Object(T.useRuntime)()}))}))));t.default=se}],[[40,"common"]]]); }], document.currentScript.dataset.index)