%PDF- %PDF-
Direktori : /var/www/cwg/wp-content/plugins/woocommerce/packages/woocommerce-admin/dist/data/ |
Current File : /var/www/cwg/wp-content/plugins/woocommerce/packages/woocommerce-admin/dist/data/index.js |
/*! For license information please see index.js.LICENSE.txt */ this.wc=this.wc||{},this.wc.data=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=469)}({0:function(e,t){!function(){e.exports=this.wp.element}()},11:function(e,t){!function(){e.exports=this.wp.data}()},120:function(e,t){var r={utf8:{stringToBytes:function(e){return r.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(r.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=r},123:function(e,t,r){var n,o,a,c,i;n=r(180),o=r(120).utf8,a=r(181),c=r(120).bin,(i=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?c.stringToBytes(e):o.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),u=8*e.length,s=1732584193,p=-271733879,f=-1732584194,l=271733878,d=0;d<r.length;d++)r[d]=16711935&(r[d]<<8|r[d]>>>24)|4278255360&(r[d]<<24|r[d]>>>8);r[u>>>5]|=128<<u%32,r[14+(u+64>>>9<<4)]=u;var g=i._ff,O=i._gg,v=i._hh,E=i._ii;for(d=0;d<r.length;d+=16){var m=s,b=p,h=f,S=l;s=g(s,p,f,l,r[d+0],7,-680876936),l=g(l,s,p,f,r[d+1],12,-389564586),f=g(f,l,s,p,r[d+2],17,606105819),p=g(p,f,l,s,r[d+3],22,-1044525330),s=g(s,p,f,l,r[d+4],7,-176418897),l=g(l,s,p,f,r[d+5],12,1200080426),f=g(f,l,s,p,r[d+6],17,-1473231341),p=g(p,f,l,s,r[d+7],22,-45705983),s=g(s,p,f,l,r[d+8],7,1770035416),l=g(l,s,p,f,r[d+9],12,-1958414417),f=g(f,l,s,p,r[d+10],17,-42063),p=g(p,f,l,s,r[d+11],22,-1990404162),s=g(s,p,f,l,r[d+12],7,1804603682),l=g(l,s,p,f,r[d+13],12,-40341101),f=g(f,l,s,p,r[d+14],17,-1502002290),s=O(s,p=g(p,f,l,s,r[d+15],22,1236535329),f,l,r[d+1],5,-165796510),l=O(l,s,p,f,r[d+6],9,-1069501632),f=O(f,l,s,p,r[d+11],14,643717713),p=O(p,f,l,s,r[d+0],20,-373897302),s=O(s,p,f,l,r[d+5],5,-701558691),l=O(l,s,p,f,r[d+10],9,38016083),f=O(f,l,s,p,r[d+15],14,-660478335),p=O(p,f,l,s,r[d+4],20,-405537848),s=O(s,p,f,l,r[d+9],5,568446438),l=O(l,s,p,f,r[d+14],9,-1019803690),f=O(f,l,s,p,r[d+3],14,-187363961),p=O(p,f,l,s,r[d+8],20,1163531501),s=O(s,p,f,l,r[d+13],5,-1444681467),l=O(l,s,p,f,r[d+2],9,-51403784),f=O(f,l,s,p,r[d+7],14,1735328473),s=v(s,p=O(p,f,l,s,r[d+12],20,-1926607734),f,l,r[d+5],4,-378558),l=v(l,s,p,f,r[d+8],11,-2022574463),f=v(f,l,s,p,r[d+11],16,1839030562),p=v(p,f,l,s,r[d+14],23,-35309556),s=v(s,p,f,l,r[d+1],4,-1530992060),l=v(l,s,p,f,r[d+4],11,1272893353),f=v(f,l,s,p,r[d+7],16,-155497632),p=v(p,f,l,s,r[d+10],23,-1094730640),s=v(s,p,f,l,r[d+13],4,681279174),l=v(l,s,p,f,r[d+0],11,-358537222),f=v(f,l,s,p,r[d+3],16,-722521979),p=v(p,f,l,s,r[d+6],23,76029189),s=v(s,p,f,l,r[d+9],4,-640364487),l=v(l,s,p,f,r[d+12],11,-421815835),f=v(f,l,s,p,r[d+15],16,530742520),s=E(s,p=v(p,f,l,s,r[d+2],23,-995338651),f,l,r[d+0],6,-198630844),l=E(l,s,p,f,r[d+7],10,1126891415),f=E(f,l,s,p,r[d+14],15,-1416354905),p=E(p,f,l,s,r[d+5],21,-57434055),s=E(s,p,f,l,r[d+12],6,1700485571),l=E(l,s,p,f,r[d+3],10,-1894986606),f=E(f,l,s,p,r[d+10],15,-1051523),p=E(p,f,l,s,r[d+1],21,-2054922799),s=E(s,p,f,l,r[d+8],6,1873313359),l=E(l,s,p,f,r[d+15],10,-30611744),f=E(f,l,s,p,r[d+6],15,-1560198380),p=E(p,f,l,s,r[d+13],21,1309151649),s=E(s,p,f,l,r[d+4],6,-145523070),l=E(l,s,p,f,r[d+11],10,-1120210379),f=E(f,l,s,p,r[d+2],15,718787259),p=E(p,f,l,s,r[d+9],21,-343485551),s=s+m>>>0,p=p+b>>>0,f=f+h>>>0,l=l+S>>>0}return n.endian([s,p,f,l])})._ff=function(e,t,r,n,o,a,c){var i=e+(t&r|~t&n)+(o>>>0)+c;return(i<<a|i>>>32-a)+t},i._gg=function(e,t,r,n,o,a,c){var i=e+(t&n|r&~n)+(o>>>0)+c;return(i<<a|i>>>32-a)+t},i._hh=function(e,t,r,n,o,a,c){var i=e+(t^r^n)+(o>>>0)+c;return(i<<a|i>>>32-a)+t},i._ii=function(e,t,r,n,o,a,c){var i=e+(r^(t|~n))+(o>>>0)+c;return(i<<a|i>>>32-a)+t},i._blocksize=16,i._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(i(e,t));return t&&t.asBytes?r:t&&t.asString?c.bytesToString(r):n.bytesToHex(r)}},16:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.dataControls}()},18:function(e,t,r){var n=r(60),o=r(61),a=r(40),c=r(62);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||c()}},180:function(e,t){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],a=0;a<4;a++)8*n+6*a<=8*e.length?t.push(r.charAt(o>>>6*(3-a)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&t.push((r.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|r.indexOf(e.charAt(n))>>>6-2*o);return t}},e.exports=n},181:function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},19:function(e,t,r){var n=r(57),o=r(58),a=r(40),c=r(59);e.exports=function(e){return n(e)||o(e)||a(e)||c()}},2:function(e,t){!function(){e.exports=this.wp.i18n}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},21:function(e,t){!function(){e.exports=this.wc.navigation}()},23:function(e,t){!function(){e.exports=this.wp.url}()},26:function(e,t){!function(){e.exports=this.wp.apiFetch}()},29:function(e,t){!function(){e.exports=this.wc.date}()},3:function(e,t){!function(){e.exports=this.lodash}()},34:function(e,t,r){var n=r(97);e.exports=function(e,t){if(null==e)return{};var r,o,a=n(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}},37: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}},40:function(e,t,r){var n=r(37);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}}},43:function(e,t){!function(){e.exports=this.wp.hooks}()},44:function(e,t){function r(e,t,r,n,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void r(e)}i.done?t(u):Promise.resolve(u).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 i(e){r(c,o,a,i,u,"next",e)}function u(e){r(c,o,a,i,u,"throw",e)}i(void 0)}))}}},469:function(e,t,r){"use strict";r.r(t),r.d(t,"SETTINGS_STORE_NAME",(function(){return ke})),r.d(t,"withSettingsHydration",(function(){return Ne})),r.d(t,"useSettings",(function(){return Me})),r.d(t,"PLUGINS_STORE_NAME",(function(){return ar})),r.d(t,"pluginNames",(function(){return qe})),r.d(t,"withPluginsHydration",(function(){return cr})),r.d(t,"ONBOARDING_STORE_NAME",(function(){return Rr})),r.d(t,"withOnboardingHydration",(function(){return wr})),r.d(t,"USER_STORE_NAME",(function(){return jr})),r.d(t,"withCurrentUserHydration",(function(){return Ir})),r.d(t,"useUser",(function(){return Pr})),r.d(t,"useUserPreferences",(function(){return Cr})),r.d(t,"OPTIONS_STORE_NAME",(function(){return Qt})),r.d(t,"withOptionsHydration",(function(){return Fr})),r.d(t,"REVIEWS_STORE_NAME",(function(){return ln})),r.d(t,"NOTES_STORE_NAME",(function(){return Qn})),r.d(t,"REPORTS_STORE_NAME",(function(){return io})),r.d(t,"ITEMS_STORE_NAME",(function(){return Jo})),r.d(t,"getLeaderboard",(function(){return go})),r.d(t,"searchItemsByString",(function(){return Oo})),r.d(t,"NAVIGATION_STORE_NAME",(function(){return ma})),r.d(t,"withNavigationHydration",(function(){return ba})),r.d(t,"getFilterQuery",(function(){return Ra})),r.d(t,"getSummaryNumbers",(function(){return Ia})),r.d(t,"getReportTableData",(function(){return Fa})),r.d(t,"getReportTableQuery",(function(){return Ca})),r.d(t,"getReportChartData",(function(){return Ua})),r.d(t,"getTooltipValueFormat",(function(){return Na})),r.d(t,"MAX_PER_PAGE",(function(){return oe})),r.d(t,"QUERY_DEFAULTS",(function(){return fe})),r.d(t,"NAMESPACE",(function(){return te})),r.d(t,"WC_ADMIN_NAMESPACE",(function(){return re})),r.d(t,"WCS_NAMESPACE",(function(){return ne})),r.d(t,"SECOND",(function(){return ae})),r.d(t,"MINUTE",(function(){return ce})),r.d(t,"HOUR",(function(){return ie})),r.d(t,"DAY",(function(){return ue})),r.d(t,"WEEK",(function(){return se})),r.d(t,"MONTH",(function(){return pe})),r.d(t,"EXPORT_STORE_NAME",(function(){return $a})),r.d(t,"IMPORT_STORE_NAME",(function(){return Tc}));var n={};r.r(n),r.d(n,"getSettingsGroupNames",(function(){return V})),r.d(n,"getSettings",(function(){return Q})),r.d(n,"getDirtyKeys",(function(){return J})),r.d(n,"getIsDirty",(function(){return W})),r.d(n,"getSettingsForGroup",(function(){return H})),r.d(n,"isUpdateSettingsRequesting",(function(){return B})),r.d(n,"getSetting",(function(){return K})),r.d(n,"getLastSettingsErrorForGroup",(function(){return Y})),r.d(n,"getSettingsError",(function(){return X}));var o={};r.r(o),r.d(o,"updateSettingsForGroup",(function(){return Oe})),r.d(o,"updateErrorForGroup",(function(){return ve})),r.d(o,"setIsRequesting",(function(){return Ee})),r.d(o,"clearIsDirty",(function(){return me})),r.d(o,"updateAndPersistSettingsForGroup",(function(){return be})),r.d(o,"persistSettingsForGroup",(function(){return he})),r.d(o,"clearSettings",(function(){return Se}));var a={};r.r(a),r.d(a,"getSettings",(function(){return we})),r.d(a,"getSettingsForGroup",(function(){return je}));var c={};r.r(c),r.d(c,"getActivePlugins",(function(){return Ge})),r.d(c,"getInstalledPlugins",(function(){return Le})),r.d(c,"isPluginsRequesting",(function(){return Ve})),r.d(c,"getPluginsError",(function(){return Qe})),r.d(c,"isJetpackConnected",(function(){return Je})),r.d(c,"getJetpackConnectUrl",(function(){return We})),r.d(c,"getPluginInstallState",(function(){return He})),r.d(c,"getPaypalOnboardingStatus",(function(){return Be}));var i={};r.r(i),r.d(i,"updateActivePlugins",(function(){return tt})),r.d(i,"updateInstalledPlugins",(function(){return rt})),r.d(i,"setIsRequesting",(function(){return nt})),r.d(i,"setError",(function(){return ot})),r.d(i,"updateIsJetpackConnected",(function(){return at})),r.d(i,"updateJetpackConnectUrl",(function(){return ct})),r.d(i,"installPlugins",(function(){return it})),r.d(i,"activatePlugins",(function(){return ut})),r.d(i,"installAndActivatePlugins",(function(){return st})),r.d(i,"createErrorNotice",(function(){return pt})),r.d(i,"connectToJetpack",(function(){return ft})),r.d(i,"installJetpackAndConnect",(function(){return lt})),r.d(i,"connectToJetpackWithFailureRedirect",(function(){return dt})),r.d(i,"formatErrors",(function(){return gt})),r.d(i,"setPaypalOnboardingStatus",(function(){return Ot}));var u={};r.r(u),r.d(u,"getOption",(function(){return mt})),r.d(u,"getOptionsRequestingError",(function(){return bt})),r.d(u,"isOptionsUpdating",(function(){return ht})),r.d(u,"getOptionsUpdatingError",(function(){return St}));var s={};r.r(s),r.d(s,"receiveOptions",(function(){return wt})),r.d(s,"setRequestingError",(function(){return jt})),r.d(s,"setUpdatingError",(function(){return It})),r.d(s,"setIsUpdating",(function(){return Pt})),r.d(s,"updateOptions",(function(){return xt}));var p={};r.r(p),r.d(p,"getOption",(function(){return qt}));var f={};r.r(f),r.d(f,"getActivePlugins",(function(){return Xt})),r.d(f,"getInstalledPlugins",(function(){return zt})),r.d(f,"isJetpackConnected",(function(){return Zt})),r.d(f,"getJetpackConnectUrl",(function(){return $t})),r.d(f,"getPaypalOnboardingStatus",(function(){return er}));var l={};r.r(l),r.d(l,"getProfileItems",(function(){return ir})),r.d(l,"getTasksStatus",(function(){return ur})),r.d(l,"getOnboardingError",(function(){return sr})),r.d(l,"isOnboardingRequesting",(function(){return pr}));var d={};r.r(d),r.d(d,"setError",(function(){return dr})),r.d(d,"setIsRequesting",(function(){return gr})),r.d(d,"setProfileItems",(function(){return Or})),r.d(d,"setTasksStatus",(function(){return vr})),r.d(d,"updateProfileItems",(function(){return Er}));var g={};r.r(g),r.d(g,"getProfileItems",(function(){return hr})),r.d(g,"getTasksStatus",(function(){return Sr}));var O={};r.r(O),r.d(O,"getReviews",(function(){return Mr})),r.d(O,"getReviewsTotalCount",(function(){return qr})),r.d(O,"getReviewsError",(function(){return Gr}));var v={};r.r(v),r.d(v,"updateReviews",(function(){return Jr})),r.d(v,"updateReview",(function(){return Wr})),r.d(v,"deleteReview",(function(){return Hr})),r.d(v,"setReviewIsUpdating",(function(){return Br})),r.d(v,"setReview",(function(){return Kr})),r.d(v,"setError",(function(){return Yr}));var E={};r.r(E),r.d(E,"getReviews",(function(){return on})),r.d(E,"getReviewsTotalCount",(function(){return an}));var m={};r.r(m),r.d(m,"getNotes",(function(){return vn})),r.d(m,"getNotesError",(function(){return En})),r.d(m,"isNotesRequesting",(function(){return mn}));var b={};r.r(b),r.d(b,"triggerNoteAction",(function(){return jn})),r.d(b,"removeNote",(function(){return In})),r.d(b,"removeAllNotes",(function(){return Pn})),r.d(b,"batchUpdateNotes",(function(){return xn})),r.d(b,"updateNote",(function(){return An})),r.d(b,"setNote",(function(){return kn})),r.d(b,"setNoteIsUpdating",(function(){return Dn})),r.d(b,"setNotes",(function(){return Un})),r.d(b,"setNotesQuery",(function(){return Nn})),r.d(b,"setError",(function(){return Cn})),r.d(b,"setIsRequesting",(function(){return Fn}));var h={};r.r(h),r.d(h,"getNotes",(function(){return qn}));var S={};r.r(S),r.d(S,"getReportItemsError",(function(){return Wn})),r.d(S,"getReportItems",(function(){return Hn})),r.d(S,"getReportStats",(function(){return Bn})),r.d(S,"getReportStatsError",(function(){return Kn}));var y={};r.r(y),r.d(y,"setReportItemsError",(function(){return Xn})),r.d(y,"setReportItems",(function(){return zn})),r.d(y,"setReportStats",(function(){return Zn})),r.d(y,"setReportStatsError",(function(){return $n}));var T={};r.r(T),r.d(T,"getReportItems",(function(){return ro})),r.d(T,"getReportStats",(function(){return no}));var _={};r.r(_),r.d(_,"getItems",(function(){return Eo})),r.d(_,"getItemsTotalCount",(function(){return mo})),r.d(_,"getItemsError",(function(){return bo}));var R={};r.r(R),r.d(R,"setItem",(function(){return Ro})),r.d(R,"setItems",(function(){return wo})),r.d(R,"setItemsTotalCount",(function(){return jo})),r.d(R,"setError",(function(){return Io})),r.d(R,"updateProductStock",(function(){return Po})),r.d(R,"createProductFromTemplate",(function(){return xo}));var w={};r.r(w),r.d(w,"getItems",(function(){return Mo})),r.d(w,"getReviewsTotalCount",(function(){return qo})),r.d(w,"getItemsTotalCount",(function(){return Go}));var j={};r.r(j),r.d(j,"getMenuItems",(function(){return Ho})),r.d(j,"getActiveItem",(function(){return Bo})),r.d(j,"getFavorites",(function(){return Ko})),r.d(j,"isNavigationRequesting",(function(){return Yo}));var I={};r.r(I),r.d(I,"setActiveItem",(function(){return $o})),r.d(I,"setMenuItems",(function(){return ea})),r.d(I,"addMenuItems",(function(){return ta})),r.d(I,"getFavoritesFailure",(function(){return ra})),r.d(I,"getFavoritesRequest",(function(){return na})),r.d(I,"getFavoritesSuccess",(function(){return oa})),r.d(I,"addFavoriteRequest",(function(){return aa})),r.d(I,"addFavoriteFailure",(function(){return ca})),r.d(I,"addFavoriteSuccess",(function(){return ia})),r.d(I,"removeFavoriteRequest",(function(){return ua})),r.d(I,"removeFavoriteFailure",(function(){return sa})),r.d(I,"removeFavoriteSuccess",(function(){return pa})),r.d(I,"addFavorite",(function(){return fa})),r.d(I,"removeFavorite",(function(){return la}));var P={};r.r(P),r.d(P,"getFavorites",(function(){return Ea}));var x={};r.r(x),r.d(x,"isExportRequesting",(function(){return La})),r.d(x,"getExportId",(function(){return Va})),r.d(x,"getError",(function(){return Qa}));var A={};r.r(A),r.d(A,"setExportId",(function(){return Ha})),r.d(A,"setIsRequesting",(function(){return Ba})),r.d(A,"setError",(function(){return Ka})),r.d(A,"startExport",(function(){return Ya}));var k={};r.r(k),r.d(k,"getImportStarted",(function(){return rc})),r.d(k,"getFormSettings",(function(){return nc})),r.d(k,"getImportStatus",(function(){return oc})),r.d(k,"getImportTotals",(function(){return ac})),r.d(k,"getImportError",(function(){return cc}));var D={};r.r(D),r.d(D,"setImportStarted",(function(){return sc})),r.d(D,"setImportPeriod",(function(){return pc})),r.d(D,"setSkipPrevious",(function(){return fc})),r.d(D,"setImportStatus",(function(){return lc})),r.d(D,"setImportTotals",(function(){return dc})),r.d(D,"setImportError",(function(){return gc})),r.d(D,"updateImportation",(function(){return Oc}));var U={};r.r(U),r.d(U,"getImportStatus",(function(){return mc})),r.d(U,"getImportTotals",(function(){return bc}));var N=r(11),C=r(17),F="wc/admin/settings",M=r(19),q=r.n(M);function G(e,t){var r=JSON.stringify(t,Object.keys(t).sort());return"".concat(e,":").concat(r)}function L(e){var t=e.indexOf(":");return t<0?e:e.substring(0,t)}var V=function(e){var t=new Set(Object.keys(e).map((function(e){return L(e)})));return q()(t)},Q=function(e,t){var r={},n=e[t]&&e[t].data||[];return 0===n.length||n.forEach((function(n){r[n]=e[G(t,n)].data})),r},J=function(e,t){return e[t].dirty||[]},W=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=J(e,t);return 0!==n.length&&r.some((function(e){return n.includes(e)}))},H=function(e,t,r){var n=Q(e,t);return r.reduce((function(e,t){return e[t]=n[t]||{},e}),{})},B=function(e,t){return e[t]&&Boolean(e[t].isRequesting)};function K(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},a=G(t,r),c=e[a]&&e[a].data||n;return o(c,n)}var Y=function(e,t){var r=e[t].data;return 0===r.length?e[t].error:q()(r).pop().error},X=function(e,t,r){return r?e[G(t,r)].error||!1:e[t]&&e[t].error||!1},z=r(8),Z=r.n(z),$=r(2),ee=r(3),te="/wc-analytics",re="/wc-admin",ne="/wc/v1",oe=100,ae=1e3,ce=60*ae,ie=60*ce,ue=24*ie,se=7*ue,pe=365*ue/12,fe={pageSize:25,period:"month",compare:"previous_year",noteTypes:["info","marketing","survey","warning"]},le={UPDATE_SETTINGS_FOR_GROUP:"UPDATE_SETTINGS_FOR_GROUP",UPDATE_ERROR_FOR_GROUP:"UPDATE_ERROR_FOR_GROUP",CLEAR_SETTINGS:"CLEAR_SETTINGS",SET_IS_REQUESTING:"SET_IS_REQUESTING",CLEAR_IS_DIRTY:"CLEAR_IS_DIRTY"},de=Z.a.mark(be),ge=Z.a.mark(he);function Oe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;return{type:le.UPDATE_SETTINGS_FOR_GROUP,group:e,data:t,time:r}}function ve(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Date;return{type:le.UPDATE_ERROR_FOR_GROUP,group:e,data:t,error:r,time:n}}function Ee(e,t){return{type:le.SET_IS_REQUESTING,group:e,isRequesting:t}}function me(e){return{type:le.CLEAR_IS_DIRTY,group:e}}function be(e,t){return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Oe(e,t);case 2:return r.delegateYield(he(e),"t0",3);case 3:case"end":return r.stop()}}),de)}function he(e){var t,r,n,o,a;return Z.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Ee(e,!0);case 2:return c.next=4,Object(C.select)(F,"getDirtyKeys",e);case 4:if(0!==(t=c.sent).length){c.next=9;break}return c.next=8,Ee(e,!1);case 8:return c.abrupt("return");case 9:return c.next=11,Object(C.select)(F,"getSettingsForGroup",e,t);case 11:return r=c.sent,n="".concat(te,"/settings/").concat(e,"/batch"),o=t.reduce((function(e,t){var n=Object.keys(r[t]).map((function(e){return{id:e,value:r[t][e]}}));return Object(ee.concat)(e,n)}),[]),c.prev=14,c.next=17,Object(C.apiFetch)({path:n,method:"POST",data:{update:o}});case 17:return a=c.sent,c.next=20,Ee(e,!1);case 20:if(a){c.next=22;break}throw new Error(Object($.__)("There was a problem updating your settings.",'woocommerce'));case 22:return c.next=24,me(e);case 24:c.next=33;break;case 26:return c.prev=26,c.t0=c.catch(14),c.next=30,ve(e,null,c.t0);case 30:return c.next=32,Ee(e,!1);case 32:throw c.t0;case 33:case"end":return c.stop()}}),ge,null,[[14,26]])}function Se(){return{type:le.CLEAR_SETTINGS}}var ye=r(5),Te=r.n(ye),_e=Z.a.mark(we),Re=Z.a.mark(je);function we(e){var t,r,n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(C.dispatch)(F,"setIsRequesting",e,!0);case 2:return o.prev=2,t=te+"/settings/"+e,o.next=6,Object(C.apiFetch)({path:t,method:"GET"});case 6:return r=o.sent,n=r.reduce((function(e,t){return e[t.id]=t.value,e}),{}),o.abrupt("return",Oe(e,Te()({},e,n)));case 11:return o.prev=11,o.t0=o.catch(2),o.abrupt("return",ve(e,null,o.t0.message));case 14:case"end":return o.stop()}}),_e,null,[[2,11]])}function je(e){return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",we(e));case 1:case"end":return t.stop()}}),Re)}function Ie(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 Pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xe=function(e,t){var r=t.group,n=t.groupIds,o=t.data,a=t.time,c=t.error;return n.forEach((function(t){e[G(r,t)]={data:o[t],lastReceived:a,error:c}})),e},Ae=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.group,o=t.data,a=t.error,c=t.time,i=t.isRequesting,u={};switch(r){case le.SET_IS_REQUESTING:e=Pe(Pe({},e),{},Te()({},n,Pe(Pe({},e[n]),{},{isRequesting:i})));break;case le.CLEAR_IS_DIRTY:e=Pe(Pe({},e),{},Te()({},n,Pe(Pe({},e[n]),{},{dirty:[]})));break;case le.UPDATE_SETTINGS_FOR_GROUP:case le.UPDATE_ERROR_FOR_GROUP:var s=o?Object.keys(o):[];e=null===o?Pe(Pe({},e),{},Te()({},n,{data:e[n]?e[n].data:[],error:a,lastReceived:c})):Pe(Pe({},e),{},Te()({},n,{data:e[n]&&e[n].data?[].concat(q()(e[n].data),q()(s)):s,error:a,lastReceived:c,isRequesting:!1,dirty:e[n]&&e[n].dirty?Object(ee.union)(e[n].dirty,s):s}),xe(u,{group:n,groupIds:s,data:o,time:c,error:a}));break;case le.CLEAR_SETTINGS:e={}}return e};Object(N.registerStore)(F,{reducer:Ae,actions:o,controls:C.controls,selectors:n,resolvers:a});var ke=F,De=r(0),Ue=r(20),Ne=function(e,t){return Object(Ue.createHigherOrderComponent)((function(r){return function(n){var o=Object(De.useRef)(t);return Object(N.useSelect)((function(t,r){if(o.current){var n=t(F),a=n.isResolving,c=n.hasFinishedResolution,i=r.dispatch(F),u=i.startResolution,s=i.finishResolution,p=i.updateSettingsForGroup,f=i.clearIsDirty;a("getSettings",[e])||c("getSettings",[e])||(u("getSettings",[e]),p(e,o.current),f(e),s("getSettings",[e]))}}),[]),Object(De.createElement)(r,n)}}),"withSettingsHydration")};function Ce(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 Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object(N.useSelect)((function(r){var n=r(F),o=n.getLastSettingsErrorForGroup,a=n.getSettingsForGroup,c=n.getIsDirty,i=n.isUpdateSettingsRequesting;return{requestedSettings:a(e,t),settingsError:Boolean(o(e)),isRequesting:i(e),isDirty:c(e,t)}}),[e].concat(q()(t.sort()))),n=r.requestedSettings,o=r.settingsError,a=r.isRequesting,c=r.isDirty,i=Object(N.useDispatch)(F),u=i.persistSettingsForGroup,s=i.updateAndPersistSettingsForGroup,p=i.updateSettingsForGroup,f=Object(De.useCallback)((function(t,r){p(e,Te()({},t,r))}),[e]),l=Object(De.useCallback)((function(){u(e)}),[e]),d=Object(De.useCallback)((function(t,r){s(e,Te()({},t,r))}),[e]);return Fe(Fe({settingsError:o,isRequesting:a,isDirty:c},n),{},{persistSettings:l,updateAndPersistSettings:d,updateSettings:f})},qe={"facebook-for-woocommerce":Object($.__)("Facebook for WooCommerce",'woocommerce'),jetpack:Object($.__)("Jetpack",'woocommerce'),"klarna-checkout-for-woocommerce":Object($.__)("Klarna Checkout for WooCommerce",'woocommerce'),"klarna-payments-for-woocommerce":Object($.__)("Klarna Payments for WooCommerce",'woocommerce'),"mailchimp-for-woocommerce":Object($.__)("Mailchimp for WooCommerce",'woocommerce'),"creative-mail-by-constant-contact":Object($.__)("Creative Mail for WooCommerce",'woocommerce'),"woocommerce-gateway-paypal-express-checkout":Object($.__)("WooCommerce PayPal",'woocommerce'),"woocommerce-gateway-stripe":Object($.__)("WooCommerce Stripe",'woocommerce'),"woocommerce-payfast-gateway":Object($.__)("WooCommerce PayFast",'woocommerce'),"woocommerce-payments":Object($.__)("WooCommerce Payments",'woocommerce'),"woocommerce-services":Object($.__)("WooCommerce Shipping & Tax",'woocommerce'),"woocommerce-shipstation-integration":Object($.__)("WooCommerce ShipStation Gateway",'woocommerce'),"kliken-marketing-for-google":Object($.__)("Google Ads",'woocommerce'),"woo-razorpay":Object($.__)("Razorpay",'woocommerce')},Ge=function(e){return e.active||[]},Le=function(e){return e.installed||[]},Ve=function(e,t){return e.requesting[t]||!1},Qe=function(e,t){return e.errors[t]||!1},Je=function(e){return e.jetpackConnection},We=function(e,t){return e.jetpackConnectUrls[t.redirect_url]},He=function(e,t){return e.active.includes(t)?"activated":e.installed.includes(t)?"installed":"unavailable"},Be=function(e){return e.paypalOnboardingStatus},Ke={UPDATE_ACTIVE_PLUGINS:"UPDATE_ACTIVE_PLUGINS",UPDATE_INSTALLED_PLUGINS:"UPDATE_INSTALLED_PLUGINS",SET_IS_REQUESTING:"SET_IS_REQUESTING",SET_ERROR:"SET_ERROR",UPDATE_JETPACK_CONNECTION:"UPDATE_JETPACK_CONNECTION",UPDATE_JETPACK_CONNECT_URL:"UPDATE_JETPACK_CONNECT_URL",SET_PAYPAL_ONBOARDING_STATUS:"SET_PAYPAL_ONBOARDING_STATUS"},Ye=Z.a.mark(it),Xe=Z.a.mark(ut),ze=Z.a.mark(st),Ze=Z.a.mark(ft),$e=Z.a.mark(lt),et=Z.a.mark(dt);function tt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:Ke.UPDATE_ACTIVE_PLUGINS,active:e,replace:t}}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:Ke.UPDATE_INSTALLED_PLUGINS,installed:e,replace:t}}function nt(e,t){return{type:Ke.SET_IS_REQUESTING,selector:e,isRequesting:t}}function ot(e,t){return{type:Ke.SET_ERROR,selector:e,error:t}}function at(e){return{type:Ke.UPDATE_JETPACK_CONNECTION,jetpackConnection:e}}function ct(e,t){return{type:Ke.UPDATE_JETPACK_CONNECT_URL,jetpackConnectUrl:t,redirectUrl:e}}function it(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,nt("installPlugins",!0);case 2:return r.prev=2,r.next=5,Object(C.apiFetch)({path:"".concat(re,"/plugins/install"),method:"POST",data:{plugins:e.join(",")}});case 5:if(!(t=r.sent).data.installed.length){r.next=9;break}return r.next=9,rt(t.data.installed);case 9:if(!Object.keys(t.errors.errors).length){r.next=11;break}throw t.errors.errors;case 11:return r.next=13,nt("installPlugins",!1);case 13:return r.abrupt("return",t);case 16:return r.prev=16,r.t0=r.catch(2),r.next=20,ot("installPlugins",r.t0);case 20:throw new Error(vt(r.t0));case 21:case"end":return r.stop()}}),Ye,null,[[2,16]])}function ut(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,nt("activatePlugins",!0);case 2:return r.prev=2,r.next=5,Object(C.apiFetch)({path:"".concat(re,"/plugins/activate"),method:"POST",data:{plugins:e.join(",")}});case 5:if(!(t=r.sent).data.activated.length){r.next=9;break}return r.next=9,tt(t.data.activated);case 9:if(!Object.keys(t.errors.errors).length){r.next=11;break}throw t.errors.errors;case 11:return r.next=13,nt("activatePlugins",!1);case 13:return r.abrupt("return",t);case 16:return r.prev=16,r.t0=r.catch(2),r.next=20,ot("activatePlugins",r.t0);case 20:throw new Error(gt(r.t0));case 21:case"end":return r.stop()}}),Xe,null,[[2,16]])}function st(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(C.dispatch)("wc/admin/plugins","installPlugins",e);case 3:return r.next=5,Object(C.dispatch)("wc/admin/plugins","activatePlugins",e);case 5:return t=r.sent,r.abrupt("return",t);case 9:throw r.prev=9,r.t0=r.catch(0),r.t0;case 12:case"end":return r.stop()}}),ze,null,[[0,9]])}var pt=function(e){return Object(C.dispatch)("core/notices","createNotice",e)};function ft(e){var t,r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(C.select)("wc/admin/plugins","getJetpackConnectUrl",{redirect_url:e("admin.php?page=wc-admin")});case 2:return t=n.sent,n.next=5,Object(C.select)("wc/admin/plugins","getPluginsError","getJetpackConnectUrl");case 5:if(!(r=n.sent)){n.next=10;break}throw new Error(r);case 10:return n.abrupt("return",t);case 11:case"end":return n.stop()}}),Ze)}function lt(e,t){var r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(C.dispatch)("wc/admin/plugins","installPlugins",["jetpack"]);case 3:return n.next=5,Object(C.dispatch)("wc/admin/plugins","activatePlugins",["jetpack"]);case 5:return n.next=7,Object(C.dispatch)("wc/admin/plugins","connectToJetpack",t);case 7:r=n.sent,window.location=r,n.next=15;break;case 11:return n.prev=11,n.t0=n.catch(0),n.next=15,e(n.t0.message);case 15:case"end":return n.stop()}}),$e,null,[[0,11]])}function dt(e,t,r){var n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,Object(C.dispatch)("wc/admin/plugins","connectToJetpack",r);case 3:n=o.sent,window.location=n,o.next=12;break;case 7:return o.prev=7,o.t0=o.catch(0),o.next=11,t(o.t0.message);case 11:window.location=e;case 12:case"end":return o.stop()}}),et,null,[[0,7]])}function gt(e){return e.errors&&Object.keys(e.errors).forEach((function(t){e.errors[t]=e.errors[t].map((function(e){return qe[t]?e.replace("`".concat(t,"`"),qe[t]):e}))})),e}function Ot(e){return{type:Ke.SET_PAYPAL_ONBOARDING_STATUS,paypalOnboardingStatus:e}}var vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"install";return Object($.sprintf)(Object($._n)("Could not %(actionType)s %(pluginName)s plugin, %(error)s","Could not %(actionType)s the following plugins: %(pluginName)s with these Errors: %(error)s",e.length,'woocommerce'),{actionType:t,pluginName:Object.keys(e).join(", "),error:Object.values(e).join(", \n")})},Et=r(23),mt=function(e,t){return e[t]},bt=function(e,t){return e.requestingErrors[t]||!1},ht=function(e){return e.isUpdating||!1},St=function(e){return e.updatingError||!1},yt={RECEIVE_OPTIONS:"RECEIVE_OPTIONS",SET_IS_REQUESTING:"SET_IS_REQUESTING",SET_IS_UPDATING:"SET_IS_UPDATING",SET_REQUESTING_ERROR:"SET_REQUESTING_ERROR",SET_UPDATING_ERROR:"SET_UPDATING_ERROR"},Tt=Z.a.mark(xt);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 Rt(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){Te()(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}function wt(e){return{type:yt.RECEIVE_OPTIONS,options:e}}function jt(e,t){return{type:yt.SET_REQUESTING_ERROR,error:e,name:t}}function It(e){return{type:yt.SET_UPDATING_ERROR,error:e}}function Pt(e){return{type:yt.SET_IS_UPDATING,isUpdating:e}}function xt(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Pt(!0);case 2:return r.next=4,wt(e);case 4:return r.prev=4,r.next=7,Object(C.apiFetch)({path:re+"/options",method:"POST",data:e});case 7:return t=r.sent,r.next=10,Pt(!1);case 10:return r.abrupt("return",Rt({success:!0},t));case 13:return r.prev=13,r.t0=r.catch(4),r.next=17,It(r.t0);case 17:return r.abrupt("return",Rt({success:!1},r.t0));case 18:case"end":return r.stop()}}),Tt,null,[[4,13]])}var At=r(26),kt=r.n(At);function Dt(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 Ut(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Nt=[],Ct={},Ft=Ut(Ut({},C.controls),{},{BATCH_FETCH:function(e){var t=e.optionName;return Nt.push(t),new Promise((function(e){setTimeout((function(){var r=Nt.join(",");if(Ct[r])return Ct[r].then((function(r){e(r[t])}));var n=re+"/options?options="+r;Ct[r]=kt()({path:n}),Ct[r].then((function(t){return e(t)})),setTimeout((function(){Nt=[],delete Ct[r]}),1)}),1)}))}}),Mt=Z.a.mark(qt);function qt(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,{type:"BATCH_FETCH",optionName:e};case 3:return t=r.sent,r.next=6,wt(t);case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,jt(r.t0,e);case 12:case"end":return r.stop()}}),Mt,null,[[0,8]])}function Gt(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?Gt(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Vt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isUpdating:!1,requestingErrors:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.options,o=t.error,a=t.isUpdating,c=t.name;switch(r){case yt.RECEIVE_OPTIONS:e=Lt(Lt({},e),n);break;case yt.SET_IS_UPDATING:e=Lt(Lt({},e),{},{isUpdating:a});break;case yt.SET_REQUESTING_ERROR:e=Lt(Lt({},e),{},{requestingErrors:Te()({},c,o)});break;case yt.SET_UPDATING_ERROR:e=Lt(Lt({},e),{},{error:o,updatingError:o,isUpdating:!1})}return e};Object(N.registerStore)("wc/admin/options",{reducer:Vt,actions:s,controls:Ft,selectors:u,resolvers:p});var Qt="wc/admin/options",Jt=Z.a.mark(Xt),Wt=Z.a.mark(zt),Ht=Z.a.mark(Zt),Bt=Z.a.mark($t),Kt=Z.a.mark(er),Yt=Z.a.mark(tr);function Xt(){var e,t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,nt("getActivePlugins",!0);case 2:return r.prev=2,e=re+"/plugins/active",r.next=6,Object(C.apiFetch)({path:e,method:"GET"});case 6:return t=r.sent,r.next=9,tt(t.plugins,!0);case 9:r.next=15;break;case 11:return r.prev=11,r.t0=r.catch(2),r.next=15,ot("getActivePlugins",r.t0);case 15:case"end":return r.stop()}}),Jt,null,[[2,11]])}function zt(){var e,t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,nt("getInstalledPlugins",!0);case 2:return r.prev=2,e=re+"/plugins/installed",r.next=6,Object(C.apiFetch)({path:e,method:"GET"});case 6:return t=r.sent,r.next=9,rt(t,!0);case 9:r.next=15;break;case 11:return r.prev=11,r.t0=r.catch(2),r.next=15,ot("getInstalledPlugins",r.t0);case 15:case"end":return r.stop()}}),Wt,null,[[2,11]])}function Zt(){var e;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt("isJetpackConnected",!0);case 2:return t.prev=2,"/jetpack/v4/connection",t.next=6,Object(C.apiFetch)({path:"/jetpack/v4/connection",method:"GET"});case 6:return e=t.sent,t.next=9,at(e.isActive);case 9:t.next=15;break;case 11:return t.prev=11,t.t0=t.catch(2),t.next=15,ot("isJetpackConnected",t.t0);case 15:return t.next=17,nt("isJetpackConnected",!1);case 17:case"end":return t.stop()}}),Ht,null,[[2,11]])}function $t(e){var t,r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,nt("getJetpackConnectUrl",!0);case 2:return n.prev=2,t=Object(Et.addQueryArgs)(re+"/plugins/connect-jetpack",e),n.next=6,Object(C.apiFetch)({path:t,method:"GET"});case 6:return r=n.sent,n.next=9,ct(e.redirect_url,r.connectAction);case 9:n.next=15;break;case 11:return n.prev=11,n.t0=n.catch(2),n.next=15,ot("getJetpackConnectUrl",n.t0);case 15:return n.next=17,nt("getJetpackConnectUrl",!1);case 17:case"end":return n.stop()}}),Bt,null,[[2,11]])}function er(){var e,t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,nt("getPaypalOnboardingStatus",!0);case 2:return r.next=4,Object(C.select)("wc/admin/plugins","getPluginsError","getPaypalOnboardingStatus");case 4:if(!(e=r.sent)||!e.data||404!==e.data.status){r.next=10;break}return r.next=8,tr();case 8:r.next=25;break;case 10:return r.prev=10,"/wc-paypal/v1/onboarding/get-status",r.next=14,Object(C.apiFetch)({path:"/wc-paypal/v1/onboarding/get-status",method:"GET"});case 14:return t=r.sent,r.next=17,Ot(t);case 17:r.next=25;break;case 19:return r.prev=19,r.t0=r.catch(10),r.next=23,tr();case 23:return r.next=25,ot("getPaypalOnboardingStatus",r.t0);case 25:return r.next=27,nt("getPaypalOnboardingStatus",!1);case 27:case"end":return r.stop()}}),Kt,null,[[10,19]])}function tr(){var e;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(C.select)(Qt,"getOption","woocommerce-ppcp-settings");case 2:return e=t.sent,t.next=5,Ot({production:{onboarded:!!(e.merchant_email_production&&e.merchant_id_production&&e.client_id_production&&e.client_secret_production)}});case 5:case"end":return t.stop()}}),Yt)}function rr(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 nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var or=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{active:[],installed:[],requesting:{},errors:{},jetpackConnectUrls:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.active,o=t.installed,a=t.selector,c=t.isRequesting,i=t.error,u=t.jetpackConnection,s=t.redirectUrl,p=t.jetpackConnectUrl,f=t.paypalOnboardingStatus,l=t.replace;switch(r){case Ke.UPDATE_ACTIVE_PLUGINS:e=nr(nr({},e),{},{active:l?n:Object(ee.concat)(e.active,n),requesting:nr(nr({},e.requesting),{},{getActivePlugins:!1,activatePlugins:!1}),errors:nr(nr({},e.errors),{},{getActivePlugins:!1,activatePlugins:!1})});break;case Ke.UPDATE_INSTALLED_PLUGINS:e=nr(nr({},e),{},{installed:l?o:Object(ee.concat)(e.installed,o),requesting:nr(nr({},e.requesting),{},{getInstalledPlugins:!1,installPlugin:!1}),errors:nr(nr({},e.errors),{},{getInstalledPlugins:!1,installPlugin:!1})});break;case Ke.SET_IS_REQUESTING:e=nr(nr({},e),{},{requesting:nr(nr({},e.requesting),{},Te()({},a,c))});break;case Ke.SET_ERROR:e=nr(nr({},e),{},{requesting:nr(nr({},e.requesting),{},Te()({},a,!1)),errors:nr(nr({},e.errors),{},Te()({},a,i))});break;case Ke.UPDATE_JETPACK_CONNECTION:e=nr(nr({},e),{},{jetpackConnection:u});break;case Ke.UPDATE_JETPACK_CONNECT_URL:e=nr(nr({},e),{},{jetpackConnectUrls:nr(nr({},e.jetpackConnectUrl),{},Te()({},s,p))});break;case Ke.SET_PAYPAL_ONBOARDING_STATUS:e=nr(nr({},e),{},{paypalOnboardingStatus:f})}return e};Object(N.registerStore)("wc/admin/plugins",{reducer:or,actions:i,controls:C.controls,selectors:c,resolvers:f});var ar="wc/admin/plugins",cr=function(e){return Object(Ue.createHigherOrderComponent)((function(t){return function(r){var n=Object(De.useRef)(e);return Object(N.useSelect)((function(e,t){if(n.current){var r=e("wc/admin/plugins"),o=r.isResolving,a=r.hasFinishedResolution,c=t.dispatch("wc/admin/plugins"),i=c.startResolution,u=c.finishResolution,s=c.updateActivePlugins,p=c.updateInstalledPlugins,f=c.updateIsJetpackConnected;o("getActivePlugins",[])||a("getActivePlugins",[])||(i("getActivePlugins",[]),i("getInstalledPlugins",[]),i("isJetpackConnected",[]),s(n.current.activePlugins,!0),p(n.current.installedPlugins,!0),f(n.current.jetpackStatus&&n.current.jetpackStatus.isActive),u("getActivePlugins",[]),u("getInstalledPlugins",[]),u("isJetpackConnected",[]))}}),[]),Object(De.createElement)(t,r)}}),"withPluginsHydration")},ir=function(e){return e.profileItems||{}},ur=function(e){return e.tasksStatus||{}},sr=function(e,t){return e.errors[t]||!1},pr=function(e,t){return e.requesting[t]||!1},fr={SET_ERROR:"SET_ERROR",SET_IS_REQUESTING:"SET_IS_REQUESTING",SET_PROFILE_ITEMS:"SET_PROFILE_ITEMS",SET_TASKS_STATUS:"SET_TASKS_STATUS"},lr=Z.a.mark(Er);function dr(e,t){return{type:fr.SET_ERROR,selector:e,error:t}}function gr(e,t){return{type:fr.SET_IS_REQUESTING,selector:e,isRequesting:t}}function Or(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:fr.SET_PROFILE_ITEMS,profileItems:e,replace:t}}function vr(e){return{type:fr.SET_TASKS_STATUS,tasksStatus:e}}function Er(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,gr("updateProfileItems",!0);case 2:return r.prev=2,r.next=5,Object(C.apiFetch)({path:"".concat(re,"/onboarding/profile"),method:"POST",data:e});case 5:if(!(t=r.sent)||"success"!==t.status){r.next=12;break}return r.next=9,Or(e);case 9:return r.next=11,gr("updateProfileItems",!1);case 11:return r.abrupt("return",t);case 12:throw new Error;case 15:return r.prev=15,r.t0=r.catch(2),r.next=19,dr("updateProfileItems",r.t0);case 19:return r.next=21,gr("updateProfileItems",!1);case 21:throw new Error;case 22:case"end":return r.stop()}}),lr,null,[[2,15]])}var mr=Z.a.mark(hr),br=Z.a.mark(Sr);function hr(){var e;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(C.apiFetch)({path:re+"/onboarding/profile",method:"GET"});case 3:return e=t.sent,t.next=6,Or(e,!0);case 6:t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(0),t.next=12,dr("getProfileItems",t.t0);case 12:case"end":return t.stop()}}),mr,null,[[0,8]])}function Sr(){var e;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(C.apiFetch)({path:re+"/onboarding/tasks/status",method:"GET"});case 3:return e=t.sent,t.next=6,vr(e);case 6:t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(0),t.next=12,dr("getTasksStatus",t.t0);case 12:case"end":return t.stop()}}),br,null,[[0,8]])}function yr(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 Tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errors:{},profileItems:{},requesting:{},tasksStatus:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.profileItems,o=t.replace,a=t.error,c=t.isRequesting,i=t.selector,u=t.tasksStatus;switch(r){case fr.SET_PROFILE_ITEMS:return Tr(Tr({},e),{},{profileItems:o?n:Tr(Tr({},e.profileItems),n)});case fr.SET_TASKS_STATUS:return Tr(Tr({},e),{},{tasksStatus:Tr(Tr({},e.tasksStatus),u)});case fr.SET_ERROR:return Tr(Tr({},e),{},{errors:Tr(Tr({},e.errors),{},Te()({},i,a))});case fr.SET_IS_REQUESTING:return Tr(Tr({},e),{},{requesting:Tr(Tr({},e.requesting),{},Te()({},i,c))});default:return e}};Object(N.registerStore)("wc/admin/onboarding",{reducer:_r,actions:d,controls:C.controls,selectors:l,resolvers:g});var Rr="wc/admin/onboarding",wr=function(e){var t=!1,r=!1;return Object(Ue.createHigherOrderComponent)((function(n){return function(o){var a=Object(De.useRef)(e);return Object(N.useSelect)((function(e,n){if(a.current){var o=e("wc/admin/onboarding"),c=o.isResolving,i=o.hasFinishedResolution,u=n.dispatch("wc/admin/onboarding"),s=u.startResolution,p=u.finishResolution,f=u.setProfileItems,l=u.setTasksStatus,d=a.current,g=d.profileItems,O=d.tasksStatus;!g||t||c("getProfileItems",[])||i("getProfileItems",[])||(s("getProfileItems",[]),f(g,!0),p("getProfileItems",[]),t=!0),!O||r||c("getTasksStatus",[])||i("getTasksStatus",[])||(s("getTasksStatus",[]),l(O,!0),p("getTasksStatus",[]),r=!0)}}),[]),Object(De.createElement)(n,o)}}),"withOnboardingHydration")},jr="core",Ir=function(e){return Object(Ue.createHigherOrderComponent)((function(t){return function(r){var n=Object(De.useRef)(e);return Object(N.useSelect)((function(e,t){if(n.current){var r=e("core"),o=r.isResolving,a=r.hasFinishedResolution,c=t.dispatch("core"),i=c.startResolution,u=c.finishResolution,s=c.receiveCurrentUser;o("getCurrentUser")||a("getCurrentUser")||(i("getCurrentUser",[]),s(n.current),u("getCurrentUser",[]))}})),Object(De.createElement)(t,r)}}),"withCurrentUserHydration")},Pr=function(){var e=Object(N.useSelect)((function(e){var t=e("core"),r=t.getCurrentUser,n=t.hasStartedResolution,o=t.hasFinishedResolution;return{isRequesting:n("getCurrentUser")&&!o("getCurrentUser"),user:r(),getCurrentUser:r}}));return{currentUserCan:function(t){return!!(e.user&&e.user&&e.user.capabilities[t])},user:e.user,isRequesting:e.isRequesting}},xr=r(44),Ar=r.n(xr);function kr(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ur=function(e){var t=e.woocommerce_meta||{};return Object(ee.mapValues)(t,(function(e){return e&&0!==e.length?JSON.parse(e):""}))};function Nr(){return(Nr=Ar()(Z.a.mark((function e(t,r,n,o,a){var c,i,u,s,p;return Z.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=["categories_report_columns","coupons_report_columns","customers_report_columns","orders_report_columns","products_report_columns","revenue_report_columns","taxes_report_columns","variations_report_columns","dashboard_sections","dashboard_chart_type","dashboard_chart_interval","dashboard_leaderboard_rows","activity_panel_inbox_last_read","homepage_layout","homepage_stats","android_app_banner_dismissed","task_list_tracked_started_tasks","help_panel_highlight_shown"],i=Object(ee.mapValues)(Object(ee.pick)(a,c),JSON.stringify),0!==Object.keys(i).length){e.next=4;break}return e.abrupt("return",{error:new Error("No valid woocommerce_meta keys were provided for update."),updatedUser:void 0});case 4:return t(Dr(Dr({},r),{},{woocommerce_meta:Dr(Dr({},r.woocommerce_meta),i)})),e.next=7,n({id:r.id,woocommerce_meta:i});case 7:if(void 0!==(u=e.sent)){e.next=11;break}return s=o("root","user",r.id),e.abrupt("return",{error:s,updatedUser:u});case 11:return p=Dr(Dr({},u),{},{woocommerce_meta:Ur(u)}),e.abrupt("return",{updatedUser:p});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cr=function(){var e=Object(N.useDispatch)("core"),t=e.addEntities,r=e.receiveCurrentUser,n=e.saveEntityRecord,o=e.saveUser,a=Object(N.useSelect)((function(e){var t=e("core"),r=t.getCurrentUser,n=t.getEntity,o=t.getEntityRecord,a=t.getLastEntitySaveError,c=t.hasStartedResolution,i=t.hasFinishedResolution;return{isRequesting:c("getCurrentUser")&&!i("getCurrentUser"),user:r(),getCurrentUser:r,getEntity:n,getEntityRecord:o,getLastEntitySaveError:a}})),c=a.user?Ur(a.user):{};return Dr(Dr({isRequesting:a.isRequesting},c),{},{updateUserPreferences:function(e){"function"!=typeof o&&(o=function(){var e=Ar()(Z.a.mark((function e(r){return Z.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Boolean(a.getEntity("root","user"))){e.next=4;break}return e.next=4,t([{name:"user",kind:"root",baseURL:"/wp/v2/users",plural:"users"}]);case 4:return e.next=6,n("root","user",r);case 6:return e.abrupt("return",a.getEntityRecord("root","user",r.id));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var c=a.getCurrentUser();return function(e,t,r,n,o){return Nr.apply(this,arguments)}(r,c,o,a.getLastEntitySaveError,e)}})},Fr=function(e){return Object(Ue.createHigherOrderComponent)((function(t){return function(r){var n=Object(De.useRef)(e);return Object(N.useSelect)((function(e,t){if(n.current){var r=e("wc/admin/options"),o=r.isResolving,a=r.hasFinishedResolution,c=t.dispatch("wc/admin/options"),i=c.startResolution,u=c.finishResolution,s=c.receiveOptions;Object.keys(n.current).forEach((function(e){o("getOption",[e])||a("getOption",[e])||(i("getOption",[e]),s(Te()({},e,n.current[e])),u("getOption",[e]))}))}}),[]),Object(De.createElement)(t,r)}}),"withOptionsHydration")},Mr=function(e,t){var r=JSON.stringify(t);return(e.reviews[r]&&e.reviews[r].data||[]).map((function(t){return e.data[t]}))},qr=function(e,t){var r=JSON.stringify(t);return e.reviews[r]&&e.reviews[r].totalCount},Gr=function(e,t){var r=JSON.stringify(t);return e.errors[r]},Lr={UPDATE_REVIEWS:"UPDATE_REVIEWS",SET_REVIEW:"SET_REVIEW",SET_ERROR:"SET_ERROR",SET_REVIEW_IS_UPDATING:"SET_REVIEW_IS_UPDATING"},Vr=Z.a.mark(Wr),Qr=Z.a.mark(Hr);function Jr(e,t,r){return{type:Lr.UPDATE_REVIEWS,reviews:t,query:e,totalCount:r}}function Wr(e,t,r){var n,o;return Z.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Br(e,!0);case 2:return a.prev=2,n=Object(Et.addQueryArgs)("".concat(te,"/products/reviews/").concat(e),r||{}),a.next=6,Object(C.apiFetch)({path:n,method:"PUT",data:t});case 6:return o=a.sent,a.next=9,Kr(e,o);case 9:return a.next=11,Br(e,!1);case 11:a.next=20;break;case 13:return a.prev=13,a.t0=a.catch(2),a.next=17,Yr("updateReview",a.t0);case 17:return a.next=19,Br(e,!1);case 19:throw new Error;case 20:case"end":return a.stop()}}),Vr,null,[[2,13]])}function Hr(e){var t,r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Br(e,!0);case 2:return n.prev=2,t="".concat(te,"/products/reviews/").concat(e),n.next=6,Object(C.apiFetch)({path:t,method:"DELETE"});case 6:return r=n.sent,n.next=9,Kr(e,r);case 9:return n.next=11,Br(e,!1);case 11:return n.abrupt("return",r);case 14:return n.prev=14,n.t0=n.catch(2),n.next=18,Yr("deleteReview",n.t0);case 18:return n.next=20,Br(e,!1);case 20:throw new Error;case 21:case"end":return n.stop()}}),Qr,null,[[2,14]])}function Br(e,t){return{type:Lr.SET_REVIEW_IS_UPDATING,reviewId:e,isUpdating:t}}function Kr(e,t){return{type:Lr.SET_REVIEW,reviewId:e,reviewData:t}}function Yr(e,t){return{type:Lr.SET_ERROR,query:e,error:t}}var Xr=r(18),zr=r.n(Xr);function Zr(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 $r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zr(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var en=function(e){return{type:"FETCH_WITH_HEADERS",options:e}},tn=$r($r({},C.controls),{},{FETCH_WITH_HEADERS:function(e){var t=e.options;return kt()($r($r({},t),{},{parse:!1})).then((function(e){return Promise.all([e.headers,e.status,e.json()])})).then((function(e){var t=zr()(e,3);return{headers:t[0],status:t[1],data:t[2]}}))}}),rn=Z.a.mark(on),nn=Z.a.mark(an);function on(e){var t,r,n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,t=Object(Et.addQueryArgs)("".concat(te,"/products/reviews"),e),o.next=4,en({path:t,method:"GET"});case 4:return r=o.sent,n=parseInt(r.headers.get("x-wp-total"),10),o.next=8,Jr(e,r.data,n);case 8:o.next=14;break;case 10:return o.prev=10,o.t0=o.catch(0),o.next=14,Yr(e,o.t0);case 14:case"end":return o.stop()}}),rn,null,[[0,10]])}function an(e){return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,on(e);case 2:case"end":return t.stop()}}),nn)}function cn(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 un(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var sn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{reviews:{},errors:{},data:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.query,o=t.reviews,a=t.reviewId,c=t.reviewData,i=t.totalCount,u=t.error,s=t.isUpdating;switch(r){case Lr.UPDATE_REVIEWS:var p=[],f=o.reduce((function(t,r){return p.push(r.id),t[r.id]=un(un({},e.data[r.id]||{}),r),t}),{});return un(un({},e),{},{reviews:un(un({},e.reviews),{},Te()({},JSON.stringify(n),{data:p,totalCount:i})),data:un(un({},e.data),f)});case Lr.SET_REVIEW:return un(un({},e),{},{data:un(un({},e.data),{},Te()({},a,c))});case Lr.SET_ERROR:return un(un({},e),{},{errors:un(un({},e.errors),{},Te()({},JSON.stringify(n),u))});case Lr.SET_REVIEW_IS_UPDATING:return un(un({},e),{},{data:un(un({},e.data),{},Te()({},a,un(un({},e.data[a]),{},{isUpdating:s})))});default:return e}};Object(N.registerStore)("wc/admin/reviews",{reducer:sn,actions:v,controls:tn,selectors:O,resolvers:E});var pn,fn,ln="wc/admin/reviews";function dn(e){return[e]}function gn(){var e={clear:function(){e.head=null}};return e}function On(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}pn={},fn="undefined"!=typeof WeakMap;var vn=function(e,t){var r,n;function o(){r=fn?new WeakMap:gn()}function a(){var r,o,a,c,i,u=arguments.length;for(c=new Array(u),a=0;a<u;a++)c[a]=arguments[a];for(i=t.apply(null,c),(r=n(i)).isUniqueByDependants||(r.lastDependants&&!On(i,r.lastDependants,0)&&r.clear(),r.lastDependants=i),o=r.head;o;){if(On(o.args,c,1))return o!==r.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=r.head,o.prev=null,r.head.prev=o,r.head=o),o.val;o=o.next}return o={val:e.apply(null,c)},c[0]=null,o.args=c,r.head&&(r.head.prev=o,o.next=r.head),r.head=o,o.val}return t||(t=dn),n=fn?function(e){var t,n,o,a,c,i=r,u=!0;for(t=0;t<e.length;t++){if(n=e[t],!(c=n)||"object"!=typeof c){u=!1;break}i.has(n)?i=i.get(n):(o=new WeakMap,i.set(n,o),i=o)}return i.has(pn)||((a=gn()).isUniqueByDependants=u,i.set(pn,a)),i.get(pn)}:function(){return r},a.getDependants=t,a.clear=o,o(),a}((function(e,t){return(e.noteQueries[JSON.stringify(t)]||[]).map((function(t){return e.notes[t]}))}),(function(e,t){return[e.noteQueries[JSON.stringify(t)],e.notes]})),En=function(e,t){return e.errors[t]||!1},mn=function(e,t){return e.requesting[t]||!1},bn={SET_ERROR:"SET_ERROR",SET_NOTE:"SET_NOTE",SET_NOTE_IS_UPDATING:"SET_NOTE_IS_UPDATING",SET_NOTES:"SET_NOTES",SET_NOTES_QUERY:"SET_NOTES_QUERY",SET_IS_REQUESTING:"SET_IS_REQUESTING"};function hn(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 Sn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var yn=Z.a.mark(jn),Tn=Z.a.mark(In),_n=Z.a.mark(Pn),Rn=Z.a.mark(xn),wn=Z.a.mark(An);function jn(e,t){var r,n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Fn("triggerNoteAction",!0);case 2:return r="".concat(te,"/admin/notes/").concat(e,"/action/").concat(t),o.prev=3,o.next=6,Object(C.apiFetch)({path:r,method:"POST"});case 6:return n=o.sent,o.next=9,An(e,n);case 9:return o.next=11,Fn("triggerNoteAction",!1);case 11:o.next=20;break;case 13:return o.prev=13,o.t0=o.catch(3),o.next=17,Cn("triggerNoteAction",o.t0);case 17:return o.next=19,Fn("triggerNoteAction",!1);case 19:throw new Error;case 20:case"end":return o.stop()}}),yn,null,[[3,13]])}function In(e){var t,r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Fn("removeNote",!0);case 2:return n.next=4,Dn(e,!0);case 4:return n.prev=4,t="".concat(te,"/admin/notes/delete/").concat(e),n.next=8,Object(C.apiFetch)({path:t,method:"DELETE"});case 8:return r=n.sent,n.next=11,kn(e,r);case 11:return n.next=13,Fn("removeNote",!1);case 13:return n.abrupt("return",r);case 16:return n.prev=16,n.t0=n.catch(4),n.next=20,Cn("removeNote",n.t0);case 20:return n.next=22,Fn("removeNote",!1);case 22:return n.next=24,Dn(e,!1);case 24:throw new Error;case 25:case"end":return n.stop()}}),Tn,null,[[4,16]])}function Pn(){var e,t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Fn("removeAllNotes",!0);case 2:return r.prev=2,e="".concat(te,"/admin/notes/delete/all"),r.next=6,Object(C.apiFetch)({path:e,method:"DELETE"});case 6:return t=r.sent,r.next=9,Un(t);case 9:return r.next=11,Fn("removeAllNotes",!1);case 11:return r.abrupt("return",t);case 14:return r.prev=14,r.t0=r.catch(2),r.next=18,Cn("removeAllNotes",r.t0);case 18:return r.next=20,Fn("removeAllNotes",!1);case 20:throw new Error;case 21:case"end":return r.stop()}}),_n,null,[[2,14]])}function xn(e,t){var r,n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Fn("batchUpdateNotes",!0);case 2:return o.prev=2,r="".concat(te,"/admin/notes/update"),o.next=6,Object(C.apiFetch)({path:r,method:"PUT",data:Sn({noteIds:e},t)});case 6:return n=o.sent,o.next=9,Un(n);case 9:return o.next=11,Fn("batchUpdateNotes",!1);case 11:o.next=20;break;case 13:return o.prev=13,o.t0=o.catch(2),o.next=17,Cn("updateNote",o.t0);case 17:return o.next=19,Fn("batchUpdateNotes",!1);case 19:throw new Error;case 20:case"end":return o.stop()}}),Rn,null,[[2,13]])}function An(e,t){var r,n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Fn("updateNote",!0);case 2:return o.next=4,Dn(e,!0);case 4:return o.prev=4,r="".concat(te,"/admin/notes/").concat(e),o.next=8,Object(C.apiFetch)({path:r,method:"PUT",data:t});case 8:return n=o.sent,o.next=11,kn(e,n);case 11:return o.next=13,Fn("updateNote",!1);case 13:return o.next=15,Dn(e,!1);case 15:o.next=26;break;case 17:return o.prev=17,o.t0=o.catch(4),o.next=21,Cn("updateNote",o.t0);case 21:return o.next=23,Fn("updateNote",!1);case 23:return o.next=25,Dn(e,!1);case 25:throw new Error;case 26:case"end":return o.stop()}}),wn,null,[[4,17]])}function kn(e,t){return{type:bn.SET_NOTE,noteId:e,noteFields:t}}function Dn(e,t){return{type:bn.SET_NOTE_IS_UPDATING,noteId:e,isUpdating:t}}function Un(e){return{type:bn.SET_NOTES,notes:e}}function Nn(e,t){return{type:bn.SET_NOTES_QUERY,query:e,noteIds:t}}function Cn(e,t){return{type:bn.SET_ERROR,error:t,selector:e}}function Fn(e,t){return{type:bn.SET_IS_REQUESTING,selector:e,isRequesting:t}}var Mn=Z.a.mark(qn);function qn(){var e,t,r,n=arguments;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t=Object(Et.addQueryArgs)("".concat(te,"/admin/notes"),e),o.prev=2,o.next=5,Object(C.apiFetch)({path:t});case 5:return r=o.sent,o.next=8,Un(r);case 8:return o.next=10,Nn(e,r.map((function(e){return e.id})));case 10:o.next=16;break;case 12:return o.prev=12,o.t0=o.catch(2),o.next=16,Cn("getNotes",o.t0);case 16:case"end":return o.stop()}}),Mn,null,[[2,12]])}function Gn(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 Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Vn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errors:{},noteQueries:{},notes:{},requesting:{}},t=arguments.length>1?arguments[1]:void 0,r=t.error,n=t.isRequesting,o=t.isUpdating,a=t.noteFields,c=t.noteId,i=t.noteIds,u=t.notes,s=t.query,p=t.selector,f=t.type;switch(f){case bn.SET_NOTES:e=Ln(Ln({},e),{},{notes:Ln(Ln({},e.notes),u.reduce((function(e,t){return e[t.id]=t,e}),{}))});break;case bn.SET_NOTES_QUERY:e=Ln(Ln({},e),{},{noteQueries:Ln(Ln({},e.noteQueries),{},Te()({},JSON.stringify(s),i))});break;case bn.SET_ERROR:e=Ln(Ln({},e),{},{errors:Ln(Ln({},e.errors),{},Te()({},p,r))});break;case bn.SET_NOTE:e=Ln(Ln({},e),{},{notes:Ln(Ln({},e.notes),{},Te()({},c,a))});break;case bn.SET_NOTE_IS_UPDATING:e=Ln(Ln({},e),{},{notes:Ln(Ln({},e.notes),{},Te()({},c,Ln(Ln({},e.notes[c]),{},{isUpdating:o})))});break;case bn.SET_IS_REQUESTING:e=Ln(Ln({},e),{},{requesting:Ln(Ln({},e.requesting),{},Te()({},p,n))})}return e};Object(N.registerStore)("wc/admin/notes",{reducer:Vn,actions:b,controls:C.controls,selectors:m,resolvers:h});var Qn="wc/admin/notes",Jn={},Wn=function(e,t,r){var n=G(t,r);return e.itemErrors[n]||!1},Hn=function(e,t,r){var n=G(t,r);return e.items[n]||Jn},Bn=function(e,t,r){var n=G(t,r);return e.stats[n]||Jn},Kn=function(e,t,r){var n=G(t,r);return e.statErrors[n]||!1},Yn={SET_ITEM_ERROR:"SET_ITEM_ERROR",SET_STAT_ERROR:"SET_STAT_ERROR",SET_REPORT_ITEMS:"SET_REPORT_ITEMS",SET_REPORT_STATS:"SET_REPORT_STATS"};function Xn(e,t,r){var n=G(e,t);return{type:Yn.SET_ITEM_ERROR,resourceName:n,error:r}}function zn(e,t,r){var n=G(e,t);return{type:Yn.SET_REPORT_ITEMS,resourceName:n,items:r}}function Zn(e,t,r){var n=G(e,t);return{type:Yn.SET_REPORT_STATS,resourceName:n,stats:r}}function $n(e,t,r){var n=G(e,t);return{type:Yn.SET_STAT_ERROR,resourceName:n,error:r}}var eo=Z.a.mark(ro),to=Z.a.mark(no);function ro(e,t){var r,n,o,a,c;return Z.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r={parse:!1,path:Object(Et.addQueryArgs)("".concat(te,"/reports/").concat(e),t)},i.prev=1,i.next=4,en(r);case 4:return n=i.sent,o=n.data,a=parseInt(n.headers.get("x-wp-total"),10),c=parseInt(n.headers.get("x-wp-totalpages"),10),i.next=10,zn(e,t,{data:o,totalResults:a,totalPages:c});case 10:i.next=16;break;case 12:return i.prev=12,i.t0=i.catch(1),i.next=16,Xn(e,t,i.t0);case 16:case"end":return i.stop()}}),eo,null,[[1,12]])}function no(e,t){var r,n,o,a,c;return Z.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r={parse:!1,path:Object(Et.addQueryArgs)("".concat(te,"/reports/").concat(e,"/stats"),t)},i.prev=1,i.next=4,en(r);case 4:return n=i.sent,o=n.data,a=parseInt(n.headers.get("x-wp-total"),10),c=parseInt(n.headers.get("x-wp-totalpages"),10),i.next=10,Zn(e,t,{data:o,totalResults:a,totalPages:c});case 10:i.next=16;break;case 12:return i.prev=12,i.t0=i.catch(1),i.next=16,$n(e,t,i.t0);case 16:case"end":return i.stop()}}),to,null,[[1,12]])}function oo(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 ao(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var co=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{itemErrors:{},items:{},statErrors:{},stats:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.items,o=t.stats,a=t.error,c=t.resourceName;switch(r){case Yn.SET_REPORT_ITEMS:return ao(ao({},e),{},{items:ao(ao({},e.items),{},Te()({},c,n))});case Yn.SET_REPORT_STATS:return ao(ao({},e),{},{stats:ao(ao({},e.stats),{},Te()({},c,o))});case Yn.SET_ITEM_ERROR:return ao(ao({},e),{},{itemErrors:ao(ao({},e.itemErrors),{},Te()({},c,a))});case Yn.SET_STAT_ERROR:return ao(ao({},e),{},{statErrors:ao(ao({},e.statErrors),{},Te()({},c,a))});default:return e}};Object(N.registerStore)("wc/admin/reports",{reducer:co,actions:y,controls:tn,selectors:S,resolvers:T});var io="wc/admin/reports",uo=r(34),so=r.n(uo),po=r(29);function fo(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 lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fo(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function go(e){var t=e.per_page,r=e.persisted_query,n=e.query,o=e.select,a=e.filterQuery,c=o("wc/admin/items"),i=c.getItems,u=c.getItemsError,s=c.isResolving,p={isRequesting:!1,isError:!1,rows:[]},f=Object(po.getCurrentDates)(n,e.defaultDateRange),l=lo(lo({},a),{},{after:Object(po.appendTimestamp)(f.primary.after,"start"),before:Object(po.appendTimestamp)(f.primary.before,"end"),per_page:t,persisted_query:JSON.stringify(r)}),d=i("leaderboards",l);if(s("getItems",["leaderboards",l]))return lo(lo({},p),{},{isRequesting:!0});if(u("leaderboards",l))return lo(lo({},p),{},{isError:!0});var g=d.get(e.id);return lo(lo({},p),{},{rows:null==g?void 0:g.rows})}function Oo(e,t,r){var n=e("wc/admin/items"),o=n.getItems,a=n.getItemsError,c=n.isResolving,i={},u=!1,s=!1;return r.forEach((function(e){var r={search:e,per_page:10};o(t,r).forEach((function(e,t){i[t]=e})),c("getItems",[t,r])&&(u=!0),a(t,r)&&(s=!0)})),{items:i,isRequesting:u,isError:s}}function vo(e,t){t._fields,t.page,t.per_page;return G("total-"+e,so()(t,["_fields","page","per_page"]))}var Eo=function(e,t,r){var n=G(t,r);return(e.items[n]&&e.items[n].data||[]).reduce((function(r,n){return r.set(n,e.data[t][n]),r}),new Map)},mo=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=vo(t,r),a=e.items.hasOwnProperty(o)?e.items[o]:n;return a},bo=function(e,t,r){var n=G(t,r);return e.errors[n]},ho={SET_ITEM:"SET_ITEM",SET_ITEMS:"SET_ITEMS",SET_ITEMS_TOTAL_COUNT:"SET_ITEMS_TOTAL_COUNT",SET_ERROR:"SET_ERROR"},So=Z.a.mark(Po),yo=Z.a.mark(xo);function To(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 _o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?To(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):To(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ro(e,t,r){return{type:ho.SET_ITEM,id:t,item:r,itemType:e}}function wo(e,t,r,n){return{type:ho.SET_ITEMS,items:r,itemType:e,query:t,totalCount:n}}function jo(e,t,r){return{type:ho.SET_ITEMS_TOTAL_COUNT,itemType:e,query:t,totalCount:r}}function Io(e,t,r){return{type:ho.SET_ERROR,itemType:e,query:t,error:r}}function Po(e,t){var r,n,o,a,c;return Z.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=_o(_o({},e),{},{stock_quantity:t}),n=r.id,o=r.parent_id,a=r.type,i.next=4,Ro("products",n,r);case 4:c=te,i.t0=a,i.next="variation"===i.t0?8:("variable"===i.t0||i.t0,10);break;case 8:return c+="/products/".concat(o,"/variations/").concat(n),i.abrupt("break",11);case 10:c+="/products/".concat(n);case 11:return i.prev=11,i.next=14,Object(C.apiFetch)({path:c,method:"PUT",data:r});case 14:return i.abrupt("return",!0);case 17:return i.prev=17,i.t1=i.catch(11),i.next=21,Ro("products",n,e);case 21:return i.next=23,Io("products",n,i.t1);case 23:return i.abrupt("return",!1);case 24:case"end":return i.stop()}}),So,null,[[11,17]])}function xo(e,t){var r,n;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,r=Object(Et.addQueryArgs)("".concat(re,"/onboarding/tasks/create_product_from_template"),t||{}),o.next=4,Object(C.apiFetch)({path:r,method:"POST",data:e});case 4:return n=o.sent,o.next=7,Ro("products",n.id,n);case 7:return o.abrupt("return",n);case 10:return o.prev=10,o.t0=o.catch(0),o.next=14,Io("createProductFromTemplate",t,o.t0);case 14:throw o.t0;case 15:case"end":return o.stop()}}),yo,null,[[0,10]])}function Ao(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 ko(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Do=Z.a.mark(Fo),Uo=Z.a.mark(Mo),No=Z.a.mark(qo),Co=Z.a.mark(Go);function Fo(e,t){var r,n,o,a,c,i;return Z.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return r="categories"===e?"products/categories":e,n=Object(Et.addQueryArgs)("".concat(te,"/").concat(r),t),o=-1===t.per_page,a=o?C.apiFetch:en,u.next=6,a({path:n,method:"GET"});case 6:if(c=u.sent,!o){u.next=9;break}return u.abrupt("return",{items:c,totalCount:c.length});case 9:return i=parseInt(c.headers.get("x-wp-total"),10),u.abrupt("return",{items:c.data,totalCount:i});case 11:case"end":return u.stop()}}),Do)}function Mo(e,t){var r,n,o;return Z.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Fo(e,t);case 3:return r=a.sent,n=r.items,o=r.totalCount,a.next=8,jo(e,t,o);case 8:return a.next=10,wo(e,t,n);case 10:a.next=16;break;case 12:return a.prev=12,a.t0=a.catch(0),a.next=16,Io(e,t,a.t0);case 16:case"end":return a.stop()}}),Uo,null,[[0,12]])}function qo(e,t){return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Go(e,t);case 2:case"end":return r.stop()}}),No)}function Go(e,t){var r,n,o;return Z.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,r=ko(ko({},t),{},{page:1,per_page:1}),a.next=4,Fo(e,r);case 4:return n=a.sent,o=n.totalCount,a.next=8,jo(e,t,o);case 8:a.next=14;break;case 10:return a.prev=10,a.t0=a.catch(0),a.next=14,Io(e,t,a.t0);case 14:case"end":return a.stop()}}),Co,null,[[0,10]])}function Lo(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 Vo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lo(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{items:{},errors:{},data:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.id,o=t.itemType,a=t.query,c=t.item,i=t.items,u=t.totalCount,s=t.error;switch(r){case ho.SET_ITEM:var p=e.data[o]||{};return Vo(Vo({},e),{},{data:Vo(Vo({},e.data),{},Te()({},o,Vo(Vo({},p),{},Te()({},n,Vo(Vo({},p[n]||{}),c)))))});case ho.SET_ITEMS:var f=[],l=i.reduce((function(e,t){return f.push(t.id),e[t.id]=t,e}),{}),d=G(o,a);return Vo(Vo({},e),{},{items:Vo(Vo({},e.items),{},Te()({},d,{data:f})),data:Vo(Vo({},e.data),{},Te()({},o,Vo(Vo({},e.data[o]),l)))});case ho.SET_ITEMS_TOTAL_COUNT:var g=vo(o,a);return Vo(Vo({},e),{},{items:Vo(Vo({},e.items),{},Te()({},g,u))});case ho.SET_ERROR:return Vo(Vo({},e),{},{errors:Vo(Vo({},e.errors),{},Te()({},G(o,a),s))});default:return e}};Object(N.registerStore)("wc/admin/items",{reducer:Qo,actions:R,controls:tn,selectors:_,resolvers:w});var Jo="wc/admin/items",Wo=r(43),Ho=function(e){return Object(Wo.applyFilters)("woocommerce_navigation_menu_items",e.menuItems)},Bo=function(e){return e.activeItem||null},Ko=function(e){return e.favorites||[]},Yo=function(e,t){return e.requesting[t]||!1},Xo={ADD_MENU_ITEMS:"ADD_MENU_ITEMS",SET_MENU_ITEMS:"SET_MENU_ITEMS",SET_ACTIVE_ITEM:"SET_ACTIVE_ITEM",ADD_FAVORITE_FAILURE:"ADD_FAVORITE_FAILURE",ADD_FAVORITE_REQUEST:"ADD_FAVORITE_REQUEST",ADD_FAVORITE_SUCCESS:"ADD_FAVORITE_SUCCESS",GET_FAVORITES_FAILURE:"GET_FAVORITES_FAILURE",GET_FAVORITES_REQUEST:"GET_FAVORITES_REQUEST",GET_FAVORITES_SUCCESS:"GET_FAVORITES_SUCCESS",REMOVE_FAVORITE_FAILURE:"REMOVE_FAVORITE_FAILURE",REMOVE_FAVORITE_REQUEST:"REMOVE_FAVORITE_REQUEST",REMOVE_FAVORITE_SUCCESS:"REMOVE_FAVORITE_SUCCESS"},zo=Z.a.mark(fa),Zo=Z.a.mark(la);function $o(e){return{type:Xo.SET_ACTIVE_ITEM,activeItem:e}}function ea(e){return{type:Xo.SET_MENU_ITEMS,menuItems:e}}function ta(e){return{type:Xo.ADD_MENU_ITEMS,menuItems:e}}function ra(e){return{type:Xo.GET_FAVORITES_FAILURE,error:e}}function na(e){return{type:Xo.GET_FAVORITES_REQUEST,favorites:e}}function oa(e){return{type:Xo.GET_FAVORITES_SUCCESS,favorites:e}}function aa(e){return{type:Xo.ADD_FAVORITE_REQUEST,favorite:e}}function ca(e,t){return{type:Xo.ADD_FAVORITE_FAILURE,favorite:e,error:t}}function ia(e){return{type:Xo.ADD_FAVORITE_SUCCESS,favorite:e}}function ua(e){return{type:Xo.REMOVE_FAVORITE_REQUEST,favorite:e}}function sa(e,t){return{type:Xo.REMOVE_FAVORITE_FAILURE,favorite:e,error:t}}function pa(e,t){return{type:Xo.REMOVE_FAVORITE_SUCCESS,favorite:e,error:t}}function fa(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,aa(e);case 2:return r.prev=2,r.next=5,kt()({path:"".concat(re,"/navigation/favorites/me"),method:"POST",data:{item_id:e}});case 5:if(!(t=r.sent)){r.next=10;break}return r.next=9,ia(e);case 9:return r.abrupt("return",t);case 10:throw new Error;case 13:return r.prev=13,r.t0=r.catch(2),r.next=17,ca(e,r.t0);case 17:throw new Error;case 18:case"end":return r.stop()}}),zo,null,[[2,13]])}function la(e){var t;return Z.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ua(e);case 2:return r.prev=2,r.next=5,kt()({path:"".concat(re,"/navigation/favorites/me"),method:"DELETE",data:{item_id:e}});case 5:if(!(t=r.sent)){r.next=10;break}return r.next=9,pa(e);case 9:return r.abrupt("return",t);case 10:throw new Error;case 13:return r.prev=13,r.t0=r.catch(2),r.next=17,sa(e,r.t0);case 17:throw new Error;case 18:case"end":return r.stop()}}),Zo,null,[[2,13]])}function da(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 ga(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?da(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):da(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{activeItem:null,error:null,menuItems:[],favorites:[],requesting:{}},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.activeItem,o=t.error,a=t.favorite,c=t.favorites,i=t.menuItems;switch(r){case Xo.SET_ACTIVE_ITEM:e=ga(ga({},e),{},{activeItem:n});break;case Xo.SET_MENU_ITEMS:e=ga(ga({},e),{},{menuItems:i});break;case Xo.ADD_MENU_ITEMS:e=ga(ga({},e),{},{menuItems:[].concat(q()(e.menuItems),q()(i))});break;case Xo.GET_FAVORITES_FAILURE:e=ga(ga({},e),{},{requesting:ga(ga({},e.requesting),{},{getFavorites:!1})});break;case Xo.GET_FAVORITES_REQUEST:e=ga(ga({},e),{},{requesting:ga(ga({},e.requesting),{},{getFavorites:!0})});break;case Xo.GET_FAVORITES_SUCCESS:e=ga(ga({},e),{},{favorites:c,requesting:ga(ga({},e.requesting),{},{getFavorites:!1})});break;case Xo.ADD_FAVORITE_FAILURE:e=ga(ga({},e),{},{error:o,requesting:ga(ga({},e.requesting),{},{addFavorite:!1})});break;case Xo.ADD_FAVORITE_REQUEST:e=ga(ga({},e),{},{requesting:ga(ga({},e.requesting),{},{addFavorite:!0})});break;case Xo.ADD_FAVORITE_SUCCESS:var u=e.favorites.includes(a)?e.favorites:[].concat(q()(e.favorites),[a]);e=ga(ga({},e),{},{favorites:u,menuItems:e.menuItems.map((function(e){return e.id===a?ga(ga({},e),{},{menuId:"favorites"}):e})),requesting:ga(ga({},e.requesting),{},{addFavorite:!1})});break;case Xo.REMOVE_FAVORITE_FAILURE:e=ga(ga({},e),{},{requesting:ga(ga({},e.requesting),{},{error:o,removeFavorite:!1})});break;case Xo.REMOVE_FAVORITE_REQUEST:e=ga(ga({},e),{},{requesting:ga(ga({},e.requesting),{},{removeFavorite:!0})});break;case Xo.REMOVE_FAVORITE_SUCCESS:var s=e.favorites.filter((function(e){return e!==a}));e=ga(ga({},e),{},{favorites:s,menuItems:e.menuItems.map((function(e){return e.id===a?ga(ga({},e),{},{menuId:"plugins"}):e})),requesting:ga(ga({},e.requesting),{},{removeFavorite:!1})})}return e},va=Z.a.mark(Ea);function Ea(){var e;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,na();case 2:return t.prev=2,t.next=5,Object(C.apiFetch)({path:"".concat(re,"/navigation/favorites/me")});case 5:if(!(e=t.sent)){t.next=10;break}return t.next=9,oa(e);case 9:return t.abrupt("return");case 10:throw new Error;case 13:return t.prev=13,t.t0=t.catch(2),t.next=17,ra(t.t0);case 17:throw new Error;case 18:case"end":return t.stop()}}),va,null,[[2,13]])}Object(N.registerStore)("woocommerce-navigation",{reducer:Oa,actions:I,controls:C.controls,resolvers:P,selectors:j});var ma="woocommerce-navigation",ba=function(e){return Object(Ue.createHigherOrderComponent)((function(t){return function(r){var n=Object(De.useRef)(e);return Object(N.useSelect)((function(e,t){if(n.current){var r=e("woocommerce-navigation"),o=r.isResolving,a=r.hasFinishedResolution,c=t.dispatch("woocommerce-navigation"),i=c.startResolution,u=c.finishResolution,s=c.setMenuItems;o("getMenuItems")||a("getMenuItems")||(i("getMenuItems",[]),s(n.current.menuItems),u("getMenuItems",[]))}})),Object(De.createElement)(t,r)}}),"withNavigationHydration")},ha=r(16),Sa=r.n(ha),ya=r(21);function Ta(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 _a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ta(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ta(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ra(e){var t=e.endpoint,r=e.query,n=e.limitBy,o=e.filters,a=void 0===o?[]:o,c=e.advancedFilters,i=void 0===c?{}:c;return r.search?(n||[t]).reduce((function(e,t){return e[t]=r[t],e}),{}):a.map((function(e){return function(e,t,r){var n=r[e.param];if(!n)return{};if("advanced"===n){var o=Object(ya.getActiveFiltersFromQuery)(r,t.filters);if(0===o.length)return{};var a=Object(ya.getQueryFromActiveFilters)(o.map((function(e){return function(e,t){var r=e.filters[t.key];if("Date"!==Object(ee.get)(r,["input","component"]))return t;var n=t.rule,o=t.value,a={after:"start",before:"end"};if(Array.isArray(o)){var c=zr()(o,2),i=c[0],u=c[1];return Object.assign({},t,{value:[Object(po.appendTimestamp)(Sa()(i),a.after),Object(po.appendTimestamp)(Sa()(u),a.before)]})}return Object.assign({},t,{value:Object(po.appendTimestamp)(Sa()(o),a[n])})}(t,e)})),{},t.filters);return _a({match:r.match||"all"},a)}var c=Object(ee.find)(Object(ya.flattenFilters)(e.filters),{value:n});if(!c)return{};if(c.settings&&c.settings.param){var i=c.settings.param;return r[i]?Te()({},i,r[i]):{}}return Te()({},e.param,n)}(e,i,r)})).reduce((function(e,t){return Object.assign(e,t)}),{})}var wa=["stock","customers"];function ja(e){var t=e.endpoint,r=e.dataType,n=e.query,o=e.fields,a=Object(po.getCurrentDates)(n,e.defaultDateRange),c=Object(po.getIntervalForQuery)(n),i=Ra(e),u=a[r].before;return Object(ee.includes)(wa,t)?_a(_a({},i),{},{fields:o}):_a({order:"asc",interval:c,per_page:oe,after:Object(po.appendTimestamp)(a[r].after,"start"),before:Object(po.appendTimestamp)(u,"end"),segmentby:n.segmentby,fields:o},i)}function Ia(e){var t=e.endpoint,r=(0,e.select)("wc/admin/reports"),n=r.getReportStats,o=r.getReportStatsError,a=r.isResolving,c={isRequesting:!1,isError:!1,totals:{primary:null,secondary:null}},i=ja(_a(_a({},e),{},{dataType:"primary"})),u=n(t,i);if(a("getReportStats",[t,i]))return _a(_a({},c),{},{isRequesting:!0});if(o(t,i))return _a(_a({},c),{},{isError:!0});var s=u&&u.data&&u.data.totals||null,p=ja(_a(_a({},e),{},{dataType:"secondary"})),f=n(t,p);if(a("getReportStats",[t,p]))return _a(_a({},c),{},{isRequesting:!0});if(o(t,p))return _a(_a({},c),{},{isError:!0});var l=f&&f.data&&f.data.totals||null;return _a(_a({},c),{},{totals:{primary:s,secondary:l}})}var Pa={isEmpty:!1,isError:!1,isRequesting:!0,data:{totals:{},intervals:[]}},xa={isEmpty:!1,isError:!0,isRequesting:!1,data:{totals:{},intervals:[]}},Aa={isEmpty:!0,isError:!1,isRequesting:!1,data:{totals:{},intervals:[]}},ka=[],Da=Object(ee.memoize)((function(e,t,r){return{isEmpty:!1,isError:!1,isRequesting:!1,data:{totals:t,intervals:r}}}),(function(e,t,r){return[e,t.length,r.length].join(":")}));function Ua(e){var t=e.endpoint,r=(0,e.select)("wc/admin/reports"),n=r.getReportStats,o=r.getReportStatsError,a=r.isResolving,c=ja(e),i=n(t,c);if(a("getReportStats",[t,c]))return Pa;if(o(t,c))return xa;if(function(e,t){return!e||(!e.data||(!(e.data.totals&&!Object(ee.isNull)(e.data.totals))||!(Object(ee.includes)(wa,t)||e.data.intervals&&0!==e.data.intervals.length)))}(i,t))return Aa;var u=i&&i.data&&i.data.totals||null,s=i&&i.data&&i.data.intervals||ka;if(i.totalResults>oe){for(var p=!0,f=!1,l=[],d=Math.ceil(i.totalResults/oe),g=1,O=2;O<=d;O++){var v=_a(_a({},c),{},{page:O}),E=n(t,v);if(!a("getReportStats",[t,v])){if(o(t,v)){f=!0,p=!1;break}if(l.push(E),++g===d){p=!1;break}}}if(p)return Pa;if(f)return xa;Object(ee.forEach)(l,(function(e){e.data&&e.data.intervals&&Array.isArray(e.data.intervals)&&(s=s.concat(e.data.intervals))}))}return Da(G(t,c),u,s)}function Na(e,t){switch(e){case"currency":return t;case"percent":return".0%";case"number":return",";case"average":return",.2r";default:return","}}function Ca(e){var t=e.query,r=e.tableQuery,n=void 0===r?{}:r,o=Ra(e),a=Object(po.getCurrentDates)(t,e.defaultDateRange),c=Object(ee.includes)(wa,e.endpoint);return _a(_a({orderby:t.orderby||"date",order:t.order||"desc",after:c?void 0:Object(po.appendTimestamp)(a.primary.after,"start"),before:c?void 0:Object(po.appendTimestamp)(a.primary.before,"end"),page:t.paged||1,per_page:t.per_page||fe.pageSize},o),n)}function Fa(e){var t=e.endpoint,r=(0,e.select)("wc/admin/reports"),n=r.getReportItems,o=r.getReportItemsError,a=r.isResolving,c=Ca(e),i={query:c,isRequesting:!1,isError:!1,items:{data:[],totalResults:0}},u=n(t,c);return a("getReportItems",[t,c])?_a(_a({},i),{},{isRequesting:!0}):o(t,c)?_a(_a({},i),{},{isError:!0}):_a(_a({},i),{},{items:u})}var Ma=r(123),qa=r.n(Ma),Ga=function(e){return qa()(G("export",e))},La=function(e,t,r){return Boolean(e.requesting[t]&&e.requesting[t][Ga(r)])},Va=function(e,t,r){return e.exportIds[t]&&e.exportIds[t][Ga(r)]},Qa=function(e,t,r){return e.errors[t]&&e.errors[t][Ga(r)]},Ja={START_EXPORT:"START_EXPORT",SET_EXPORT_ID:"SET_EXPORT_ID",SET_ERROR:"SET_ERROR",SET_IS_REQUESTING:"SET_IS_REQUESTING"},Wa=Z.a.mark(Ya);function Ha(e,t,r){return{type:Ja.SET_EXPORT_ID,exportType:e,exportArgs:t,exportId:r}}function Ba(e,t,r){return{type:Ja.SET_IS_REQUESTING,selector:e,selectorArgs:t,isRequesting:r}}function Ka(e,t,r){return{type:Ja.SET_ERROR,selector:e,selectorArgs:t,error:r}}function Ya(e,t){var r,n,o,a;return Z.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Ba("startExport",{type:e,args:t},!0);case 2:return c.prev=2,c.next=5,en({path:"".concat(te,"/reports/").concat(e,"/export"),method:"POST",data:{report_args:t,email:!0}});case 5:return r=c.sent,c.next=8,Ba("startExport",{type:e,args:t},!1);case 8:if(n=r.data,o=n.export_id,a=n.message,!o){c.next=14;break}return c.next=12,Ha(e,t,o);case 12:c.next=15;break;case 14:throw new Error(a);case 15:return c.abrupt("return",r.data);case 18:return c.prev=18,c.t0=c.catch(2),c.next=22,Ka("startExport",{type:e,args:t},c.t0.message);case 22:return c.next=24,Ba("startExport",{type:e,args:t},!1);case 24:throw c.t0;case 25:case"end":return c.stop()}}),Wa,null,[[2,18]])}function Xa(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 za(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Za=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errors:{},requesting:{},exportMeta:{},exportIds:{}},t=arguments.length>1?arguments[1]:void 0,r=t.error,n=t.exportArgs,o=t.exportId,a=t.exportType,c=t.isRequesting,i=t.selector,u=t.selectorArgs,s=t.type;switch(s){case Ja.SET_IS_REQUESTING:return za(za({},e),{},{requesting:za(za({},e.requesting),{},Te()({},i,za(za({},e.requesting[i]),{},Te()({},Ga(u),c))))});case Ja.SET_EXPORT_ID:return za(za({},e),{},{exportMeta:za(za({},e.exportMeta),{},Te()({},o,{exportType:a,exportArgs:n})),exportIds:za(za({},e.exportIds),{},Te()({},a,za(za({},e.exportIds[a]),{},Te()({},Ga({type:a,args:n}),o))))});case Ja.SET_ERROR:return za(za({},e),{},{errors:za(za({},e.errors),{},Te()({},i,za(za({},e.errors[i]),{},Te()({},Ga(u),r))))});default:return e}};Object(N.registerStore)("wc/admin/export",{reducer:Za,actions:A,controls:tn,selectors:x});var $a="wc/admin/export";function ec(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 tc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var rc=function(e){return{activeImport:e.activeImport,lastImportStartTimestamp:e.lastImportStartTimestamp}||{}},nc=function(e){return{period:e.period,skipPrevious:e.skipPrevious}||{}},oc=function(e,t){var r=JSON.stringify(t);return e.importStatus[r]||{}},ac=function(e,t){var r=e.importTotals,n=e.lastImportStartTimestamp;return tc(tc({},r[JSON.stringify(t)]),{},{lastImportStartTimestamp:n})||{}},cc=function(e,t){var r=JSON.stringify(t);return e.errors[r]||!1},ic={SET_IMPORT_DATE:"SET_IMPORT_DATE",SET_IMPORT_ERROR:"SET_IMPORT_ERROR",SET_IMPORT_PERIOD:"SET_IMPORT_PERIOD",SET_IMPORT_STARTED:"SET_IMPORT_STARTED",SET_IMPORT_STATUS:"SET_IMPORT_STATUS",SET_IMPORT_TOTALS:"SET_IMPORT_TOTALS",SET_SKIP_IMPORTED:"SET_SKIP_IMPORTED"},uc=Z.a.mark(Oc);function sc(e){return{type:ic.SET_IMPORT_STARTED,activeImport:e}}function pc(e,t){return t?{type:ic.SET_IMPORT_DATE,date:e}:{type:ic.SET_IMPORT_PERIOD,date:e}}function fc(e){return{type:ic.SET_SKIP_IMPORTED,skipPrevious:e}}function lc(e,t){return{type:ic.SET_IMPORT_STATUS,importStatus:t,query:e}}function dc(e,t){return{type:ic.SET_IMPORT_TOTALS,importTotals:t,query:e}}function gc(e,t){return{type:ic.SET_IMPORT_ERROR,error:t,query:e}}function Oc(e){var t,r,n=arguments;return Z.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=n.length>1&&void 0!==n[1]&&n[1],o.next=3,sc(t);case 3:return o.prev=3,o.next=6,Object(C.apiFetch)({path:e,method:"POST"});case 6:return r=o.sent,o.abrupt("return",r);case 10:return o.prev=10,o.t0=o.catch(3),o.next=14,gc(e,o.t0);case 14:throw o.t0;case 15:case"end":return o.stop()}}),uc,null,[[3,10]])}var vc=Z.a.mark(mc),Ec=Z.a.mark(bc);function mc(e){var t,r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t=Object(Et.addQueryArgs)("".concat(te,"/reports/import/status"),Object(ee.omit)(e,["timestamp"])),n.next=4,Object(C.apiFetch)({path:t});case 4:return r=n.sent,n.next=7,lc(e,r);case 7:n.next=13;break;case 9:return n.prev=9,n.t0=n.catch(0),n.next=13,gc(e,n.t0);case 13:case"end":return n.stop()}}),vc,null,[[0,9]])}function bc(e){var t,r;return Z.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t=Object(Et.addQueryArgs)("".concat(te,"/reports/import/totals"),e),n.next=4,Object(C.apiFetch)({path:t});case 4:return r=n.sent,n.next=7,dc(e,r);case 7:n.next=13;break;case 9:return n.prev=9,n.t0=n.catch(0),n.next=13,gc(e,n.t0);case 13:case"end":return n.stop()}}),Ec,null,[[0,9]])}function hc(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 Sc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hc(Object(r),!0).forEach((function(t){Te()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var yc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{activeImport:!1,importStatus:{},importTotals:{},errors:{},lastImportStartTimestamp:0,period:{date:Sa()().format(Object($.__)("MM/DD/YYYY",'woocommerce')),label:"all"},skipPrevious:!0},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.query,o=t.importStatus,a=t.importTotals,c=t.activeImport,i=t.date,u=t.error,s=t.skipPrevious;switch(r){case ic.SET_IMPORT_STARTED:e=Sc(Sc({},e),{},{activeImport:c,lastImportStartTimestamp:c?Date.now():e.lastImportStartTimestamp});break;case ic.SET_IMPORT_PERIOD:e=Sc(Sc({},e),{},{period:Sc(Sc({},e.period),{},{label:i}),activeImport:!1});break;case ic.SET_IMPORT_DATE:e=Sc(Sc({},e),{},{period:{date:i,label:"custom"},activeImport:!1});break;case ic.SET_SKIP_IMPORTED:e=Sc(Sc({},e),{},{skipPrevious:s,activeImport:!1});break;case ic.SET_IMPORT_STATUS:e=Sc(Sc({},e),{},{importStatus:Sc(Sc({},e.importStatus),{},Te()({},JSON.stringify(n),o)),errors:Sc(Sc({},e.errors),{},Te()({},JSON.stringify(n),!1))});break;case ic.SET_IMPORT_TOTALS:e=Sc(Sc({},e),{},{importTotals:Sc(Sc({},e.importTotals),{},Te()({},JSON.stringify(n),a))});break;case ic.SET_IMPORT_ERROR:e=Sc(Sc({},e),{},{errors:Sc(Sc({},e.errors),{},Te()({},JSON.stringify(n),u))})}return e};Object(N.registerStore)("wc/admin/import",{reducer:yc,actions:D,controls:C.controls,selectors:k,resolvers:U});var Tc="wc/admin/import"},5: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}},57:function(e,t,r){var n=r(37);e.exports=function(e){if(Array.isArray(e))return n(e)}},58:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},59: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.")}},60:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},61:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}}},62: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.")}},68:function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function i(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),c=new T(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return R()}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var i=h(c,r);if(i){if(i===p)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,c),a}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function f(){}function l(){}function d(){}var g={};g[o]=function(){return this};var O=Object.getPrototypeOf,v=O&&O(O(_([])));v&&v!==t&&r.call(v,o)&&(g=v);var E=d.prototype=f.prototype=Object.create(g);function m(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,a){function c(){return new t((function(n,c){!function n(o,a,c,i){var u=s(e[o],e,a);if("throw"!==u.type){var p=u.arg,f=p.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,i)}),(function(e){n("throw",e,c,i)})):t.resolve(f).then((function(e){p.value=e,c(p)}),(function(e){return n("throw",e,c,i)}))}i(u.arg)}(o,a,n,c)}))}return n=n?n.then(c,c):c()}}function h(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,h(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(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 y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:R}}function R(){return{value:void 0,done:!0}}return l.prototype=E.constructor=d,d.constructor=l,l.displayName=i(d,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,i(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},m(b.prototype),b.prototype[a]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var c=new b(u(t,r,n,o),a);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},m(E),i(E,c,"Generator"),E[o]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(y),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return c.type="throw",c.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var i=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(i&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=e,c.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(c)},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),p},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),y(r),p}},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;y(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},8:function(e,t,r){e.exports=r(68)},97:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}}});