enqueueScripts([function(){ (window.webpackJsonpvtex_react_portal_0_4_1=window.webpackJsonpvtex_react_portal_0_4_1||[]).push([[0],{5:function(t,n){var e=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt,a="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,c=a||f||Function("return this")(),l=Object.prototype.toString,p=Math.max,s=Math.min,v=function(){return c.Date.now()};function b(t,n,e){var i,r,o,u,a,f,c=0,l=!1,b=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(n){var e=i,o=r;return i=r=void 0,c=n,u=t.apply(o,e)}function w(t){return c=t,a=setTimeout(x,n),l?m(t):u}function j(t){var e=t-f;return void 0===f||e>=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 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_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).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.101.2");var o=Object(t.register)((function(){return r(47)}),e,"vtex.store-resources@0.101.2","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_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).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.101.2",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"e9aad89b443b514df7702214f16eadac972100b5f5d981d2fdee442a0d4545ff",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.101.2") @runtimeMeta(hash: "e9aad89b443b514df7702214f16eadac972100b5f5d981d2fdee442a0d4545ff") {\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")}}]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["MutationUpdateItems"],{48:function(e,t,r){"use strict";r.r(t),function(e){var t=r(0);r.p=Object(t.getPublicPath)("vtex.store-resources@0.101.2");var s=Object(t.register)((function(){return r(49)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","MutationUpdateItems");s.renderHotReload,s.setupHMR}.call(this,r(2)(e))},49:function(e,t,r){"use strict";r.r(t);var s=r(15),o=r.n(s);t.default=o.a}},[[48,"common",1]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["MutationUpdateOrderFormCheckin"],{4:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateOrderFormCheckin"},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:"checkin"}},type:{kind:"NamedType",name:{kind:"Name",value:"OrderFormCheckinInput"}},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.101.2",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"4f6d870f4f74e625bff440795e57791d479172b93fcfb78b503c18980ae0d047",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateOrderFormCheckin"},arguments:[{kind:"Argument",name:{kind:"Name",value:"orderFormId"},value:{kind:"Variable",name:{kind:"Name",value:"orderFormId"}}},{kind:"Argument",name:{kind:"Name",value:"checkin"},value:{kind:"Variable",name:{kind:"Name",value:"checkin"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isCheckedIn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"checkedInPickupPointId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shippingData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectedAddresses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"street"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiverName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"complement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"neighborhood"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"geoCoordinates"},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:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:702}};i.loc.source={body:'mutation updateOrderFormCheckin($orderFormId: String, $checkin: OrderFormCheckinInput) @context(sender: "vtex.store-resources@0.101.2") @runtimeMeta(hash: "4f6d870f4f74e625bff440795e57791d479172b93fcfb78b503c18980ae0d047") {\n updateOrderFormCheckin(orderFormId: $orderFormId, checkin: $checkin) {\n isCheckedIn\n checkedInPickupPointId\n shippingData {\n selectedAddresses {\n id\n street\n number\n receiverName\n complement\n neighborhood\n country\n state\n geoCoordinates\n postalCode\n city\n reference\n addressName\n addressType\n __typename\n }\n __typename\n }\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 m=s;s=new Set,m.forEach((function(e){r.has(e)||(r.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return r.forEach((function(n){var a=d(e,n);a&&i.definitions.push(a)})),i}(i,"updateOrderFormCheckin")},50:function(e,n,i){"use strict";i.r(n),function(e){var n=i(0);i.p=Object(n.getPublicPath)("vtex.store-resources@0.101.2");var a=Object(n.register)((function(){return i(51)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","MutationUpdateOrderFormCheckin");a.renderHotReload,a.setupHMR}.call(this,i(2)(e))},51:function(e,n,i){"use strict";i.r(n);var a=i(4),d=i.n(a);n.default=d.a}},[[50,"common"]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["MutationUpdateOrderFormProfile"],{5:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateOrderFormProfile"},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:"fields"}},type:{kind:"NamedType",name:{kind:"Name",value:"OrderFormProfileInput"}},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.101.2",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"d708938c56e09315adf2a9f1bfef969b43f24573f04a5ec4710d02af46bc16a1",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateOrderFormProfile"},arguments:[{kind:"Argument",name:{kind:"Name",value:"orderFormId"},value:{kind:"Variable",name:{kind:"Name",value:"orderFormId"}}},{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"orderFormId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:332}};i.loc.source={body:'mutation updateOrderFormProfile($orderFormId: String, $fields: OrderFormProfileInput) @context(sender: "vtex.store-resources@0.101.2") @runtimeMeta(hash: "d708938c56e09315adf2a9f1bfef969b43f24573f04a5ec4710d02af46bc16a1") {\n updateOrderFormProfile(orderFormId: $orderFormId, fields: $fields) {\n orderFormId\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function a(e,n){for(var i=0;i0;){var u=d;d=new Set,u.forEach((function(e){o.has(e)||(o.add(e),(r[e]||new Set).forEach((function(e){d.add(e)})))}))}return o.forEach((function(n){var r=a(e,n);r&&i.definitions.push(r)})),i}(i,"updateOrderFormProfile")},52:function(e,n,i){"use strict";i.r(n),function(e){var n=i(0);i.p=Object(n.getPublicPath)("vtex.store-resources@0.101.2");var r=Object(n.register)((function(){return i(53)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","MutationUpdateOrderFormProfile");r.renderHotReload,r.setupHMR}.call(this,i(2)(e))},53:function(e,n,i){"use strict";i.r(n);var r=i(5),a=i.n(r);n.default=a.a}},[[52,"common"]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["MutationUpdateOrderFormShipping"],{54:function(e,n,i){"use strict";i.r(n),function(e){var n=i(0);i.p=Object(n.getPublicPath)("vtex.store-resources@0.101.2");var a=Object(n.register)((function(){return i(55)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","MutationUpdateOrderFormShipping");a.renderHotReload,a.setupHMR}.call(this,i(2)(e))},55:function(e,n,i){"use strict";i.r(n);var a=i(6),d=i.n(a);n.default=d.a},6:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateOrderFormShipping"},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:"address"}},type:{kind:"NamedType",name:{kind:"Name",value:"OrderFormAddressInput"}},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.101.2",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"19dd6d2a72b6185d2571f337b5a4ccbc3fa48377a7b015dc015bd623103c5ece",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateOrderFormShipping"},arguments:[{kind:"Argument",name:{kind:"Name",value:"orderFormId"},value:{kind:"Variable",name:{kind:"Name",value:"orderFormId"}}},{kind:"Argument",name:{kind:"Name",value:"address"},value:{kind:"Variable",name:{kind:"Name",value:"address"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"orderFormId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCheckedIn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"checkedInPickupPointId"},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:"geoCoordinates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiverName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},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:"geoCoordinates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiverName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},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:[]}]}}]}}],loc:{start:0,end:1009}};i.loc.source={body:'mutation updateOrderFormShipping($orderFormId: String, $address: OrderFormAddressInput) @context(sender: "vtex.store-resources@0.101.2") @runtimeMeta(hash: "19dd6d2a72b6185d2571f337b5a4ccbc3fa48377a7b015dc015bd623103c5ece") {\n updateOrderFormShipping(orderFormId: $orderFormId, address: $address) {\n orderFormId\n isCheckedIn\n checkedInPickupPointId\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 geoCoordinates\n state\n receiverName\n country\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 geoCoordinates\n state\n receiverName\n country\n __typename\n }\n __typename\n }\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 m=s;s=new Set,m.forEach((function(e){t.has(e)||(t.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return t.forEach((function(n){var a=d(e,n);a&&i.definitions.push(a)})),i}(i,"updateOrderFormShipping")}},[[54,"common"]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["OrderFormContext"],{1:function(e,r){e.exports=PropTypes},3:function(e,r){e.exports=React},30:function(e,r,t){"use strict";var o=t(60),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function i(e){return o.isMemo(e)?s:c[e.$$typeof]||n}c[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[o.Memo]=s;var u=Object.defineProperty,f=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,y=Object.prototype;e.exports=function e(r,t,o){if("string"!=typeof t){if(y){var n=m(t);n&&n!==y&&e(r,n,o)}var s=f(t);p&&(s=s.concat(p(t)));for(var c=i(r),l=i(t),b=0;b0;){var o=s;s=new Set,o.forEach((function(e){r.has(e)||(r.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return r.forEach((function(n){var a=i(e,n);a&&t.definitions.push(a)})),t}(t,"pwaData")},62:function(e,n,t){"use strict";t.r(n),function(e){var n=t(0);t.p=Object(n.getPublicPath)("vtex.store-resources@0.101.2");var a=Object(n.register)((function(){return t(63)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","PWAContext");a.renderHotReload,a.setupHMR}.call(this,t(2)(e))},63:function(e,n,t){"use strict";t.r(n);var a=t(27),i=t(28),c=t(3),r=t.n(c),s=t(26),o=t(7),d=t(31),u=t(32),l=t.n(u),m=r.a.createContext(null);n.default={PWAContext:m,PWAProvider:Object(o.graphql)(l.a,{options:function(){return{ssr:!1}}})((function(e){var n=e.rootPath,t=e.children,o=e.data,u=void 0===o?{}:o,l=u.manifest,v=u.iOSIcons,f=u.splashes,p=u.pwaSettings,k=u.loading,b=u.error,h=Object(d.usePixel)().push,g=Object(s.useRuntime)().workspace,S=Object(c.useRef)(null),_=Object(c.useRef)(!1),N=Object(c.useState)(!1),w=Object(i.a)(N,2),O=w[0],x=w[1],E=Object(c.useState)(!1),P=Object(i.a)(E,2),D=P[0],j=P[1];Object(c.useEffect)((function(){var e=function(e){var n=p.promptOnCustomEvent,t=p.disablePrompt;return!("default"!==n&&!_.current)||(e.preventDefault(),t||(S.current=e,_.current=!0),!1)};return window.addEventListener("beforeinstallprompt",e),function(){return window.removeEventListener("beforeinstallprompt",e)}}),[_,p]),Object(c.useEffect)((function(){var e=localStorage.getItem("webAppInstalled");e&&x(e);var n=localStorage.getItem("webAppInstallDismissed");n&&j(n)}),[]);var y=Object(c.useCallback)((function(){var e=S.current;e&&(e.prompt(),e.userChoice.then((function(e){"accepted"===e.outcome?localStorage.setItem("webAppInstalled","true"):localStorage.setItem("webAppInstallDismissed","true"),h({event:"installWebApp",userChoice:e.outcome}),S.current=null})))}),[]),F=Object(c.useMemo)((function(){if(p){var e=p.disablePrompt,n=p.promptOnCustomEvent,t=navigator&&!!navigator.userAgent.match(/(iPod|iPhone|iPad)/);return{showInstallPrompt:y,settings:{promptOnCustomEvent:e||t||D||O?"":n}}}}),[y,p,O]),A=!k&&l&&!b,C="master"===g?"":"?workspace=".concat(g);return r.a.createElement(m.Provider,{value:F},A&&r.a.createElement(s.Helmet,{meta:[{name:"theme-color",content:l.theme_color},{name:"apple-mobile-web-app-capable",content:"yes"}],link:[{rel:"manifest",href:"".concat(n,"/pwa/manifest.json").concat(C)}].concat(Object(a.a)(v?v.map((function(e){return{rel:"apple-touch-icon",sizes:e.sizes,href:"".concat(n).concat(e.src)}})):[]),Object(a.a)(f?f.map((function(e){return{href:"".concat(n).concat(e.src),sizes:e.sizes,rel:"apple-touch-startup-image"}})):[])).filter(Boolean)}),t)})),usePWA:function(){return Object(c.useContext)(m)}}},7:function(e,n){e.exports=ReactApollo}},[[62,"common"]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([[3],{17:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"orderForm"},variableDefinitions:[],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.store-resources@0.101.2",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"orderForm"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"scope"},value:{kind:"StringValue",value:"private",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"54ebc35a1e6f8c0714157eb64358a7334aa7174d2279aa715a0ba8a579309487",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cacheId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellers"},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:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"orderFormId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userProfileId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"customData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"customApps"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fields"},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:"itemMetadata"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{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:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assemblyOptions"},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:"composition"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{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:"seller"},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:"__typename"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"priceTable"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"values"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"price"},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:"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:"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:"seller"},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:"geoCoordinates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiverName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},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:"geoCoordinates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"receiverName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},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:"lastName"},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:3547}};i.loc.source={body:'query orderForm @context(sender: "vtex.store-resources@0.101.2") {\n orderForm @context(scope: "private") @runtimeMeta(hash: "54ebc35a1e6f8c0714157eb64358a7334aa7174d2279aa715a0ba8a579309487") {\n cacheId\n sellers {\n id\n name\n __typename\n }\n orderFormId\n userProfileId\n customData {\n customApps {\n id\n fields\n __typename\n }\n __typename\n }\n itemMetadata {\n items {\n id\n name\n assemblyOptions {\n id\n name\n composition {\n items {\n id\n seller\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n priceTable {\n type\n values {\n id\n price\n __typename\n }\n __typename\n }\n __typename\n }\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 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 seller\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 geoCoordinates\n state\n receiverName\n country\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 geoCoordinates\n state\n receiverName\n country\n __typename\n }\n __typename\n }\n clientProfileData {\n email\n firstName\n lastName\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 l=s;s=new Set,l.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,"orderForm")}}]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["QueryOrderForm"],{80:function(e,r,t){"use strict";t.r(r),function(e){var r=t(0);t.p=Object(r.getPublicPath)("vtex.store-resources@0.101.2");var s=Object(r.register)((function(){return t(81)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","QueryOrderForm");s.renderHotReload,s.setupHMR}.call(this,t(2)(e))},81:function(e,r,t){"use strict";t.r(r);var s=t(17),o=t.n(s);r.default=o.a}},[[80,"common",3]]]); },function(){ (window.webpackJsonpvtex_store_resources_0_101_2=window.webpackJsonpvtex_store_resources_0_101_2||[]).push([["QueryItemsWithSimulation"],{37:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"itemsWithSimulation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ItemInput"}}},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.101.2",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemsWithSimulation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"items"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"03dc70a040f73cf67c8f201c63b4ffab1ec72d323eb36ada0c783e84bb0c9fa2",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sellers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sellerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commertialOffer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"AvailableQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ListPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"PriceValidUntil"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Installments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"Value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"InterestRate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"TotalValuePlusInterestRate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"NumberOfInstallments"},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:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:602}};i.loc.source={body:'query itemsWithSimulation($items: [ItemInput]) @context(sender: "vtex.store-resources@0.101.2") {\n itemsWithSimulation(items: $items) @runtimeMeta(hash: "03dc70a040f73cf67c8f201c63b4ffab1ec72d323eb36ada0c783e84bb0c9fa2") {\n itemId\n sellers {\n sellerId\n commertialOffer {\n AvailableQuantity\n Price\n ListPrice\n PriceValidUntil\n Installments {\n Value\n InterestRate\n TotalValuePlusInterestRate\n NumberOfInstallments\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function a(e,n){for(var i=0;i0;){var l=d;d=new Set,l.forEach((function(e){s.has(e)||(s.add(e),(t[e]||new Set).forEach((function(e){d.add(e)})))}))}return s.forEach((function(n){var t=a(e,n);t&&i.definitions.push(t)})),i}(i,"itemsWithSimulation")},78:function(e,n,i){"use strict";i.r(n),function(e){var n=i(0);i.p=Object(n.getPublicPath)("vtex.store-resources@0.101.2");var t=Object(n.register)((function(){return i(79)}),e,"vtex.store-resources@0.101.2","vtex.store-resources@0.x","QueryItemsWithSimulation");t.renderHotReload,t.setupHMR}.call(this,i(2)(e))},79:function(e,n,i){"use strict";i.r(n);var t=i(37),a=i.n(t);n.default=a.a}},[[78,"common"]]]); },function(){ !function(e){function t(t){for(var r,u,a=t[0],c=t[1],l=t[2],d=0,s=[];de.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;n