enqueueScripts([function(){ (window.webpackJsonpvtex_order_items_0_14_0=window.webpackJsonpvtex_order_items_0_14_0||[]).push([[0],[,function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return F})),n.d(t,"d",(function(){return x})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return I}));var i,r=n(0),a=n.n(r),u=new Uint8Array(16);function s(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(u)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var l=function(e){return"string"==typeof e&&o.test(e)},d=[],c=0;c<256;++c)d.push((c+256).toString(16).substr(1));var m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase();if(!l(n))throw TypeError("Stringified UUID is invalid");return n};var f=function(e,t,n){var i=(e=e||{}).random||(e.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return m(i)},v=n(12);const h=async()=>{},p=Object(r.createContext)({addItem:h,addItems:h,updateQuantity:h,removeItem:h,setManualPrice:h}),I=()=>Object(r.useContext)(p),g={queue:[]},y=e=>{var t;let n=null;try{n=JSON.parse(null!==(t=localStorage.getItem("orderQueue"))&&void 0!==t?t:"null")}catch{}if(!n)try{localStorage.setItem("orderQueue",JSON.stringify(g))}catch(t){null==e||e({type:"Error",level:"Critical",event:t,workflowType:"OrderItems",workflowInstance:"get-local-order-queue"})}return null!=n?n:g},w=(e,t)=>{try{localStorage.setItem("orderQueue",JSON.stringify(e))}catch(e){null==t||t({type:"Error",level:"Critical",event:e,workflowType:"OrderItems",workflowInstance:"save-local-order-queue"})}},b=(e,t)=>{const n=y(),i=n.queue.push(e);return w(n,t),i},k=(e=0,t)=>{const n=y(t),i=n.queue[e];if(i)return n.queue.splice(e,1),w(n,t),i},T="available",q=(e,t,n)=>{var i,r,a;const u=(null===(i=e.id)||void 0===i?void 0:i.toString())===t.id,s=e.seller===t.seller;if(t.isGift)return!1;if(null==e.options||!(null===(r=e.options)||void 0===r?void 0:r.length))return!(null===(a=t.attachments)||void 0===a?void 0:a.length)&&(u&&s);const o=e.options.every(e=>n.find(t=>t.id===e.id));return u&&s&&o},O=e=>{var t;return{id:+(null!==(t=e.id)&&void 0!==t?t:0),index:e.index,quantity:e.quantity,seller:e.seller,options:e.options}},M=(e,t)=>{var n,i,r,a;return{id:t.id,productId:t.productId,name:t.name,skuName:t.skuName,skuSpecifications:t.skuSpecifications,imageUrls:{at1x:t.imageUrl,at2x:t.imageUrl,at3x:t.imageUrl},price:t.price,listPrice:t.listPrice,sellingPrice:t.sellingPrice,measurementUnit:t.measurementUnit,quantity:null!==(n=t.quantity)&&void 0!==n?n:1,unitMultiplier:null!==(i=t.unitMultiplier)&&void 0!==i?i:1,uniqueId:null!==(r=e.uniqueId)&&void 0!==r?r:f(),detailUrl:t.detailUrl,availability:null!==(a=t.availability)&&void 0!==a?a:T,additionalInfo:t.additionalInfo,options:t.options,seller:t.seller,attachmentOfferings:[],attachments:[],bundleItems:[],offerings:[],priceTags:[],isGift:!1}},x=e=>void 0!==e;function C({useMutateAddItems:e,useOrderForm:t,useLogger:n}){return i=>{var a;const{setOrderForm:u}=t(),s=e(),{log:o}=null!==(a=null==n?void 0:n())&&void 0!==a?a:{};return Object(r.useCallback)(({mutationInputItems:e,mutationInputMarketingData:t,orderFormItems:n,salesChannel:r,allowedOutdatedData:a})=>({execute:async()=>{var l;const{data:d,errors:c}=await s({items:e,marketingData:t,salesChannel:r,allowedOutdatedData:a});if(!d||(null!==(l=null==c?void 0:c.length)&&void 0!==l?l:0)>0)throw null==c?void 0:c[0];return n.forEach(e=>{const t=null==d?void 0:d.items.find(t=>t.id===e.id);if(!t)return;const n=e.uniqueId;(({fakeUniqueId:e,uniqueId:t},n)=>{const i=y(n);i.queue=i.queue.map(n=>{if("update_mutation"!==n.type)return n;const i=n.variables.orderItems.findIndex(t=>"uniqueId"in t&&t.uniqueId===e);return i>-1&&(n.variables.orderItems[i]={...n.variables.orderItems[i],uniqueId:t}),n}),w(i,n)})({fakeUniqueId:n,uniqueId:t.uniqueId},o),i.current[n]=t.uniqueId}),u(n=>({...n,items:n.items.map(t=>{if(-1===e.findIndex(e=>q(e,t,n.items)))return t;const i=d.items.find(e=>e.id===t.id);return i?{...t,uniqueId:i.uniqueId}:null}).filter(e=>null!=e),marketingData:null!=t?t:n.marketingData})),d},rollback:()=>{u(t=>{const n=e.map(({id:e})=>e.toString());return{...t,items:t.items.filter(e=>!n.includes(e.id))}})}}),[i,o,s,u])}}const _=({totalizers:e,currentValue:t=0,newItem:n,oldItem:i})=>{var r,a,u,s,o;if((null==i?void 0:i.availability)!==T)return{totalizers:e,value:t};const l=(null!==(r=i.price)&&void 0!==r?r:0)*(null!==(a=i.unitMultiplier)&&void 0!==a?a:1),d=null!==(u=i.quantity)&&void 0!==u?u:0,c=null!==(s=i.sellingPrice)&&void 0!==s?s:0,m=l*d,f=n.price*(null!==(o=n.unitMultiplier)&&void 0!==o?o:1),v=f*n.quantity-m,h=(c-l)*d,p=(n.sellingPrice-f)*n.quantity-h,I=t+v+p;if(!e.length)return{totalizers:[{id:"Items",name:"Items Total",value:v},{id:"Discounts",name:"Discounts Total",value:p}],value:I};return{totalizers:e.map(e=>{switch(e.id){case"Items":return{...e,value:e.value+v};case"Discounts":return{...e,value:e.value+p};default:return e}}),value:I}},D=async()=>{};function E({useMutateAddItems:e,useMutateUpdateQuantity:t,useMutateSetManualPrice:n,useOrderForm:i,useLogger:u,useOrderQueue:s,useQueueStatus:o}){const l=C({useMutateAddItems:e,useOrderForm:i}),d=function({useMutateSetManualPrice:e}){return()=>{const t=e();return Object(r.useCallback)((e,n)=>{if(t)return{execute:async()=>{var i;const{data:r,errors:a}=await t({itemIndex:n,price:e});if(!r||(null!==(i=null==a?void 0:a.length)&&void 0!==i?i:0)>0)throw null==a?void 0:a[0];return r}}},[t])}}({useMutateSetManualPrice:n}),c=function({useMutateUpdateQuantity:e,useOrderForm:t}){return n=>{const{setOrderForm:i}=t(),a=e();return Object(r.useCallback)(({items:e,orderFormItems:t,id:r,allowedOutdatedData:u,splitItem:s})=>({id:r,execute:async()=>{var t;const i={orderItems:e.map(e=>{if("uniqueId"in e){return{uniqueId:n.current[e.uniqueId]||e.uniqueId,quantity:e.quantity}}return e}),allowedOutdatedData:u,splitItem:s},{data:r,errors:o}=await a(i);if(!r||(null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0)>0)throw null==o?void 0:o[0];return r},rollback:()=>{const n=e.filter(({quantity:e})=>0===e),r=e.filter(({quantity:e})=>0!==e),a=n.map(e=>t.find((t,n)=>"uniqueId"in e?t.uniqueId===e.uniqueId:e.index===n)).filter(x);i(e=>({...e,items:e.items.map(e=>{const n=r.findIndex((t,n)=>"uniqueId"in t?e.uniqueId===t.uniqueId:n===t.index);if(-1!==n){const i=r[n],a=t.find((e,t)=>"uniqueId"in i?e.uniqueId===i.uniqueId:t===i.index);return{...e,quantity:a.quantity}}return e}).concat(a)}))}}),[n,a,i])}}({useMutateUpdateQuantity:t,useOrderForm:i});return{OrderItemsProvider:({children:e})=>{const{orderForm:t,setOrderForm:n}=i(),{log:m}=u(),h=function({useOrderQueue:e}){const t=Object(r.useRef)({}),{listen:n}=e();return Object(r.useEffect)(()=>n("Fulfilled",()=>{t.current={}}),[n]),t}({useOrderQueue:s}),I=(({useOrderForm:e,useLogger:t,useOrderQueue:n,useQueueStatus:i})=>{const{log:a}=t(),{enqueue:u}=n(),s=i(),{setOrderForm:o}=e();return Object(r.useCallback)(e=>u(e.execute,e.id).then(e=>{k(0,a),"Fulfilled"===s.current?o(e):o(t=>{var n;return{...t,messages:{...e.messages,generalMessages:null===(n=e.messages)||void 0===n?void 0:n.generalMessages}}})},e=>{if(!e||e.code!==v.a)throw k(0,a),a({type:"Error",level:"Critical",event:e,workflowType:"OrderItems",workflowInstance:"enqueue-task-error"}),e;k(e.index,a)}),[u,s,o,a])})({useOrderForm:i,useLogger:u,useOrderQueue:s,useQueueStatus:o}),g=l(h),w=c(h),T=d(),x=Object(r.useRef)(t.items);Object(r.useEffect)(()=>{x.current=t.items},[t.items]);const C=Object(r.useCallback)(async(e,t)=>{var i,r,a;let u,s="";const o=x.current;if(e.id?u=o.findIndex(t=>q(e,t,o)):e.uniqueId?(s=e.uniqueId,u=o.findIndex(t=>t.uniqueId===e.uniqueId)):u=null!==(i=null==e?void 0:e.index)&&void 0!==i?i:-1,u<0||u>=o.length)throw new Error(`Item ${null!==(r=e.id)&&void 0!==r?r:e.uniqueId} not found`);s||(s=o[u].uniqueId);const l=null!==(a=e.quantity)&&void 0!==a?a:1;let d;n(e=>{const t=e.items.slice(),n=t[u],i={...n,quantity:l};return l>0?t[u]=i:t.splice(u,1),{...e,..._({totalizers:e.totalizers,currentValue:e.value,newItem:i,oldItem:n}),items:t}});let c=f();if(l>0){const n=y(m).queue;let i=-1;const r=c;for(let e=1;ee.quantity>0)?(i=e,c=t.id):(i=-1,c=r)}const a=-1===i?void 0:n[i],o="update_mutation"===(null==a?void 0:a.type)?a.variables.orderItems:[],f=o.findIndex(e=>"uniqueId"in e?e.uniqueId===s:e.index===u);let v={uniqueId:s,quantity:l};"index"in e&&(v={index:u,quantity:l}),d={allowedOutdatedData:null==t?void 0:t.allowedOutdatedData,splitItem:null==t?void 0:t.splitItem,orderItems:f>-1?o.map((e,t)=>t===f?v:e):o.concat([v])}}else d={allowedOutdatedData:null==t?void 0:t.allowedOutdatedData,splitItem:null==t?void 0:t.splitItem,orderItems:[{uniqueId:s,quantity:l}]};return b({id:c,type:"update_mutation",variables:d,orderFormItems:o},m),I(w({items:d.orderItems,orderFormItems:o,id:c,allowedOutdatedData:null==t?void 0:t.allowedOutdatedData,splitItem:null==t?void 0:t.splitItem}))},[I,m,n,w]),E=Object(r.useCallback)(async(e,t)=>{const{salesChannel:i,marketingData:r,allowedOutdatedData:a,splitItem:u}=null!=t?t:{},{newItems:s,updatedItems:o}=e.reduce((t,n)=>{var i;const{newItems:r,updatedItems:a}=t,u=n.options&&n.options.length>0?void 0:x.current.find(t=>q(n,t,e));return null==u?r.push(n):a.push({...n,quantity:(null!==(i=n.quantity)&&void 0!==i?i:1)+u.quantity}),t},{newItems:[],updatedItems:[]}),l=[];if(o.length&&o.forEach(e=>{const t=C(e,{allowedOutdatedData:a,splitItem:u});l.push(t)}),0===s.length)return Promise.all(l).then(D);const d=s.map(O),c=s.map((e,t)=>M(d[t],e));n(e=>{var t;return{...e,items:[...x.current,...c],totalizers:c.reduce((e,t)=>_({totalizers:e,newItem:t}).totalizers,null!==(t=e.totalizers)&&void 0!==t?t:[]),marketingData:null!=r?r:e.marketingData,value:e.value+c.reduce((e,t)=>e+t.sellingPrice*t.quantity,0)}}),b({type:"add_mutation",variables:{items:d,marketingData:r,salesChannel:i,allowedOutdatedData:a},orderFormItems:c},m);const f=I(g({mutationInputItems:d,mutationInputMarketingData:r,orderFormItems:c,salesChannel:i,allowedOutdatedData:null==t?void 0:t.allowedOutdatedData}));return Promise.all([...l,f]).then(D)},[g,I,m,n,C]),F=Object(r.useCallback)((e,t,n)=>E(e,{marketingData:t,salesChannel:n}),[E]),S=Object(r.useCallback)((e,t)=>{const n=T(e,t);n&&I(n)},[I,T]),j=Object(r.useCallback)((e,t)=>C({...e,quantity:0},t),[C]),P=Object(r.useMemo)(()=>({addItem:F,addItems:E,updateQuantity:C,removeItem:j,setManualPrice:S}),[F,E,C,j,S]);return Object(r.useEffect)(()=>{y(m).queue.forEach(e=>{"add_mutation"===e.type?I(g({mutationInputItems:e.variables.items,mutationInputMarketingData:e.variables.marketingData,orderFormItems:e.orderFormItems,salesChannel:e.variables.salesChannel,allowedOutdatedData:e.variables.allowedOutdatedData})):"update_mutation"===e.type&&I(w({items:e.variables.orderItems,orderFormItems:e.orderFormItems,allowedOutdatedData:e.variables.allowedOutdatedData,splitItem:e.variables.splitItem,id:e.id}))})},[g,I,m,w]),a.a.createElement(p.Provider,{value:P},e)}}}function F({useMutateAddItems:e,useMutateUpdateQuantity:t,useMutateSetManualPrice:n,useOrderForm:i,useLogger:r,useOrderQueue:a,useQueueStatus:u}){return E({useMutateAddItems:e,useMutateUpdateQuantity:t,useMutateSetManualPrice:n,useOrderForm:i,useLogger:r,useOrderQueue:a,useQueueStatus:u})}},,,,,,,,,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var i=n(0);const r={cancel:Object.create(null),timeout:Object.create(null)},a="drained",u="error",s="timeout";function o(){}class l{constructor(e){var t,n;this.queue=[],this._isClosed=!1,this.waiters=[],e||(e={}),this.defaultTimeout=e.timeout,this.name=null!==(t=e.name)&&void 0!==t?t:"SequentialTaskQueue",this.scheduler=null!==(n=e.scheduler)&&void 0!==n?n:l.defaultScheduler}get isClosed(){return this._isClosed}push(e,t){if(this._isClosed)throw new Error(this.name+" has been previously closed");const n={callback:e,args:(null==t?void 0:t.args)?Array.isArray(t.args)?t.args.slice():[t.args]:[],timeout:void 0!==(null==t?void 0:t.timeout)?t.timeout:this.defaultTimeout,cancellationToken:{cancel:e=>this.cancelTask(n,e)},resolve:void 0,reject:void 0};n.args.push(n.cancellationToken),this.queue.push(n),this.scheduler.schedule(()=>this.next());const i=new Promise((e,t)=>{n.resolve=e,n.reject=t});return i.cancel=e=>n.cancellationToken.cancel(e),i}cancel(){this.currentTask&&this.cancelTask(this.currentTask,r.cancel);const e=this.queue.splice(0);return e.length&&(e.forEach(e=>this.cancelTask(e,r.cancel)),this.emit(a)),this.wait()}indexOf(e){var t;if((null===(t=this.currentTask)||void 0===t?void 0:t.callback)===e)return 0;const n=this.queue.filter(e=>{var t;return!(null===(t=e.cancellationToken)||void 0===t?void 0:t.cancelled)}).findIndex(t=>t.callback===e);return n<0?n:n+(void 0!==this.currentTask?1:0)}close(e){return!this._isClosed&&(this._isClosed=!0,e)?this.cancel():this.wait()}async wait(){return this.currentTask||0!==this.queue.length?new Promise(e=>{this.waiters.push(e)}):Promise.resolve()}on(e,t){var n;this.events=null!==(n=this.events)&&void 0!==n?n:{},(this.events[e]||(this.events[e]=[])).push(t)}once(e,t){const n=(...i)=>{this.removeListener(e,n),t.apply(this,i)};this.on(e,n)}removeListener(e,t){if(this.events){const n=this.events[e];if(n){let e=0;for(;ee.apply(this,t))}catch(t){console.error(`${this.name}: Exception in '${e}' event handler`,t)}}next(){if(!this.currentTask){let t=this.queue.shift();for(;null==t?void 0:t.cancellationToken.cancelled;)t=this.queue.shift();if(t)try{this.currentTask=t,t.timeout&&(t.timeoutHandle=setTimeout(()=>{this.emit(s),this.cancelTask(t,r.timeout)},t.timeout));const n=t.callback.apply(void 0,t.args);n&&((e=n)&&"function"==typeof e.then)?n.then(e=>{t.result=e,this.doneTask(t)},e=>{this.doneTask(t,e)}):(t.result=n,this.doneTask(t))}catch(e){this.doneTask(t,e)}else this.callWaiters()}var e}cancelTask(e,t){e.cancellationToken.cancelled=!0,e.cancellationToken.reason=t,this.doneTask(e)}doneTask(e,t){e.timeoutHandle&&clearTimeout(e.timeoutHandle),e.cancellationToken.cancel=o,t?(this.emit(u,t),e.reject.call(void 0,t)):e.cancellationToken.cancelled?e.reject.call(void 0,e.cancellationToken.reason):e.resolve.call(void 0,e.result),this.currentTask===e&&(this.currentTask=void 0,this.queue.length?this.scheduler.schedule(()=>this.next()):(this.emit(a),this.callWaiters()))}callWaiters(){this.waiters.splice(0).forEach(e=>e())}}l.defaultScheduler={schedule:e=>setTimeout(()=>e(),0)},l.defaultScheduler={schedule:"function"==typeof e?t=>e(()=>t()):e=>setTimeout(()=>e(),0)};const d="TASK_CANCELLED",c={id:"default-order-form",items:[],value:-1,totalizers:[],marketingData:{},canEditData:!1,loggedIn:!1,paymentData:{isValid:!1,installmentOptions:[],paymentSystems:[],payments:[],availableAccounts:[]},messages:{couponMessages:[],generalMessages:[]},shipping:{isValid:!1,deliveryOptions:[],pickupOptions:[]}};Object(i.createContext)(void 0);var m,f,v,h,p;p=!("undefined"==typeof window||!window.document||!window.document.createElement)&&(null===(h=null===(v=null===(f=null===(m=window)||void 0===m?void 0:m.__RUNTIME__)||void 0===f?void 0:f.settings)||void 0===v?void 0:v["vtex.store"])||void 0===h?void 0:h.enableOrderFormOptimization),Object(i.createContext)({orderForm:c,setOrderForm:()=>{},error:void 0,loading:!1})}).call(this,n(15).setImmediate)},,,function(e,t,n){var i="undefined"!=typeof global&&global||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new a(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(16),t.setImmediate="undefined"!=typeof self&&self.setImmediate||"undefined"!=typeof global&&global.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||"undefined"!=typeof global&&global.clearImmediate||this&&this.clearImmediate},function(e,t,n){(function(e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,a,u,s,o=1,l={},d=!1,c=t.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(t);m=m&&m.setTimeout?m:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){v(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){v(e.data)},i=function(e){a.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,i=function(e){var t=c.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(v,0,e)}:(u="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(u)&&v(+e.data.slice(u.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),i=function(e){t.postMessage(u+e,"*")}),m.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},i=t.bailOut,n=void 0!==i&&i,a=Object(l.useState)(!1),r=Object(o.a)(a,2),s=r[0],u=r[1];return Object(l.useEffect)((function(){if(!n){var t=e.current;if(t){if(!t.complete){var i=function(){u(!0)};return t.addEventListener("load",i),function(){t.removeEventListener("load",i)}}u(!0)}}}),[e,n]),s}(X,{bailOut:!C}),Z=Object(d.useIntl)(),ee=c()(f,{migrationFrom:"vtex.store-components@3.x",classes:$}).handles,te={minWidth:w,minHeight:R,maxWidth:b,maxHeight:N},ie=Object.assign(Object.assign({},te),{height:P,width:y}),ne=null!==(r=null!==(i=null!==(t=null!=j?j:P)&&void 0!==t?t:N)&&void 0!==i?i:R)&&void 0!==r?r:"auto",oe=/(auto|inherit|initial|unset)|[^\d]/g,le=function(e){return""!==e&&e?e.toString().replace(oe,"$1"):null},ae=le(y),re=null!==(m=null!==(u=le(j))&&void 0!==u?u:le(P))&&void 0!==m?m:le(N),se=function(e){return null==e?void 0:e.toString().includes("%")},ue=!(!y||!j&&!N&&!P||se(y)||se(j)&&se(N)&&se(P)),ce=v()({id:h,intl:Z}),de=v()({id:O,intl:Z}),me=a.a.createElement("img",Object(n.a)({title:T,sizes:I,srcSet:k,src:"string"==typeof ce?ce:"",alt:"string"==typeof de?de:"",ref:X,className:ee.imageElement,loading:B,fetchpriority:K},D&&ue?{width:null!==(g=null!=ae?ae:y)&&void 0!==g?g:"auto",height:null!=re?re:"auto",style:te}:{style:ie},q?{"data-vtex-preload":"true"}:{})),ve=null!==(x=null==M?void 0:M.newTab)&&void 0!==x?x:null==M?void 0:M.openNewTab,pe=_()().push,ge="provide"===W?{id:V,name:z,creative:ce,position:F,products:[{productId:J,productName:U}]}:void 0,_e=v()({id:null==M?void 0:M.url,intl:Z}),fe=v()({id:null==M?void 0:M.attributeTitle,intl:Z}),xe=(null==M?void 0:M.url)?a.a.createElement(p.Link,{to:"string"==typeof _e?_e:"",title:"string"==typeof fe?fe:"",rel:M.attributeNofollow?"nofollow":"",target:ve?"_blank":void 0,className:ee.imageElementLink,onClick:function(){"none"!==W&&pe({event:"promotionClick",promotions:[ge]})}},me):a.a.createElement(l.Fragment,null,me);return s()({ref:X,onView:function(){"none"===W||Q||pe({event:"promoView",promotions:[ge]})},once:!0}),C?a.a.createElement("span",{className:"dib",style:{height:Y?"auto":ne}},xe):xe}var h=Object(d.defineMessages)({title:{id:"admin/editor.store-image.title"}});x.schema={title:h.title.id},x.cssHandles=f,t.default=x},,,,,,,,function(e,t,i){"use strict";i.r(t),function(e){var t=i(3);i.p=Object(t.getPublicPath)("vtex.store-image@0.24.0");var n=Object(t.register)((function(){return i(10)}),e,"vtex.store-image@0.24.0","vtex.store-image@0.x","Image");n.renderHotReload,n.setupHMR}.call(this,i(12)(e))}],[[18,"common"]]]); },function(){ !function(t){function e(e){for(var n,a,u=e[0],c=e[1],l=e[2],s=0,d=[];st.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0?r=o[i=d]:0!==n?(i=0,r=0):e&&(r=o[i=d]),l&&l({type:"SLIDE",payload:{currentSlide:i,transform:r}}),s({type:"SLIDE",payload:{transform:r,currentSlide:i}})}}},j=function(e){var t=Object(r.useState)(!1),n=Object(g.a)(t,2),i=n[0],a=n[1],o=Object(y.useSliderGroupState)(),s=Object(y.useSliderGroupDispatch)();return Object(r.useEffect)((function(){var t=function(){null==s||s({type:"HOVER",payload:{isHovering:!0}}),a(!0)},n=function(){null==s||s({type:"HOVER",payload:{isHovering:!1}}),a(!1)};return(null==e?void 0:e.current)&&(e.current.addEventListener("mouseenter",t),e.current.addEventListener("mouseleave",n)),function(){var i=e.current;i&&(i.removeEventListener("mouseenter",t),i.removeEventListener("mouseleave",n))}}),[e,s]),(null==o?void 0:o.isHovering)?{isHovering:!0}:{isHovering:i}},T=n(14),_=n.n(T)()(X),I=_.CssHandlesProvider,M=_.useContextCssHandles,N=function(e,t){return t%e==0?"firstVisible":(t+1)%e==0?"lastVisible":""},x=function(e){return a.a.Children.toArray(a.a.Children.map(e,(function(e){return"string"==typeof e||"number"==typeof e?e:Object(r.cloneElement)(e,Object.assign(Object.assign({},e.props),{__isDuplicated:!0}))})))},C=function(e){var t=e.infinite,n=e.usePagination,s=e.centerMode,l=e.centerModeSlidesGap,d=e.totalItems,c=e.children,u=P(),f=u.slideWidth,v=u.slidesPerPage,p=u.currentSlide,m=u.isOnTouchMove,g=u.useSlidingTransitionEffect,S=u.slideTransition,h=S.speed,b=S.timing,O=S.delay,w=u.transformMap,j=u.transform,T=E(),_=Object(o.useIntl)(),I=Object(y.useSliderGroupDispatch)(),C=M(),D=C.handles,R=C.withModifiers,A=function(e){var t=e.currentSlide,n=e.slidesPerPage,i=e.totalItems,a=e.centerMode,o=Object(r.useRef)(new Set);Object(r.useEffect)((function(){for(var e=0;e=n&&t=n&&t+1=n&&t-1=r)}({index:e,currentSlide:t,slidesToShow:n,totalItems:i,centerMode:a})};return{shouldRenderItem:function(e){return o.current.has(e)||s(e)},isItemVisible:s}}({currentSlide:p,slidesPerPage:v,totalItems:d,centerMode:s}),L=A.shouldRenderItem,k=A.isItemVisible,H=t&&c?x(c).slice(0,v):[],U=(t&&c?x(c).slice(c.length-v):[]).concat(null!=c?c:[],H),G=v<=d?"".concat(100*U.length/v,"%"):"100%";return a.a.createElement("div",{"data-testid":"slider-track",className:"".concat(D.sliderTrack," flex ").concat("disabled"!==s?"":"justify-around"," relative pa0 ma0"),style:{transition:m||!g?void 0:"transform ".concat(h,"ms ").concat(b," ").concat(O,"ms"),transform:"translate3d(".concat(m?j:w[p],"%, 0, 0)"),width:G},onTransitionEnd:function(){T({type:"DISABLE_TRANSITION"}),p>=d&&(T({type:"ADJUST_CURRENT_SLIDE",payload:{currentSlide:0,transform:w[0]}}),null==I||I({type:"SLIDE",payload:{currentSlide:0,transform:w[0]}})),p<0&&(T({type:"ADJUST_CURRENT_SLIDE",payload:{currentSlide:p+d,transform:w[p+d]}}),null==I||I({type:"SLIDE",payload:{currentSlide:p+d,transform:w[p+d]}}))},"aria-atomic":"false","aria-live":"polite"},U.map((function(e,r){var o=r-(t?v:0),c={width:"".concat(f,"%"),marginLeft:"disabled"===s||l?void 0:"".concat(f/(8*v),"%"),marginRight:"disabled"===s||l?void 0:"".concat(f/(8*v),"%"),paddingLeft:"disabled"!==s&&l?l/2:void 0,paddingRight:"disabled"!==s&&l?l/2:void 0};return a.a.createElement("div",Object(i.a)({key:o},function(e){var t=e.visible,n=e.index,i=e.totalItems,r=e.intl;return n<0||n>=i?{"aria-hidden":!t,role:"none presentation"}:{"aria-hidden":!t,role:"group","aria-roledescription":"slide","aria-label":"".concat(r.formatMessage({id:"store/slider-layout.sliderTrack.aria-label"},{slide:n+1,total:i}))}}({visible:k(o),index:o,totalItems:d,intl:_}),{className:"".concat(R("slide",[N(v,o),k(o)?"visible":"hidden"])," flex relative"),"data-index":o>=0&&o0?u(i):c(i)};return a.a.createElement("div",{className:"".concat(p.paginationDotsContainer," flex absolute justify-center pa0 ma0 bottom-0 left-0 right-0"),role:"group","aria-label":"Slider pagination dots"},y.map((function(e){var n=e===H(g,s,o);return a.a.createElement("div",{className:"".concat(m("paginationDot",n?"isActive":"")," ").concat(n?"bg-emphasis":"bg-muted-3"," grow dib br-100 pa2 mr2 ml2 bw0 pointer"),style:{height:"".concat(.625,"rem"),width:"".concat(.625,"rem")},key:e,tabIndex:0,onKeyDown:function(t){return S(t,e)},onClick:function(t){return S(t,e)},role:"button","aria-controls":t,"aria-current":n?"step":void 0,"aria-label":"Dot ".concat(e+1," of ").concat(y.length),"data-testid":"paginationDot"})})))},G=Object(r.memo)(U),W=["sliderLayoutContainer","sliderTrackContainer"].concat(Object(v.a)(["sliderTrack","slide","slideChildrenContainer"]),Object(v.a)(["sliderLeftArrow","sliderRightArrow","sliderArrows"]),Object(v.a)(["paginationDotsContainer","paginationDot"])),z=function(e){var t=e.children,n=e.totalItems,i=e.infinite,o=void 0!==i&&i,s=e.showNavigationArrows,l=e.showPaginationDots,d=e.usePagination,c=void 0===d||d,u=e.arrowSize,f=e.fullWidth,v=e.itemsPerPage,p=e.centerMode,y=e.centerModeSlidesGap,S=M().handles,h=m()().isMobile,b=P(),O=b.label,T=void 0===O?"slider":O,_=b.slidesPerPage,I=Object(r.useRef)(null),N=function(e){var t=e.infinite,n=e.centerMode,i=E(),a=P().transform,o=w(t),s=o.goForward,l=o.goBack,d=Object(r.useState)({touchStartX:0,touchInitialTransform:a}),c=Object(g.a)(d,2),u=c[0],f=c[1];return{onTouchEnd:function(e){var t=e.changedTouches[0].clientX-u.touchStartX;Math.abs(t)>75?(t>0&&l(),t<0&&s()):i({type:"TOUCH",payload:{transform:u.touchInitialTransform,isOnTouchMove:!1}}),f({touchStartX:0,touchInitialTransform:a}),i({type:"TOUCH",payload:{isOnTouchMove:!1}})},onTouchStart:function(e){var t=e.touches[0].clientX;f({touchStartX:t,touchInitialTransform:a})},onTouchMove:function(e){var t=e.touches[0].clientX-u.touchStartX,r=u.touchInitialTransform+t/(25*("disabled"!==n?2:1));i({type:"TOUCH",payload:{transform:r,isOnTouchMove:!0}})}}}({infinite:o,centerMode:p}),x=N.onTouchEnd,D=N.onTouchStart,R=N.onTouchMove;!function(e,t){var n=P().autoplay,i=j(t).isHovering,a=(null==n?void 0:n.stopOnHover)&&i,o=w(e).goForward;Object(r.useEffect)((function(){if(n){var e=setTimeout((function(){o()}),n.timeout);return a&&clearTimeout(e),function(){return clearTimeout(e)}}}),[o,a,n])}(o,I),function(e,t){var n=P(),i=n.navigationStep,a=n.isPageNavigationStep,o=n.totalItems,s=E();Object(r.useEffect)((function(){var n=o<=t?o:t,r=a?n:i,l=function(e){s({type:"ADJUST_ON_RESIZE",payload:{shouldCorrectItemPosition:e,slidesPerPage:n,navigationStep:r}})},d=function(t){l(!t||e)};return l(!1),window.addEventListener("resize",d),function(){return window.removeEventListener("resize",d)}}),[e,s,o,t,a,i])}(o,v);var A=_>=n,L="".concat(T.toLowerCase().trim().replace(/ /g,"-"),"-items-").concat(Math.random().toString(36).substring(2,9)),H=Boolean(("always"===s||"mobileOnly"===s&&h||"desktopOnly"===s&&!h)&&!A),U=Boolean(("always"===l||"mobileOnly"===l&&h||"desktopOnly"===l&&!h)&&!A);return a.a.createElement("section",{onTouchStart:function(e){return c&&!A?D(e):null},onTouchEnd:function(e){return c&&!A?x(e):null},onTouchMove:function(e){return c&&!A?R(e):null},"aria-label":T,id:L,style:{WebkitOverflowScrolling:c?void 0:"touch",paddingLeft:f?void 0:2*u,paddingRight:f?void 0:2*u,touchAction:"pan-y"},className:"w-100 flex items-center relative ".concat(S.sliderLayoutContainer)},a.a.createElement("div",{className:"w-100 ".concat(S.sliderTrackContainer," ").concat(c?"overflow-hidden":"overflow-x-scroll"),ref:I},a.a.createElement(C,{centerMode:p,centerModeSlidesGap:y,infinite:o,totalItems:n,usePagination:c},t)),H&&c&&a.a.createElement(r.Fragment,null,a.a.createElement(k,{totalItems:n,orientation:"left",controls:L,infinite:o,arrowSize:u}),a.a.createElement(k,{totalItems:n,orientation:"right",controls:L,infinite:o,arrowSize:u})),U&&c&&a.a.createElement(G,{totalItems:n,controls:L,infinite:o}))},F=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);re.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&"not-empty"===c||"always"===c;return o.a.createElement(_.a,{icon:o.a.createElement("span",{className:"".concat(v.minicartIconContainer," gray relative")},o.a.createElement(i,null),g&&o.a.createElement("span",{style:{userSelect:"none"},className:"".concat(v.minicartQuantityBadge," ").concat(C.a.minicartQuantityBadgeDefault," c-on-emphasis absolute t-mini bg-emphasis br4 w1 h1 pa1 flex justify-center items-center lh-solid")},N)),variation:"tertiary",onMouseEnter:"hover"===E?function(){return h({type:"OPEN_MINICART"})}:void 0,onClick:function(){if(O)return"popupWithLink"===u&&P(w),"hover"===E?void h({type:"SET_OPEN_BEHAVIOR",value:"click"}):(h({type:"CLOSE_MINICART"}),void h({type:"SET_OPEN_BEHAVIOR",value:"hover"}));h({type:x?"CLOSE_MINICART":"OPEN_MINICART"})}})},P=function(e){var t=e.children,n=e.quantityDisplay,a=e.Icon,i=e.itemCountMode,r=e.customPixelEventId,c=e.customPixelEventName,u=e.variation,l=Object(I.useMinicartState)(),s=l.open,d=l.openBehavior,p=l.hasBeenOpened,m=l.openOnHoverProp,f=Object(I.useMinicartDispatch)(),E=y().handles;x()({eventId:r,eventName:c,handler:function(){f({type:"OPEN_MINICART"})}});return o.a.createElement("div",{onMouseLeave:"hover"===d?function(){f({type:"CLOSE_MINICART"})}:void 0},o.a.createElement(w,{variation:u,Icon:a,itemCountMode:i,quantityDisplay:n}),s&&o.a.createElement(v.a,null,"click"===d&&o.a.createElement("div",{className:"fixed top-0 left-0 w-100 h-100",onClick:function(){m&&f({type:"SET_OPEN_BEHAVIOR",value:"hover"}),f({type:"CLOSE_MINICART"})}}),o.a.createElement("div",{className:"".concat(E.popupWrapper," ").concat(C.a.popupBoxPosition," absolute z-max flex flex-column")},o.a.createElement("div",{className:"".concat(E.popupContentContainer," w-100 shadow-3 bg-base")},o.a.createElement("div",{className:"".concat(E.arrowUp," ").concat(C.a.popupArrowUp," absolute top-0 bg-base h1 w1 pa4 rotate-45")}),o.a.createElement("div",{className:"".concat(E.popupChildrenContainer," mt3 bg-base relative flex flex-column ph5 pv3")},p&&t)))))},g=n(56),R=n.n(g),j=function(e){var t=e.Icon,n=e.children,a=e.maxDrawerWidth,i=e.quantityDisplay,r=e.itemCountMode,c=e.drawerSlideDirection,u=e.backdropMode,l=void 0===u?"visible":u,s=e.customPixelEventId,d=e.customPixelEventName,p=e.onVisibilityChanged,m=y().handles;return o.a.createElement(R.a,{maxWidth:a,backdropMode:l,slideDirection:c,customPixelEventId:s,customPixelEventName:d,onVisibilityChanged:p,customIcon:o.a.createElement(w,{Icon:t,itemCountMode:r,quantityDisplay:i})},o.a.createElement("div",{className:"".concat(m.minicartSideBarContentWrapper," flex flex-column w-100 h-100"),style:{height:window.innerHeight-58}},n))},D=n(33),S=n(34),k=[].concat(Object(i.a)(["popupWrapper","popupContentContainer","arrowUp","popupChildrenContainer"]),Object(i.a)(["minicartSideBarContentWrapper"]),Object(i.a)(["minicartIconContainer","minicartQuantityBadge"]),["minicartWrapperContainer","minicartContainer"]),T=function(e){var t=e.children,n=e.backdropMode,i=e.linkVariationUrl,c=e.maxDrawerWidth,d=void 0===c?400:c,m=e.MinicartIcon,v=void 0===m?u.a:m,f=e.quantityDisplay,x=void 0===f?"not-empty":f,E=e.itemCountMode,_=void 0===E?"distinct":E,O=e.drawerSlideDirection,C=void 0===O?"rightToLeft":O,h=e.customPixelEventId,b=e.customPixelEventName,y=e.classes,M=p()(k,{classes:y}),g=M.handles,R=M.withModifiers,D=Object(l.useOrderForm)().orderForm,T=Object(I.useMinicartState)(),B=T.variation,U=T.open,A=Object(r.useState)(null!=U&&U),H=Object(a.a)(A,2),W=H[0],q=H[1],L=Object(s.useCheckoutURL)().url,V=Object(r.useCallback)((function(e){q(e)}),[q]);return Object(S.a)("drawer"===B?W:U,null==D?void 0:D.items),"link"===B?o.a.createElement("aside",{className:"".concat(g.minicartWrapperContainer," relative fr flex items-center")},o.a.createElement("div",{className:"".concat(g.minicartContainer," flex flex-column")},o.a.createElement("a",{href:null!=i?i:L},o.a.createElement(N,{handles:g,withModifiers:R},o.a.createElement(w,{variation:B,Icon:v,itemCountMode:_,quantityDisplay:x}))))):"block"===B?o.a.createElement("aside",{className:"".concat(g.minicartWrapperContainer," relative fr flex items-center")},o.a.createElement("div",{className:"".concat(g.minicartContainer," flex flex-column")},t)):o.a.createElement("aside",{className:"".concat(g.minicartWrapperContainer," relative fr flex items-center")},o.a.createElement("div",{className:"".concat(g.minicartContainer," flex flex-column")},o.a.createElement(N,{handles:g,withModifiers:R},"drawer"===B?o.a.createElement(j,{Icon:v,backdropMode:n,itemCountMode:_,maxDrawerWidth:d,quantityDisplay:x,drawerSlideDirection:C,customPixelEventId:h,customPixelEventName:b,onVisibilityChanged:V},t):o.a.createElement(P,{Icon:v,itemCountMode:_,quantityDisplay:x,customPixelEventId:h,customPixelEventName:b,variation:B},t))))},B=function(){var e=Object(l.useOrderForm)(),t=e.orderForm,n=!e.loading&&t?t.id:void 0;return Object(D.a)(n),null};t.default=function(e){return o.a.createElement(I.MinicartContextProvider,{variation:e.variation,openOnHover:e.openOnHover},o.a.createElement(B,null),o.a.createElement(T,e))}},12:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixel"]},14:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.order-manager@0.x/OrderForm"]},15:function(e,t,n){"use strict";n.r(t),n.d(t,"MinicartStateContext",(function(){return u})),n.d(t,"MinicartContextProvider",(function(){return p})),n.d(t,"useMinicartDispatch",(function(){return v})),n.d(t,"useMinicartState",(function(){return m}));var a=n(13),i=n(0),r=n.n(i),o=n(21),c=n.n(o),u=Object(i.createContext)(void 0),l=Object(i.createContext)(void 0);function s(e,t){switch(t.type){case"OPEN_MINICART":return Object.assign(Object.assign({},e),{open:!0,hasBeenOpened:!0});case"CLOSE_MINICART":return Object.assign(Object.assign({},e),{open:!1});case"SET_OPEN_BEHAVIOR":return Object.assign(Object.assign({},e),{openBehavior:t.value});default:return e}}var d=function(e){return"popup"===e||"popupWithLink"===e},p=function(e){var t=e.variation,n=void 0===t?"drawer":t,o=e.openOnHover,p=void 0!==o&&o,m=e.children,v=c()().isMobile,f=d(n)&&(v||window&&window.innerWidth<=480)?"drawer":n,x=Object(i.useReducer)(s,{variation:f,open:!1,hasBeenOpened:!1,openOnHoverProp:p,openBehavior:d(f)&&p?"hover":"click"}),E=Object(a.a)(x,2),_=E[0],O=E[1];return r.a.createElement(u.Provider,{value:_},r.a.createElement(l.Provider,{value:O},m))};function m(){var e=Object(i.useContext)(u);if(void 0===e)throw new Error("useMinicartState must be used within a MinicartContextProvider");return e}function v(){var e=Object(i.useContext)(l);if(void 0===e)throw new Error("useMinicartDispatch must be used within a MinicartContextProvider");return e}},19:function(e,t,n){e.exports={drawerStyles:"vtex-minicart-2-x-drawerStyles",popupStyles:"vtex-minicart-2-x-popupStyles",minicartEmptyStateContainerDefault:"vtex-minicart-2-x-minicartEmptyStateContainerDefault",minicartQuantityBadgeDefault:"vtex-minicart-2-x-minicartQuantityBadgeDefault",popupBoxPosition:"vtex-minicart-2-x-popupBoxPosition",popupArrowUp:"vtex-minicart-2-x-popupArrowUp"}},21:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.device-detector@0.x/useDevice"]},22:function(e,t){function n(e,t,n){var a,i,r,o,c;function u(){var l=Date.now()-o;l=0?a=setTimeout(u,t-l):(a=null,n||(c=e.apply(r,i),r=i=null))}null==t&&(t=100);var l=function(){r=this,i=arguments,o=Date.now();var l=n&&!a;return a||(a=setTimeout(u,t)),l&&(c=e.apply(r,i),r=i=null),c};return l.clear=function(){a&&(clearTimeout(a),a=null)},l.flush=function(){a&&(c=e.apply(r,i),r=i=null,clearTimeout(a),a=null)},l}n.debounce=n,e.exports=n},24:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(6),i=n(3);function r(){var e=Object(a.useCheckoutURL)(),t=e.url,n=e.major,r=Object(i.useRuntime)(),o=r.navigate,c=r.rootPath,u=void 0===c?"":c;return function(e){n>0&&e===t?o({to:e}):window.location.href="".concat(u).concat(e)}}},26:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconCart"]},27:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-portal@0.x/Overlay"]},28:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/ButtonWithIcon"]},3:function(e,t){e.exports=__RENDER_8_RUNTIME__},33:function(e,t,n){"use strict";var a=n(0),i=n(12),r=n.n(i);t.a=function(e){var t=r()().push;Object(a.useEffect)((function(){e&&t({event:"cartId",cartId:e})}),[t,e])}},34:function(e,t,n){"use strict";var a=n(0),i=n(12),r=n.n(i),o=n(22),c=n(8);t.a=function(e,t){var n=r()().push,i=Object(c.c)(t),u=Object(a.useCallback)(Object(o.debounce)((function(e){n({event:"viewCart",items:e})}),1e3),[n]);Object(a.useEffect)((function(){e&&u(i)}),[u,e,i])}},5:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},54:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixelEventCallback"]},55:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/createCssHandlesContext"]},56:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-drawer@0.x/Drawer"]},6:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.checkout-resources@0.x/Utils"]},77:function(e,t,n){"use strict";n.r(t),function(e){var t=n(4);n.p=Object(t.getPublicPath)("vtex.minicart@2.68.0");var a=Object(t.register)((function(){return n(103)}),e,"vtex.minicart@2.68.0","vtex.minicart@2.x","Minicart");a.renderHotReload,a.setupHMR}.call(this,n(20)(e))},8:function(e,t,n){"use strict";function a(e){var t;return{skuId:e.id,variant:e.skuName,price:e.sellingPrice,priceIsInt:!0,name:o(e),quantity:e.quantity,productId:e.productId,productRefId:e.productRefId,brand:e.additionalInfo?e.additionalInfo.brandName:"",category:c(e),detailUrl:e.detailUrl,imageUrl:e.imageUrls?r(e.imageUrls.at3x):null!==(t=e.imageUrl)&&void 0!==t?t:"",referenceId:e.refId}}function i(e){var t=e.category?e.category.slice(1,-1):"";return{skuId:e.id,variant:e.skuName,price:e.sellingPrice,priceIsInt:!0,name:e.name,quantity:e.quantity,productId:e.productId,productRefId:e.productRefId,brand:e.brand,category:t,detailUrl:e.detailUrl,imageUrl:e.imageUrl,referenceId:e.refId}}function r(e){return e&&0!==e.indexOf("http")?"https:".concat(e):e}function o(e){if((null==e?void 0:e.name)&&!e.name.includes(e.skuName)||e.name===e.skuName)return e.name;var t=1+e.skuName.length;return e.name.slice(0,e.name.length-t)}function c(e){try{return e.productCategoryIds.split("/").filter((function(e){return e.length})).map((function(t){return e.productCategories[t]})).join("/")}catch(e){return""}}function u(e){return e&&e.length?e.map((function(e){return a(e)})):[]}n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return u}))}},[[77,"common"]]]); },function(){ !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];st.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0)&&l(e,!o)}e.exports=t.default},70:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")})));s=null},t.log=function(){0},t.assertNodeList=i,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var o=document.querySelectorAll(t);i(o,t),t=o}return s=t||s},t.validateElement=u,t.hide=function(e){var t=!0,o=!1,n=void 0;try{for(var r,l=u(e)[Symbol.iterator]();!(t=(r=l.next()).done);t=!0){r.value.setAttribute("aria-hidden","true")}}catch(e){o=!0,n=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw n}}},t.show=function(e){var t=!0,o=!1,n=void 0;try{for(var r,l=u(e)[Symbol.iterator]();!(t=(r=l.next()).done);t=!0){r.value.removeAttribute("aria-hidden")}}catch(e){o=!0,n=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw n}}},t.documentNotReadyOrSSRTesting=function(){s=null};var n,r=o(87),l=(n=r)&&n.__esModule?n:{default:n},a=o(61);var s=null;function i(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,l.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},71:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(r.openInstances.length),r.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){r=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var o=t.openInstances.indexOf(e);-1!==o&&(t.openInstances.splice(o,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(o){return o(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},r=new n;t.default=r},83:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var n=Object.assign||function(e){for(var t=1;t0&&0===(b-=1)&&c.show(t),o.props.shouldFocusAfterRender&&(o.props.shouldReturnFocusAfterClose?(i.returnFocus(o.props.preventScroll),i.teardownScopedFocus()):i.popWithoutFocus()),o.props.onAfterClose&&o.props.onAfterClose(),h.default.deregister(o)},o.open=function(){o.beforeOpen(),o.state.afterOpen&&o.state.beforeClose?(clearTimeout(o.closeTimer),o.setState({beforeClose:!1})):(o.props.shouldFocusAfterRender&&(i.setupScopedFocus(o.node),i.markForFocusLater()),o.setState({isOpen:!0},(function(){o.openAnimationFrame=requestAnimationFrame((function(){o.setState({afterOpen:!0}),o.props.isOpen&&o.props.onAfterOpen&&o.props.onAfterOpen({overlayEl:o.overlay,contentEl:o.content})}))})))},o.close=function(){o.props.closeTimeoutMS>0?o.closeWithTimeout():o.closeWithoutTimeout()},o.focusContent=function(){return o.content&&!o.contentHasFocus()&&o.content.focus({preventScroll:!0})},o.closeWithTimeout=function(){var e=Date.now()+o.props.closeTimeoutMS;o.setState({beforeClose:!0,closesAt:e},(function(){o.closeTimer=setTimeout(o.closeWithoutTimeout,o.state.closesAt-Date.now())}))},o.closeWithoutTimeout=function(){o.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},o.afterClose)},o.handleKeyDown=function(e){9===e.keyCode&&(0,u.default)(o.content,e),o.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),o.requestClose(e))},o.handleOverlayOnClick=function(e){null===o.shouldClose&&(o.shouldClose=!0),o.shouldClose&&o.props.shouldCloseOnOverlayClick&&(o.ownerHandlesClose()?o.requestClose(e):o.focusContent()),o.shouldClose=null},o.handleContentOnMouseUp=function(){o.shouldClose=!1},o.handleOverlayOnMouseDown=function(e){o.props.shouldCloseOnOverlayClick||e.target!=o.overlay||e.preventDefault()},o.handleContentOnClick=function(){o.shouldClose=!1},o.handleContentOnMouseDown=function(){o.shouldClose=!1},o.requestClose=function(e){return o.ownerHandlesClose()&&o.props.onRequestClose(e)},o.ownerHandlesClose=function(){return o.props.onRequestClose},o.shouldBeClosed=function(){return!o.state.isOpen&&!o.state.beforeClose},o.contentHasFocus=function(){return document.activeElement===o.content||o.content.contains(document.activeElement)},o.buildClassName=function(e,t){var n="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},l=n.base;return o.state.afterOpen&&(l=l+" "+n.afterOpen),o.state.beforeClose&&(l=l+" "+n.beforeClose),"string"==typeof t&&t?l+" "+t:l},o.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(o,n){return o[e+"-"+n]=t[n],o}),{})},o.state={afterOpen:!1,beforeClose:!1},o.shouldClose=null,o.moveFromContentToOverlay=null,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,o=e.ariaHideApp,n=e.htmlOpenClassName,r=e.bodyOpenClassName;r&&f.add(document.body,r),n&&f.add(document.getElementsByTagName("html")[0],n),o&&(b+=1,c.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,o=e.className,r=e.overlayClassName,l=e.defaultStyles,a=e.children,s=o?{}:l.content,i=r?{}:l.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:n({},i,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=n({id:t,ref:this.setContentRef,style:n({},s,this.props.style.content),className:this.buildClassName("content",o),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),f=this.props.contentElement(c,a);return this.props.overlayElement(u,f)}}]),t}(a.Component);O.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},O.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(p.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(p.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=O,e.exports=t.default},85:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){0},t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var n,r=o(69),l=(n=r)&&n.__esModule?n:{default:n};var a=[],s=null,i=!1;function u(){i=!0}function c(){if(i){if(i=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,l.default)(s)[0]||s).focus()}),0)}}},86:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var o=(0,l.default)(e);if(!o.length)return void t.preventDefault();var n=void 0,r=t.shiftKey,a=o[0],s=o[o.length-1],i=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement}();if(e===i){if(!r)return;n=s}s!==i||r||(n=a);a===i&&r&&(n=s);if(n)return t.preventDefault(),void n.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==u||"Chrome"==u[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var c=o.indexOf(i);c>-1&&(c+=r?-1:1);if(void 0===(n=o[c]))return t.preventDefault(),void(n=r?s:a).focus();t.preventDefault(),n.focus()};var n,r=o(69),l=(n=r)&&n.__esModule?n:{default:n};e.exports=t.default},87:function(e,t,o){"use strict";var n=function(){};e.exports=n},88:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)l(e,n[t]);var o=document.body;for(var a in r)l(o,r[a]);n={},r={}},t.log=function(){0};var n={},r={};function l(e,t){e.classList.remove(t)}t.add=function(e,t){return o=e.classList,l="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(l,e),o.add(e)}));var o,l},t.remove=function(e,t){return o=e.classList,l="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(l,e),0===l[e]&&o.remove(e)}));var o,l}},89:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,s],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},90:function(e,t,o){"use strict";function n(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var o=this.constructor.getDerivedStateFromProps(e,t);return null!=o?o:null}.bind(this))}function l(e,t){try{var o=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(o,n)}finally{this.props=o,this.state=n}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var o=null,a=null,s=null;if("function"==typeof t.componentWillMount?o="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(o="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==o||null!==a||null!==s){var i=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==o?"\n "+o:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=n,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=l;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,o){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:o;c.call(this,e,t,n)}}return e}o.r(t),o.d(t,"polyfill",(function(){return a})),n.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,l.__suppressDeprecationWarning=!0}}]); },function(){ (window.webpackJsonpvtex_delivery_promise_components_1_1_0=window.webpackJsonpvtex_delivery_promise_components_1_1_0||[]).push([[0],{18:function(n,t,e){"use strict";e.r(t),e.d(t,"getAddress",(function(){return p})),e.d(t,"updateSession",(function(){return d})),e.d(t,"clearShippingSession",(function(){return l})),e.d(t,"getPickups",(function(){return h})),e.d(t,"updateOrderForm",(function(){return v})),e.d(t,"clearOrderFormShipping",(function(){return m})),e.d(t,"getCatalogCount",(function(){return y})),e.d(t,"getCartProducts",(function(){return O})),e.d(t,"orderFormItemsToAvailabilityItems",(function(){return _})),e.d(t,"validateProductAvailability",(function(){return b})),e.d(t,"validateProductAvailabilityByDelivery",(function(){return I})),e.d(t,"validateProductAvailabilityByPickup",(function(){return g}));var o=e(7),r=e.n(o),i=e(11),c=e(23),a=e(29),u=function(n,t,e){return{zipCode:n,coordinate:{longitude:e[0],latitude:e[1]},country:t}},s=function(n,t){return null==t||""===t.trim()?n:"".concat(n,"&sc=").concat(encodeURIComponent(t.trim()))},p=function(n,t,e){return fetch("/api/checkout/pub/postal-code/".concat(n,"/").concat(t,"?an=").concat(e)).then((function(n){return n.json()}))},d=function(){var n=Object(i.a)(r.a.mark((function n(t,e,o,i,u){var s;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s="zip-code=".concat(e,";country=").concat(t,";coordinates=").concat(o.join(",")).concat(u?";shipping=".concat(u):"").concat(i?";pickupPoint=".concat(i.pickupPoint.id):""),Object(a.d)(c.SHIPPING_INFO_COOKIE,s.replace(/;/g,":")),n.next=4,fetch("/api/sessions",{method:"POST",body:JSON.stringify({public:{facets:{value:s}}}),headers:{"Content-Type":"application/json"}});case 4:case"end":return n.stop()}}),n)})));return function(t,e,o,r,i){return n.apply(this,arguments)}}();function f(n){var t,e,o,r,i,c,a=n.address;return{distance:n.distance,pickupPoint:{id:n.pickupId,friendlyName:n.pickupName,address:{neighborhood:null!==(t=null==a?void 0:a.neighborhood)&&void 0!==t?t:"",street:null!==(e=null==a?void 0:a.street)&&void 0!==e?e:"",postalCode:null!==(o=null==a?void 0:a.postalCode)&&void 0!==o?o:"",city:null!==(r=null==a?void 0:a.city)&&void 0!==r?r:"",number:null!==(i=null==a?void 0:a.number)&&void 0!==i?i:"",state:null!==(c=null==a?void 0:a.state)&&void 0!==c?c:""},isActive:n.isActive}}}var l=function(){var n=Object(i.a)(r.a.mark((function n(){return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return document.cookie="".concat(c.SHIPPING_INFO_COOKIE,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;"),n.next=3,fetch("/api/sessions",{method:"POST",body:JSON.stringify({public:{facets:{value:""}}}),headers:{"Content-Type":"application/json"}});case 3:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),h=function(n,t,e,o){return fetch("/api/intelligent-search/v0/pickup-point-availability/trade-policy/".concat(encodeURIComponent(o),"?zip-code=").concat(encodeURIComponent(t),"&an=").concat(encodeURIComponent(e),"&country=").concat(encodeURIComponent(n)),{method:"GET",credentials:"omit"}).then((function(n){if(!n.ok)throw new Error("pickup-point-availability failed (".concat(n.status,")"));return n.json()})).then((function(n){return{items:Array.isArray(null==n?void 0:n.pickupPointDistances)&&n.pickupPointDistances?n.pickupPointDistances.map(f):[]}})).catch((function(){return{items:[]}}))},v=function(n,t,e){return fetch("/api/checkout/pub/orderForm/".concat(e,"/attachments/shippingData"),{method:"POST",body:'{"selectedAddresses": [{ "postalCode": "'.concat(t,'", "country": "').concat(n,'" }]}'),headers:{"Content-Type":"application/json"}}).then((function(n){return n.json()}))},m=function(n){return fetch("/api/checkout/pub/orderForm/".concat(n,"/attachments/shippingData"),{method:"POST",body:JSON.stringify({selectedAddresses:[]}),headers:{"Content-Type":"application/json"}}).then((function(n){return n.json()}))},y=function(n,t){return fetch("/api/io/_v/api/intelligent-search/catalog_count?zip-code=".concat(n,"&coordinates=").concat(t.join(",")),{method:"GET",credentials:"omit"}).then((function(n){return n.json()}))},O=function(){var n=Object(i.a)(r.a.mark((function n(t){var e;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch("/api/checkout/pub/orderForm/".concat(t)).then((function(n){return n.json()}));case 2:return e=n.sent,n.abrupt("return",e.items);case 4:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),_=function(n){return n.map((function(n){var t=n,e=String(t.id);return{itemId:e,productId:null!=t.productId&&""!==String(t.productId)?String(t.productId):e}}))},b=function(){var n=Object(i.a)(r.a.mark((function n(t,e,o,i,c){var a,d,f;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p(e,t,i);case 2:return a=n.sent,d={location:u(t,e,a.geoCoordinates),items:o},f=s("/api/delivery-promises-bff/availability/deliveryorpickup?an=".concat(encodeURIComponent(i)),c),n.abrupt("return",fetch(f,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json"}}).then((function(n){return n.json()})));case 6:case"end":return n.stop()}}),n)})));return function(t,e,o,r,i){return n.apply(this,arguments)}}(),I=function(){var n=Object(i.a)(r.a.mark((function n(t,e,o,i,c){var a,d,f;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p(e,t,i);case 2:return a=n.sent,d={location:u(t,e,a.geoCoordinates),items:o},f=s("/api/delivery-promises-bff/availability/delivery?an=".concat(encodeURIComponent(i)),c),n.abrupt("return",fetch(f,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json"}}).then((function(n){return n.json()})));case 6:case"end":return n.stop()}}),n)})));return function(t,e,o,r,i){return n.apply(this,arguments)}}(),g=function(){var n=Object(i.a)(r.a.mark((function n(t,e,o,i,c,a){var u,d;return r.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p(i,o,c);case 2:return u={items:e},d=s("/api/delivery-promises-bff/availability/pickupid?an=".concat(encodeURIComponent(c),"&pickupId=").concat(encodeURIComponent(t)),a),n.abrupt("return",fetch(d,{method:"POST",body:JSON.stringify(u),headers:{"Content-Type":"application/json"}}).then((function(n){return n.json()})));case 5:case"end":return n.stop()}}),n)})));return function(t,e,o,r,i,c){return n.apply(this,arguments)}}()},23:function(n,t,e){"use strict";e.r(t),e.d(t,"DEFAULT_TRADE_POLICY",(function(){return o})),e.d(t,"DELIVER_DRAWER_PIXEL_EVENT_ID",(function(){return r})),e.d(t,"STORE_DRAWER_PIXEL_EVENT_ID",(function(){return i})),e.d(t,"SHIPPING_INFO_COOKIE",(function(){return c})),e.d(t,"PRODUCTS_NOT_FOUND_ERROR_CODE",(function(){return a})),e.d(t,"SHOPPER_LOCATION_MODAL_PIXEL_EVENT_ID",(function(){return u}));var o="1",r="shipping-option-deliver-to",i="shipping-option-store",c="shipping_info",a="products-not-found-error",u="item-added-to-cart-shipping-modal"},29:function(n,t,e){"use strict";e.d(t,"d",(function(){return i})),e.d(t,"b",(function(){return c})),e.d(t,"a",(function(){return a})),e.d(t,"c",(function(){return u}));var o=e(5),r=e(23);function i(n,t){var e=new Date,o=t;e.setTime(e.getTime()+18e5),document.cookie="".concat(n,"=").concat(o,"; expires=").concat(e.toUTCString(),"; path=/")}function c(n){var t,e,i=null!==(t=function(n){var t,e="; ".concat(document.cookie).split("; ".concat(n,"="));if(2===e.length)return null===(t=e.pop())||void 0===t?void 0:t.split(";").shift()}(r.SHIPPING_INFO_COOKIE))&&void 0!==t?t:"";if(!i){var c=null===(e=window)||void 0===e?void 0:e.__RUNTIME__.segmentToken;if(!c)return;i=JSON.parse(atob(c)).facets}if(i){var a=i.replace(/:/g,";").split(";").find((function(t){return t.indexOf(n)>-1}));if(a){var u=a.split("="),s=Object(o.a)(u,2)[1];return s&&";"===s[s.length-1]?s.substring(0,s.length-1):s}}}function a(){var n,t=null===(n=window)||void 0===n?void 0:n.__RUNTIME__.segmentToken;if(t)return JSON.parse(atob(t)).countryCode}function u(){var n=localStorage.getItem("orderform");if(n)return JSON.parse(n||"{}").id}}}]); },function(){ (window.webpackJsonpvtex_delivery_promise_components_1_1_0=window.webpackJsonpvtex_delivery_promise_components_1_1_0||[]).push([[3],{14:function(e,t,n){"use strict";n.d(t,"a",(function(){return q})),n.d(t,"c",(function(){return G})),n.d(t,"b",(function(){return V}));var r=n(0),o=n.n(r),a=n(73),i=n(74),c=n(78),s=n(77),u=n(65);function p(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(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var l=function(e){Object(c.a)(n,e);var t=p(n);function n(){var e;return Object(a.a)(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Object(i.a)(n,[{key:"render",value:function(){return this.state.hasError?this.props.fallback:this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),n}(r.Component),d=n(7),v=n.n(d),b=n(11),f=n(5),m=n(13),h=n.n(m),O=n(4),g=n(22),y=function(e){var t=e.imageUrl,n=e.productName;return o.a.createElement("div",{className:"flex flex-row pa5 bg-base t-body c-on-base br3 b--muted-4 ba mb5"},o.a.createElement("img",{className:"br2",style:{width:"64px",height:"64px"},src:t,alt:n}),o.a.createElement("p",{className:"ml6"},n))},k=n(2),P=function(e){var t=e.isOpen,n=e.onClose,a=e.onTryAgain,i=e.onRemoveItems,c=e.unavailableCartItems,s=e.unavailabilityMessage,u=Object(O.useIntl)(),p=Object(r.useState)(!1),l=Object(f.a)(p,2),d=l[0],m=l[1];Object(r.useEffect)((function(){t||m(!1)}),[t]);var P=function(){var e=Object(b.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.next=4,i();case 4:n();case 5:return e.prev=5,m(!1),e.finish(5);case 8:case"end":return e.stop()}}),e,null,[[1,,5,8]])})));return function(){return e.apply(this,arguments)}}();return o.a.createElement(g.a,{showArrowBack:!1,isTopCloseButton:!1,title:u.formatMessage(k.default.unavailableItemsModalTitle),isOpen:t,onClose:n,nonDismissible:!0,overlayZIndex:1e5},o.a.createElement("div",{className:"flex-auto flex flex-column justify-between mt0"},o.a.createElement("p",{className:"mid-gray ma0"},s),o.a.createElement("div",{className:"mv7 overflow-auto"},c.map((function(e){var t=e.product;return o.a.createElement(y,{key:t.id,imageUrl:t.imageUrl,productName:t.name})}))),o.a.createElement("div",{style:{gap:".75rem"},className:"flex flex-column"},o.a.createElement(h.a,{className:"mb3",isLoading:d,onClick:P},u.formatMessage(k.default.unavailableItemsModalRemoveButtonLabel)),o.a.createElement(h.a,{isLoading:d,variation:"secondary",onClick:a},u.formatMessage(k.default.unavailableItemsModalRetryButtonLabel)))))},I=n(39),j=n(41),x=n(42),M=n.n(x),S=n(36),L=n.n(S),E=n(43),C=n.n(E),_=n(18),N=n(50);function D(e){if((null==e?void 0:e.name)&&!e.name.includes(e.skuName)||e.name===e.skuName)return e.name;var t=1+e.skuName.length;return e.name.slice(0,e.name.length-t)}function T(e){try{return e.productCategoryIds.split("/").filter((function(e){return e.length})).map((function(t){return e.productCategories[t]})).join("/")}catch(e){return""}}function w(e){var t,n;return{skuId:e.id,variant:e.skuName,price:e.sellingPrice,priceIsInt:!0,name:D(e),quantity:e.quantity,productId:e.productId,productRefId:e.productRefId,brand:e.additionalInfo?e.additionalInfo.brandName:"",category:T(e),detailUrl:e.detailUrl,imageUrl:e.imageUrls?(n=e.imageUrls.at3x,n&&0!==n.indexOf("http")?"https:".concat(n):n):null!==(t=e.imageUrl)&&void 0!==t?t:"",referenceId:e.refId}}var A=n(29),B=n(23),R=function(e){var t=e.children,n=function(){var e,t,n,o,a=Object(r.useState)(),i=Object(f.a)(a,2),c=i[0],s=i[1],u=Object(r.useState)(!0),p=Object(f.a)(u,2),l=p[0],d=p[1],m=Object(r.useState)(),h=Object(f.a)(m,2),g=h[0],y=h[1],P=Object(r.useState)(),x=Object(f.a)(P,2),S=x[0],E=x[1],D=Object(r.useState)(),T=Object(f.a)(D,2),R=T[0],U=T[1],F=Object(r.useState)([]),H=Object(f.a)(F,2),q=H[0],G=H[1],V=Object(r.useState)(),z=Object(f.a)(V,2),K=z[0],Z=z[1],J=Object(r.useState)(),W=Object(f.a)(J,2),Y=W[0],Q=W[1],X=Object(r.useState)(),$=Object(f.a)(X,2),ee=$[0],te=$[1],ne=Object(r.useState)(),re=Object(f.a)(ne,2),oe=re[0],ae=re[1],ie=Object(r.useState)(),ce=Object(f.a)(ie,2),se=ce[0],ue=ce[1],pe=Object(r.useState)([]),le=Object(f.a)(pe,2),de=le[0],ve=le[1],be=Object(r.useState)(),fe=Object(f.a)(be,2),me=fe[0],he=fe[1],Oe=Object(r.useState)(),ge=Object(f.a)(Oe,2),ye=ge[0],ke=ge[1],Pe=Object(r.useState)(),Ie=Object(f.a)(Pe,2),je=Ie[0],xe=Ie[1],Me=Object(r.useState)({}),Se=Object(f.a)(Me,2),Le=Se[0],Ee=Se[1],Ce=Object(r.useState)(0),_e=Object(f.a)(Ce,2),Ne=_e[0],De=_e[1],Te=Object(r.useRef)(Le);Te.current=Le;var we=Object(r.useRef)(Object(b.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",void 0);case 1:case"end":return e.stop()}}),e)})))),Ae=Object(I.useRuntime)().account,Be=C()(),Re=Be.session,Ue=Be.loading,Fe=Object(I.useSSR)(),He=Object(O.useIntl)(),qe=Object(j.useOrderItems)(),Ge=qe.addItems,Ve=qe.removeItem,ze=M()().push,Ke={allowedOutdatedData:["paymentData"],splitItem:!0},Ze=Ue?void 0:null!==(o=null===(n=null===(t=null===(e=null==Re?void 0:Re.namespaces)||void 0===e?void 0:e.store)||void 0===t?void 0:t.channel)||void 0===n?void 0:n.value)&&void 0!==o?o:B.DEFAULT_TRADE_POLICY,Je=Object(r.useState)(null),We=Object(f.a)(Je,2),Ye=We[0],Qe=We[1];L()({eventId:B.SHOPPER_LOCATION_MODAL_PIXEL_EVENT_ID,handler:function(e){he(e.data.addToCartInfo)}});var Xe=Object(r.useCallback)(function(){var e=Object(b.a)(v.a.mark((function e(t,n,r,o){var a,i,c,s,u,p,l=arguments;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=l.length>4&&void 0!==l[4]&&l[4],Ze){e.next=4;break}return Qe({country:t,selectedZipcode:n,coordinates:r,shippingMethod:o,keepLoading:a}),e.abrupt("return");case 4:return e.next=6,Object(_.getPickups)(t,n,Ae,Ze);case 6:if(i=e.sent,c=null==i?void 0:i.items.filter((function(e){return e.pickupPoint.isActive})),G(null!=c?c:[]),0!==c.length){e.next=14;break}return Z(void 0),Q(void 0),a||d(!1),e.abrupt("return");case 14:return s=Object(N.getNearestPickup)(c),Z(s),u=Object(A.b)("pickupPoint"),p=Object(N.resolvePickupForShippingSession)(c,n,u,o),Q(p),e.next=21,Object(_.updateSession)(t,n,r,p,o);case 21:a||d(!1);case 22:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),[Ae,Ze]);Object(r.useEffect)((function(){if(!Fe&&!Ue&&Ye){var e=Ye.country,t=Ye.selectedZipcode,n=Ye.coordinates,r=Ye.shippingMethod;Qe(null),Xe(e,t,n,r,!1)}}),[Xe,Fe,Ue,Ye]),Object(r.useEffect)((function(){if(!Fe){var e=Object(A.b)("zip-code"),t=Object(A.a)(),n=Object(A.b)("shipping");if(s(e),ue(n),y(t),e)try{Object(_.getAddress)(t,e,Ae).then((function(r){U(r.city),te(r.geoCoordinates),Xe(t,e,r.geoCoordinates,n)}))}catch(e){d(!1)}else d(!1)}}),[Ae,Fe,Xe]);var $e=function(e,t){E({code:e,message:t}),d(!1),setTimeout((function(){E(void 0)}),8e3)},et=function(){var e=Object(b.a)(v.a.mark((function e(t){var n,r,o,a,i,c,s;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.prev=1,n=Object(A.c)(),e.next=5,Object(_.getCartProducts)(n);case 5:return r=e.sent,o=Object(_.orderFormItemsToAvailabilityItems)(r),e.next=9,t(o);case 9:return a=e.sent,i=a.unavailableItemIds,c=new Set(Array.isArray(i)?i.map(String):[]),s=r.map((function(e,t){return{cartItemIndex:t,product:e}})).filter((function(e){return c.has(String(e.product.id))})),ve(s),d(!1),e.abrupt("return",s);case 18:return e.prev=18,e.t0=e.catch(1),d(!1),ve([]),e.abrupt("return",[]);case 23:case"end":return e.stop()}}),e,null,[[1,18]])})));return function(t){return e.apply(this,arguments)}}(),tt=function(){var e=Object(b.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ve([]);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),nt=function(){var e=Object(b.a)(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de.reduce(function(){var e=Object(b.a)(v.a.mark((function e(t,n){var r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.product,e.next=3,t;case 3:return ze({event:"removeFromCart",items:[w(o=r)]}),e.next=7,Ve({uniqueId:o.uniqueId},Ke);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve());case 2:if("function"==typeof(t=je)){e.next=5;break}return e.abrupt("return");case 5:if("function"!=typeof(n=t())){e.next=9;break}return e.next=9,n();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),rt=function(){var e=Object(b.a)(v.a.mark((function e(t){var n,r,o,a,i,c,u,p,l,b,f,m,h=arguments;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(h.length>1&&void 0!==h[1])||h[1],t){e.next=4;break}return $e("POSTAL_CODE_NOT_FOUND",He.formatMessage(k.default.shopperLocationPostalCodeInputPlaceholder)),e.abrupt("return",!1);case 4:if(g){e.next=6;break}return e.abrupt("return",!1);case 6:return d(!0),e.prev=7,e.next=10,Object(_.getAddress)(g,t,Ae);case 10:if(a=e.sent,i=a.geoCoordinates,c=a.city,0!==i.length){e.next=16;break}return $e("INVALID_POSTAL_CODE",He.formatMessage(k.default.shopperLocationPostalCodeInputError)),e.abrupt("return",!1);case 16:return e.next=18,Object(_.getCatalogCount)(t,i);case 18:if(u=e.sent,0!==u.total){e.next=23;break}return $e(B.PRODUCTS_NOT_FOUND_ERROR_CODE,He.formatMessage(k.default.shopperLocationModalNoPickupPointStateDescription,{postalCode:" ".concat(t)})),e.abrupt("return",!1);case 23:if(!(p=Object(A.c)())){e.next=27;break}return e.next=27,Object(_.updateOrderForm)(g,t,p);case 27:return U(c),te(i),s(t),ue(void 0),Q(void 0),e.next=34,Object(_.updateSession)(g,t,i,void 0);case 34:return e.next=36,Xe(g,t,i,void 0,!0);case 36:e.next=42;break;case 38:return e.prev=38,e.t0=e.catch(7),$e("INVALID_POSTAL_CODE",He.formatMessage(k.default.shopperLocationPostalCodeInputError)),e.abrupt("return",!1);case 42:return l=Te.current,b=!0===(null===(r=l.shippingMethod)||void 0===r?void 0:r.required),f=!0===(null===(o=l.shopperLocation)||void 0===o?void 0:o.required),(m=n&&!b)||d(!1),!n||!b||f&&b||De((function(e){return e+1})),m&&(d(!0),location.reload()),e.abrupt("return",!0);case 50:case"end":return e.stop()}}),e,null,[[7,38]])})));return function(t){return e.apply(this,arguments)}}(),ot=function(){var e=Object(b.a)(v.a.mark((function e(t){var n,r,o,a,i=arguments;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(i.length>1&&void 0!==i[1])||i[1],g&&c&&ee){e.next=3;break}return e.abrupt("return");case 3:return o="pickup-in-point",a=t,n&&"pickup-in-point"===se&&t.pickupPoint.id===(null==Y?void 0:Y.pickupPoint.id)&&(o=void 0,a=void 0),Q(a),"pickup-in-point"===o&&(null===(r=null==a?void 0:a.pickupPoint)||void 0===r?void 0:r.id)&&Object(N.persistPickupPreference)(a,c),e.next=10,Object(_.updateSession)(g,c,ee,a,o);case 10:d(!0),location.reload();case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),at=function(){var e=Object(b.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g&&c&&ee){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(_.updateSession)(g,c,ee,void 0,"delivery");case 4:d(!0),location.reload();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){ae(R?"".concat(R,", ").concat(c):c)}),[c,R]),we.current=function(){var e=Object(b.a)(v.a.mark((function e(t){var n,r,o,a,i,u,p,l,f,m,h,O;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="REGISTER_SHOPPER_LOCATION_BLOCK"===e.t0?3:"UNREGISTER_SHOPPER_LOCATION_BLOCK"===e.t0?5:"REGISTER_SHIPPING_METHOD_BLOCK"===e.t0?7:"UNREGISTER_SHIPPING_METHOD_BLOCK"===e.t0?9:"REQUEST_OPEN_SHIPPING_METHOD_MODAL"===e.t0?11:"UPDATE_ZIPCODE"===e.t0?13:"UPDATE_PICKUP"===e.t0?24:"SELECT_DELIVERY_SHIPPING_OPTION"===e.t0?39:"ABORT_UNAVAILABLE_ITEMS_ACTION"===e.t0?53:"CONTINUE_UNAVAILABLE_ITEMS_ACTION"===e.t0?57:"RESET_FULFILLMENT_METHOD"===e.t0?60:"CLEAR_ZIPCODE"===e.t0?67:87;break;case 3:return Ee((function(e){return Object.assign(Object.assign({},e),{shopperLocation:{required:t.args.required}})})),e.abrupt("return");case 5:return Ee((function(e){var t=Object.assign({},e);return delete t.shopperLocation,t})),e.abrupt("return");case 7:return Ee((function(e){return Object.assign(Object.assign({},e),{shippingMethod:{required:t.args.required}})})),e.abrupt("return");case 9:return Ee((function(e){var t=Object.assign({},e);return delete t.shippingMethod,t})),e.abrupt("return");case 11:return De((function(e){return e+1})),e.abrupt("return");case 13:return n=t.args,r=n.zipcode,o=n.reload,a=n.onAppliedWithoutReload,i=n.cartAvailability,u=void 0===i?"deliveryorpickup":i,p=function(e){return"delivery"===u?Object(_.validateProductAvailabilityByDelivery)(r,g,e,Ae,Ze):Object(_.validateProductAvailability)(r,g,e,Ae,Ze)},l=function(){var e=Object(b.a)(v.a.mark((function e(){var t;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rt(r,o);case 2:if(!(t=e.sent)||!1!==o||!a){e.next=9;break}return e.next=6,tt();case 6:xe(void 0),ke(void 0),a();case 9:return e.abrupt("return",t);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=18,et(p);case 18:if(0!==e.sent.length){e.next=21;break}return e.abrupt("return",l());case 21:return ke(He.formatMessage(k.default.unavailableItemsModalDescription,{addressLabel:r})),xe((function(){return function(){return l()}})),e.abrupt("return",!1);case 24:return f=t.args,m=f.pickup,h=f.canUnselect,ke("pickup"),e.next=28,et(function(){var e=Object(b.a)(v.a.mark((function e(t){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(_.validateProductAvailabilityByPickup)(m.pickupPoint.id,t,c,g,Ae,Ze));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 28:if(0!==e.sent.length){e.next=36;break}if(ot(m,h),!me){e.next=35;break}return e.next=34,Ge(me.skuItems,me.options);case 34:he(void 0);case 35:return e.abrupt("break",88);case 36:return ke(He.formatMessage(k.default.unavailableItemsModalForPickupPointDescription,{pickupLabel:null==Y?void 0:Y.pickupPoint.friendlyName})),xe((function(){return function(){return ot(m)}})),e.abrupt("break",88);case 39:return ke("delivery"),e.next=42,et(function(){var e=Object(b.a)(v.a.mark((function e(t){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(_.validateProductAvailabilityByDelivery)(c,g,t,Ae,Ze));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 42:if(0!==e.sent.length){e.next=50;break}if(at(),!me){e.next=49;break}return e.next=48,Ge(me.skuItems,me.options);case 48:he(void 0);case 49:return e.abrupt("break",88);case 50:return ke(He.formatMessage(k.default.unavailableItemsModalForDeliveryDescription,{addressLabel:oe})),xe((function(){return function(){return at()}})),e.abrupt("break",88);case 53:return tt(),xe(void 0),ke(void 0),e.abrupt("break",88);case 57:return e.next=59,nt();case 59:return e.abrupt("break",88);case 60:if(g&&c&&ee){e.next=62;break}return e.abrupt("return");case 62:return e.next=64,Object(_.updateSession)(g,c,ee,void 0);case 64:return d(!0),location.reload(),e.abrupt("break",88);case 67:if(O=Object(A.c)(),d(!0),!O){e.next=72;break}return e.next=72,Object(_.clearOrderFormShipping)(O);case 72:return e.next=74,Object(_.clearShippingSession)();case 74:return s(void 0),U(void 0),te(void 0),G([]),Q(void 0),ue(void 0),ae(void 0),E(void 0),ve([]),ke(void 0),xe(void 0),location.reload(),e.abrupt("break",88);case 87:return e.abrupt("break",88);case 88:return e.abrupt("return",void 0);case 89:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var it=Object(r.useCallback)((function(e){return we.current(e)}),[]),ct=de.length>0;return{dispatch:it,state:{zipcode:c,isLoading:l,countryCode:g,submitErrorMessage:S,city:R,pickups:q,pickupSuggestion:K,selectedPickup:Y,geoCoordinates:ee,addressLabel:oe,deliveryPromiseMethod:se,areThereUnavailableCartItems:ct,unavailableCartItems:de,unavailabilityMessage:ye,uiRegistry:Le,shippingMethodModalRequestId:Ne}}}(),a=n.dispatch,i=n.state,c=i.areThereUnavailableCartItems,s=i.unavailableCartItems,u=i.unavailabilityMessage,p=function(){a({type:"ABORT_UNAVAILABLE_ITEMS_ACTION"})};return o.a.createElement(F.Provider,{value:i},o.a.createElement(H.Provider,{value:a},t,o.a.createElement(P,{isOpen:c,onClose:p,onTryAgain:p,onRemoveItems:function(){return a({type:"CONTINUE_UNAVAILABLE_ITEMS_ACTION"})},unavailableCartItems:s,unavailabilityMessage:u})))},U={pickups:[],isLoading:!0,areThereUnavailableCartItems:!1,unavailableCartItems:[],uiRegistry:{},shippingMethodModalRequestId:0},F=Object(r.createContext)(U),H=Object(r.createContext)((function(e){})),q=function(e){var t=e.children;return o.a.createElement(l,{fallback:t},o.a.createElement(R,null,t))},G=function(){return Object(r.useContext)(F)},V=function(){return Object(r.useContext)(H)}},2:function(e,t,n){"use strict";n.r(t);var r=n(4),o=Object(r.defineMessages)({shopperLocationButtonPlaceholder:{id:"store/delivery-promise-components.shopperLocationButton.placeholder"},pickupPointButtonPlaceholder:{id:"store/delivery-promise-components.pickupPointButton.placeholder"},shopperLocationPostalCodeInputPlaceholder:{id:"store/delivery-promise-components.shopperLocation.postalCodeInput.placeholder"},shopperLocationPostalCodeInputError:{id:"store/delivery-promise-components.shopperLocation.postalCodeInput.error"},pickupPointListUpdateButtonLabel:{id:"store/delivery-promise-components.pickupPointList.updateButton.label"},shopperLocationPopoverButtonLabel:{id:"store/delivery-promise-components.shopperLocationPopover.button.label"},shopperLocationPopoverSubmitButtonLabel:{id:"store/delivery-promise-components.shopperLocationPopover.submitButton.label"},shopperLocationPopoverDescription:{id:"store/delivery-promise-components.shopperLocationPopover.description"},shopperLocationPopoverPostalCodePlaceholder:{id:"store/delivery-promise-components.shopperLocationPopover.postalCodeInput.placeholder"},shopperLocationPopoverPostalCodeHelpLink:{id:"store/delivery-promise-components.shopperLocationPopover.postalCodeHelpLink"},shopperLocationModalTitle:{id:"store/delivery-promise-components.shopperLocationModal.title"},shopperLocationModalDescription:{id:"store/delivery-promise-components.shopperLocationModal.description"},shopperLocationModalNoPickupPointStateTitle:{id:"store/delivery-promise-components.shopperLocationModal.noPickupPointState.title"},shopperLocationModalNoPickupPointStateDescription:{id:"store/delivery-promise-components.shopperLocationModal.noPickupPointState.description"},shopperLocationModalNoPickupPointStateButtonLabel:{id:"store/delivery-promise-components.shopperLocationModal.noPickupPointState.button.label"},pickupPointSelectionNoPointsStateTitle:{id:"store/delivery-promise-components.pickupPointSelection.noPointsState.title"},pickupPointSelectionNoPointsStateDescription:{id:"store/delivery-promise-components.pickupPointSelection.noPointsState.description"},pickupPointSelectionNoPointsStateButtonLabel:{id:"store/delivery-promise-components.pickupPointSelection.noPointsState.button.label"},shippingMethodModalTitle:{id:"store/delivery-promise-components.shippingMethodModal.title"},shippingMethodModalDescription:{id:"store/delivery-promise-components.shippingMethodModal.description"},shippingMethodModalDeliveryOptionLabel:{id:"store/delivery-promise-components.shippingMethodModal.deliveryOption.label"},shippingMethodModalPickupPointOptionLabel:{id:"store/delivery-promise-components.shippingMethodModal.pickupPointOption.label"},shippingMethodSelectorFilterByShipping:{id:"store/delivery-promise-components.shippingMethodSelector.filterByShipping.label"},shippingMethodSelectorFilteringByDelivery:{id:"store/delivery-promise-components.shippingMethodSelector.filteringByDelivery.label"},pickupPointSelectionTitle:{id:"store/delivery-promise-components.pickupPointSelection.title"},shippingMethodDeliveryAvailableBadge:{id:"store/delivery-promise-components.shippingMethod.deliveryAvailable.badge"},shippingMethodDeliveryUnavailableBadge:{id:"store/delivery-promise-components.shippingMethod.deliveryUnavailable.badge"},shippingMethodPickupPointUnavailableBadge:{id:"store/delivery-promise-components.shippingMethod.pickupPointUnavailable.badge"},shippingMethodPickupAtBadge:{id:"store/delivery-promise-components.shippingMethod.pickupAt.badge"},unavailableItemsModalRemoveButtonLabel:{id:"store/delivery-promise-components.unavailableItemsModal.removeItemsButton.label"},unavailableItemsModalRetryButtonLabel:{id:"store/delivery-promise-components.unavailableItemsModal.retryButton.label"},unavailableItemsModalTitle:{id:"store/delivery-promise-components.unavailableItemsModal.title"},unavailableItemsModalDescription:{id:"store/delivery-promise-components.unavailableItemsModal.description"},unavailableItemsModalForPickupPointDescription:{id:"store/delivery-promise-components.unavailableItemsModal.forPickupPoint.description"},unavailableItemsModalForDeliveryDescription:{id:"store/delivery-promise-components.unavailableItemsModal.forDelivery.description"},shopperLocationDetectorButtonTitle:{id:"store/delivery-promise-components.shopperLocationDetectorButton.title"},shopperLocationDetectorButtonLoadingDescription:{id:"store/delivery-promise-components.shopperLocationDetectorButton.loadingDescription"},shopperLocationDetectorButtonErrorDescription:{id:"store/delivery-promise-components.shopperLocationDetectorButton.errorDescription"}});t.default=o},22:function(e,t,n){"use strict";var r=n(0),o=n.n(r),a=n(54),i=n.n(a),c=n(6),s=n.n(c),u=n(28),p=n.n(u),l=n(32),d=n.n(l),v=n(33),b=n.n(v),f=i.a,m={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",padding:"40px 40px 64px 40px",transform:"translate(-50%, -50%)",borderRadius:"12px",minHeight:"388px",maxHeight:"640px",width:"unset",minWidth:"unset",display:"flex","flex-direction":"column"},overlay:{backgroundColor:"rgba(3, 4, 78, 0.55)",zIndex:99999,width:"100vw",height:"100vh"}},h=["modalBackButton","modalCloseButton","shippingMethodModalTitle"],O={cursor:"pointer",backgroundColor:"unset",border:0};t.a=function(e){var t=e.children,n=e.onClose,r=e.isOpen,a=e.title,i=e.onArrowBack,c=e.showArrowBack,u=e.isTopCloseButton,l=e.nonDismissible,v=void 0!==l&&l,g=e.nonDismissibleModal,y=void 0!==g&&g,k=e.overlayZIndex,P=void 0===k?99999:k,I=s()(h),j=v||y;p()().isMobile?m.content.width="100%":(m.content.width="522px",m.content.minWidth="522px"),m.content.padding=j?"64px 40px":"40px 40px 64px 40px";var x=Object.assign(Object.assign({},m),{overlay:Object.assign(Object.assign({},m.overlay),{zIndex:P})});return o.a.createElement(f,{style:x,isOpen:r,onRequestClose:j?void 0:n,shouldCloseOnOverlayClick:!j,shouldCloseOnEsc:!j,ariaHideApp:!1},o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"flex justify-between items-center mb3 ".concat(u?"flex-column-reverse":"flex-row")},o.a.createElement("div",{className:"flex items-center self-start flex-row"},c&&i&&o.a.createElement("button",{className:"pa0 mr4 ".concat(I.modalBackButton),onClick:i},o.a.createElement(b.a,null)),o.a.createElement("p",{className:"f3 fw6 ma0 ".concat(I.shippingMethodModalTitle)},a)),!j&&o.a.createElement("div",{className:"flex justify-end self-end"},o.a.createElement("button",{onClick:n,className:I.modalCloseButton,style:O},o.a.createElement(d.a,{size:24})))),t))}},50:function(e,t,n){"use strict";n.r(t),n.d(t,"PICKUP_IN_POINT_STORAGE_KEY",(function(){return r})),n.d(t,"normalizePostalCode",(function(){return o})),n.d(t,"getNearestPickup",(function(){return a})),n.d(t,"readStoredPickupPreference",(function(){return i})),n.d(t,"persistPickupPreference",(function(){return c})),n.d(t,"resolvePickupForShippingSession",(function(){return s}));var r="vtex.search.pickupInPoint",o=function(e){return(null!=e?e:"").replace(/\s/g,"").toLowerCase()};function a(e){if(null==e?void 0:e.length)return e.reduce((function(e,t){return t.distancet.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1}));if(a){var u=a.split("="),s=Object(o.a)(u,2)[1];return s&&";"===s[s.length-1]?s.substring(0,s.length-1):s}}}function a(){var n,t=null===(n=window)||void 0===n?void 0:n.__RUNTIME__.segmentToken;if(t)return JSON.parse(atob(t)).countryCode}function u(){var n=localStorage.getItem("orderform");if(n)return JSON.parse(n||"{}").id}}}]); },function(){ (window.webpackJsonpvtex_shipping_option_components_1_12_0=window.webpackJsonpvtex_shipping_option_components_1_12_0||[]).push([[1],{19:function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"c",(function(){return _})),n.d(t,"b",(function(){return L}));var i=n(0),r=n.n(i),o=n(69),a=n(70),c=n(75),p=n(74),s=n(61);function u(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,i=Object(s.a)(e);if(t){var r=Object(s.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(p.a)(this,n)}}var l=function(e){Object(c.a)(n,e);var t=u(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Object(a.a)(n,[{key:"render",value:function(){return this.state.hasError?this.props.fallback:this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),n}(i.Component),d=n(8),b=n.n(d),f=n(13),v=n(5),h=n(31),O=n(7),g=n(38),k=n(33),j=n.n(k),m=n(39),S=n.n(m),I=n(20),y=n(23),P=n(2),x=n(21),D=function(e){var t=e.children,n=function(){var e,t,n,r,o=Object(i.useState)(),a=Object(v.a)(o,2),c=a[0],p=a[1],s=Object(i.useState)(!0),u=Object(v.a)(s,2),l=u[0],d=u[1],k=Object(i.useState)(),m=Object(v.a)(k,2),D=m[0],z=m[1],B=Object(i.useState)(),C=Object(v.a)(B,2),E=C[0],_=C[1],L=Object(i.useState)(),M=Object(v.a)(L,2),T=M[0],w=M[1],A=Object(i.useState)([]),N=Object(v.a)(A,2),U=N[0],R=N[1],F=Object(i.useState)(),H=Object(v.a)(F,2),V=H[0],Z=H[1],G=Object(i.useState)(),J=Object(v.a)(G,2),Y=J[0],K=J[1],X=Object(i.useState)(),q=Object(v.a)(X,2),Q=q[0],W=q[1],$=Object(i.useState)(),ee=Object(v.a)($,2),te=ee[0],ne=ee[1],ie=Object(i.useState)([]),re=Object(v.a)(ie,2),oe=re[0],ae=re[1],ce=Object(i.useState)(),pe=Object(v.a)(ce,2),se=pe[0],ue=pe[1],le=Object(i.useState)(),de=Object(v.a)(le,2),be=de[0],fe=de[1],ve=Object(i.useState)(),he=Object(v.a)(ve,2),Oe=he[0],ge=he[1],ke=Object(h.useRuntime)().account,je=S()(),me=je.session,Se=je.loading,Ie=Object(h.useSSR)(),ye=Object(O.useIntl)(),Pe=Object(g.useOrderItems)().addItems,xe=Se?void 0:null!==(r=null===(n=null===(t=null===(e=null==me?void 0:me.namespaces)||void 0===e?void 0:e.store)||void 0===t?void 0:t.channel)||void 0===n?void 0:n.value)&&void 0!==r?r:x.DEFAULT_TRADE_POLICY,De=Object(i.useState)(null),ze=Object(v.a)(De,2),Be=ze[0],Ce=ze[1];j()({eventId:x.SHIPPING_MODAL_PIXEL_EVENT_ID,handler:function(e){ue(e.data.addToCartInfo)}});var Ee=Object(i.useCallback)(function(){var e=Object(f.a)(b.a.mark((function e(t,n,i,r){var o,a,c,p,s,u,l,f=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=f.length>4&&void 0!==f[4]&&f[4],xe){e.next=4;break}return Ce({country:t,selectedZipcode:n,coordinates:i,shippingMethod:r,keepLoading:o}),e.abrupt("return");case 4:return e.next=6,Object(I.getPickups)(t,n,ke,xe);case 6:if(c=e.sent,p=null==c?void 0:c.items.filter((function(e){return e.pickupPoint.isActive})),R(null!=p?p:[]),0!==p.length){e.next=12;break}return d(!1),e.abrupt("return");case 12:return s=Object(y.b)("pickupPoint"),u=p[0],l=u,s&&(l=null!==(a=p.find((function(e){return e.pickupPoint.id===s})))&&void 0!==a?a:u),Z(l),e.next=19,Object(I.updateSession)(t,n,i,l,r);case 19:o||d(!1);case 20:case"end":return e.stop()}}),e)})));return function(t,n,i,r){return e.apply(this,arguments)}}(),[ke,xe]);Object(i.useEffect)((function(){if(!Ie&&!Se&&Be){var e=Be.country,t=Be.selectedZipcode,n=Be.coordinates,i=Be.shippingMethod,r=Be.keepLoading;Ce(null),Ee(e,t,n,i,r)}}),[Ee,Ie,Se,Be]),Object(i.useEffect)((function(){if(!Ie){var e=Object(y.b)("zip-code"),t=Object(y.a)(),n=Object(y.b)("shipping");if(p(e),ne(n),z(t),e)try{Object(I.getAddress)(t,e,ke).then((function(i){w(i.city),K(i.geoCoordinates),Ee(t,e,i.geoCoordinates,n)}))}catch(e){d(!1)}else d(!1)}}),[ke,Ie,Ee]);var _e=function(e,t){_({code:e,message:t}),d(!1),setTimeout((function(){_(void 0)}),3e3)},Le=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,i,r,o,a,c,p;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.prev=1,n=Object(y.c)(),e.next=5,Object(I.getCartProducts)(n);case 5:return i=e.sent,r=Object(I.orderFormItemsToAvailabilityItems)(i),e.next=9,t(r);case 9:return o=e.sent,a=o.unavailableItemIds,c=new Set(Array.isArray(a)?a.map(String):[]),p=i.map((function(e,t){return{cartItemIndex:t,product:e}})).filter((function(e){return c.has(String(e.product.id))})),ae(p),d(!1),e.abrupt("return",p);case 18:return e.prev=18,e.t0=e.catch(1),d(!1),ae([]),e.abrupt("return",[]);case 23:case"end":return e.stop()}}),e,null,[[1,18]])})));return function(t){return e.apply(this,arguments)}}(),Me=function(){var e=Object(f.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ae([]);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=Object(f.a)(b.a.mark((function e(){var t;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(y.c)(),e.next=3,Object(I.removeCartProductsById)(t,oe.map((function(e){return e.cartItemIndex})));case 3:Oe&&Oe();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,i,r,o,a,c,s=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(s.length>1&&void 0!==s[1])||s[1],t){e.next=4;break}return _e("POSTAL_CODE_NOT_FOUND",ye.formatMessage(P.default.postalCodeInputPlaceHolder)),e.abrupt("return");case 4:if(D){e.next=6;break}return e.abrupt("return");case 6:return d(!0),e.prev=7,e.next=10,Object(I.getAddress)(D,t,ke);case 10:if(i=e.sent,r=i.geoCoordinates,o=i.city,0!==r.length){e.next=16;break}return _e("INVALID_POSTAL_CODE",ye.formatMessage(P.default.postalCodeInputError)),e.abrupt("return");case 16:return e.next=18,Object(I.getCatalogCount)(t,r);case 18:if(a=e.sent,0!==a.total){e.next=23;break}return _e(x.PRODUCTS_NOT_FOUND_ERROR_CODE,ye.formatMessage(P.default.noPickupsStateDescription,{postalCode:" ".concat(t)})),e.abrupt("return");case 23:if(!(c=Object(y.c)())){e.next=27;break}return e.next=27,Object(I.updateOrderForm)(D,t,c);case 27:return w(o),K(r),p(t),e.next=32,Object(I.updateSession)(D,t,r,V,"delivery");case 32:return e.next=34,Ee(D,t,r,te,!0);case 34:e.next=40;break;case 36:return e.prev=36,e.t0=e.catch(7),_e("INVALID_POSTAL_CODE",ye.formatMessage(P.default.postalCodeInputError)),e.abrupt("return");case 40:ne(void 0),Z(void 0),n||d(!1),n&&location.reload();case 44:case"end":return e.stop()}}),e,null,[[7,36]])})));return function(t){return e.apply(this,arguments)}}(),Ae=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,i,r,o=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],D&&c&&Y){e.next=3;break}return e.abrupt("return");case 3:return i="pickup-in-point",r=t,n&&"pickup-in-point"===te&&t.pickupPoint.id===(null==V?void 0:V.pickupPoint.id)&&(i="delivery",r=U[0]),Z(r),e.next=9,Object(I.updateSession)(D,c,Y,r,i);case 9:location.reload();case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ne=function(){var e=Object(f.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(D&&c&&Y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(I.updateSession)(D,c,Y,V,"delivery");case 4:location.reload();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(i.useEffect)((function(){W(T?"".concat(T,", ").concat(c):c)}),[c,T]);var Ue=function(){var e=Object(f.a)(b.a.mark((function e(t){var n,i,r,o,a,p;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="UPDATE_ZIPCODE"===e.t0?3:"UPDATE_PICKUP"===e.t0?13:"SELECT_DELIVERY_SHIPPING_OPTION"===e.t0?28:"ABORT_UNAVAILABLE_ITEMS_ACTION"===e.t0?42:"CONTINUE_UNAVAILABLE_ITEMS_ACTION"===e.t0?44:46;break;case 3:return n=t.args,i=n.zipcode,r=n.reload,e.next=6,Le(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(I.validateProductAvailability)(i,D,t,ke,xe));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 6:if(0!==e.sent.length){e.next=10;break}return we(i,r),e.abrupt("break",47);case 10:return fe(ye.formatMessage(P.default.unavailableItemsModalDescription,{addressLabel:Q})),ge((function(){return function(){return we(i,r)}})),e.abrupt("break",47);case 13:return o=t.args,a=o.pickup,p=o.canUnselect,fe("pickup"),e.next=17,Le(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(I.validateProductAvailabilityByPickup)(a.pickupPoint.id,t,c,D,ke,xe));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 17:if(0!==e.sent.length){e.next=25;break}if(Ae(a,p),!se){e.next=24;break}return e.next=23,Pe(se.skuItems,se.options);case 23:ue(void 0);case 24:return e.abrupt("break",47);case 25:return fe(ye.formatMessage(P.default.unavailableItemsModalForPickupDescription,{pickupLabel:null==V?void 0:V.pickupPoint.friendlyName})),ge((function(){return function(){return Ae(a)}})),e.abrupt("break",47);case 28:return fe("delivery"),e.next=31,Le(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(I.validateProductAvailabilityByDelivery)(c,D,t,ke,xe));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 31:if(0!==e.sent.length){e.next=39;break}if(Ne(),!se){e.next=38;break}return e.next=37,Pe(se.skuItems,se.options);case 37:ue(void 0);case 38:return e.abrupt("break",47);case 39:return fe(ye.formatMessage(P.default.unavailableItemsModalForDeliveryDescription,{addressLabel:Q})),ge((function(){return function(){return Ne()}})),e.abrupt("break",47);case 42:return Me(),e.abrupt("break",47);case 44:return Te(),e.abrupt("break",47);case 46:return e.abrupt("break",47);case 47:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Re=oe.length>0;return{dispatch:Ue,state:{zipcode:c,isLoading:l,countryCode:D,submitErrorMessage:E,city:T,pickups:U,selectedPickup:V,geoCoordinates:Y,addressLabel:Q,shippingOption:te,areThereUnavailableCartItems:Re,unavailableCartItems:oe,unavailabilityMessage:be}}}(),o=n.dispatch,a=n.state;return r.a.createElement(B.Provider,{value:a},r.a.createElement(C.Provider,{value:o},t))},z={pickups:[],isLoading:!0,areThereUnavailableCartItems:!1,unavailableCartItems:[]},B=Object(i.createContext)(z),C=Object(i.createContext)((function(e){})),E=function(e){var t=e.children;return r.a.createElement(l,{fallback:t},r.a.createElement(D,null,t))},_=function(){return Object(i.useContext)(B)},L=function(){return Object(i.useContext)(C)}},2:function(e,t,n){"use strict";n.r(t);var i=n(7),r=Object(i.defineMessages)({deliverToButtonLabel:{id:"store/shipping-option-zipcode.deliverToButton.label"},deliverToButtonPlaceholder:{id:"store/shipping-option-zipcode.deliverToButton.placeholder"},storeButtonLabel:{id:"store/shipping-option-zipcode.storeButton.label"},storeButtonPlaceHolder:{id:"store/shipping-option-zipcode.storeButton.placeholder"},storeDeliverDrawerTitle:{id:"store/shipping-option-zipcode.deliverDrawer.title"},pickupDrawerTitleEmpty:{id:"store/shipping-option-zipcode.pickupDrawer.title.empty"},pickupDrawerTitleFilled:{id:"store/shipping-option-zipcode.pickupDrawer.title.filled"},postalCodeInputPlaceHolder:{id:"store/shipping-option-zipcode.postalCodeInput.placeholder"},postalCodeInputError:{id:"store/shipping-option-zipcode.postalCodeInput.error"},updateButtonLabel:{id:"store/shipping-option-zipcode.updateButton.label"},popoverButtonLabel:{id:"store/shipping-option-zipcode.popoverButton.label"},popoverSubmitButtonLabel:{id:"store/shipping-option-zipcode.deliveryPopover.submitButton.label"},popoverDescription:{id:"store/shipping-option-zipcode.popover.description"},popoverPostalCodeInputPlaceHolder:{id:"store/shipping-option-zipcode.deliveryPopover.postalCodeInput.placeholder"},popoverPostalCodeLink:{id:"store/shipping-option-zipcode.popover.postalCodeLink"},locationModalTitle:{id:"store/shipping-option-zipcode.locationModal.title"},locationModalDescription:{id:"store/shipping-option-zipcode.locationModal.description"},noPickupsStateTitle:{id:"store/shipping-option-zipcode.locationModal.noPickupsState.title"},noPickupsStateDescription:{id:"store/shipping-option-zipcode.locationModal.noPickupsState.description"},noPickupsStateButtonLabel:{id:"store/shipping-option-zipcode.locationModal.noPickupsState.button.label"},noStoresStateTitle:{id:"store/shipping-option-zipcode.pickupSelection.noStoresState.title"},noStoresStateDescription:{id:"store/shipping-option-zipcode.pickupSelection.noStoresState.description"},noStoresStateButton:{id:"store/shipping-option-zipcode.pickupSelection.noStoresState.button.label"},shippingSelectionModalTitle:{id:"store/shipping-option-zipcode.shippingSelectionModal.title"},shippingSelectionModalDescription:{id:"store/shipping-option-zipcode.shippingSelectionModal.description"},shippingSelectionModalDeliveryButton:{id:"store/shipping-option-zipcode.shippingSelectionModal.deliveryButton.label"},shippingSelectionModalPickupButton:{id:"store/shipping-option-zipcode.shippingSelectionModal.pickupButton.label"},pickupSelectionTitle:{id:"store/shipping-option-zipcode.pickupSelection.title"},deliveryAvailableBadge:{id:"store/shipping-option-zipcode.availabilityBadge.deliveryAvailable"},deliveryUnavailableBadge:{id:"store/shipping-option-zipcode.availabilityBadge.deliveryUnavailable"},pickupUnavailableBadge:{id:"store/shipping-option-zipcode.availabilityBadge.pickupUnavailable"},pickupAtBadge:{id:"store/shipping-option-zipcode.availabilityBadge.pickupAt"},unavailableItemsModalRemoveButton:{id:"store/shipping-option-zipcode.unavailableItems.removeItemsButton.label"},unavailableItemsModalRetryButton:{id:"store/shipping-option-zipcode.unavailableItems.retryButton.label"},unavailableItemsModalTitle:{id:"store/shipping-option-zipcode.unavailableItems.title"},unavailableItemsModalDescription:{id:"store/shipping-option-zipcode.unavailableItems.description"},unavailableItemsModalForPickupDescription:{id:"store/shipping-option-zipcode.unavailableItems.forPickup.description"},unavailableItemsModalForDeliveryDescription:{id:"store/shipping-option-zipcode.unavailableItems.forDelivery.description"},LocationDetectorButtonTitle:{id:"store/shipping-option-zipcode.LocationDetectorButton.title"},LocationDetectorButtonLoadingDescription:{id:"store/shipping-option-zipcode.LocationDetectorButtonLoading.description"},LocationDetectorButtonErrorDescription:{id:"store/shipping-option-zipcode.LocationDetectorButtonError.description"}});t.default=r}}]); },function(){ (window.webpackJsonpvtex_shipping_option_components_1_12_0=window.webpackJsonpvtex_shipping_option_components_1_12_0||[]).push([["ShippingOptionContext"],{0:function(t,n){t.exports=React},31:function(t,n){t.exports=__RENDER_8_RUNTIME__},33:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.pixel-manager@1.x/usePixelEventCallback"]},37:function(t,n){t.exports=regeneratorRuntime},38:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.order-items@0.x/OrderItems"]},39:function(t,n){t.exports=__RENDER_8_COMPONENTS__["vtex.session-client@1.x/useRenderSession"]},7:function(t,n){t.exports=ReactIntl},91:function(t,n,e){"use strict";e.r(n),function(t){var n=e(14);e.p=Object(n.getPublicPath)("vtex.shipping-option-components@1.12.0");var o=Object(n.register)((function(){return e(92)}),t,"vtex.shipping-option-components@1.12.0","vtex.shipping-option-components@1.x","ShippingOptionContext");o.renderHotReload,o.setupHMR}.call(this,e(32)(t))},92:function(t,n,e){"use strict";e.r(n);var o=e(19);n.default={ShippingOptionProvider:o.a,useShippingOptionDispatch:o.b,useShippingOptionState:o.c}}},[[91,"common",0,1]]]); },function(){ !function(t){function n(n){for(var r,u,c=n[0],a=n[1],f=n[2],s=0,p=[];s=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},48:function(t,n,e){t.exports=e(89)},5:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))},57:function(t,n,e){"use strict";function r(t,n){if(null==t)return{};var e,r,o=function(t,n){if(null==t)return{};var e,r,o={},i=Object.keys(t);for(r=0;r=0||(o[e]=t[e]);return o}(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}e.d(n,"a",(function(){return r}))},59:function(t,n,e){"use strict";function r(t,n,e,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void e(t)}c.done?n(a):Promise.resolve(a).then(r,o)}function o(t){return function(){var n=this,e=arguments;return new Promise((function(o,i){var u=t.apply(n,e);function c(t){r(u,o,i,c,a,"next",t)}function a(t){r(u,o,i,c,a,"throw",t)}c(void 0)}))}}e.d(n,"a",(function(){return o}))},71:function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e