enqueueScripts([function(){ (window.webpackJsonpvtex_store_icons_0_18_0=window.webpackJsonpvtex_store_icons_0_18_0||[]).push([["IconMenu"],{0:function(e,n){e.exports=React},2:function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},3:function(e,n,o){"use strict";var t=o(0),c=o.n(t),r=o(2),a=o.n(r),i=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(t=Object.getOwnPropertySymbols(e);ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?c():i=setTimeout(c,t-e)),o};function c(){i=0,a=+new Date,o=e.apply(n,r),n=null,r=null}}},12:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(11),a=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){c&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){c&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;f.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),d=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),T="undefined"!=typeof WeakMap?new WeakMap:new a,M=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=h.getInstance(),r=new j(t,n,this);T.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){M.prototype[e]=function(){var t;return(t=T.get(this))[e].apply(t,arguments)}}));var S=void 0!==u.ResizeObserver?u.ResizeObserver:M,R=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i=t||n<0||l&&e-s>=i}function b(){var e=P();if(v(e))return y(e);c=setTimeout(b,function(e){var n=t-(e-u);return l?ee(n,i-(e-s)):n}(e))}function y(e){return c=void 0,h&&r?d(e):(r=o=void 0,a)}function m(){var e=P(),n=v(e);if(r=arguments,o=this,u=e,n){if(void 0===c)return p(u);if(l)return clearTimeout(c),c=setTimeout(b,t),d(u)}return void 0===c&&(c=setTimeout(b,t)),a}return t=Y(t)||0,k(n)&&(f=!!n.leading,i=(l="maxWait"in n)?Z(Y(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),m.cancel=function(){void 0!==c&&clearTimeout(c),s=0,r=u=o=c=void 0},m.flush=function(){return void 0===c?a:y(P())},m};var ne=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return k(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),te(e,t,{leading:r,maxWait:t,trailing:o})},re={debounce:te,throttle:ne},oe=function(e){return"function"==typeof e},ie=function(){return"undefined"==typeof window};function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ue(e,t){for(var n=0;n=r;d!==c&&v(c)}}),[u,s,e,d,a,i])),{isStuck:d}}({stickOffset:C,position:N,verticalSpacing:p,contentHeight:j,wrapperOffsetTop:R}).isStuck;null!=H&&null!=s&&console.warn('"StackContainer" overrides the "StickyLayout" "position" prop.');var I=[O.container,!l&&"z-999",M?"fixed":"relative","left-0 right-0"].filter(Boolean).join(" "),D=M?d()(O.wrapper,["stuck"]):O.wrapper,A=(e={},Object(o.a)(e,N,M?p+C:0),Object(o.a)(e,"zIndex",l),e),B={position:"relative",height:j};return a.a.createElement("div",{ref:w,className:D,style:B},a.a.createElement("div",{ref:b,className:I,style:A},i,a.a.createElement(u.a,{handleHeight:!0,onResize:function(t,e){!1===M&&_(e),T(e)}})))}}],[[15,"common",0]]]); },function(){ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t){e.exports=React},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPublicPath=t.register=void 0;var r="__RENDER_8_RUNTIME__",o="__RENDER_8_COMPONENTS__",i=!("undefined"==typeof window||!window.document);i&&!window.global&&(window.global=window),window[o]=window[o]||{},t.register=function(e,t,n,i,a){var c="".concat(n,"/").concat(a),l="".concat(i,"/").concat(a),s=function(){return function(e,t){try{var n=e();return n.__esModule?n.default:n.default||n}catch(e){throw new Error("An error happened while requiring the app ".concat(t,", please check your app's code.\\n").concat(e.stack))}}(e,c)};if(window[r]&&window[r].registerComponent){var u=!!window.__RENDER_LAZY__;window[r].registerComponent(t,u?s:s(),n,a,u)}else{var d=s();window[r]&&window[r].withHMR?window[o][c]=window[o][l]=window[r].withHMR(t,d):window[o][c]=window[o][l]=d}return{}},t.getPublicPath=function(e){var t=window.__hostname__,n="/_v/public/assets/v1/published/";return i&&window.__RUNTIME__&&(t=__RUNTIME__.assetServerPublishedHost||window.location.hostname,n=__RUNTIME__.assetServerPublishedPath||"/_v/public/assets/v1/published/"),"https://"+t+n+"".concat(e,"/public/react/")}},function(e,t){e.exports=ReactIntl},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/applyModifiers"]},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.stack-layout@0.1.3");var r=Object(t.register)((function(){return n(7)}),e,"vtex.stack-layout@0.1.3","vtex.stack-layout@0.x","index");r.renderHotReload,r.setupHMR}.call(this,n(6)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(2),a=n(4),c=n.n(a),l=n(3),s=n.n(l),u=["stackContainer","stackItem"],d=function(e){var t=e.children,n=e.zIndexOffset,r=void 0===n?0:n,a=e.arialabel,l=c()(u),d=Object(i.useIntl)();return o.a.createElement("div",{className:"".concat(l.stackContainer," relative"),"aria-label":a||d.formatMessage({id:"store/stack-layout.aria-label"})},o.a.Children.toArray(t).map((function(e,t){var n,i,a,c=(null===(a=null===(i=null===(n=e)||void 0===n?void 0:n.props)||void 0===i?void 0:i.blockProps)||void 0===a?void 0:a.blockClass)||"",u="";return c&&(u=s()(l.stackItem,c)),0===t?o.a.createElement("div",{key:t,className:"".concat(s()(l.stackItem,"first")," ").concat(u),style:{zIndex:r+1}},e):o.a.createElement("div",{key:t,className:"".concat(l.stackItem," absolute top-0 left-0 w-auto h-auto ").concat(u),style:{zIndex:r+t+1}},e)})))},f=Object(i.defineMessages)({title:{id:"admin/editor.stack-layout.title"},description:{id:"admin/editor.stack-layout.description"}});d.schema={title:f.title.id,description:f.description.id},t.default=d}]); },function(){ !function(e){function t(t){for(var n,a,u=t[0],c=t[1],l=t[2],d=0,p=[];de.length)&&(t=e.length);for(var r=0,n=new Array(t);r=n||e<0||b&&t-c>=o}function x(){var t=v();if(j(t))return _(t);a=setTimeout(x,function(t){var e=n-(t-f);return b?s(e,o-(t-c)):e}(t))}function _(t){return a=void 0,y&&i?m(t):(i=r=void 0,u)}function h(){var t=v(),e=j(t);if(i=arguments,r=this,f=t,e){if(void 0===a)return w(f);if(b)return a=setTimeout(x,n),m(f)}return void 0===a&&(a=setTimeout(x,n)),u}return n=g(n)||0,d(e)&&(l=!!e.leading,o=(b="maxWait"in e)?p(g(e.maxWait)||0,n):o,y="trailing"in e?!!e.trailing:y),h.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=f=r=a=void 0},h.flush=function(){return void 0===a?u:_(v())},h}function d(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function g(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==l.call(t)}(t))return NaN;if(d(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=d(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(e,"");var a=r.test(t);return a||o.test(t)?u(t.slice(2),a?2:8):i.test(t)?NaN:+t}t.exports=function(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return d(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),b(t,n,{leading:i,maxWait:n,trailing:r})}}}]); },function(){ (window.webpackJsonpvtex_react_portal_0_4_1=window.webpackJsonpvtex_react_portal_0_4_1||[]).push([["Overlay"],[function(e,t){e.exports=React},,function(e,t){e.exports=ReactDOM},function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},function(e,t,n){"use strict";n.r(t);var r=n(6),a=n(0),i=n.n(a),o=n(2),c=n.n(o),s=n(3),l=n.n(s),u=["portalContainer","portalWrapper"],d=function(e){var t=e.children,n=e.target,r=e.zIndex,a=void 0===r?2147483647:r,o=e.cover,s=l()(u);return n||(n=window&&window.document&&window.document.body),n?c.a.createPortal(i.a.createElement("div",{className:s.portalContainer,style:Object.assign(Object.assign({position:"fixed",top:0,left:0},o?{bottom:0,right:0,pointerEvents:"none"}:{}),{zIndex:a})},i.a.createElement("div",{className:s.portalWrapper,style:{pointerEvents:"auto"}},t)),n):null},v=n(5),f=n.n(v),w=function(e,t){switch(e){case"left":return t.left;case"right":return t.right;case"center":return(t.right+t.left)/2;default:return t.left}},p=function(e){switch(e){case"left":return"justify-start";case"right":return"justify-end";case"center":return"justify-center";default:return"justify-start"}};t.default=function(e){var t=e.children,n=e.fullWindow,o=e.target,c=e.alignment,s=void 0===c?"left":c,l=Object(a.useRef)(null),u=Object(a.useState)(),v=Object(r.a)(u,2),m=v[0],g=v[1],E=Object(a.useCallback)(f()((function(){if(!n&&l.current){var e=l.current.getBoundingClientRect();g({x:w(s,e),y:e.top})}}),200,{leading:!1}),[s,n]);return Object(a.useEffect)((function(){return E(),window&&(window.addEventListener("scroll",E),window.addEventListener("load",E),window.addEventListener("resize",E),window.addEventListener("visibilitychange",E)),function(){window&&(window.removeEventListener("scroll",E),window.removeEventListener("load",E),window.removeEventListener("resize",E),window.removeEventListener("visibilitychange",E))}}),[s,n,E,t]),n?i.a.createElement(d,{target:o,cover:!0},t):i.a.createElement("div",{ref:l,style:{width:"auto",height:1,marginTop:-1}},m&&i.a.createElement(d,{target:o},i.a.createElement("div",{className:"flex ".concat(p(s)),style:{position:"absolute",left:m.x,top:m.y}},i.a.createElement("div",{className:"absolute"},t))))}},,,,function(e,t,n){"use strict";n.r(t),function(e){var t=n(1);n.p=Object(t.getPublicPath)("vtex.react-portal@0.4.1");var r=Object(t.register)((function(){return n(4)}),e,"vtex.react-portal@0.4.1","vtex.react-portal@0.x","Overlay");r.renderHotReload,r.setupHMR}.call(this,n(7)(e))}],[[8,"common",0]]]); },function(){ !function(e){function n(n){for(var r,u,c=n[0],a=n[1],l=n[2],f=0,p=[];fe.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.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,s.cancel);const e=this.queue.splice(0);return e.length&&(e.forEach(e=>this.cancelTask(e,s.cancel)),this.emit(o)),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(l),this.cancelTask(t,s.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=u,t?(this.emit(a,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(o),this.callWaiters()))}callWaiters(){this.waiters.splice(0).forEach(e=>e())}}c.defaultScheduler={schedule:e=>setTimeout(()=>e(),0)},c.defaultScheduler={schedule:"function"==typeof e?t=>e(()=>t()):e=>setTimeout(()=>e(),0)};const d={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:[]}};class f{constructor(){this.queue=new c,this.taskIdMap={},this.listeners={},this.isEmpty=!0,this.queue.on("drained",()=>{this.isEmpty=!0,this.emit("Fulfilled")})}isWaiting(e){return!!this.taskIdMap[e]}enqueue(e,t){this.isEmpty&&(this.isEmpty=!1,this.emit("Pending")),t&&this.taskIdMap[t]&&this.taskIdMap[t].promise.cancel();const n=()=>(t&&this.taskIdMap[t]&&delete this.taskIdMap[t],new Promise((t,n)=>{const i=async()=>{try{const n=await e();t(n)}catch(e){if(!navigator.onLine)return;n(e)}window.removeEventListener("online",i)};window.addEventListener("online",i),navigator.onLine&&i()})),i=this.queue.push(n),r=i.cancel;return i.cancel=()=>r({code:"TASK_CANCELLED",index:this.queue.indexOf(n)}),t&&(this.taskIdMap[t]={task:e,promise:i}),i}listen(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);return()=>{const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}}emit(e){this.listeners[e]&&this.listeners[e].forEach(e=>e())}}const h=Object(i.createContext)(void 0),m=()=>{const{status:e}=g();return e},v=({children:e})=>{const[t]=Object(i.useState)(()=>new f),n=Object(i.useRef)("Fulfilled");Object(i.useLayoutEffect)(()=>t.listen("Pending",()=>n.current="Pending"),[t]),Object(i.useLayoutEffect)(()=>t.listen("Fulfilled",()=>n.current="Fulfilled"),[t]);const s=Object(i.useMemo)(()=>({enqueue:t.enqueue.bind(t),listen:t.listen.bind(t),isWaiting:t.isWaiting.bind(t),status:n}),[t,n]);return r.a.createElement(h.Provider,{value:s},e)};function g(){const e=Object(i.useContext)(h);if(void 0===e)throw new Error("useOrderQueue must be used within a OrderQueueProvider");return e}var p,T,y,w,b;const k=null!==(b=!("undefined"==typeof window||!window.document||!window.document.createElement)&&(null===(w=null===(y=null===(T=null===(p=window)||void 0===p?void 0:p.__RUNTIME__)||void 0===T?void 0:T.settings)||void 0===y?void 0:y["vtex.store"])||void 0===w?void 0:w.enableOrderFormOptimization))&&void 0!==b&&b,O=Object(i.createContext)({orderForm:d,setOrderForm:()=>{},error:void 0,loading:!1});function E(){const e=Object(i.useContext)(O);if(void 0===e)throw new Error("useOrderForm must be used within a OrderFormProvider");return e}function F(){var e;return"undefined"==typeof document?null:JSON.parse(null!==(e=localStorage.getItem("orderform"))&&void 0!==e?e:"null")}function I(e,t){return"function"==typeof t?{...e,...t({...e,value:-1===e.value?0:e.value})}:{...e,...t}}function _({useOrderFormMessages:e,useGetOrderForm:t,useLogger:n,defaultOrderForm:s}){return{OrderFormProvider:({children:o})=>{var a,l;const{log:u}=null!==(a=null==n?void 0:n())&&void 0!==a?a:{},c="undefined"!=typeof document&&!navigator.onLine,[d,f]=Object(i.useReducer)(I,null!==(l=c?F():s)&&void 0!==l?l:s),{loading:h,data:v,error:g}=t({orderForm:d,setOrderForm:f}),[p,T]=Object(i.useState)(!c),y=m();Object(i.useEffect)(()=>{if(h||g||!v)return;const e=F();if(null!=e&&(!((e,t)=>-1===e.value||k&&e.id!==t.id&&"default-order-form"!==e.id)(e,v.orderForm)||"Fulfilled"!==y.current))return T(!1),void f(t=>t.id!==s.id?t:e);f(v.orderForm),T(!1)},[v,g,h,y]),Object(i.useEffect)(()=>{((e,t)=>{try{localStorage.setItem("orderform",JSON.stringify(e))}catch(e){null==t||t({type:"Error",level:"Critical",event:e,workflowType:"OrderManager",workflowInstance:"save-local-orderform"})}})(d,u)},[u,d]),e(d,f);const w=Object(i.useMemo)(()=>"default-order-form"!==d.id?{error:g,orderForm:{...d,value:-1===d.value?0:d.value,messages:{...d.messages,generalMessages:[]}},initialFetchComplete:!0,setOrderForm:f,loading:p}:{error:g,orderForm:{...d,value:-1===d.value?0:d.value,messages:{...d.messages,generalMessages:[]}},initialFetchComplete:!1,setOrderForm:f,loading:p},[g,d,p]);return r.a.createElement(O.Provider,{value:w},o)}}}function M({useToast:e,useClearOrderFormMessages:t,useGetOrderForm:n,useLogger:r,defaultOrderForm:s}){return _({useOrderFormMessages:(({useClearOrderFormMessages:e,useToast:t})=>(n,r)=>{const[s,o]=Object(i.useState)([]),{showToast:a,toastState:l}=t(),{enqueue:u}=g(),c=m(),d=e();Object(i.useEffect)(()=>{!l.isToastVisible&&s.length&&(a(s[0].text),o(e=>e.slice(1)))},[a,l.isToastVisible,s]),Object(i.useEffect)(()=>{var e,t;if(!(null===(t=null===(e=n.messages)||void 0===e?void 0:e.generalMessages)||void 0===t?void 0:t.length))return;o(e=>{var t,i;return e.concat(null!==(i=null===(t=n.messages)||void 0===t?void 0:t.generalMessages)&&void 0!==i?i:[])}),r(e=>({...e,messages:{...e.messages,generalMessages:[]}}));u(async()=>{const{data:e}=await d({orderFormId:n.id});return e.clearOrderFormMessages}).then(e=>{"Fulfilled"===c.current&&r(e)},e=>{if("TASK_CANCELLED"!==e.code)throw e})},[d,u,n.id,n.messages,c,r])})({useToast:e,useClearOrderFormMessages:t}),useGetOrderForm:n,useLogger:r,defaultOrderForm:s})}}).call(this,n(18).setImmediate)},18:function(e,t,n){var i="undefined"!=typeof global&&global||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function s(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new s(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new s(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},s.prototype.unref=s.prototype.ref=function(){},s.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(19),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},19:function(e,t,n){(function(e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,s,o,a,l=1,u={},c=!1,d=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){m(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?((s=new MessageChannel).port1.onmessage=function(e){m(e.data)},i=function(e){s.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(m,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&m(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(o+e,"*")}),f.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);r0;){var s=r;r=new Set,s.forEach((function(e){m.has(e)||(m.add(e),(a[e]||new Set).forEach((function(e){r.add(e)})))}))}return m.forEach((function(n){var a=d(e,n);a&&i.definitions.push(a)})),i}(i,"addItem")}}]); },function(){ (window.webpackJsonpvtex_store_resources_0_104_0=window.webpackJsonpvtex_store_resources_0_104_0||[]).push([["MutationAddToCart"],{46:function(e,t,r){"use strict";r.r(t),function(e){var t=r(0);r.p=Object(t.getPublicPath)("vtex.store-resources@0.104.0");var o=Object(t.register)((function(){return r(47)}),e,"vtex.store-resources@0.104.0","vtex.store-resources@0.x","MutationAddToCart");o.renderHotReload,o.setupHMR}.call(this,r(2)(e))},47:function(e,t,r){"use strict";r.r(t);var o=r(14),s=r.n(o);t.default=s.a}},[[46,"common",0]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_104_0=window.webpackJsonpvtex_store_resources_0_104_0||[]).push([[1],{15:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateItems"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderFormId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"OrderFormItemInput"}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.store-resources@0.104.0",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"310519f0b239fcc2d78d267583fd7daf58bcc04d55ec8c56a92e7d1a3729df6b",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"orderFormId"},value:{kind:"Variable",name:{kind:"Name",value:"orderFormId"}}},{kind:"Argument",name:{kind:"Name",value:"items"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cacheId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"orderFormId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalizers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"imageUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"detailUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productRefId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"additionalInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"brandName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"canHaveAttachment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productCategoryIds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productCategories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"skuName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"listPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentItemIndex"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parentAssemblyBinding"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"seller"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cartIndex"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPriceWithAssemblies"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assemblyOptions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"item"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPriceWithAssemblies"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assemblyOptions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"item"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPriceWithAssemblies"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"normalizedQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"choiceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extraQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"removed"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removedQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"initialQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"parentPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"normalizedQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"choiceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extraQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"removed"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removedQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"initialQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"parentPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"priceDefinition"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"calculatedSellingPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellingPrices"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"shippingData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"neighborhood"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"complement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"street"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"availableAddresses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"neighborhood"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"complement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"street"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addressType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientProfileData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"storePreferencesData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"countryCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeZone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"checkedInPickupPointId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCheckedIn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:2787}};i.loc.source={body:'mutation updateItems($orderFormId: String, $items: [OrderFormItemInput]) @context(sender: "vtex.store-resources@0.104.0") @runtimeMeta(hash: "310519f0b239fcc2d78d267583fd7daf58bcc04d55ec8c56a92e7d1a3729df6b") {\n updateItems(orderFormId: $orderFormId, items: $items) {\n cacheId\n orderFormId\n value\n totalizers {\n id\n name\n value\n __typename\n }\n items {\n id\n productId\n name\n imageUrl\n detailUrl\n productRefId\n additionalInfo {\n brandName\n __typename\n }\n canHaveAttachment\n productCategoryIds\n productCategories\n skuName\n quantity\n sellingPrice\n listPrice\n parentItemIndex\n parentAssemblyBinding\n seller\n cartIndex\n sellingPriceWithAssemblies\n assemblyOptions {\n added {\n item {\n name\n sellingPrice\n quantity\n sellingPriceWithAssemblies\n assemblyOptions {\n added {\n item {\n name\n sellingPrice\n quantity\n sellingPriceWithAssemblies\n __typename\n }\n normalizedQuantity\n choiceType\n extraQuantity\n __typename\n }\n removed {\n removedQuantity\n initialQuantity\n name\n __typename\n }\n parentPrice\n __typename\n }\n __typename\n }\n normalizedQuantity\n choiceType\n extraQuantity\n __typename\n }\n removed {\n removedQuantity\n initialQuantity\n name\n __typename\n }\n parentPrice\n __typename\n }\n priceDefinition {\n calculatedSellingPrice\n total\n sellingPrices {\n quantity\n value\n __typename\n }\n __typename\n }\n __typename\n }\n shippingData {\n address {\n id\n neighborhood\n complement\n number\n street\n postalCode\n city\n reference\n addressName\n addressType\n __typename\n }\n availableAddresses {\n id\n neighborhood\n complement\n number\n street\n postalCode\n city\n reference\n addressName\n addressType\n __typename\n }\n __typename\n }\n clientProfileData {\n email\n firstName\n __typename\n }\n storePreferencesData {\n countryCode\n currencyCode\n timeZone\n __typename\n }\n checkedInPickupPointId\n isCheckedIn\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function d(e,n){for(var i=0;i0;){var r=s;s=new Set,r.forEach((function(e){m.has(e)||(m.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return m.forEach((function(n){var a=d(e,n);a&&i.definitions.push(a)})),i}(i,"updateItems")}}]); }], document.currentScript.dataset.index)