woocommerce/packages/woocommerce-blocks/build/wc-blocks-data.js
2021-12-10 12:03:04 +00:00

1 line
42 KiB
JavaScript

this.wc=this.wc||{},this.wc.wcBlocksData=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=161)}({1:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},10:function(e,t){e.exports=window.wp.data},12:function(e,t,r){var n=r(20),o=r(21),a=r(18),c=r(22);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},13:function(e,t){e.exports=window.wp.apiFetch},14:function(e,t,r){"use strict";r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c}));var n=r(2),o="wc/store/cart",a={code:"cart_api_error",message:Object(n.__)("Unable to get cart data from the API.",'woocommerce'),data:{status:500}},c="wc-blocks_cart_update_timestamp"},143:function(e,t){e.exports=window.wp.notices},144:function(e,t,r){var n=r(19);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},145:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},146:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},147:function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(o.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(o.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,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))},r(148),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(39))},148:function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,o,a,c,u,i=1,s={},f=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(c="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(c)&&h(+t.data.slice(c.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),n=function(t){e.postMessage(c+t,"*")}):e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){a.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):n=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var o={callback:e,args:t};return s[i]=o,n(i),i++},p.clearImmediate=d}function d(e){delete s[e]}function h(e){if(f)setTimeout(h,0,e);else{var t=s[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(39),r(31))},161:function(e,t,r){"use strict";r.r(t),r.d(t,"SCHEMA_STORE_KEY",(function(){return W})),r.d(t,"COLLECTIONS_STORE_KEY",(function(){return Ue})),r.d(t,"CART_STORE_KEY",(function(){return Ht})),r.d(t,"QUERY_STATE_STORE_KEY",(function(){return Zt})),r.d(t,"API_BLOCK_NAMESPACE",(function(){return C})),r.d(t,"EMPTY_CART_COUPONS",(function(){return P})),r.d(t,"EMPTY_CART_ITEMS",(function(){return S})),r.d(t,"EMPTY_CART_FEES",(function(){return R})),r.d(t,"EMPTY_CART_ITEM_ERRORS",(function(){return j})),r.d(t,"EMPTY_CART_ERRORS",(function(){return I})),r.d(t,"EMPTY_SHIPPING_RATES",(function(){return D})),r.d(t,"EMPTY_PAYMENT_REQUIREMENTS",(function(){return A})),r.d(t,"EMPTY_EXTENSIONS",(function(){return k})),r.d(t,"EMPTY_TAX_LINES",(function(){return M}));var n={};r.r(n),r.d(n,"getRoute",(function(){return O})),r.d(n,"getRoutes",(function(){return w}));var o={};r.r(o),r.d(o,"receiveRoutes",(function(){return N}));var a={};r.r(a),r.d(a,"getRoute",(function(){return G})),r.d(a,"getRoutes",(function(){return Y}));var c={};r.r(c),r.d(c,"getCollection",(function(){return oe})),r.d(c,"getCollectionError",(function(){return ae})),r.d(c,"getCollectionHeader",(function(){return ce})),r.d(c,"getCollectionLastModified",(function(){return ue}));var u={};r.r(u),r.d(u,"receiveCollection",(function(){return se})),r.d(u,"receiveCollectionError",(function(){return fe})),r.d(u,"receiveLastModified",(function(){return le}));var i={};r.r(i),r.d(i,"getCollection",(function(){return ke})),r.d(i,"getCollectionHeader",(function(){return Me}));var s={};r.r(s),r.d(s,"getCartData",(function(){return Ke})),r.d(s,"getCartTotals",(function(){return Qe})),r.d(s,"getCartMeta",(function(){return He})),r.d(s,"getCartErrors",(function(){return qe})),r.d(s,"isApplyingCoupon",(function(){return Be})),r.d(s,"isCartDataStale",(function(){return ze})),r.d(s,"getCouponBeingApplied",(function(){return Je})),r.d(s,"isRemovingCoupon",(function(){return We})),r.d(s,"getCouponBeingRemoved",(function(){return $e})),r.d(s,"getCartItem",(function(){return Xe})),r.d(s,"isItemPendingQuantity",(function(){return Ze})),r.d(s,"isItemPendingDelete",(function(){return et})),r.d(s,"isCustomerDataUpdating",(function(){return tt})),r.d(s,"isShippingRateBeingSelected",(function(){return rt}));var f={};r.r(f),r.d(f,"receiveCart",(function(){return lt})),r.d(f,"receiveError",(function(){return pt})),r.d(f,"receiveApplyingCoupon",(function(){return dt})),r.d(f,"receiveRemovingCoupon",(function(){return ht})),r.d(f,"receiveCartItem",(function(){return mt})),r.d(f,"itemIsPendingQuantity",(function(){return vt})),r.d(f,"itemIsPendingDelete",(function(){return yt})),r.d(f,"setIsCartDataStale",(function(){return bt})),r.d(f,"updatingCustomerData",(function(){return gt})),r.d(f,"shippingRatesBeingSelected",(function(){return _t})),r.d(f,"updateCartFragments",(function(){return Et})),r.d(f,"triggerAddingToCartEvent",(function(){return Ot})),r.d(f,"triggerAddedToCartEvent",(function(){return wt})),r.d(f,"applyExtensionCartUpdate",(function(){return xt})),r.d(f,"applyCoupon",(function(){return Tt})),r.d(f,"removeCoupon",(function(){return Ct})),r.d(f,"addItemToCart",(function(){return Pt})),r.d(f,"removeItemFromCart",(function(){return St})),r.d(f,"changeCartItemQuantity",(function(){return Rt})),r.d(f,"selectShippingRate",(function(){return jt})),r.d(f,"updateCustomerData",(function(){return It}));var l={};r.r(l),r.d(l,"getCartData",(function(){return kt})),r.d(l,"getCartTotals",(function(){return Mt}));var p={};r.r(p),r.d(p,"getValueForQueryKey",(function(){return Bt})),r.d(p,"getValueForQueryContext",(function(){return zt}));var d={};r.r(d),r.d(d,"setQueryValue",(function(){return Jt})),r.d(d,"setValueForQueryContext",(function(){return Wt})),r(143);var h=r(10),m=r(8),v="wc/store/schema",y=r(12),b=r.n(y),g=r(30),_=r.n(g),E=r(2),O=Object(h.createRegistrySelector)((function(e){return function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=e(v).hasFinishedResolution("getRoutes",[r]),c="";if((t=t.routes)[r]?t[r][n]||(c=Object(E.sprintf)("There is no route for the given resource name (%s) in the store",n)):c=Object(E.sprintf)("There is no route for the given namespace (%s) in the store",r),""!==c){if(a)throw new Error(c);return""}var u=x(t[r][n],o);if(""===u&&a)throw new Error(Object(E.sprintf)("While there is a route for the given namespace (%1$s) and resource name (%2$s), there is no route utilizing the number of ids you included in the select arguments. The available routes are: (%3$s)",r,n,JSON.stringify(t[r][n])));return u}})),w=Object(h.createRegistrySelector)((function(e){return function(t,r){var n=e(v).hasFinishedResolution("getRoutes",[r]),o=t.routes[r];if(!o){if(n)throw new Error(Object(E.sprintf)("There is no route for the given namespace (%s) in the store",r));return[]}var a=[];for(var c in o)a=[].concat(_()(a),_()(Object.keys(o[c])));return a}})),x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(e=Object.entries(e)).find((function(e){var r=b()(e,2)[1];return t.length===r.length})),n=r||[],o=b()(n,2),a=o[0],c=o[1];return a?0===t.length?a:T(a,c,t):""},T=function(e,t,r){return t.forEach((function(t,n){e=e.replace("{".concat(t,"}"),r[n])})),e},C="wc/blocks",P=[],S=[],R=[],j=[],I=[],D=[],A=[],k={},M=[];function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;return{type:"RECEIVE_MODEL_ROUTES",routes:e,namespace:t}}var L=r(3),F=r.n(L),V=F.a.mark(G),U=F.a.mark(Y);function G(e){return F.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(m.select)(v,"getRoutes",e);case 2:case"end":return t.stop()}}),V)}function Y(e){var t,r;return F.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(m.apiFetch)({path:e});case 2:return t=n.sent,r=t&&t.routes?Object.keys(t.routes):[],n.next=6,N(r,e);case 6:case"end":return n.stop()}}),U)}var K=function(e,t){return(t=t.replace("".concat(e,"/"),"")).replace(/\/\(\?P\<[a-z_]*\>\[\\*[a-z]\]\+\)/g,"")},Q=function(e){var t=e.match(/\<[a-z_]*\>/g);return Array.isArray(t)&&0!==t.length?t.map((function(e){return e.replace(/<|>/g,"")})):[]},H=function(e,t){return Array.isArray(t)&&0!==t.length?(t.forEach((function(t){var r="\\(\\?P<".concat(t,">.*?\\)");e=e.replace(new RegExp(r),"{".concat(t,"}"))})),e):e},q=r(4);function B(e,t){return Object(q.has)(e,t)}function z(e,t,r){return Object(q.setWith)(Object(q.clone)(e),t,r,q.clone)}var J=Object(h.combineReducers)({routes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.routes,o=t.namespace;return"RECEIVE_MODEL_ROUTES"===r&&n.forEach((function(t){var r=K(o,t);if(r&&r!==o){var n=Q(t),a=H(t,n);B(e,[o,r,a])||(e=z(e,[o,r,a],n))}})),e}});Object(h.registerStore)(v,{reducer:J,actions:o,controls:m.controls,selectors:n,resolvers:a});var W=v,$=r(1),X=r.n($),Z="wc/store/collections",ee=[],te=r(32),re=function(e){var t=e.state,r=e.namespace,n=e.resourceName,o=e.query,a=e.ids,c=e.type,u=void 0===c?"items":c,i=e.fallback,s=void 0===i?ee:i;return B(t,[r,n,a=JSON.stringify(a),o=null!==o?Object(te.addQueryArgs)("",o):"",u])?t[r][n][a][o][u]:s},ne=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ee;return re({state:e,namespace:t,resourceName:r,query:n,ids:o,type:"headers",fallback:void 0})},oe=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ee;return re({state:e,namespace:t,resourceName:r,query:n,ids:o})},ae=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ee;return re({state:e,namespace:t,resourceName:r,query:n,ids:o,type:"error",fallback:null})},ce=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:ee,c=ne(e,r,n,o,a);return c&&c.get?c.has(t)?c.get(t):void 0:null},ue=function(e){return e.lastModified||0},ie=window.Headers||null;function se(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{items:[],headers:ie},a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return{type:a?"RESET_COLLECTION":"RECEIVE_COLLECTION",namespace:e,resourceName:t,queryString:r,ids:n,response:o}}function fe(e,t,r,n,o){return{type:"ERROR",namespace:e,resourceName:t,queryString:r,ids:n,response:{items:[],headers:ie,error:o}}}function le(e){return{type:"RECEIVE_LAST_MODIFIED",timestamp:e}}ie=ie?new ie:{get:function(){},has:function(){}};var pe=r(29),de=r.n(pe),he=r(13),me=r.n(he),ve=r(42),ye=r.n(ve),be=r(7),ge=r(6),_e=r.n(ge);function Ee(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 Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(r),!0).forEach((function(t){X()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var we=function(e){return{type:"API_FETCH_WITH_HEADERS",options:e}},xe={},Te={code:"invalid_json",message:Object(E.__)("The response is not a valid JSON response.",'woocommerce')},Ce=function(e){me.a.setNonce&&"function"==typeof me.a.setNonce?me.a.setNonce(e):console.error('The monkey patched function on APIFetch, "setNonce", is not present, likely another plugin or some other code has removed this augmentation')},Pe=new ye.a((function(e){return me()({path:"/wc/store/batch",method:"POST",data:{requests:e.map((function(e){return Oe(Oe({},e),{},{body:null==e?void 0:e.data})}))}}).then((function(t){return function(e){if("object"!==_e()(e)||null===e||!e.hasOwnProperty("responses"))throw new Error("Response not valid")}(t),e.map((function(e,r){return t.responses[r]||xe}))}))}),{batchScheduleFn:function(e){return setTimeout(e,300)},cache:!1,maxBatchSize:25}),Se=function(){var e=de()(F.a.mark((function e(t){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.load(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}(),Re={API_FETCH_WITH_HEADERS:function(e){var t=e.options;return new Promise((function(e,r){!t.method||"GET"===t.method||Object(be.isWpVersion)("5.6","<")?me()(Oe(Oe({},t),{},{parse:!1})).then((function(t){t.json().then((function(r){e({response:r,headers:t.headers}),Ce(t.headers)})).catch((function(){r(Te)}))})).catch((function(e){Ce(e.headers),"function"==typeof e.json?e.json().then((function(e){r(e)})).catch((function(){r(Te)})):r(e.message)})):Se(t).then((function(t){throw function(e){if("object"!==_e()(e)||null===e||!e.hasOwnProperty("body")||!e.hasOwnProperty("headers"))throw new Error("Response not valid")}(t),t.status>=200&&t.status<300&&(e({response:t.body,headers:t.headers}),Ce(t.headers)),t})).catch((function(e){e.headers&&Ce(e.headers),e.body?r(e.body):r()}))}))}},je=F.a.mark(Ae),Ie=F.a.mark(ke),De=F.a.mark(Me);function Ae(e){var t;return F.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(m.select)(Z,"getCollectionLastModified");case 2:if(t=r.sent){r.next=8;break}return r.next=6,Object(m.dispatch)(Z,"receiveLastModified",e);case 6:r.next=13;break;case 8:if(!(e>t)){r.next=13;break}return r.next=11,Object(m.dispatch)(Z,"invalidateResolutionForStore");case 11:return r.next=13,Object(m.dispatch)(Z,"receiveLastModified",e);case 13:case"end":return r.stop()}}),je)}function ke(e,t,r,n){var o,a,c,u,i,s;return F.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,Object(m.select)(v,"getRoute",e,t,n);case 2:if(o=f.sent,a=Object(te.addQueryArgs)("",r),o){f.next=8;break}return f.next=7,se(e,t,a,n);case 7:return f.abrupt("return");case 8:return f.prev=8,f.next=11,we({path:o+a});case 11:if(c=f.sent,u=c.response,i=void 0===u?ee:u,!((s=c.headers)&&s.get&&s.has("last-modified"))){f.next=18;break}return f.next=18,Ae(parseInt(s.get("last-modified"),10));case 18:return f.next=20,se(e,t,a,n,{items:i,headers:s});case 20:f.next=26;break;case 22:return f.prev=22,f.t0=f.catch(8),f.next=26,fe(e,t,a,n,f.t0);case 26:case"end":return f.stop()}}),Ie,null,[[8,22]])}function Me(e,t,r,n,o){var a;return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=[t,r,n,o].filter((function(e){return void 0!==e})),e.next=3,m.select.apply(void 0,[Z,"getCollection"].concat(_()(a)));case 3:case"end":return e.stop()}}),De)}function Ne(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 Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){X()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fe(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 Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){X()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(h.registerStore)(Z,{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_LAST_MODIFIED"===t.type)return t.timestamp===e.lastModified?e:Le(Le({},e),{},{lastModified:t.timestamp});if("INVALIDATE_RESOLUTION_FOR_STORE"===t.type)return{};var r=t.type,n=t.namespace,o=t.resourceName,a=t.queryString,c=t.response,u=t.ids?JSON.stringify(t.ids):"[]";switch(r){case"RECEIVE_COLLECTION":if(B(e,[n,o,u,a]))return e;e=z(e,[n,o,u,a],c);break;case"RESET_COLLECTION":case"ERROR":e=z(e,[n,o,u,a],c)}return e},actions:u,controls:Ve(Ve({},m.controls),Re),selectors:c,resolvers:i});var Ue=Z,Ge=r(14),Ye={cartItemsPendingQuantity:[],cartItemsPendingDelete:[],cartData:{coupons:P,shippingRates:D,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:"",email:""},items:S,itemsCount:0,itemsWeight:0,needsShipping:!0,needsPayment:!1,hasCalculatedShipping:!0,fees:R,totals:{currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"",currency_suffix:"",total_items:"0",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_price:"0",total_tax:"0",tax_lines:M},errors:j,paymentRequirements:A,extensions:k},metaData:{updatingCustomerData:!1,updatingSelectedRate:!1,applyingCoupon:"",removingCoupon:"",isCartDataStale:!1},errors:I},Ke=function(e){return e.cartData},Qe=function(e){return e.cartData.totals||Ye.cartData.totals},He=function(e){return e.metaData||Ye.metaData},qe=function(e){return e.errors},Be=function(e){return!!e.metaData.applyingCoupon},ze=function(e){return e.metaData.isCartDataStale},Je=function(e){return e.metaData.applyingCoupon||""},We=function(e){return!!e.metaData.removingCoupon},$e=function(e){return e.metaData.removingCoupon||""},Xe=function(e,t){return e.cartData.items.find((function(e){return e.key===t}))},Ze=function(e,t){return e.cartItemsPendingQuantity.includes(t)},et=function(e,t){return e.cartItemsPendingDelete.includes(t)},tt=function(e){return!!e.metaData.updatingCustomerData},rt=function(e){return!!e.metaData.updatingSelectedRate},nt=F.a.mark(xt),ot=F.a.mark(Tt),at=F.a.mark(Ct),ct=F.a.mark(Pt),ut=F.a.mark(St),it=F.a.mark(Rt),st=F.a.mark(jt),ft=F.a.mark(It),lt=function(e){return{type:"RECEIVE_CART",response:Object(q.mapKeys)(e,(function(e,t){return Object(q.camelCase)(t)}))}},pt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:t?"REPLACE_ERRORS":"RECEIVE_ERROR",error:e}},dt=function(e){return{type:"APPLYING_COUPON",couponCode:e}},ht=function(e){return{type:"REMOVING_COUPON",couponCode:e}},mt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"RECEIVE_CART_ITEM",cartItem:e}},vt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"ITEM_PENDING_QUANTITY",cartItemKey:e,isPendingQuantity:t}},yt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"RECEIVE_REMOVED_ITEM",cartItemKey:e,isPendingDelete:t}},bt=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"SET_IS_CART_DATA_STALE",isCartDataStale:e}},gt=function(e){return{type:"UPDATING_CUSTOMER_DATA",isResolving:e}},_t=function(e){return{type:"UPDATING_SELECTED_SHIPPING_RATE",isResolving:e}},Et=function(){return{type:"UPDATE_LEGACY_CART_FRAGMENTS"}},Ot=function(){return{type:"TRIGGER_ADDING_TO_CART_EVENT"}},wt=function(e){return{type:"TRIGGER_ADDED_TO_CART_EVENT",preserveCartData:e.preserveCartData}};function xt(e){var t,r,n;return F.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,we({path:"/wc/store/cart/extensions",method:"POST",data:{namespace:e.namespace,data:e.data},cache:"no-store"});case 3:return t=o.sent,r=t.response,o.next=7,lt(r);case 7:return o.next=9,Et();case 9:return o.abrupt("return",r);case 12:return o.prev=12,o.t0=o.catch(0),o.next=16,pt(o.t0);case 16:if(null===(n=o.t0.data)||void 0===n||!n.cart){o.next=19;break}return o.next=19,lt(o.t0.data.cart);case 19:throw o.t0;case 20:case"end":return o.stop()}}),nt,null,[[0,12]])}function Tt(e){var t,r,n;return F.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,dt(e);case 2:return o.prev=2,o.next=5,we({path:"/wc/store/cart/apply-coupon",method:"POST",data:{code:e},cache:"no-store"});case 5:return t=o.sent,r=t.response,o.next=9,lt(r);case 9:return o.next=11,dt("");case 11:return o.next=13,Et();case 13:o.next=25;break;case 15:return o.prev=15,o.t0=o.catch(2),o.next=19,pt(o.t0);case 19:return o.next=21,dt("");case 21:if(null===(n=o.t0.data)||void 0===n||!n.cart){o.next=24;break}return o.next=24,lt(o.t0.data.cart);case 24:throw o.t0;case 25:return o.abrupt("return",!0);case 26:case"end":return o.stop()}}),ot,null,[[2,15]])}function Ct(e){var t,r,n;return F.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,ht(e);case 2:return o.prev=2,o.next=5,we({path:"/wc/store/cart/remove-coupon",method:"POST",data:{code:e},cache:"no-store"});case 5:return t=o.sent,r=t.response,o.next=9,lt(r);case 9:return o.next=11,ht("");case 11:return o.next=13,Et();case 13:o.next=25;break;case 15:return o.prev=15,o.t0=o.catch(2),o.next=19,pt(o.t0);case 19:return o.next=21,ht("");case 21:if(null===(n=o.t0.data)||void 0===n||!n.cart){o.next=24;break}return o.next=24,lt(o.t0.data.cart);case 24:throw o.t0;case 25:return o.abrupt("return",!0);case 26:case"end":return o.stop()}}),at,null,[[2,15]])}function Pt(e){var t,r,n,o,a=arguments;return F.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:1,c.prev=1,c.next=4,Ot();case 4:return c.next=6,we({path:"/wc/store/cart/add-item",method:"POST",data:{id:e,quantity:t},cache:"no-store"});case 6:return r=c.sent,n=r.response,c.next=10,lt(n);case 10:return c.next=12,wt({preserveCartData:!0});case 12:return c.next=14,Et();case 14:c.next=24;break;case 16:return c.prev=16,c.t0=c.catch(1),c.next=20,pt(c.t0);case 20:if(null===(o=c.t0.data)||void 0===o||!o.cart){c.next=23;break}return c.next=23,lt(c.t0.data.cart);case 23:throw c.t0;case 24:case"end":return c.stop()}}),ct,null,[[1,16]])}function St(e){var t,r,n;return F.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,yt(e);case 2:return o.prev=2,o.next=5,we({path:"/wc/store/cart/remove-item",data:{key:e},method:"POST",cache:"no-store"});case 5:return t=o.sent,r=t.response,o.next=9,lt(r);case 9:return o.next=11,Et();case 11:o.next=20;break;case 13:return o.prev=13,o.t0=o.catch(2),o.next=17,pt(o.t0);case 17:if(null===(n=o.t0.data)||void 0===n||!n.cart){o.next=20;break}return o.next=20,lt(o.t0.data.cart);case 20:return o.next=22,yt(e,!1);case 22:case"end":return o.stop()}}),ut,null,[[2,13]])}function Rt(e,t){var r,n,o,a;return F.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Object(m.select)(Ge.c,"getCartItem",e);case 2:return r=c.sent,c.next=5,vt(e);case 5:if((null==r?void 0:r.quantity)!==t){c.next=7;break}return c.abrupt("return");case 7:return c.prev=7,c.next=10,we({path:"/wc/store/cart/update-item",method:"POST",data:{key:e,quantity:t},cache:"no-store"});case 10:return n=c.sent,o=n.response,c.next=14,lt(o);case 14:return c.next=16,Et();case 16:c.next=25;break;case 18:return c.prev=18,c.t0=c.catch(7),c.next=22,pt(c.t0);case 22:if(null===(a=c.t0.data)||void 0===a||!a.cart){c.next=25;break}return c.next=25,lt(c.t0.data.cart);case 25:return c.next=27,vt(e,!1);case 27:case"end":return c.stop()}}),it,null,[[7,18]])}function jt(e){var t,r,n,o,a=arguments;return F.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:0,c.prev=1,c.next=4,_t(!0);case 4:return c.next=6,we({path:"/wc/store/cart/select-shipping-rate",method:"POST",data:{package_id:t,rate_id:e},cache:"no-store"});case 6:return r=c.sent,n=r.response,c.next=10,lt(n);case 10:c.next=22;break;case 12:return c.prev=12,c.t0=c.catch(1),c.next=16,pt(c.t0);case 16:return c.next=18,_t(!1);case 18:if(null===(o=c.t0.data)||void 0===o||!o.cart){c.next=21;break}return c.next=21,lt(c.t0.data.cart);case 21:throw c.t0;case 22:return c.next=24,_t(!1);case 24:return c.abrupt("return",!0);case 25:case"end":return c.stop()}}),st,null,[[1,12]])}function It(e){var t,r,n;return F.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,gt(!0);case 2:return o.prev=2,o.next=5,we({path:"/wc/store/cart/update-customer",method:"POST",data:e,cache:"no-store"});case 5:return t=o.sent,r=t.response,o.next=9,lt(r);case 9:o.next=21;break;case 11:return o.prev=11,o.t0=o.catch(2),o.next=15,pt(o.t0);case 15:return o.next=17,gt(!1);case 17:if(null===(n=o.t0.data)||void 0===n||!n.cart){o.next=20;break}return o.next=20,lt(o.t0.data.cart);case 20:throw o.t0;case 21:return o.next=23,gt(!1);case 23:return o.abrupt("return",!0);case 24:case"end":return o.stop()}}),ft,null,[[2,11]])}var Dt=F.a.mark(kt),At=F.a.mark(Mt);function kt(){var e;return F.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(m.apiFetch)({path:"/wc/store/cart",method:"GET",cache:"no-store"});case 2:if(e=t.sent){t.next=7;break}return t.next=6,pt(Ge.a);case 6:return t.abrupt("return");case 7:return t.next=9,lt(e);case 9:case"end":return t.stop()}}),Dt)}function Mt(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(m.select)(Ge.c,"getCartData");case 2:case"end":return e.stop()}}),At)}function Nt(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 Lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(r),!0).forEach((function(t){X()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ft,Vt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CART_ITEM":return e.map((function(e){var r;return e.key===(null===(r=t.cartItem)||void 0===r?void 0:r.key)?t.cartItem:e}))}return e},Ut=window.CustomEvent||null,Gt=function(e,t){var r=t.bubbles,n=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,c=t.element,u=t.detail,i=void 0===u?{}:u;if(Ut){c||(c=document.body);var s=new Ut(e,{bubbles:n,cancelable:a,detail:i});c.dispatchEvent(s)}},Yt={UPDATE_LEGACY_CART_FRAGMENTS:function(){Ft&&clearTimeout(Ft),Ft=setTimeout((function(){Gt("wc_fragment_refresh",{bubbles:!0,cancelable:!0})}),50)},TRIGGER_ADDING_TO_CART_EVENT:function(){Gt("wc-blocks_adding_to_cart",{bubbles:!0,cancelable:!0})},TRIGGER_ADDED_TO_CART_EVENT:function(e){var t;t=e.preserveCartData,Gt("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:void 0!==t&&t}})}};function Kt(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 Qt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){X()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(h.registerStore)(Ge.c,{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ERROR":t.error&&(e=Lt(Lt({},e),{},{errors:e.errors.concat(t.error)}));break;case"REPLACE_ERRORS":t.error&&(e=Lt(Lt({},e),{},{errors:[t.error]}));break;case"RECEIVE_CART":t.response&&(e=Lt(Lt({},e),{},{errors:I,cartData:t.response}));break;case"APPLYING_COUPON":(t.couponCode||""===t.couponCode)&&(e=Lt(Lt({},e),{},{metaData:Lt(Lt({},e.metaData),{},{applyingCoupon:t.couponCode})}));break;case"REMOVING_COUPON":(t.couponCode||""===t.couponCode)&&(e=Lt(Lt({},e),{},{metaData:Lt(Lt({},e.metaData),{},{removingCoupon:t.couponCode})}));break;case"ITEM_PENDING_QUANTITY":var r=e.cartItemsPendingQuantity.filter((function(e){return e!==t.cartItemKey}));t.isPendingQuantity&&t.cartItemKey&&r.push(t.cartItemKey),e=Lt(Lt({},e),{},{cartItemsPendingQuantity:r});break;case"RECEIVE_REMOVED_ITEM":var n=e.cartItemsPendingDelete.filter((function(e){return e!==t.cartItemKey}));t.isPendingDelete&&t.cartItemKey&&n.push(t.cartItemKey),e=Lt(Lt({},e),{},{cartItemsPendingDelete:n});break;case"RECEIVE_CART_ITEM":e=Lt(Lt({},e),{},{errors:I,cartData:Lt(Lt({},e.cartData),{},{items:Vt(e.cartData.items,t)})});break;case"UPDATING_CUSTOMER_DATA":e=Lt(Lt({},e),{},{metaData:Lt(Lt({},e.metaData),{},{updatingCustomerData:!!t.isResolving})});break;case"UPDATING_SELECTED_SHIPPING_RATE":e=Lt(Lt({},e),{},{metaData:Lt(Lt({},e.metaData),{},{updatingSelectedRate:!!t.isResolving})});break;case"SET_IS_CART_DATA_STALE":e=Lt(Lt({},e),{},{metaData:Lt(Lt({},e.metaData),{},{isCartDataStale:t.isCartDataStale})})}return e},actions:f,controls:Qt(Qt(Qt({},m.controls),Re),Yt),selectors:s,resolvers:l});var Ht=Ge.c,qt=function(e,t){return void 0===e[t]?null:e[t]},Bt=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=qt(e,t);return null===o?n:void 0!==(o=JSON.parse(o))[r]?o[r]:n},zt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=qt(e,t);return null===n?r:JSON.parse(n)},Jt=function(e,t,r){return{type:"SET_QUERY_KEY_VALUE",context:e,queryKey:t,value:r}},Wt=function(e,t){return{type:"SET_QUERY_CONTEXT_VALUE",context:e,value:t}};function $t(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 Xt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(r),!0).forEach((function(t){X()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(h.registerStore)("wc/store/query-state",{reducer:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=r.type,o=r.context,a=r.queryKey,c=r.value,u=qt(t,o);switch(n){case"SET_QUERY_KEY_VALUE":var i=null!==u?JSON.parse(u):{};i[a]=c,u!==(e=JSON.stringify(i))&&(t=Xt(Xt({},t),{},X()({},o,e)));break;case"SET_QUERY_CONTEXT_VALUE":u!==(e=JSON.stringify(c))&&(t=Xt(Xt({},t),{},X()({},o,e)))}return t},actions:d,selectors:p});var Zt="wc/store/query-state"},18:function(e,t,r){var n=r(19);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},19:function(e,t){e.exports=function(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},e.exports.default=e.exports,e.exports.__esModule=!0},2:function(e,t){e.exports=window.wp.i18n},20:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},21:function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],_n=!0,c=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(c)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},22:function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},29:function(e,t){function r(e,t,r,n,o,a,c){try{var u=e[a](c),i=u.value}catch(e){return void r(e)}u.done?t(i):Promise.resolve(i).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var c=e.apply(t,n);function u(e){r(c,o,a,u,i,"next",e)}function i(e){r(c,o,a,u,i,"throw",e)}u(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.regeneratorRuntime},30:function(e,t,r){var n=r(144),o=r(145),a=r(18),c=r(146);e.exports=function(e){return n(e)||o(e)||a(e)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},31:function(e,t){var r,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var i,s=[],f=!1,l=-1;function p(){f&&i&&(f=!1,i.length?s=i.concat(s):l=-1,s.length&&d())}function d(){if(!f){var e=u(p);f=!0;for(var t=s.length;t;){for(i=s,s=[];++l<t;)i&&i[l].run();l=-1,t=s.length}i=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new h(e,t)),1!==s.length||f||u(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},32:function(e,t){e.exports=window.wp.url},39:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},4:function(e,t){e.exports=window.lodash},42:function(e,t,r){"use strict";(function(t,r){var n,o=function(){function e(e,t){if("function"!=typeof e)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+e+".");this._batchLoadFn=e,this._maxBatchSize=function(e){if(e&&!1===e.batch)return 1;var t=e&&e.maxBatchSize;if(void 0===t)return 1/0;if("number"!=typeof t||t<1)throw new TypeError("maxBatchSize must be a positive number: "+t);return t}(t),this._batchScheduleFn=function(e){var t=e&&e.batchScheduleFn;if(void 0===t)return a;if("function"!=typeof t)throw new TypeError("batchScheduleFn must be a function: "+t);return t}(t),this._cacheKeyFn=function(e){var t=e&&e.cacheKeyFn;if(void 0===t)return function(e){return e};if("function"!=typeof t)throw new TypeError("cacheKeyFn must be a function: "+t);return t}(t),this._cacheMap=function(e){if(e&&!1===e.cache)return null;var t=e&&e.cacheMap;if(void 0===t)return new Map;if(null!==t){var r=["get","set","delete","clear"].filter((function(e){return t&&"function"!=typeof t[e]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return t}(t),this._batch=null}var t=e.prototype;return t.load=function(e){if(null==e)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(e)+".");var t=function(e){var t=e._batch;if(null!==t&&!t.hasDispatched&&t.keys.length<e._maxBatchSize&&(!t.cacheHits||t.cacheHits.length<e._maxBatchSize))return t;var r={hasDispatched:!1,keys:[],callbacks:[]};return e._batch=r,e._batchScheduleFn((function(){return function(e,t){if(t.hasDispatched=!0,0!==t.keys.length){var r=e._batchLoadFn(t.keys);if(!r||"function"!=typeof r.then)return c(e,t,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(e){if(!i(e))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(e)+".");if(e.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(t.keys)+"\n\nValues:\n"+String(e));u(t);for(var r=0;r<t.callbacks.length;r++){var n=e[r];n instanceof Error?t.callbacks[r].reject(n):t.callbacks[r].resolve(n)}})).catch((function(r){return c(e,t,r)}))}else u(t)}(e,r)})),r}(this),r=this._cacheMap,n=this._cacheKeyFn(e);if(r){var o=r.get(n);if(o){var a=t.cacheHits||(t.cacheHits=[]);return new Promise((function(e){a.push((function(){return e(o)}))}))}}t.keys.push(e);var s=new Promise((function(e,r){t.callbacks.push({resolve:e,reject:r})}));return r&&r.set(n,s),s},t.loadMany=function(e){if(!i(e))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+e+".");for(var t=[],r=0;r<e.length;r++)t.push(this.load(e[r]).catch((function(e){return e})));return Promise.all(t)},t.clear=function(e){var t=this._cacheMap;if(t){var r=this._cacheKeyFn(e);t.delete(r)}return this},t.clearAll=function(){var e=this._cacheMap;return e&&e.clear(),this},t.prime=function(e,t){var r=this._cacheMap;if(r){var n,o=this._cacheKeyFn(e);void 0===r.get(o)&&(t instanceof Error?(n=Promise.reject(t)).catch((function(){})):n=Promise.resolve(t),r.set(o,n))}return this},e}(),a="object"==typeof t&&"function"==typeof t.nextTick?function(e){n||(n=Promise.resolve()),n.then((function(){return t.nextTick(e)}))}:r||setTimeout;function c(e,t,r){u(t);for(var n=0;n<t.keys.length;n++)e.clear(t.keys[n]),t.callbacks[n].reject(r)}function u(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function i(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&(0===e.length||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}e.exports=o}).call(this,r(31),r(147).setImmediate)},6:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},7:function(e,t){e.exports=window.wc.wcSettings},8:function(e,t){e.exports=window.wp.dataControls}});