@dropins/storefront-checkout 0.1.0-alpha10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/223.js +2 -0
- package/223.js.LICENSE.txt +1 -0
- package/270.js +1 -0
- package/323.js +1 -0
- package/358.js +2 -0
- package/358.js.LICENSE.txt +1 -0
- package/378.js +2 -0
- package/378.js.LICENSE.txt +1 -0
- package/41.js +2 -0
- package/41.js.LICENSE.txt +1 -0
- package/424.js +2 -0
- package/424.js.LICENSE.txt +1 -0
- package/448.js +1 -0
- package/449.js +1 -0
- package/466.js +1 -0
- package/467.js +2 -0
- package/467.js.LICENSE.txt +1 -0
- package/483.js +2 -0
- package/483.js.LICENSE.txt +1 -0
- package/499.js +1 -0
- package/603.js +2 -0
- package/603.js.LICENSE.txt +1 -0
- package/636.js +2 -0
- package/636.js.LICENSE.txt +1 -0
- package/757.js +1 -0
- package/774.js +2 -0
- package/774.js.LICENSE.txt +1 -0
- package/79.js +2 -0
- package/79.js.LICENSE.txt +1 -0
- package/822.js +1 -0
- package/840.js +1 -0
- package/93.js +1 -0
- package/94.js +2 -0
- package/94.js.LICENSE.txt +1 -0
- package/965.js +2 -0
- package/965.js.LICENSE.txt +1 -0
- package/967.js +1 -0
- package/api.js +2 -0
- package/api.js.LICENSE.txt +3 -0
- package/containers/BillToShippingAddress.js +1 -0
- package/containers/BillingForm.js +1 -0
- package/containers/CartSummary.js +1 -0
- package/containers/Checkout.js +2 -0
- package/containers/Checkout.js.LICENSE.txt +1 -0
- package/containers/ErrorBanner.js +1 -0
- package/containers/LoginForm.js +1 -0
- package/containers/OrderSummary.js +1 -0
- package/containers/PaymentMethods.js +2 -0
- package/containers/PaymentMethods.js.LICENSE.txt +1 -0
- package/containers/PlaceOrder.js +2 -0
- package/containers/PlaceOrder.js.LICENSE.txt +1 -0
- package/containers/ShippingForm.js +2 -0
- package/containers/ShippingForm.js.LICENSE.txt +1 -0
- package/containers/ShippingMethods.js +2 -0
- package/containers/ShippingMethods.js.LICENSE.txt +1 -0
- package/package.json +1 -0
- package/render.js +2 -0
- package/render.js.LICENSE.txt +1 -0
- package/runtime.js +1 -0
package/render.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see render.js.LICENSE.txt */
|
|
2
|
+
import*as e from"@dropins/elsie/event-bus.js";import*as t from"@dropins/elsie/fetch-graphql.js";import*as r from"@dropins/elsie/preact-compat.js";import*as n from"@dropins/elsie/preact-hooks.js";import*as o from"@dropins/elsie/preact-jsx-runtime.js";import*as i from"@dropins/elsie/preact.js";export const id=70;export const ids=[70];export const modules={6680:(e,t,r)=>{function n(e){return n="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},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:String(t)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function l(e){var t=p();return function(){var r,o=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return f(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)},s(e)}function f(e,t,r){return f=p()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&d(o,r.prototype),o},f.apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}r.d(t,{Cl:()=>w,Pz:()=>m,S2:()=>v,UM:()=>S,dz:()=>g,e8:()=>x,fQ:()=>b,kp:()=>y});var y=function(e){c(r,e);var t=l(r);function r(e){var n;return u(this,r),(n=t.call(this,e.map((function(e){return e.message})).join(" "))).name="FetchError",n}return i(r)}(s(Error)),m=function(e){c(r,e);var t=l(r);function r(e){var n;return u(this,r),(n=t.call(this,e)).name="InvalidArgument",n}return i(r)}(s(Error)),v=function(e){c(r,e);var t=l(r);function r(e){var n;return u(this,r),(n=t.call(this,e)).name="UnexpectedError",n}return i(r)}(s(Error)),b=function(e){c(r,e);var t=l(r);function r(){return u(this,r),t.call(this,"Cart ID is required")}return i(r)}(m),g=function(e){c(r,e);var t=l(r);function r(){return u(this,r),t.call(this,"Email is required")}return i(r)}(m),w=function(e){c(r,e);var t=l(r);function r(){return u(this,r),t.call(this,"Payment method code is required")}return i(r)}(m),x=function(e){c(r,e);var t=l(r);function r(){return u(this,r),t.call(this,"Billing address is required")}return i(r)}(m),S=function(e){c(r,e);var t=l(r);function r(){return u(this,r),t.call(this,"Country Code is required")}return i(r)}(m)},7096:(e,t,r)=>{r.d(t,{G:()=>o,IQ:()=>i,mr:()=>n});var n="\n fragment CheckoutData on Cart {\n is_virtual\n email\n billing_address {\n city\n country {\n code\n label\n }\n firstname\n lastname\n company\n postcode\n vat_id\n region {\n region_id\n code\n label\n }\n street\n telephone\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n }\n shipping_addresses {\n firstname\n lastname\n company\n street\n city\n postcode\n vat_id\n region {\n region_id\n code\n label\n }\n country {\n code\n label\n }\n telephone\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n available_shipping_methods {\n amount {\n currency\n value\n }\n available\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n selected_shipping_method {\n amount {\n value\n currency\n }\n carrier_code\n carrier_title\n method_code\n method_title\n }\n }\n available_payment_methods {\n code\n title\n }\n selected_payment_method {\n code\n title\n }\n applied_coupons {\n code\n }\n prices {\n grand_total {\n value\n currency\n }\n subtotal_excluding_tax {\n value\n currency\n }\n subtotal_including_tax {\n value\n currency\n }\n applied_taxes {\n label\n amount {\n currency\n value\n }\n }\n }\n }\n",o="\n fragment CartSummaryItems on Cart {\n total_quantity\n items {\n uid\n product {\n uid\n name\n sku\n url_key\n thumbnail {\n url\n }\n small_image {\n url\n }\n stock_status\n only_x_left_in_stock\n ... on ConfigurableProduct {\n variants {\n attributes {\n uid\n code\n value_index\n }\n product {\n uid\n stock_status\n small_image {\n url\n }\n }\n }\n }\n }\n prices {\n price {\n currency\n value\n }\n row_total {\n value\n }\n total_item_discount {\n value\n }\n }\n quantity\n errors {\n code\n message\n }\n ... on ConfigurableCartItem {\n configurable_options {\n id\n configurable_product_option_uid\n option_label\n configurable_product_option_value_uid\n value_label\n value_id\n }\n }\n }\n }\n",i="\n query getCheckoutData($cartId: String!) {\n cart(cart_id: $cartId) {\n id\n ...CheckoutData\n ...CartSummaryItems\n }\n }\n ".concat(n,"\n ").concat(o,"\n")},4114:(e,t,r)=>{r.d(t,{j:()=>y,v:()=>h});var n=r(1715),o=r(1750),i=r(6765);function a(e){return a="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},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",b={};function g(){}function w(){}function x(){}var S={};f(S,c,(function(){return this}));var j=Object.getPrototypeOf,_=j&&j(j(T([])));_&&_!==r&&n.call(_,c)&&(S=_);var E=x.prototype=g.prototype=Object.create(S);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=h;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(a(t)+" is not iterable")}return w.prototype=x,o(E,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,f(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},O(C.prototype),f(C.prototype,l,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new C(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(E),f(E,s,"Generator"),f(E,c,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){var n;return n=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==a(n)?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}var p,d,h=new n.D({guestViewCookieExpirationDays:30,storeKey:"commerce:checkout"}),y=new o.m({init:(p=u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&h.setConfig(l(l({},h.getConfig()),t)),i.events.emit("checkout/initialized",t);case 2:case"end":return e.stop()}}),e)})),d=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=p.apply(e,t);function i(e){f(o,r,n,i,a,"next",e)}function a(e){f(o,r,n,i,a,"throw",e)}i(void 0)}))},function(e){return d.apply(this,arguments)}),listeners:function(){return[]}})},7294:(e,t,r)=>{r.d(t,{c:()=>s,l:()=>f});var n=r(3474),o=r(5437),i=r(2460),a=r(7188);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=(0,n.createContext)(void 0);function s(e){var t=e.children,r=u((0,o.useState)({}),2),n=r[0],c=r[1];return(0,o.useEffect)((function(){(0,i.w)().then((function(e){return c({fields:e})}))}),[]),(0,a.jsx)(l.Provider,{value:n,children:t})}function f(){var e=(0,o.useContext)(l);if(void 0!==e)return e;throw new Error("useAddressFormFields must be used within an AddressFormFieldsProvider")}},8393:(e,t,r)=>{r.d(t,{Mg:()=>p,oo:()=>f});var n=r(8786),o=r(1497),i=r(3042),a=r(6364),u=r(3474),c=r(5437),l=r(7188),s=(0,u.createContext)(void 0);function f(e){var t=e.children,r=(0,o.oR)().cartId,u={isBillToShipping:(0,a.qs)(!0),serverError:(0,a.qs)("")};return(0,c.useEffect)((function(){r&&(0,n.V)(r).then((function(e){i.t.value={pending:!1,data:e}}))}),[r]),(0,l.jsx)(s.Provider,{value:u,children:t})}function p(){var e=(0,c.useContext)(s);if(void 0!==e)return e;throw new Error("useCheckout must be used within a CheckoutProvider")}},7159:(e,t,r)=>{r.d(t,{Hz:()=>u,Su:()=>c});var n=r(3474),o=r(5437),i=r(7188),a=(0,n.createContext)({});function u(e){var t=e.children,r=e.services;return(0,i.jsx)(a.Provider,{value:r,children:t})}function c(){var e=(0,o.useContext)(a);if(void 0!==e)return e;throw new Error("useServices must be used within a ServicesProvider")}},8481:(e,t,r)=>{r.d(t,{z:()=>C,s:()=>P});var n=r(3516),o=r(4114),i=r(7159),a=r(8393);function u(e){return u="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},u(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:String(t)}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"isAvailable",value:function(){return!!window.localStorage}},{key:"getKeys",value:function(){return this.isAvailable()?Object.keys(window.localStorage):[]}},{key:"setItem",value:function(e,t){this.isAvailable()&&window.localStorage.setItem(e,t)}},{key:"getItem",value:function(e){return this.isAvailable()?window.localStorage.getItem(e):null}},{key:"removeItem",value:function(e){this.isAvailable()&&window.localStorage.removeItem(e)}}])&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function f(e){return f="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},f(e)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:String(t)}var h=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.namespace=t,this.repository=r}var t,r,n;return t=e,(r=[{key:"namespaced",value:function(e){return"".concat(this.namespace,":").concat(e)}},{key:"backup",value:function(e,t){return this.repository.setItem(this.namespaced(e),JSON.stringify(t))}},{key:"restore",value:function(e){var t=this.repository.getItem(this.namespaced(e));return t?JSON.parse(t):null}},{key:"remove",value:function(e){return this.repository.removeItem(this.namespaced(e))}},{key:"clear",value:function(){var e=this;this.repository.getKeys().filter((function(t){return t.startsWith(e.namespace)})).forEach((function(t){e.repository.removeItem(t)}))}}])&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),y=r(9276),m=r(6765),v=r(5437),b=r(1497),g=r(7294),w=r(7188);function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var j={default:r(7770)},_=function(e){var t=e.children,r=x((0,v.useState)("en_US"),2),n=r[0],o=r[1];return(0,v.useEffect)((function(){var e=m.events.on("locale",(function(e){o(e)}),{eager:!0});return function(){null==e||e.off()}}),[]),(0,w.jsx)(y.J,{lang:n,langDefinitions:j,children:t})},E=function(e){var t=e.children,r=o.v.getConfig().storeKey,n=(0,v.useMemo)((function(){return new h(r,new s)}),[r]);return(0,w.jsx)(i.Hz,{services:{backupService:n},children:(0,w.jsx)(b.g3,{children:(0,w.jsx)(g.c,{children:(0,w.jsx)(a.oo,{children:t})})})})},O=function(e){var t=e.children,r=o.v.getConfig().storeKey,n=(0,v.useMemo)((function(){return new h(r,new s)}),[r]);return(0,w.jsx)(i.Hz,{services:{backupService:n},children:t})},C=function(e){var t=e.children;return(0,w.jsx)(O,{children:(0,w.jsx)(E,{children:(0,w.jsx)(_,{children:t})})})},P=new n.H((0,w.jsx)(C,{}))},6765:(t,r,n)=>{t.exports=(e=>{var t={};return n.d(t,e),t})({events:()=>e.events})},9699:(e,r,n)=>{e.exports=(e=>{var t={};return n.d(t,e),t})({FetchGraphQL:()=>t.FetchGraphQL})},4853:(e,t,n)=>{e.exports=(e=>{var t={};return n.d(t,e),t})({createContext:()=>r.createContext,forwardRef:()=>r.forwardRef,useCallback:()=>r.useCallback,useContext:()=>r.useContext,useEffect:()=>r.useEffect,useImperativeHandle:()=>r.useImperativeHandle,useMemo:()=>r.useMemo,useRef:()=>r.useRef,useState:()=>r.useState})},5437:(e,t,r)=>{e.exports=(e=>{var t={};return r.d(t,e),t})({useCallback:()=>n.useCallback,useContext:()=>n.useContext,useDebugValue:()=>n.useDebugValue,useEffect:()=>n.useEffect,useId:()=>n.useId,useImperativeHandle:()=>n.useImperativeHandle,useLayoutEffect:()=>n.useLayoutEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState})},4142:(e,t,r)=>{e.exports=(e=>{var t={};return r.d(t,e),t})({Fragment:()=>o.Fragment,jsx:()=>o.jsx,jsxs:()=>o.jsxs})},3474:(e,t,r)=>{e.exports=(e=>{var t={};return r.d(t,e),t})({Component:()=>i.Component,Fragment:()=>i.Fragment,cloneElement:()=>i.cloneElement,createContext:()=>i.createContext,createElement:()=>i.createElement,createRef:()=>i.createRef,h:()=>i.h,hydrate:()=>i.hydrate,isValidElement:()=>i.isValidElement,options:()=>i.options,render:()=>i.render,toChildArray:()=>i.toChildArray})},7770:e=>{e.exports=JSON.parse('{"Checkout":{"title":"Checkout","LoginForm":{"title":"Contact details","account":"Already have an account?","ariaLabel":"Email","invalidEmailError":"Please enter a valid email address.","missingEmailError":"Enter an email address.","emailExists":"It looks like you already have an account. Sign in for a faster checkout.","floatingLabel":"Email *","placeholder":"Enter your email address","signIn":"Sign in"},"ShippingMethods":{"title":"Shipping options","emptyState":"This order can\'t be shipped to the address provided. Please review the address details you entered and make sure they\'re correct."},"ShippingAddress":{"title":"Delivery"},"BillingAddress":{"title":"Billing Address"},"AddressForm":{"Validity":{"badInput":"Provide a valid {field}.","patternMismatch":"Ensure you have entered a correct {field} format.","rangeOverflow":"Choose a valid {field} within the allowed range.","rangeUnderflow":"Choose a valid {field} within the allowed range.","tooLong":"This entry is too long. Keep it under {field} characters.","tooShort":"Use at least {field} characters.","typeMismatch":"Enter a valid {field}.","valueMissing":"Enter a {field}, this field is required."}},"BillToShippingAddress":{"title":"Bill to shipping address"},"PaymentMethods":{"title":"Payment","emptyState":"No payment methods available"},"OrderSummary":{"title":"Order summary","total":"Total","totalExclTax":"Total excluding taxes","subtotal":"Subtotal","tax":"Tax","taxTotal":"Tax total","taxBreakdown":"Taxes","includingTaxes":"Including taxes","shipping":"Shipping","estimatedShipping":"Estimated shipping","freeShipping":"Free shipping"},"CartSummary":{"title":"Your cart","editCart":"<a rel=\'noreferrer\' href=\'/cart\'>Edit</a>","viewAll":"View all in cart","viewMore":"View more"},"OutOfStock":{"title":"Out of stock","message":"Some items are no longer available. Please review your cart before placing the order.","button":"Review cart"},"PlaceOrder":{"button":"Place Order"},"ServerError":{"title":"We were unable to process your order","contactSupport":"If you continue to have issues, please contact support.","unexpected":"An unexpected error occurred while processing your order. Please try again later.","button":"Try again"},"EmptyCard":{"title":"Your cart is empty","button":"Start shopping"},"ErrorBanner":{"dismissLabel":"Close","genericMessage":"Server error detected. Please check your connection and try again."}}}')}};import a from"./runtime.js";import*as u from"./757.js";a.C(u);import*as c from"./223.js";a.C(c);import*as l from"./965.js";a.C(l);import*as s from"./378.js";a.C(s);import*as f from"./render.js";a.C(f);var p,d=(p=8481,a(a.s=p)),h=d.z,y=d.s;export{h as Provider,y as render};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/runtime.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r,e={},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var a=o[r]={id:r,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.exports}t.m=e,t.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},t.d=(r,e)=>{for(var o in e)t.o(e,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);export default t;r={666:0},t.C=e=>{var o,n,{ids:a,modules:d,runtime:i}=e,l=0;for(o in d)t.o(d,o)&&(t.m[o]=d[o]);for(i&&i(t);l<a.length;l++)n=a[l],t.o(r,n)&&r[n]&&r[n][0](),r[a[l]]=0},t.nc=void 0;
|