WooCommerce Admin - Version 1.0.3

Version Description

2020-03-19 =

  • Fix: Stop calling protected has_satisfied_dependencies() on outdated plugin. #3938
  • Fix: Rename image assets in OBW business details step. #3931
  • Fix: Stop using WP Post store for Action Scheduler. #3936
Download this release

Release Info

Developer psealock
Plugin Icon 128x128 WooCommerce Admin
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

Files changed (1) hide show
  1. dist/app/index.js +1 -1
dist/app/index.js CHANGED
@@ -24,4 +24,4 @@ this.wc=this.wc||{},this.wc.app=function(e){var t={};function n(r){if(t[r])retur
24
  *
25
  * This source code is licensed under the MIT license found in the
26
  * LICENSE file in the root directory of this source tree.
27
- */Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,c=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,f=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.fundamental"):60117,M=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case a:case s:case i:case b:return e;default:switch(e=e&&e.$$typeof){case u:case m:case g:case f:case l:return e;default:return t}}case c:return t}}}function w(e){return y(e)===p}t.typeOf=y,t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=m,t.Fragment=a,t.Lazy=g,t.Memo=f,t.Portal=c,t.Profiler=s,t.StrictMode=i,t.Suspense=b,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===b||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===u||e.$$typeof===m||e.$$typeof===v||e.$$typeof===M||e.$$typeof===O)},t.isAsyncMode=function(e){return w(e)||y(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return y(e)===m},t.isFragment=function(e){return y(e)===a},t.isLazy=function(e){return y(e)===g},t.isMemo=function(e){return y(e)===f},t.isPortal=function(e){return y(e)===c},t.isProfiler=function(e){return y(e)===s},t.isStrictMode=function(e){return y(e)===i},t.isSuspense=function(e){return y(e)===b}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){const r=n(450),o=n(451),c=n(182),a=n(240),i=n(239),s=n(238),{merge:l,checkSanitizeDeprecation:u,escape:d}=n(106),{getDefaults:p,changeDefaults:m,defaults:b}=n(125);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=l({},h.defaults,t||{}),u(t);const c=t.highlight;let a,i,s=0;try{a=r.lex(e,t)}catch(e){return n(e)}i=a.length;const d=function(e){if(e)return t.highlight=c,n(e);let r;try{r=o.parse(a,t)}catch(t){e=t}return t.highlight=c,e?n(e):n(null,r)};if(!c||c.length<3)return d();if(delete t.highlight,!i)return d();for(;s<a.length;s++)!function(e){"code"!==e.type?--i||d():c(e.text,e.lang,(function(t,n){return t?d(t):null==n||n===e.text?--i||d():(e.text=n,e.escaped=!0,void(--i||d()))}))}(a[s])}else try{return t=l({},h.defaults,t||{}),u(t),o.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return l(h.defaults,e),m(h.defaults),h},h.getDefaults=p,h.defaults=b,h.Parser=o,h.parser=o.parse,h.Renderer=c,h.TextRenderer=a,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=i,h.inlineLexer=i.output,h.Slugger=s,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse('[{"component":"AdvancedFilters"},{"component":"AnimationSlider"},{"component":"Calendar"},{"component":"Card"},{"component":"Chart"},{"component":"CompareFilter"},{"component":"Count"},{"component":"Date"},{"component":"DateRangeFilterPicker"},{"component":"DropdownButton"},{"component":"EllipsisMenu"},{"component":"EmptyContent"},{"component":"FilterPicker"},{"component":"Flag"},{"component":"Form"},{"component":"Gravatar"},{"component":"ImageAsset"},{"component":"ImageUpload"},{"component":"Link"},{"component":"List"},{"component":"OrderStatus"},{"component":"Pagination"},{"component":"ProductImage"},{"component":"Rating"},{"component":"ScrollTo"},{"component":"Search"},{"component":"SearchListControl"},{"component":"Section"},{"component":"SegmentedSelection"},{"component":"SelectControl"},{"component":"Spinner"},{"component":"SplitButton"},{"component":"Stepper"},{"component":"Summary"},{"component":"Table"},{"component":"Tag"},{"component":"TextControl"},{"component":"TextControlWithAffixes"},{"component":"ViewMoreList"},{"component":"WebPreview"}]')},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(35)),c=r(n(235)),a=n(29),i=r(a),s=r(n(163)),l=r(n(16)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var f,g,v=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(l(t))}))},t}return s(t,e),t}(v),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(l(t))}))},t}s(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function y(e,t){f={fn:e,transform:t}}function w(e){g=e}var z,_=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},A=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function j(e){z=e}var k,E=function(){return Date.now()};function C(e){k=e}var L,N,S=function(e){return e.current};function q(e){L=e}var T=Object.freeze({get applyAnimatedValues(){return f},injectApplyAnimatedValues:y,get colorNames(){return g},injectColorNames:w,get requestFrame(){return _},get cancelFrame(){return A},injectFrame:function(e,t){_=e,A=t},get interpolation(){return z},injectStringInterpolator:j,get now(){return E},injectNow:function(e){E=e},get defaultElement(){return k},injectDefaultElement:C,get animatedApi(){return S},injectAnimatedApi:function(e){S=e},get createAnimatedStyle(){return L},injectCreateAnimatedStyle:q,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),x=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:L(t.style)}):t,r.update=n,r.attach(),r}return s(t,e),t}(O),B=!1,R=new Set,P=function e(){if(!B)return!1;var t=E(),n=R,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var a=c,i=!1,s=0;s<a.configs.length;s++){for(var l=a.configs[s],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var m=l.animatedValues[p];if(!m.done){var b=l.fromValues[p],h=l.toValues[p],f=m.lastPosition,g=h instanceof v,M=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)m.setValue(h),m.done=!0;else if("string"!=typeof b&&"string"!=typeof h){if(void 0!==l.duration)f=b+l.easing((t-m.startTime)/l.duration)*(h-b),u=t>=m.startTime+l.duration;else if(l.decay)f=b+M/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-f)<.1)&&(h=f);else{d=void 0!==m.lastTime?m.lastTime:t,M=void 0!==m.lastVelocity?m.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),y=0;y<O;++y){f+=1*(M+=1*((-l.tension*(f-h)+-l.friction*M)/l.mass)/1e3)/1e3}var w=!(!l.clamp||0===l.tension)&&(b<h?f>h:f<h),z=Math.abs(M)<=l.precision,A=0===l.tension||Math.abs(h-f)<=l.precision;u=w||z&&A,m.lastVelocity=M,m.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(m.value!==h&&(f=h),m.done=!0):i=!0,m.setValue(f),m.lastPosition=f}else m.setValue(h),m.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),i||(R.delete(a),a.stop(!0))}return R.size?N?N():_(e):B=!1,B};function W(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return W({range:e,output:t,extrapolate:n});if(z&&"string"==typeof e.output[0])return z(e);var r=e,o=r.output,c=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",i=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,a,i,s){var l=s?s(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===i)return l;"clamp"===i&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=c(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,c[t],c[t+1],o[t],o[t+1],s,a,i,r.map)}}var D=function(e){function t(n,r,o,c){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof M&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=W(r,o,c),a}s(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=W(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(M);var H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}s(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new D(this,e,t,n)},t}(v),X=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}s(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new D(this,e,t)},t}(M),V=0,I=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=V++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),n=t.delay,r=void 0===n?0:n,a=t.to,i=c(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},i,{delay:r,to:a}));else if(a){var s={};Object.entries(a).forEach((function(e){var t,n=e[0],c=e[1],a=o({to:(t={},t[n]=c,t),delay:b(r,n)},i),l=s[a.delay]&&s[a.delay].to;s[a.delay]=o({},s[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,a=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var i=t.delay,s=c(t,["delay"]),l=function(t){o===a.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(s.to)||u.fun(s.to);i?setTimeout((function(){r===n.guid&&(d?n.runAsync(s,l):n.diff(s).start(l))}),i):d?n.runAsync(s,l):n.diff(s).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,R.has(t)||R.add(t),B||(B=!0,_(N||P));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,R.has(t)&&R.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),a=this.local,i=Promise.resolve(void 0);if(u.arr(r.to))for(var s=function(e){var t=e,c=o({},r,h(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},l=0;l<r.to.length;l++)s(l);else if(u.fun(r.to)){var d,p=0;i=i.then((function(){return r.to((function(e){var t=o({},r,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,a=n.to,i=void 0===a?{}:a,s=n.config,l=void 0===s?{}:s,d=n.reverse,h=n.attach,f=n.reset,v=n.immediate;if(d){var M=[i,c];c=M[0],i=M[1]}this.merged=o({},c,this.merged,i),this.hasChanged=!1;var O=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],i=e[r]||{},s=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),M=!s&&!h&&!d,y=u.und(c[r])?a:c[r],w=s||h?a:d?a:1,_=b(l,r);O&&(w=O.animations[r].parent);var A,j=i.parent,k=i.interpolation,C=m(O?w.getPayload():w),L=a;M&&(L=z({range:[0,1],output:[a,a]})(1));var N,S=k&&k.getValue(),q=!u.und(j)&&i.animatedValues.some((function(e){return!e.done})),T=!u.equ(L,S),x=!u.equ(L,i.previous),B=!u.equ(_,i.config);if(f||x&&T||B){var R;if(s||d)j=k=i.parent||new H(y);else if(h)j=k=i.parent||new X(y);else if(M){var P=i.interpolation&&i.interpolation.calc(i.parent.value);P=void 0===P||f?y:P,i.parent?(j=i.parent).setValue(0,!1):j=new H(0);var W={output:[P,a]};i.interpolation?(k=i.interpolation,i.interpolation.updateConfig(W)):k=j.interpolate(W)}return C=m(O?w.getPayload():w),A=m(j.getPayload()),f&&!M&&j.setValue(y,!1),t.hasChanged=!0,A.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=q?e.lastVelocity:void 0,e.lastTime=q?e.lastTime:void 0,e.startTime=E(),e.done=!1,e.animatedStyles.clear()})),b(v,r)&&j.setValue(M?w:a,!1),o({},e,((R={})[r]=o({},i,{name:r,parent:j,interpolation:k,animatedValues:A,toValues:C,previous:L,config:_,fromValues:m(j.getValue()),immediate:b(v,r),initialVelocity:p(_.velocity,0),clamp:p(_.clamp,!1),precision:p(_.precision,.01),tension:p(_.tension,170),friction:p(_.friction,26),mass:p(_.mass,1),duration:_.duration,easing:p(_.easing,(function(e){return e})),decay:_.decay}),R))}return T?e:(M&&(j.setValue(1,!1),k.updateConfig({output:[L,L]})),j.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:L}),N)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),F=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=u.fun(t),c=a.useMemo((function(){var n;return(r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new I,a=o?b(t,r,c):t[r];return 0===r&&(n=a.ref),c.update(a),n||c.start(),c})),n])}),[e]),i=c[0],s=c[1];r.current=i;a.useImperativeHandle(s,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var l=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?b(e,n,t):e[n]),s||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||l(t):s||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},U=0,G=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},Q=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,a=c(e,["items","keys"]);return t=m(void 0!==t?t:null),o({items:t,keys:G(t,r)},a)};function K(e,t){var n=function(){if(o){if(c>=r.length)return"break";a=r[c++]}else{if((c=r.next()).done)return"break";a=c.value}var n=a.key,i=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=f.transform(t)),n.payload=t,n}return s(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+",Y=Z+"%";function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var te=new RegExp("rgb"+ee(Z,Z,Z)),ne=new RegExp("rgba"+ee(Z,Z,Z,Z)),re=new RegExp("hsl"+ee(Z,Y,Y)),oe=new RegExp("hsla"+ee(Z,Y,Y,Z)),ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,se=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),a=le(o,r,e),i=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*a)<<16|Math.round(255*i)<<8}function de(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function pe(e){return(parseFloat(e)%360+360)%360/360}function me(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function be(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function he(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=te.exec(t))?(de(n[1])<<24|de(n[2])<<16|de(n[3])<<8|255)>>>0:(n=ne.exec(t))?(de(n[1])<<24|de(n[2])<<16|de(n[3])<<8|me(n[4]))>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=se.exec(t))?parseInt(n[1],16)>>>0:(n=ae.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=re.exec(t))?(255|ue(pe(n[1]),be(n[2]),be(n[3])))>>>0:(n=oe.exec(t))?(ue(pe(n[1]),be(n[2]),be(n[3]))|me(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var fe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=new RegExp("("+Object.keys(J).join("|")+")","g"),Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oe=["Webkit","Ms","Moz","O"];function ye(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Me.hasOwnProperty(e)&&Me[e]?(""+t).trim():t+"px"}Me=Object.keys(Me).reduce((function(e,t){return Oe.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Me);var we={};q((function(e){return new $(e)})),C("div"),j((function(e){var t=e.output.map((function(e){return e.replace(ge,he)})).map((function(e){return e.replace(ve,he)})),n=t[0].match(fe).map((function(){return[]}));t.forEach((function(e){e.match(fe).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(fe).map((function(t,r){return W(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(fe,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),y((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,i=c(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ye(l,n[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in i){var m=s?p:we[p]||(we[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,i[p])}}),(function(e){return e}));var ze,_e,Ae=(ze=function(e){return a.forwardRef((function(t,n){var r=d(),s=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),m=a.useCallback((function(e){var t=l.current;l.current=new x(e,(function(){var e=!1;p.current&&(e=f.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){s.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return S(p,s,r)})),m(t);var b,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,c(h,["scrollTop","scrollLeft"])),v=(b=e,!u.fun(b)||b.prototype instanceof i.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return i.createElement(e,o({},g,{ref:v}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ze(n),e}),ze)}),je=Ae(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ae,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=P,t.animated=je,t.a=je,t.interpolate=function(e,t,n){return e&&new D(e,t,n)},t.Globals=T,t.useSpring=function(e){var t=u.fun(e),n=F(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=u.fun(t),c=b(t),i=a.useRef(),s=F(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},c,{config:b(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),l=s[0],d=s[1],p=s[2],m=a.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=i.current[r];return o({},e,{config:b(e.config||c.config,t),attach:a&&function(){return a}})}))}}),[e,c.reverse]);return a.useEffect((function(){n.current&&!r&&m(t)})),a.useEffect((function(){n.current=!0}),[]),r?[l,m,p]:l},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),i=Q(r),s=i.lazy,l=void 0!==s&&s,u=(i.unique,i.reset),p=void 0!==u&&u,m=(i.enter,i.leave,i.update,i.onDestroyed),h=(i.keys,i.items,i.onFrame),f=i.onRest,g=i.onStart,v=i.ref,M=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),y=a.useRef(!1),w=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!y.current&&new Map,forceUpdate:O});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,a=c(e,["first","prevProps"]),i=Q(t),s=i.items,l=i.keys,u=i.initial,d=i.from,p=i.enter,m=i.leave,h=i.update,f=i.trail,g=void 0===f?0:f,v=i.unique,M=i.config,O=i.order,y=void 0===O?["enter","leave","update"]:O,w=Q(r),z=w.keys,_=w.items,A=o({},a.current),j=[].concat(a.deleted),k=Object.keys(A),E=new Set(k),C=new Set(l),L=l.filter((function(e){return!E.has(e)})),N=a.transitions.filter((function(e){return!e.destroyed&&!C.has(e.originalKey)})).map((function(e){return e.originalKey})),S=l.filter((function(e){return E.has(e)})),q=-g;for(;y.length;){switch(y.shift()){case"enter":L.forEach((function(e,t){v&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var r=l.indexOf(e),o=s[r],c=n&&void 0!==u?"initial":"enter";A[e]={slot:c,originalKey:e,key:v?String(e):U++,item:o,trail:q+=g,config:b(M,o,c),from:b(n&&void 0!==u?u||{}:d,o),to:b(p,o)}}));break;case"leave":N.forEach((function(e){var t=z.indexOf(e),n=_[t];j.unshift(o({},A[e],{slot:"leave",destroyed:!0,left:z[Math.max(0,t-1)],right:z[Math.min(z.length,t+1)],trail:q+=g,config:b(M,n,"leave"),to:b(m,n)})),delete A[e]}));break;case"update":S.forEach((function(e){var t=l.indexOf(e),n=s[t];A[e]=o({},A[e],{item:n,slot:"update",trail:q+=g,config:b(M,n,"update"),to:b(h,n)})}))}}var T=l.map((function(e){return A[e]}));return j.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=T.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),T=[].concat(T.slice(0,t),[r],T.slice(t))})),o({},a,{changed:L.length||N.length||S.length,first:n&&0===L.length,transitions:T,current:A,deleted:j,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,a=e.trail,i=e.key,s=e.item;w.current.instances.has(i)||w.current.instances.set(i,new I);var u=w.current.instances.get(i),d=o({},M,{to:r,from:n,config:c,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||l||K(w,i),m&&m(s)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||l)&&w.current.deleted.length>0&&K(w),f&&f(s,t,n))},onStart:g&&function(){return g(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),w.current.paused||u.start()})),a.useEffect((function(){return w.current.mounted=y.current=!0,function(){w.current.mounted=y.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var a=c.controllers;if(a.length){var i=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=F},function(e,t,n){var r=n(506);e.exports=m,e.exports.parse=c,e.exports.compile=function(e,t){return i(c(e,t),t)},e.exports.tokensToFunction=i,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function c(e,t){for(var n,r=[],c=0,a=0,i="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],m=n.index;if(i+=e.slice(a,m),a=m+d.length,p)i+=p[1];else{var b=e[a],h=n[2],f=n[3],g=n[4],v=n[5],M=n[6],O=n[7];i&&(r.push(i),i="");var y=null!=h&&null!=b&&b!==h,w="+"===M||"*"===M,z="?"===M||"*"===M,_=n[2]||u,A=g||v;r.push({name:f||c++,prefix:h||"",delimiter:_,optional:z,repeat:w,partial:y,asterisk:!!O,pattern:A?l(A):O?".*":"[^"+s(_)+"]+?"})}}return a<e.length&&(i+=e.substr(a)),i&&r.push(i),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function i(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",d(t)));return function(t,o){for(var c="",i=t||{},s=(o||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var d,p=i[u.name];if(null==p){if(u.optional){u.partial&&(c+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var m=0;m<p.length;m++){if(d=s(p[m]),!n[l].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");c+=(0===m?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[l].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');c+=u.prefix+d}}else c+=u}return c}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,c=!1!==n.end,a="",i=0;i<e.length;i++){var l=e[i];if("string"==typeof l)a+=s(l);else{var p=s(l.prefix),m="(?:"+l.pattern+")";t.push(l),l.repeat&&(m+="(?:"+p+m+")*"),a+=m=l.optional?l.partial?p+"("+m+")?":"(?:"+p+"("+m+"))?":p+"("+m+")"}}var b=s(n.delimiter||"/"),h=a.slice(-b.length)===b;return o||(a=(h?a.slice(0,-b.length):a)+"(?:"+b+"(?=$))?"),a+=c?"$":o&&h?"":"(?="+b+"|$)",u(new RegExp("^"+a,d(n)),t)}function m(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(m(e[o],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return p(c(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";(function(e,r){var o,c=n(368);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=Object(c.a)(o);t.a=a}).call(this,n(57),n(507)(e))},,,function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(3),i=n(39),s=n(15),l=n(14),u=n(17),d=n(18),p=n(5),m=n(19),b=n(52);var h=function(e){function t(){var e;return Object(s.a)(this,t),(e=Object(u.a)(this,Object(d.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(p.a)(e)),e.bindContainer=e.bindContainer.bind(Object(p.a)(e)),e.getFocusableContext=e.getFocusableContext.bind(Object(p.a)(e)),e.getFocusableIndex=e.getFocusableIndex.bind(Object(p.a)(e)),e}return Object(m.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}},{key:"componentWillUnmount",value:function(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}},{key:"bindContainer",value:function(e){var t=this.props.forwardedRef;this.container=e,Object(a.isFunction)(t)?t(e):t&&"current"in t&&(t.current=e)}},{key:"getFocusableContext",value:function(e){var t=(this.props.onlyBrowserTabstops?b.a.tabbable:b.a.focusable).find(this.container),n=this.getFocusableIndex(t,e);return n>-1&&e?{index:n,target:e,focusables:t}:null}},{key:"getFocusableIndex",value:function(e,t){var n=e.indexOf(t);if(-1!==n)return n}},{key:"onKeyDown",value:function(e){this.props.onKeyDown&&this.props.onKeyDown(e);var t=this.getFocusableContext,n=this.props,r=n.cycle,o=void 0===r||r,c=n.eventToOffset,i=n.onNavigate,s=void 0===i?a.noop:i,l=n.stopNavigationEvents,u=c(e);if(void 0!==u&&l&&(e.stopImmediatePropagation(),"menuitem"===e.target.getAttribute("role")&&e.preventDefault()),u){var d=t(document.activeElement);if(d){var p=d.index,m=d.focusables,b=o?function(e,t,n){var r=e+n;return r<0?t+r:r>=t?r-t:r}(p,m.length,u):p+u;b>=0&&b<m.length&&(m[b].focus(),s(b,m[b]))}}}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({ref:this.bindContainer},Object(a.omit)(n,["stopNavigationEvents","eventToOffset","onNavigate","cycle","onlyBrowserTabstops","forwardedRef"])),t)}}]),t}(c.Component),f=function(e,t){return Object(c.createElement)(h,Object(r.a)({},e,{forwardedRef:t}))};f.displayName="NavigableContainer";var g=Object(c.forwardRef)(f);t.a=Object(c.forwardRef)((function(e,t){var n=e.role,s=void 0===n?"menu":n,l=e.orientation,u=void 0===l?"vertical":l,d=Object(o.a)(e,["role","orientation"]);return Object(c.createElement)(g,Object(r.a)({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:s,"aria-orientation":"presentation"===s?null:u,eventToOffset:function(e){var t=e.keyCode,n=[i.DOWN],r=[i.UP];return"horizontal"===u&&(n=[i.RIGHT],r=[i.LEFT]),"both"===u&&(n=[i.RIGHT,i.DOWN],r=[i.LEFT,i.UP]),Object(a.includes)(n,t)?1:Object(a.includes)(r,t)?-1:void 0}},d))}))},,function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){const{noopTest:r,edit:o,merge:c}=n(106),a={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};a.def=o(a.def).replace("label",a._label).replace("title",a._title).getRegex(),a.bullet=/(?:[*+-]|\d{1,9}\.)/,a.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,a.item=o(a.item,"gm").replace(/bull/g,a.bullet).getRegex(),a.list=o(a.list).replace(/bull/g,a.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+a.def.source+")").getRegex(),a._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",a._comment=/<!--(?!-?>)[\s\S]*?-->/,a.html=o(a.html,"i").replace("comment",a._comment).replace("tag",a._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a.paragraph=o(a._paragraph).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.blockquote=o(a.blockquote).replace("paragraph",a.paragraph).getRegex(),a.normal=c({},a),a.gfm=c({},a.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),a.pedantic=c({},a.normal,{html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",a._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:o(a.normal._paragraph).replace("hr",a.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const i={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};i.em=o(i.em).replace(/punctuation/g,i._punctuation).getRegex(),i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=o(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=o(i.tag).replace("comment",a._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,i._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=o(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=o(i.reflink).replace("label",i._label).getRegex(),i.normal=c({},i),i.pedantic=c({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=c({},i.normal,{escape:o(i.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),i.gfm.url=o(i.gfm.url,"i").replace("email",i.gfm._extended_email).getRegex(),i.breaks=c({},i.gfm,{br:o(i.br).replace("{2,}","*").getRegex(),text:o(i.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:a,inline:i}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(182),{defaults:o}=n(125),{inline:c}=n(237),{findClosingBracket:a,escape:i}=n(106);e.exports=class e{constructor(e,t){if(this.options=t||o,this.links=e,this.rules=c.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=c.pedantic:this.options.gfm&&(this.options.breaks?this.rules=c.breaks:this.rules=c.gfm)}static get rules(){return c}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,o,c,s,l,u="";for(;t;)if(s=this.rules.escape.exec(t))t=t.substring(s[0].length),u+=i(s[1]);else if(s=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),t=t.substring(s[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0];else if(s=this.rules.link.exec(t)){const r=a(s[2],"()");if(r>-1){const e=(0===s[0].indexOf("!")?5:4)+s[1].length+r;s[2]=s[2].substring(0,r),s[0]=s[0].substring(0,e).trim(),s[3]=""}t=t.substring(s[0].length),this.inLink=!0,o=s[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o),n?(o=n[1],c=n[3]):c=""):c=s[3]?s[3].slice(1,-1):"",o=o.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(s,{href:e.escapes(o),title:e.escapes(c)}),this.inLink=!1}else if((s=this.rules.reflink.exec(t))||(s=this.rules.nolink.exec(t))){if(t=t.substring(s[0].length),n=(s[2]||s[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){u+=s[0].charAt(0),t=s[0].substring(1)+t;continue}this.inLink=!0,u+=this.outputLink(s,n),this.inLink=!1}else if(s=this.rules.strong.exec(t))t=t.substring(s[0].length),u+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(t))t=t.substring(s[0].length),u+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(t))t=t.substring(s[0].length),u+=this.renderer.codespan(i(s[2].trim(),!0));else if(s=this.rules.br.exec(t))t=t.substring(s[0].length),u+=this.renderer.br();else if(s=this.rules.del.exec(t))t=t.substring(s[0].length),u+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(t))t=t.substring(s[0].length),"@"===s[2]?(r=i(this.mangle(s[1])),o="mailto:"+r):(r=i(s[1]),o=r),u+=this.renderer.link(o,null,r);else if(this.inLink||!(s=this.rules.url.exec(t))){if(s=this.rules.text.exec(t))t=t.substring(s[0].length),this.inRawBlock?u+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0]):u+=this.renderer.text(i(this.smartypants(s[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===s[2])r=i(s[0]),o="mailto:"+r;else{do{l=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(l!==s[0]);r=i(s[0]),o="www."===s[1]?"http://"+r:r}t=t.substring(s[0].length),u+=this.renderer.link(o,null,r)}return u}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?i(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,i(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",o=0;for(;o<t;o++)n=e.charCodeAt(o),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.keys,o=Object.freeze,c=Object.seal,a="undefined"!=typeof Reflect&&Reflect,i=a.apply,s=a.construct;i||(i=function(e,t,n){return e.apply(t,n)}),o||(o=function(e){return e}),c||(c=function(e){return e}),s||(s=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var l=z(Array.prototype.forEach),u=z(Array.prototype.indexOf),d=z(Array.prototype.join),p=z(Array.prototype.pop),m=z(Array.prototype.push),b=z(Array.prototype.slice),h=z(String.prototype.toLowerCase),f=z(String.prototype.match),g=z(String.prototype.replace),v=z(String.prototype.indexOf),M=z(String.prototype.trim),O=z(RegExp.prototype.test),y=_(RegExp),w=_(TypeError);function z(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return i(e,t,r)}}function _(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return s(e,n)}}function A(e,r){t&&t(e,null);for(var o=r.length;o--;){var c=r[o];if("string"==typeof c){var a=h(c);a!==c&&(n(r)||(r[o]=a),c=a)}e[c]=!0}return e}function j(t){var n={},r=void 0;for(r in t)i(e,t,[r])&&(n[r]=t[r]);return n}var k=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),E=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),C=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),N=o(["#text"]),S=o(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","minlength","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),q=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),T=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),x=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=c(/\{\{[\s\S]*|[\s\S]*\}\}/gm),R=c(/<%[\s\S]*|[\s\S]*%>/gm),P=c(/^data-[\-\w.\u00B7-\uFFFF]/),W=c(/^aria-[\-\w]+$/),D=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=c(/^(?:\w+script|data):/i),X=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function I(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var F=function(){return"undefined"==typeof window?null:window},U=function(e,t){if("object"!==(void 0===e?"undefined":V(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F(),n=function(t){return e(t)};if(n.version="2.0.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var c=t.document,a=!1,i=!1,s=t.document,z=t.DocumentFragment,_=t.HTMLTemplateElement,G=t.Node,Q=t.NodeFilter,K=t.NamedNodeMap,$=void 0===K?t.NamedNodeMap||t.MozNamedAttrMap:K,J=t.Text,Z=t.Comment,Y=t.DOMParser,ee=t.trustedTypes;if("function"==typeof _){var te=s.createElement("template");te.content&&te.content.ownerDocument&&(s=te.content.ownerDocument)}var ne=U(ee,c),re=ne?ne.createHTML(""):"",oe=s,ce=oe.implementation,ae=oe.createNodeIterator,ie=oe.getElementsByTagName,se=oe.createDocumentFragment,le=c.importNode,ue={};n.isSupported=ce&&void 0!==ce.createHTMLDocument&&9!==s.documentMode;var de=B,pe=R,me=P,be=W,he=H,fe=X,ge=D,ve=null,Me=A({},[].concat(I(k),I(E),I(C),I(L),I(N))),Oe=null,ye=A({},[].concat(I(S),I(q),I(T),I(x))),we=null,ze=null,_e=!0,Ae=!0,je=!1,ke=!1,Ee=!1,Ce=!1,Le=!1,Ne=!1,Se=!1,qe=!1,Te=!1,xe=!1,Be=!0,Re=!0,Pe=!1,We={},De=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),He=A({},["audio","video","img","source","image"]),Xe=null,Ve=A({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ie=null,Fe=s.createElement("form"),Ue=function(e){Ie&&Ie===e||(e&&"object"===(void 0===e?"undefined":V(e))||(e={}),ve="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):Me,Oe="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):ye,Xe="ADD_URI_SAFE_ATTR"in e?A(j(Ve),e.ADD_URI_SAFE_ATTR):Ve,we="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},ze="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},We="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=e.SAFE_FOR_JQUERY||!1,Ee=e.SAFE_FOR_TEMPLATES||!1,Ce=e.WHOLE_DOCUMENT||!1,Se=e.RETURN_DOM||!1,qe=e.RETURN_DOM_FRAGMENT||!1,Te=e.RETURN_DOM_IMPORT||!1,xe=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Re=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||ge,Ee&&(Ae=!1),qe&&(Se=!0),We&&(ve=A({},[].concat(I(N))),Oe=[],!0===We.html&&(A(ve,k),A(Oe,S)),!0===We.svg&&(A(ve,E),A(Oe,q),A(Oe,x)),!0===We.svgFilters&&(A(ve,C),A(Oe,q),A(Oe,x)),!0===We.mathMl&&(A(ve,L),A(Oe,T),A(Oe,x))),e.ADD_TAGS&&(ve===Me&&(ve=j(ve)),A(ve,e.ADD_TAGS)),e.ADD_ATTR&&(Oe===ye&&(Oe=j(Oe)),A(Oe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(Xe,e.ADD_URI_SAFE_ATTR),Re&&(ve["#text"]=!0),Ce&&A(ve,["html","head","body"]),ve.table&&(A(ve,["tbody"]),delete we.tbody),o&&o(e),Ie=e)},Ge=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=re}},Qe=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}t.removeAttribute(e)},Ke=function(e){var t=void 0,n=void 0;if(Ne)e="<remove></remove>"+e;else{var r=f(e,/^[\s]+/);n=r&&r[0]}var o=ne?ne.createHTML(e):e;if(a)try{t=(new Y).parseFromString(o,"text/html")}catch(e){}if(i&&A(we,["title"]),!t||!t.documentElement){var c=(t=ce.createHTMLDocument("")).body;c.parentNode.removeChild(c.parentNode.firstElementChild),c.outerHTML=o}return e&&n&&t.body.insertBefore(s.createTextNode(n),t.body.childNodes[0]||null),ie.call(t,Ce?"html":"body")[0]};n.isSupported&&(function(){try{Ke('<svg><p><textarea><img src="</textarea><img src=x abc=1//">').querySelector("svg img")&&(a=!0)}catch(e){}}(),function(){try{var e=Ke("<x/><title>&lt;/title&gt;&lt;img&gt;");O(/<\/title/,e.querySelector("title").innerHTML)&&(i=!0)}catch(e){}}());var $e=function(e){return ae.call(e.ownerDocument||e,e,Q.SHOW_ELEMENT|Q.SHOW_COMMENT|Q.SHOW_TEXT,(function(){return Q.FILTER_ACCEPT}),!1)},Je=function(e){return!(e instanceof J||e instanceof Z||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof $&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI)},Ze=function(e){return"object"===(void 0===G?"undefined":V(G))?e instanceof G:e&&"object"===(void 0===e?"undefined":V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ye=function(e,t,r){ue[e]&&l(ue[e],(function(e){e.call(n,t,r,Ie)}))},et=function(e){var t=void 0;if(Ye("beforeSanitizeElements",e,null),Je(e))return Ge(e),!0;var r=h(e.nodeName);if(Ye("uponSanitizeElement",e,{tagName:r,allowedTags:ve}),("svg"===r||"math"===r)&&0!==e.querySelectorAll("p, br").length)return Ge(e),!0;if(!ve[r]||we[r]){if(Re&&!De[r]&&"function"==typeof e.insertAdjacentHTML)try{var o=e.innerHTML;e.insertAdjacentHTML("AfterEnd",ne?ne.createHTML(o):o)}catch(e){}return Ge(e),!0}return"noscript"===r&&O(/<\/noscript/i,e.innerHTML)?(Ge(e),!0):"noembed"===r&&O(/<\/noembed/i,e.innerHTML)?(Ge(e),!0):(!ke||e.firstElementChild||e.content&&e.content.firstElementChild||!O(/</g,e.textContent)||(m(n.removed,{element:e.cloneNode()}),e.innerHTML?e.innerHTML=g(e.innerHTML,/</g,"&lt;"):e.innerHTML=g(e.textContent,/</g,"&lt;")),Ee&&3===e.nodeType&&(t=e.textContent,t=g(t,de," "),t=g(t,pe," "),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ye("afterSanitizeElements",e,null),!1)},tt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in s||n in Fe))return!1;if(Ae&&O(me,t));else if(_e&&O(be,t));else{if(!Oe[t]||ze[t])return!1;if(Xe[t]);else if(O(ge,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!He[e])if(je&&!O(he,g(n,fe,"")));else if(n)return!1}return!0},nt=function(e){var t=void 0,o=void 0,c=void 0,a=void 0,i=void 0;Ye("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Oe};for(i=s.length;i--;){var m=t=s[i],f=m.name,v=m.namespaceURI;if(o=M(t.value),c=h(f),l.attrName=c,l.attrValue=o,l.keepAttr=!0,l.forceKeepAttr=void 0,Ye("uponSanitizeAttribute",e,l),o=l.attrValue,!l.forceKeepAttr){if("name"===c&&"IMG"===e.nodeName&&s.id)a=s.id,s=b(s,[]),Qe("id",e),Qe(f,e),u(s,a)>i&&e.setAttribute("id",a.value);else{if("INPUT"===e.nodeName&&"type"===c&&"file"===o&&l.keepAttr&&(Oe[c]||!ze[c]))continue;"id"===f&&e.setAttribute(f,""),Qe(f,e)}if(l.keepAttr)if(ke&&O(/\/>/i,o))Qe(f,e);else if(O(/svg|math/i,e.namespaceURI)&&O(y("</("+d(r(De),"|")+")","i"),o))Qe(f,e);else{Ee&&(o=g(o,de," "),o=g(o,pe," "));var w=e.nodeName.toLowerCase();if(tt(w,c,o))try{v?e.setAttributeNS(v,f,o):e.setAttribute(f,o),p(n.removed)}catch(e){}}}}Ye("afterSanitizeAttributes",e,null)}},rt=function e(t){var n=void 0,r=$e(t);for(Ye("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Ye("uponSanitizeShadowNode",n,null),et(n)||(n.content instanceof z&&e(n.content),nt(n));Ye("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var o=void 0,a=void 0,i=void 0,s=void 0,l=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Ze(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported){if("object"===V(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Ze(e))return t.toStaticHTML(e.outerHTML)}return e}if(Le||Ue(r),n.removed=[],"string"==typeof e&&(Pe=!1),Pe);else if(e instanceof G)1===(a=(o=Ke("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName?o=a:"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!Se&&!Ee&&!Ce&&xe&&-1===e.indexOf("<"))return ne?ne.createHTML(e):e;if(!(o=Ke(e)))return Se?null:re}o&&Ne&&Ge(o.firstChild);for(var u=$e(Pe?e:o);i=u.nextNode();)3===i.nodeType&&i===s||et(i)||(i.content instanceof z&&rt(i.content),nt(i),s=i);if(s=null,Pe)return e;if(Se){if(qe)for(l=se.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return Te&&(l=le.call(c,l,!0)),l}var d=Ce?o.outerHTML:o.innerHTML;return Ee&&(d=g(d,de," "),d=g(d,pe," ")),ne&&xe?ne.createHTML(d):d},n.setConfig=function(e){Ue(e),Le=!0},n.clearConfig=function(){Ie=null,Le=!1},n.isValidAttribute=function(e,t,n){Ie||Ue({});var r=h(e),o=h(t);return tt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ue[e]=ue[e]||[],m(ue[e],t))},n.removeHook=function(e){ue[e]&&p(ue[e])},n.removeHooks=function(e){ue[e]&&(ue[e]=[])},n.removeAllHooks=function(){ue={}},n}()}()},function(e,t,n){"use strict";var r=n(22),o=n(15),c=n(14),a=n(17),i=n(18),s=n(5),l=n(19),u=n(0),d=n(6),p=n.n(d),m=n(88),b=function(e){function t(){var e;return Object(o.a)(this,t),(e=Object(a.a)(this,Object(i.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(s.a)(e)),e.close=e.close.bind(Object(s.a)(e)),e.closeIfFocusOutside=e.closeIfFocusOutside.bind(Object(s.a)(e)),e.containerRef=Object(u.createRef)(),e.state={isOpen:!1},e}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentWillUnmount",value:function(){var e=this.state.isOpen,t=this.props.onToggle;e&&t&&t(!1)}},{key:"componentDidUpdate",value:function(e,t){var n=this.state.isOpen,r=this.props.onToggle;t.isOpen!==n&&r&&r(n)}},{key:"toggle",value:function(){this.setState((function(e){return{isOpen:!e.isOpen}}))}},{key:"closeIfFocusOutside",value:function(){this.containerRef.current.contains(document.activeElement)||document.activeElement.closest('[role="dialog"]')||this.close()}},{key:"close",value:function(){this.props.onClose&&this.props.onClose(),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this.state.isOpen,t=this.props,n=t.renderContent,o=t.renderToggle,c=t.position,a=void 0===c?"bottom":c,i=t.className,s=t.contentClassName,l=t.expandOnMobile,d=t.headerTitle,b=t.focusOnMount,h=t.popoverProps,f={isOpen:e,onToggle:this.toggle,onClose:this.close};return Object(u.createElement)("div",{className:p()("components-dropdown",i),ref:this.containerRef},o(f),e&&Object(u.createElement)(m.a,Object(r.a)({className:s,position:a,onClose:this.close,onFocusOutside:this.closeIfFocusOutside,expandOnMobile:l,headerTitle:d,focusOnMount:b},h),n(f)))}}]),t}(u.Component);t.a=b},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var c=n(499),a=n(29),i=n(74);e.exports=function(e){var t=e.displayName||e.name,n=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.handleClickOutside=t.handleClickOutside.bind(t),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),o(n,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleClickOutside,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleClickOutside,!0)}},{key:"handleClickOutside",value:function(e){var t=this.__domNode;t&&t.contains(e.target)||!this.__wrappedInstance||"function"!=typeof this.__wrappedInstance.handleClickOutside||this.__wrappedInstance.handleClickOutside(e)}},{key:"render",value:function(){var t=this,n=this.props,o=n.wrappedRef,c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["wrappedRef"]);return a.createElement(e,r({},c,{ref:function(e){t.__wrappedInstance=e,t.__domNode=i.findDOMNode(e),o&&o(e)}}))}}]),n}(a.Component);return n.displayName="clickOutside("+t+")",c(n,e)}},function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(5)()},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t,n){var r=e.direction,o=e.value;switch(r){case"top":return n.top+o<t.top&&n.bottom>t.bottom&&n.left<t.left&&n.right>t.right;case"left":return n.left+o<t.left&&n.bottom>t.bottom&&n.top<t.top&&n.right>t.right;case"bottom":return n.bottom-o>t.bottom&&n.left<t.left&&n.right>t.right&&n.top<t.top;case"right":return n.right-o>t.right&&n.left<t.left&&n.top<t.top&&n.bottom>t.bottom}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(1),o=n.n(r),c=n(2),a=n.n(c),i=n(0),s=n.n(i),l=n(3),u=n.n(l);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?b(e):t}(this,m(t).call(this,e)),f(b(n),"getContainer",(function(){return n.props.containment||window})),f(b(n),"addEventListener",(function(e,t,r,o){var c;n.debounceCheck||(n.debounceCheck={});var a=function(){c=null,n.check()},i={target:e,fn:o>-1?function(){c||(c=setTimeout(a,o||0))}:function(){clearTimeout(c),c=setTimeout(a,r||0)},getLastTimeout:function(){return c}};e.addEventListener(t,i.fn),n.debounceCheck[t]=i})),f(b(n),"startWatching",(function(){n.debounceCheck||n.interval||(n.props.intervalCheck&&(n.interval=setInterval(n.check,n.props.intervalDelay)),n.props.scrollCheck&&n.addEventListener(n.getContainer(),"scroll",n.props.scrollDelay,n.props.scrollThrottle),n.props.resizeCheck&&n.addEventListener(window,"resize",n.props.resizeDelay,n.props.resizeThrottle),!n.props.delayedCall&&n.check())})),f(b(n),"stopWatching",(function(){if(n.debounceCheck)for(var e in n.debounceCheck)if(n.debounceCheck.hasOwnProperty(e)){var t=n.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),n.debounceCheck[e]=null}n.debounceCheck=null,n.interval&&(n.interval=clearInterval(n.interval))})),f(b(n),"check",(function(){var e,t,r=n.node;if(!r)return n.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(n.roundRectDown(r.getBoundingClientRect())),n.props.containment){var o=n.props.containment.getBoundingClientRect();t={top:o.top,left:o.left,bottom:o.bottom,right:o.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var c=n.props.offset||{};"object"===d(c)&&(t.top+=c.top||0,t.left+=c.left||0,t.bottom-=c.bottom||0,t.right-=c.right||0);var a={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},i=e.height>0&&e.width>0,s=i&&a.top&&a.left&&a.bottom&&a.right;if(i&&n.props.partialVisibility){var l=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof n.props.partialVisibility&&(l=a[n.props.partialVisibility]),s=n.props.minTopValue?l&&e.top<=t.bottom-n.props.minTopValue:l}"string"==typeof c.direction&&"number"==typeof c.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",c.direction,c.value),s=u()(c,e,t));var p=n.state;return n.state.isVisible!==s&&(p={isVisible:s,visibilityRect:a},n.setState(p),n.props.onChange&&n.props.onChange(s)),p})),n.state={isVisible:null,visibilityRect:{}},n}var n,r,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.node=a.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(e){this.node=a.a.findDOMNode(this),this.props.active&&!e.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):o.a.Children.only(this.props.children)}}])&&p(n.prototype,r),c&&p(n,c),t}(o.a.Component);f(g,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:o.a.createElement("span",null)}),f(g,"propTypes",{onChange:s.a.func,active:s.a.bool,partialVisibility:s.a.oneOfType([s.a.bool,s.a.oneOf(["top","right","bottom","left"])]),delayedCall:s.a.bool,offset:s.a.oneOfType([s.a.shape({top:s.a.number,left:s.a.number,bottom:s.a.number,right:s.a.number}),s.a.shape({direction:s.a.oneOf(["top","right","bottom","left"]),value:s.a.number})]),scrollCheck:s.a.bool,scrollDelay:s.a.number,scrollThrottle:s.a.number,resizeCheck:s.a.bool,resizeDelay:s.a.number,resizeThrottle:s.a.number,intervalCheck:s.a.bool,intervalDelay:s.a.number,containment:"undefined"!=typeof window?s.a.instanceOf(window.Element):s.a.any,children:s.a.oneOfType([s.a.element,s.a.func]),minTopValue:s.a.number})},function(e,t,n){"use strict";var r=n(6);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=r(n(29),n(74))},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(57))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},,,,,,,,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function i(e,t,n,r){var o=t&&t.prototype instanceof u?t:u,c=Object.create(o.prototype),a=new w(r||[]);return c._invoke=function(e,t,n){var r="suspendedStart";return function(o,c){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw c;return _()}for(n.method=o,n.arg=c;;){var a=n.delegate;if(a){var i=M(a,n);if(i){if(i===l)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),c}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=i;var l={};function u(){}function d(){}function p(){}var m={};m[o]=function(){return this};var b=Object.getPrototypeOf,h=b&&b(b(z([])));h&&h!==t&&n.call(h,o)&&(m=h);var f=p.prototype=u.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function v(e){var t;this._invoke=function(r,o){function c(){return new Promise((function(t,c){!function t(r,o,c,a){var i=s(e[r],e,o);if("throw"!==i.type){var l=i.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,c,a)}),(function(e){t("throw",e,c,a)})):Promise.resolve(u).then((function(e){l.value=e,c(l)}),(function(e){return t("throw",e,c,a)}))}a(i.arg)}(r,o,t,c)}))}return t=t?t.then(c,c):c()}}function M(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.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,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(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 w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function z(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 r=-1,c=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return c.next=c}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=f.constructor=p,p.constructor=d,p[a]=d.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(f),e},e.awrap=function(e){return{__await:e}},g(v.prototype),v.prototype[c]=function(){return this},e.AsyncIterator=v,e.async=function(t,n,r,o){var c=new v(i(t,n,r,o));return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(f),f[a]="Generator",f[o]=function(){return this},f.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=z,w.prototype={constructor:w,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)&&n.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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var i=n.call(c,"catchLoc"),s=n.call(c,"finallyLoc");if(i&&s){if(this.prev<c.catchLoc)return r(c.catchLoc,!0);if(this.prev<c.finallyLoc)return r(c.finallyLoc)}else if(i){if(this.prev<c.catchLoc)return r(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return r(c.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var c=o;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var a=c?c.completion:{};return a.type=e,a.arg=t,c?(this.method="next",this.next=c.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),y(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;y(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:z(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";var r=Object.keys;e.exports=function(e,t){var n,o,c,a,i;if(e===t)return!0;if(n=r(e),o=r(t),n.length!==o.length)return!1;for(c=0;c<n.length;){if(void 0===(i=e[a=n[c]])&&!t.hasOwnProperty(a)||i!==t[a])return!1;c++}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n;if(e===t)return!0;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){},function(e,t,n){"use strict";var r=n(3);t.a=r.flowRight},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(){return Object(r.createElement)("span",{className:"components-spinner"})}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(22),o=n(36),c=n(27),a=n(0),i=n(3),s=n(91),l=n(68);t.a=Object(s.a)((function(e){var t=e.help,n=e.instanceId,s=e.label,u=e.multiple,d=void 0!==u&&u,p=e.onChange,m=e.options,b=void 0===m?[]:m,h=e.className,f=e.hideLabelFromVision,g=Object(c.a)(e,["help","instanceId","label","multiple","onChange","options","className","hideLabelFromVision"]),v="inspector-select-control-".concat(n);return!Object(i.isEmpty)(b)&&Object(a.createElement)(l.a,{label:s,hideLabelFromVision:f,id:v,help:t,className:h},Object(a.createElement)("select",Object(r.a)({id:v,className:"components-select-control__input",onChange:function(e){if(d){var t=Object(o.a)(e.target.options).filter((function(e){return e.selected})).map((function(e){return e.value}));p(t)}else p(e.target.value)},"aria-describedby":t?"".concat(v,"__help"):void 0,multiple:d},g),b.map((function(e,t){return Object(a.createElement)("option",{key:"".concat(e.label,"-").concat(e.value,"-").concat(t),value:e.value,disabled:e.disabled},e.label)}))))}))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(91),i=n(68);t.a=Object(a.a)((function(e){var t=e.label,n=e.hideLabelFromVision,a=e.value,s=e.help,l=e.className,u=e.instanceId,d=e.onChange,p=e.type,m=void 0===p?"text":p,b=Object(o.a)(e,["label","hideLabelFromVision","value","help","className","instanceId","onChange","type"]),h="inspector-text-control-".concat(u);return Object(c.createElement)(i.a,{label:t,hideLabelFromVision:n,id:h,help:s,className:l},Object(c.createElement)("input",Object(r.a)({className:"components-text-control__input",type:m,id:h,value:a,onChange:function(e){return d(e.target.value)},"aria-describedby":s?h+"__help":void 0},b)))}))},function(e,t,n){},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(6),i=n.n(a),s=n(3),l=n(60);t.a=function(e){var t=e.className,n=e.checked,a=e.id,u=e.onChange,d=void 0===u?s.noop:u,p=Object(o.a)(e,["className","checked","id","onChange"]),m=i()("components-form-toggle",t,{"is-checked":n});return Object(c.createElement)("span",{className:m},Object(c.createElement)("input",Object(r.a)({className:"components-form-toggle__input",id:a,type:"checkbox",checked:n,onChange:d},p)),Object(c.createElement)("span",{className:"components-form-toggle__track"}),Object(c.createElement)("span",{className:"components-form-toggle__thumb"}),n?Object(c.createElement)(l.b,{className:"components-form-toggle__on",width:"2",height:"6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2 6"},Object(c.createElement)(l.a,{d:"M0 0h2v6H0z"})):Object(c.createElement)(l.b,{className:"components-form-toggle__off",width:"6",height:"6","aria-hidden":"true",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},Object(c.createElement)(l.a,{d:"M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})))}},function(e,t,n){},function(e,t,n){"use strict";var r=n(31),o=n(15),c=n(14),a=n(17),i=n(18),s=n(5),l=n(19),u=n(22),d=n(27),p=n(0),m=n(6),b=n.n(m),h=n(3),f=n(91),g=n(233),v=n(87),M=function(e){var t=e.tabId,n=e.onClick,r=e.children,o=e.selected,c=Object(d.a)(e,["tabId","onClick","children","selected"]);return Object(p.createElement)(v.a,Object(u.a)({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:t,onClick:n},c),r)},O=function(e){function t(){var e;Object(o.a)(this,t);var n=(e=Object(a.a)(this,Object(i.a)(t).apply(this,arguments))).props,r=n.tabs,c=n.initialTabName;return e.handleClick=e.handleClick.bind(Object(s.a)(e)),e.onNavigate=e.onNavigate.bind(Object(s.a)(e)),e.state={selected:c||(r.length>0?r[0].name:null)},e}return Object(l.a)(t,e),Object(c.a)(t,[{key:"handleClick",value:function(e){var t=this.props.onSelect,n=void 0===t?h.noop:t;this.setState({selected:e}),n(e)}},{key:"onNavigate",value:function(e,t){t.click()}},{key:"render",value:function(){var e=this,t=this.state.selected,n=this.props,o=n.activeClass,c=void 0===o?"is-active":o,a=n.className,i=n.instanceId,s=n.orientation,l=void 0===s?"horizontal":s,u=n.tabs,d=Object(h.find)(u,{name:t}),m=i+"-"+d.name;return Object(p.createElement)("div",{className:a},Object(p.createElement)(g.a,{role:"tablist",orientation:l,onNavigate:this.onNavigate,className:"components-tab-panel__tabs"},u.map((function(n){return Object(p.createElement)(M,{className:b()(n.className,Object(r.a)({},c,n.name===t)),tabId:i+"-"+n.name,"aria-controls":i+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:Object(h.partial)(e.handleClick,n.name)},n.title)}))),d&&Object(p.createElement)("div",{"aria-labelledby":m,role:"tabpanel",id:m+"-view",className:"components-tab-panel__tab-content",tabIndex:"0"},this.props.children(d)))}}]),t}(p.Component);t.a=Object(f.a)(O)},function(e,t,n){},function(e,t,n){var r={"./advanced-filters/docs/example":410,"./animation-slider/docs/example":411,"./calendar/docs/example":412,"./card/docs/example":413,"./chart/docs/example":414,"./compare-filter/docs/example":415,"./count/docs/example":416,"./date-range-filter-picker/docs/example":417,"./date/docs/example":418,"./dropdown-button/docs/example":419,"./ellipsis-menu/docs/example":420,"./empty-content/docs/example":421,"./filter-picker/docs/example":422,"./filters/docs/example":423,"./flag/docs/example":424,"./form/docs/example":756,"./gravatar/docs/example":425,"./image-upload/docs/example":426,"./link/docs/example":427,"./list/docs/example":428,"./order-status/docs/example":429,"./pagination/docs/example":430,"./product-image/docs/example":431,"./rating/docs/example":432,"./scroll-to/docs/example":433,"./search-list-control/docs/example":434,"./search/docs/example":435,"./section-header/docs/example":436,"./section/docs/example":437,"./segmented-selection/docs/example":438,"./select-control/docs/example":439,"./spinner/docs/example":440,"./split-button/docs/example":441,"./stepper/docs/example":442,"./summary/docs/example":443,"./table/docs/example":444,"./tag/docs/example":445,"./text-control-with-affixes/docs/example":446,"./text-control/docs/example":447,"./view-more-list/docs/example":448,"./web-preview/docs/example":449};function o(e){var t=c(e);return n(t)}function c(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=c,e.exports=o,o.id=409},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(86),a={cancelled:"Cancelled",completed:"Completed",failed:"Failed","on-hold":"On hold",pending:"Pending payment",processing:"Processing",refunded:"Refunded"},i=new(n.n(c).a),s=new URL(document.location).searchParams.get("path")||"/devdocs",l={component:"advanced-filters"},u={title:"Orders Match {{select /}} Filters",filters:{status:{labels:{add:"Order Status",remove:"Remove order status filter",rule:"Select an order status filter match",title:"{{title}}Order Status{{/title}} {{rule /}} {{filter /}}",filter:"Select an order status"},rules:[{value:"is",label:"Is"},{value:"is_not",label:"Is Not"}],input:{component:"SelectControl",options:Object.keys(a).map((function(e){return{value:e,label:a[e]}}))}},product:{labels:{add:"Products",placeholder:"Search products",remove:"Remove products filter",rule:"Select a product filter match",title:"{{title}}Product{{/title}} {{rule /}} {{filter /}}",filter:"Select products"},rules:[{value:"includes",label:"Includes"},{value:"excludes",label:"Excludes"}],input:{component:"Search",type:"products",getLabels:function(){return Promise.resolve([])}}},customer:{labels:{add:"Customer Type",remove:"Remove customer filter",rule:"Select a customer filter match",title:"{{title}}Customer is{{/title}} {{filter /}}",filter:"Select a customer type"},input:{component:"SelectControl",options:[{value:"new",label:"New"},{value:"returning",label:"Returning"}],defaultOption:"new"}},quantity:{labels:{add:"Item Quantity",remove:"Remove item quantity filter",rule:"Select an item quantity filter match",title:"{{title}}Item Quantity is{{/title}} {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number"}},subtotal:{labels:{add:"Subtotal",remove:"Remove subtotal filter",rule:"Select a subtotal filter match",title:"{{title}}Subtotal is{{/title}} {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number",type:"currency"}}}};t.default=function(){return Object(r.createElement)(o.AdvancedFilters,{siteLocale:"en_US",path:s,query:l,filterTitle:"Orders",config:u,currency:i})}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(9),o=n.n(r),c=n(10),a=n.n(c),i=n(7),s=n.n(i),l=n(11),u=n.n(l),d=n(16),p=n.n(d),m=n(12),b=n.n(m),h=n(0),f=n(4),g=function(e){function t(){var e;return o()(this,t),(e=s()(this,u()(t).call(this))).state={pages:[44,55,66,77,88],page:0,animate:null},e.forward=e.forward.bind(p()(e)),e.back=e.forward.bind(p()(e)),e}return b()(t,e),a()(t,[{key:"forward",value:function(){this.setState((function(e){return{page:e.page+1,animate:"left"}}))}},{key:"back",value:function(){this.setState((function(e){return{page:e.page-1,animate:"right"}}))}},{key:"render",value:function(){var e=this.state,t=e.page,n=e.pages,r=e.animate,o={margin:"16px 0",padding:"8px 16px",color:"white",fontWeight:"bold",backgroundColor:"#246EB9"};return Object(h.createElement)("div",null,Object(h.createElement)(f.AnimationSlider,{animationKey:t,animate:r},(function(){return Object(h.createElement)("div",{style:o},n[t])})),Object(h.createElement)("button",{onClick:this.back,disabled:0===t},"Back"),Object(h.createElement)("button",{onClick:this.forward,disabled:t===n.length+1},"Forward"))}}]),t}(h.Component)},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(20),a=n.n(c),i=n(71);t.default=Object(i.a)({after:null,afterText:"",before:null,beforeText:"",afterError:null,beforeError:null,focusedInput:"startDate"})((function(e){var t=e.after,n=e.afterText,c=e.before,i=e.beforeText,s=e.afterError,l=e.focusedInput,u=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Date Range Picker"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.DateRange,{after:t,afterText:n,before:c,beforeText:i,onUpdate:function(e){u(e)},shortDateFormat:"MM/DD/YYYY",focusedInput:l,isInvalidDate:function(e){return a()().isBefore(a()(e),"date")}})),Object(r.createElement)(o.H,null,"Date Picker"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.DatePicker,{date:t,text:n,error:s,onUpdate:function(e){var t=e.date,n=e.text,r=e.error;u({after:t,afterText:n,afterError:r})},dateFormat:"MM/DD/YYYY",isInvalidDate:function(e){return 1===a()(e).day()}})))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Card,{title:"Store Performance",description:"Key performance metrics"},Object(r.createElement)("p",null,"Your stuff in a Card.")),Object(r.createElement)(o.Card,{title:"Inactive Card",isInactive:!0},Object(r.createElement)("p",null,"This Card is grayed out and has no box-shadow.")))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=[{date:"2018-05-30T00:00:00",Hoodie:{label:"Hoodie",value:21599},Sunglasses:{label:"Sunglasses",value:38537},Cap:{label:"Cap",value:106010}},{date:"2018-05-31T00:00:00",Hoodie:{label:"Hoodie",value:14205},Sunglasses:{label:"Sunglasses",value:24721},Cap:{label:"Cap",value:70131}},{date:"2018-06-01T00:00:00",Hoodie:{label:"Hoodie",value:10581},Sunglasses:{label:"Sunglasses",value:19991},Cap:{label:"Cap",value:53552}},{date:"2018-06-02T00:00:00",Hoodie:{label:"Hoodie",value:9250},Sunglasses:{label:"Sunglasses",value:16072},Cap:{label:"Cap",value:47821}}];t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Chart,{data:c,title:"Example Chart",layout:"item-comparison"}))}},function(e,t,n){"use strict";n.r(t);var r=n(35),o=n.n(r),c=n(0),a=n(4),i=new URL(document.location).searchParams.get("path")||"/devdocs",s={},l={type:"products",param:"product",getLabels:function(){return Promise.resolve([])},labels:{helpText:"Select at least two products to compare",placeholder:"Search for products to compare",title:"Compare Products",update:"Compare"}};t.default=function(){return Object(c.createElement)(a.CompareFilter,o()({path:i,query:s},l))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Count,{count:33})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(38),a=n(3),i={},s=Object(a.partialRight)(c.getDateParamsFromQuery,"period=month&compare=previous_year"),l=Object(a.partialRight)(c.getCurrentDates,"period=month&compare=previous_year"),u=s(i),d=u.period,p=u.compare,m=u.before,b=u.after,h=l(i),f={period:d,compare:p,before:m,after:b,primaryDate:h.primary,secondaryDate:h.secondary};t.default=function(){return Object(r.createElement)(o.DateRangeFilterPicker,{key:"daterange",query:i,onRangeSelect:function(){},dateQuery:f,isoDateFormat:c.isoDateFormat})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Date,{date:"2019-01-01"})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(364);t.default=function(){return Object(r.createElement)(c.a,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(r.createElement)(o.DropdownButton,{onClick:n,isOpen:t,labels:["All Products Sold"]})},renderContent:function(){return Object(r.createElement)("p",null,"Dropdown content here")}})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71),a=n(119);t.default=Object(c.a)({showCustomers:!0,showOrders:!0})((function(e){var t=e.setState,n=e.showCustomers,c=e.showOrders;return Object(r.createElement)(o.EllipsisMenu,{label:"Choose which analytics to display",renderContent:function(e){var i=e.onToggle;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.MenuTitle,null,"Display Stats"),Object(r.createElement)(o.MenuItem,{isCheckbox:!0,isClickable:!0,checked:n,onInvoke:function(){return t({showCustomers:!n})}},"Show Customers"),Object(r.createElement)(o.MenuItem,{isCheckbox:!0,isClickable:!0,checked:c,onInvoke:function(){return t({showOrders:!c})}},"Show Orders"),Object(r.createElement)(o.MenuItem,{isClickable:!0,onInvoke:i},Object(r.createElement)(a.a,{icon:"no-alt"}),"Close Menu"))}})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.EmptyContent,{title:"Nothing here",message:"Some descriptive text",actionLabel:"Reload page",actionURL:"#"})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=new URL(document.location).searchParams.get("path")||"/devdocs",a={meal:"breakfast"},i={label:"Meal",staticParams:[],param:"meal",showFilters:function(){return!0},filters:[{label:"Breakfast",value:"breakfast"},{label:"Lunch",value:"lunch",subFilters:[{label:"Meat",value:"meat",path:["lunch"]},{label:"Vegan",value:"vegan",path:["lunch"]},{label:"Pescatarian",value:"fish",path:["lunch"],subFilters:[{label:"Snapper",value:"snapper",path:["lunch","fish"]},{label:"Cod",value:"cod",path:["lunch","fish"]},{label:"Other",value:"other_fish",path:["lunch","fish"],component:"OtherFish"}]}]},{label:"Dinner",value:"dinner"}]};t.default=function(){return Object(r.createElement)(o.FilterPicker,{config:i,path:c,query:a})}},function(e,t,n){"use strict";n.r(t);var r=n(35),o=n.n(r),c=n(0),a=n(4),i=n(38),s=n(3),l={cancelled:"Cancelled",completed:"Completed",failed:"Failed","on-hold":"On hold",pending:"Pending payment",processing:"Processing",refunded:"Refunded"},u={getDateParamsFromQuery:Object(s.partialRight)(i.getDateParamsFromQuery,"period=month&compare=previous_year"),getCurrentDates:Object(s.partialRight)(i.getCurrentDates,"period=month&compare=previous_year"),isoDateFormat:i.isoDateFormat},d={},p=[{label:"Show",staticParams:["chart"],param:"filter",showFilters:function(){return!0},filters:[{label:"All Orders",value:"all"},{label:"Advanced Filters",value:"advanced"}]}],m={title:"Orders Match {{select /}} Filters",filters:{status:{labels:{add:"Order Status",remove:"Remove order status filter",rule:"Select an order status filter match",title:"Order Status {{rule /}} {{filter /}}",filter:"Select an order status"},rules:[{value:"is",label:"Is"},{value:"is_not",label:"Is Not"}],input:{component:"SelectControl",options:Object.keys(l).map((function(e){return{value:e,label:l[e]}}))}},product:{labels:{add:"Products",placeholder:"Search products",remove:"Remove products filter",rule:"Select a product filter match",title:"Product {{rule /}} {{filter /}}",filter:"Select products"},rules:[{value:"includes",label:"Includes"},{value:"excludes",label:"Excludes"}],input:{component:"Search",type:"products",getLabels:function(){return Promise.resolve([])}}},customer:{labels:{add:"Customer Type",remove:"Remove customer filter",rule:"Select a customer filter match",title:"Customer is {{filter /}}",filter:"Select a customer type"},input:{component:"SelectControl",options:[{value:"new",label:"New"},{value:"returning",label:"Returning"}],defaultOption:"new"}},quantity:{labels:{add:"Item Quantity",remove:"Remove item quantity filter",rule:"Select an item quantity filter match",title:"Item Quantity is {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number"}},subtotal:{labels:{add:"Subtotal",remove:"Remove subtotal filter",rule:"Select a subtotal filter match",title:"Subtotal is {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number",type:"currency"}}}},b={type:"products",param:"product",getLabels:function(){return Promise.resolve([])},labels:{helpText:"Select at least two products to compare",placeholder:"Search for products to compare",title:"Compare Products",update:"Compare"}};t.default=function(){return Object(c.createElement)("div",null,Object(c.createElement)(a.H,null,"Date picker only"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.ReportFilters,{path:"",query:d,storeDate:u})),Object(c.createElement)(a.H,null,"Date picker & more filters"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.ReportFilters,{filters:p,path:"",query:d,storeDate:u})),Object(c.createElement)(a.H,null,"Advanced Filters"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.AdvancedFilters,{siteLocale:"en_US",path:"",query:d,filterTitle:"Orders",config:m})),Object(c.createElement)(a.H,null,"Compare Filter"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.CompareFilter,o()({path:"",query:d},b))))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Default (inherits parent font size)"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Flag,{code:"VU"})),Object(r.createElement)(o.H,null,"Large"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Flag,{code:"VU",size:48})),Object(r.createElement)(o.H,null,"Invalid Country Code"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Flag,{code:"invalid country code"})))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Gravatar,{user:"email@example.org",size:48})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({image:null})((function(e){var t=e.setState,n=e.logo;return Object(r.createElement)(o.ImageUpload,{image:n,onChange:function(e){return t({logo:e})}})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Link,{href:"edit.php?post_type=shop_coupon",type:"wp-admin"},"Coupons")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(37),a=n.n(c),i=[{title:"List item title",content:"List item description text"},{before:Object(r.createElement)(a.a,{icon:"star"}),title:"List item with before icon",content:"List item description text"},{before:Object(r.createElement)(a.a,{icon:"star"}),after:Object(r.createElement)(a.a,{icon:"chevron-right"}),title:"List item with before and after icons",content:"List item description text"},{title:"Clickable list item",content:"List item description text",onClick:function(){return alert("List item clicked")}}];t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.List,{items:i}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a={processing:Object(c.__)("Processing Order"),pending:Object(c.__)("Pending Order"),completed:Object(c.__)("Completed Order")};t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.OrderStatus,{order:{status:"processing"},orderStatusMap:a}),Object(r.createElement)(o.OrderStatus,{order:{status:"pending"},orderStatusMap:a}),Object(r.createElement)(o.OrderStatus,{order:{status:"completed"},orderStatusMap:a}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({page:2,perPage:50})((function(e){var t=e.page,n=e.perPage,c=e.setState;return Object(r.createElement)(o.Pagination,{page:t,perPage:n,total:500,onPageChange:function(e){return c({page:e})},onPerPageChange:function(e){return c({perPage:e})}})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.ProductImage,{product:null}),Object(r.createElement)(o.ProductImage,{product:{images:[]}}),Object(r.createElement)(o.ProductImage,{product:{images:[{src:"https://cldup.com/6L9h56D9Bw.jpg"}]}}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)("div",null,Object(r.createElement)(o.Rating,{rating:4,totalStars:5})),Object(r.createElement)("div",null,Object(r.createElement)(o.Rating,{rating:2.5,totalStars:6})),Object(r.createElement)("div",null,Object(r.createElement)(o.ProductRating,{product:{average_rating:3.5}})),Object(r.createElement)("div",null,Object(r.createElement)(o.ReviewRating,{review:{rating:5}})))}},function(e,t,n){"use strict";n.r(t);var r=n(0);n(4);t.default=function(){return Object(r.createElement)("div",null,"Have the web broswer automatically scroll to this component on page render.")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({selected:[],loading:!0})((function(e){var t=e.selected,n=e.loading,c=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)("button",{onClick:function(){return c({loading:!n})}},"Toggle loading state"),Object(r.createElement)(o.SearchListControl,{list:[{id:1,name:"Apricots"},{id:2,name:"Clementine"},{id:3,name:"Elderberry"},{id:4,name:"Guava"},{id:5,name:"Lychee"},{id:6,name:"Mulberry"}],isLoading:n,selected:t,onChange:function(e){return c({selected:e})}}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({selected:[],inlineSelected:[]})((function(e){var t=e.selected,n=e.inlineSelected,c=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Tags Below Input"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Search,{type:"products",placeholder:"Search for a product",selected:t,onChange:function(e){return c({selected:e})}})),Object(r.createElement)(o.H,null,"Tags Inline with Input"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Search,{type:"products",placeholder:"Search for a product",selected:n,onChange:function(e){return c({inlineSelected:e})},inlineTags:!0})))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.SectionHeader,{title:"Store Performance"})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Header using a contextual level (h3)"),Object(r.createElement)(o.Section,{component:"article"},Object(r.createElement)("p",null,"This is an article component wrapper."),Object(r.createElement)(o.H,null,"Another header with contextual level (h4)"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)("p",null,"There is no wrapper component here."),Object(r.createElement)(o.H,null,"This is an h5"))))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({selected:"two"})((function(e){var t=e.selected,n=e.setState;return Object(r.createElement)(o.SegmentedSelection,{options:[{value:"one",label:"One"},{value:"two",label:"Two"},{value:"three",label:"Three"},{value:"four",label:"Four"}],selected:t,legend:"Select a number",onSelect:function(e){return n({selected:e.number})},name:"number"})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71),a=[{key:"apple",label:"Apple",value:{id:"apple"}},{key:"apricot",label:"Apricot",value:{id:"apricot"}},{key:"banana",label:"Banana",keywords:["best","fruit"],value:{id:"banana"}},{key:"blueberry",label:"Blueberry",value:{id:"blueberry"}},{key:"cherry",label:"Cherry",value:{id:"cherry"}},{key:"cantaloupe",label:"Cantaloupe",value:{id:"cantaloupe"}},{key:"dragonfruit",label:"Dragon Fruit",value:{id:"dragonfruit"}},{key:"elderberry",label:"Elderberry",value:{id:"elderberry"}}];t.default=Object(c.a)({simpleSelected:[],simpleMultipleSelected:[],singleSelected:[],singleSelectedShowAll:[],multipleSelected:[],inlineSelected:[]})((function(e){var t=e.simpleSelected,n=e.simpleMultipleSelected,c=e.singleSelected,i=e.singleSelectedShowAll,s=e.multipleSelected,l=e.inlineSelected,u=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.SelectControl,{label:"Simple single value",onChange:function(e){return u({simpleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:t}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Multiple values",multiple:!0,onChange:function(e){return u({simpleMultipleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:n}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Single value searchable",isSearchable:!0,onChange:function(e){return u({singleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:c}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Single value searchable with options on refocus",isSearchable:!0,onChange:function(e){return u({singleSelectedShowAll:e})},options:a,placeholder:"Start typing to filter options...",selected:i,showAllOnFocus:!0}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Inline tags searchable",isSearchable:!0,multiple:!0,inlineTags:!0,onChange:function(e){return u({inlineSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:l}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{hideBeforeSearch:!0,isSearchable:!0,label:"Hidden options before search",multiple:!0,onChange:function(e){return u({multipleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:s,showClearButton:!0}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Spinner,null))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(37),a=n.n(c);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.SplitButton,{isPrimary:!0,mainLabel:"Primary Button",menuLabel:"Select an action",onClick:function(){return alert("Primary Main Action clicked")},controls:[{label:"Up",onClick:function(){return alert("Primary Up clicked")}},{label:"Right",onClick:function(){return alert("Primary Right clicked")}},{label:"Down",icon:Object(r.createElement)(a.a,{icon:"arrow-down"}),onClick:function(){return alert("Primary Down clicked")}},{label:"Left",icon:Object(r.createElement)(a.a,{icon:"arrow-left"}),onClick:function(){return alert("Primary Left clicked")}}]}),Object(r.createElement)(o.SplitButton,{mainIcon:Object(r.createElement)(a.a,{icon:"pencil"}),menuLabel:"Select an action",onClick:function(){return alert("Icon Only Action clicked")},controls:[{label:"Up",icon:Object(r.createElement)(a.a,{icon:"arrow-up"}),onClick:function(){return alert("Icon Only Up clicked")}},{label:"Right",onClick:function(){return alert("Icon Only Right clicked")}},{label:"Down",icon:Object(r.createElement)(a.a,{icon:"arrow-down"}),onClick:function(){return alert("Icon Only Down clicked")}},{label:"Left",icon:Object(r.createElement)(a.a,{icon:"arrow-left"}),onClick:function(){return alert("Icon Only Left clicked")}}]}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({currentStep:"first",isComplete:!1,isPending:!1})((function(e){var t=e.currentStep,n=e.isComplete,c=e.isPending,a=e.setState,i=function(e){a({currentStep:e})},s=[{key:"first",label:"First",description:"Step item description",content:Object(r.createElement)("div",null,"First step content."),onClick:i},{key:"second",label:"Second",description:"Step item description",content:Object(r.createElement)("div",null,"Second step content."),onClick:i},{label:"Third",key:"third",description:"Step item description",content:Object(r.createElement)("div",null,"Third step content."),onClick:i},{label:"Fourth",key:"fourth",description:"Step item description",content:Object(r.createElement)("div",null,"Fourth step content."),onClick:i}],l=s.findIndex((function(e){return t===e.key}));return n&&s.forEach((function(e){return e.isComplete=!0})),Object(r.createElement)("div",null,n?Object(r.createElement)("button",{onClick:function(){return a({currentStep:"first",isComplete:!1})}},"Reset"):Object(r.createElement)("div",null,Object(r.createElement)("button",{onClick:function(){return a({currentStep:s[l-1].key})},disabled:l<1},"Previous step"),Object(r.createElement)("button",{onClick:function(){return a({currentStep:s[l+1].key})},disabled:l>=s.length-1},"Next step"),Object(r.createElement)("button",{onClick:function(){return a({isComplete:!0})},disabled:l!==s.length-1},"Complete"),Object(r.createElement)("button",{onClick:function(){return a({isPending:!c})}},"Toggle Spinner")),Object(r.createElement)(o.Stepper,{steps:s,currentStep:t,isPending:c}),Object(r.createElement)("br",null),Object(r.createElement)(o.Stepper,{isPending:c,isVertical:!0,steps:s,currentStep:t}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.SummaryList,null,(function(){return[Object(r.createElement)(o.SummaryNumber,{key:"revenue",value:"$829.40",label:"Total Sales",delta:29,href:"/analytics/report"}),Object(r.createElement)(o.SummaryNumber,{key:"refunds",value:"$24.00",label:"Refunds",delta:-10,href:"/analytics/report",selected:!0}),Object(r.createElement)(o.SummaryNumber,{key:"coupons",value:"$49.90",label:"Coupons",href:"/analytics/report"})]}))}},function(e,t,n){"use strict";n.r(t);var r=n(13),o=n.n(r),c=n(0),a=n(4),i=n(71),s=[{key:"month",label:"Month"},{key:"orders",label:"Orders"},{key:"revenue",label:"Revenue"}],l=[[{display:"January",value:1},{display:10,value:10},{display:"$530.00",value:530}],[{display:"February",value:2},{display:13,value:13},{display:"$675.00",value:675}],[{display:"March",value:3},{display:9,value:9},{display:"$460.00",value:460}]],u=[{label:"Gross Income",value:"$830.00"},{label:"Taxes",value:"$96.32"},{label:"Shipping",value:"$50.00"}];t.default=Object(i.a)({query:{paged:1}})((function(e){var t=e.query,n=e.setState;return Object(c.createElement)("div",null,Object(c.createElement)(a.H,null,"TableCard"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.TableCard,{title:"Revenue Last Week",rows:l,headers:s,onQueryChange:function(e){return function(t){return n({query:o()({},e,t)})}},query:t,rowsPerPage:7,totalRows:10,summary:u})),Object(c.createElement)(a.H,null,"Table only"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.Card,{className:"woocommerce-analytics__card"},Object(c.createElement)(a.Table,{caption:"Revenue Last Week",rows:l,headers:s}))),Object(c.createElement)(a.H,null,"Summary only"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.TableSummary,{data:u})),Object(c.createElement)(a.H,null,"Placeholder"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.Card,{className:"woocommerce-analytics__card"},Object(c.createElement)(a.TablePlaceholder,{caption:"Revenue Last Week",headers:s}))),Object(c.createElement)(a.H,null,"Empty Table"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.EmptyTable,null,"There are no entries.")))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=function(){};t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Tag,{label:"My tag",id:1}),Object(r.createElement)(o.Tag,{label:"Removable tag",id:2,remove:c}),Object(r.createElement)(o.Tag,{label:"Tag with popover",popoverContents:Object(r.createElement)("p",null,"This is a popover")}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({first:"",second:"",third:"",fourth:"",fifth:""})((function(e){var t=e.first,n=e.second,c=e.third,a=e.fourth,i=e.fifth,s=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.TextControlWithAffixes,{label:"Text field without affixes",value:t,placeholder:"Placeholder",onChange:function(e){return s({first:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{label:"Disabled text field without affixes",value:t,placeholder:"Placeholder",onChange:function(e){return s({first:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Text field with a prefix",value:n,onChange:function(e){return s({second:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Disabled text field with a prefix",value:n,onChange:function(e){return s({second:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"Prefix",suffix:"Suffix",label:"Text field with both affixes",value:c,onChange:function(e){return s({third:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"Prefix",suffix:"Suffix",label:"Disabled text field with both affixes",value:c,onChange:function(e){return s({third:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{suffix:"%",label:"Text field with a suffix",value:a,onChange:function(e){return s({fourth:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{suffix:"%",label:"Disabled text field with a suffix",value:a,onChange:function(e){return s({fourth:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Text field with prefix and help text",value:i,onChange:function(e){return s({fifth:e})},help:"This is some help text."}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Disabled text field with prefix and help text",value:i,onChange:function(e){return s({fifth:e})},help:"This is some help text.",disabled:!0}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({value:""})((function(e){var t=e.setState,n=e.value;return Object(r.createElement)("div",null,Object(r.createElement)(o.TextControl,{name:"text-control",label:"Enter text here",onChange:function(e){return t({value:e})},value:n}),Object(r.createElement)("br",null),Object(r.createElement)(o.TextControl,{label:"Disabled field",disabled:!0,value:""}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.ViewMoreList,{items:[Object(r.createElement)("i",null,"Lorem"),Object(r.createElement)("i",null,"Ipsum"),Object(r.createElement)("i",null,"Dolor"),Object(r.createElement)("i",null,"Sit")]})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.WebPreview,{src:"https://themes.woocommerce.com/?name=galleria",title:"My Web Preview"}))}},function(e,t,n){const{defaults:r}=n(125),{block:o}=n(237),{rtrim:c,splitCells:a,escape:i}=n(106);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=o.normal,this.options.pedantic?this.rules=o.pedantic:this.options.gfm&&(this.rules=o.gfm)}static get rules(){return o}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,s,l,u,d,p,m,b,h,f,g,v,M,O,y;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(s[0].length),t&&"paragraph"===t.type?t.text+="\n"+s[0].trimRight():(s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?s:c(s,"\n")}))}else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2]?s[2].trim():s[2],text:s[3]||""});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if((s=this.rules.nptable.exec(e))&&(d={type:"table",header:a(s[1].replace(/^ *| *\| *$/g,"")),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3]?s[3].replace(/\n$/,"").split("\n"):[]},d.header.length===d.align.length)){for(e=e.substring(s[0].length),f=0;f<d.align.length;f++)/^ *-+: *$/.test(d.align[f])?d.align[f]="right":/^ *:-+: *$/.test(d.align[f])?d.align[f]="center":/^ *:-+ *$/.test(d.align[f])?d.align[f]="left":d.align[f]=null;for(f=0;f<d.cells.length;f++)d.cells[f]=a(d.cells[f],d.header.length);this.tokens.push(d)}else if(s=this.rules.hr.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"hr"});else if(s=this.rules.blockquote.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"blockquote_start"}),s=s[0].replace(/^ *> ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),l=s[2],M=l.length>1,p={type:"list_start",ordered:M,start:M?+l:"",loose:!1},this.tokens.push(p),s=s[0].match(this.rules.item),m=[],n=!1,v=s.length,f=0;f<v;f++)d=s[f],h=d.length,d=d.replace(/^ *([*+-]|\d+\.) */,""),~d.indexOf("\n ")&&(h-=d.length,d=this.options.pedantic?d.replace(/^ {1,4}/gm,""):d.replace(new RegExp("^ {1,"+h+"}","gm"),"")),f!==v-1&&(u=o.bullet.exec(s[f+1])[0],(l.length>1?1===u.length:u.length>1||this.options.smartLists&&u!==l)&&(e=s.slice(f+1).join("\n")+e,f=v-1)),r=n||/\n\n(?!\s*$)/.test(d),f!==v-1&&(n="\n"===d.charAt(d.length-1),r||(r=n)),r&&(p.loose=!0),O=/^\[[ xX]\] /.test(d),y=void 0,O&&(y=" "!==d[1],d=d.replace(/^\[[ xX]\] +/,"")),b={type:"list_item_start",task:O,checked:y,loose:r},m.push(b),this.tokens.push(b),this.token(d,!1),this.tokens.push({type:"list_item_end"});if(p.loose)for(v=m.length,f=0;f<v;f++)m[f].loose=!0;this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===s[1]||"script"===s[1]||"style"===s[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0]});else if(t&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),s[3]&&(s[3]=s[3].substring(1,s[3].length-1)),g=s[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[g]||(this.tokens.links[g]={href:s[2],title:s[3]});else if((s=this.rules.table.exec(e))&&(d={type:"table",header:a(s[1].replace(/^ *| *\| *$/g,"")),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3]?s[3].replace(/\n$/,"").split("\n"):[]},d.header.length===d.align.length)){for(e=e.substring(s[0].length),f=0;f<d.align.length;f++)/^ *-+: *$/.test(d.align[f])?d.align[f]="right":/^ *:-+: *$/.test(d.align[f])?d.align[f]="center":/^ *:-+ *$/.test(d.align[f])?d.align[f]="left":d.align[f]=null;for(f=0;f<d.cells.length;f++)d.cells[f]=a(d.cells[f].replace(/^ *\| *| *\| *$/g,""),d.header.length);this.tokens.push(d)}else if(s=this.rules.lheading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:"="===s[2].charAt(0)?1:2,text:s[1]});else if(t&&(s=this.rules.paragraph.exec(e)))e=e.substring(s[0].length),this.tokens.push({type:"paragraph",text:"\n"===s[1].charAt(s[1].length-1)?s[1].slice(0,-1):s[1]});else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"text",text:s[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(182),o=n(238),c=n(239),a=n(240),{defaults:i}=n(125),{merge:s,unescape:l}=n(106);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||i,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new o}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new c(e.links,this.options),this.inlineText=new c(e.links,s({},this.options,{renderer:new a})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,o,c="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(c+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",o=0;o<n.length;o++)r+=this.renderer.tablecell(this.inline.output(n[o]),{header:!1,align:this.token.align[o]});e+=this.renderer.tablerow(r)}return this.renderer.table(c,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t){!function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var o=[],c=0;c<t.length;c++){var a=t[c],i=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?o.length>0&&o[o.length-1].tagName===n(a.content[0].content[1])&&o.pop():"/>"===a.content[a.content.length-1].content||o.push({tagName:n(a.content[0].content[1]),openedBraces:0}):o.length>0&&"punctuation"===a.type&&"{"===a.content?o[o.length-1].openedBraces++:o.length>0&&o[o.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?o[o.length-1].openedBraces--:i=!0),(i||"string"==typeof a)&&o.length>0&&0===o[o.length-1].openedBraces){var s=n(a);c<t.length-1&&("string"==typeof t[c+1]||"plain-text"===t[c+1].type)&&(s+=n(t[c+1]),t.splice(c+1,1)),c>0&&("string"==typeof t[c-1]||"plain-text"===t[c-1].type)&&(s=n(t[c-1])+s,t.splice(c-1,1),c--),t[c]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&r(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(Prism)},function(e,t,n){var r={"./advanced-filters/README.md":454,"./animation-slider/README.md":455,"./calendar/README.md":456,"./card/README.md":457,"./chart/README.md":458,"./chart/d3chart/d3base/README.md":459,"./compare-filter/README.md":460,"./count/README.md":461,"./date-range-filter-picker/README.md":462,"./date/README.md":463,"./dropdown-button/README.md":464,"./ellipsis-menu/README.md":465,"./empty-content/README.md":466,"./filter-picker/README.md":467,"./filters/README.md":468,"./flag/README.md":469,"./form/README.md":470,"./gravatar/README.md":471,"./higher-order/use-filters/README.md":472,"./image-upload/README.md":473,"./link/README.md":474,"./list/README.md":475,"./order-status/README.md":476,"./pagination/README.md":477,"./product-image/README.md":478,"./rating/README.md":479,"./scroll-to/README.md":480,"./search-list-control/README.md":481,"./search/README.md":482,"./section-header/README.md":483,"./section/README.md":484,"./segmented-selection/README.md":485,"./select-control/README.md":486,"./spinner/README.md":487,"./split-button/README.md":488,"./stepper/README.md":489,"./summary/README.md":490,"./table/README.md":491,"./tag/README.md":492,"./text-control-with-affixes/README.md":493,"./text-control/README.md":494,"./view-more-list/README.md":495,"./web-preview/README.md":496};function o(e){var t=c(e);return n(t)}function c(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=c,e.exports=o,o.id=453},function(e,t){e.exports="Advanced Filters\n===\n\nDisplays a configurable set of filters which can modify query parameters. Display, behavior, and types of filters can be designated by a configuration object.\n\n## Usage\n\nBelow is a config example complete with translation strings. Advanced Filters makes use of [interpolateComponents](https://github.com/Automattic/interpolate-components#readme) to organize sentence structure, resulting in a filter visually represented as a sentence fragment in any language.\n\n```js\nconst config = {\n\ttitle: __(\n\t\t// A sentence describing filters for Orders\n\t\t// See screen shot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t'Orders Match {{select /}} Filters',\n\t\t'woocommerce-admin'\n\t),\n\tfilters: {\n\t\tstatus: {\n\t\t\tlabels: {\n\t\t\t\tadd: __( 'Order Status', 'woocommerce-admin' ),\n\t\t\t\tremove: __( 'Remove order status filter', 'woocommerce-admin' ),\n\t\t\t\trule: __( 'Select an order status filter match', 'woocommerce-admin' ),\n\t\t\t\t// A sentence describing an Order Status filter\n\t\t\t\t// See screen shot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t\t\ttitle: __( 'Order Status {{rule /}} {{filter /}}', 'woocommerce-admin' ),\n\t\t\t\tfilter: __( 'Select an order status', 'woocommerce-admin' ),\n\t\t\t},\n\t\t\trules: [\n\t\t\t\t{\n\t\t\t\t\tvalue: 'is',\n\t\t\t\t\t// Sentence fragment, logical, \"Is\"\n\t\t\t\t\t// Refers to searching for orders matching a chosen order status\n\t\t\t\t\t// Screenshot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t\t\t\tlabel: _x( 'Is', 'order status', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'is_not',\n\t\t\t\t\t// Sentence fragment, logical, \"Is Not\"\n\t\t\t\t\t// Refers to searching for orders that don't match a chosen order status\n\t\t\t\t\t// Screenshot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t\t\t\tlabel: _x( 'Is Not', 'order status', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t],\n\t\t\tinput: {\n\t\t\t\tcomponent: 'SelectControl',\n\t\t\t\toptions: Object.keys( orderStatuses ).map( key => ( {\n\t\t\t\t\tvalue: key,\n\t\t\t\t\tlabel: orderStatuses[ key ],\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\nWhen filters are applied, the query string will be modified using a combination of rule names and selected filter values.\n\nTaking the above configuration as an example, applying the filter will result in a query parameter like `status_is=pending` or `status_is_not=cancelled`.\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`config` | Object | `null` | (required) The configuration object required to render filters. See example above.\n`path` | String | `null` | (required) Name of this filter, used in translations.\n`query` | Object | `null` | The query string represented in object form.\n`onAdvancedFilterAction` | Function | `null` | Function to be called after an advanced filter action has been taken.\n`siteLocale` | string | `'en_US'` | The siteLocale for the site.\n`currency` | Object | `null` | (required) The currency instance for the site (@woocommerce/currency).\n\n\n## Input Components\n\n\n### SelectControl\n\nRender a select component with options.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tfruit: {\n\t\t\tinput: {\n\t\t\t\tcomponent: 'SelectControl',\n\t\t\t\toptions: [\n\t\t\t\t\t{ label: 'Apples', key: 'apples' },\n\t\t\t\t\t{ label: 'Oranges', key: 'oranges' },\n\t\t\t\t\t{ label: 'Bananas', key: 'bananas' },\n\t\t\t\t\t{ label: 'Cherries', key: 'cherries' },\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\n`options`: An array of objects with `key` and `label` properties.\n\n\n### Search\n\nRender an input for users to search and select using an autocomplete.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tproduct: {\n\t\t\tinput: {\n\t\t\t\tcomponent: 'Search',\n\t\t\t\ttype: 'products',\n\t\t\t\tgetLabels: getRequestByIdString( NAMESPACE + 'products', product => ( {\n\t\t\t\t\tid: product.id,\n\t\t\t\t\tlabel: product.name,\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\n`type`: A string Autocompleter type used by the [Search Component](https://github.com/woocommerce/woocommerce-admin/tree/master/packages/components/src/search).\n`getLabels`: A function returning a Promise resolving to an array of objects with `id` and `label` properties.\n\n\n### Date\n\nRenders an input or two inputs allowing a user to filter based on a date value or range of values.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tregistered: {\n\t\t\trules: [\n\t\t\t\t{\n\t\t\t\t\tvalue: 'before',\n\t\t\t\t\tlabel: __( 'Before', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'after',\n\t\t\t\t\tlabel: __( 'After', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'between',\n\t\t\t\t\tlabel: __( 'Between', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t],\n\t\t\tinput: {\n\t\t\t\tcomponent: 'Date',\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\n\n### Numeric Value\n\nRenders an input or two inputs allowing a user to filter based on a numeric value or range of values. Can also render inputs for currency values.\n\nValid rule values are `after`, `before`, and `between`. Use any combination you'd like.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tquantity: {\n\t\t\trules: [\n\t\t\t\t{\n\t\t\t\t\tvalue: 'lessthan',\n\t\t\t\t\tlabel: __( 'Less Than', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'morethan',\n\t\t\t\t\tlabel: __( 'More Than', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'between',\n\t\t\t\t\tlabel: __( 'Between', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t],\n\t\t\tinput: {\n\t\t\t\tcomponent: 'Number',\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\nValid rule values are `lessthan`, `morethan`, and `between`. Use any combination you'd like.\n\nSpecify `input.type` as `'currency'` if you'd like to render currency inputs, which respects store currency locale.\n"},function(e,t){e.exports="AnimationSlider\n===\n\nThis component creates slideable content controlled by an animate prop to direct the contents to slide left or right.\nAll other props are passed to `CSSTransition`. More info at http://reactcommunity.org/react-transition-group/css-transition\n\n## Usage\n\n```jsx\n<AnimationSlider animationKey=\"1\" animate=\"right\">\n\t{ ( status ) => (\n\t\t<span>One (1)</span>\n\t) }\n</AnimationSlider>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | function | `null` | (required) A function returning rendered content with argument status, reflecting `CSSTransition` status\n`animationKey` | any | `null` | (required) A unique identifier for each slideable page\n`animate` | string | `null` | null, 'left', 'right', to designate which direction to slide on a change\n`onExited` | function | `null` | A function to be executed after a transition is complete, passing the containing ref as the argument\n"},function(e,t){e.exports='DatePicker\n===\n\n## Usage\n\n```jsx\n<DatePicker\n\tdate={ date }\n\ttext={ text }\n\terror={ error }\n\tonUpdate={ ( { date, text, error } ) => setState( { date, text, error } ) }\n\tdateFormat="MM/DD/YYYY"\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`date` | Object | `null` | A moment date object representing the selected date. `null` for no selection\n`disabled` | Boolean | `null` | Whether the input is disabled\n`text` | String | `null` | The date in human-readable format. Displayed in the text input\n`error` | String | `null` | A string error message, shown to the user\n`onUpdate` | Function | `null` | (required) A function called upon selection of a date or input change\n`dateFormat` | String | `null` | (required) The date format in moment.js-style tokens\n`isInvalidDate` | Function | `null` | A function to determine if a day on the calendar is not valid\n\n\nDateRange\n===\n\nThis is wrapper for a [react-dates](https://github.com/airbnb/react-dates) powered calendar.\n\n## Usage\n\n```jsx\n<DateRange\n\tafter={ after }\n\tafterText={ afterText }\n\tbefore={ before }\n\tbeforeText={ beforeText }\n\tonUpdate={ ( update ) => setState( update ) }\n\tshortDateFormat="MM/DD/YYYY"\n\tfocusedInput="startDate"\n\tisInvalidDate={ date => (\n\t\t// not a future date\n\t\tmoment().isBefore( moment( date ), \'date\' )\n\t) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`after` | Object | `null` | A moment date object representing the selected start. `null` for no selection\n`afterError` | String | `null` | A string error message, shown to the user\n`afterText` | String | `null` | The start date in human-readable format. Displayed in the text input\n`before` | Object | `null` | A moment date object representing the selected end. `null` for no selection\n`beforeError` | String | `null` | A string error message, shown to the user\n`beforeText` | String | `null` | The end date in human-readable format. Displayed in the text input\n`focusedInput` | String | `null` | String identifying which is the currently focused input (start or end)\n`isInvalidDate` | Function | `null` | A function to determine if a day on the calendar is not valid\n`onUpdate` | Function | `null` | (required) A function called upon selection of a date\n`shortDateFormat` | String | `null` | (required) The date format in moment.js-style tokens\n'},function(e,t){e.exports='Card\n===\n\nA basic card component with a header. The header can contain a title, an action, and an `EllipsisMenu` menu.\n\n## Usage\n\n```jsx\n<div>\n\t<Card title="Store Performance" description="Key performance metrics">\n\t\t<p>Your stuff in a Card.</p>\n\t</Card>\n\t<Card title="Inactive Card" isInactive>\n\t\t<p>This Card is grayed out and has no box-shadow.</p>\n\t</Card>\n</div>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`action` | ReactNode | `null` | One "primary" action for this card, appears in the card header\n`className` | String | `null` | Additional CSS classes\n`description` | One of type: string, node | `null` | The description displayed beneath the title\n`isInactive` | Boolean | `null` | Boolean representing whether the card is inactive or not\n`menu` | (custom validator) | `null` | An `EllipsisMenu`, with filters used to control the content visible in this card\n`title` | One of type: string, node | `null` | The title to use for this card\n'},function(e,t){e.exports="Chart\n===\n\nA chart container using d3, to display timeseries data with an interactive legend.\n\n## Usage\n\n```jsx\nconst data = [\n\t{\n\t\tdate: '2018-05-30T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 21599,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 38537,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 106010,\n\t\t},\n\t},\n\t{\n\t\tdate: '2018-05-31T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 14205,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 24721,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 70131,\n\t\t},\n\t},\n\t{\n\t\tdate: '2018-06-01T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 10581,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 19991,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 53552,\n\t\t},\n\t},\n\t{\n\t\tdate: '2018-06-02T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 9250,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 16072,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 47821,\n\t\t},\n\t},\n];\n\n<Chart data={ data } title=\"Example Chart\" layout=\"item-comparison\" />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`allowedIntervals` | Array | `null` | Allowed intervals to show in a dropdown\n`baseValue` | Number | `0` | Base chart value. If no data value is different than the baseValue, the `emptyMessage` will be displayed if provided\n`chartType` | One of: 'bar', 'line' | `'line'` | Chart type of either `line` or `bar`\n`data` | Array | `[]` | An array of data\n`dateParser` | String | `'%Y-%m-%dT%H:%M:%S'` | Format to parse dates into d3 time format\n`emptyMessage` | String | `null` | The message to be displayed if there is no data to render. If no message is provided, nothing will be displayed\n`filterParam` | String | `null` | Name of the param used to filter items. If specified, it will be used, in combination with query, to detect which elements are being used by the current filter and must be displayed even if their value is 0\n`itemsLabel` | String | `null` | Label describing the legend items\n`mode` | One of: 'item-comparison', 'time-comparison' | `'time-comparison'` | `item-comparison` (default) or `time-comparison`, this is used to generate correct ARIA properties\n`path` | String | `null` | Current path\n`query` | Object | `null` | The query string represented in object form\n`interactiveLegend` | Boolean | `true` | Whether the legend items can be activated/deactivated\n`interval` | One of: 'hour', 'day', 'week', 'month', 'quarter', 'year' | `'day'` | Interval specification (hourly, daily, weekly etc)\n`intervalData` | Object | `null` | Information about the currently selected interval, and set of allowed intervals for the chart. See `getIntervalsForQuery`\n`isRequesting` | Boolean | `false` | Render a chart placeholder to signify an in-flight data request\n`legendPosition` | One of: 'bottom', 'side', 'top' | `null` | Position the legend must be displayed in. If it's not defined, it's calculated depending on the viewport width and the mode\n`legendTotals` | Object | `null` | Values to overwrite the legend totals. If not defined, the sum of all line values will be used\n`screenReaderFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the screen reader labels\n`showHeaderControls` | Boolean | `true` | Wether header UI controls must be displayed\n`title` | String | `null` | A title describing this chart\n`tooltipLabelFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the tooltip label\n`tooltipValueFormat` | One of type: string, func | `','` | A number formatting string or function to format the value displayed in the tooltips\n`tooltipTitle` | String | `null` | A string to use as a title for the tooltip. Takes preference over `tooltipLabelFormat`\n`valueType` | String | `null` | What type of data is to be displayed? Number, Average, String?\n`xFormat` | String | `'%d'` | A datetime formatting string, passed to d3TimeFormat\n`x2Format` | String | `'%b %Y'` | A datetime formatting string, passed to d3TimeFormat\n`yBelow1Format` | String | `null` | A number formatting string, passed to d3Format\n`yFormat` | String | `null` | A number formatting string, passed to d3Format\n`currency` | Object | `{}` | An object with currency properties for usage in the chart. The following properties are expected: `decimal`, `symbol`, `symbolPosition`, `thousands`. This is passed to d3Format.\n"},function(e,t){e.exports="# D3 Base Component\n\nIntegrate React Lifecyle methods with d3.js charts.\n\n### Base Component Responsibilities\n\n* Create and manage mounting and unmounting parent `div` and `svg`\n* Handle resize events, resulting re-renders, and event listeners\n* Handle re-renders as a result of new props\n\n## Props\n\n### className\n{ string } A class to be applied to the parent `div`\n\n### getParams( node )\n{ function } A function returning an object containing required properties for drawing a chart. This object is created before re-render, making it an ideal place for calculating scales and other props or user input based properties.\n* `svg` { node } The parent `div`. Useful for calculating available widths\n\n### drawChart( svg, params )\n{ function } draw the chart\n* `svg` { node } Base element \n* `params` { Object } Properties created by the `getParams` function "},function(e,t){e.exports="CompareFilter\n===\n\nDisplays a card + search used to filter results as a comparison between objects.\n\n## Usage\n\n```jsx\nconst path = ''; // from React Router\nconst getLabels = () => Promise.resolve( [] );\nconst labels = {\n\thelpText: 'Select at least two products to compare',\n\tplaceholder: 'Search for products to compare',\n\ttitle: 'Compare Products',\n\tupdate: 'Compare',\n};\n\n<CompareFilter\n\ttype=\"products\"\n\tparam=\"product\"\n\tpath={ path }\n\tgetLabels={ getLabels }\n\tlabels={ labels }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`getLabels` | Function | `null` | (required) Function used to fetch object labels via an API request, returns a Promise\n`labels` | Object | `{}` | Object of localized labels\n`param` | String | `null` | (required) The parameter to use in the querystring\n`path` | String | `null` | (required) The `path` parameter supplied by React-Router\n`query` | Object | `{}` | The query string represented in object form\n`type` | String | `null` | (required) Which type of autocompleter should be used in the Search\n"},function(e,t){e.exports="Count\n===\n\nDisplay a number with a styled border.\n\n## Usage\n\n```jsx\n<Count count={ 33 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`count` | Number | `null` | (required) Value of the number to be displayed\n`label` | String | `''` | A translated label with the number in context, used for screen readers\n"},function(e,t){e.exports="Date Range Picker\n===\n\nSelect a range of dates or single dates\n\n## Usage\n\n```jsx\nimport {\n\tgetDateParamsFromQuery,\n\tgetCurrentDates,\n\tisoDateFormat,\n\tloadLocaleData,\n} from '@woocommerce/date';\n\n/**\n * External dependencies\n */\nimport { partialRight } from 'lodash';\n\nconst query = {};\n\n// Fetch locale from store settings and load for date functions.\nconst localeSettings = {\n\tuserLocale: 'fr_FR',\n\tweekdaysShort: [ 'dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam' ],\n};\nloadLocaleData( localeSettings );\n\nconst defaultDateRange = 'period=month&compare=previous_year';\nconst storeGetDateParamsFromQuery = partialRight( getDateParamsFromQuery, defaultDateRange );\nconst storeGetCurrentDates = partialRight( getCurrentDates, defaultDateRange );\nconst { period, compare, before, after } = storeGetDateParamsFromQuery( query );\nconst { primary: primaryDate, secondary: secondaryDate } = storeGetCurrentDates( query );\nconst dateQuery = {\n\tperiod,\n\tcompare,\n\tbefore,\n\tafter,\n\tprimaryDate,\n\tsecondaryDate,\n};\n\n<DateRangeFilterPicker\n\tkey=\"daterange\"\n\tonRangeSelect={ () => {} }\n\tdateQuery={ dateQuery }\n\tisoDateFormat={ isoDateFormat }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n------- | -------- | ------- | ---\n`isDateFormat` | string | `null` | (required) ISO date format string\n`onRangeSelect` | Function | `null` | Callback called when selection is made\n`dateQuery` | object | `null` | (required) Date initialization object\n\n## URL as the source of truth\n\nThe Date Range Picker reads parameters from the URL querystring and updates them by creating a link to reflect newly selected parameters, which is rendered as the \"Update\" button.\n\nURL Parameter | Default | Possible Values\n--- | --- | ---\n`period` | `today` | `today`, `yesterday`, `week`, `last_week`, `month`, `last_month`, `quarter`, `last_quarter`, `year`, `last_year`, `custom`\n`compare` | `previous_period` | `previous_period`, `previous_year`\n`start` | none | start date for custom periods `2018-04-15`. [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)\n`end` | none | end date for custom periods `2018-04-15`. [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)\n"},function(e,t){e.exports="Date\n===\n\nUse the `Date` component to display accessible dates or times.\n\n## Usage\n\n```jsx\n<Date date=\"2019-01-01\" />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`date` | One of type: string, object | `null` | (required) Date to use in the component\n`machineFormat` | String | `'Y-m-d H:i:s'` | Date format used in the `datetime` prop of the `time` element\n`screenReaderFormat` | String | `'F j, Y'` | Date format used for screen readers\n`visibleFormat` | String | `'Y-m-d'` | Date format displayed in the page\n"},function(e,t){e.exports="DropdownButton\n===\n\nA button useful for a launcher of a dropdown component. The button is 100% width of its container and displays single or multiple lines rendered as `<span/>` elments.\n\n## Usage\n\n```jsx\n<Dropdown\n\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t<DropdownButton\n\t\t\tonClick={ onToggle }\n\t\t\tisOpen={ isOpen }\n\t\t\tlabels={ [ 'All Products Sold' ] }\n\t\t/>\n\t) }\n\trenderContent={ () => (\n\t\t<p>Dropdown content here</p>\n\t) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`labels` | Array | `null` | (required) An array of elements to be rendered as the content of the button\n`isOpen` | Boolean | `null` | Boolean describing if the dropdown in open or not\n"},function(e,t){e.exports='EllipsisMenu\n===\n\nThis is a dropdown menu hidden behind a vertical ellipsis icon. When clicked, the inner MenuItems are displayed.\n\n## Usage\n\n```jsx\n<EllipsisMenu label="Choose which analytics to display"\n\trenderContent={ ( { onToggle } )=> {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<MenuTitle>Display Stats</MenuTitle>\n\t\t\t\t<MenuItem onInvoke={ () => setState( { showCustomers: ! showCustomers } ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel="Show Customers"\n\t\t\t\t\t\tchecked={ showCustomers }\n\t\t\t\t\t\tonChange={ () => setState( { showCustomers: ! showCustomers } ) }\n\t\t\t\t\t/>\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem onInvoke={ () => setState( { showOrders: ! showOrders } ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel="Show Orders"\n\t\t\t\t\t\tchecked={ showOrders }\n\t\t\t\t\t\tonChange={ () => setState( { showOrders: ! showOrders } ) }\n\t\t\t\t\t/>\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem onInvoke={ onToggle }>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel="Close menu"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\tClose Menu\n\t\t\t\t\t</Button>\n\t\t\t\t</MenuItem>\n\t\t\t</div>\n\t\t);\n\t} }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`label` | String | `null` | (required) The label shown when hovering/focusing on the icon button\n`renderContent` | Function | `null` | A function returning `MenuTitle`/`MenuItem` components as a render prop. Arguments from Dropdown passed as function arguments\n\n\nMenuItem\n===\n\n`MenuItem` is used to give the item an accessible wrapper, with the `menuitem` role and added keyboard functionality (`onInvoke`).\n`MenuItem`s can also be deemed "clickable", though this is disabled by default because generally the inner component handles\nthe click event.\n\n## Usage\n\n```jsx\n<MenuItem onInvoke={ onToggle }>\n\t<Button\n\t\tlabel="Close menu"\n\t\tonClick={ onToggle }\n\t>\n\tClose Menu\n\t</Button>\n</MenuItem>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`checked` | Boolean | `null` | Whether the menu item is checked or not. Only relevant for menu items with `isCheckbox`\n`children` | ReactNode | `null` | A renderable component (or string) which will be displayed as the content of this item. Generally a `ToggleControl`\n`isCheckbox` | Boolean | `false` | Whether the menu item is a checkbox (will render a FormToggle and use the `menuitemcheckbox` role)\n`isClickable` | Boolean | `false` | Boolean to control whether the MenuItem should handle the click event. Defaults to false, assuming your child component handles the click event\n`onInvoke` | Function | `null` | (required) A function called when this item is activated via keyboard ENTER or SPACE; or when the item is clicked (only if `isClickable` is set)\n\n\nMenuTitle\n===\n\n`MenuTitle` is another valid Menu child, but this does not have any accessibility attributes associated\n(so this should not be used in place of the `EllipsisMenu` prop `label`).\n\n## Usage\n\n```jsx\n<MenuTitle>Display Stats</MenuTitle>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | ReactNode | `null` | A renderable component (or string) which will be displayed as the content of this item\n'},function(e,t){e.exports='EmptyContent\n===\n\nA component to be used when there is no data to show.\nIt can be used as an opportunity to provide explanation or guidance to help a user progress.\n\n## Usage\n\n```jsx\n<EmptyContent\n\ttitle="Nothing here"\n\tmessage="Some descriptive text"\n\tactionLabel="Reload page"\n\tactionURL="#"\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`title` | String | `null` | (required) The title to be displayed\n`message` | String | `null` | An additional message to be displayed\n`illustration` | String | `\'/empty-content.svg\'` | The url string of an image path. Prefix with `/` to load an image relative to the plugin directory\n`illustrationHeight` | Number | `null` | Height to use for the illustration\n`illustrationWidth` | Number | `400` | Width to use for the illustration\n`actionLabel` | String | `null` | (required) Label to be used for the primary action button\n`actionURL` | String | `null` | URL to be used for the primary action button\n`actionCallback` | Function | `null` | Callback to be used for the primary action button\n`secondaryActionLabel` | String | `null` | Label to be used for the secondary action button\n`secondaryActionURL` | String | `null` | URL to be used for the secondary action button\n`secondaryActionCallback` | Function | `null` | Callback to be used for the secondary action button\n`className` | String | `null` | Additional CSS classes\n'},function(e,t){e.exports="Filter Picker\n===\n\nModify a url query parameter via a dropdown selection of configurable options. This component manipulates the `filter` query parameter.\n\n## Usage\n\n```jsx\nimport { FilterPicker } from '@woocommerce/components';\n\nconst renderFilterPicker = () => {\n\tconst filters = [\n\t\t{ label: 'Breakfast', value: 'breakfast' },\n\t\t{\n\t\t\tlabel: 'Lunch',\n\t\t\tvalue: 'lunch',\n\t\t\tsubFilters: [\n\t\t\t\t{ label: 'Meat', value: 'meat', path: [ 'lunch' ] },\n\t\t\t\t{ label: 'Vegan', value: 'vegan', path: [ 'lunch' ] },\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Pescatarian',\n\t\t\t\t\tvalue: 'fish',\n\t\t\t\t\tpath: [ 'lunch' ],\n\t\t\t\t\tsubFilters: [\n\t\t\t\t\t\t{ label: 'Snapper', value: 'snapper', path: [ 'lunch', 'fish' ] },\n\t\t\t\t\t\t{ label: 'Cod', value: 'cod', path: [ 'lunch', 'fish' ] },\n\t\t\t\t\t\t// Specify a custom component to render (Work in Progress)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Other',\n\t\t\t\t\t\t\tvalue: 'other_fish',\n\t\t\t\t\t\t\tpath: [ 'lunch', 'fish' ],\n\t\t\t\t\t\t\tcomponent: 'OtherFish',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{ label: 'Dinner', value: 'dinner' },\n\t];\n\n\treturn <FilterPicker filters={ filters } path={ path } query={ query } />;\n};\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`config` | Object | `null` | (required) An array of filters and subFilters to construct the menu\n`path` | String | `null` | (required) The `path` parameter supplied by React-Router\n`query` | Object | `{}` | The query string represented in object form\n`onFilterSelect` | Function | `() => {}` | Function to be called after filter selection\n\n### `config` structure\n\nThe `config` prop has the following structure:\n\n- `label`: String - A label above the filter selector.\n- `staticParams`: Array - Url parameters to persist when selecting a new filter.\n- `param`: String - The url paramter this filter will modify.\n- `defaultValue`: String - The default paramter value to use instead of 'all'.\n- `showFilters`: Function - Determine if the filter should be shown. Supply a function with the query object as an argument returning a boolean.\n- `filters`: Array - Array of filter objects.\n\n### `filters` structure\n\nThe `filters` prop is an array of filter objects. Each filter object should have the following format:\n\n- `chartMode`: One of: 'item-comparison', 'time-comparison'\n- `component`: String - A custom component used instead of a button, might have special handling for filtering. TBD, not yet implemented.\n- `label`: String - The label for this filter. Optional only for custom component filters.\n- `path`: String - An array representing the \"path\" to this filter, if nested.\n- `subFilters`: Array - An array of more filter objects that act as \"children\" to this item. This set of filters is shown if the parent filter is clicked.\n- `value`: String - The value for this filter, used to set the `filter` query param when clicked, if there are no `subFilters`.\n"},function(e,t){e.exports='ReportFilters\n===\n\nAdd a collection of report filters to a page. This uses `DatePicker` & `FilterPicker` for the "basic" filters, and `AdvancedFilters`\nor a comparison card if "advanced" or "compare" are picked from `FilterPicker`.\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`advancedFilters` | Object | `{}` | Config option passed through to `AdvancedFilters`\n`siteLocale` | string| `en_US` | The locale of the site. Passed through to `AdvancedFilters`\n`currency` | object | {} | The currency of the site. Passed through to `AdvancedFilters`\n`filters` | Array | `[]` | Config option passed through to `FilterPicker` - if not used, `FilterPicker` is not displayed\n`path` | String | `null` | (required) The `path` parameter supplied by React-Router\n`query` | Object | `{}` | The query string represented in object form\n`showDatePicker` | Boolean | `true` | Whether the date picker must be shown\n`onDateSelect` | Function | `() => {}` | Function to be called after date selection\n`onFilterSelect` | Function | `null` | Function to be called after filter selection\n`onAdvancedFilterAction` | Function | `null` | Function to be called after an advanced filter action has been taken\n`storeDate` | object | `null` | (required) Date utility function object bound to store settings.\n'},function(e,t){e.exports="Flag\n===\n\nUse the `Flag` component to display a country's flag using the operating system's emojis.\n\n React component.\n\n## Usage\n\n```jsx\n<Flag code=\"VU\" size={ 48 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`code` | String | `null` | Two letter, three letter or three digit country code\n`order` | Object | `null` | An order can be passed instead of `code` and the code will automatically be pulled from the billing or shipping data\n`className` | String | `null` | Additional CSS classes\n`size` | Number | `null` | Supply a font size to be applied to the emoji flag\n"},function(e,t){e.exports="Form\n===\n\nA form component to handle form state and provide input helper props.\n\n## Usage\n\n```jsx\nconst initialValues = { firstName: '' };\n\n<Form\n\tonSubmitCallback={ ( values ) => {} }\n\tinitialValues={ initialValues }\n>\n\t{ ( {\n\t\tgetInputProps,\n\t\tvalues,\n\t\terrors,\n\t\thandleSubmit,\n\t} ) => (\n\t\t<div>\n\t\t\t<TextControl\n\t\t\t\tlabel={ 'First Name' }\n\t\t\t\t{ ...getInputProps( 'firstName' ) }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\tisPrimary\n\t\t\t\tonClick={ handleSubmit }\n\t\t\t\tdisabled={ Object.keys( errors ).length }\n\t\t\t>\n\t\t\t\tSubmit\n\t\t\t</Button>\n\t\t</div>\n\t) }\n</Form>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | * | `null` | A renderable component in which to pass this component's state and helpers. Generally a number of input or other form elements\n`errors` | Object | `{}` | Object of all initial errors to store in state\n`initialValues` | Object | `{}` | Object key:value pair list of all initial field values\n`onSubmitCallback` | Function | `noop` | Function to call when a form is submitted with valid fields\n`validate` | Function | `noop` | A function that is passed a list of all values and should return an `errors` object with error response\n`touched` | | `{}` | \n"},function(e,t){e.exports='Gravatar\n===\n\nDisplay a users Gravatar.\n\n## Usage\n\n```jsx\n<Gravatar\n\tuser="email@example.org"\n\tsize={ 48 }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`user` | One of type: object, string | `null` | The address to hash for displaying a Gravatar. Can be an email address or WP-API user object\n`alt` | String | `null` | Text to display as the image alt attribute\n`title` | String | `null` | Text to use for the image\'s title\n`size` | Number | `60` | Default 60. The size of Gravatar to request\n`className` | String | `null` | Additional CSS classes\n'},function(e,t){e.exports="useFilters\n==========\n\n`useFilters` is a fork of [gutenberg's `withFilters`.](https://github.com/WordPress/gutenberg/tree/master/packages/components/src/higher-order/with-filters) It is also a React [higher-order component.](https://facebook.github.io/react/docs/higher-order-components.html)\n\nWrapping a component with `useFilters` provides a filtering capability controlled externally by the list of `hookName`s.\n\n## Usage\n\n```jsx\nimport { applyFilters } from '@wordpress/hooks';\nimport { useFilters } from '@woocommerce/components';\n\nfunction MyCustomElement() {\n\treturn <h3>{ applyFilters( 'woocommerce.componentTitle', 'Title Text' ) }</h3>;\n}\n\nexport default useFilters( [ 'woocommerce.componentTitle' ] )( MyCustomElement );\n```\n\n`useFilters` expects an array argument which provides a list of hook names. It returns a function which can then be used in composing your component. The list of hook names are used in your component with `applyFilters`. Any filters added to the given hooks are run when added, and update your content (the title text, in this example).\n\n### Adding filters\n\n```js\nfunction editText( string ) {\n\treturn `Filtered: ${ string }`;\n}\naddFilter( 'woocommerce.componentTitle', 'editText', editText );\n```\n\nIf we added this filter, our `MyCustomElement` component would display:\n\n```html\n<h3>Filtered: Title Text</h3>\n```\n"},function(e,t){e.exports="ImageUpload\n===\n\nImageUpload - Adds an upload area for selecting or uploading an image from the WordPress media gallery.\n\n## Usage\n\n```jsx\n\t<ImageUpload image={ image } onChange={ newImage => setState( { url: newImage } ) } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`image` | Object | `null` | Image information containing media gallery `id` and image `url`\n`onChange` | Function | `null` | Function to trigger when the selected image changes\n`className` | String | `null` | Additional class name to style the component\n"},function(e,t){e.exports="Link\n===\n\nUse `Link` to create a link to another resource. It accepts a type to automatically\ncreate wp-admin links, wc-admin links, and external links.\n\n## Usage\n\n```jsx\n<Link\n\thref=\"edit.php?post_type=shop_coupon\"\n\ttype=\"wp-admin\"\n>\n\tCoupons\n</Link>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`href` | String | `null` | (required) The resource to link to\n`type` | One of: 'wp-admin', 'wc-admin', 'external' | `'wc-admin'` | Type of link. For wp-admin and wc-admin, the correct prefix is appended\n"},function(e,t){e.exports="List\n===\n\nList component to display a list of items.\n\n## Usage\n\n```jsx\nconst listItems = [\n\t{\n\t\ttitle: 'List item title',\n\t\tdescription: 'List item description text',\n\t},\n\t{\n\t\tbefore: <Gridicon icon=\"star\" />,\n\t\ttitle: 'List item with before icon',\n\t\tdescription: 'List item description text',\n\t},\n\t{\n\t\tbefore: <Gridicon icon=\"star\" />,\n\t\tafter: <Gridicon icon=\"chevron-right\" />,\n\t\ttitle: 'List item with before and after icons',\n\t\tdescription: 'List item description text',\n\t},\n\t{\n\t\ttitle: 'Clickable list item',\n\t\tdescription: 'List item description text',\n\t\tonClick: () => alert( 'List item clicked' ),\n\t},\n];\n\n<List items={ listItems } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n`items` | Array | `null` | (required) An array of list items\n\n`items` structure:\n\n* `after`: ReactNode - Content displayed after the list item text.\n* `before`: ReactNode - Content displayed before the list item text.\n* `className`: String - Additional class name to style the list item.\n* `description`: String - Description displayed beneath the list item title.\n* `href`: String - Href attribute used in a Link wrapped around the item.\n* `onClick`: Function - Called when the list item is clicked.\n* `target`: String - Target attribute used for Link wrapper.\n* `title`: String - Title displayed for the list item."},function(e,t){e.exports="OrderStatus\n===\n\nUse `OrderStatus` to display a badge with human-friendly text describing the current order status.\n\n## Usage\n\n```jsx\nconst order = { status: 'processing' }; // Use a real WooCommerce Order here.\n\n<OrderStatus order={ order } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`order` | Object | `null` | (required) The order to display a status for. See: https://woocommerce.github.io/woocommerce-rest-api-docs/#order-properties\n`className` | String | `null` | Additional CSS classes\n`orderStatusMap` | Object | {} | A map of order status to human-friendly label.\n"},function(e,t){e.exports="Pagination\n===\n\nUse `Pagination` to allow navigation between pages that represent a collection of items.\nThe component allows for selecting a new page and items per page options.\n\n## Usage\n\n```jsx\n<Pagination\n\tpage={ 1 }\n\tperPage={ 10 }\n\ttotal={ 500 }\n\tonPageChange={ ( newPage ) => setState( { page: newPage } ) }\n\tonPerPageChange={ ( newPerPage ) => setState( { perPage: newPerPage } ) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`page` | Number | `null` | (required) The current page of the collection\n`onPageChange` | Function | `noop` | A function to execute when the page is changed\n`perPage` | Number | `null` | (required) The amount of results that are being displayed per page\n`onPerPageChange` | Function | `noop` | A function to execute when the per page option is changed\n`total` | Number | `null` | (required) The total number of results\n`className` | String | `null` | Additional classNames\n"},function(e,t){e.exports="ProductImage\n===\n\nUse `ProductImage` to display a product's or variation's featured image.\nIf no image can be found, a placeholder matching the front-end image\nplaceholder will be displayed.\n\n## Usage\n\n```jsx\n// Use a real WooCommerce Product here.\nconst product = {\n\timages: [\n\t\t{\n\t\t\tsrc: 'https://cldup.com/6L9h56D9Bw.jpg',\n\t\t},\n\t],\n};\n\n<ProductImage product={ product } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`width` | Number | `60` | The width of image to display\n`height` | Number | `60` | The height of image to display\n`className` | String | `''` | Additional CSS classes\n`product` | Object | `null` | Product or variation object. The image to display will be pulled from `product.images` or `variation.image`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties and https://woocommerce.github.io/woocommerce-rest-api-docs/#product-variation-properties\n`alt` | String | `null` | Text to use as the image alt attribute\n"},function(e,t){e.exports="Rating\n===\n\nUse `Rating` to display a set of stars, filled, empty or half-filled, that represents a\nrating in a scale between 0 and the prop `totalStars` (default 5).\n\n## Usage\n\n```jsx\n<Rating rating={ 2.5 } totalStars={ 6 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`rating` | Number | `0` | Number of stars that should be filled. You can pass a partial number of stars like `2.5`\n`totalStars` | Number | `5` | The total number of stars the rating is out of\n`size` | Number | `18` | The size in pixels the stars should be rendered at\n`className` | String | `null` | Additional CSS classes\n\n\nProductRating\n===\n\nDisplay a set of stars representing the product's average rating.\n\n## Usage\n\n```jsx\n// Use a real WooCommerce Product here.\nconst product = { average_rating: 3.5 };\n\n<ProductRating product={ product } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`product` | Object | `null` | (required) A product object containing a `average_rating`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#products\n\n\nReviewRating\n===\n\nDisplay a set of stars representing the review's rating.\n\n## Usage\n\n```jsx\n// Use a real WooCommerce Review here.\nconst review = { rating: 5 };\n\n<ReviewRating review={ review } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`review` | Object | `null` | (required) A review object containing a `rating`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#retrieve-product-reviews\n"},function(e,t){e.exports="ScrollTo\n===\n\n\n\n## Usage\n\n```jsx\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`offset` | String | ``'0'`` | The offset from the top of the component\n"},function(e,t){e.exports='SearchListControl\n===\n\nComponent to display a searchable, selectable list of items.\n\n## Usage\n\n```jsx\n<SearchListControl\n\tlist={ list }\n\tisLoading={ loading }\n\tselected={ selected }\n\tonChange={ items => setState( { selected: items } ) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`isHierarchical` | Boolean | `null` | Whether the list of items is hierarchical or not. If true, each list item is expected to have a parent property\n`isLoading` | Boolean | `null` | Whether the list of items is still loading\n`isSingle` | Boolean | `null` | Restrict selections to one item\n`list` | Array | `null` | A complete list of item objects, each with id, name properties. This is displayed as a clickable/keyboard-able list, and possibly filtered by the search term (searches name)\n`messages` | Object | `null` | Messages displayed or read to the user. Configure these to reflect your object type. See `defaultMessages` above for examples\n`onChange` | Function | `null` | (required) Callback fired when selected items change, whether added, cleared, or removed. Passed an array of item objects (as passed in via props.list)\n`onSearch` | Function | `null` | Callback fired when the search field is used\n`renderItem` | Function | `null` | Callback to render each item in the selection list, allows any custom object-type rendering\n`selected` | Array | `null` | (required) The list of currently selected items\n`search` | String | `null` | \n`setState` | Function | `null` | \n`debouncedSpeak` | Function | `null` | \n`instanceId` | Number | `null` | \n\n### `list` item structure:\n\n - `id`: Number\n - `name`: String\n\n### `messages` object structure:\n\n - `clear`: String - A more detailed label for the "Clear all" button, read to screen reader users.\n - `list`: String - Label for the list of selectable items, only read to screen reader users.\n - `noItems`: String - Message to display when the list is empty (implies nothing loaded from the server\nor parent component).\n - `noResults`: String - Message to display when no matching results are found. %s is the search term.\n - `search`: String - Label for the search input\n - `selected`: Function - Label for the selected items. This is actually a function, so that we can pass\nthrough the count of currently selected items.\n - `updated`: String - Label indicating that search results have changed, read to screen reader users.\n\n\nSearchListItem\n===\n\n## Usage\n\nUsed implicitly by `SearchListControl` when the `renderItem` prop is omitted.\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`countLabel` | ReactNode | `null` | Label to display if `showCount` is set to true. If undefined, it will use `item.count`\n`depth` | Number | `0` | Depth, non-zero if the list is hierarchical\n`item` | Object | `null` | Current item to display\n`isSelected` | Boolean | `null` | Whether this item is selected\n`isSingle` | Boolean | `null` | Whether this should only display a single item (controls radio vs checkbox icon)\n`onSelect` | Function | `null` | Callback for selecting the item\n`search` | String | `\'\'` | Search string, used to highlight the substring in the item name\n`showCount` | Boolean | `false` | Toggles the "count" bubble on/off\n'},function(e,t){e.exports="Search\n===\n\nA search box which autocompletes results while typing, allowing for the user to select an existing object\n(product, order, customer, etc). Currently only products are supported.\n\n## Usage\n\n```jsx\n<Search\n\ttype=\"products\"\n\tplaceholder=\"Search for a product\"\n\tselected={ selected }\n\tonChange={ items => setState( { selected: items } ) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`allowFreeTextSearch` | Boolean | `false` | Render additional options in the autocompleter to allow free text entering depending on the type\n`className` | String | `null` | Class name applied to parent div\n`onChange` | Function | `noop` | Function called when selected results change, passed result list\n`type` | One of: 'categories', 'countries', 'coupons', 'customers', 'downloadIps', 'emails', 'orders', 'products', 'taxes', 'usernames', 'variations' | `null` | (required) The object type to be used in searching\n`placeholder` | String | `null` | A placeholder for the search input\n`selected` | Array | `[]` | An array of objects describing selected values. If the label of the selected value is omitted, the Tag of that value will not be rendered inside the search box.\n`inlineTags` | Boolean | `false` | Render tags inside input, otherwise render below input\n`showClearButton` | Boolean | `false` | Render a 'Clear' button next to the input box to remove its contents\n`staticResults` | Boolean | `false` | Render results list positioned statically instead of absolutely\n`disabled` | Boolean | `false` | Whether the control is disabled or not\n\n### `selected` item structure:\n\n- `id`: One of type: number, string\n- `label`: String"},function(e,t){e.exports='SectionHeader\n===\n\nA header component. The header can contain a title, actions via children, and an `EllipsisMenu` menu.\n\n## Usage\n\n```jsx\n<SectionHeader title="Section Title" />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`menu` | (custom validator) | `null` | An `EllipsisMenu`, with filters used to control the content visible in this card\n`title` | One of type: string, node | `null` | (required) The title to use for this card\n'},function(e,t){e.exports='H\n===\n\nThese components are used to frame out the page content for accessible heading hierarchy. Instead of defining fixed heading levels\n(`h2`, `h3`, …) you can use `<H />` to create "section headings", which look to the parent `<Section />`s for the appropriate\nheading level.\n\n## Usage\n\n```jsx\n<div>\n\t<H>Header using a contextual level (h3)</H>\n\t<Section component="article">\n\t\t<p>This is an article component wrapper.</p>\n\t\t<H>Another header with contextual level (h4)</H>\n\t\t<Section component={ false }>\n\t\t\t<p>There is no wrapper component here.</p>\n\t\t\t<H>This is an h5</H>\n\t\t</Section>\n\t</Section>\n</div>\n```\n\nSection\n===\n\nThe section wrapper, used to indicate a sub-section (and change the header level context).\n\n## Usage\n\nSee above\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`component` | One of type: func, string, bool | `null` | The wrapper component for this section. Optional, defaults to `div`. If passed false, no wrapper is used. Additional props passed to Section are passed on to the component\n`children` | ReactNode | `null` | The children inside this section, rendered in the `component`. This increases the context level for the next heading used\n'},function(e,t){e.exports="SegmentedSelection\n===\n\nCreate a panel of styled selectable options rendering stylized checkboxes and labels\n\n## Usage\n\n```jsx\n<SegmentedSelection\n\toptions={ [\n\t\t{ value: 'one', label: 'One' },\n\t\t{ value: 'two', label: 'Two' },\n\t\t{ value: 'three', label: 'Three' },\n\t\t{ value: 'four', label: 'Four' },\n\t] }\n\tselected={ selected }\n\tlegend=\"Select a number\"\n\tonSelect={ ( data ) => setState( { selected: data[ name ] } ) }\n\tname={ name }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`options` | Array | `null` | (required) An Array of options to render. The array needs to be composed of objects with properties `label` and `value`\n`selected` | String | `null` | Value of selected item\n`onSelect` | Function | `null` | (required) Callback to be executed after selection\n`name` | String | `null` | (required) This will be the key in the key and value arguments supplied to `onSelect`\n`legend` | String | `null` | (required) Create a legend visible to screen readers\n\n### `options` structure\n\nThe `options` array needs to be composed of objects with properties:\n\n- `value`: String - Input value for this option.\n- `label`: String - Label for this option."},function(e,t){e.exports="# SelectControl\n\nA search box which filters options while typing,\nallowing a user to select from an option from a filtered list.\n\n## Usage\n\n```jsx\nconst options = [\n\t{\n\t\tkey: 'apple',\n\t\tlabel: 'Apple',\n\t\tvalue: { id: 'apple' },\n\t},\n\t{\n\t\tkey: 'apricot',\n\t\tlabel: 'Apricot',\n\t\tvalue: { id: 'apricot' },\n\t},\n];\n\n<SelectControl\n\tlabel=\"Single value\"\n\tonChange={ selected => setState( { singleSelected: selected } ) }\n\toptions={ options }\n\tplaceholder=\"Start typing to filter options...\"\n\tselected={ singleSelected }\n/>;\n```\n\n### Props\n\n| Name | Type | Default | Description |\n| ------------------------ | ------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `className` | string | `null` | Class name applied to parent div |\n| `excludeSelectedOptions` | boolean | `true` | Exclude already selected options from the options list |\n| `onFilter` | function | `identity` | Add or remove items to the list of options after filtering, passed the array of filtered options and should return an array of options. |\n| `getSearchExpression` | function | `identity` | Function to add regex expression to the filter the results, passed the search query |\n| `help` | string\\|node | `null` | Help text to be appended beneath the input |\n| `inlineTags` | boolean | `false` | Render tags inside input, otherwise render below input |\n| `label` | string | `null` | A label to use for the main input |\n| `onChange` | function | `noop` | Function called when selected results change, passed result list |\n| `onSearch` | function | `noop` | Function to run after the search query is updated, passed the search query |\n| `options` | array | `null` | (required) An array of objects for the options list. The option along with its key, label and value will be returned in the onChange event |\n| `placeholder` | string | `null` | A placeholder for the search input |\n| `selected` | array | `[]` | An array of objects describing selected values. If the label of the selected value is omitted, the Tag of that value will not be rendered inside the search box |\n| `maxResults` | number | `0` | A limit for the number of results shown in the options menu. Set to 0 for no limit |\n| `multiple` | boolean | `false` | Allow multiple option selections |\n| `showClearButton` | boolean | `false` | Render a 'Clear' button next to the input box to remove its contents |\n| `hideBeforeSearch` | boolean | `false` | Only show list options after typing a search query |\n| `staticList` | boolean | `false` | Render results list positioned statically instead of absolutely |\n"},function(e,t){e.exports="Spinner\n===\n\nSpinner - An indeterminate circular progress indicator.\n\n## Usage\n\n```jsx\n<Spinner />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n"},function(e,t){e.exports="SplitButton\n===\n\nA component for displaying a button with a main action plus a secondary set of actions behind a menu toggle.\n\n## Usage\n\n```jsx\n<SplitButton\n\tisPrimary\n\tmainLabel=\"Primary Button\"\n\tmenuLabel=\"Select an action\"\n\tonClick={ () => alert( 'Primary Main Action clicked' ) }\n\tcontrols={ [\n\t\t{\n\t\t\tlabel: 'Up',\n\t\t\tonClick: () => alert( 'Primary Up clicked' ),\n\t\t},\n\t\t{\n\t\t\tlabel: 'Down',\n\t\t\ticon: <Gridicon icon=\"arrow-down\" />,\n\t\t\tonClick: () => alert( 'Primary Down clicked' ),\n\t\t},\n\t] }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`isPrimary` | Boolean | `false` | Whether the button is styled as a primary button\n`mainIcon` | ReactNode | `null` | Icon for the main button\n`mainLabel` | String | `null` | Label for the main button\n`onClick` | Function | `noop` | Function to activate when the the main button is clicked\n`menuLabel` | String | `null` | Label to display for the menu of actions, used as a heading on the mobile popover and for accessible text\n`controls` | Array | `null` | (required) An array of additional actions. Accepts additional icon, label, and onClick props\n`className` | String | `null` | Additional CSS classes\n\n### `controls` structure\n\nArray of additional actions with properties:\n\n- `icon`: One of type: string, element\n- `label`: String - Label displayed for this button.\n- `onClick`: Function - Click handler for this button."},function(e,t){e.exports="Stepper\n===\n\nA stepper component to indicate progress in a set number of steps.\n\n## Usage\n\n```jsx\nconst steps = [\n\t{\n\t\tkey: 'first',\n\t\tlabel: 'First',\n\t\tdescription: 'Step item description',\n\t\tcontent: <div>First step content.</div>,\n\t},\n\t{\n\t\tkey: 'second',\n\t\tlabel: 'Second',\n\t\tdescription: 'Step item description',\n\t\tcontent: <div>Second step content.</div>,\n\t},\n];\n\n<Stepper\n\tsteps={ steps }\n\tcurrentStep=\"first\"\n\tisPending={ true }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n`currentStep` | String | `null` | (required) The current step's key\n`steps` | Array | `null` | (required) An array of steps used\n`isVertical` | Boolean | `false` | If the stepper is vertical instead of horizontal\n`isPending` | Boolean | `false` | Optionally mark the current step as pending to show a spinner\n\n### `steps` structure\n\nArray of step objects with properties:\n\n- `key:` String - Key used to identify step.\n- `label`: String - Label displayed in stepper.\n- `description`: String - Description displayed beneath the label.\n- `isComplete`: Boolean - Optionally mark a step complete regardless of step index.\n- `content`: ReactNode - Content displayed when the step is active."},function(e,t){e.exports='SummaryList\n===\n\nA container element for a list of SummaryNumbers. This component handles detecting & switching to the mobile format on smaller screens.\n\n## Usage\n\n```jsx\n<SummaryList>\n\t{ () => {\n\t\treturn [\n\t\t\t<SummaryNumber\n\t\t\t\tkey="revenue"\n\t\t\t\tvalue={ \'$829.40\' }\n\t\t\t\tlabel="Total Sales"\n\t\t\t\tdelta={ 29 }\n\t\t\t\thref="/analytics/report"\n\t\t\t/>,\n\t\t\t<SummaryNumber\n\t\t\t\tkey="refunds"\n\t\t\t\tvalue={ \'$24.00\' }\n\t\t\t\tlabel="Refunds"\n\t\t\t\tdelta={ -10 }\n\t\t\t\thref="/analytics/report"\n\t\t\t\tselected\n\t\t\t/>,\n\t\t];\n\t} }\n</SummaryList>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | Function | `null` | (required) A function returning a list of `<SummaryNumber />`s\n`label` | String | `__( \'Performance Indicators\', \'woocommerce-admin\' )` | An optional label of this group, read to screen reader users\n\n\nSummaryNumber\n===\n\nA component to show a value, label, and an optional change percentage. Can also act as a link to a specific report focus.\n\n## Usage\n\nSee above\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`delta` | Number | `null` | A number to represent the percentage change since the last comparison period - positive numbers will show a green up arrow, negative numbers will show a red down arrow, and zero will show a flat right arrow. If omitted, no change value will display\n`href` | String | `\'\'` | An internal link to the report focused on this number\n`isOpen` | Boolean | `false` | Boolean describing whether the menu list is open. Only applies in mobile view, and only applies to the toggle-able item (first in the list)\n`label` | String | `null` | (required) A string description of this value, ex "Revenue", or "New Customers"\n`onToggle` | Function | `null` | A function used to switch the given SummaryNumber to a button, and called on click\n`prevLabel` | String | `__( \'Previous Period:\', \'woocommerce-admin\' )` | A string description of the previous value\'s timeframe, ex "Previous Year:"\n`prevValue` | One of type: number, string | `null` | A string or number value to display - a string is allowed so we can accept currency formatting. If omitted, this section won\'t display\n`reverseTrend` | Boolean | `false` | A boolean used to indicate that a negative delta is "good", and should be styled like a positive (and vice-versa)\n`selected` | Boolean | `false` | A boolean used to show a highlight style on this number\n`value` | One of type: number, string | `null` | A string or number value to display - a string is allowed so we can accept currency formatting\n`onLinkClickCallback` | Function | `noop` | A function to be called after a SummaryNumber, rendered as a link, is clicked\n\n\nSummaryListPlaceholder\n===\n\n`SummaryListPlaceholder` behaves like `SummaryList` but displays placeholder summary items instead of data. This can be used while loading data.\n\n## Usage\n\n```jsx\n<SummaryListPlaceholder numberOfItems={ 2 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`numberOfItems` | Number | `null` | (required) An integer with the number of summary items to display\n`numberOfRows` | | `5` | \n'},function(e,t){e.exports="TableCard\n===\n\nThis is an accessible, sortable, and scrollable table for displaying tabular data (like revenue and other analytics data).\nIt accepts `headers` for column headers, and `rows` for the table content.\n`rowHeader` can be used to define the index of the row header (or false if no header).\n\n`TableCard` serves as Card wrapper & contains a card header, `<Table />`, `<TableSummary />`, and `<Pagination />`.\nThis includes filtering and comparison functionality for report pages.\n\n## Usage\n\n```jsx\nconst headers = [\n\t{ key: 'month', label: 'Month' },\n\t{ key: 'orders', label: 'Orders' },\n\t{ key: 'revenue', label: 'Revenue' },\n];\nconst rows = [\n\t[\n\t\t{ display: 'January', value: 1 },\n\t\t{ display: 10, value: 10 },\n\t\t{ display: '$530.00', value: 530 },\n\t],\n\t[\n\t\t{ display: 'February', value: 2 },\n\t\t{ display: 13, value: 13 },\n\t\t{ display: '$675.00', value: 675 },\n\t],\n\t[\n\t\t{ display: 'March', value: 3 },\n\t\t{ display: 9, value: 9 },\n\t\t{ display: '$460.00', value: 460 },\n\t],\n];\nconst summary = [\n\t{ label: 'Gross Income', value: '$830.00' },\n\t{ label: 'Taxes', value: '$96.32' },\n\t{ label: 'Shipping', value: '$50.00' },\n];\n\n<TableCard\n\ttitle=\"Revenue Last Week\"\n\trows={ rows }\n\theaders={ headers }\n\tquery={ { page: 2 } }\n\trowsPerPage={ 7 }\n\ttotalRows={ 10 }\n\tsummary={ summary }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`compareBy` | String | `null` | The string to use as a query parameter when comparing row items\n`compareParam` | String | `'filter'` | Url query parameter compare function operates on\n`headers` | Array | `null` | An array of column headers (see `Table` props)\n`labels` | Object | `null` | Custom labels for table header actions\n`ids` | Array | `null` | A list of IDs, matching to the row list so that ids[ 0 ] contains the object ID for the object displayed in row[ 0 ]\n`isLoading` | Boolean | `false` | Defines if the table contents are loading. It will display `TablePlaceholder` component instead of `Table` if that's the case\n`onQueryChange` | Function | `noop` | A function which returns a callback function to update the query string for a given `param`\n`onColumnsChange` | Function | `noop` | A function which returns a callback function which is called upon the user changing the visiblity of columns\n`onSearch` | Function | `noop` | A function which is called upon the user searching in the table header\n`onSort` | Function | `undefined` | A function which is called upon the user changing the sorting of the table\n`downloadable` | Boolean | `false` | Whether the table must be downloadable. If true, the download button will appear\n`onClickDownload` | Function | `null` | A callback function called when the \"download\" button is pressed. Optional, if used, the download button will appear\n`query` | Object | `{}` | An object of the query parameters passed to the page, ex `{ page: 2, per_page: 5 }`\n`rowHeader` | One of type: number, bool | `0` | An array of arrays of display/value object pairs (see `Table` props)\n`rows` | Array | `[]` | Which column should be the row header, defaults to the first item (`0`) (see `Table` props)\n`rowsPerPage` | Number | `null` | (required) The total number of rows to display per page\n`searchBy` | String | `null` | The string to use as a query parameter when searching row items\n`showMenu` | Boolean | `true` | Boolean to determine whether or not ellipsis menu is shown\n`summary` | Array | `null` | An array of objects with `label` & `value` properties, which display in a line under the table. Optional, can be left off to show no summary\n`title` | String | `null` | (required) The title used in the card header, also used as the caption for the content in this table\n`totalRows` | Number | `null` | (required) The total number of rows (across all pages)\n`baseSearchQuery` | Object | `{}` | Pass in query parameters to be included in the path when onSearch creates a new url\n\n### `labels` structure\n\nTable header action labels object with properties:\n\n- `compareButton`: String - Compare button label\n- `downloadButton`: String - Download button label\n- `helpText`: String - \n- `placeholder`: String - \n\n### `summary` structure\n\nArray of summary items objects with properties:\n\n- `label`: ReactNode\n- `value`: One of type: string, number \n\n\nEmptyTable\n===\n\n`EmptyTable` displays a blank space with an optional message passed as a children node\nwith the purpose of replacing a table with no rows.\nIt mimics the same height a table would have according to the `numberOfRows` prop.\n\n## Usage\n\n```jsx\n<EmptyTable>\n\tThere are no entries.\n</EmptyTable>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`numberOfRows` | Number | `5` | An integer with the number of rows the box should occupy\n\n\nTablePlaceholder\n===\n\n`TablePlaceholder` behaves like `Table` but displays placeholder boxes instead of data. This can be used while loading.\n\n## Usage\n\n```jsx\nconst headers = [\n\t{ key: 'month', label: 'Month' },\n\t{ key: 'orders', label: 'Orders' },\n\t{ key: 'revenue', label: 'Revenue' },\n];\n\n<TablePlaceholder\n\tcaption=\"Revenue Last Week\"\n\theaders={ headers }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`query` | Object | `null` | An object of the query parameters passed to the page, ex `{ page: 2, per_page: 5 }`\n`caption` | String | `null` | (required) A label for the content in this table\n`headers` | Array | `null` | An array of column headers (see `Table` props)\n`numberOfRows` | Number | `5` | An integer with the number of rows to display\n\n\nTableSummary\n===\n\nA component to display summarized table data - the list of data passed in on a single line.\n\n## Usage\n\n```jsx\nconst summary = [\n\t{ label: 'Gross Income', value: '$830.00' },\n\t{ label: 'Taxes', value: '$96.32' },\n\t{ label: 'Shipping', value: '$50.00' },\n];\n\n<TableSummary data={ summary } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`data` | Array | `null` | An array of objects with `label` & `value` properties, which display on a single line\n\n\nTable\n===\n\nA table component, without the Card wrapper. This is a basic table display, sortable, but no default filtering.\n\nRow data should be passed to the component as a list of arrays, where each array is a row in the table.\nHeaders are passed in separately as an array of objects with column-related properties. For example,\nthis data would render the following table.\n\n```js\nconst headers = [ { label: 'Month' }, { label: 'Orders' }, { label: 'Revenue' } ];\nconst rows = [\n\t[\n\t\t{ display: 'January', value: 1 },\n\t\t{ display: 10, value: 10 },\n\t\t{ display: '$530.00', value: 530 },\n\t],\n\t[\n\t\t{ display: 'February', value: 2 },\n\t\t{ display: 13, value: 13 },\n\t\t{ display: '$675.00', value: 675 },\n\t],\n\t[\n\t\t{ display: 'March', value: 3 },\n\t\t{ display: 9, value: 9 },\n\t\t{ display: '$460.00', value: 460 },\n\t],\n]\n```\n\n| Month | Orders | Revenue |\n| ---------|--------|---------|\n| January | 10 | $530.00 |\n| February | 13 | $675.00 |\n| March | 9 | $460.00 |\n\n## Usage\n\n```jsx\n<Table\n\tcaption=\"Revenue Last Week\"\n\trows={ rows }\n\theaders={ headers }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`ariaHidden` | Boolean | `false` | Controls whether this component is hidden from screen readers. Used by the loading state, before there is data to read. Don't use this on real tables unless the table data is loaded elsewhere on the page\n`caption` | String | `null` | (required) A label for the content in this table\n`className` | String | `null` | Additional CSS classes\n`headers` | Array | `[]` | An array of column headers, as objects\n`onSort` | Function | `noop` | A function called when sortable table headers are clicked, gets the `header.key` as argument\n`query` | Object | `{}` | The query string represented in object form\n`rows` | Array | `null` | (required) An array of arrays of display/value object pairs\n`rowHeader` | One of type: number, bool | `0` | Which column should be the row header, defaults to the first item (`0`) (but could be set to `1`, if the first col is checkboxes, for example). Set to false to disable row headers\n\n### `headers` structure\n\nArray of column header objects with properties:\n\n- `defaultSort`: Boolean - Boolean, true if this column is the default for sorting. Only one column should have this set.\n- `defaultOrder`: String - String, asc|desc if this column is the default for sorting. Only one column should have this set.\n- `isLeftAligned`: Boolean - Boolean, true if this column should be aligned to the left.\n- `isNumeric`: Boolean - Boolean, true if this column is a number value.\n- `isSortable`: Boolean - Boolean, true if this column is sortable.\n- `key`: String - The API parameter name for this column, passed to `orderby` when sorting via API.\n- `label`: ReactNode - The display label for this column.\n- `required`: Boolean - Boolean, true if this column should always display in the table (not shown in toggle-able list).\n- `screenReaderLabel`: String - The label used for screen readers for this column. \n\n### `rows` structure\n\nArray of arrays representing rows and columns. Column object properties:\n\n- `display`: ReactNode - Display value, used for rendering - strings or elements are best here.\n- `value`: One of type: string, number, bool"},function(e,t){e.exports='Tag\n===\n\nThis component can be used to show an item styled as a "tag", optionally with an `X` + "remove"\nor with a popover that is shown on click.\n\n\n\n## Usage\n\n```jsx\n<Tag label="My tag" id={ 1 } />\n<Tag label="Removable tag" id={ 2 } remove={ noop } />\n<Tag label="Tag with popover" popoverContents={ ( <p>This is a popover</p> ) } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`id` | One of type: number, string | `null` | The ID for this item, used in the remove function\n`label` | String | `null` | (required) The name for this item, displayed as the tag\'s text\n`popoverContents` | ReactNode | `null` | Contents to display on click in a popover\n`remove` | Function | `null` | A function called when the remove X is clicked. If not used, no X icon will display\n`screenReaderLabel` | String | `null` | A more descriptive label for screen reader users. Defaults to the `name` prop\n'},function(e,t){e.exports='TextControlWithAffixes\n===\n\nThis component is essentially a wrapper (really a reimplementation) around the\nTextControl component that adds support for affixes, i.e. the ability to display\na fixed part either at the beginning or at the end of the text input.\n\n## Usage\n\n```jsx\n<TextControlWithAffixes\n suffix="%"\n label="Text field with a suffix"\n value={ fourth }\n onChange={ value => setState( { fourth: value } ) }\n/>\n<TextControlWithAffixes\n prefix="$"\n label="Text field with prefix and help text"\n value={ fifth }\n onChange={ value => setState( { fifth: value } ) }\n help="This is some help text."\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`label` | String | `null` | If this property is added, a label will be generated using label property as the content\n`help` | String | `null` | If this property is added, a help text will be generated using help property as the content\n`type` | String | `\'text\'` | Type of the input element to render. Defaults to "text"\n`value` | String | `null` | (required) The current value of the input\n`className` | String | `null` | The class that will be added with "components-base-control" to the classes of the wrapper div. If no className is passed only components-base-control is used\n`onChange` | Function | `null` | (required) A function that receives the value of the input\n`prefix` | ReactNode | `null` | Markup to be inserted at the beginning of the input\n`suffix` | ReactNode | `null` | Markup to be appended at the end of the input\n`disabled` | Boolean | `null` | Disables the field\n'},function(e,t){e.exports='TextControl\n===\n\nAn input field use for text inputs in forms.\n\n## Usage\n\n```jsx\n<TextControl\n\tlabel="Input label"\n\tvalue={ value }\n\tonChange={ value => setState( { value } ) }\n/>;\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | ``null`` | Additional CSS classes\n`disabled` | Boolean | ``null`` | Disables the field\n`label` | String | ``null`` | Input label used as a placeholder\n`onClick` | Function | ``null`` | On click handler called when the component is clicked, passed the click event\n`value` | String | ``null`` | The value of the input field\n'},function(e,t){e.exports="ViewMoreList\n===\n\nThis component displays a 'X more' button that displays a list of items on a popover when clicked.\n\n\n\n## Usage\n\n```jsx\n<ViewMoreList\n items={ [ <i>Lorem</i>, <i>Ipsum</i>, <i>Dolor</i>, <i>Sit</i> ] }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`items` | Array | `[]` | `ReactNodes` to list in the popover\n"},function(e,t){e.exports='WebPreview\n===\n\nWebPreview component to display an iframe of another page.\n\n## Usage\n\n```jsx\n<WebPreview\n title="My Web Preview"\n src="https://themes.woocommerce.com/?name=galleria"\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n`loadingContent` | ReactNode | `<Spinner />` | Content shown when iframe is still loading\n`onLoad` | Function | `noop` | Function to fire when iframe content is loaded\n`src` | String | `null` | (required) Iframe src to load\n`title` | String | `null` | (required) Iframe title\n'},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},c=Object.defineProperty,a=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,u=l&&l(Object);e.exports=function e(t,n,d){if("string"!=typeof n){if(u){var p=l(n);p&&p!==u&&e(t,p,d)}var m=a(n);i&&(m=m.concat(i(n)));for(var b=0;b<m.length;++b){var h=m[b];if(!(r[h]||o[h]||d&&d[h])){var f=s(n,h);try{c(t,h,f)}catch(e){}}}return t}return t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"createNotice",(function(){return f})),n.d(r,"createSuccessNotice",(function(){return g})),n.d(r,"createInfoNotice",(function(){return v})),n.d(r,"createErrorNotice",(function(){return M})),n.d(r,"createWarningNotice",(function(){return O})),n.d(r,"removeNotice",(function(){return y}));var o={};n.r(o),n.d(o,"getNotices",(function(){return z}));var c=n(0),a=n(24),i=n(36),s=n(3),l=n(31);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var c=t(n[o],r);return c===n[o]?n:d({},n,Object(l.a)({},o,c))}}}("context")((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return[].concat(Object(i.a)(Object(s.reject)(e,{id:t.notice.id})),[t.notice]);case"REMOVE_NOTICE":return Object(s.reject)(e,{id:t.id})}return e})),m=n(63),b=n.n(m),h=b.a.mark(f);function f(){var e,t,n,r,o,c,a,i,l,u,d,p,m,f,g,v,M=arguments;return b.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:if(e=M.length>0&&void 0!==M[0]?M[0]:"info",t=M.length>1?M[1]:void 0,n=M.length>2&&void 0!==M[2]?M[2]:{},r=n.speak,o=void 0===r||r,c=n.isDismissible,a=void 0===c||c,i=n.context,l=void 0===i?"global":i,u=n.id,d=void 0===u?Object(s.uniqueId)(l):u,p=n.actions,m=void 0===p?[]:p,f=n.type,g=void 0===f?"default":f,v=n.__unstableHTML,t=String(t),!o){b.next=8;break}return b.next=8,{type:"SPEAK",message:t,ariaLive:"snackbar"===g?"polite":"assertive"};case 8:return b.next=10,{type:"CREATE_NOTICE",context:l,notice:{id:d,status:e,content:t,__unstableHTML:v,isDismissible:a,actions:m,type:g}};case 10:case"end":return b.stop()}}),h)}function g(e,t){return f("success",e,t)}function v(e,t){return f("info",e,t)}function M(e,t){return f("error",e,t)}function O(e,t){return f("warning",e,t)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return{type:"REMOVE_NOTICE",id:e,context:t}}var w=[];function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return e[t]||w}var _,A=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document.querySelector("body");return n&&n.appendChild(t),t},j=function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""},k="",E=function(e){return e=e.replace(/<[^<>]+>/g," "),k===e&&(e+=" "),k=e,e};_=function(){var e=document.getElementById("a11y-speak-polite"),t=document.getElementById("a11y-speak-assertive");null===e&&A("polite"),null===t&&A("assertive")},"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",_):_();var C={SPEAK:function(e){!function(e,t){j(),e=E(e);var n=document.getElementById("a11y-speak-polite"),r=document.getElementById("a11y-speak-assertive");r&&"assertive"===t?r.textContent=e:n&&(n.textContent=e)}(e.message,e.ariaLive||"assertive")}},L=(Object(a.registerStore)("core/notices",{reducer:p,actions:r,selectors:o,controls:C}),n(377),n(35)),N=n.n(L),S=n(75),q=n.n(S),T=n(9),x=n.n(T),B=n(10),R=n.n(B),P=n(7),W=n.n(P),D=n(11),H=n.n(D),X=n(12),V=n.n(X),I=n(4);function F(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var U=n(29),G=n.n(U),Q=n(2),K=n.n(Q),$=n(80),J=n(163),Z=n.n(J),Y=n(367),ee=n.n(Y);function te(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var ne=G.a.createContext||function(e,t){var n,r,o="__create-react-context-"+ee()()+"__",c=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=te(t.props.value),t}Z()(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[o]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((c=r)===(a=o)?0!==c||1/c==1/a:c!=c&&a!=a)?n=0:(n="function"==typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var c,a},r.render=function(){return this.props.children},n}(U.Component);c.childContextTypes=((n={})[o]=K.a.object.isRequired,n);var a=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Z()(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},r.getValue=function(){return this.context[o]?this.context[o].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(U.Component);return a.contextTypes=((r={})[o]=K.a.object,r),{Provider:c,Consumer:a}},re=n(65),oe=n(22),ce=n(229),ae=n.n(ce),ie=(n(144),n(76)),se=(n(162),function(e){var t=ne();return t.displayName=e,t}("Router")),le=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}F(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return G.a.createElement(se.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(G.a.Component);G.a.Component;G.a.Component;var ue={},de=0;function pe(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,c=void 0!==o&&o,a=n.strict,i=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=ue[n]||(ue[n]={});if(r[e])return r[e];var o=[],c={regexp:ae()(e,o,t),keys:o};return de<1e4&&(r[e]=c,de++),c}(n,{end:c,strict:i,sensitive:l}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var u=s[0],d=s.slice(1),p=e===u;return c&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var me=function(e){function t(){return e.apply(this,arguments)||this}return F(t,e),t.prototype.render=function(){var e=this;return G.a.createElement(se.Consumer,null,(function(t){t||Object(re.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?pe(n.pathname,e.props):t.match,o=Object(oe.a)({},t,{location:n,match:r}),c=e.props,a=c.children,i=c.component,s=c.render;return Array.isArray(a)&&0===a.length&&(a=null),G.a.createElement(se.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:i?G.a.createElement(i,o):s?s(o):null:"function"==typeof a?a(o):null)}))},t}(G.a.Component);function be(e){return"/"===e.charAt(0)?e:"/"+e}function he(e,t){if(!e)return t;var n=be(e);return 0!==t.pathname.indexOf(n)?t:Object(oe.a)({},t,{pathname:t.pathname.substr(n.length)})}function fe(e){return"string"==typeof e?e:Object($.d)(e)}function ge(e){return function(){Object(re.a)(!1)}}function ve(){}G.a.Component;var Me=function(e){function t(){return e.apply(this,arguments)||this}return F(t,e),t.prototype.render=function(){var e=this;return G.a.createElement(se.Consumer,null,(function(t){t||Object(re.a)(!1);var n,r,o=e.props.location||t.location;return G.a.Children.forEach(e.props.children,(function(e){if(null==r&&G.a.isValidElement(e)){n=e;var c=e.props.path||e.props.from;r=c?pe(o.pathname,Object(oe.a)({},e.props,{path:c})):t.match}})),r?G.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(G.a.Component);G.a.useContext;var Oe=n(21),ye=n(8),we=(n(379),n(55)),ze=n(33),_e=n(1),Ae=n(13),je=n.n(Ae),ke=n(390),Ee=(n(380),n(40)),Ce=n(26),Le=n.n(Ce);function Ne(e){return[e.country,e.state,e.name||Object(_e.__)("TAX","woocommerce-admin"),e.priority].map((function(e){return e.toString().toUpperCase().trim()})).filter(Boolean).join("-")}var Se=n(69),qe=n(97),Te=n.n(qe);function xe(e,t,n,r,o){void 0===n&&(n=500),void 0===r&&(r=3e4),void 0===o&&(o=new Date);var c={updates:[],nextUpdate:r};return function(e,t,n,r){Object.keys(t).forEach((function(o){var c=t[o],a=n[o]||{};!function(e,t,n,r,o){var c=r.lastRequested,a=r.lastReceived,i=c&&(!a||c>a),s=Be(n.timeout,r,o),l=Re(n.freshness,r,o),u=i&&0>=l?s:l;e.nextUpdate=Math.min(e.nextUpdate,u),u<0&&e.updates.push(t)}(e,o,c,a,r)}))}(c,e,t,o),c.nextUpdate=Math.max(c.nextUpdate,n),c}function Be(e,t,n){var r=t.lastRequested||Number.MIN_SAFE_INTEGER,o=t.lastReceived||Number.MIN_SAFE_INTEGER;return e&&r&&r>o?e-(n-r):Number.MAX_SAFE_INTEGER}function Re(e,t,n){var r=t.lastReceived;return e&&r?e-(n-r):e?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER}var Pe="overdue",We="fetching",De="stale",He="fresh",Xe="notRequired";function Ve(e){var t=e.state.resources||{},n=e.requirementsByResource;return Object(s.union)(Object.keys(t),Object.keys(n)).reduce((function(r,o){var c=t[o]||{},a=c.data,i=function(e,t){if(!t)return Xe;var n=t.freshness,r=t.timeout,o=new Date,c=Re(n,e,o);if(e&&e.lastRequested>e.lastReceived){return Be(r,e,o)<0?Pe:We}if(c<0)return De;return He}(c,n[o]),l=function(e,t,n){var r=new Date;switch(e){case Pe:return"Timed out for "+Ie(-Be(n.timeout,t,r));case We:return Ie(Be(n.timeout,t,r))+" until timeout";case De:return"Stale for "+Ie(-Re(n.freshness,t,r));case He:return"Fresh for "+Ie(Re(n.freshness,t,r));case Xe:default:return"Resource is not fetched directly."}}(i,c,n[o]);if(r[o]={status:i,summary:l,data:a},n[o]){var u=function(e){void 0===e&&(e={});var t=e,n=t.freshness,r=t.timeout,o=Object(ie.a)(t,["freshness","timeout"]);return Object(oe.a)({freshness:Ie(n),timeout:Ie(r)},o)}(n[o]),d=function(e,t){var n=[];return e.forEach((function(e,r){Object(s.find)(e,{resourceName:t})&&n.push(r)})),n.length?n:null}(e.requirementsByComponent,o);r[o].combinedRequirement=u,r[o].componentsRequiring=d}return r}),{})}function Ie(e){if(!e)return"";var t=Math.floor(e/36e5);e-=36e5*t;var n=Math.floor(e/6e4),r=(e-=6e4*n)/1e3,o="";return o=t?t+" hours ":o,o=n?""+o+n+" mins ":o,o=r?""+o+r+" secs ":o}function Fe(e){var t=Object.keys(e),n=[],r=0,o=0,c=0,a=0,i=0;t.forEach((function(t){var l=e[t];switch(n=Object(s.union)(n,l.componentsRequiring),l.status){case Pe:c++;break;case We:a++;break;case De:o++;break;case He:r++;break;case Xe:i++}}));var l=t.length+" resources, "+n.length+" components ( ";return r&&(l+=r+" fresh "),o&&(l+=o+" stale "),i&&(l+=i+" not required "),c&&(l+=c+" timed out "),a&&(l+=a+" fetching "),l+=")"}var Ue={};function Ge(e){!0===window.__FRESH_DATA_DEV_INFO__&&(Ue[e.getName()]=function(e){var t=function(e){var t=[];return e.requirementsByComponent.forEach((function(e,n){t.push({component:n,requirements:e})})),t}(e),n=Ve(e);return{summary:Fe(n),resources:n,components:t}}(e),window.freshData||(window.freshData=Ue))}var Qe={freshness:Number.MAX_SAFE_INTEGER,timeout:2e4};function Ke(e){var t={};return e.forEach((function(e){e.forEach((function(e){var n=e.resourceName,r=Object(ie.a)(e,["resourceName"]);!function(e,t,n){var r=e[n]||Object(oe.a)({},Qe);(function(e,t){var n=e.freshness||Qe.freshness,r=e.timeout||Qe.timeout,o=t.freshness||Number.MAX_SAFE_INTEGER,c=t.timeout||Number.MAX_SAFE_INTEGER;e.freshness=Math.min(n,o),e.timeout=Math.min(r,c)})(r,t),e[n]=r}(t,r,n)}))})),t}function $e(e,t){return window.setTimeout(e,t)}function Je(e){return window.clearTimeout(e)}var Ze=function(e,t,n){var r=this;void 0===t&&(t=$e),void 0===n&&(n=Je),this.getName=function(){return r.name||"UID_"+r.uid},this.mapOperations=function(e){return Object.keys(e).reduce((function(t,n){return t[n]=function(t,o){var c=e[n];return r.applyOperation(c,t,o)},t}),{})},this.setDataHandlers=function(e){var t=e.dataRequested,n=e.dataReceived;r.dataHandlers={dataRequested:t,dataReceived:n}},this.setState=function(e,t){void 0===t&&(t=new Date),r.state!==e&&(r.state=e,r.updateTimer(t),r.subscriptionCallbacks.forEach((function(e){return e(r)})),Ge(r))},this.subscribe=function(e){return r.subscriptionCallbacks.has(e)?(r.debug("Attempting to add a subscription callback twice:",e),!1):(r.subscriptionCallbacks.add(e),e)},this.unsubscribe=function(e){return r.subscriptionCallbacks.has(e)?(r.subscriptionCallbacks.delete(e),e):(r.debug("Attempting to remove a callback that is not subscribed:",e),!1)},this.getResource=function(e){return(r.state.resources||{})[e]||{}},this.requireResource=function(e){return function(t,n){return e.push(Object(oe.a)({},t,{resourceName:n})),r.getResource(n)}},this.getMutations=function(){return r.mutations},this.getSelectors=function(e){return Ye(r.selectors,r.getResource,r.requireResource(e))},this.clearComponentRequirements=function(e,t){void 0===t&&(t=new Date),r.requirementsByComponent.delete(e),r.updateRequirementsByResource(t)},this.setComponentRequirements=function(e,t,n){void 0===n&&(n=new Date),r.requirementsByComponent.set(e,t),r.updateRequirementsByResource(n)},this.setComponentData=function(e,t,n){if(void 0===n&&(n=new Date),t){var o=[];t(r.getSelectors(o)),r.setComponentRequirements(e,o,n)}else r.clearComponentRequirements(e,n)},this.updateRequirementsByResource=function(e){void 0===e&&(e=new Date);var t=Ke(r.requirementsByComponent);Object(s.isEqual)(r.requirementsByResource,t)||(r.requirementsByResource=t,r.updateTimer(e))},this.updateRequirementsData=function(){var e=Object(Se.a)(b.a.mark((function e(t){var n,o,c,a,i,l,u,d,p,m,h,f;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.requirementsByComponent,o=r.requirementsByResource,c=r.state,a=r.minUpdate,i=r.maxUpdate,l=c.resources||{},u=n.size,d=Object.keys(o).length,r.debug("Updating requirements for "+u+" components and "+d+" resources."),Ge(r),Object(s.isEmpty)(o)){e.next=20;break}if(p=xe(o,l,a,i,t),m=p.nextUpdate,!((h=p.updates)&&h.length>0)){e.next=15;break}if(f=r.readOperationName,r.operations[f]){e.next=13;break}throw new Error('Operation "'+f+'" not found.');case 13:return e.next=15,r.operations[f](h);case 15:r.debug("Scheduling next update for "+m/1e3+" seconds."),Ge(r),r.updateTimer(t,m),e.next=21;break;case 20:r.timeoutId&&(r.debug("Unscheduling future updates"),Ge(r),r.updateTimer(t,null));case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.updateTimer=function(e,t){void 0===t&&(t=void 0);var n=r.requirementsByResource,o=r.state,c=r.minUpdate,a=r.maxUpdate,i=o.resources||{};void 0===t&&(t=xe(n,i,c,a,e).nextUpdate),r.timeoutId&&(r.clearTimer(r.timeoutId),r.timeoutId=null),t&&(r.timeoutId=r.setTimer(r.updateRequirementsData,t))},this.applyOperation=function(){var e=Object(Se.a)(b.a.mark((function e(t,n,o){var c,a,i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.dataRequested(n),c=t(n,o)||[],a=Object(s.isArray)(c)?c:[c],i=a.map(function(){var e=Object(Se.a)(b.a.mark((function e(t){var n;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return n=e.sent,r.dataReceived(n),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=7,Promise.all(i);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(0),r.debug("Error caught while applying operation: ",t),e.t0;case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n,r){return e.apply(this,arguments)}}(),this.dataRequested=function(e){if(r.dataHandlers)return r.dataHandlers.dataRequested(e),e;r.debug("Data requested before dataHandlers set. Disregarding.")},this.dataReceived=function(e){if(r.dataHandlers)return r.dataHandlers.dataReceived(e),e;r.debug("Data received before dataHandlers set. Disregarding.")};var o=e.operations,c=e.mutations,a=e.selectors,i=e.readOperationName||"read";this.uid=Object(s.uniqueId)(),this.name=e.name,this.debug=Te()("fresh-data:api-client["+this.uid+"]"),this.debug("New ApiClient for apiSpec: ",e),this.operations=o&&this.mapOperations(o),this.mutations=c&&Ye(c,this.operations),this.selectors=a,this.readOperationName=i,this.dataHandlers=null,this.subscriptionCallbacks=new Set,this.requirementsByComponent=new Map,this.requirementsByResource={},this.minUpdate=500,this.maxUpdate=3e4,this.setTimer=t,this.clearTimer=n,this.timeoutId=null,this.state={},Ge(this)};function Ye(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.keys(e).reduce((function(t,r){return t[r]=e[r].apply(e,n),t}),{})}var et="/wc-analytics",tt={timeout:6e4,freshness:18e5},nt=["processing","on-hold"],rt=25;function ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.identity;return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,o="function"==typeof e?e(r):e,c=Object(Oe.getIdsFromQuery)(n);if(c.length<1)return Promise.resolve([]);var a={include:c.join(","),per_page:c.length};return Le()({path:Object(Ee.addQueryArgs)(o,a)}).then((function(e){return e.map(t)}))}}var ct=ot(et+"/products/categories",(function(e){return{key:e.id,label:e.name}})),at=ot(et+"/coupons",(function(e){return{key:e.id,label:e.code}})),it=ot(et+"/customers",(function(e){return{key:e.id,label:e.name}})),st=ot(et+"/products",(function(e){return{key:e.id,label:e.name}})),lt=ot(et+"/taxes",(function(e){return{key:e.id,label:Ne(e)}})),ut=ot((function(e){return et+"/products/".concat(e.products,"/variations")}),(function(e){return{key:e.id,label:e.attributes.reduce((function(e,t,n,r){return e+"".concat(t.option).concat(r.length===n+1?"":", ")}),"")}})),dt=Object(ze.applyFilters)("woocommerce_admin_orders_report_charts",[{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),type:"number"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_total",type:"currency"},{key:"avg_order_value",label:Object(_e.__)("Average Order Value","woocommerce-admin"),type:"currency"},{key:"avg_items_per_order",label:Object(_e.__)("Average Items Per Order","woocommerce-admin"),order:"desc",orderby:"num_items_sold",type:"average"}]),pt=Object(ze.applyFilters)("woocommerce_admin_orders_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:["chart"],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Orders","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),mt=Object(ze.applyFilters)("woocommerce_admin_orders_report_advanced_filters",{title:Object(_e._x)("Orders Match {{select /}} Filters","A sentence describing filters for Orders. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ","woocommerce-admin"),filters:{status:{labels:{add:Object(_e.__)("Order Status","woocommerce-admin"),remove:Object(_e.__)("Remove order status filter","woocommerce-admin"),rule:Object(_e.__)("Select an order status filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Order Status{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select an order status","woocommerce-admin")},rules:[{value:"is",label:Object(_e._x)("Is","order status","woocommerce-admin")},{value:"is_not",label:Object(_e._x)("Is Not","order status","woocommerce-admin")}],input:{component:"SelectControl",options:Object.keys(ye.d).map((function(e){return{value:e,label:ye.d[e]}}))}},product:{labels:{add:Object(_e.__)("Products","woocommerce-admin"),placeholder:Object(_e.__)("Search products","woocommerce-admin"),remove:Object(_e.__)("Remove products filter","woocommerce-admin"),rule:Object(_e.__)("Select a product filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Product{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select products","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","products","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","products","woocommerce-admin")}],input:{component:"Search",type:"products",getLabels:st}},coupon:{labels:{add:Object(_e.__)("Coupon Codes","woocommerce-admin"),placeholder:Object(_e.__)("Search coupons","woocommerce-admin"),remove:Object(_e.__)("Remove coupon filter","woocommerce-admin"),rule:Object(_e.__)("Select a coupon filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Coupon Code{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select coupon codes","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","coupon code","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","coupon code","woocommerce-admin")}],input:{component:"Search",type:"coupons",getLabels:at}},customer_type:{labels:{add:Object(_e.__)("Customer Type","woocommerce-admin"),remove:Object(_e.__)("Remove customer filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Customer is{{/title}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select a customer type","woocommerce-admin")},input:{component:"SelectControl",options:[{value:"new",label:Object(_e.__)("New","woocommerce-admin")},{value:"returning",label:Object(_e.__)("Returning","woocommerce-admin")}],defaultOption:"new"}},refunds:{labels:{add:Object(_e.__)("Refunds","woocommerce-admin"),remove:Object(_e.__)("Remove refunds filter","woocommerce-admin"),rule:Object(_e.__)("Select a refund filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Refunds{{/title}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select a refund type","woocommerce-admin")},input:{component:"SelectControl",options:[{value:"all",label:Object(_e.__)("All","woocommerce-admin")},{value:"partial",label:Object(_e.__)("Partially refunded","woocommerce-admin")},{value:"full",label:Object(_e.__)("Fully refunded","woocommerce-admin")},{value:"none",label:Object(_e.__)("None","woocommerce-admin")}],defaultOption:"all"}},tax_rate:{labels:{add:Object(_e.__)("Tax Rates","woocommerce-admin"),placeholder:Object(_e.__)("Search tax rates","woocommerce-admin"),remove:Object(_e.__)("Remove tax rate filter","woocommerce-admin"),rule:Object(_e.__)("Select a tax rate filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Tax Rate{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select tax rates","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","tax rate","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","tax rate","woocommerce-admin")}],input:{component:"Search",type:"taxes",getLabels:lt}}}});function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(s.find)(t,{key:e});return n||t[0]}var ht=n(16),ft=n.n(ht),gt=n(38),vt=Object(ye.g)("wcAdminSettings",{}).woocommerce_default_date_range,Mt=void 0===vt?"period=month&compare=previous_year":vt,Ot=Object(s.partialRight)(gt.getDateParamsFromQuery,Mt),yt=Object(s.partialRight)(gt.getCurrentDates,Mt),wt=n(86),zt=new(n.n(wt).a)(ye.b),_t=zt.formatCurrency.bind(zt),At=zt.formatDecimal.bind(zt),jt=zt.formatDecimalString.bind(zt),kt=zt.render.bind(zt),Et=zt.setCurrency.bind(zt),Ct=n(98),Lt=(Object(s.partial)(Ct.numberFormat,ye.b),Object(s.partial)(Ct.formatValue,ye.b)),Nt=n(32),St=n.n(Nt),qt=n(762),Tt=n(78),xt=n(52),Bt=n(6),Rt=n.n(Bt),Pt=function(){return Object(c.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M18,9c-0.009,0-0.017,0.002-0.025,0.003C17.72,5.646,14.922,3,11.5,3C7.91,3,5,5.91,5,9.5c0,0.524,0.069,1.031,0.186,1.519 C5.123,11.016,5.064,11,5,11c-2.209,0-4,1.791-4,4c0,1.202,0.541,2.267,1.38,3h18.593C22.196,17.089,23,15.643,23,14 C23,11.239,20.761,9,18,9z M12,16l-4-5h3V8h2v3h3L12,16z"}))},Wt=n(165),Dt=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e,t,n,r,o=this.props,a=o.className,i=o.isError,s=o.isEmpty;return i?(e=Object(_e.__)("There was an error getting your stats. Please try again.","woocommerce-admin"),t=Object(_e.__)("Reload","woocommerce-admin"),r=function(){window.location.reload()}):s&&(e=Object(_e.__)("No results could be found for this date range.","woocommerce-admin"),t=Object(_e.__)("View Orders","woocommerce-admin"),n=Object(ye.f)("edit.php?post_type=shop_order")),Object(c.createElement)(I.EmptyContent,{className:a,title:e,actionLabel:t,actionURL:n,actionCallback:r})}}]),t}(c.Component);Dt.propTypes={className:K.a.string,isError:K.a.bool,isEmpty:K.a.bool},Dt.defaultProps={className:""};var Ht=Dt,Xt=n(142),Vt=n.n(Xt),It=n(20),Ft=n.n(It);function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qt(e){var t=e.endpoint,n=e.query,r=e.limitBy,o=e.filters,c=void 0===o?[]:o,a=e.advancedFilters,i=void 0===a?{}:a;return n.search?(r||[t]).reduce((function(e,t){return e[t]=n[t],e}),{}):c.map((function(e){return function(e,t,n){var r=n[e.param];if(!r)return{};if("advanced"===r){var o=Object(Oe.getActiveFiltersFromQuery)(n,t.filters);return 0===o.length?{}:o.map((function(e){return function(e,t){var n=e.filters[t.key];if("Date"!==Object(s.get)(n,["input","component"]))return t;var r=t.rule,o=t.value,c={after:"start",before:"end"};if(Array.isArray(o)){var a=Vt()(o,2),i=a[0],l=a[1];return Object.assign({},t,{value:[Object(gt.appendTimestamp)(Ft()(i),c.after),Object(gt.appendTimestamp)(Ft()(l),c.before)]})}return Object.assign({},t,{value:Object(gt.appendTimestamp)(Ft()(o),c[r])})}(t,e)})).reduce((function(e,t){var n=t.key,r=t.rule,o=t.value;return e[Object(Oe.getUrlKey)(n,r)]=o,e}),{match:n.match||"all"})}var c=Object(s.find)(Object(Oe.flattenFilters)(e.filters),{value:r});if(!c)return{};if(c.settings&&c.settings.param){var a=c.settings.param;return n[a]?je()({},a,n[a]):{}}return je()({},e.param,r)}(e,i,n)})).reduce((function(e,t){return Object.assign(e,t)}),{})}var Kt=["stock","customers"];function $t(e){var t=e.endpoint,n=e.dataType,r=e.query,o=yt(r),c=Object(gt.getIntervalForQuery)(r),a=Qt(e),i=o[n].before;return Gt(Object(s.includes)(Kt,t)?{}:{order:"asc",interval:c,per_page:100,after:Object(gt.appendTimestamp)(o[n].after,"start"),before:Object(gt.appendTimestamp)(i,"end"),segmentby:r.segmentby},a)}function Jt(e){var t=e.endpoint,n=(0,e.select)("wc-api"),r=n.getReportStats,o=n.getReportStatsError,c=n.isReportStatsRequesting,a={isEmpty:!1,isError:!1,isRequesting:!1,data:{totals:{},intervals:[]}},i=$t(e),l=r(t,i);if(c(t,i))return Gt({},a,{isRequesting:!0});if(o(t,i))return Gt({},a,{isError:!0});if(function(e,t){return!e||(!e.data||(!(e.data.totals&&!Object(s.isNull)(e.data.totals))||!(Object(s.includes)(Kt,t)||e.data.intervals&&0!==e.data.intervals.length)))}(l,t))return Gt({},a,{isEmpty:!0});var u=l&&l.data&&l.data.totals||null,d=l&&l.data&&l.data.intervals||[];if(l.totalResults>100){for(var p=!0,m=!1,b=[],h=Math.ceil(l.totalResults/100),f=1,g=2;g<=h;g++){var v=Gt({},i,{page:g}),M=r(t,v);if(!c(t,v)){if(o(t,v)){m=!0,p=!1;break}if(b.push(M),++f===h){p=!1;break}}}if(p)return Gt({},a,{isRequesting:!0});if(m)return Gt({},a,{isError:!0});Object(s.forEach)(b,(function(e){d=d.concat(e.data.intervals)}))}return Gt({},a,{data:{totals:u,intervals:d}})}function Zt(e){switch(e){case"currency":return _t;case"percent":return".0%";case"number":return",";case"average":return",.2r";default:return","}}function Yt(e){var t=e.query,n=e.tableQuery,r=void 0===n?{}:n,o=Qt(e),c=yt(t),a=Object(s.includes)(Kt,e.endpoint);return Gt({orderby:t.orderby||"date",order:t.order||"desc",after:a?void 0:Object(gt.appendTimestamp)(c.primary.after,"start"),before:a?void 0:Object(gt.appendTimestamp)(c.primary.before,"end"),page:t.paged||1,per_page:t.per_page||rt},o,{},r)}var en=n(120),tn=n.n(en),nn=n(70),rn=function(e){return Object(nn.a)((function(t){var n={},r=function(r){function o(e){var t;return x()(this,o),(t=W()(this,H()(o).call(this,e))).onStoreChange=t.onStoreChange.bind(ft()(t)),t.subscribe(e.registry),t.onUnmounts={},t.mergeProps=t.getNextMergeProps(e),t}return V()(o,r),R()(o,[{key:"getNextMergeProps",value:function(t){var r=this,o={},c=[],a={component:this},i=e((function(e){return o[e]||function(e,t,n){var a=t.select(e);if(Object(s.isFunction)(a)){var i=a(n),l=i.selectors,u=i.onComplete,d=i.onUnmount;u&&c.push(u),d&&(r.onUnmounts[e]=d),o[e]=l}else o[e]=a}(e,t.registry,a),o[e]}),t.ownProps)||n;return c.forEach((function(e){return e()})),i}},{key:"componentDidMount",value:function(){this.canRunSelection=!0,this.hasQueuedSelection&&(this.hasQueuedSelection=!1,this.onStoreChange())}},{key:"componentWillUnmount",value:function(){var e=this;this.canRunSelection=!1,this.unsubscribe(),Object.keys(this.onUnmounts).forEach((function(t){return e.onUnmounts[t]()}))}},{key:"shouldComponentUpdate",value:function(e,t){var n=e.registry!==this.props.registry;n&&(this.unsubscribe(),this.subscribe(e.registry));var r=n||!tn()(this.props.ownProps,e.ownProps);if(this.state===t&&!r)return!1;if(r){var o=this.getNextMergeProps(e);tn()(this.mergeProps,o)||(this.mergeProps=o)}return!0}},{key:"onStoreChange",value:function(){if(this.canRunSelection){var e=this.getNextMergeProps(this.props);tn()(this.mergeProps,e)||(this.mergeProps=e,this.setState({}))}else this.hasQueuedSelection=!0}},{key:"subscribe",value:function(e){this.unsubscribe=e.subscribe(this.onStoreChange)}},{key:"render",value:function(){return Object(c.createElement)(t,N()({},this.props.ownProps,this.mergeProps))}}]),o}(c.Component);return function(e){return Object(c.createElement)(a.RegistryConsumer,null,(function(t){return Object(c.createElement)(r,{ownProps:e,registry:t})}))}}),"withSelect")};function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var an=n(23);n(389);function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var un=function(e){function t(e){var n;x()(this,t);var r=(n=W()(this,H()(t).call(this,e))).props,o=r.query,a=r.compareBy,i=o.filter?Object(Oe.getIdsFromQuery)(o[a]):[];return n.state={selectedRows:i},n.onColumnsChange=n.onColumnsChange.bind(ft()(n)),n.onPageChange=n.onPageChange.bind(ft()(n)),n.onSort=n.onSort.bind(ft()(n)),n.scrollPointRef=Object(c.createRef)(),n.trackTableSearch=n.trackTableSearch.bind(ft()(n)),n.onClickDownload=n.onClickDownload.bind(ft()(n)),n.onCompare=n.onCompare.bind(ft()(n)),n.onSearchChange=n.onSearchChange.bind(ft()(n)),n.selectRow=n.selectRow.bind(ft()(n)),n.selectAllRows=n.selectAllRows.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=e.query,n=this.props,r=n.compareBy,o=n.query;if(o.filter||t.filter){var c=t.filter?Object(Oe.getIdsFromQuery)(t[r]):[],a=o.filter?Object(Oe.getIdsFromQuery)(o[r]):[];Object(s.isEqual)(c.sort(),a.sort())||this.setState({selectedRows:a})}}},{key:"onColumnsChange",value:function(e,t){var n=this.props,r=n.columnPrefsKey,o=n.endpoint,c=n.getHeadersContent,a=n.updateCurrentUserData,i=c().map((function(e){return e.key})).filter((function(t){return!e.includes(t)}));r&&a(je()({},r,i));if(t){var s={report:o,column:t,status:e.includes(t)?"on":"off"};Object(an.b)("analytics_table_header_toggle",s)}}},{key:"onPageChange",value:function(e,t){var n=this.props.endpoint;this.scrollPointRef.current.scrollIntoView();var r=this.scrollPointRef.current.nextSibling.querySelector(".woocommerce-table__table"),o=xt.a.focusable.find(r);o.length&&o[0].focus(),t&&("goto"===t?Object(an.b)("analytics_table_go_to_page",{report:n,page:e}):Object(an.b)("analytics_table_page_click",{report:n,direction:t}))}},{key:"trackTableSearch",value:function(){var e=this.props.endpoint;Object(an.b)("analytics_table_filter",{report:e})}},{key:"onSort",value:function(e,t){Object(Oe.onQueryChange)("sort")(e,t);var n={report:this.props.endpoint,column:e,direction:t};Object(an.b)("analytics_table_sort",n)}},{key:"filterShownHeaders",value:function(e,t){return t?e.map((function(e){return ln({},e,{visible:e.required||!t.includes(e.key)})})):e.map((function(e){return ln({},e,{visible:e.required||!e.hiddenByDefault})}))}},{key:"onClickDownload",value:function(){var e=this.props,t=e.endpoint,n=e.getHeadersContent,r=e.getRowsContent,o=e.initiateReportExport,c=e.query,a=e.searchBy,i=e.tableData,s=e.title,l=Object.assign({},c),u=i.items,d=i.query,p=u.data,m=u.totalResults,b="browser";delete l.extended_info,l.search&&delete l[a],p&&p.length===m?Object(Wt.downloadCSVFile)(Object(Wt.generateCSVFileName)(s,l),Object(Wt.generateCSVDataFromTable)(n(),r(p))):(b="email",o(t,s,d)),Object(an.b)("analytics_table_download",{report:t,rows:m,downloadType:b})}},{key:"onCompare",value:function(){var e=this.props,t=e.compareBy,n=e.compareParam,r=this.state.selectedRows;t&&Object(Oe.onQueryChange)("compare")(t,n,r.join(","))}},{key:"onSearchChange",value:function(e){var t,n=this.props,r=n.baseSearchQuery,o=n.compareParam,c=n.searchBy,a=e.map((function(e){return e.label.replace(",","%2C")}));a.length?Object(Oe.updateQueryString)(ln((t={filter:void 0},je()(t,o,void 0),je()(t,c,void 0),t),r,{search:Object(s.uniq)(a).join(",")})):Object(Oe.updateQueryString)({search:void 0});this.trackTableSearch()}},{key:"selectAllRows",value:function(e){var t=this.props.ids;this.setState({selectedRows:e?t:[]})}},{key:"selectRow",value:function(e,t){var n=this.props.ids;t?this.setState((function(t){var r=t.selectedRows;return{selectedRows:Object(s.uniq)([n[e]].concat(St()(r)))}})):this.setState((function(t){var r=t.selectedRows,o=r.indexOf(n[e]);return{selectedRows:[].concat(St()(r.slice(0,o)),St()(r.slice(o+1)))}}))}},{key:"getCheckbox",value:function(e){var t=this.props.ids,n=void 0===t?[]:t,r=-1!==this.state.selectedRows.indexOf(n[e]);return{display:Object(c.createElement)(qt.a,{onChange:Object(s.partial)(this.selectRow,e),checked:r}),value:!1}}},{key:"getAllCheckbox",value:function(){var e=this.props.ids,t=void 0===e?[]:e,n=this.state.selectedRows,r=t.length>0,o=r&&t.length===n.length;return{cellClassName:"is-checkbox-column",key:"compare",label:Object(c.createElement)(qt.a,{onChange:this.selectAllRows,"aria-label":Object(_e.__)("Select All"),checked:o,disabled:!r}),required:!0}}},{key:"render",value:function(){var e=this,t=this.state.selectedRows,n=this.props,r=n.getHeadersContent,o=n.getRowsContent,a=n.getSummary,i=n.isRequesting,l=(n.itemIdField,n.primaryData),u=n.tableData,d=n.endpoint,p=(n.tableQuery,n.userPrefColumns),m=n.compareBy,b=n.searchBy,h=n.labels,f=void 0===h?{}:h,g=q()(n,["getHeadersContent","getRowsContent","getSummary","isRequesting","itemIdField","primaryData","tableData","endpoint","tableQuery","userPrefColumns","compareBy","searchBy","labels"]),v=u.items,M=u.query;if(u.isError||l.isError)return Object(c.createElement)(Ht,{isError:!0});var O=i||u.isRequesting||l.isRequesting,y=Object(s.get)(l,["data","totals"],{}),w=v.totalResults,z=0<w,_=Object(Oe.getSearchWords)(this.props.query).map((function(e){return{key:e,label:e}})),A=Object(ze.applyFilters)("woocommerce_admin_report_table",{endpoint:d,headers:r(),rows:o(v.data),totals:y,summary:a?a(y,w):null,items:v}),j=A.headers,k=A.rows,E=A.summary;m&&(k=k.map((function(t,n){return[e.getCheckbox(n)].concat(St()(t))})),j=[this.getAllCheckbox()].concat(St()(j)));var C=this.filterShownHeaders(j,p),L=Rt()("woocommerce-report-table",{"has-compare":!!m,"has-search":!!b});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-report-table__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(c.createElement)(I.TableCard,N()({className:L,actions:[m&&Object(c.createElement)(I.CompareButton,{key:"compare",className:"woocommerce-table__compare",count:t.length,helpText:f.helpText||Object(_e.__)("Check at least two items below to compare","woocommerce-admin"),onClick:this.onCompare,disabled:!z},f.compareButton||Object(_e.__)("Compare","woocommerce-admin")),b&&Object(c.createElement)(I.Search,{allowFreeTextSearch:!0,inlineTags:!0,key:"search",onChange:this.onSearchChange,placeholder:f.placeholder||Object(_e.__)("Search by item name","woocommerce-admin"),selected:_,showClearButton:!0,type:b,disabled:!z}),z&&Object(c.createElement)(Tt.a,{key:"download",className:"woocommerce-table__download-button",disabled:O,onClick:this.onClickDownload,isLink:!0},Object(c.createElement)(Pt,null),Object(c.createElement)("span",{className:"woocommerce-table__download-button__label"},f.downloadButton||Object(_e.__)("Download","woocommerce-admin")))],headers:C,isLoading:O,onQueryChange:Oe.onQueryChange,onColumnsChange:this.onColumnsChange,onSort:this.onSort,onPageChange:this.onPageChange,rows:k,rowsPerPage:parseInt(M.per_page)||rt,summary:E,totalRows:w},g)))}}]),t}(c.Component);un.propTypes={baseSearchQuery:K.a.object,compareBy:K.a.string,compareParam:K.a.string,columnPrefsKey:K.a.string,endpoint:K.a.string,extendItemsMethodNames:K.a.shape({getError:K.a.string,isRequesting:K.a.string,load:K.a.string}),getHeadersContent:K.a.func.isRequired,getRowsContent:K.a.func.isRequired,getSummary:K.a.func,itemIdField:K.a.string,labels:K.a.shape({compareButton:K.a.string,downloadButton:K.a.string,helpText:K.a.string,placeholder:K.a.string}),primaryData:K.a.object,searchBy:K.a.string,tableData:K.a.object.isRequired,tableQuery:K.a.object,title:K.a.string.isRequired},un.defaultProps={primaryData:{},tableData:{items:{data:[],totalResults:0},query:{}},tableQuery:{},compareParam:"filter",downloadable:!1,onSearch:s.noop,baseSearchQuery:{}};var dn=Object(ke.a)(rn((function(e,t){var n=t.endpoint,r=t.getSummary,o=t.isRequesting,c=t.itemIdField,a=t.query,i=t.tableData,l=t.tableQuery,u=t.columnPrefsKey,d=t.filters,p=t.advancedFilters,m=[];if(u){var b=(0,e("wc-api").getCurrentUserData)();m=b&&b[u]?b[u]:m}if(o||a.search&&(!a[n]||!a[n].length))return{userPrefColumns:m};var h=["variations","categories"].includes(n)?"products":n,f=r?Jt({endpoint:h,dataType:"primary",query:a,select:e,filters:d,advancedFilters:p,tableQuery:l}):{},g=function(e,t,n){var r=t.extendItemsMethodNames,o=t.itemIdField,c=n.items.data;if(!(Array.isArray(c)&&c.length&&r&&o))return n;var a=e("wc-api"),i=a[r.getError],l=a[r.isRequesting],u=a[r.load],d={include:c.map((function(e){return e[o]})).join(","),per_page:c.length},p=u(d),m=!!l&&l(d),b=!!i&&i(d),h=c.map((function(e){var t=Object(s.first)(p.filter((function(t){return e.id===t.id})));return cn({},e,{},t)}));return cn({},n,{isRequesting:n.isRequesting||m,isError:n.isError||b,items:cn({},n.items,{data:h})})}(e,t,i||function(e){var t=e.endpoint,n=(0,e.select)("wc-api"),r=n.getReportItems,o=n.getReportItemsError,c=n.isReportItemsRequesting,a=Yt(e),i={query:a,isRequesting:!1,isError:!1,items:{data:[],totalResults:0}},s=r(t,a);return c(t,a)?Gt({},i,{isRequesting:!0}):o(t,a)?Gt({},i,{isError:!0}):Gt({},i,{items:s})}({endpoint:n,query:a,select:e,tableQuery:l,filters:d,advancedFilters:p}));return{primaryData:f,ids:c?g.items.data.map((function(e){return e[c]})):[],tableData:g,query:ln({},l,{},a),userPrefColumns:m}})),Object(a.withDispatch)((function(e){var t=e("wc-api");return{initiateReportExport:t.initiateReportExport,updateCurrentUserData:t.updateCurrentUserData}})))(un),pn=(n(391),function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Date","woocommerce-admin"),key:"date",required:!0,defaultSort:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Order #","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Order Number","woocommerce-admin"),key:"order_number",required:!0},{label:Object(_e.__)("Status","woocommerce-admin"),key:"status",required:!1,isSortable:!1},{label:Object(_e.__)("Customer","woocommerce-admin"),key:"customer_id",required:!1,isSortable:!1},{label:Object(_e.__)("Product(s)","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Products","woocommerce-admin"),key:"products",required:!1,isSortable:!1},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"num_items_sold",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Coupon(s)","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Coupons","woocommerce-admin"),key:"coupons",required:!1,isSortable:!1},{label:Object(_e.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_total",required:!0,isSortable:!0,isNumeric:!0}]}},{key:"getCustomerType",value:function(e){switch(e){case"new":return Object(_e._x)("New","customer type","woocommerce-admin");case"returning":return Object(_e._x)("Returning","customer type","woocommerce-admin");default:return Object(_e._x)("N/A","customer type","woocommerce-admin")}}},{key:"getRowsContent",value:function(e){var t=this,n=this.props.query,r=Object(Oe.getPersistedQuery)(n);return Object(s.map)(e,(function(e){var n=e.currency,o=e.customer_type,a=e.date_created,i=e.net_total,s=e.num_items_sold,l=e.order_id,u=e.order_number,d=e.parent_id,p=e.status,m=e.extended_info||{},b=m.coupons,h=m.products.sort((function(e,t){return t.quantity-e.quantity})).map((function(e){return{label:e.name,quantity:e.quantity,href:Object(Oe.getNewPath)(r,"/analytics/products",{filter:"single_product",products:e.id})}})),f=b.map((function(e){return{label:e.code,href:Object(Oe.getNewPath)(r,"/analytics/coupons",{filter:"single_coupon",coupons:e.id})}}));return[{display:Object(c.createElement)(I.Date,{date:a,visibleFormat:gt.defaultTableDateFormat}),value:a},{display:Object(c.createElement)(I.Link,{href:"post.php?post="+(d||l)+"&action=edit"+(d?"#order_refunds":""),type:"wp-admin"},u),value:u},{display:Object(c.createElement)(I.OrderStatus,{className:"woocommerce-orders-table__status",order:{status:p},orderStatusMap:Object(ye.g)("orderStatuses",{})}),value:p},{display:t.getCustomerType(o),value:o},{display:t.renderList(h.length?[h[0]]:[],h.map((function(e){return{label:Object(_e.sprintf)(Object(_e.__)("%s× %s","woocommerce-admin"),e.quantity,e.label),href:e.href}}))),value:h.map((function(e){var t=e.quantity,n=e.label;return Object(_e.sprintf)(Object(_e.__)("%s× %s","woocommerce-admin"),t,n)})).join(", ")},{display:Lt("number",s),value:s},{display:t.renderList(f.length?[f[0]]:[],f),value:f.map((function(e){return e.label})).join(", ")},{display:kt(i,n),value:i}]}))}},{key:"getSummary",value:function(e){var t=e.orders_count,n=void 0===t?0:t,r=e.num_new_customers,o=void 0===r?0:r,c=e.num_returning_customers,a=void 0===c?0:c,i=e.products,s=void 0===i?0:i,l=e.num_items_sold,u=void 0===l?0:l,d=e.coupons_count,p=void 0===d?0:d,m=e.net_revenue,b=void 0===m?0:m;return[{label:Object(_e._n)("order","orders",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("new customer","new customers",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e._n)("returning customer","returning customers",a,"woocommerce-admin"),value:Lt("number",a)},{label:Object(_e._n)("product","products",s,"woocommerce-admin"),value:Lt("number",s)},{label:Object(_e._n)("item sold","items sold",u,"woocommerce-admin"),value:Lt("number",u)},{label:Object(_e._n)("coupon","coupons",p,"woocommerce-admin"),value:Lt("number",p)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(b)}]}},{key:"renderLinks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e,t){return Object(c.createElement)(I.Link,{href:e.href,key:t,type:"wc-admin"},e.label)}))}},{key:"renderList",value:function(e,t){return Object(c.createElement)(c.Fragment,null,this.renderLinks(e),t.length>1&&Object(c.createElement)(I.ViewMoreList,{items:this.renderLinks(t)}))}},{key:"render",value:function(){var e=this.props,t=e.query,n=e.filters,r=e.advancedFilters;return Object(c.createElement)(dn,{endpoint:"orders",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:t,tableQuery:{extended_info:!0},title:Object(_e.__)("Orders","woocommerce-admin"),columnPrefsKey:"orders_report_columns",filters:n,advancedFilters:r})}}]),t}(c.Component)),mn=n(82);function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"shouldComponentUpdate",value:function(e){return e.isRequesting!==this.props.isRequesting||e.primaryData.isRequesting!==this.props.primaryData.isRequesting||e.secondaryData.isRequesting!==this.props.secondaryData.isRequesting||!Object(s.isEqual)(e.query,this.props.query)}},{key:"getItemChartData",value:function(){var e=this.props,t=e.primaryData,n=e.selectedChart;return t.data.intervals.map((function(e){var t={};return e.subtotals.segments.forEach((function(e){if(e.segment_label){var r=t[e.segment_label]?e.segment_label+" (#"+e.segment_id+")":e.segment_label;t[e.segment_id]={label:r,value:e.subtotals[n.key]||0}}})),hn({date:Object(mn.a)("Y-m-d\\TH:i:s",e.date_start)},t)}))}},{key:"getTimeChartData",value:function(){var e=this.props,t=e.query,n=e.primaryData,r=e.secondaryData,o=e.selectedChart,c=Object(gt.getIntervalForQuery)(t),a=yt(t),i=a.primary,s=a.secondary;return n.data.intervals.map((function(e,n){var a=Object(gt.getPreviousDate)(e.date_start,i.after,s.after,t.compare,c),l=r.data.intervals[n];return{date:Object(mn.a)("Y-m-d\\TH:i:s",e.date_start),primary:{label:"".concat(i.label," (").concat(i.range,")"),labelDate:e.date_start,value:e.subtotals[o.key]||0},secondary:{label:"".concat(s.label," (").concat(s.range,")"),labelDate:a.format("YYYY-MM-DD HH:mm:ss"),value:l&&l.subtotals[o.key]||0}}}))}},{key:"getTimeChartTotals",value:function(){var e=this.props,t=e.primaryData,n=e.secondaryData,r=e.selectedChart;return{primary:Object(s.get)(t,["data","totals",r.key],null),secondary:Object(s.get)(n,["data","totals",r.key],null)}}},{key:"renderChart",value:function(e,t,n,r){var o=this.props,a=o.emptySearchResults,i=o.filterParam,s=o.interactiveLegend,l=o.itemsLabel,u=o.legendPosition,d=o.path,p=o.query,m=o.selectedChart,b=o.showHeaderControls,h=o.primaryData,f=Object(gt.getIntervalForQuery)(p),g=Object(gt.getAllowedIntervalsForQuery)(p),v=Object(gt.getDateFormatsForInterval)(f,h.data.intervals.length),M=a?Object(_e.__)("No data for the current search","woocommerce-admin"):Object(_e.__)("No data for the selected date range","woocommerce-admin");return Object(c.createElement)(I.Chart,{allowedIntervals:g,data:n,dateParser:"%Y-%m-%dT%H:%M:%S",emptyMessage:M,filterParam:i,interactiveLegend:s,interval:f,isRequesting:t,itemsLabel:l,legendPosition:u,legendTotals:r,mode:e,path:d,query:p,screenReaderFormat:v.screenReaderFormat,showHeaderControls:b,title:m.label,tooltipLabelFormat:v.tooltipLabelFormat,tooltipTitle:"time-comparison"===e&&m.label||null,tooltipValueFormat:Zt(m.type),chartType:Object(gt.getChartTypeForQuery)(p),valueType:m.type,xFormat:v.xFormat,x2Format:v.x2Format,currency:ye.b})}},{key:"renderItemComparison",value:function(){var e=this.props,t=e.isRequesting,n=e.primaryData;if(n.isError)return Object(c.createElement)(Ht,{isError:!0});var r=t||n.isRequesting,o=this.getItemChartData();return this.renderChart("item-comparison",r,o)}},{key:"renderTimeComparison",value:function(){var e=this.props,t=e.isRequesting,n=e.primaryData,r=e.secondaryData;if(!n||n.isError||r.isError)return Object(c.createElement)(Ht,{isError:!0});var o=t||n.isRequesting||r.isRequesting,a=this.getTimeChartData(),i=this.getTimeChartTotals();return this.renderChart("time-comparison",o,a,i)}},{key:"render",value:function(){return"item-comparison"===this.props.mode?this.renderItemComparison():this.renderTimeComparison()}}]),t}(c.Component);fn.propTypes={filters:K.a.array,isRequesting:K.a.bool,itemsLabel:K.a.string,limitProperties:K.a.array,mode:K.a.string,path:K.a.string.isRequired,primaryData:K.a.object,query:K.a.object.isRequired,secondaryData:K.a.object,selectedChart:K.a.shape({key:K.a.string.isRequired,label:K.a.string.isRequired,order:K.a.oneOf(["asc","desc"]),orderby:K.a.string,type:K.a.oneOf(["average","number","currency"]).isRequired}).isRequired},fn.defaultProps={isRequesting:!1,primaryData:{data:{intervals:[]},isError:!1,isRequesting:!1},secondaryData:{data:{intervals:[]},isError:!1,isRequesting:!1}};var gn=Object(ke.a)(rn((function(e,t){var n=t.endpoint,r=t.filters,o=t.isRequesting,c=t.limitProperties,a=t.query,i=t.advancedFilters,l=c||[n],u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||0===t.length)return null;var o=t.slice(0),c=o.pop();if(c.showFilters(n,r)){var a=Object(Oe.flattenFilters)(c.filters),i=n[c.param]||c.defaultValue||"all";return Object(s.find)(a,{value:i})}return e(o,n,r)}(r,a),d=Object(s.get)(u,["settings","param"]),p=t.mode||function(e,t){if(e&&t){var n=Object(s.get)(e,["settings","param"]);if(!n||Object.keys(t).includes(n))return Object(s.get)(e,["chartMode"])}return null}(u,a)||"time-comparison",m={mode:p,filterParam:d};if(o)return m;var b=l.some((function(e){return a[e]&&a[e].length}));if(a.search&&!b)return hn({},m,{emptySearchResults:!0});var h=Jt({endpoint:n,dataType:"primary",query:a,select:e,limitBy:l,filters:r,advancedFilters:i});return hn({},m,"item-comparison"===p?{primaryData:h}:{primaryData:h,secondaryData:Jt({endpoint:n,dataType:"secondary",query:a,select:e,limitBy:l,filters:r,advancedFilters:i})})})))(fn),vn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"formatVal",value:function(e,t){return"currency"===t?_t(e):Lt(t,e)}},{key:"getValues",value:function(e,t){var n=this.props,r=n.emptySearchResults,o=n.summaryData.totals,c=r?0:o.primary[e],a=r?0:o.secondary[e];return{delta:Object(Ct.calculateDelta)(c,a),prevValue:this.formatVal(a,t),value:this.formatVal(c,t)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.charts,r=t.isRequesting,o=t.query,a=t.selectedChart,i=t.summaryData,s=t.endpoint,l=t.report,u=i.isError,d=i.isRequesting;if(u)return Object(c.createElement)(Ht,{isError:!0});if(r||d)return Object(c.createElement)(I.SummaryListPlaceholder,{numberOfItems:n.length});var p=Ot(o).compare;return Object(c.createElement)(I.SummaryList,null,(function(t){var r=t.onToggle;return n.map((function(t){var n=t.key,o=t.order,i=t.orderby,u=t.label,d=t.type,m={chart:n};i&&(m.orderby=i),o&&(m.order=o);var b=Object(Oe.getNewPath)(m),h=a.key===n,f=e.getValues(n,d),g=f.delta,v=f.prevValue,M=f.value;return Object(c.createElement)(I.SummaryNumber,{key:n,delta:g,href:b,label:u,prevLabel:"previous_period"===p?Object(_e.__)("Previous Period:","woocommerce-admin"):Object(_e.__)("Previous Year:","woocommerce-admin"),prevValue:v,selected:h,value:M,onLinkClickCallback:function(){r&&r(),Object(an.b)("analytics_chart_tab_click",{report:l||s,key:n})}})}))}))}}]),t}(c.Component);vn.propTypes={charts:K.a.array.isRequired,endpoint:K.a.string.isRequired,limitProperties:K.a.array,query:K.a.object.isRequired,isRequesting:K.a.bool,selectedChart:K.a.shape({key:K.a.string.isRequired,label:K.a.string.isRequired,order:K.a.oneOf(["asc","desc"]),orderby:K.a.string,type:K.a.oneOf(["average","number","currency"]).isRequired}).isRequired,summaryData:K.a.object,report:K.a.string},vn.defaultProps={summaryData:{totals:{primary:{},secondary:{}},isError:!1,isRequesting:!1}};var Mn=Object(ke.a)(rn((function(e,t){var n=t.endpoint,r=t.isRequesting,o=t.limitProperties,c=t.query,a=t.filters,i=t.advancedFilters,s=o||[n];if(r)return{};var l=s.some((function(e){return c[e]&&c[e].length}));return c.search&&!l?{emptySearchResults:!0}:{summaryData:function(e){var t=e.endpoint,n=(0,e.select)("wc-api"),r=n.getReportStats,o=n.getReportStatsError,c=n.isReportStatsRequesting,a={isRequesting:!1,isError:!1,totals:{primary:null,secondary:null}},i=$t(Gt({},e,{dataType:"primary"})),s=r(t,i);if(c(t,i))return Gt({},a,{isRequesting:!0});if(o(t,i))return Gt({},a,{isError:!0});var l=s&&s.data&&s.data.totals||null,u=$t(Gt({},e,{dataType:"secondary"})),d=r(t,u);return c(t,u)?Gt({},a,{isRequesting:!0}):o(t,u)?Gt({},a,{isError:!0}):Gt({},a,{totals:{primary:l,secondary:d&&d.data&&d.data.totals||null}})}({endpoint:n,query:c,select:e,limitBy:s,filters:a,advancedFilters:i})}})))(vn);function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var yn=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).trackDateSelect=e.trackDateSelect.bind(ft()(e)),e.trackFilterSelect=e.trackFilterSelect.bind(ft()(e)),e.trackAdvancedFilterAction=e.trackAdvancedFilterAction.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"trackDateSelect",value:function(e){var t=this.props.report;Object(an.b)("datepicker_update",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({report:t},Object(s.omitBy)(e,s.isUndefined)))}},{key:"trackFilterSelect",value:function(e){var t=this.props.report;Object(an.b)("analytics_filter",{report:t,filter:e.filter||"all"})}},{key:"trackAdvancedFilterAction",value:function(e,t){var n=this.props.report;switch(e){case"add":Object(an.b)("analytics_filters_add",{report:n,filter:t.key});break;case"remove":Object(an.b)("analytics_filters_remove",{report:n,filter:t.key});break;case"filter":var r=Object.keys(t).reduce((function(e,n){return e[Object(s.snakeCase)(n)]=t[n],e}),{});Object(an.b)("analytics_filters_filter",{report:n,snakeCaseData:r});break;case"clear_all":Object(an.b)("analytics_filters_clear_all",{report:n});break;case"match":Object(an.b)("analytics_filters_all_any",{report:n,value:t.match})}}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.path,o=e.query,a=e.showDatePicker,i=Ot(o),s=i.period,l=i.compare,u=i.before,d=i.after,p=yt(o),m={period:s,compare:l,before:u,after:d,primaryDate:p.primary,secondaryDate:p.secondary};return Object(c.createElement)(I.ReportFilters,{query:o,siteLocale:ye.c.siteLocale,currency:zt,path:r,filters:n,advancedFilters:t,showDatePicker:a,onDateSelect:this.trackDateSelect,onFilterSelect:this.trackFilterSelect,onAdvancedFilterAction:this.trackAdvancedFilterAction,dateQuery:m,isoDateFormat:gt.isoDateFormat})}}]),t}(c.Component);yn.propTypes={advancedFilters:K.a.object,filters:K.a.array,path:K.a.string.isRequired,query:K.a.object,showDatePicker:K.a.bool,report:K.a.string.isRequired};var wn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.path,n=e.query;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:t,filters:pt,advancedFilters:mt,report:"orders"}),Object(c.createElement)(Mn,{charts:dt,endpoint:"orders",query:n,selectedChart:bt(n.chart,dt),filters:pt,advancedFilters:mt}),Object(c.createElement)(gn,{endpoint:"orders",path:t,query:n,selectedChart:bt(n.chart,dt),filters:pt,advancedFilters:mt}),Object(c.createElement)(pn,{query:n,filters:pt,advancedFilters:mt}))}}]),t}(c.Component);wn.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var zn=Object(ze.applyFilters)("woocommerce_admin_products_report_charts",[{key:"items_sold",label:Object(_e.__)("Items Sold","woocommerce-admin"),order:"desc",orderby:"items_sold",type:"number"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_revenue",type:"currency"},{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"}]),_n={label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Products","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Product","woocommerce-admin"),value:"select_product",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_product",chartMode:"item-comparison",path:["select_product"],settings:{type:"products",param:"products",getLabels:st,labels:{placeholder:Object(_e.__)("Type to search for a product","woocommerce-admin"),button:Object(_e.__)("Single Product","woocommerce-admin")}}}]},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-products",chartMode:"item-comparison",settings:{type:"products",param:"products",getLabels:st,labels:{helpText:Object(_e.__)("Check at least two products below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for products to compare","woocommerce-admin"),title:Object(_e.__)("Compare Products","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]},An={showFilters:function(e){return"single_product"===e.filter&&!!e.products&&e["is-variable"]},staticParams:["filter","products"],param:"filter-variations",filters:[{label:Object(_e.__)("All Variations","woocommerce-admin"),chartMode:"item-comparison",value:"all"},{label:Object(_e.__)("Comparison","woocommerce-admin"),chartMode:"item-comparison",value:"compare-variations",settings:{type:"variations",param:"variations",getLabels:ut,labels:{helpText:Object(_e.__)("Check at least two variations below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for variations to compare","woocommerce-admin"),title:Object(_e.__)("Compare Variations","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]},jn=Object(ze.applyFilters)("woocommerce_admin_products_report_filters",[_n,An]),kn=Object(ze.applyFilters)("woocommerce_admin_products_report_advanced_filters",{}),En=n(44),Cn=n(392),Ln=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getCategoryAncestorIds",value:function(e,t){for(var n=[],r=e.parent;r;)n.unshift(r),r=t.get(r).parent;return n}},{key:"getCategoryAncestors",value:function(e,t){var n=this.getCategoryAncestorIds(e,t);if(n.length)return 1===n.length?t.get(Object(s.first)(n)).name+" › ":2===n.length?t.get(Object(s.first)(n)).name+" › "+t.get(Object(s.last)(n)).name+" › ":t.get(Object(s.first)(n)).name+" … "+t.get(Object(s.last)(n)).name+" › "}},{key:"render",value:function(){var e=this.props,t=e.categories,n=e.category,r=e.query,o=Object(Oe.getPersistedQuery)(r);return n?Object(c.createElement)("div",{className:"woocommerce-table__breadcrumbs"},this.getCategoryAncestors(n,t),Object(c.createElement)(I.Link,{href:Object(Oe.getNewPath)(o,"/analytics/categories",{filter:"single_category",categories:n.id}),type:"wc-admin"},n.name)):Object(c.createElement)(Cn.a,null)}}]),t}(c.Component);function Nn(e,t,n){return!!t&&("instock"===e&&t<=n)}n(393);var Sn=Object(ye.g)("manageStock","no"),qn=Object(ye.g)("stockStatuses",{}),Tn=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Product Title","woocommerce-admin"),key:"product_name",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("SKU","woocommerce-admin"),key:"sku",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Category","woocommerce-admin"),key:"product_cat"},{label:Object(_e.__)("Variations","woocommerce-admin"),key:"variations",isSortable:!0},"yes"===Sn?{label:Object(_e.__)("Status","woocommerce-admin"),key:"stock_status"}:null,"yes"===Sn?{label:Object(_e.__)("Stock","woocommerce-admin"),key:"stock",isNumeric:!0}:null].filter(Boolean)}},{key:"getRowsContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.props.query,r=Object(Oe.getPersistedQuery)(n);return Object(s.map)(t,(function(t){var o=t.product_id,a=t.items_sold,i=t.net_revenue,s=t.orders_count,l=t.extended_info||{},u=l.category_ids,d=l.low_stock_amount,p=l.manage_stock,m=l.sku,b=l.stock_status,h=l.stock_quantity,f=l.variations,g=void 0===f?[]:f,v=Object(En.decodeEntities)(l.name),M=Object(Oe.getNewPath)(r,"/analytics/orders",{filter:"advanced",product_includes:o}),O=Object(Oe.getNewPath)(r,"/analytics/products",{filter:"single_product",products:o}),y=e.props.categories,w=u&&u.map((function(e){return y.get(e)})).filter(Boolean)||[],z=Nn(b,h,d)?Object(c.createElement)(I.Link,{href:Object(ye.f)("post.php?action=edit&post="+o),type:"wp-admin"},Object(_e._x)("Low","Indication of a low quantity","woocommerce-admin")):qn[b];return[{display:Object(c.createElement)(I.Link,{href:O,type:"wc-admin"},v),value:v},{display:m,value:m},{display:Lt("number",a),value:a},{display:kt(i),value:At(i)},{display:Object(c.createElement)(I.Link,{href:M,type:"wc-admin"},s),value:s},{display:Object(c.createElement)("div",{className:"woocommerce-table__product-categories"},w[0]&&Object(c.createElement)(Ln,{category:w[0],categories:y}),w.length>1&&Object(c.createElement)(I.Tag,{label:Object(_e.sprintf)(Object(_e._x)("+%d more","categories","woocommerce-admin"),w.length-1),popoverContents:w.map((function(e){return Object(c.createElement)(Ln,{category:e,categories:y,key:e.id,query:n})}))})),value:w.map((function(e){return e.name})).join(", ")},{display:Lt("number",g.length),value:g.length},"yes"===Sn?{display:p?z:Object(_e.__)("N/A","woocommerce-admin"),value:p?qn[b]:null}:null,"yes"===Sn?{display:p?Lt("number",h):Object(_e.__)("N/A","woocommerce-admin"),value:h}:null].filter(Boolean)}))}},{key:"getSummary",value:function(e){var t=e.products_count,n=void 0===t?0:t,r=e.items_sold,o=void 0===r?0:r,c=e.net_revenue,a=void 0===c?0:c,i=e.orders_count,s=void 0===i?0:i;return[{label:Object(_e._n)("product","products",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("item sold","items sold",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(a)},{label:Object(_e._n)("orders","orders",s,"woocommerce-admin"),value:Lt("number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.baseSearchQuery,r=e.filters,o=e.hideCompare,a=e.isRequesting,i=e.query,s={helpText:Object(_e.__)("Check at least two products below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search by product name or SKU","woocommerce-admin")};return Object(c.createElement)(dn,{compareBy:o?void 0:"products",endpoint:"products",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,itemIdField:"product_id",isRequesting:a,labels:s,query:i,searchBy:"products",baseSearchQuery:n,tableQuery:{orderby:i.orderby||"items_sold",order:i.order||"desc",extended_info:!0,segmentby:i.segmentby},title:Object(_e.__)("Products","woocommerce-admin"),columnPrefsKey:"products_report_columns",filters:r,advancedFilters:t})}}]),t}(c.Component),xn=Object(ke.a)(rn((function(e,t){var n=t.query;if(t.isRequesting||n.search&&(!n.products||!n.products.length))return{};var r=e("wc-api"),o=r.getItems,c=r.getItemsError,a=r.isGetItemsRequesting,i={per_page:-1};return{categories:o("categories",i),isError:Boolean(c("categories",i)),isRequesting:a("categories",i)}})))(Tn),Bn=Object(ye.g)("manageStock","no"),Rn=Object(ye.g)("stockStatuses",{}),Pn=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Product / Variation Title","woocommerce-admin"),key:"name",required:!0,isLeftAligned:!0},{label:Object(_e.__)("SKU","woocommerce-admin"),key:"sku",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},"yes"===Bn?{label:Object(_e.__)("Status","woocommerce-admin"),key:"stock_status"}:null,"yes"===Bn?{label:Object(_e.__)("Stock","woocommerce-admin"),key:"stock",isNumeric:!0}:null].filter(Boolean)}},{key:"getRowsContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.props.query,n=Object(Oe.getPersistedQuery)(t);return Object(s.map)(e,(function(e){var r=e.items_sold,o=e.net_revenue,a=e.orders_count,i=e.product_id,l=e.extended_info||{},u=l.stock_status,d=l.stock_quantity,p=l.low_stock_amount,m=l.sku,b=Object(s.get)(e,["extended_info","name"],""),h=Object(Oe.getNewPath)(n,"/analytics/orders",{filter:"advanced",product_includes:t.products}),f=Object(ye.f)("post.php?post=".concat(i,"&action=edit"));return[{display:Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},b),value:b},{display:m,value:m},{display:Lt("number",r),value:r},{display:_t(o),value:At(o)},{display:Object(c.createElement)(I.Link,{href:h,type:"wc-admin"},a),value:a},"yes"===Bn?{display:Nn(u,d,p)?Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},Object(_e._x)("Low","Indication of a low quantity","woocommerce-admin")):Rn[u],value:Rn[u]}:null,"yes"===Bn?{display:d,value:d}:null].filter(Boolean)}))}},{key:"getSummary",value:function(e){var t=e.variations_count,n=void 0===t?0:t,r=e.items_sold,o=void 0===r?0:r,c=e.net_revenue,a=void 0===c?0:c,i=e.orders_count,s=void 0===i?0:i;return[{label:Object(_e._n)("variation sold","variations sold",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("item sold","items sold",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(a)},{label:Object(_e._n)("orders","orders",s,"woocommerce-admin"),value:Lt("number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.baseSearchQuery,r=e.filters,o=e.isRequesting,a=e.query,i={helpText:Object(_e.__)("Check at least two variations below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search by variation name or SKU","woocommerce-admin")};return Object(c.createElement)(dn,{baseSearchQuery:n,compareBy:"variations",compareParam:"filter-variations",endpoint:"variations",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,isRequesting:o,itemIdField:"variation_id",labels:i,query:a,getSummary:this.getSummary,searchBy:"variations",tableQuery:{orderby:a.orderby||"items_sold",order:a.order||"desc",extended_info:!0,products:a.products,variations:a.variations},title:Object(_e.__)("Variations","woocommerce-admin"),columnPrefsKey:"variations_report_columns",filters:r,advancedFilters:t})}}]),t}(c.Component);function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e=this.props,t=e.query,n=e.isSingleProductView,r=e.isSingleProductVariable,o="compare-products"===t.filter&&t.products&&t.products.split(",").length>1||n&&r?"item-comparison":"time-comparison";return{compareObject:n&&r?"variations":"products",itemsLabel:n&&r?Object(_e.__)("%d variations","woocommerce-admin"):Object(_e.__)("%d products","woocommerce-admin"),mode:o}}},{key:"render",value:function(){var e=this.getChartMeta(),t=e.compareObject,n=e.itemsLabel,r=e.mode,o=this.props,a=o.path,i=o.query,s=o.isError,l=o.isRequesting,u=o.isSingleProductVariable;if(s)return Object(c.createElement)(Ht,{isError:!0});var d=Dn({},i);return"item-comparison"===r&&(d.segmentby="products"===t?"product":"variation"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:i,path:a,filters:jn,advancedFilters:kn,report:"products"}),Object(c.createElement)(Mn,{mode:r,charts:zn,endpoint:"products",isRequesting:l,query:d,selectedChart:bt(i.chart,zn),filters:jn,advancedFilters:kn}),Object(c.createElement)(gn,{mode:r,filters:jn,advancedFilters:kn,endpoint:"products",isRequesting:l,itemsLabel:n,path:a,query:d,selectedChart:bt(d.chart,zn)}),u?Object(c.createElement)(Pn,{baseSearchQuery:{filter:"single_product"},isRequesting:l,query:i,filters:jn,advancedFilters:kn}):Object(c.createElement)(xn,{isRequesting:l,query:i,filters:jn,advancedFilters:kn}))}}]),t}(c.Component);Hn.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var Xn=Object(ke.a)(rn((function(e,t){var n=t.query,r=t.isRequesting,o=!n.search&&n.products&&1===n.products.split(",").length;if(r)return{query:Dn({},n),isSingleProductView:o,isRequesting:r};var c=e("wc-api"),a=c.getItems,i=c.isGetItemsRequesting,s=c.getItemsError;if(o){var l=parseInt(n.products),u={include:l},d=a("products",u),p=d&&d.get(l)&&"variable"===d.get(l).type,m=i("products",u),b=Boolean(s("products",u));return{query:Dn({},n,{"is-variable":p}),isSingleProductView:o,isSingleProductVariable:p,isRequesting:m,isError:b}}return{query:n,isSingleProductView:o}})))(Hn),Vn=Object(ze.applyFilters)("woocommerce_admin_revenue_report_charts",[{key:"gross_sales",label:Object(_e.__)("Gross Sales","woocommerce-admin"),order:"desc",orderby:"gross_sales",type:"currency"},{key:"refunds",label:Object(_e.__)("Returns","woocommerce-admin"),order:"desc",orderby:"refunds",type:"currency"},{key:"coupons",label:Object(_e.__)("Coupons","woocommerce-admin"),order:"desc",orderby:"coupons",type:"currency"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),orderby:"net_revenue",type:"currency"},{key:"taxes",label:Object(_e.__)("Taxes","woocommerce-admin"),order:"desc",orderby:"taxes",type:"currency"},{key:"shipping",label:Object(_e.__)("Shipping","woocommerce-admin"),orderby:"shipping",type:"currency"},{key:"total_sales",label:Object(_e.__)("Total Sales","woocommerce-admin"),order:"desc",orderby:"total_sales",type:"currency"}]),In=Object(ze.applyFilters)("woocommerce_admin_revenue_report_filters",[]),Fn=Object(ze.applyFilters)("woocommerce_admin_revenue_report_advanced_filters",{}),Un=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Date","woocommerce-admin"),key:"date",required:!0,defaultSort:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Gross Sales","woocommerce-admin"),key:"gross_sales",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Returns","woocommerce-admin"),key:"refunds",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Coupons","woocommerce-admin"),key:"coupons",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Taxes","woocommerce-admin"),key:"taxes",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Shipping","woocommerce-admin"),key:"shipping",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Total Sales","woocommerce-admin"),key:"total_sales",required:!0,isSortable:!0,isNumeric:!0}]}},{key:"getRowsContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){var t=e.subtotals,n=t.coupons,r=t.gross_sales,o=t.total_sales,a=t.net_revenue,i=t.orders_count,s=t.refunds,l=t.shipping,u=t.taxes,d=Object(c.createElement)(I.Link,{href:"edit.php?post_type=shop_order&m="+Object(mn.a)("Ymd",e.date_start),type:"wp-admin"},Lt("number",i));return[{display:Object(c.createElement)(I.Date,{date:e.date_start,visibleFormat:gt.defaultTableDateFormat}),value:e.date_start},{display:d,value:Number(i)},{display:kt(r),value:At(r)},{display:_t(s),value:At(s)},{display:_t(n),value:At(n)},{display:kt(a),value:At(a)},{display:kt(u),value:At(u)},{display:kt(l),value:At(l)},{display:kt(o),value:At(o)}]}))}},{key:"getSummary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.orders_count,r=void 0===n?0:n,o=e.gross_sales,c=void 0===o?0:o,a=e.total_sales,i=void 0===a?0:a,s=e.refunds,l=void 0===s?0:s,u=e.coupons,d=void 0===u?0:u,p=e.taxes,m=void 0===p?0:p,b=e.shipping,h=void 0===b?0:b,f=e.net_revenue,g=void 0===f?0:f;return[{label:Object(_e._n)("day","days",t,"woocommerce-admin"),value:Lt("number",t)},{label:Object(_e._n)("order","orders",r,"woocommerce-admin"),value:Lt("number",r)},{label:Object(_e.__)("gross sales","woocommerce-admin"),value:_t(c)},{label:Object(_e.__)("returns","woocommerce-admin"),value:_t(l)},{label:Object(_e.__)("coupons","woocommerce-admin"),value:_t(d)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(g)},{label:Object(_e.__)("taxes","woocommerce-admin"),value:_t(m)},{label:Object(_e.__)("shipping","woocommerce-admin"),value:_t(h)},{label:Object(_e.__)("total sales","woocommerce-admin"),value:_t(i)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.tableData,o=e.query;return Object(c.createElement)(dn,{endpoint:"revenue",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:o,tableData:r,title:Object(_e.__)("Revenue","woocommerce-admin"),columnPrefsKey:"revenue_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component),Gn=Object(ke.a)(rn((function(e,t){var n=t.query,r=t.filters,o=t.advancedFilters,c=yt(n),a=e("wc-api"),i=a.getReportStats,l=a.getReportStatsError,u=a.isReportStatsRequesting,d={interval:"day",orderby:n.orderby||"date",order:n.order||"desc",page:n.paged||1,per_page:n.per_page||rt,after:Object(gt.appendTimestamp)(c.primary.after,"start"),before:Object(gt.appendTimestamp)(c.primary.before,"end")},p=Yt({endpoint:"revenue",query:n,select:e,tableQuery:d,filters:r,advancedFilters:o}),m=i("revenue",p),b=Boolean(l("revenue",p)),h=u("revenue",p);return{tableData:{items:{data:Object(s.get)(m,["data","intervals"],[]),totalResults:Object(s.get)(m,["totalResults"],0)},isError:b,isRequesting:h,query:d}}})))(Un),Qn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.path,n=e.query;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:t,report:"revenue",filters:In,advancedFilters:Fn}),Object(c.createElement)(Mn,{charts:Vn,endpoint:"revenue",query:n,selectedChart:bt(n.chart,Vn),filters:In,advancedFilters:Fn}),Object(c.createElement)(gn,{endpoint:"revenue",path:t,query:n,selectedChart:bt(n.chart,Vn),filters:In,advancedFilters:Fn}),Object(c.createElement)(Gn,{query:n,filters:In,advancedFilters:Fn}))}}]),t}(c.Component);Qn.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var Kn=Object(ze.applyFilters)("woocommerce_admin_categories_report_charts",[{key:"items_sold",label:Object(_e.__)("Items Sold","woocommerce-admin"),order:"desc",orderby:"items_sold",type:"number"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_revenue",type:"currency"},{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"}]),$n=Object(ze.applyFilters)("woocommerce_admin_categories_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Categories","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Category","woocommerce-admin"),value:"select_category",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_category",chartMode:"item-comparison",path:["select_category"],settings:{type:"categories",param:"categories",getLabels:ct,labels:{placeholder:Object(_e.__)("Type to search for a category","woocommerce-admin"),button:Object(_e.__)("Single Category","woocommerce-admin")}}}]},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-categories",chartMode:"item-comparison",settings:{type:"categories",param:"categories",getLabels:ct,labels:{helpText:Object(_e.__)("Check at least two categories below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for categories to compare","woocommerce-admin"),title:Object(_e.__)("Compare Categories","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]}]),Jn=Object(ze.applyFilters)("woocommerce_admin_category_report_advanced_filters",{}),Zn=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).getRowsContent=n.getRowsContent.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Category","woocommerce-admin"),key:"category",required:!0,isSortable:!0,isLeftAligned:!0},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Products","woocommerce-admin"),key:"products_count",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0}]}},{key:"getRowsContent",value:function(e){var t=this;return Object(s.map)(e,(function(e){var n=e.category_id,r=e.items_sold,o=e.net_revenue,a=e.products_count,i=e.orders_count,s=t.props,l=s.categories,u=s.query,d=l.get(n),p=Object(Oe.getPersistedQuery)(u);return[{display:Object(c.createElement)(Ln,{query:u,category:d,categories:l}),value:d&&d.name},{display:Lt("number",r),value:r},{display:kt(o),value:At(o)},{display:d&&Object(c.createElement)(I.Link,{href:Object(Oe.getNewPath)(p,"/analytics/categories",{filter:"single_category",categories:d.id}),type:"wc-admin"},Lt("number",a)),value:a},{display:Lt("number",i),value:i}]}))}},{key:"getSummary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.items_sold,r=void 0===n?0:n,o=e.net_revenue,c=void 0===o?0:o,a=e.orders_count,i=void 0===a?0:a;return[{label:Object(_e._n)("category","categories",t,"woocommerce-admin"),value:Lt("number",t)},{label:Object(_e._n)("item sold","items sold",r,"woocommerce-admin"),value:Lt("number",r)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(c)},{label:Object(_e._n)("order","orders",i,"woocommerce-admin"),value:Lt("number",i)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.isRequesting,o=e.query,a={helpText:Object(_e.__)("Check at least two categories below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search by category name","woocommerce-admin")};return Object(c.createElement)(dn,{compareBy:"categories",endpoint:"categories",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:r,itemIdField:"category_id",query:o,searchBy:"categories",labels:a,tableQuery:{orderby:o.orderby||"items_sold",order:o.order||"desc",extended_info:!0},title:Object(_e.__)("Categories","woocommerce-admin"),columnPrefsKey:"categories_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component),Yn=Object(ke.a)(rn((function(e,t){var n=t.isRequesting,r=t.query;if(n||r.search&&(!r.categories||!r.categories.length))return{};var o=e("wc-api"),c=o.getItems,a=o.getItemsError,i=o.isGetItemsRequesting,s={per_page:-1};return{categories:c("categories",s),isError:Boolean(a("categories",s)),isRequesting:i("categories",s)}})))(Zn);function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var tr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e=this.props.query,t="compare-categories"===e.filter&&e.categories&&e.categories.split(",").length>1,n="single_category"===e.filter&&!!e.categories,r=t||n?"item-comparison":"time-comparison";return{isSingleCategoryView:n,itemsLabel:n?Object(_e.__)("%d products","woocommerce-admin"):Object(_e.__)("%d categories","woocommerce-admin"),mode:r}}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=this.getChartMeta(),a=o.mode,i=o.itemsLabel,s=o.isSingleCategoryView,l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?er(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return"item-comparison"===a&&(l.segmentby=s?"product":"category"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:$n,advancedFilters:Jn,report:"categories"}),Object(c.createElement)(Mn,{charts:Kn,endpoint:"products",isRequesting:t,limitProperties:s?["products","categories"]:["categories"],query:l,selectedChart:bt(n.chart,Kn),filters:$n,advancedFilters:Jn,report:"categories"}),Object(c.createElement)(gn,{filters:$n,advancedFilters:Jn,mode:a,endpoint:"products",limitProperties:s?["products","categories"]:["categories"],path:r,query:l,isRequesting:t,itemsLabel:i,selectedChart:bt(n.chart,Kn)}),s?Object(c.createElement)(xn,{isRequesting:t,query:l,baseSearchQuery:{filter:"single_category"},hideCompare:s,filters:$n,advancedFilters:Jn}):Object(c.createElement)(Yn,{isRequesting:t,query:n,filters:$n,advancedFilters:Jn}))}}]),t}(c.Component);tr.propTypes={query:K.a.object.isRequired,path:K.a.string.isRequired};var nr=Object(ze.applyFilters)("woocommerce_admin_coupons_report_charts",[{key:"orders_count",label:Object(_e.__)("Discounted Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"},{key:"amount",label:Object(_e.__)("Amount","woocommerce-admin"),order:"desc",orderby:"amount",type:"currency"}]),rr=Object(ze.applyFilters)("woocommerce_admin_coupons_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Coupons","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Coupon","woocommerce-admin"),value:"select_coupon",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_coupon",chartMode:"item-comparison",path:["select_coupon"],settings:{type:"coupons",param:"coupons",getLabels:at,labels:{placeholder:Object(_e.__)("Type to search for a coupon","woocommerce-admin"),button:Object(_e.__)("Single Coupon","woocommerce-admin")}}}]},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-coupons",settings:{type:"coupons",param:"coupons",getLabels:at,labels:{title:Object(_e.__)("Compare Coupon Codes","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin"),helpText:Object(_e.__)("Check at least two coupon codes below to compare","woocommerce-admin")}}}]}]),or=Object(ze.applyFilters)("woocommerce_admin_coupon_report_advanced_filters",{}),cr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Coupon Code","woocommerce-admin"),key:"code",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Amount Discounted","woocommerce-admin"),key:"amount",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Created","woocommerce-admin"),key:"created"},{label:Object(_e.__)("Expires","woocommerce-admin"),key:"expires"},{label:Object(_e.__)("Type","woocommerce-admin"),key:"type"}]}},{key:"getRowsContent",value:function(e){var t=this,n=this.props.query,r=Object(Oe.getPersistedQuery)(n);return Object(s.map)(e,(function(e){var n=e.amount,o=e.coupon_id,a=e.orders_count,i=e.extended_info||{},s=i.code,l=i.date_created,u=i.date_expires,d=i.discount_type,p=Object(Oe.getNewPath)(r,"/analytics/coupons",{filter:"single_coupon",coupons:o}),m=Object(c.createElement)(I.Link,{href:p,type:"wc-admin"},s),b=Object(Oe.getNewPath)(r,"/analytics/orders",{filter:"advanced",coupon_includes:o});return[{display:m,value:s},{display:Object(c.createElement)(I.Link,{href:b,type:"wc-admin"},Lt("number",a)),value:a},{display:_t(n),value:At(n)},{display:Object(c.createElement)(I.Date,{date:l,visibleFormat:gt.defaultTableDateFormat}),value:l},{display:u?Object(c.createElement)(I.Date,{date:u,visibleFormat:gt.defaultTableDateFormat}):Object(_e.__)("N/A","woocommerce-admin"),value:u},{display:t.getCouponType(d),value:d}]}))}},{key:"getSummary",value:function(e){var t=e.coupons_count,n=void 0===t?0:t,r=e.orders_count,o=void 0===r?0:r,c=e.amount,a=void 0===c?0:c;return[{label:Object(_e._n)("coupon","coupons",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("order","orders",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("amount discounted","woocommerce-admin"),value:_t(a)}]}},{key:"getCouponType",value:function(e){return{percent:Object(_e.__)("Percentage","woocommerce-admin"),fixed_cart:Object(_e.__)("Fixed cart","woocommerce-admin"),fixed_product:Object(_e.__)("Fixed product","woocommerce-admin")}[e]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.isRequesting,o=e.query;return Object(c.createElement)(dn,{compareBy:"coupons",endpoint:"coupons",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:r,itemIdField:"coupon_id",query:o,searchBy:"coupons",tableQuery:{orderby:o.orderby||"orders_count",order:o.order||"desc",extended_info:!0},title:Object(_e.__)("Coupons","woocommerce-admin"),columnPrefsKey:"coupons_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component);function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ir=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e=this.props.query,t="compare-coupons"===e.filter&&e.coupons&&e.coupons.split(",").length>1?"item-comparison":"time-comparison";return{itemsLabel:Object(_e.__)("%d coupons","woocommerce-admin"),mode:t}}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=this.getChartMeta(),a=o.mode,i=o.itemsLabel,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return"item-comparison"===a&&(s.segmentby="coupon"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:rr,advancedFilters:or,report:"coupons"}),Object(c.createElement)(Mn,{charts:nr,endpoint:"coupons",isRequesting:t,query:s,selectedChart:bt(n.chart,nr),filters:rr,advancedFilters:or}),Object(c.createElement)(gn,{filters:rr,advancedFilters:or,mode:a,endpoint:"coupons",path:r,query:s,isRequesting:t,itemsLabel:i,selectedChart:bt(n.chart,nr)}),Object(c.createElement)(cr,{isRequesting:t,query:n,filters:rr,advancedFilters:or}))}}]),t}(c.Component);ir.propTypes={query:K.a.object.isRequired};var sr=Object(ze.applyFilters)("woocommerce_admin_taxes_report_charts",[{key:"total_tax",label:Object(_e.__)("Total Tax","woocommerce-admin"),order:"desc",orderby:"total_tax",type:"currency"},{key:"order_tax",label:Object(_e.__)("Order Tax","woocommerce-admin"),order:"desc",orderby:"order_tax",type:"currency"},{key:"shipping_tax",label:Object(_e.__)("Shipping Tax","woocommerce-admin"),order:"desc",orderby:"shipping_tax",type:"currency"},{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"}]),lr=Object(ze.applyFilters)("woocommerce_admin_taxes_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:["chart"],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Taxes","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-taxes",chartMode:"item-comparison",settings:{type:"taxes",param:"taxes",getLabels:ot(et+"/taxes",(function(e){return{id:e.id,label:Ne(e)}})),labels:{helpText:Object(_e.__)("Check at least two tax codes below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for tax codes to compare","woocommerce-admin"),title:Object(_e.__)("Compare Tax Codes","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]}]),ur=Object(ze.applyFilters)("woocommerce_admin_taxes_report_advanced_filters",{}),dr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Tax Code","woocommerce-admin"),key:"tax_code",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Rate","woocommerce-admin"),key:"rate",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Total Tax","woocommerce-admin"),key:"total_tax",isSortable:!0},{label:Object(_e.__)("Order Tax","woocommerce-admin"),key:"order_tax",isSortable:!0},{label:Object(_e.__)("Shipping Tax","woocommerce-admin"),key:"shipping_tax",isSortable:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0}]}},{key:"getRowsContent",value:function(e){var t=this;return Object(s.map)(e,(function(e){var n=t.props.query,r=e.order_tax,o=e.orders_count,a=e.tax_rate,i=e.tax_rate_id,s=e.total_tax,l=e.shipping_tax,u=Ne(e),d=Object(Oe.getPersistedQuery)(n),p=Object(Oe.getNewPath)(d,"/analytics/orders",{filter:"advanced",tax_rate_includes:i});return[{display:Object(c.createElement)(I.Link,{href:p,type:"wc-admin"},u),value:u},{display:a.toFixed(2)+"%",value:a},{display:kt(s),value:At(s)},{display:kt(r),value:At(r)},{display:kt(l),value:At(l)},{display:Lt("number",o),value:o}]}))}},{key:"getSummary",value:function(e){var t=e.tax_codes,n=void 0===t?0:t,r=e.total_tax,o=void 0===r?0:r,c=e.order_tax,a=void 0===c?0:c,i=e.shipping_tax,s=void 0===i?0:i,l=e.orders_count,u=void 0===l?0:l;return[{label:Object(_e._n)("tax code","tax codes",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e.__)("total tax","woocommerce-admin"),value:_t(o)},{label:Object(_e.__)("order tax","woocommerce-admin"),value:_t(a)},{label:Object(_e.__)("shipping tax","woocommerce-admin"),value:_t(s)},{label:Object(_e._n)("order","orders",u,"woocommerce-admin"),value:Lt("number",u)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.isRequesting,o=e.query;return Object(c.createElement)(dn,{compareBy:"taxes",endpoint:"taxes",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:r,itemIdField:"tax_rate_id",query:o,searchBy:"taxes",tableQuery:{orderby:o.orderby||"tax_rate_id"},title:Object(_e.__)("Taxes","woocommerce-admin"),columnPrefsKey:"taxes_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component);function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var mr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e="compare-taxes"===this.props.query.filter?"item-comparison":"time-comparison";return{itemsLabel:Object(_e.__)("%d taxes","woocommerce-admin"),mode:e}}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=this.getChartMeta(),a=o.mode,i=o.itemsLabel,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return"item-comparison"===a&&(s.segmentby="tax_rate_id"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:lr,advancedFilters:ur,report:"taxes"}),Object(c.createElement)(Mn,{charts:sr,endpoint:"taxes",isRequesting:t,query:s,selectedChart:bt(n.chart,sr),filters:lr,advancedFilters:ur}),Object(c.createElement)(gn,{filters:lr,advancedFilters:ur,mode:a,endpoint:"taxes",query:s,path:r,isRequesting:t,itemsLabel:i,selectedChart:bt(n.chart,sr)}),Object(c.createElement)(dr,{isRequesting:t,query:n,filters:lr,advancedFilters:ur}))}}]),t}(c.Component);mr.propTypes={query:K.a.object.isRequired};var br,hr,fr=n(30),gr=n.n(fr),vr=Object(ze.applyFilters)("woocommerce_admin_downloads_report_charts",[{key:"download_count",label:Object(_e.__)("Downloads","woocommerce-admin"),type:"number"}]),Mr=Object(ze.applyFilters)("woocommerce_admin_downloads_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Downloads","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),Or=Object(ze.applyFilters)("woocommerce_admin_downloads_report_advanced_filters",{title:Object(_e._x)("Downloads Match {{select /}} Filters","A sentence describing filters for Downloads. See screen shot for context: https://cloudup.com/ccxhyH2mEDg","woocommerce-admin"),filters:{product:{labels:{add:Object(_e.__)("Product","woocommerce-admin"),placeholder:Object(_e.__)("Search","woocommerce-admin"),remove:Object(_e.__)("Remove product filter","woocommerce-admin"),rule:Object(_e.__)("Select a product filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Product{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select product","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","products","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","products","woocommerce-admin")}],input:{component:"Search",type:"products",getLabels:st}},customer:{labels:{add:Object(_e.__)("Username","woocommerce-admin"),placeholder:Object(_e.__)("Search customer username","woocommerce-admin"),remove:Object(_e.__)("Remove customer username filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer username filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Username{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer username","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer usernames","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer usernames","woocommerce-admin")}],input:{component:"Search",type:"usernames",getLabels:it}},order:{labels:{add:Object(_e.__)("Order number","woocommerce-admin"),placeholder:Object(_e.__)("Search order number","woocommerce-admin"),remove:Object(_e.__)("Remove order number filter","woocommerce-admin"),rule:Object(_e.__)("Select a order number filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Order number{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select order number","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","order numbers","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","order numbers","woocommerce-admin")}],input:{component:"Search",type:"orders",getLabels:(hr=gr()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split(","),e.next=3,n.map((function(e){return{id:e,label:"#"+e}}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return hr.apply(this,arguments)})}},ip_address:{labels:{add:Object(_e.__)("IP Address","woocommerce-admin"),placeholder:Object(_e.__)("Search IP address","woocommerce-admin"),remove:Object(_e.__)("Remove IP address filter","woocommerce-admin"),rule:Object(_e.__)("Select an IP address filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}IP Address{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select IP address","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","IP addresses","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","IP addresses","woocommerce-admin")}],input:{component:"Search",type:"downloadIps",getLabels:(br=gr()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split(","),e.next=3,n.map((function(e){return{id:e,label:e}}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return br.apply(this,arguments)})}}}}),yr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Date","woocommerce-admin"),key:"date",defaultSort:!0,required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Product Title","woocommerce-admin"),key:"product",isSortable:!0,required:!0},{label:Object(_e.__)("File Name","woocommerce-admin"),key:"file_name"},{label:Object(_e.__)("Order #","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Order Number","woocommerce-admin"),key:"order_number"},{label:Object(_e.__)("User Name","woocommerce-admin"),key:"user_id"},{label:Object(_e.__)("IP","woocommerce-admin"),key:"ip_address"}]}},{key:"getRowsContent",value:function(e){var t=this.props.query,n=Object(Oe.getPersistedQuery)(t);return Object(s.map)(e,(function(e){var t=e._embedded,r=e.date,o=e.file_name,a=e.file_path,i=e.ip_address,s=e.order_id,l=e.order_number,u=e.product_id,d=e.username,p=t.product[0].name,m=Object(Oe.getNewPath)(n,"/analytics/products",{filter:"single_product",products:u});return[{display:Object(c.createElement)(I.Date,{date:r,visibleFormat:gt.defaultTableDateFormat}),value:r},{display:Object(c.createElement)(I.Link,{href:m,type:"wc-admin"},p),value:p},{display:Object(c.createElement)(I.Link,{href:a,type:"external"},o),value:o},{display:Object(c.createElement)(I.Link,{href:Object(ye.f)("post.php?post=".concat(s,"&action=edit")),type:"wp-admin"},l),value:l},{display:d,value:d},{display:i,value:i}]}))}},{key:"getSummary",value:function(e){var t=e.download_count,n=void 0===t?0:t,r=this.props.query,o=yt(r),c=Ft()(o.primary.after),a=Ft()(o.primary.before).diff(c,"days")+1;return[{label:Object(_e._n)("day","days",a,"woocommerce-admin"),value:Lt("number",a)},{label:Object(_e._n)("download","downloads",n,"woocommerce-admin"),value:Lt("number",n)}]}},{key:"render",value:function(){var e=this.props,t=e.query,n=e.filters,r=e.advancedFilters;return Object(c.createElement)(dn,{endpoint:"downloads",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:t,tableQuery:{_embed:!0},title:Object(_e.__)("Downloads","woocommerce-admin"),columnPrefsKey:"downloads_report_columns",filters:n,advancedFilters:r})}}]),t}(c.Component),wr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.query,n=e.path;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:t,path:n,filters:Mr,advancedFilters:Or,report:"downloads"}),Object(c.createElement)(Mn,{charts:vr,endpoint:"downloads",query:t,selectedChart:bt(t.chart,vr),filters:Mr,advancedFilters:Or}),Object(c.createElement)(gn,{endpoint:"downloads",path:n,query:t,selectedChart:bt(t.chart,vr),filters:Mr,advancedFilters:Or}),Object(c.createElement)(yr,{query:t,filters:Mr,advancedFilters:Or}))}}]),t}(c.Component);wr.propTypes={query:K.a.object.isRequired};var zr=Object(ze.applyFilters)("woocommerce_admin_stock_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"type",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Products","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Out of Stock","woocommerce-admin"),value:"outofstock"},{label:Object(_e.__)("Low Stock","woocommerce-admin"),value:"lowstock"},{label:Object(_e.__)("In Stock","woocommerce-admin"),value:"instock"},{label:Object(_e.__)("On Backorder","woocommerce-admin"),value:"onbackorder"}]}]),_r=Object(ze.applyFilters)("woocommerce_admin_stock_report_advanced_filters",{});var Ar=Object(ye.g)("stockStatuses",{}),jr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Product / Variation","woocommerce-admin"),key:"title",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("SKU","woocommerce-admin"),key:"sku",isSortable:!0},{label:Object(_e.__)("Status","woocommerce-admin"),key:"stock_status",isSortable:!0,defaultSort:!0},{label:Object(_e.__)("Stock","woocommerce-admin"),key:"stock_quantity",isSortable:!0}]}},{key:"getRowsContent",value:function(e){var t=this.props.query,n=Object(Oe.getPersistedQuery)(t);return e.map((function(e){var t,r,o,a=e.id,i=e.manage_stock,s=e.parent_id,l=e.sku,u=e.stock_quantity,d=e.stock_status,p=e.low_stock_amount,m=Object(En.decodeEntities)(e.name),b=Object(Oe.getNewPath)(n,"/analytics/products",{filter:"single_product",products:s||a}),h=Object(c.createElement)(I.Link,{href:b,type:"wc-admin"},m),f=Object(ye.f)("post.php?action=edit&post="+(s||a));return[{display:h,value:m},{display:l,value:l},{display:(t=d,o=p,(r=u)&&"instock"===t&&r<=o?Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},Object(_e._x)("Low","Indication of a low quantity","woocommerce-admin")):Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},Ar[d])),value:d},{display:i?Lt("number",u):Object(_e.__)("N/A","woocommerce-admin"),value:u}]}))}},{key:"getSummary",value:function(e){var t=e.products,n=void 0===t?0:t,r=e.outofstock,o=void 0===r?0:r,c=e.lowstock,a=void 0===c?0:c,i=e.instock,s=void 0===i?0:i,l=e.onbackorder,u=void 0===l?0:l;return[{label:Object(_e._n)("product","products",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e.__)("out of stock",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("low stock",a,"woocommerce-admin"),value:Lt("number",a)},{label:Object(_e.__)("on backorder",u,"woocommerce-admin"),value:Lt("number",u)},{label:Object(_e.__)("in stock",s,"woocommerce-admin"),value:Lt("number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.query;return Object(c.createElement)(dn,{endpoint:"stock",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:r,tableQuery:{orderby:r.orderby||"stock_status",order:r.order||"asc",type:r.type||"all"},title:Object(_e.__)("Stock","woocommerce-admin"),filters:n,advancedFilters:t})}}]),t}(c.Component),kr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.query,n=e.path;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:t,path:n,showDatePicker:!1,filters:zr,advancedFilters:_r,report:"stock"}),Object(c.createElement)(jr,{query:t,filters:zr,advancedFilters:_r}))}}]),t}(c.Component);kr.propTypes={query:K.a.object.isRequired};var Er=Object(ye.g)("dataEndpoints",{countries:{}}).countries,Cr=Object(ze.applyFilters)("woocommerce_admin_customers_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Customers","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Customer","woocommerce-admin"),value:"select_customer",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_customer",chartMode:"item-comparison",path:["select_customer"],settings:{type:"customers",param:"customers",getLabels:it,labels:{placeholder:Object(_e.__)("Type to search for a customer","woocommerce-admin"),button:Object(_e.__)("Single Customer","woocommerce-admin")}}}]},{label:Object(_e.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),Lr=Object(ze.applyFilters)("woocommerce_admin_customers_report_advanced_filters",{title:Object(_e._x)("Customers Match {{select /}} Filters","A sentence describing filters for Customers. See screen shot for context: https://cloudup.com/cCsm3GeXJbE","woocommerce-admin"),filters:{name:{labels:{add:Object(_e.__)("Name","woocommerce-admin"),placeholder:Object(_e.__)("Search","woocommerce-admin"),remove:Object(_e.__)("Remove customer name filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer name filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Name{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer name","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer names","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer names","woocommerce-admin")}],input:{component:"Search",type:"customers",getLabels:ot(et+"/customers",(function(e){return{id:e.id,label:e.name}}))}},country:{labels:{add:Object(_e.__)("Country / Region","woocommerce-admin"),placeholder:Object(_e.__)("Search","woocommerce-admin"),remove:Object(_e.__)("Remove country / region filter","woocommerce-admin"),rule:Object(_e.__)("Select a country / region filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Country / Region{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select country / region","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","countries","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","countries","woocommerce-admin")}],input:{component:"Search",type:"countries",getLabels:function(){var e=gr()(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Er.map((function(e){return{key:e.code,label:Object(En.decodeEntities)(e.name)}})),r=t.split(","),e.next=4,n.filter((function(e){return r.includes(e.key)}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},username:{labels:{add:Object(_e.__)("Username","woocommerce-admin"),placeholder:Object(_e.__)("Search customer username","woocommerce-admin"),remove:Object(_e.__)("Remove customer username filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer username filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Username{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer username","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer usernames","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer usernames","woocommerce-admin")}],input:{component:"Search",type:"usernames",getLabels:it}},email:{labels:{add:Object(_e.__)("Email","woocommerce-admin"),placeholder:Object(_e.__)("Search customer email","woocommerce-admin"),remove:Object(_e.__)("Remove customer email filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer email filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Email{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer email","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer emails","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer emails","woocommerce-admin")}],input:{component:"Search",type:"emails",getLabels:ot(et+"/customers",(function(e){return{id:e.id,label:e.email}}))}},orders_count:{labels:{add:Object(_e.__)("No. of Orders","woocommerce-admin"),remove:Object(_e.__)("Remove order filter","woocommerce-admin"),rule:Object(_e.__)("Select an order count filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}No. of Orders{{/title}} {{rule /}} {{filter /}}","woocommerce-admin")},rules:[{value:"max",label:Object(_e._x)("Less Than","number of orders","woocommerce-admin")},{value:"min",label:Object(_e._x)("More Than","number of orders","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","number of orders","woocommerce-admin")}],input:{component:"Number"}},total_spend:{labels:{add:Object(_e.__)("Total Spend","woocommerce-admin"),remove:Object(_e.__)("Remove total spend filter","woocommerce-admin"),rule:Object(_e.__)("Select a total spend filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Total Spend{{/title}} {{rule /}} {{filter /}}","woocommerce-admin")},rules:[{value:"max",label:Object(_e._x)("Less Than","total spend by customer","woocommerce-admin")},{value:"min",label:Object(_e._x)("More Than","total spend by customer","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","total spend by customer","woocommerce-admin")}],input:{component:"Currency"}},avg_order_value:{labels:{add:Object(_e.__)("AOV","woocommerce-admin"),remove:Object(_e.__)("Remove average order value filter","woocommerce-admin"),rule:Object(_e.__)("Select an average order value filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}AOV{{/title}} {{rule /}} {{filter /}}","woocommerce-admin")},rules:[{value:"max",label:Object(_e._x)("Less Than","average order value of customer","woocommerce-admin")},{value:"min",label:Object(_e._x)("More Than","average order value of customer","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","average order value of customer","woocommerce-admin")}],input:{component:"Currency"}},registered:{labels:{add:Object(_e.__)("Registered","woocommerce-admin"),remove:Object(_e.__)("Remove registered filter","woocommerce-admin"),rule:Object(_e.__)("Select a registered filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Registered{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select registered date","woocommerce-admin")},rules:[{value:"before",label:Object(_e._x)("Before","date","woocommerce-admin")},{value:"after",label:Object(_e._x)("After","date","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","date","woocommerce-admin")}],input:{component:"Date"}},last_active:{labels:{add:Object(_e.__)("Last active","woocommerce-admin"),remove:Object(_e.__)("Remove last active filter","woocommerce-admin"),rule:Object(_e.__)("Select a last active filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Last active{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select registered date","woocommerce-admin")},rules:[{value:"before",label:Object(_e._x)("Before","date","woocommerce-admin")},{value:"after",label:Object(_e._x)("After","date","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","date","woocommerce-admin")}],input:{component:"Date"}}}}),Nr=n(141),Sr=Object(ye.g)("dataEndpoints",{countries:{}}).countries,qr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Name","woocommerce-admin"),key:"name",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Username","woocommerce-admin"),key:"username",hiddenByDefault:!0},{label:Object(_e.__)("Last Active","woocommerce-admin"),key:"date_last_active",defaultSort:!0,isSortable:!0},{label:Object(_e.__)("Sign Up","woocommerce-admin"),key:"date_registered",isSortable:!0},{label:Object(_e.__)("Email","woocommerce-admin"),key:"email"},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Total Spend","woocommerce-admin"),key:"total_spend",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("AOV","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Average Order Value","woocommerce-admin"),key:"avg_order_value",isNumeric:!0},{label:Object(_e.__)("Country / Region","woocommerce-admin"),key:"country",isSortable:!0},{label:Object(_e.__)("City","woocommerce-admin"),key:"city",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Region","woocommerce-admin"),key:"state",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Postal Code","woocommerce-admin"),key:"postcode",hiddenByDefault:!0,isSortable:!0}]}},{key:"getCountryName",value:function(e){return void 0!==Sr[e]?Sr[e]:null}},{key:"getRowsContent",value:function(e){var t=this;return e.map((function(e){var n=e.avg_order_value,r=e.date_last_active,o=e.date_registered,a=e.email,i=e.name,s=e.user_id,l=e.orders_count,u=e.username,d=e.total_spend,p=e.postcode,m=e.city,b=e.state,h=e.country,f=t.getCountryName(h),g=s?Object(c.createElement)(I.Link,{href:Object(ye.f)("user-edit.php?user_id="+s),type:"wp-admin"},i):i,v=r?Object(c.createElement)(I.Date,{date:r,visibleFormat:gt.defaultTableDateFormat}):"—",M=o?Object(c.createElement)(I.Date,{date:o,visibleFormat:gt.defaultTableDateFormat}):"—",O=Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Nr.a,{text:f},Object(c.createElement)("span",{"aria-hidden":"true"},h)),Object(c.createElement)("span",{className:"screen-reader-text"},f));return[{display:g,value:i},{display:u,value:u},{display:v,value:r},{display:M,value:o},{display:Object(c.createElement)("a",{href:"mailto:"+a},a),value:a},{display:Lt("number",l),value:l},{display:_t(d),value:At(d)},{display:_t(n),value:At(n)},{display:O,value:h},{display:m,value:m},{display:b,value:b},{display:p,value:p}]}))}},{key:"getSummary",value:function(e){var t=e.customers_count,n=void 0===t?0:t,r=e.avg_orders_count,o=void 0===r?0:r,c=e.avg_total_spend,a=void 0===c?0:c,i=e.avg_avg_order_value,s=void 0===i?0:i;return[{label:Object(_e._n)("customer","customers",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("average order","average orders",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("average lifetime spend","woocommerce-admin"),value:_t(a)},{label:Object(_e.__)("average order value","woocommerce-admin"),value:_t(s)}]}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.filters,o=e.advancedFilters;return Object(c.createElement)(dn,{endpoint:"customers",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:t,itemIdField:"id",query:n,labels:{placeholder:Object(_e.__)("Search by customer name","woocommerce-admin")},searchBy:"customers",title:Object(_e.__)("Customers","woocommerce-admin"),columnPrefsKey:"customers_report_columns",filters:r,advancedFilters:o})}}]),t}(c.Component);function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({orderby:"date_last_active",order:"desc"},n);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:Cr,showDatePicker:!1,advancedFilters:Lr,report:"customers"}),Object(c.createElement)(qr,{isRequesting:t,query:o,filters:Cr,advancedFilters:Lr}))}}]),t}(c.Component);function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Br(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}xr.propTypes={query:K.a.object.isRequired};var Dr="woocommerce_admin_reports_list",Hr=Object(ye.g)("manageStock","no"),Xr=function(){var e=[{report:"revenue",title:Object(_e.__)("Revenue","woocommerce-admin"),component:Qn},{report:"products",title:Object(_e.__)("Products","woocommerce-admin"),component:Xn},{report:"orders",title:Object(_e.__)("Orders","woocommerce-admin"),component:wn},{report:"categories",title:Object(_e.__)("Categories","woocommerce-admin"),component:tr},{report:"coupons",title:Object(_e.__)("Coupons","woocommerce-admin"),component:ir},{report:"taxes",title:Object(_e.__)("Taxes","woocommerce-admin"),component:mr},{report:"downloads",title:Object(_e.__)("Downloads","woocommerce-admin"),component:wr},"yes"===Hr?{report:"stock",title:Object(_e.__)("Stock","woocommerce-admin"),component:kr}:null,{report:"customers",title:Object(_e.__)("Customers","woocommerce-admin"),component:xr},{report:"downloads",title:Object(_e.__)("Downloads","woocommerce-admin"),component:wr}].filter(Boolean);return Object(ze.applyFilters)(Dr,e)},Vr=function(e){var t=e.params,n=e.path;return t.report||n.replace(/^\/+/,"")},Ir=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).state={hasError:!1},e}return V()(t,e),R()(t,[{key:"componentDidCatch",value:function(e){this.setState({hasError:!0}),console.warn(e)}},{key:"render",value:function(){if(this.state.hasError)return null;if(this.props.isError)return Object(c.createElement)(Ht,{isError:!0});var e=Vr(this.props),t=Object(s.find)(Xr(),{report:e});if(!t)return null;var n=t.component;return Object(c.createElement)(n,this.props)}}]),t}(c.Component);Ir.propTypes={params:K.a.object.isRequired};var Fr=Object(ke.a)(Object(I.useFilters)(Dr),rn((function(e,t){var n=Object(Oe.getQuery)();if(!n.search)return{};var r=Vr(t),o=Object(Oe.getSearchWords)(n),c="categories"===r&&"single_category"===n.filter?"products":r,a=function(e,t,n){var r=e("wc-api"),o=r.getItems,c=r.getItemsError,a=r.isGetItemsRequesting,i={},s=!1,l=!1;return n.forEach((function(e){var n={search:e,per_page:10};o(t,n).forEach((function(e,t){i[t]=e})),a(t,n)&&(s=!0),c(t,n)&&(l=!0)})),{items:i,isRequesting:s,isError:l}}(e,c,o),i=a.isError,s=a.isRequesting,l=a.items,u=Object.keys(l);return u.length?{isError:i,isRequesting:s,query:Wr({},t.query,je()({},c,u.join(",")))}:{isError:i,isRequesting:s}})))(Ir),Ur=n(87),Gr=(n(394),n(34)),Qr=n.n(Gr),Kr=function(e){var t=e.value,n=e.onChange,r=Object(we.parse)(t.replace(/&amp;/g,"&")),o=Ot(r),a=o.period,i=o.compare,s=o.before,l=o.after,u=yt(r),d={period:a,compare:i,before:s,after:l,primaryDate:u.primary,secondaryDate:u.secondary};return Object(c.createElement)(I.DateRangeFilterPicker,{query:r,onRangeSelect:function(e){n({target:{name:"woocommerce_default_date_range",value:Object(we.stringify)(e)}})},dateQuery:d,isoDateFormat:gt.isoDateFormat})},$r=["completed","processing","refunded","cancelled","failed","pending","on-hold"],Jr=Object(ye.g)("wcAdminSettings",{woocommerce_actionable_order_statuses:[],woocommerce_excluded_report_order_statuses:[],woocommerce_default_date_range:"period=month&compare=previous_year"}),Zr=Jr.woocommerce_actionable_order_statuses,Yr=Jr.woocommerce_excluded_report_order_statuses,eo=Jr.woocommerce_default_date_range,to=Array.isArray(Zr)?Zr:[],no=Array.isArray(Yr)?Yr:[],ro=Object.keys(ye.d).filter((function(e){return"refunded"!==e})).map((function(e){return{value:e,label:ye.d[e],description:Object(_e.sprintf)(Object(_e.__)("Exclude the %s status from reports","woocommerce-admin"),ye.d[e])}})),oo=Object(ze.applyFilters)("woocommerce_admin_analytics_settings",[{name:"woocommerce_excluded_report_order_statuses",label:Object(_e.__)("Excluded Statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:[{key:"defaultStatuses",options:ro.filter((function(e){return $r.includes(e.value)}))},{key:"customStatuses",label:Object(_e.__)("Custom Statuses","woocommerce-admin"),options:ro.filter((function(e){return!$r.includes(e.value)}))}],helpText:Qr()({mixedString:Object(_e.__)("Orders with these statuses are excluded from the totals in your reports. The {{strong}}Refunded{{/strong}} status can not be excluded.","woocommerce-admin"),components:{strong:Object(c.createElement)("strong",null)}}),initialValue:St()(no),defaultValue:["pending","cancelled","failed"]},{name:"woocommerce_actionable_order_statuses",label:Object(_e.__)("Actionable Statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:[{key:"defaultStatuses",options:ro.filter((function(e){return $r.includes(e.value)}))},{key:"customStatuses",label:Object(_e.__)("Custom Statuses","woocommerce-admin"),options:ro.filter((function(e){return!$r.includes(e.value)}))}],helpText:Object(_e.__)("Orders with these statuses require action on behalf of the store admin.These orders will show up in the Orders tab under the activity panel.","woocommerce-admin"),initialValue:St()(to),defaultValue:nt},{name:"woocommerce_default_date_range",label:Object(_e.__)("Default Date Range:","woocommerce-admin"),inputType:"component",component:Kr,helpText:Object(_e.__)("Select a default date range. When no range is selected, reports will be viewed by the default date range.","woocommerce-admin"),initialValue:eo,defaultValue:"period=month&compare=previous_year"}]),co=(n(395),function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).renderInput=function(){var e=n.props,t=e.handleChange,r=e.name,o=e.inputText,a=e.inputType,i=e.options,l=e.value,u=e.component,d=n.state.disabled,p=Object(s.uniqueId)(r);switch(a){case"checkboxGroup":return i.map((function(e){return e.options.length>0&&Object(c.createElement)("div",{className:"woocommerce-setting__options-group",key:e.key,"aria-labelledby":r+"-label"},e.label&&Object(c.createElement)("span",{className:"woocommerce-setting__options-group-label"},e.label),n.renderCheckboxOptions(e.options))}));case"checkbox":return n.renderCheckboxOptions(i);case"button":return Object(c.createElement)(Ur.a,{isDefault:!0,onClick:n.handleInputCallback,disabled:d},o);case"component":var m=u;return Object(c.createElement)(m,N()({value:l,onChange:t},n.props));case"text":default:return Object(c.createElement)("input",{id:p,type:"text",name:r,onChange:t,value:l,placeholder:o,disabled:d})}},n.handleInputCallback=function(){var e=n.props,t=e.createNotice,r=e.callback;if("function"==typeof r)return new Promise((function(e,o){n.setState({disabled:!0}),r(e,o,t)})).then((function(){n.setState({disabled:!1})})).catch((function(){n.setState({disabled:!1})}))},n.state={disabled:!1},n}return V()(t,e),R()(t,[{key:"renderCheckboxOptions",value:function(e){var t=this.props,n=t.handleChange,r=t.name,o=t.value,a=this.state.disabled;return e.map((function(e){var t=Object(s.uniqueId)(r+"-"+e.value);return Object(c.createElement)("label",{htmlFor:t,key:e.value},Object(c.createElement)("input",{id:t,type:"checkbox",name:r,onChange:n,"aria-label":e.description,checked:o&&o.includes(e.value),value:e.value,disabled:a}),e.label)}))}},{key:"render",value:function(){var e=this.props,t=e.helpText,n=e.label,r=e.name;return Object(c.createElement)("div",{className:"woocommerce-setting"},Object(c.createElement)("div",{className:"woocommerce-setting__label",id:r+"-label"},n),Object(c.createElement)("div",{className:"woocommerce-setting__input"},this.renderInput(),t&&Object(c.createElement)("span",{className:"woocommerce-setting__help"},t)))}}]),t}(c.Component));co.propTypes={callback:K.a.func,handleChange:K.a.func.isRequired,helpText:K.a.oneOfType([K.a.string,K.a.array]),inputText:K.a.string,inputType:K.a.oneOf(["button","checkbox","checkboxGroup","text","component"]),label:K.a.string.isRequired,name:K.a.string.isRequired,options:K.a.arrayOf(K.a.shape({value:K.a.string,label:K.a.string,description:K.a.string,key:K.a.string,options:K.a.array})),value:K.a.oneOfType([K.a.string,K.a.array])};var ao=Object(ke.a)(Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}})))(co),io=n(754),so=function(e,t,n){var r={};if(n&&(r.skip_existing=!0),"all"!==t.label)if("custom"===t.label){var o=Ft()().diff(Ft()(t.date,e),"days",!0);r.days=Math.floor(o)}else r.days=parseInt(t.label,10);return r};var lo=function(e){var t,n=e.importDate,r=e.onDeletePreviousData,o=e.onReimportData,a=e.onStartImport,i=e.onStopImport,s=e.status;return Object(c.createElement)("div",{className:"woocommerce-settings__actions woocommerce-settings-historical-data__actions"},(t="ready"!==s,["initializing","customers","orders","finalizing"].includes(s)?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{className:"woocommerce-settings-historical-data__action-button",isPrimary:!0,onClick:i},Object(_e.__)("Stop Import","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-setting__help woocommerce-settings-historical-data__action-help"},Object(_e.__)("Imported data will not be lost if the import is stopped.","woocommerce-admin"),Object(c.createElement)("br",null),Object(_e.__)("Navigating away from this page will not affect the import.","woocommerce-admin"))):["ready","nothing"].includes(s)?n?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:a,disabled:t},Object(_e.__)("Start","woocommerce-admin")),Object(c.createElement)(Ur.a,{isDefault:!0,onClick:r},Object(_e.__)("Delete Previously Imported Data","woocommerce-admin"))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:a,disabled:t},Object(_e.__)("Start","woocommerce-admin"))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isDefault:!0,onClick:o},Object(_e.__)("Re-import Data","woocommerce-admin")),Object(c.createElement)(Ur.a,{isDefault:!0,onClick:r},Object(_e.__)("Delete Previously Imported Data","woocommerce-admin")))))},uo=n(396);var po=function(e){var t,n=e.dateFormat,r=e.disabled,o=e.onDateChange,a=e.onPeriodChange,i=e.value,s=function(e){e.date&&e.date.isValid?o(e.date.format(n)):o(e.text)},l=function(e){return e.isValid()&&i.date.length===n.length?e.isAfter(new Date,"day")?gt.dateValidationMessages.future:null:gt.dateValidationMessages.invalid};return Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__columns"},Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__column"},Object(c.createElement)(uo.a,{label:Object(_e.__)("Import Historical Data","woocommerce-admin"),value:i.label,disabled:r,onChange:function(e){a(e)},options:[{label:"All",value:"all"},{label:"Last 365 days",value:"365"},{label:"Last 90 days",value:"90"},{label:"Last 30 days",value:"30"},{label:"Last 7 days",value:"7"},{label:"Last 24 hours",value:"1"},{label:"Custom",value:"custom"}]})),"custom"===i.label&&(t=Ft()(i.date,n),Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__column"},Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__column-label"},Object(_e.__)("Beginning on","woocommerce-admin")),Object(c.createElement)(I.DatePicker,{date:t.isValid()?t.toDate():null,dateFormat:n,disabled:r,error:l(t),isInvalidDate:function(e){return Ft()(e).isAfter(new Date,"day")},onUpdate:s,text:i.date}))))};var mo=function(e){var t=e.label,n=e.progress,r=e.total,o=Object(_e.sprintf)(Object(_e.__)("Imported %(label)s","woocommerce-admin"),{label:t}),a=Object(s.isNil)(r)?null:Object(_e.sprintf)(Object(_e.__)("%(progress)s of %(total)s","woocommerce-admin"),{progress:n||0,total:r});return Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__progress"},Object(c.createElement)("span",{className:"woocommerce-settings-historical-data__progress-label"},o),a&&Object(c.createElement)("span",{className:"woocommerce-settings-historical-data__progress-label"},a),Object(c.createElement)("progress",{className:"woocommerce-settings-historical-data__progress-bar",max:r,value:n||0}))};var bo=Object(I.useFilters)("woocommerce_admin_import_status")((function(e){var t=e.importDate,n=e.status,r=Object(ze.applyFilters)("woocommerce_admin_import_status",{nothing:Object(_e.__)("Nothing To Import","woocommerce-admin"),ready:Object(_e.__)("Ready To Import","woocommerce-admin"),initializing:[Object(_e.__)("Initializing","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],customers:[Object(_e.__)("Importing Customers","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],orders:[Object(_e.__)("Importing Orders","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],finalizing:[Object(_e.__)("Finalizing","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],finished:-1===t?Object(_e.__)("All historical data imported","woocommerce-admin"):Object(_e.sprintf)(Object(_e.__)("Historical data from %s onward imported","woocommerce-admin"),Ft()(t).format("YYYY-MM-DD"))});return Object(c.createElement)("span",{className:"woocommerce-settings-historical-data__status"},Object(_e.__)("Status:","woocommerce-admin")+" ",r[n])}));var ho=function(e){var t=e.checked,n=e.disabled,r=e.onChange;return Object(c.createElement)(qt.a,{className:"woocommerce-settings-historical-data__skip-checkbox",checked:t,disabled:n,label:Object(_e.__)("Skip previously imported customers and orders","woocommerce-admin"),onChange:r})},fo=(n(397),function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.customersProgress,n=e.customersTotal,r=e.dateFormat,o=e.importDate,a=e.inProgress,i=e.onPeriodChange,l=e.onDateChange,u=e.onSkipChange,d=e.onDeletePreviousData,p=e.onReimportData,m=e.onStartImport,b=e.onStopImport,h=e.ordersProgress,f=e.ordersTotal,g=e.period,v=e.skipChecked,M=function(e){var t=e.customersProgress,n=e.customersTotal,r=e.inProgress,o=e.ordersProgress,c=e.ordersTotal;return r?Object(s.isNil)(t)||Object(s.isNil)(o)||Object(s.isNil)(n)||Object(s.isNil)(c)?"initializing":t<n?"customers":o<c?"orders":"finalizing":n>0||c>0?t===n&&o===c?"finished":"ready":"nothing"}({customersProgress:t,customersTotal:n,inProgress:a,ordersProgress:h,ordersTotal:f});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SectionHeader,{title:Object(_e.__)("Import Historical Data","woocommerce-admin")}),Object(c.createElement)("div",{className:"woocommerce-settings__wrapper"},Object(c.createElement)("div",{className:"woocommerce-setting"},Object(c.createElement)("div",{className:"woocommerce-setting__input"},Object(c.createElement)("span",{className:"woocommerce-setting__help"},Object(_e.__)("This tool populates historical analytics data by processing customers and orders created prior to activating WooCommerce Admin.","woocommerce-admin")),"finished"!==M&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(po,{dateFormat:r,disabled:a,onPeriodChange:i,onDateChange:l,value:g}),Object(c.createElement)(ho,{disabled:a,checked:v,onChange:u}),Object(c.createElement)(mo,{label:Object(_e.__)("Registered Customers","woocommerce-admin"),progress:t,total:n}),Object(c.createElement)(mo,{label:Object(_e.__)("Orders and Refunds","woocommerce-admin"),progress:h,total:f})),Object(c.createElement)(bo,{importDate:o,status:M})))),Object(c.createElement)(lo,{importDate:o,onDeletePreviousData:d,onReimportData:p,onStartImport:m,onStopImport:b,status:M}))}}]),t}(c.Component)),go=rn((function(e,t){var n=e("wc-api"),r=n.getImportStatus,o=n.isGetImportStatusRequesting,c=n.getImportTotals,a=t.activeImport,i=t.dateFormat,l=t.lastImportStartTimestamp,u=t.lastImportStopTimestamp,d=t.onImportStarted,p=t.onImportFinished,m=t.period,b=t.skipChecked,h=void 0!==l&&void 0===u||l>u,f=c(so(i,m,b),u),g=f.customers,v=f.orders,M=r(l,h?{freshness:3e3,timeout:3e3}:tt),O=M.customers,y=M.imported_from,w=M.is_importing,z=M.orders,_=O||{},A=_.imported,j=_.total,k=z||{},E=k.imported,C=k.total,L=o(l);return Boolean(!l&&!L&&!h&&!0===w)&&d(),Boolean(!L&&h&&!1===w&&(A===j&&j>0||E===C&&C>0))&&p(),a?{customersProgress:A,customersTotal:Object(s.isNil)(j)?g:j,importDate:y,inProgress:h,ordersProgress:E,ordersTotal:Object(s.isNil)(C)?v:C}:{customersTotal:g,importDate:y,ordersTotal:v}}))(fo);function vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oo=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).dateFormat=Object(_e.__)("MM/DD/YYYY","woocommerce-admin"),e.state={activeImport:null,lastImportStartTimestamp:0,lastImportStopTimestamp:0,period:{date:Ft()().format(e.dateFormat),label:"all"},skipChecked:!0},e.makeQuery=e.makeQuery.bind(ft()(e)),e.onImportFinished=e.onImportFinished.bind(ft()(e)),e.onImportStarted=e.onImportStarted.bind(ft()(e)),e.onDeletePreviousData=e.onDeletePreviousData.bind(ft()(e)),e.onReimportData=e.onReimportData.bind(ft()(e)),e.onStartImport=e.onStartImport.bind(ft()(e)),e.onStopImport=e.onStopImport.bind(ft()(e)),e.onDateChange=e.onDateChange.bind(ft()(e)),e.onPeriodChange=e.onPeriodChange.bind(ft()(e)),e.onSkipChange=e.onSkipChange.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"makeQuery",value:function(e,t){var n=this,r=this.props.createNotice;Le()({path:e,method:"POST"}).then((function(e){"success"===e.status?r("success",e.message):(r("error",t),n.setState({activeImport:!1,lastImportStopTimestamp:Date.now()}))})).catch((function(e){e&&e.message&&(r("error",e.message),n.setState({activeImport:!1,lastImportStopTimestamp:Date.now()}))}))}},{key:"onImportFinished",value:function(){(0,this.props.debouncedSpeak)("Import complete"),this.setState({lastImportStopTimestamp:Date.now()})}},{key:"onImportStarted",value:function(){var e=this.props,t=e.notes,n=e.updateNote,r=t.find((function(e){return"wc-admin-historical-data"===e.name}));r&&n(r.id,{status:"actioned"}),this.setState({activeImport:!0,lastImportStartTimestamp:Date.now()})}},{key:"onDeletePreviousData",value:function(){var e=Object(_e.__)("There was a problem deleting your previous data.","woocommerce-admin");this.makeQuery("/wc-analytics/reports/import/delete",e),this.setState({activeImport:!1}),Object(an.b)("analytics_import_delete_previous")}},{key:"onReimportData",value:function(){this.setState({activeImport:!1})}},{key:"onStartImport",value:function(){var e=this.state,t=e.period,n=e.skipChecked,r=Object(Ee.addQueryArgs)("/wc-analytics/reports/import",so(this.dateFormat,t,n)),o=Object(_e.__)("There was a problem rebuilding your report data.","woocommerce-admin");this.makeQuery(r,o),this.onImportStarted()}},{key:"onStopImport",value:function(){this.setState({lastImportStopTimestamp:Date.now()});var e=Object(_e.__)("There was a problem stopping your current import.","woocommerce-admin");this.makeQuery("/wc-analytics/reports/import/cancel",e)}},{key:"onPeriodChange",value:function(e){this.setState({activeImport:!1,period:Mo({},this.state.period,{label:e})})}},{key:"onDateChange",value:function(e){this.setState({activeImport:!1,period:{date:e,label:"custom"}})}},{key:"onSkipChange",value:function(e){this.setState({activeImport:!1,skipChecked:e})}},{key:"render",value:function(){var e=this.state,t=e.activeImport,n=e.lastImportStartTimestamp,r=e.lastImportStopTimestamp,o=e.period,a=e.skipChecked;return Object(c.createElement)(go,{activeImport:t,dateFormat:this.dateFormat,onImportFinished:this.onImportFinished,onImportStarted:this.onImportStarted,lastImportStartTimestamp:n,lastImportStopTimestamp:r,onPeriodChange:this.onPeriodChange,onDateChange:this.onDateChange,onSkipChange:this.onSkipChange,onDeletePreviousData:this.onDeletePreviousData,onReimportData:this.onReimportData,onStartImport:this.onStartImport,onStopImport:this.onStopImport,period:o,skipChecked:a})}}]),t}(c.Component),yo=Object(ke.a)([rn((function(e){return{notes:(0,e("wc-api").getNotes)({page:1,per_page:rt,type:"update",status:"unactioned"})}})),Object(a.withDispatch)((function(e){return{updateNote:e("wc-api").updateNote}})),io.a])(Oo),wo=function(e){function t(){var e;x()(this,t),e=W()(this,H()(t).apply(this,arguments)),zo.call(ft()(e));var n={};return oo.forEach((function(e){return n[e.name]=e.initialValue})),e.state={settings:n,saving:!1,isDirty:!1},e.handleInputChange=e.handleInputChange.bind(ft()(e)),e.warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentDidCatch",value:function(e){this.setState({hasError:!0}),console.warn(e)}},{key:"warnIfUnsavedChanges",value:function(e){if(this.state.isDirty)return e.returnValue=Object(_e.__)("You have unsaved changes. If you proceed, they will be lost.","woocommerce-admin"),e.returnValue}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.createNotice,n=e.isError,r=e.isRequesting,o=this.state,c=o.saving,a=o.isDirty;c&&!r&&(n?t("error",Object(_e.__)("There was an error saving your settings. Please try again.","woocommerce-admin")):(t("success",Object(_e.__)("Your settings have been successfully saved.","woocommerce-admin")),a=!1),this.setState({saving:!1,isDirty:a}))}},{key:"persistChanges",value:function(e){var t=Object(ye.g)("wcAdminSettings",{});oo.forEach((function(n){var r=e.settings[n.name];t[n.name]=r,n.initialValue=r})),Object(ye.h)("wcAdminSettings",t)}},{key:"handleInputChange",value:function(e){var t=e.target,n=t.checked,r=t.name,o=t.type,c=t.value,a=this.state.settings;"checkbox"===o?n?a[r].push(c):Object(s.remove)(a[r],(function(e){return e===c})):a[r]=c,this.setState({settings:a,isDirty:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.createNotice,r=t.query;return this.state.hasError?null:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SectionHeader,{title:Object(_e.__)("Analytics Settings","woocommerce-admin")}),Object(c.createElement)("div",{className:"woocommerce-settings__wrapper"},oo.map((function(t){return Object(c.createElement)(ao,N()({handleChange:e.handleInputChange,value:e.state.settings[t.name],key:t.name},t))})),Object(c.createElement)("div",{className:"woocommerce-settings__actions"},Object(c.createElement)(Ur.a,{isDefault:!0,onClick:this.resetDefaults},Object(_e.__)("Reset Defaults","woocommerce-admin")),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:this.saveChanges},Object(_e.__)("Save Settings","woocommerce-admin")))),"true"===r.import?Object(c.createElement)(I.ScrollTo,{offset:"-56"},Object(c.createElement)(yo,{createNotice:n})):Object(c.createElement)(yo,{createNotice:n}))}}]),t}(c.Component),zo=function(){var e=this;this.resetDefaults=function(){if(window.confirm(Object(_e.__)("Are you sure you want to reset all settings to default values?","woocommerce-admin"))){var t={};oo.forEach((function(e){return t[e.name]=e.defaultValue})),e.setState({settings:t},Object(s.partial)(e.saveChanges,"reset"))}},this.saveChanges=function(t){var n=e.state.settings,r=e.props.query;if(e.persistChanges(e.state),e.props.updateSettings({wc_admin:n}),"reset"===t)Object(an.b)("analytics_settings_reset_defaults");else{var o=Object(s.transform)(oo,(function(e,t){e[t.name]=n[t.name]}),{});Object(an.b)("analytics_settings_save",o)}e.setState({saving:!0,isDirty:!1}),r.period=void 0,r.compare=void 0,r.before=void 0,r.after=void 0,r.interval=void 0,r.type=void 0,window.wpNavMenuUrlUpdate(r)}},_o=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getSettings,r=t.getSettingsError,o=t.isGetSettingsRequesting,c=n("wc_admin");return{getSettings:n,isError:Boolean(r("wc_admin")),isRequesting:o("wc_admin"),settings:c}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateSettings:e("wc-api").updateSettings}})))(Object(I.useFilters)("woocommerce_admin_analytics_settings")(wo)),Ao=(n(236),n(364)),jo=n(119),ko=n(37),Eo=n.n(ko),Co=n(233),Lo=(n(398),function(e){function t(){var e,n,r;x()(this,t);for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];return W()(r,(n=r=W()(this,(e=H()(t)).call.apply(e,[this].concat(c))),r.handleChartClick=function(){var e=r.props.charts;if(!e||!e.length)return null;Object(Oe.getHistory)().push(r.getChartPath(e[0]))},n))}return V()(t,e),R()(t,[{key:"getChartPath",value:function(e){return Object(Oe.getNewPath)({chart:e.key},"/analytics/"+e.endpoint,Object(Oe.getPersistedQuery)())}},{key:"render",value:function(){var e=this.props,t=e.charts,n=e.endpoint,r=e.path,o=e.query;return t&&t.length?Object(c.createElement)("div",{role:"presentation",className:"woocommerce-dashboard__chart-block-wrapper",onClick:this.handleChartClick},Object(c.createElement)(I.Card,{className:"woocommerce-dashboard__chart-block woocommerce-analytics__card",title:t[0].label},Object(c.createElement)("a",{className:"screen-reader-text",href:Object(ye.f)(this.getChartPath(t[0]))},Object(_e.sprintf)(Object(_e.__)("%s Report","woocommerce-admin"),t[0].label)),Object(c.createElement)(gn,{endpoint:n,query:o,interactiveLegend:!1,legendPosition:"bottom",path:r,selectedChart:t[0],showHeaderControls:!1}))):null}}]),t}(c.Component));Lo.propTypes={charts:K.a.array,endpoint:K.a.string.isRequired,path:K.a.string.isRequired,query:K.a.object.isRequired};var No=Lo;function So(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var qo={revenue:Vn,orders:dt,products:zn,coupons:nr,taxes:sr,downloads:vr},To=[{label:Object(_e.__)("Total Sales","woocommerce-admin"),report:"revenue",key:"total_sales"},{label:Object(_e.__)("Net Sales","woocommerce-admin"),report:"revenue",key:"net_revenue"},{label:Object(_e.__)("Orders","woocommerce-admin"),report:"orders",key:"orders_count"},{label:Object(_e.__)("Average Order Value","woocommerce-admin"),report:"orders",key:"avg_order_value"},{label:Object(_e.__)("Items Sold","woocommerce-admin"),report:"products",key:"items_sold"},{label:Object(_e.__)("Returns","woocommerce-admin"),report:"revenue",key:"refunds"},{label:Object(_e.__)("Discounted Orders","woocommerce-admin"),report:"coupons",key:"orders_count"},{label:Object(_e.__)("Gross discounted","woocommerce-admin"),report:"coupons",key:"amount"},{label:Object(_e.__)("Total Tax","woocommerce-admin"),report:"taxes",key:"total_tax"},{label:Object(_e.__)("Order Tax","woocommerce-admin"),report:"taxes",key:"order_tax"},{label:Object(_e.__)("Shipping Tax","woocommerce-admin"),report:"taxes",key:"shipping_tax"},{label:Object(_e.__)("Shipping","woocommerce-admin"),report:"revenue",key:"shipping"},{label:Object(_e.__)("Downloads","woocommerce-admin"),report:"downloads",key:"download_count"}],xo=Object(ze.applyFilters)("woocommerce_admin_dashboard_charts_filter",To.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},qo[e.report].find((function(t){return t.key===e.key})),{label:e.label,endpoint:e.report})})));n(399);function Bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ro=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).apply(this,arguments))).setInterval=function(e){n.setState({interval:e},(function(){var t=je()({},"dashboard_chart_interval",n.state.interval);n.props.updateCurrentUserData(t),Object(an.b)("dash_charts_interval",{interval:e})}))},n.state={chartType:e.userPrefChartType||"line",interval:e.userPrefChartInterval||"day"},n}return V()(t,e),R()(t,[{key:"handleTypeToggle",value:function(e){var t=this;return function(){t.setState({chartType:e});var n=je()({},"dashboard_chart_type",e);t.props.updateCurrentUserData(n),Object(an.b)("dash_charts_type_toggle",{chart_type:e})}}},{key:"renderMenu",value:function(){var e=this.props,t=e.hiddenBlocks,n=e.isFirst,r=e.isLast,o=e.onMove,a=e.onRemove,i=e.onTitleBlur,s=e.onTitleChange,l=e.onToggleHiddenBlock,u=e.titleInput,d=e.controls;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Choose which charts to display","woocommerce-admin"),renderContent:function(e){var p=e.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.MenuTitle,null,Object(_e.__)("Charts","woocommerce-admin")),xo.map((function(e){var n=e.endpoint+"_"+e.key,r=!t.includes(n);return Object(c.createElement)(I.MenuItem,{checked:r,isCheckbox:!0,isClickable:!0,key:e.endpoint+"_"+e.key,onInvoke:function(){l(n)(),Object(an.b)("dash_charts_chart_toggle",{status:r?"off":"on",key:n})}},e.label)})),Object(c.createElement)(d,{onToggle:p,onMove:o,onRemove:a,isFirst:n,isLast:r,onTitleBlur:i,onTitleChange:s,titleInput:u}))}})}},{key:"renderIntervalSelector",value:function(){var e=Object(gt.getAllowedIntervalsForQuery)(this.props.query);if(!e||e.length<1)return null;var t={hour:Object(_e.__)("By hour","woocommerce-admin"),day:Object(_e.__)("By day","woocommerce-admin"),week:Object(_e.__)("By week","woocommerce-admin"),month:Object(_e.__)("By month","woocommerce-admin"),quarter:Object(_e.__)("By quarter","woocommerce-admin"),year:Object(_e.__)("By year","woocommerce-admin")};return Object(c.createElement)(uo.a,{className:"woocommerce-chart__interval-select",value:this.state.interval,options:e.map((function(e){return{value:e,label:t[e]}})),onChange:this.setInterval})}},{key:"render",value:function(){var e=this.props,t=e.hiddenBlocks,n=e.path,r=e.title,o=this.state,a=o.chartType,i=o.interval,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props.query,{chartType:a,interval:i});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-dashboard__dashboard-charts"},Object(c.createElement)(I.SectionHeader,{title:r||Object(_e.__)("Charts","woocommerce-admin"),menu:this.renderMenu(),className:"has-interval-select"},this.renderIntervalSelector(),Object(c.createElement)(Co.a,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(c.createElement)(Tt.a,{className:Rt()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":!s.chartType||"line"===s.chartType}),icon:Object(c.createElement)(Eo.a,{icon:"line-graph"}),title:Object(_e.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===s.chartType,role:"menuitemradio",tabIndex:"line"===s.chartType?0:-1,onClick:this.handleTypeToggle("line")}),Object(c.createElement)(Tt.a,{className:Rt()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===s.chartType}),icon:Object(c.createElement)(Eo.a,{icon:"stats-alt"}),title:Object(_e.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===s.chartType,role:"menuitemradio",tabIndex:"bar"===s.chartType?0:-1,onClick:this.handleTypeToggle("bar")}))),Object(c.createElement)("div",{className:"woocommerce-dashboard__columns"},xo.map((function(e){return t.includes(e.endpoint+"_"+e.key)?null:Object(c.createElement)(No,{charts:[e],endpoint:e.endpoint,key:e.endpoint+"_"+e.key,path:n,query:s})})))))}}]),t}(c.Component);Ro.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var Po=Object(ke.a)(rn((function(e){var t=(0,e("wc-api").getCurrentUserData)();return{userPrefChartType:t.dashboard_chart_type,userPrefChartInterval:t.dashboard_chart_interval}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Ro),Wo=n(363),Do=["a","b","em","i","strong","p"],Ho=["target","href","rel","name","download"],Xo=function(e){return{__html:Object(Wo.sanitize)(e,{ALLOWED_TAGS:Do,ALLOWED_ATTR:Ho})}},Vo=(n(400),function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getFormattedHeaders",value:function(){return this.props.headers.map((function(e,t){return{isLeftAligned:0===t,hiddenByDefault:!1,isSortable:!1,key:e.label,label:e.label}}))}},{key:"getFormattedRows",value:function(){return this.props.rows.map((function(e){return e.map((function(e){return{display:Object(c.createElement)("div",{dangerouslySetInnerHTML:Xo(e.display)}),value:e.value}}))}))}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.isError,r=e.totalRows,o=e.title,a=this.getFormattedRows(),i="woocommerce-leaderboard";return n?Object(c.createElement)(Ht,{className:i,isError:!0}):t||0!==a.length?Object(c.createElement)(I.TableCard,{className:i,headers:this.getFormattedHeaders(),isLoading:t,rows:a,rowsPerPage:r,showMenu:!1,title:o,totalRows:r}):Object(c.createElement)(I.Card,{title:o,className:i},Object(c.createElement)(I.EmptyTable,null,Object(_e.__)("No data recorded for the selected time period.","woocommerce-admin")))}}]),t}(c.Component));Vo.propTypes={headers:K.a.arrayOf(K.a.shape({label:K.a.string})),id:K.a.string.isRequired,query:K.a.object,rows:K.a.arrayOf(K.a.arrayOf(K.a.shape({display:K.a.node,value:K.a.oneOfType([K.a.string,K.a.number,K.a.bool])}))).isRequired,title:K.a.string.isRequired,totalRows:K.a.number.isRequired},Vo.defaultProps={rows:[],isError:!1,isRequesting:!1};var Io=Object(ke.a)(rn((function(e,t){var n=t.id,r=t.query;return function(e){var t=e.per_page,n=e.persisted_query,r=e.query,o=(0,e.select)("wc-api"),c=o.getItems,a=o.getItemsError,i=o.isGetItemsRequesting,s={isRequesting:!1,isError:!1,rows:[]},l=yt(r),u={after:Object(gt.appendTimestamp)(l.primary.after,"start"),before:Object(gt.appendTimestamp)(l.primary.before,"end"),per_page:t,persisted_query:JSON.stringify(n)},d=c("leaderboards",u).get(e.id);return i("leaderboards",u)?Rr({},s,{isRequesting:!0}):a("leaderboards",u)?Rr({},s,{isError:!0}):Rr({},s,{rows:d.rows})}({id:n,per_page:t.totalRows,persisted_query:Object(Oe.getPersistedQuery)(r),query:r,select:e})})))(Vo),Fo=(n(401),function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).apply(this,arguments))).setRowsPerTable=function(e){n.setState({rowsPerTable:parseInt(e)});var t=je()({},"dashboard_leaderboard_rows",parseInt(e));n.props.updateCurrentUserData(t)},n.state={rowsPerTable:parseInt(e.userPrefLeaderboardRows)||5},n}return V()(t,e),R()(t,[{key:"renderMenu",value:function(){var e=this,t=this.props,n=t.allLeaderboards,r=t.isFirst,o=t.isLast,a=t.hiddenBlocks,i=t.onMove,s=t.onRemove,l=t.onTitleBlur,u=t.onTitleChange,d=t.onToggleHiddenBlock,p=t.titleInput,m=t.controls,b=this.state.rowsPerTable;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Choose which leaderboards to display and other settings","woocommerce-admin"),renderContent:function(t){var h=t.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.MenuTitle,null,Object(_e.__)("Leaderboards","woocommerce-admin")),n.map((function(e){var t=!a.includes(e.id);return Object(c.createElement)(I.MenuItem,{checked:t,isCheckbox:!0,isClickable:!0,key:e.id,onInvoke:function(){d(e.id)(),Object(an.b)("dash_leaderboards_toggle",{status:t?"off":"on",key:e.id})}},e.label)})),Object(c.createElement)(uo.a,{className:"woocommerce-dashboard__dashboard-leaderboards__select",label:Object(_e.__)("Rows Per Table","woocommerce-admin"),value:b,options:Array.from({length:20},(function(e,t){return{v:t+1,label:t+1}})),onChange:e.setRowsPerTable}),Object(c.createElement)(m,{onToggle:h,onMove:i,onRemove:s,isFirst:r,isLast:o,onTitleBlur:l,onTitleChange:u,titleInput:p}))}})}},{key:"renderLeaderboards",value:function(){var e=this.state.rowsPerTable,t=this.props,n=t.allLeaderboards,r=t.hiddenBlocks,o=t.query;return n.map((function(t){if(!r.includes(t.id))return Object(c.createElement)(Io,{headers:t.headers,id:t.id,key:t.id,query:o,title:t.label,totalRows:e})}))}},{key:"render",value:function(){var e=this.props.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-dashboard__dashboard-leaderboards"},Object(c.createElement)(I.SectionHeader,{title:e||Object(_e.__)("Leaderboards","woocommerce-admin"),menu:this.renderMenu()}),Object(c.createElement)("div",{className:"woocommerce-dashboard__columns"},this.renderLeaderboards())))}}]),t}(c.Component));Fo.propTypes={query:K.a.object.isRequired};var Uo=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getCurrentUserData,r=t.getItems,o=t.getItemsError,c=t.isGetItemsRequesting,a=n();return{allLeaderboards:Object(ye.g)("dataEndpoints",{leaderboards:[]}).leaderboards,getItems:r,getItemsError:o,isGetItemsRequesting:c,userPrefLeaderboardRows:a.dashboard_leaderboard_rows}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Fo),Go=(n(402),Object(ye.g)("dataEndpoints",{performanceIndicators:""}).performanceIndicators),Qo=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"renderMenu",value:function(){var e=this.props,t=e.hiddenBlocks,n=e.isFirst,r=e.isLast,o=e.onMove,a=e.onRemove,i=e.onTitleBlur,s=e.onTitleChange,l=e.onToggleHiddenBlock,u=e.titleInput,d=e.controls;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Choose which analytics to display and the section name","woocommerce-admin"),renderContent:function(e){var p=e.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.MenuTitle,null,Object(_e.__)("Display Stats:","woocommerce-admin")),Go.map((function(e,n){var r=!t.includes(e.stat);return Object(c.createElement)(I.MenuItem,{checked:r,isCheckbox:!0,isClickable:!0,key:n,onInvoke:function(){l(e.stat)(),Object(an.b)("dash_indicators_toggle",{status:r?"off":"on",key:e.stat})}},e.label)})),Object(c.createElement)(d,{onToggle:p,onMove:o,onRemove:a,isFirst:n,isLast:r,onTitleBlur:i,onTitleChange:s,titleInput:u}))}})}},{key:"renderList",value:function(){var e=this.props,t=e.query,n=e.primaryRequesting,r=e.secondaryRequesting,o=e.primaryError,a=e.secondaryError,i=e.primaryData,l=e.secondaryData,u=e.userIndicators;if(n||r)return Object(c.createElement)(I.SummaryListPlaceholder,{numberOfItems:u.length});if(o||a)return null;var d=Object(Oe.getPersistedQuery)(t),p="previous_period"===Ot(t).compare?Object(_e.__)("Previous Period:","woocommerce-admin"):Object(_e.__)("Previous Year:","woocommerce-admin");return Object(c.createElement)(I.SummaryList,null,(function(){return u.map((function(e,t){var n=Object(s.find)(i.data,(function(t){return t.stat===e.stat})),r=Object(s.find)(l.data,(function(t){return t.stat===e.stat}));if(!n||!r)return null;var o=n._links&&n._links.report[0]&&n._links.report[0].href||"",a=o&&Object(Oe.getNewPath)(d,o,{chart:n.chart})||"",u="currency"===n.format,m=Object(Ct.calculateDelta)(n.value,r.value),b=u?_t(n.value):Lt(n.format,n.value),h=u?_t(r.value):Lt(r.format,r.value);return Object(c.createElement)(I.SummaryNumber,{key:t,href:a,label:e.label,value:b,prevLabel:p,prevValue:h,delta:m,onLinkClickCallback:function(){Object(an.b)("dash_indicators_click",{key:e.stat})}})}))}))}},{key:"render",value:function(){var e=this.props,t=e.userIndicators,n=e.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SectionHeader,{title:n||Object(_e.__)("Store Performance","woocommerce-admin"),menu:this.renderMenu()}),t.length>0&&Object(c.createElement)("div",{className:"woocommerce-dashboard__store-performance"},this.renderList()))}}]),t}(c.Component),Ko=Object(ke.a)(rn((function(e,t){var n=t.hiddenBlocks,r=t.query,o=e("wc-api"),c=o.getReportItems,a=o.getReportItemsError,i=o.isReportItemsRequesting,s=yt(r),l=s.primary.before,u=s.secondary.before,d=Go.filter((function(e){return!n.includes(e.stat)})),p=d.map((function(e){return e.stat})).join(",");if(0===p.length)return{hiddenBlocks:n,userIndicators:d,indicators:Go};var m={after:Object(gt.appendTimestamp)(s.primary.after,"start"),before:Object(gt.appendTimestamp)(l,l.isSame(Ft()(),"day")?"now":"end"),stats:p},b={after:Object(gt.appendTimestamp)(s.secondary.after,"start"),before:Object(gt.appendTimestamp)(u,u.isSame(Ft()(),"day")?"now":"end"),stats:p},h=c("performance-indicators",m),f=a("performance-indicators",m)||null,g=i("performance-indicators",m),v=c("performance-indicators",b),M=a("performance-indicators",b)||null,O=i("performance-indicators",b);return{hiddenBlocks:n,userIndicators:d,indicators:Go,primaryData:h,primaryError:f,primaryRequesting:g,secondaryData:v,secondaryError:M,secondaryRequesting:O}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Qo),$o=Object(ze.applyFilters)("woocommerce_dashboard_default_sections",[{key:"store-performance",component:Ko,title:Object(_e.__)("Performance","woocommerce-admin"),isVisible:!0,icon:"arrow-right-alt",hiddenBlocks:["coupons/amount","coupons/orders_count","downloads/download_count","taxes/order_tax","taxes/total_tax","taxes/shipping_tax","revenue/shipping"]},{key:"charts",component:Po,title:Object(_e.__)("Charts","woocommerce-admin"),isVisible:!0,icon:"chart-bar",hiddenBlocks:["avg_order_value","avg_items_per_order","items_sold","total_sales","refunds","coupons","taxes","shipping","amount","total_tax","order_tax","shipping_tax","download_count"]},{key:"leaderboards",component:Uo,title:Object(_e.__)("Leaderboards","woocommerce-admin"),isVisible:!0,icon:"editor-ol",hiddenBlocks:["coupons","customers"]}]),Jo=n(403),Zo=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).onMoveUp=n.onMoveUp.bind(ft()(n)),n.onMoveDown=n.onMoveDown.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"onMoveUp",value:function(){var e=this.props,t=e.onMove,n=e.onToggle;t(-1),n()}},{key:"onMoveDown",value:function(){var e=this.props,t=e.onMove,n=e.onToggle;t(1),n()}},{key:"render",value:function(){var e=this.props,t=e.onRemove,n=e.isFirst,r=e.isLast,o=e.onTitleBlur,a=e.onTitleChange,i=e.titleInput;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-ellipsis-menu__item"},Object(c.createElement)(Jo.a,{label:Object(_e.__)("Section Title","woocommerce-admin"),onBlur:o,onChange:a,required:!0,value:i})),Object(c.createElement)("div",{className:"woocommerce-dashboard-section-controls"},!n&&Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:this.onMoveUp},Object(c.createElement)(jo.a,{icon:"arrow-up-alt2",label:Object(_e.__)("Move up")}),Object(_e.__)("Move up","woocommerce-admin")),!r&&Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:this.onMoveDown},Object(c.createElement)(jo.a,{icon:"arrow-down-alt2",label:Object(_e.__)("Move Down")}),Object(_e.__)("Move Down","woocommerce-admin")),Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:t},Object(c.createElement)(jo.a,{icon:"trash",label:Object(_e.__)("Remove block")}),Object(_e.__)("Remove section","woocommerce-admin"))))}}]),t}(c.Component),Yo=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).call(this,e));var r=e.title;return n.state={titleInput:r},n.onToggleHiddenBlock=n.onToggleHiddenBlock.bind(ft()(n)),n.onTitleChange=n.onTitleChange.bind(ft()(n)),n.onTitleBlur=n.onTitleBlur.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"onTitleChange",value:function(e){this.setState({titleInput:e})}},{key:"onTitleBlur",value:function(){var e=this.props,t=e.onTitleUpdate,n=e.title,r=this.state.titleInput;""===r?this.setState({titleInput:n}):t&&t(r)}},{key:"onToggleHiddenBlock",value:function(e){var t=this;return function(){var n=Object(s.xor)(t.props.hiddenBlocks,[e]);t.props.onChangeHiddenBlocks(n)}}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.onChangeHiddenBlocks,e.onTitleUpdate,q()(e,["component","onChangeHiddenBlocks","onTitleUpdate"])),r=this.state.titleInput;return Object(c.createElement)("div",{className:"woocommerce-dashboard-section"},Object(c.createElement)(t,N()({onTitleChange:this.onTitleChange,onTitleBlur:this.onTitleBlur,onToggleHiddenBlock:this.onToggleHiddenBlock,titleInput:r,controls:Zo},n)))}}]),t}(c.Component);var ec=Object(c.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,a=void 0===o?[]:o,i=e.onRemove,l=void 0===i?s.noop:i;Object(c.useEffect)((function(){var e=setTimeout((function(){l()}),1e4);return function(){return clearTimeout(e)}}),[]);var u=Rt()(n,"components-snackbar");return a&&a.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),a=[a[0]]),Object(c.createElement)("div",{ref:t,className:u,onClick:l,tabIndex:"0",role:"button",onKeyPress:l,label:Object(_e.__)("Dismiss this notice")},Object(c.createElement)("div",{className:"components-snackbar__content"},r,a.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(c.createElement)(Ur.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))})),tc=n(27),nc=n(15),rc=n(14),oc=n(17),cc=n(18),ac=n(19),ic=n(91),sc=n(101),lc=n(5),uc=n(39),dc=n(103),pc=n(102),mc=n(105),bc=n(99),hc=function(e){function t(){var e;return Object(nc.a)(this,t),(e=Object(oc.a)(this,Object(cc.a)(t).apply(this,arguments))).containerRef=Object(c.createRef)(),e.handleKeyDown=e.handleKeyDown.bind(Object(lc.a)(e)),e.handleFocusOutside=e.handleFocusOutside.bind(Object(lc.a)(e)),e.focusFirstTabbable=e.focusFirstTabbable.bind(Object(lc.a)(e)),e}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusFirstTabbable()}},{key:"focusFirstTabbable",value:function(){var e=xt.a.tabbable.find(this.containerRef.current);e.length&&e[0].focus()}},{key:"handleFocusOutside",value:function(e){this.props.shouldCloseOnClickOutside&&this.onRequestClose(e)}},{key:"handleKeyDown",value:function(e){e.keyCode===uc.ESCAPE&&this.handleEscapeKeyDown(e)}},{key:"handleEscapeKeyDown",value:function(e){this.props.shouldCloseOnEsc&&(e.stopPropagation(),this.onRequestClose(e))}},{key:"onRequestClose",value:function(e){var t=this.props.onRequestClose;t&&t(e)}},{key:"render",value:function(){var e=this.props,t=e.overlayClassName,n=e.contentLabel,r=e.aria,o=r.describedby,a=r.labelledby,i=e.children,s=e.className,l=e.role,u=e.style;return Object(c.createElement)(dc.a,{className:Rt()("components-modal__screen-overlay",t),onKeyDown:this.handleKeyDown},Object(c.createElement)("div",{className:Rt()("components-modal__frame",s),style:u,ref:this.containerRef,role:l,"aria-label":n,"aria-labelledby":n?null:a,"aria-describedby":o,tabIndex:"-1"},i))}}]),t}(c.Component),fc=Object(ke.a)([mc.a,bc.a,pc.a])(hc),gc=function(e){var t=e.icon,n=e.title,r=e.onClose,o=e.closeLabel,a=e.headingId,i=e.isDismissible,s=o||Object(_e.__)("Close dialog");return Object(c.createElement)("div",{className:"components-modal__header"},Object(c.createElement)("div",{className:"components-modal__header-heading-container"},t&&Object(c.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},t),n&&Object(c.createElement)("h1",{id:a,className:"components-modal__header-heading"},n)),i&&Object(c.createElement)(Tt.a,{onClick:r,icon:"no-alt",label:s}))},vc=new Set(["alert","status","log","marquee","timer"]),Mc=[],Oc=!1;function yc(e){if(!Oc){var t=document.body.children;Object(s.forEach)(t,(function(t){t!==e&&function(e){var t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||vc.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),Mc.push(t))})),Oc=!0}}var wc,zc=0,_c=function(e){function t(e){var n;return Object(nc.a)(this,t),(n=Object(oc.a)(this,Object(cc.a)(t).call(this,e))).prepareDOM(),n}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"componentDidMount",value:function(){1===++zc&&this.openFirstModal()}},{key:"componentWillUnmount",value:function(){0===--zc&&this.closeLastModal(),this.cleanDOM()}},{key:"prepareDOM",value:function(){wc||(wc=document.createElement("div"),document.body.appendChild(wc)),this.node=document.createElement("div"),wc.appendChild(this.node)}},{key:"cleanDOM",value:function(){wc.removeChild(this.node)}},{key:"openFirstModal",value:function(){yc(wc),document.body.classList.add(this.props.bodyOpenClassName)}},{key:"closeLastModal",value:function(){document.body.classList.remove(this.props.bodyOpenClassName),Oc&&(Object(s.forEach)(Mc,(function(e){e.removeAttribute("aria-hidden")})),Mc=[],Oc=!1)}},{key:"render",value:function(){var e=this.props,t=e.onRequestClose,n=e.title,r=e.icon,o=e.closeButtonLabel,a=e.children,i=e.aria,s=e.instanceId,l=e.isDismissible,u=e.isDismissable,d=Object(tc.a)(e,["onRequestClose","title","icon","closeButtonLabel","children","aria","instanceId","isDismissible","isDismissable"]),p=i.labelledby||"components-modal-header-".concat(s);return u&&Object(sc.a)("isDismissable prop of the Modal component",{alternative:"isDismissible prop (renamed) of the Modal component"}),Object(c.createPortal)(Object(c.createElement)(fc,Object(oe.a)({onRequestClose:t,aria:{labelledby:n?p:null,describedby:i.describedby}},d),Object(c.createElement)("div",{className:"components-modal__content",tabIndex:"0"},Object(c.createElement)(gc,{closeLabel:o,headingId:p,icon:r,isDismissible:l||u,onClose:t,title:n}),a)),this.node)}}]),t}(c.Component);_c.defaultProps={bodyOpenClassName:"modal-open",role:"dialog",title:null,focusOnMount:!0,shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,isDismissible:!0,aria:{labelledby:null,describedby:null}};var Ac=Object(ic.a)(_c);n(404);function jc(e){return e?e.split(":")[0]:null}function kc(e){var t=jc(e);return Object(s.without)(Object(ye.g)("onboarding",{euCountries:[]}).euCountries,"GB").includes(t)&&(t="EU"),t}function Ec(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=Object(ye.g)("onboarding",{}),o=e.product_types||[];if(!r.productTypes)return n;o.forEach((function(e){r.productTypes[e]&&r.productTypes[e].product&&(t||!r.installedPlugins.includes(r.productTypes[e].slug))&&n.push(r.productTypes[e].product)}));var c=r.themes.find((function(t){return t.slug===e.theme}));return c&&c.id&&Cc(c.price)>0&&(t||!c.is_installed)&&n.push(c.id),n}function Cc(e){return Number(Object(En.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}function Lc(){return Object(ye.g)("onboardingEnabled",!1)}var Nc=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={purchaseNowButtonBusy:!1,purchaseLaterButtonBusy:!1},n}return V()(t,e),R()(t,[{key:"onClickPurchaseNow",value:function(){var e=this.props,t=e.productIds,n=e.onClickPurchaseNow;this.setState({purchaseNowButtonBusy:!0});var r=Object(Oe.getNewPath)({},"/",{}),o=Object(ye.g)("onboarding",{}).connectNonce;if(t.length){Object(an.b)("tasklist_modal_proceed_checkout",{product_ids:t,purchase_install:!1});var c=Object(Ee.addQueryArgs)("https://woocommerce.com/cart",{"wccom-site":Object(ye.g)("siteUrl"),"wccom-woo-version":Object(ye.g)("wcVersion"),"wccom-replace-with":t.join(","),"wccom-connect-nonce":o,"wccom-back":r});n?n(c):window.location=c}}},{key:"onClickPurchaseLater",value:function(){var e=this.props.productIds;Object(an.b)("tasklist_modal_proceed_checkout",{product_ids:e,purchase_install:!1}),this.setState({purchaseLaterButtonBusy:!0}),this.props.onClickPurchaseLater()}},{key:"onClose",value:function(){var e=this.props,t=e.onClose,n=e.productIds;Object(an.b)("tasklist_modal_proceed_checkout",{product_ids:n,purchase_install:!1}),t()}},{key:"renderProducts",value:function(){var e=this.props.productIds,t=Object(ye.g)("onboarding",{}),n=t.productTypes,r=void 0===n?{}:n,o=t.themes,a=void 0===o?[]:o,i=[];return e.forEach((function(e){var t=Object(s.find)(r,(function(t){return t.product===e}));t&&i.push({title:t.label,content:t.description});var n=Object(s.find)(a,(function(t){return t.id===e}));n&&i.push({title:Object(_e.sprintf)(Object(_e.__)("%s — %s per year","woocommerce-admin"),n.title,Object(En.decodeEntities)(n.price)),content:Object(c.createElement)("span",{dangerouslySetInnerHTML:Xo(n.excerpt)})})})),Object(c.createElement)(I.List,{items:i})}},{key:"render",value:function(){var e=this,t=this.state,n=t.purchaseNowButtonBusy,r=t.purchaseLaterButtonBusy;return Object(c.createElement)(Ac,{title:Object(_e.__)("Would you like to purchase and install the following features now?","woocommerce-admin"),onRequestClose:function(){return e.onClose()},className:"woocommerce-cart-modal"},this.renderProducts(),Object(c.createElement)("p",{className:"woocommerce-cart-modal__help-text"},Object(_e.__)("You won't have access to this functionality until the extensions have been purchased and installed.","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-cart-modal__actions"},Object(c.createElement)(Ur.a,{isLink:!0,isBusy:r,onClick:function(){return e.onClickPurchaseLater()}},Object(_e.__)("I'll do it later","woocommerce-admin")),Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,isBusy:n,onClick:function(){return e.onClickPurchaseNow()}},Object(_e.__)("Purchase & install now","woocommerce-admin"))))}}]),t}(c.Component),Sc=Object(ke.a)(rn((function(e){var t=(0,e("wc-api").getProfileItems)();return{profileItems:t,productIds:Ec(t)}})))(Nc);function qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xc=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).call(this,e));var r=Object(ye.g)("onboarding",{}),o=r.hasHomepage,c=r.hasProducts;return n.stepVisibility={homepage:!o,import:!c},n.state={isDirty:!1,isPending:!1,logo:null,stepIndex:0,storeNoticeText:e.options.woocommerce_demo_store_notice||""},n.completeStep=n.completeStep.bind(ft()(n)),n.createHomepage=n.createHomepage.bind(ft()(n)),n.importProducts=n.importProducts.bind(ft()(n)),n.updateLogo=n.updateLogo.bind(ft()(n)),n.updateNotice=n.updateNotice.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=Object(ye.g)("onboarding",{}).themeMods;e.custom_logo&&this.setState({logo:{id:e.custom_logo}})}},{key:"componentDidUpdate",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a,i,l,u,d,p,m,b,h=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.state,r=n.isPending,o=n.logo,c=n.stepIndex,a=this.props,i=a.createNotice,l=a.errors,u=a.hasErrors,d=a.isRequesting,p=a.options,m=this.getSteps()[c].key,b=!d&&t.isRequesting&&!u,!o||o.url||r||(this.setState({isPending:!0}),wp.media.attachment(o.id).fetch().then((function(){var e=wp.media.attachment(o.id).get("url");h.setState({isPending:!1,logo:{id:o.id,url:e}})}))),p.woocommerce_demo_store_notice&&t.options.woocommerce_demo_store_notice!==p.woocommerce_demo_store_notice&&this.setState({storeNoticeText:p.woocommerce_demo_store_notice}),"logo"===m&&b&&(i("success",Object(_e.__)("Store logo updated sucessfully.","woocommerce-admin")),this.completeStep()),"notice"===m&&b&&(i("success",Object(_e.__)("🎨 Your store is looking great! Don't forget to continue personalizing it.","woocommerce-admin")),this.completeStep()),Object(s.difference)(l,t.errors).map((function(e){return i("error",e)}));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"completeStep",value:function(){var e=this.state.stepIndex;this.getSteps()[e+1]?this.setState({stepIndex:e+1}):Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{}))}},{key:"importProducts",value:function(){var e=this,t=this.props.createNotice;this.setState({isPending:!0}),Object(an.b)("tasklist_appearance_import_demo",{}),Le()({path:"".concat("/wc-admin","/onboarding/tasks/import_sample_products"),method:"POST"}).then((function(n){n.failed&&n.failed.length?t("error",Object(_e.__)("There was an error importing some of the demo products.","woocommerce-admin")):(t("success",Object(_e.__)("All demo products have been imported.","woocommerce-admin")),Object(ye.h)("onboarding",Tc({},Object(ye.g)("onboarding",{}),{hasProducts:!0}))),e.setState({isPending:!1}),e.completeStep()})).catch((function(n){t("error",n.message),e.setState({isPending:!1})}))}},{key:"createHomepage",value:function(){var e=this,t=this.props.createNotice;this.setState({isPending:!0}),Object(an.b)("tasklist_appearance_create_homepage",{create_homepage:!0}),Le()({path:"/wc-admin/onboarding/tasks/create_homepage",method:"POST"}).then((function(n){t(n.status,n.message,{actions:n.edit_post_link?[{label:Object(_e.__)("Customize","woocommerce-admin"),onClick:function(){Object(an.a)("tasklist_appearance_customize_homepage",{}),window.location="".concat(n.edit_post_link,"&wc_onboarding_active_task=homepage")}}]:null}),e.setState({isPending:!1}),e.completeStep()})).catch((function(n){t("error",n.message),e.setState({isPending:!1})}))}},{key:"updateLogo",value:function(){var e=this.props.updateOptions,t=this.state.logo,n=Object(ye.g)("onboarding",{}),r=n.stylesheet,o=Tc({},n.themeMods,{custom_logo:t?t.id:null});Object(an.b)("tasklist_appearance_upload_logo"),Object(ye.h)("onboarding",Tc({},Object(ye.g)("onboarding",{}),{themeMods:o})),e(je()({},"theme_mods_".concat(r),o))}},{key:"updateNotice",value:function(){var e=this.props.updateOptions,t=this.state.storeNoticeText;Object(an.b)("tasklist_appearance_set_store_notice",{added_text:Boolean(t.length)}),Object(ye.h)("onboarding",Tc({},Object(ye.g)("onboarding",{}),{isAppearanceComplete:!0})),e({woocommerce_task_list_appearance_complete:!0,woocommerce_demo_store:t.length?"yes":"no",woocommerce_demo_store_notice:t})}},{key:"getSteps",value:function(){var e=this,t=this.state,n=t.isDirty,r=t.isPending,o=t.logo,a=t.storeNoticeText,i=this.props.isRequesting,l=[{key:"import",label:Object(_e.__)("Import demo products","woocommerce-admin"),description:Object(_e.__)("We’ll add some products that will make it easier to see what your store looks like","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{onClick:this.importProducts,isBusy:r,isPrimary:!0},Object(_e.__)("Import products","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){return e.completeStep()}},Object(_e.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.import},{key:"homepage",label:Object(_e.__)("Create a custom homepage","woocommerce-admin"),description:Object(_e.__)("Create a new homepage and customize it to suit your needs","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,isBusy:r,onClick:this.createHomepage},Object(_e.__)("Create homepage","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){Object(an.b)("tasklist_appearance_create_homepage",{create_homepage:!1}),e.completeStep()}},Object(_e.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.homepage},{key:"logo",label:Object(_e.__)("Upload a logo","woocommerce-admin"),description:Object(_e.__)("Ensure your store is on-brand by adding your logo","woocommerce-admin"),content:r?null:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.ImageUpload,{image:o,onChange:function(t){return e.setState({isDirty:!0,logo:t})}}),Object(c.createElement)(Ur.a,{disabled:!o&&!n,onClick:this.updateLogo,isBusy:i,isPrimary:!0},Object(_e.__)("Proceed","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){return e.completeStep()}},Object(_e.__)("Skip","woocommerce-admin"))),visible:!0},{key:"notice",label:Object(_e.__)("Set a store notice","woocommerce-admin"),description:Object(_e.__)("Optionally display a prominent notice across all pages of your store","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.TextControl,{label:Object(_e.__)("Store notice text","woocommerce-admin"),placeholder:Object(_e.__)("Store notice text","woocommerce-admin"),value:a,onChange:function(t){return e.setState({storeNoticeText:t})}}),Object(c.createElement)(Ur.a,{onClick:this.updateNotice,isPrimary:!0},Object(_e.__)("Complete task","woocommerce-admin"))),visible:!0}];return Object(s.filter)(l,(function(e){return e.visible}))}},{key:"render",value:function(){var e=this.state,t=e.isPending,n=e.stepIndex,r=this.props,o=r.isRequesting,a=r.hasErrors,i=this.getSteps()[n].key;return Object(c.createElement)("div",{className:"woocommerce-task-appearance"},Object(c.createElement)(I.Card,{className:"is-narrow"},Object(c.createElement)(I.Stepper,{isPending:o&&!a||t,isVertical:!0,currentStep:i,steps:this.getSteps()})))}}]),t}(c.Component),Bc=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getOptions,r=t.getOptionsError,o=t.isUpdateOptionsRequesting,c=Object(ye.g)("onboarding",{}).stylesheet,a=n(["woocommerce_demo_store","woocommerce_demo_store_notice"]),i=[],s=r(["theme_mods_".concat(c)]),l=r(["woocommerce_demo_store","woocommerce_demo_store_notice"]);return s&&i.push(s.message),l&&i.push(l.message),{errors:i,getOptionsError:r,hasErrors:Boolean(i.length),isRequesting:Boolean(o(["theme_mods_".concat(c)]))||Boolean(o(["woocommerce_task_list_appearance_complete","woocommerce_demo_store","woocommerce_demo_store_notice"])),options:a}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(xc);function Rc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Pc=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}var n,r;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){document.body.classList.add("woocommerce-admin-is-loading");var e=this.props.query;"1"!==e.deny?e["wccom-connected"]&&e.request_token?this.finish():this.request():this.errorMessage(Object(_e.__)("You must click approve to install your extensions and connect to WooCommerce.com.","woocommerce-admin"))}},{key:"baseQuery",value:function(){var e=this.props.query,t=Object(s.omit)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rc(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{page:"wc-admin"}),["task","wccom-connected","request_token","deny"]);return Object(Oe.getNewPath)({},"/",t)}},{key:"errorMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(_e.__)("There was an error connecting to WooCommerce.com. Please try again.","woocommerce-admin");document.body.classList.remove("woocommerce-admin-is-loading"),Object(Oe.getHistory)().push(this.baseQuery()),this.props.createNotice("error",e)}},{key:"request",value:(r=gr()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Le()({path:"".concat("/wc-admin","/onboarding/plugins/request-wccom-connect"),method:"POST"});case 3:if(!(t=e.sent)||!t.connectAction){e.next=7;break}return window.location=t.connectAction,e.abrupt("return");case 7:throw new Error;case 10:e.prev=10,e.t0=e.catch(0),this.errorMessage();case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return r.apply(this,arguments)})},{key:"finish",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.query,e.prev=1,e.next=4,Le()({path:"".concat("/wc-admin","/onboarding/plugins/finish-wccom-connect"),method:"POST",data:{request_token:t.request_token}});case 4:if(!(n=e.sent)||!n.success){e.next=10;break}return e.next=8,this.props.updateProfileItems({wccom_connected:!0});case 8:return this.props.isProfileItemsError?this.errorMessage():(this.props.createNotice("success",Object(_e.__)("Store connected to WooCommerce.com and extensions are being installed.","woocommerce-admin")),document.body.classList.remove("woocommerce-admin-is-loading"),Object(Oe.getHistory)().push(this.baseQuery())),e.abrupt("return");case 10:throw new Error;case 13:e.prev=13,e.t0=e.catch(1),this.errorMessage();case 16:case"end":return e.stop()}}),e,this,[[1,13]])}))),function(){return n.apply(this,arguments)})},{key:"render",value:function(){return null}}]),t}(c.Component),Wc=Object(ke.a)(rn((function(e){var t=e("wc-api").getProfileItemsError;return{isProfileItemsError:Boolean(t())}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateProfileItems:e("wc-api").updateProfileItems}})))(Pc),Dc=[{title:Object(_e.__)("Add manually (recommended)","woocommerce-admin"),content:Object(_e.__)("For small stores we recommend adding products manually","woocommerce-admin"),before:Object(c.createElement)("i",{className:"material-icons-outlined"},"add_box"),after:Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),onClick:function(){return Object(an.b)("tasklist_add_product",{method:"manually"})},href:Object(ye.f)("post-new.php?post_type=product&wc_onboarding_active_task=products&tutorial=true")},{title:Object(_e.__)("Import","woocommerce-admin"),content:Object(_e.__)("For larger stores we recommend importing all products at once via CSV file","woocommerce-admin"),before:Object(c.createElement)("i",{className:"material-icons-outlined"},"import_export"),after:Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),onClick:function(){return Object(an.b)("tasklist_add_product",{method:"import"})},href:Object(ye.f)("edit.php?post_type=product&page=product_importer&wc_onboarding_active_task=product-import")},{title:Object(_e.__)("Migrate","woocommerce-admin"),content:Object(_e.__)("For stores currently selling elsewhere we suggest using a product migration service","woocommerce-admin"),before:Object(c.createElement)("i",{className:"material-icons-outlined"},"cloud_download"),after:Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),onClick:function(){return Object(an.b)("tasklist_add_product",{method:"migrate"})},href:"https://woocommerce.com/products/cart2cart/",target:"_blank"}],Hc=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.Card,{className:"woocommerce-task-card"},Object(c.createElement)(I.List,{items:Dc})))}}]),t}(c.Component),Xc=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).connectJetpack=n.connectJetpack.bind(ft()(n)),e.setIsPending(!0),n}var n;return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.createNotice,r=t.error,o=t.isRequesting,c=t.setIsPending;e.isRequesting&&!o&&c(!1),r&&r!==e.error&&n("error",r)}},{key:"connectJetpack",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props,n=t.jetpackConnectUrl,(r=t.onConnect)&&r(),window.location=n;case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.hasErrors,n=e.isRequesting,r=e.onSkip,o=e.skipText;return Object(c.createElement)(c.Fragment,null,t?Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){return location.reload()}},Object(_e.__)("Retry","woocommerce-admin")):Object(c.createElement)(Ur.a,{disabled:n,isPrimary:!0,onClick:this.connectJetpack},Object(_e.__)("Connect","woocommerce-admin")),r&&Object(c.createElement)(Ur.a,{onClick:r},o||Object(_e.__)("No thanks","woocommerce-admin")))}}]),t}(c.Component);Xc.propTypes={createNotice:K.a.func.isRequired,error:K.a.string,hasErrors:K.a.bool,isRequesting:K.a.bool,jetpackConnectUrl:K.a.string,onSkip:K.a.func,redirectUrl:K.a.string,skipText:K.a.string,setIsPending:K.a.func},Xc.defaultProps={setIsPending:function(){}};var Vc=Object(ke.a)(rn((function(e,t){var n=e("wc-api"),r=n.getJetpackConnectUrl,o=n.isGetJetpackConnectUrlRequesting,c=n.getJetpackConnectUrlError,a={redirect_url:t.redirectUrl||window.location.href},i=o(a);return{error:c(a),isRequesting:i,jetpackConnectUrl:r(a)}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}})))(Xc),Ic=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).installAndActivatePlugins=e.installAndActivatePlugins.bind(ft()(e)),e.skipInstaller=e.skipInstaller.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.props.autoInstall&&this.installAndActivatePlugins()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.activatedPlugins,r=t.activatePlugins,o=t.onComplete,c=t.createNotice,a=t.errors,i=t.installedPlugins,l=t.isRequesting,u=t.pluginSlugs,d=t.onError,p=t.hasErrors;Object(s.difference)(a,e.errors).map((function(e){return c("error",e)})),l||i.length!==u.length||n.length===u.length||e.installedPlugins.length===i.length||r(u),u.length>0&&n.length===u.length&&(c("success",Object(_e.__)("Plugins were successfully installed and activated.","woocommerce-admin")),o()),!e.hasErrors&&p&&d()}},{key:"installAndActivatePlugins",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.preventDefault(),n=this.props,r=n.isRequesting,o=n.installPlugins,c=n.pluginSlugs,!r){e.next=4;break}return e.abrupt("return",!1);case 4:o(c);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"skipInstaller",value:function(){this.props.onSkip()}},{key:"render",value:function(){var e=this.props,t=e.hasErrors,n=e.isRequesting,r=e.skipText,o=e.autoInstall,a=e.pluginSlugs;return t?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,isBusy:n,onClick:this.installAndActivatePlugins},Object(_e.__)("Retry","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:this.skipInstaller},Object(_e.__)("Continue without installing","woocommerce-admin"))):o?null:0===a.length?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,isBusy:n,onClick:this.skipInstaller},Object(_e.__)("Continue","woocommerce-admin"))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isBusy:n,isPrimary:!0,onClick:this.installAndActivatePlugins},Object(_e.__)("Install & enable","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:this.skipInstaller},r||Object(_e.__)("No thanks","woocommerce-admin")))}}]),t}(c.Component);Ic.propTypes={onComplete:K.a.func.isRequired,onSkip:K.a.func,skipText:K.a.string,autoInstall:K.a.bool,pluginSlugs:K.a.arrayOf(K.a.string)},Ic.defaultProps={autoInstall:!1,onError:s.noop,pluginSlugs:["jetpack","woocommerce-services"]};var Fc=Object(ke.a)(rn((function(e,t){var n=e("wc-api"),r=n.getPluginInstallations,o=n.getPluginInstallationErrors,c=n.getPluginActivations,a=n.getPluginActivationErrors,i=n.isPluginActivateRequesting,s=n.isPluginInstallRequesting,l=t.pluginSlugs||Ic.defaultProps.pluginSlugs,u=i()||s(),d=a(l),p=Object.keys(c(l)),m=o(l),b=Object.keys(r(l)),h=[];Object.keys(d).map((function(e){return h.push(d[e].message)})),Object.keys(m).map((function(e){return h.push(m[e].message)}));var f=Boolean(h.length);return{activatedPlugins:p,installedPlugins:b,errors:h,hasErrors:f,isRequesting:u}})),Object(a.withDispatch)((function(e){var t=e("core/notices").createNotice,n=e("wc-api");return{activatePlugins:n.activatePlugins,createNotice:t,installPlugins:n.installPlugins}})))(Ic),Uc=Object(ye.g)("dataEndpoints",{countries:{}}).countries;function Gc(e){var t={};return e.addressLine1.length||(t.addressLine1=Object(_e.__)("Please add an address","woocommerce-admin")),e.countryState.length||(t.countryState=Object(_e.__)("Please select a country / region","woocommerce-admin")),e.city.length||(t.city=Object(_e.__)("Please add a city","woocommerce-admin")),e.postCode.length||(t.postCode=Object(_e.__)("Please add a post code","woocommerce-admin")),t}function Qc(e){var t=e.getInputProps,n=e.setValue,r=Object(U.useMemo)((function(){return Uc.reduce((function(e,t){if(!t.states.length)return e.push({key:t.code,label:Object(En.decodeEntities)(t.name)}),e;var n=t.states.map((function(e){return{key:t.code+":"+e.code,label:Object(En.decodeEntities)(t.name)+" -- "+Object(En.decodeEntities)(e.name)}}));return e.push.apply(e,St()(n)),e}),[])}),[]);return Object(c.createElement)("div",{className:"woocommerce-store-address-fields"},Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("Address line 1","woocommerce-admin"),required:!0,autoComplete:"address-line1"},t("addressLine1"))),Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("Address line 2 (optional)","woocommerce-admin"),required:!0,autoComplete:"address-line2"},t("addressLine2"))),Object(c.createElement)(I.SelectControl,N()({label:Object(_e.__)("Country / Region","woocommerce-admin"),required:!0,options:r,excludeSelectedOptions:!1,showAllOnFocus:!0,isSearchable:!0},t("countryState"),{controlClassName:t("countryState").className}),function(e,t,n){var r=Object(U.useState)(""),o=Vt()(r,2),a=o[0],i=o[1],l=Object(U.useState)(""),u=Vt()(l,2),d=u[0],p=u[1];return Object(U.useEffect)((function(){var r=[],o=new RegExp(Object(s.escapeRegExp)(a),"i");if((d.length||a.length)&&(r=e.filter((function(e){return o.test(e.label)}))),a.length&&d.length){var c=new RegExp(Object(s.escapeRegExp)(d.replace(/\s/g,"")),"i");if((r=r.filter((function(e){return c.test(e.label.replace("-","").replace(/\s/g,""))}))).length>1){var i;(i=r.filter((function(e){return o.test(e.key)}))).length>0&&(r=i)}if(r.length>1){var l;1===(l=r.filter((function(e){return c.test(e.key)}))).length&&(r=l)}}1===r.length&&t!==r[0].key&&n("countryState",r[0].key)}),[a,d]),Object(c.createElement)(c.Fragment,null,Object(c.createElement)("input",{onChange:function(e){return i(e.target.value)},value:a,name:"country",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1",autoComplete:"country"}),Object(c.createElement)("input",{onChange:function(e){return p(e.target.value)},value:d,name:"state",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1",autoComplete:"address-level1"}))}(r,t("countryState").value,n)),Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("City","woocommerce-admin"),required:!0},t("city"),{autoComplete:"address-level2"})),Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("Post code","woocommerce-admin"),required:!0,autoComplete:"postal-code"},t("postCode"))))}var Kc=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"onSubmit",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,r=n.onComplete,o=n.createNotice,c=n.isSettingsError,a=n.updateSettings,e.next=3,a({general:{woocommerce_store_address:t.addressLine1,woocommerce_store_address_2:t.addressLine2,woocommerce_default_country:t.countryState,woocommerce_store_city:t.city,woocommerce_store_postcode:t.postCode}});case 3:c?o("error",Object(_e.__)("There was a problem saving your store location.","woocommerce-admin")):r(t);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getInitialValues",value:function(){var e=this.props.settings;return{addressLine1:e.woocommerce_store_address||"",addressLine2:e.woocommerce_store_address_2||"",city:e.woocommerce_store_city||"",countryState:e.woocommerce_default_country||"",postCode:e.woocommerce_store_postcode||""}}},{key:"render",value:function(){return this.props.isSettingsRequesting?null:Object(c.createElement)(I.Form,{initialValues:this.getInitialValues(),onSubmitCallback:this.onSubmit,validate:Gc},(function(e){var t=e.getInputProps,n=e.handleSubmit,r=e.setValue;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Qc,{getInputProps:t,setValue:r}),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:n},Object(_e.__)("Continue","woocommerce-admin")))}))}}]),t}(c.Component),$c=n(405);function Jc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jc(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yc=ye.b.symbol,ea=ye.b.symbolPosition,ta=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).updateShippingZones=e.updateShippingZones.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"updateShippingZones",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.props,r=n.createNotice,o=n.shippingZones,c=!1,a=!1,o.map((function(e){0===e.id?c=e.toggleEnabled&&t["".concat(e.id,"_enabled")]:a=""!==t["".concat(e.id,"_rate")]&&parseFloat(t["".concat(e.id,"_rate")])!==parseFloat(0);var n=e.methods?e.methods.filter((function(e){return"flat_rate"===e.method_id})):[];!e.toggleEnabled||t["".concat(e.id,"_enabled")]?n.length?Le()({method:"POST",path:"/wc/v3/shipping/zones/".concat(e.id,"/methods/").concat(n[0].instance_id),data:{enabled:!0,settings:{cost:t["".concat(e.id,"_rate")]}}}):Le()({method:"POST",path:"/wc/v3/shipping/zones/".concat(e.id,"/methods"),data:{method_id:"flat_rate",settings:{cost:t["".concat(e.id,"_rate")]}}}):n.length&&n.map((function(t){Le()({method:"POST",path:"/wc/v3/shipping/zones/".concat(e.id,"/methods/").concat(t.instance_id),data:{enabled:!1}})}))})),Object(an.b)("tasklist_shipping_set_costs",{shipping_cost:a,rest_world:c}),Object(ye.h)("onboarding",Zc({},Object(ye.g)("onboarding",{}),{shippingZonesCount:1})),r("success",Object(_e.__)("Your shipping rates have been updated.","woocommerce-admin")),this.props.onComplete();case 8:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"renderInputPrefix",value:function(){return 0===ea.indexOf("right")?null:Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-prefix"},Yc)}},{key:"renderInputSuffix",value:function(e){return 0===ea.indexOf("right")?Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-suffix"},Yc):parseFloat(e)===parseFloat(0)?Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-suffix"},Object(_e.__)("Free shipping","woocommerce-admin")):null}},{key:"getFormattedRate",value:function(e){var t=jt(e);return e.length&&t.length?jt(e):jt(0)}},{key:"getInitialValues",value:function(){var e=this,t={};return this.props.shippingZones.forEach((function(n){var r=n.methods&&n.methods.length?n.methods.filter((function(e){return"flat_rate"===e.method_id})):[],o=r.length?e.getFormattedRate(r[0].settings.cost.value):jt(0);t["".concat(n.id,"_rate")]=o,r.length&&r[0].enabled?t["".concat(n.id,"_enabled")]=!0:t["".concat(n.id,"_enabled")]=!1})),t}},{key:"validate",value:function(e){var t={};return Object.keys(e).filter((function(e){return e.endsWith("_rate")})).forEach((function(n){e[n]<0&&(t[n]=Object(_e.__)("Shipping rates can not be negative numbers.","woocommerce-admin"))})),t}},{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.shippingZones;return r.length?Object(c.createElement)(I.Form,{initialValues:this.getInitialValues(),onSubmitCallback:this.updateShippingZones,validate:this.validate},(function(t){var o=t.getInputProps,a=t.handleSubmit,i=t.setTouched,s=t.setValue,l=t.values;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-shipping-rates"},r.map((function(t){return Object(c.createElement)("div",{className:"woocommerce-shipping-rate",key:t.id},Object(c.createElement)("div",{className:"woocommerce-shipping-rate__icon"},t.locations?t.locations.map((function(e){return Object(c.createElement)(I.Flag,{size:24,code:e.code,key:e.code})})):Object(c.createElement)("i",{className:"material-icons-outlined"},"public")),Object(c.createElement)("div",{className:"woocommerce-shipping-rate__main"},Object(c.createElement)("div",{className:"woocommerce-shipping-rate__name"},t.name,t.toggleEnabled&&Object(c.createElement)($c.a,o("".concat(t.id,"_enabled")))),(!t.toggleEnabled||l["".concat(t.id,"_enabled")])&&Object(c.createElement)(I.TextControlWithAffixes,N()({label:Object(_e.__)("Shipping cost","woocommerce-admin"),required:!0},o("".concat(t.id,"_rate")),{onBlur:function(){i("".concat(t.id,"_rate")),s("".concat(t.id,"_rate"),e.getFormattedRate(l["".concat(t.id,"_rate")]))},prefix:e.renderInputPrefix(),suffix:e.renderInputSuffix(l["".concat(t.id,"_rate")]),className:"muriel-input-text woocommerce-shipping-rate__control-wrapper"}))))}))),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:a},n||Object(_e.__)("Update","woocommerce-admin")))})):null}}]),t}(c.Component);ta.propTypes={buttonText:K.a.string,onComplete:K.a.func.isRequired,createNotice:K.a.func.isRequired,shippingZones:K.a.array},ta.defaultProps={shippingZones:[]};var na=ta,ra=function(e){function t(){var e;x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).initialState={isPending:!1,step:"store_location",shippingZones:[]};var n=Object(ye.g)("onboarding",{}),r=n.activePlugins,o=void 0===r?[]:r;return e.activePlugins=o,e.state=e.initialState,e.completeStep=e.completeStep.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.reset()}},{key:"reset",value:function(){this.setState(this.initialState)}},{key:"fetchShippingZones",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isPending:!0}),t=this.props,n=t.countryCode,r=t.countryName,o=[],e.next=5,Le()({path:"/wc/v3/shipping/zones"});case 5:return c=e.sent,a=!1,e.next=9,Promise.all(c.map(function(){var e=gr()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.id){e.next=8;break}return e.next=3,Le()({path:"/wc/v3/shipping/zones/".concat(t.id,"/methods")});case 3:return t.methods=e.sent,t.name=Object(_e.__)("Rest of the world","woocommerce-admin"),t.toggleEnabled=!0,o.push(t),e.abrupt("return");case 8:return e.next=10,Le()({path:"/wc/v3/shipping/zones/".concat(t.id,"/locations")});case 10:if(t.locations=e.sent,!t.locations.find((function(e){return n===e.code}))){e.next=18;break}return e.next=15,Le()({path:"/wc/v3/shipping/zones/".concat(t.id,"/methods")});case 15:t.methods=e.sent,o.push(t),a=!0;case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 9:if(a){e.next=17;break}return e.next=12,Le()({method:"POST",path:"/wc/v3/shipping/zones",data:{name:r}});case 12:return i=e.sent,e.next=15,Le()({method:"POST",path:"/wc/v3/shipping/zones/".concat(i.id,"/locations"),data:[{code:n,type:"country"}]});case 15:i.locations=e.sent,o.push(i);case 17:o.reverse(),this.setState({isPending:!1,shippingZones:o});case 19:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.countryCode,o=n.settings,c=o.woocommerce_store_address,a=o.woocommerce_default_country,i=o.woocommerce_store_postcode,s=this.state.step;"store_location"===s&&c&&a&&i&&this.completeStep(),"rates"!==s||e.countryCode===r&&"rates"===t.step||this.fetchShippingZones()}},{key:"completeStep",value:function(){var e=this.props.createNotice,t=this.state.step,n=this.getSteps(),r=n.findIndex((function(e){return e.key===t})),o=n[r+1];o?this.setState({step:o.key}):(e("success",Object(_e.__)("📦 Shipping is done! Don't worry, you can always change it later.","woocommerce-admin")),Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{})))}},{key:"getPluginsToActivate",value:function(){var e=this.props,t=e.countryCode,n=e.isJetpackConnected,r=[];return["GB","CA","AU"].includes(t)?r.push("woocommerce-shipstation-integration"):"US"===t&&(r.push("woocommerce-services"),n||r.push("jetpack")),Object(s.difference)(r,this.activePlugins)}},{key:"getSteps",value:function(){var e=this,t=this.getPluginsToActivate(),n=[{key:"store_location",label:Object(_e.__)("Set store location","woocommerce-admin"),description:Object(_e.__)("The address from which your business operates","woocommerce-admin"),content:Object(c.createElement)(Kc,N()({onComplete:function(t){var n=jc(t.countryState);Object(an.b)("tasklist_shipping_set_location",{country:n}),e.completeStep()}},this.props)),visible:!0},{key:"rates",label:Object(_e.__)("Set shipping costs","woocommerce-admin"),description:Object(_e.__)("Define how much customers pay to ship to different destinations","woocommerce-admin"),content:Object(c.createElement)(na,N()({buttonText:t.length?Object(_e.__)("Proceed","woocommerce-admin"):Object(_e.__)("Complete task","woocommerce-admin"),shippingZones:this.state.shippingZones,onComplete:this.completeStep},this.props)),visible:!0},{key:"label_printing",label:Object(_e.__)("Enable shipping label printing","woocommerce-admin"),description:t.includes("woocommerce-shipstation-integration")?Qr()({mixedString:Object(_e.__)("We recommend using ShipStation to save time at the post office by printing your shipping labels at home. Try ShipStation free for 30 days. {{link}}Learn more{{/link}}.","woocommerce-admin"),components:{link:Object(c.createElement)(I.Link,{href:"https://woocommerce.com/products/shipstation-integration",target:"_blank",type:"external"})}}):Object(_e.__)("With WooCommerce Services and Jetpack you can save time at the Post Office by printing your shipping labels at home","woocommerce-admin"),content:Object(c.createElement)(Fc,N()({onComplete:function(){Object(an.b)("tasklist_shipping_label_printing",{install:!0,pluginsToActivate:t}),e.completeStep()},onSkip:function(){Object(an.b)("tasklist_shipping_label_printing",{install:!1,pluginsToActivate:t}),Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{}))},pluginSlugs:t},this.props)),visible:t.length},{key:"connect",label:Object(_e.__)("Connect your store","woocommerce-admin"),description:Object(_e.__)("Connect your store to WordPress.com to enable label printing","woocommerce-admin"),content:Object(c.createElement)(Vc,N()({redirectUrl:Object(ye.f)("admin.php?page=wc-admin"),completeStep:this.completeStep},this.props,{onConnect:function(){Object(an.b)("tasklist_shipping_connect_store")}})),visible:t.includes("jetpack")}];return Object(s.filter)(n,(function(e){return e.visible}))}},{key:"render",value:function(){var e=this.state,t=e.isPending,n=e.step,r=this.props.isSettingsRequesting;return Object(c.createElement)("div",{className:"woocommerce-task-shipping"},Object(c.createElement)(I.Card,{className:"is-narrow"},Object(c.createElement)(I.Stepper,{isPending:t||r,isVertical:!0,currentStep:n,steps:this.getSteps()})))}}]),t}(c.Component),oa=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getSettings,r=t.getSettingsError,o=t.isGetSettingsRequesting,c=t.isJetpackConnected,a=n("general"),i=Boolean(r("general")),s=o("general"),l=jc(a.woocommerce_default_country),u=Object(ye.g)("dataEndpoints",{}).countries,d=l?(void 0===u?[]:u).find((function(e){return e.code===l})):null,p=d?d.name:null;return{countryCode:l,countryName:p,isJetpackConnected:c(),isSettingsError:i,isSettingsRequesting:s,settings:a}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateSettings:e("wc-api").updateSettings}})))(ra);function ca(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ca(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ia=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).initialState={isPending:!1,stepIndex:0,automatedTaxEnabled:!0,pluginsToActivate:e.pluginsToActivate},n.state=n.initialState,n.completeStep=n.completeStep.bind(ft()(n)),n.configureTaxRates=n.configureTaxRates.bind(ft()(n)),n.updateAutomatedTax=n.updateAutomatedTax.bind(ft()(n)),n.setIsPending=n.setIsPending.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.reset()}},{key:"reset",value:function(){this.setState(this.initialState)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.generalSettings,r=t.isJetpackConnected,o=t.pluginsToActivate,c=t.taxSettings,a=n.woocommerce_calc_taxes,i=n.woocommerce_store_address,s=n.woocommerce_default_country,l=n.woocommerce_store_postcode,u=this.state.stepIndex,d=this.getSteps()[u],p=d&&d.key,m=Boolean(i&&s&&l);null!==u&&!o.length&&m&&r&&this.isTaxJarSupported()?this.setState({stepIndex:null}):("store_location"===p&&m&&this.completeStep(),c.wc_connect_taxes_enabled&&c.wc_connect_taxes_enabled!==e.taxSettings.wc_connect_taxes_enabled&&this.setState({automatedTaxEnabled:"yes"===c.wc_connect_taxes_enabled}),"connect"===p&&r&&this.completeStep(),"no"===e.generalSettings.woocommerce_calc_taxes&&"yes"===a&&(window.location=Object(ye.f)("admin.php?page=wc-settings&tab=tax&section=standard")))}},{key:"isTaxJarSupported",value:function(){var e=this.props,t=e.countryCode,n=e.tosAccepted,r=Object(ye.g)("onboarding",{}),o=r.automatedTaxSupportedCountries,c=void 0===o?[]:o;return!r.taxJarActivated&&n&&c.includes(t)}},{key:"completeStep",value:function(){var e=this.state.stepIndex;this.getSteps()[e+1]?this.setState({stepIndex:e+1}):Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{}))}},{key:"configureTaxRates",value:function(){var e=this.props,t=e.generalSettings,n=e.updateSettings;"yes"!==t.woocommerce_calc_taxes?(this.setState({isPending:!0}),n({general:{woocommerce_calc_taxes:"yes"}})):window.location=Object(ye.f)("admin.php?page=wc-settings&tab=tax&section=standard&wc_onboarding_active_task=tax")}},{key:"updateAutomatedTax",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.createNotice,r=t.isGeneralSettingsError,o=t.isTaxSettingsError,c=t.updateSettings,a=this.state.automatedTaxEnabled,e.next=4,c({general:{woocommerce_calc_taxes:"yes"},tax:{wc_connect_taxes_enabled:a?"yes":"no"}});case 4:o||r?n("error",Object(_e.__)("There was a problem updating your tax settings.","woocommerce-admin")):(Object(ye.h)("onboarding",aa({},Object(ye.g)("onboarding",{}),{isTaxComplete:!0})),n("success",Object(_e.__)("You're awesome! One less item on your to-do list ✅","woocommerce-admin")),a?Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{})):this.configureTaxRates());case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"setIsPending",value:function(e){this.setState({isPending:e})}},{key:"getSteps",value:function(){var e=this,t=this.props,n=t.generalSettings,r=t.isGeneralSettingsRequesting,o=t.isJetpackConnected,a=this.state,i=a.isPending,l=a.pluginsToActivate,u=[{key:"store_location",label:Object(_e.__)("Set store location","woocommerce-admin"),description:Object(_e.__)("The address from which your business operates","woocommerce-admin"),content:Object(c.createElement)(Kc,N()({},this.props,{onComplete:function(t){var n=jc(t.countryState);Object(an.b)("tasklist_tax_set_location",{country:n}),e.completeStep()},isSettingsRequesting:r,settings:n})),visible:!0},{key:"plugins",label:Object(_e.__)("Install Jetpack and WooCommerce Services","woocommerce-admin"),description:Object(_e.__)("Jetpack and WooCommerce Services allow you to automate sales tax calculations","woocommerce-admin"),content:Object(c.createElement)(Fc,{onComplete:function(){Object(an.b)("tasklist_tax_install_extensions",{install_extensions:!0}),e.completeStep()},onSkip:function(){Object(an.a)("tasklist_tax_install_extensions",{install_extensions:!1}),window.location.href=Object(ye.f)("admin.php?page=wc-settings&tab=tax&section=standard")},skipText:Object(_e.__)("Set up tax rates manually","woocommerce-admin")}),visible:l.length&&this.isTaxJarSupported()},{key:"connect",label:Object(_e.__)("Connect your store","woocommerce-admin"),description:Object(_e.__)("Connect your store to WordPress.com to enable automated sales tax calculations","woocommerce-admin"),content:Object(c.createElement)(Vc,N()({},this.props,{setIsPending:this.setIsPending,onConnect:function(){Object(an.b)("tasklist_tax_connect_store",{connect:!0})},onSkip:function(){Object(an.a)("tasklist_tax_connect_store",{connect:!1}),window.location.href=Object(ye.f)("admin.php?page=wc-settings&tab=tax&section=standard")},skipText:Object(_e.__)("Set up tax rates manually","woocommerce-admin")})),visible:!o&&this.isTaxJarSupported()},{key:"manual_configuration",label:Object(_e.__)("Configure tax rates","woocommerce-admin"),description:Object(_e.__)("Head over to the tax rate settings screen to configure your tax rates","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,isBusy:i,onClick:function(){Object(an.b)("tasklist_tax_config_rates"),e.configureTaxRates()}},Object(_e.__)("Configure","woocommerce-admin")),Object(c.createElement)("p",null,"yes"!==n.woocommerce_calc_taxes&&Qr()({mixedString:Object(_e.__)('By clicking "Configure" you\'re enabling tax rates and calculations. More info {{link}}here{{/link}}.',"woocommerce-admin"),components:{link:Object(c.createElement)(I.Link,{href:"https://docs.woocommerce.com/document/setting-up-taxes-in-woocommerce/#section-1",target:"_blank",type:"external"})}}))),visible:!this.isTaxJarSupported()}];return Object(s.filter)(u,(function(e){return e.visible}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.isPending,r=t.stepIndex,o=this.props,a=o.isGeneralSettingsRequesting,i=o.isTaxSettingsRequesting,s=this.getSteps()[r];return Object(c.createElement)("div",{className:"woocommerce-task-tax"},Object(c.createElement)(I.Card,{className:"is-narrow"},s?Object(c.createElement)(I.Stepper,{isPending:n||a||i,isVertical:!0,currentStep:s.key,steps:this.getSteps()}):Object(c.createElement)("div",{className:"woocommerce-task-tax__success"},Object(c.createElement)("span",{className:"woocommerce-task-tax__success-icon",role:"img","aria-labelledby":"woocommerce-task-tax__success-message"},"🎊"),Object(c.createElement)(I.H,{id:"woocommerce-task-tax__success-message"},Object(_e.__)("Good news!","woocommerce-admin")),Object(c.createElement)("p",null,Qr()({mixedString:Object(_e.__)("{{strong}}Jetpack{{/strong}} and {{strong}}WooCommerce Services{{/strong}} can automate your sales tax calculations for you.","woocommerce-admin"),components:{strong:Object(c.createElement)("strong",null)}})),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){Object(an.b)("tasklist_tax_setup_automated_proceed",{setup_automatically:!0}),e.setState({automatedTaxEnabled:!0},e.updateAutomatedTax)}},Object(_e.__)("Yes please","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){Object(an.b)("tasklist_tax_setup_automated_proceed",{setup_automatically:!1}),e.setState({automatedTaxEnabled:!1},e.updateAutomatedTax)}},Object(_e.__)("No thanks, I'll configure taxes manually","woocommerce-admin")))))}}]),t}(c.Component),sa=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getActivePlugins,r=t.getOptions,o=t.getSettings,c=t.getSettingsError,a=t.isGetSettingsRequesting,i=t.isJetpackConnected,l=o("general"),u=Boolean(c("general")),d=a("general"),p=o("tax"),m=Boolean(c("tax")),b=a("tax"),h=jc(l.woocommerce_default_country),f=n(),g=Object(s.difference)(["jetpack","woocommerce-services"],f),v=r(["wc_connect_options","woocommerce_setup_jetpack_opted_in"]),M=Object(s.get)(v,"wc_connect_options",{}).tos_accepted||v.woocommerce_setup_jetpack_opted_in;return{countryCode:h,isGeneralSettingsError:u,isGeneralSettingsRequesting:d,generalSettings:l,isTaxSettingsError:m,isTaxSettingsRequesting:b,taxSettings:p,isJetpackConnected:i(),pluginsToActivate:g,tosAccepted:M}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateSettings:e("wc-api").updateSettings}})))(ia);function la(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ua(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?la(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):la(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var da=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={errorMessage:"",connectURL:"",showConnectionButtons:!e.manualConfig&&!e.createAccount,showManualConfiguration:e.manualConfig},n.updateSettings=n.updateSettings.bind(ft()(n)),n}var n,r,o;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.createAccount,n=e.options,r=this.state.showConnectionButtons,o=Object(Oe.getQuery)();if(o["stripe-connect"]&&"1"===o["stripe-connect"]){var c=Object(s.get)(n,["woocommerce_stripe_settings"],[]);return c.publishable_key&&c.secret_key?(Object(an.b)("tasklist_payment_connect_method",{payment_method:"stripe"}),this.props.markConfigured("stripe"),void this.props.createNotice("success",Object(_e.__)("Stripe connected successfully.","woocommerce-admin"))):void this.setState({showConnectionButtons:!1,showManualConfiguration:!0})}t&&this.autoCreateAccount(),r&&this.fetchOAuthConnectURL()}},{key:"componentDidUpdate",value:function(e,t){!1===t.showConnectionButtons&&this.state.showConnectionButtons&&this.fetchOAuthConnectURL()}},{key:"fetchOAuthConnectURL",value:(o=gr()(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.returnUrl,e.prev=1,this.props.setRequestPending(!0),e.next=5,Le()({path:"/wc/v1/connect/stripe/oauth/init",method:"POST",data:{returnUrl:t}});case 5:if((n=e.sent)&&n.oauthUrl){e.next=10;break}return this.props.setRequestPending(!1),this.setState({showConnectionButtons:!1,showManualConfiguration:!0}),e.abrupt("return");case 10:this.props.setRequestPending(!1),this.setState({connectURL:n.oauthUrl}),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(1),this.props.setRequestPending(!1),this.setState({showConnectionButtons:!1,showManualConfiguration:!0});case 18:case"end":return e.stop()}}),e,this,[[1,14]])}))),function(){return o.apply(this,arguments)})},{key:"autoCreateAccount",value:(r=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.email,r=t.countryCode,e.prev=1,this.props.setRequestPending(!0),e.next=5,Le()({path:"/wc/v1/connect/stripe/account",method:"POST",data:{email:n,country:r}});case 5:if(!e.sent){e.next=12;break}return Object(an.b)("tasklist_payment_connect_method",{payment_method:"stripe"}),this.props.setRequestPending(!1),this.props.markConfigured("stripe"),this.props.createNotice("success",Object(_e.__)("Stripe connected successfully.","woocommerce-admin")),e.abrupt("return");case 12:e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),this.props.setRequestPending(!1),-1===e.t0.message.indexOf("Account already exists for the provided email")?(o=Object(_e.__)("Stripe","woocommerce-admin"),a=Qr()({mixedString:Object(_e.sprintf)(Object(_e.__)("We tried to create a Stripe account automatically for {{strong}}%s{{/strong}}, but an error occured. Please try connecting manually to continue.","woocommerce-admin"),n),components:{strong:Object(c.createElement)("strong",null)}})):(o=Object(_e.__)("You already have a Stripe account","woocommerce-admin"),a=Qr()({mixedString:Object(_e.sprintf)(Object(_e.__)("We tried to create a Stripe account automatically for {{strong}}%s{{/strong}}, but one already exists. Please sign in and connect to continue.","woocommerce-admin"),n),components:{strong:Object(c.createElement)("strong",null)}})),this.setState({showConnectionButtons:!0,errorTitle:o,errorMessage:a});case 19:case"end":return e.stop()}}),e,this,[[1,14]])}))),function(){return r.apply(this,arguments)})},{key:"renderErrorModal",value:function(){var e=this,t=this.state,n=t.errorTitle,r=t.errorMessage;return Object(c.createElement)(Ac,{title:n,onRequestClose:function(){return e.setState({errorMessage:"",errorTitle:""})},className:"woocommerce-task-payments__stripe-error-modal"},Object(c.createElement)("div",{className:"woocommerce-task-payments__stripe-error-wrapper"},Object(c.createElement)("div",{className:"woocommerce-task-payments__stripe-error-message"},r),Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,onClick:function(){return e.setState({errorMessage:"",errorTitle:""})}},Object(_e.__)("OK","woocommerce-admin"))))}},{key:"renderConnectButton",value:function(){var e=this.state.connectURL;return Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,href:e},Object(_e.__)("Connect","woocommerce-admin"))}},{key:"updateSettings",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,r=n.createNotice,o=n.isSettingsError,c=n.updateOptions,a=n.markConfigured,this.props.setRequestPending(!0),e.next=4,c({woocommerce_stripe_settings:ua({},this.props.options.woocommerce_stripe_settings,{publishable_key:t.publishable_key,secret_key:t.secret_key,enabled:"yes"})});case 4:o?(this.props.setRequestPending(!1),r("error",Object(_e.__)("There was a problem saving your payment settings.","woocommerce-admin"))):(Object(an.b)("tasklist_payment_connect_method",{payment_method:"stripe"}),this.props.setRequestPending(!1),a("stripe"),this.props.createNotice("success",Object(_e.__)("Stripe connected successfully.","woocommerce-admin")));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getInitialConfigValues",value:function(){return{publishable_key:"",secret_key:""}}},{key:"validate",value:function(e){var t={};return e.publishable_key||(t.publishable_key=Object(_e.__)("Please enter your publishable key","woocommerce-admin")),e.secret_key||(t.secret_key=Object(_e.__)("Please enter your secret key","woocommerce-admin")),t}},{key:"renderManualConfig",value:function(){var e=this,t=Qr()({mixedString:Object(_e.__)("Your API details can be obtained from your {{link}}Stripe account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(I.Link,{href:"https://stripe.com/docs/account",target:"_blank",type:"external"})}});return Object(c.createElement)(I.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(n){var r=n.getInputProps,o=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("Live Publishable Key","woocommerce-admin"),required:!0},r("publishable_key"))),Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("Live Secret Key","woocommerce-admin"),required:!0},r("secret_key"))),Object(c.createElement)(Ur.a,{onClick:o,isPrimary:!0},Object(_e.__)("Proceed","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){e.props.markConfigured("stripe")}},Object(_e.__)("Skip","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"render",value:function(){var e=this.state,t=e.errorMessage,n=e.showConnectionButtons,r=e.connectURL,o=e.showManualConfiguration;return t?this.renderErrorModal():n&&r?this.renderConnectButton():o?this.renderManualConfig():null}}]),t}(c.Component),pa=Object(ke.a)(rn((function(e){return{options:(0,e("wc-api").getOptions)(["woocommerce_stripe_settings"])}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(da);function ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ma(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ha=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={showSkipButton:!1},n.connect=n.connect.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=Object(Oe.getQuery)();if(e["square-connect"]&&"1"===e["square-connect"])return Object(an.b)("tasklist_payment_connect_method",{payment_method:"square"}),this.props.markConfigured("square"),void this.props.createNotice("success",Object(_e.__)("Square connected successfully.","woocommerce-admin"))}},{key:"componentDidUpdate",value:function(e){!1===e.optionsIsRequesting&&!0===this.props.optionsIsRequesting&&this.props.setRequestPending(!0),!0===e.optionsIsRequesting&&!1===this.props.optionsIsRequesting&&this.props.setRequestPending(!1)}},{key:"connect",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.updateOptions,this.props.setRequestPending(!0),t({woocommerce_stripe_settings:ba({},this.props.options.woocommerce_stripe_settings,{enabled:"yes"})}),n=Object(_e.__)("There was an error connecting to Square. Please try again or skip to connect later in store settings.","woocommerce-admin"),e.prev=4,e.next=7,Le()({path:"/wc-admin/onboarding/plugins/connect-square",method:"POST"});case 7:if((r=e.sent)&&r.connectUrl){e.next=13;break}return this.props.setRequestPending(!1),this.setState({showSkipButton:!0}),this.props.createNotice("error",n),e.abrupt("return");case 13:this.props.setRequestPending(!1),window.location=r.connectUrl,e.next=22;break;case 17:e.prev=17,e.t0=e.catch(4),this.props.setRequestPending(!1),this.setState({showSkipButton:!0}),this.props.createNotice("error",n);case 22:case"end":return e.stop()}}),e,this,[[4,17]])}))),function(){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state.showSkipButton;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,onClick:this.connect},Object(_e.__)("Connect","woocommerce-admin")),t&&Object(c.createElement)(Ur.a,{onClick:function(){e.props.markConfigured("square")}},Object(_e.__)("Skip","woocommerce-admin")))}}]),t}(c.Component),fa=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getOptions,r=t.isGetOptionsRequesting;return{options:n(["woocommerce_stripe_settings"]),optionsIsRequesting:Boolean(r(["woocommerce_stripe_settings"]))}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(ha);function ga(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ga(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ma=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={connectURL:"",showManualConfiguration:e.manualConfig},n.updateSettings=n.updateSettings.bind(ft()(n)),n}var n,r;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=this.state.showManualConfiguration,t=Object(Oe.getQuery)();if(t["paypal-connect"])return"1"===t["paypal-connect"]?(Object(an.b)("tasklist_payment_connect_method",{payment_method:"paypal"}),this.props.markConfigured("paypal"),void this.props.createNotice("success",Object(_e.__)("PayPal connected successfully.","woocommerce-admin"))):void this.setState({showManualConfiguration:!0});e||this.fetchOAuthConnectURL()}},{key:"componentDidUpdate",value:function(e,t){!0===t.showManualConfiguration&&!1===this.state.showManualConfiguration&&this.fetchOAuthConnectURL(),!1===e.optionsIsRequesting&&!0===this.props.optionsIsRequesting&&this.props.setRequestPending(!0),!0===e.optionsIsRequesting&&!1===this.props.optionsIsRequesting&&this.props.setRequestPending(!1)}},{key:"fetchOAuthConnectURL",value:(r=gr()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.props.setRequestPending(!0),e.prev=1,e.next=4,Le()({path:"/wc-admin/onboarding/plugins/connect-paypal",method:"POST"});case 4:if((t=e.sent)&&t.connectUrl){e.next=9;break}return this.props.setRequestPending(!1),this.setState({showManualConfiguration:!0}),e.abrupt("return");case 9:this.props.setRequestPending(!1),this.setState({connectURL:t.connectUrl}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),this.props.setRequestPending(!1),this.setState({showManualConfiguration:!0});case 17:case"end":return e.stop()}}),e,this,[[1,13]])}))),function(){return r.apply(this,arguments)})},{key:"renderConnectButton",value:function(){var e=this.state.connectURL;return Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,href:e},Object(_e.__)("Connect","woocommerce-admin"))}},{key:"updateSettings",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,r=n.createNotice,o=n.isSettingsError,c=n.updateOptions,a=n.markConfigured,this.props.setRequestPending(!0),e.next=4,c({woocommerce_ppec_paypal_settings:va({},this.props.options.woocommerce_ppec_paypal_settings,{api_username:t.api_username,api_password:t.api_password,enabled:"yes"})});case 4:o?(this.props.setRequestPending(!1),r("error",Object(_e.__)("There was a problem saving your payment settings.","woocommerce-admin"))):(Object(an.b)("tasklist_payment_connect_method",{payment_method:"paypal"}),this.props.setRequestPending(!1),a("paypal"),this.props.createNotice("success",Object(_e.__)("PayPal connected successfully.","woocommerce-admin")));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getInitialConfigValues",value:function(){return{api_username:"",api_password:""}}},{key:"validate",value:function(e){var t={};return e.api_username||(t.api_username=Object(_e.__)("Please enter your API username","woocommerce-admin")),e.api_password||(t.api_password=Object(_e.__)("Please enter your API password","woocommerce-admin")),t}},{key:"renderManualConfig",value:function(){var e=this,t=this.props.optionsIsRequesting,n=Object(c.createElement)(I.Link,{href:"https://docs.woocommerce.com/document/paypal-express-checkout/#section-8",target:"_blank",type:"external"}),r=Qr()({mixedString:Object(_e.__)("Your API details can be obtained from your {{link}}PayPal account{{/link}}","woocommerce-admin"),components:{link:n}});return Object(c.createElement)(I.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("API Username","woocommerce-admin"),required:!0},o("api_username"))),Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("API Password","woocommerce-admin"),required:!0},o("api_password"))),Object(c.createElement)(Ur.a,{onClick:a,isPrimary:!0,disabled:t},Object(_e.__)("Proceed","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){e.props.markConfigured("paypal")}},Object(_e.__)("Skip","woocommerce-admin")),Object(c.createElement)("p",null,r))}))}},{key:"render",value:function(){var e=this.state,t=e.connectURL,n=e.showManualConfiguration;return t&&!n?this.renderConnectButton():n?this.renderManualConfig():null}}]),t}(c.Component);Ma.defaultProps={manualConfig:!1};var Oa=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getOptions,r=t.isGetOptionsRequesting;return{options:n(["woocommerce_ppec_paypal_settings"]),optionsIsRequesting:Boolean(r(["woocommerce_ppec_paypal_settings"]))}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(Ma),ya=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).continue=n.continue.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"continue",value:function(){var e="checkout"===this.props.plugin?"klarna-checkout":"klarna-payments";Object(an.b)("tasklist_payment_connect_method",{payment_method:e}),this.props.markConfigured(e)}},{key:"render",value:function(){var e="checkout"===this.props.plugin?"klarna-checkout":"klarna-payments",t="checkout"===this.props.plugin?"kco":"klarna_payments",n=Object(c.createElement)(I.Link,{href:ye.a+"admin.php?page=wc-settings&tab=checkout&section="+t,target:"_blank",type:"external"}),r=Object(c.createElement)(I.Link,{href:"https://docs.woocommerce.com/document/"+e+"/#section-3",target:"_blank",type:"external"}),o=Qr()({mixedString:Object(_e.__)("Klarna can be configured under your {{link}}store settings{{/link}}. Figure out {{helpLink}}what you need{{/helpLink}}.","woocommerce-admin"),components:{link:n,helpLink:r}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,o),Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,onClick:this.continue},Object(_e.__)("Continue","woocommerce-admin")))}}]),t}(c.Component);function wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var za=function(e){function t(){var e;x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).chooseMethods=e.chooseMethods.bind(ft()(e)),e.completeStep=e.completeStep.bind(ft()(e)),e.markConfigured=e.markConfigured.bind(ft()(e)),e.setMethodRequestPending=e.setMethodRequestPending.bind(ft()(e)),e.completePluginInstall=e.completePluginInstall.bind(ft()(e));var n=e.props,r=n.methods,o=n.installed,c=n.configured,a="choose",i=!1;if(r.length>0&&c.length>0){a=Object(s.difference)(r,c)[0]||"",i=!0;var l=Object(s.difference)(r,c).length;if(0===l)return e.state={step:"done",methodRequestPending:!1},e.completeTask(),W()(e)}else 1===o&&r.length>0&&(a=r[0],i=!0);return e.state={step:a,showIndividualConfigs:i,methodRequestPending:!1},e}return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.methods,r=t.configured;if(e.configured.length!==r.length&&n.length>0&&r.length>0){var o=Object(s.difference)(n,r)[0];this.setState({step:o})}}},{key:"completeTask",value:function(){(0,this.props.createNotice)("success",Object(_e.__)("💰 Ka-ching! Your store can now accept payments 💳","woocommerce-admin")),Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{}))}},{key:"isStripeEnabled",value:function(){var e=this.props.countryCode;return Object(ye.g)("onboarding",{stripeSupportedCountries:[]}).stripeSupportedCountries.includes(e)}},{key:"getInitialValues",value:function(){var e=Object(ye.g)("onboarding",{userEmail:""}).userEmail;return{stripe:this.isStripeEnabled(),paypal:!1,klarna_checkout:!1,klarna_payments:!1,square:!1,create_stripe:this.isStripeEnabled(),stripe_email:this.isStripeEnabled()&&e||""}}},{key:"validate",value:function(){return{}}},{key:"completeStep",value:function(){var e=this.state.step,t=this.getSteps(),n=t.findIndex((function(t){return t.key===e})),r=t[n+1];r?this.setState({step:r.key}):Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{}))}},{key:"completePluginInstall",value:function(){var e=this.props.completed;this.props.updateOptions(je()({},"woocommerce_task_list_payments",{completed:e||!1,installed:1,methods:this.getMethodsToConfigure()})),this.setState({showIndividualConfigs:!0},(function(){this.completeStep()}))}},{key:"markConfigured",value:function(e){var t=this.props,n=t.options,r=t.methods,o=t.configured;o.push(e);var c=Object(s.difference)(r,o);this.props.updateOptions(je()({},"woocommerce_task_list_payments",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wa(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n.woocommerce_task_list_payments,{configured:o,completed:0===c.length?1:0}))),0===c.length&&this.completeTask()}},{key:"setMethodRequestPending",value:function(e){this.setState({methodRequestPending:e})}},{key:"renderWooCommerceServicesStripeConnect",value:function(){var e=this.formData,t=e.getInputProps,n=e.values;if(!n.stripe)return null;var r=this.props,o=r.isJetpackConnected,a=r.activePlugins;return o&&a.includes("woocommerce-services")?Object(c.createElement)("div",{className:"woocommerce-task-payments__woocommerce-services-options"},Object(c.createElement)(qt.a,N()({label:Object(_e.__)("Create a Stripe account for me","woocommerce-admin")},t("create_stripe"))),n.create_stripe&&Object(c.createElement)(I.TextControl,N()({label:Object(_e.__)("Email address","woocommerce-admin")},t("stripe_email")))):null}},{key:"getMethodOptions",value:function(){var e=this.formData.getInputProps,t=this.props,n=t.countryCode,r=t.profileItems,o=[{key:"stripe",title:Object(_e.__)("Credit cards - powered by Stripe","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(_e.__)("Accept debit and credit cards in 135+ currencies, methods such as Alipay, and one-touch checkout with Apple Pay.","woocommerce-admin"),this.renderWooCommerceServicesStripeConnect()),before:Object(c.createElement)("img",{src:ye.e+"images/stripe.png",alt:""}),after:Object(c.createElement)($c.a,e("stripe")),visible:this.isStripeEnabled()},{key:"paypal",title:Object(_e.__)("PayPal Checkout","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(_e.__)("Safe and secure payments using credit cards or your customer's PayPal account.","woocommerce-admin")),before:Object(c.createElement)("img",{src:ye.e+"images/paypal.png",alt:""}),after:Object(c.createElement)($c.a,e("paypal")),visible:!0},{key:"klarna_checkout",title:Object(_e.__)("Klarna Checkout","woocommerce-admin"),content:Object(_e.__)("Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.","woocommerce-admin"),before:Object(c.createElement)("img",{src:ye.e+"images/klarna-black.png",alt:""}),after:Object(c.createElement)($c.a,e("klarna_checkout")),visible:["SE","FI","NO","NL"].includes(n)},{key:"klarna_payments",title:Object(_e.__)("Klarna Payments","woocommerce-admin"),content:Object(_e.__)("Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.","woocommerce-admin"),before:Object(c.createElement)("img",{src:ye.e+"images/klarna-black.png",alt:""}),after:Object(c.createElement)($c.a,e("klarna_payments")),visible:["DK","DE","AT"].includes(n)},{key:"square",title:Object(_e.__)("Square","woocommerce-admin"),content:Object(_e.__)("Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place.","woocommerce-admin"),before:Object(c.createElement)("img",{src:ye.e+"images/square-black.png",alt:""}),after:Object(c.createElement)($c.a,e("square")),visible:["brick-mortar","brick-mortar-other"].includes(r.selling_venues)&&["US","CA","JP","GB","AU"].includes(n)}];return Object(s.filter)(o,(function(e){return e.visible}))}},{key:"getMethodsToConfigure",value:function(){var e=this.props.options;if(e&&e.woocommerce_task_list_payments&&e.woocommerce_task_list_payments.methods)return e.woocommerce_task_list_payments.methods;var t=this.formData.values,n={stripe:t.stripe,paypal:t.paypal,"klarna-checkout":t.klarna_checkout,"klarna-payments":t.klarna_payments,square:t.square};return Object(s.keys)(Object(s.pickBy)(n))}},{key:"getPluginsToInstall",value:function(){var e=this.formData.values,t={"woocommerce-gateway-stripe":e.stripe,"woocommerce-gateway-paypal-express-checkout":e.paypal,"klarna-checkout-for-woocommerce":e.klarna_checkout,"klarna-payments-for-woocommerce":e.klarna_payments,"woocommerce-square":e.square};return Object(s.keys)(Object(s.pickBy)(t))}},{key:"chooseMethods",value:function(){var e=this.getMethodOptions().map((function(e){return e.key})),t=this.getMethodsToConfigure(),n=this.formData.values.create_stripe||!1;Object(an.b)("wcadmin_tasklist_payment_choose_method",{payment_methods_displayed:e,payment_methods_chosen:t,create_stripe_account:n}),this.completeStep()}},{key:"getSteps",value:function(){var e=this,t=this.formData.values,n=t.stripe||t.paypal||t.klarna_checkout||t.klarna_payments||t.square,r=this.state.showIndividualConfigs,o=this.props,a=o.activePlugins,i=o.countryCode,l=!o.isJetpackConnected||!a.includes("woocommerce-services"),u=this.getMethodsToConfigure(),d=[{key:"choose",label:Object(_e.__)("Choose payment methods","woocommerce-admin"),description:Object(_e.__)("Select which payment methods you'd like to use","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.List,{items:this.getMethodOptions()}),Object(c.createElement)(Ur.a,{onClick:this.chooseMethods,isPrimary:!0,disabled:!n},Object(_e.__)("Proceed","woocommerce-admin"))),visible:!0},{key:"install",label:Object(_e.__)("Install selected methods","woocommerce-admin"),description:Object(_e.__)("Install plugins required to offer the selected payment methods","woocommerce-admin"),content:!r&&Object(c.createElement)(Fc,{onComplete:function(){e.completePluginInstall(),Object(an.b)("tasklist_payment_install_method")},autoInstall:!0,pluginSlugs:this.getPluginsToInstall()}),visible:!0},{key:"configure",label:Object(_e.__)("Configure payment methods","woocommerce-admin"),description:Object(_e.__)("Set up your chosen payment methods","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null),visible:!r},{key:"stripe",label:Object(_e.__)("Enable Stripe","woocommerce-admin"),description:Object(_e.__)("Connect your store to your Stripe account","woocommerce-admin"),content:Object(c.createElement)(pa,{manualConfig:l,markConfigured:this.markConfigured,setRequestPending:this.setMethodRequestPending,createAccount:t.create_stripe&&!l,email:t.stripe_email,countryCode:i,returnUrl:Object(ye.f)("admin.php?page=wc-admin&task=payments&stripe-connect=1")}),visible:r&&u.includes("stripe")},{key:"paypal",label:Object(_e.__)("Enable PayPal Checkout","woocommerce-admin"),description:Object(_e.__)("Connect your store to your PayPal account","woocommerce-admin"),content:Object(c.createElement)(Oa,{markConfigured:this.markConfigured,setRequestPending:this.setMethodRequestPending}),visible:r&&u.includes("paypal")},{key:"square",label:Object(_e.__)("Enable Square","woocommerce-admin"),description:Object(_e.__)("Connect your store to your Square account","woocommerce-admin"),content:Object(c.createElement)(fa,{markConfigured:this.markConfigured,setRequestPending:this.setMethodRequestPending}),visible:r&&u.includes("square")},{key:"klarna-checkout",label:Object(_e.__)("Klarna","woocommerce-admin"),description:"",content:Object(c.createElement)(ya,{markConfigured:this.markConfigured,setRequestPending:this.setMethodRequestPending,plugin:"checkout"}),visible:r&&u.includes("klarna-checkout")},{key:"klarna-payments",label:Object(_e.__)("Klarna","woocommerce-admin"),description:"",content:Object(c.createElement)(ya,{markConfigured:this.markConfigured,setRequestPending:this.setMethodRequestPending,plugin:"payments"}),visible:r&&u.includes("klarna-payments")}];return Object(s.filter)(d,(function(e){return e.visible}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.step,r=t.methodRequestPending;return Object(c.createElement)(I.Form,{initialValues:this.getInitialValues(),onSubmitCallback:s.noop,validate:this.validate},(function(t){return e.formData=t,Object(c.createElement)("div",{className:"woocommerce-task-payments"},Object(c.createElement)(I.Card,{className:"is-narrow"},Object(c.createElement)(I.Stepper,{isVertical:!0,isPending:r||"install"===n,currentStep:n,steps:e.getSteps()})))}))}}]),t}(c.Component),_a=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItems,r=t.isJetpackConnected,o=t.getActivePlugins,c=(0,t.getOptions)(["woocommerce_task_list_payments","woocommerce_default_country"]),a=jc(c.woocommerce_default_country),i=Object(s.get)(c,["woocommerce_task_list_payments","methods"],[]),l=Object(s.get)(c,["woocommerce_task_list_payments","installed"],!1),u=Object(s.get)(c,["woocommerce_task_list_payments","configured"],[]),d=Object(s.get)(c,["woocommerce_task_list_payments","completed"],!1);return{countryCode:a,profileItems:n(),activePlugins:o(),isJetpackConnected:r(),options:c,methods:i,installed:l,configured:u,completed:d}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(za);function Aa(e){var t=e.profileItems,n=e.options,r=e.query,o=e.toggleCartModal,a=Object(ye.g)("onboarding",{hasPhysicalProducts:!1,hasProducts:!1,isAppearanceComplete:!1,isTaxComplete:!1,shippingZonesCount:0}),i=a.hasPhysicalProducts,l=a.hasProducts,u=a.isAppearanceComplete,d=a.isTaxComplete,p=a.shippingZonesCount,m=Ec(t,!0),b=Ec(t),h=Object(s.get)(n,["woocommerce_task_list_payments","completed"],!1),f=[{key:"purchase",title:Object(_e.__)("Purchase & install extensions","woocommerce-admin"),content:Object(_e.__)("Purchase, install, and manage your extensions directly from your dashboard","wooocommerce-admin"),icon:"extension",container:null,onClick:function(){return b.length?o():null},visible:m.length,completed:!b.length},{key:"connect",title:Object(_e.__)("Connect your store to WooCommerce.com","woocommerce-admin"),content:Object(_e.__)("Install and manage your extensions directly from your Dashboard","wooocommerce-admin"),icon:"extension",container:Object(c.createElement)(Wc,{query:r}),visible:t.items_purchased&&!t.wccom_connected,completed:t.wccom_connected},{key:"products",title:Object(_e.__)("Add your first product","woocommerce-admin"),content:Object(_e.__)("Add products manually, import from a sheet or migrate from another platform","wooocommerce-admin"),icon:"add_box",container:Object(c.createElement)(Hc,null),completed:l,visible:!0},{key:"appearance",title:Object(_e.__)("Personalize your store","woocommerce-admin"),content:Object(_e.__)("Create a custom homepage and upload your logo","wooocommerce-admin"),icon:"palette",container:Object(c.createElement)(Bc,null),completed:u,visible:!0},{key:"shipping",title:Object(_e.__)("Set up shipping","woocommerce-admin"),content:Object(_e.__)("Configure some basic shipping rates to get started","wooocommerce-admin"),icon:"local_shipping",container:Object(c.createElement)(oa,null),completed:p>0,visible:t.product_types&&t.product_types.includes("physical")||i},{key:"tax",title:Object(_e.__)("Set up tax","woocommerce-admin"),content:Object(_e.__)("Choose how to configure tax rates - manually or automatically","wooocommerce-admin"),icon:"account_balance",container:Object(c.createElement)(sa,null),completed:d,visible:!0},{key:"payments",title:Object(_e.__)("Set up payments","woocommerce-admin"),content:Object(_e.__)("Select which payment providers you’d like to use and configure them","wooocommerce-admin"),icon:"payment",container:Object(c.createElement)(_a,null),completed:h,onClick:function(){h?window.location=Object(ye.f)("admin.php?page=wc-settings&tab=checkout"):Object(Oe.updateQueryString)({task:"payments"})},visible:!0}];return Object(ze.applyFilters)("woocommerce_admin_onboarding_task_list",f,r)}function ja(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ka=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={isCartModalOpen:!1,isWelcomeModalOpen:!e.modalDismissed},n}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){document.body.classList.add("woocommerce-onboarding"),document.body.classList.add("woocommerce-task-dashboard__body"),this.recordTaskView(),this.recordTaskListView(),this.props.inline&&this.props.updateOptions({woocommerce_task_list_complete:!0})}},{key:"componentDidUpdate",value:function(e){e.query.task!==this.props.query.task&&(window.document.documentElement.scrollTop=0,this.recordTaskView())}},{key:"componentWillUnmount",value:function(){document.body.classList.remove("woocommerce-onboarding"),document.body.classList.remove("woocommerce-task-dashboard__body")}},{key:"getTasks",value:function(){var e=this.props,t=e.profileItems,n=e.query;return Aa({profileItems:t,options:e.taskListPayments,query:n,toggleCartModal:this.toggleCartModal.bind(this)}).filter((function(e){return e.visible}))}},{key:"getPluginsInformation",value:function(){var e=this.props.isJetpackConnected,t=Object(ye.g)("onboarding",{}),n=t.activePlugins,r=t.installedPlugins;return{wcs_installed:r.includes("woocommerce-services"),wcs_active:n.includes("woocommerce-services"),jetpack_installed:r.includes("jetpack"),jetpack_active:n.includes("jetpack"),jetpack_connected:e}}},{key:"recordTaskView",value:function(){var e=this.props.query.task,t=this.getPluginsInformation();e&&Object(an.b)("task_view",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ja(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ja(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({task_name:e},t))}},{key:"recordTaskListView",value:function(){if(!this.getCurrentTask()){var e=this.props.profileItems,t=this.getTasks();Object(an.b)("tasklist_view",{number_tasks:t.length,store_connected:e.wccom_connected})}}},{key:"keepTaskCard",value:function(){Object(an.b)("tasklist_completed",{action:"keep_card"}),this.props.updateOptions({woocommerce_task_list_prompt_shown:!0})}},{key:"hideTaskCard",value:function(e){Object(an.b)("tasklist_completed",{action:e}),this.props.updateOptions({woocommerce_task_list_hidden:"yes",woocommerce_task_list_prompt_shown:!0})}},{key:"getCurrentTask",value:function(){var e=this.props.query.task,t=this.getTasks().find((function(t){return t.key===e}));return t||null}},{key:"renderPrompt",value:function(){var e=this;return this.props.promptShown?null:Object(c.createElement)(ec,{className:"woocommerce-task-card__prompt"},Object(c.createElement)("div",{className:"woocommerce-task-card__prompt-pointer"}),Object(c.createElement)("div",{className:"woocommerce-task-card__prompt-content"},Object(c.createElement)("span",null,Object(_e.__)("Is this card useful?","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-task-card__prompt-actions"},Object(c.createElement)(Ur.a,{isLink:!0,onClick:function(){return e.hideTaskCard("hide_card")}},Object(_e.__)("No, hide it","woocommerce-admin")),Object(c.createElement)(Ur.a,{isLink:!0,onClick:function(){return e.keepTaskCard()}},Object(_e.__)("Yes, keep it","woocommerce-admin")))))}},{key:"renderMenu",value:function(){var e=this;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Task List Options","woocommerce-admin"),renderContent:function(){return Object(c.createElement)("div",{className:"woocommerce-task-card__section-controls"},Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:function(){return e.hideTaskCard("remove_card")}},Object(c.createElement)(jo.a,{icon:"trash",label:Object(_e.__)("Remove block")}),Object(_e.__)("Remove this card","woocommerce-admin")))}})}},{key:"toggleCartModal",value:function(){var e=this.state.isCartModalOpen;e||Object(an.b)("tasklist_purchase_extensions"),this.setState({isCartModalOpen:!e})}},{key:"closeWelcomeModal",value:function(){document.body.classList.contains("woocommerce-admin-is-loading")||(this.setState({isWelcomeModalOpen:!1}),this.props.updateOptions({woocommerce_task_list_welcome_modal_dismissed:!0}))}},{key:"renderWelcomeModal",value:function(){var e=this;return Object(c.createElement)(Ac,{title:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{role:"img","aria-hidden":"true",focusable:"false",className:"woocommerce-task-dashboard__welcome-modal-icon"},"🚀"),Object(_e.__)("Woo hoo - you're almost there!","woocommerce-admin")),onRequestClose:function(){return e.closeWelcomeModal()},className:"woocommerce-task-dashboard__welcome-modal"},Object(c.createElement)("div",{className:"woocommerce-task-dashboard__welcome-modal-wrapper"},Object(c.createElement)("div",{className:"woocommerce-task-dashboard__welcome-modal-message"},Object(c.createElement)("p",null,Object(_e.__)("Based on the information you provided we’ve prepared some final set up tasks for you to perform.","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("Once complete your store will be ready for launch - exciting!","woocommerce-admin"))),Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,onClick:function(){return e.closeWelcomeModal()}},Object(_e.__)("Continue","woocommerce-admin"))))}},{key:"render",value:function(){var e=this,t=this.props.inline,n=this.state,r=n.isCartModalOpen,o=n.isWelcomeModalOpen,a=this.getCurrentTask(),i=this.getTasks().map((function(e){return e.className=Rt()(e.completed?"is-complete":null,e.className),e.before=e.completed?Object(c.createElement)("i",{className:"material-icons-outlined"},"check_circle"):Object(c.createElement)("i",{className:"material-icons-outlined"},e.icon),e.after=Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),e.onClick||(e.onClick=function(){return Object(Oe.updateQueryString)({task:e.key})}),e}));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"},a?a.container:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.Card,{className:"woocommerce-task-card",title:Object(_e.__)("Set up your store and start selling","woocommerce-admin"),description:Object(_e.__)("Below you’ll find a list of the most important steps to get your store up and running.","woocommerce-admin"),menu:t&&this.renderMenu()},Object(c.createElement)(I.List,{items:i})),t&&this.renderPrompt(),o&&this.renderWelcomeModal())),r&&Object(c.createElement)(Sc,{onClose:function(){return e.toggleCartModal()},onClickPurchaseLater:function(){return e.toggleCartModal()}}))}}]),t}(c.Component),Ea=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItems,r=t.getOptions,o=t.isJetpackConnected,c=n(),a=r(["woocommerce_task_list_prompt_shown","woocommerce_task_list_welcome_modal_dismissed"]),i=Object(s.get)(a,["woocommerce_task_list_prompt_shown"],!1);return{modalDismissed:Object(s.get)(a,["woocommerce_task_list_welcome_modal_dismissed"],!1),profileItems:c,promptShown:i,taskListPayments:r(["woocommerce_task_list_payments"]),isJetpackConnected:o()}})),Object(a.withDispatch)((function(e){return{updateOptions:e("wc-api").updateOptions}})))(ka);function Ca(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function La(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ca(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ca(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Na=Object(ze.applyFilters)("woocommerce_admin_dashboard_filters",[]),Sa=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={sections:n.mergeSectionsWithDefaults(e.userPrefSections)},n.onMove=n.onMove.bind(ft()(n)),n.updateSection=n.updateSection.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"mergeSectionsWithDefaults",value:function(e){if(!e||0===e.length)return $o;var t=$o.map((function(e){return e.key})),n=e.map((function(e){return e.key})),r=new Set([].concat(St()(n),St()(t))),o=[];return r.forEach((function(t){var n=$o.find((function(e){return e.key===t}));if(n){var r=e.find((function(e){return e.key===t}));o.push(La({},n,{},r))}})),o}},{key:"updateSections",value:function(e){this.setState({sections:e}),this.props.updateCurrentUserData({dashboard_sections:e})}},{key:"updateSection",value:function(e,t){var n=this.state.sections.map((function(n){return n.key===e?La({},n,{},t):n}));this.updateSections(n)}},{key:"onChangeHiddenBlocks",value:function(e){var t=this;return function(n){t.updateSection(e,{hiddenBlocks:n})}}},{key:"onSectionTitleUpdate",value:function(e){var t=this;return function(n){Object(an.b)("dash_section_rename",{key:e}),t.updateSection(e,{title:n})}}},{key:"toggleVisibility",value:function(e,t){var n=this;return function(){t&&t();var r=St()(n.state.sections),o=r.findIndex((function(t){return e===t.key})),c=r.splice(o,1).shift();c.isVisible=!c.isVisible,r.push(c),c.isVisible?Object(an.b)("dash_section_add",{key:c.key}):Object(an.b)("dash_section_remove",{key:c.key}),n.updateSections(r)}}},{key:"onMove",value:function(e,t){var n=St()(this.state.sections),r=n.splice(e,1).shift(),o=e+t;if(n[t<0?o:o-1].isVisible||0===e||e===n.length-1){n.splice(o,0,r),this.updateSections(n);var c={key:r.key,direction:0<t?"down":"up"};Object(an.b)("dash_section_order_change",c)}else this.onMove(e,t+t)}},{key:"renderAddMore",value:function(){var e=this,t=this.state.sections.filter((function(e){return!1===e.isVisible}));return 0===t.length?null:Object(c.createElement)(Ao.a,{position:"top center",className:"woocommerce-dashboard-section__add-more",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(c.createElement)(Tt.a,{onClick:t,icon:"plus-alt",title:Object(_e.__)("Add more sections","woocommerce-admin"),"aria-expanded":n})},renderContent:function(n){var r=n.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,null,Object(_e.__)("Dashboard Sections","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-dashboard-section__add-more-choices"},t.map((function(t){return Object(c.createElement)(Ur.a,{key:t.key,onClick:e.toggleVisibility(t.key,r),className:"woocommerce-dashboard-section__add-more-btn",title:Object(_e.sprintf)(Object(_e.__)("Add %s section","woocommerce-admin"),t.title)},Object(c.createElement)(jo.a,{icon:t.icon,size:30}),Object(c.createElement)("span",{className:"woocommerce-dashboard-section__add-more-btn-title"},t.title))}))))}})}},{key:"render",value:function(){var e=this,t=this.props,n=t.query,r=t.path,o=t.taskListHidden,a=t.taskListCompleted,i=this.state.sections,l=i.filter((function(e){return e.isVisible})).map((function(e){return e.key}));if(Lc()&&wcSettings.onboarding&&!o&&(n.task||!a))return Object(c.createElement)(Ea,{query:n});var u=Ot(n),d=u.period,p=u.compare,m=u.before,b=u.after,h=yt(n),f={period:d,compare:p,before:m,after:b,primaryDate:h.primary,secondaryDate:h.secondary};return Object(c.createElement)(c.Fragment,null,Lc()&&wcSettings.onboarding&&!o&&a&&Object(c.createElement)(Ea,{query:n,inline:!0}),Object(c.createElement)(yn,{report:"dashboard",query:n,path:r,dateQuery:f,isoDateFormat:gt.isoDateFormat,filters:Na}),i.map((function(t,o){return t.isVisible?Object(c.createElement)(Yo,{component:t.component,hiddenBlocks:t.hiddenBlocks,key:t.key,onChangeHiddenBlocks:e.onChangeHiddenBlocks(t.key),onTitleUpdate:e.onSectionTitleUpdate(t.key),path:r,query:n,title:t.title,onMove:Object(s.partial)(e.onMove,o),onRemove:e.toggleVisibility(t.key),isFirst:t.key===l[0],isLast:t.key===l[l.length-1]}):null})),this.renderAddMore())}}]),t}(c.Component),qa=Object(ke.a)(rn((function(e,t){var n=e("wc-api"),r=n.getCurrentUserData,o=n.getProfileItems,c=n.getOptions,a={userPrefSections:r().dashboard_sections};if(Lc()){var i=Aa({profileItems:o(),options:c(["woocommerce_task_list_payments"]),query:t.query}),l=Object(s.filter)(i,(function(e){return e.visible})),u=Object(s.filter)(i,(function(e){return e.visible&&e.completed}));a.taskListCompleted=l.length===u.length,a.taskListHidden="yes"===Object(s.get)(c(["woocommerce_task_list_hidden"]),["woocommerce_task_list_hidden"],"no")}return a})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Sa),Ta={jetpack:Object(_e.__)("Jetpack","woocommerce-admin"),"woocommerce-services":Object(_e.__)("WooCommerce Services","woocommerce-admin"),"mailchimp-for-woocommerce":Object(_e.__)("Mailchimp for WooCommerce","woocommerce-admin"),"facebook-for-woocommerce":Object(_e.__)("Facebook for WooCommerce","woocommerce-admin"),"woocommerce-shipstation-integration":Object(_e.__)("WooCommerce ShipStation Gateway","woocommerce-admin"),"woocommerce-square":Object(_e.__)("WooCommerce Square","woocommerce-admin"),"kliken-marketing-for-google":Object(_e.__)("Google Shopping","woocommerce-admin")},xa=Object(ye.g)("wcAdminAssetUrl",""),Ba=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).call(this));var r=Object(s.get)(e,"profileItems",{}),o=Object(s.get)(r,"business_extensions",!1);return n.initialValues={other_platform:r.other_platform||"",product_count:r.product_count||"",selling_venues:r.selling_venues||"",revenue:r.revenue||"","facebook-for-woocommerce":!o||o.includes("facebook-for-woocommerce"),"mailchimp-for-woocommerce":!o||o.includes("mailchimp-for-woocommerce"),"kliken-marketing-for-google":!o||o.includes("kliken-marketing-for-google")},n.state={installExtensions:!1,isInstallingExtensions:!1,extensionInstallError:!1},n.extensions=["facebook-for-woocommerce","mailchimp-for-woocommerce","kliken-marketing-for-google"],n.onContinue=n.onContinue.bind(ft()(n)),n.validate=n.validate.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"onContinue",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a,i,s,l,u,d,p,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,r=n.createNotice,o=n.goToNextStep,c=n.isError,a=n.updateProfileItems,i=t.other_platform,s=t.product_count,l=t.revenue,u=t.selling_venues,d=this.getBusinessExtensions(t),Object(an.b)("storeprofiler_store_business_details_continue",{product_number:s,already_selling:"no"!==u,currency:ye.b.code,revenue:l,used_platform:i,install_facebook:t["facebook-for-woocommerce"],install_mailchimp:t["mailchimp-for-woocommerce"],install_google_ads:t["kliken-marketing-for-google"]}),p={other_platform:i,product_count:s,revenue:l,selling_venues:u,business_extensions:d},m={},Object.keys(p).forEach((function(e){""!==p[e]&&(m[e]=p[e])})),e.next=9,a(m);case 9:if(c){e.next=16;break}if(0!==d.length){e.next=13;break}return o(),e.abrupt("return");case 13:this.setState({installExtensions:!0,isInstallingExtensions:!0}),e.next=17;break;case 16:r("error",Object(_e.__)("There was a problem updating your business details.","woocommerce-admin"));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"validate",value:function(e){var t=this,n={};return Object.keys(e).map((function(r){"other_platform"===r?!e.other_platform.length&&["other","brick-mortar-other"].includes(e.selling_venues)&&(n.other_platform=Object(_e.__)("This field is required","woocommerce-admin")):"revenue"===r?!e.revenue.length&&["other","brick-mortar","brick-mortar-other","other-woocommerce"].includes(e.selling_venues)&&(n.revenue=Object(_e.__)("This field is required","woocommerce-admin")):t.extensions.includes(r)||e[r].length||(n[r]=Object(_e.__)("This field is required","woocommerce-admin"))})),n}},{key:"getBusinessExtensions",value:function(e){var t=this;return Object(s.keys)(Object(s.pickBy)(e)).filter((function(e){return t.extensions.includes(e)}))}},{key:"convertCurrency",value:function(e){var t=kc(this.props.settings.woocommerce_default_country);if("US"===t)return e;var n={US:1,EU:.9,IN:71.24,GB:.76,BR:4.19,VN:23172.5,ID:14031,BD:84.87,PK:154.8,RU:63.74,TR:5.75,MX:19.37,CA:1.32},r=n[t]||n.US,o=r.toString().split(".")[0].length,c=Math.pow(10,2+o);return Math.round(e*r/c)*c}},{key:"numberFormat",value:function(e){return Lt("number",e)}},{key:"getNumberRangeString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.numberFormat;return t?Object(_e.sprintf)(Object(_e._x)("%1$s - %2$s","store product count or revenue range","woocommerce-admin"),n(e),n(t)):Object(_e.sprintf)(Object(_e._x)("%s+","store product count or revenue","woocommerce-admin"),n(e))}},{key:"renderBusinessExtensionHelpText",value:function(e){var t=this.state.isInstallingExtensions,n=this.getBusinessExtensions(e);if(0===n.length)return null;var r=n.map((function(e){return Ta[e]})).join(", ");return t?Object(c.createElement)("p",null,Object(_e.sprintf)(Object(_e._n)("Installing the following plugin: %s","Installing the following plugins: %s",n.length,"woocommerce-admin"),r)):Object(c.createElement)("p",null,Object(_e.sprintf)(Object(_e._n)("The following plugin will be installed for free: %s","The following plugins will be installed for free: %s",n.length,"woocommerce-admin"),r))}},{key:"renderBusinessExtensions",value:function(e,t){var n=this,r=this.state,o=r.installExtensions,a=r.extensionInstallError,i=this.props.goToNextStep,s=this.getBusinessExtensions(e),l=[{slug:"facebook-for-woocommerce",title:Object(_e.__)("Market on Facebook","woocommerce-admin"),icon:"onboarding/facebook.png",description:Object(_e.__)("Grow your business by targeting the right people and driving sales with Facebook.","woocommerce-admin")},{slug:"mailchimp-for-woocommerce",title:Object(_e.__)("Contact customers with Mailchimp","woocommerce-admin"),icon:"onboarding/mailchimp.png",description:Object(_e.__)("Send targeted campaigns, recover abandoned carts and much more with Mailchimp.","woocommerce-admin")},{slug:"kliken-marketing-for-google",title:Object(_e.__)("Drive sales with Google Shopping","woocommerce-admin"),icon:"onboarding/google-ads.png",description:Object(_e.__)("Get in front of new customers on Google and secure $150 in ads credit with Kliken’s integration.","woocommerce-admin")}];return Object(c.createElement)(c.Fragment,null,l.map((function(n){return Object(c.createElement)("div",{className:"woocommerce-profile-wizard__benefit",key:n.title},Object(c.createElement)("div",{className:"woocommerce-profile-wizard__business-extension"},Object(c.createElement)("img",{src:xa+n.icon,alt:""})),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__benefit-content"},Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__benefit-title"},n.title),Object(c.createElement)("p",null,n.description)),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__benefit-toggle"},Object(c.createElement)($c.a,N()({checked:e[n.slug]},t(n.slug)))))})),o&&Object(c.createElement)("div",{className:"woocommerce-profile-wizard__card-actions"},Object(c.createElement)(Fc,{onComplete:function(){i()},onSkip:function(){i()},onError:function(){n.setState({extensionInstallError:!0,isInstallingExtensions:!1})},autoInstall:!a,pluginSlugs:s})))}},{key:"render",value:function(){var e=this,t=this.state,n=t.isInstallingExtensions,r=t.extensionInstallError,o=[{key:"0",label:Object(_e.__)("I don't have any products yet.","woocommerce-admin")},{key:"1-10",label:this.getNumberRangeString(1,10)},{key:"11-100",label:this.getNumberRangeString(11,100)},{key:"101-1000",label:this.getNumberRangeString(101,1e3)},{key:"1000+",label:this.getNumberRangeString(1e3)}],a=[{key:"none",label:Object(_e.sprintf)(Object(_e.__)("%s (I'm just getting started)","woocommerce-admin"),_t(0))},{key:"up-to-2500",label:Object(_e.sprintf)(Object(_e.__)("Up to %s","woocommerce-admin"),_t(this.convertCurrency(2500)))},{key:"2500-10000",label:this.getNumberRangeString(this.convertCurrency(2500),this.convertCurrency(1e4),_t)},{key:"10000-50000",label:this.getNumberRangeString(this.convertCurrency(1e4),this.convertCurrency(5e4),_t)},{key:"50000-250000",label:this.getNumberRangeString(this.convertCurrency(5e4),this.convertCurrency(25e4),_t)},{key:"more-than-250000",label:Object(_e.sprintf)(Object(_e.__)("More than %s","woocommerce-admin"),_t(this.convertCurrency(25e4)))}],i=[{key:"no",label:Object(_e.__)("No","woocommerce-admin")},{key:"other",label:Object(_e.__)("Yes, on another platform","woocommerce-admin")},{key:"other-woocommerce",label:Object(_e.__)("Yes, I own a different store powered by WooCommerce","woocommerce-admin")},{key:"brick-mortar",label:Object(_e.__)("Yes, in person at physical stores and/or events","woocommerce-admin")},{key:"brick-mortar-other",label:Object(_e.__)("Yes, on another platform and in person at physical stores and/or events","woocommerce-admin")}],s=[{key:"shopify",label:Object(_e.__)("Shopify","woocommerce-admin")},{key:"bigcommerce",label:Object(_e.__)("BigCommerce","woocommerce-admin")},{key:"magento",label:Object(_e.__)("Magento","woocommerce-admin")},{key:"wix",label:Object(_e.__)("Wix","woocommerce-admin")},{key:"other",label:Object(_e.__)("Other","woocommerce-admin")}];return Object(c.createElement)(I.Form,{initialValues:this.initialValues,onSubmitCallback:this.onContinue,validate:this.validate},(function(t){var l=t.getInputProps,u=t.handleSubmit,d=t.values,p=t.isValidForm,m=""!==d.selling_venues;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("Tell us about your business","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("We'd love to know if you are just getting started or you already have a business in place.","woocommerce-admin")),Object(c.createElement)(I.Card,null,Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SelectControl,N()({label:Object(_e.__)("How many products do you plan to sell?","woocommerce-admin"),options:o,required:!0},l("product_count"))),Object(c.createElement)(I.SelectControl,N()({label:Object(_e.__)("Currently selling elsewhere?","woocommerce-admin"),options:i,required:!0},l("selling_venues"))),["other","brick-mortar","brick-mortar-other","other-woocommerce"].includes(d.selling_venues)&&Object(c.createElement)(I.SelectControl,N()({label:Object(_e.__)("What's your current annual revenue?","woocommerce-admin"),options:a,required:!0},l("revenue"))),["other","brick-mortar-other"].includes(d.selling_venues)&&Object(c.createElement)(I.SelectControl,N()({label:Object(_e.__)("Which platform is the store using?","woocommerce-admin"),options:s,required:!0},l("other_platform"))),m&&e.renderBusinessExtensions(d,l),!r&&Object(c.createElement)(Ur.a,{isPrimary:!0,className:"woocommerce-profile-wizard__continue",onClick:u,disabled:!p,isBusy:n},Object(_e.__)("Continue","woocommerce-admin")))),m&&e.renderBusinessExtensionHelpText(d))}))}}]),t}(c.Component),Ra=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItems,r=t.getProfileItemsError,o=(0,t.getSettings)("general");return{isError:Boolean(r()),profileItems:n(),settings:o}})),Object(a.withDispatch)((function(e){var t=e("wc-api").updateProfileItems;return{createNotice:e("core/notices").createNotice,updateProfileItems:t}})))(Ba),Pa=Object(ye.g)("onboarding",{}),Wa=function(e){function t(e){var n;x()(this,t);var r=Object(s.get)(e,"profileItems",{});return(n=W()(this,H()(t).call(this))).state={error:null,selected:r.industry||[],textInputListContent:{}},n.onContinue=n.onContinue.bind(ft()(n)),n.onIndustryChange=n.onIndustryChange.bind(ft()(n)),n.onDetailChange=n.onDetailChange.bind(ft()(n)),n}var n,r;return V()(t,e),R()(t,[{key:"onContinue",value:(r=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.validateField();case 2:if(!this.state.error){e.next=4;break}return e.abrupt("return");case 4:return t=this.props,n=t.createNotice,r=t.goToNextStep,o=t.isError,c=t.updateProfileItems,a=this.state.selected.map((function(e){return e.slug})),i=Object(s.filter)(this.state.selected,(function(e){return void 0!==e.detail})),Object(an.b)("storeprofiler_store_industry_continue",{store_industry:a,industries_with_detail:i}),e.next=10,c({industry:this.state.selected});case 10:o?n("error",Object(_e.__)("There was a problem updating your industries.","woocommerce-admin")):r();case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"validateField",value:(n=gr()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.state.selected.length?null:Object(_e.__)("Please select at least one industry","woocommerce-admin"),this.setState({error:t});case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onIndustryChange",value:function(e){var t=this;this.setState((function(t){var n=t.selected,r=Object(s.find)(n,{slug:e});if(r){var o=t.textInputListContent;return o[e]=r.detail,{selected:Object(s.filter)(t.selected,(function(t){return t.slug!==e}))||[],textInputListContent:o}}return n.push({slug:e,detail:t.textInputListContent[e]}),{selected:n}}),(function(){return t.validateField()}))}},{key:"onDetailChange",value:function(e,t){this.setState((function(n){var r=n.selected,o=n.textInputListContent;return r[Object(s.findIndex)(r,{slug:t})].detail=e,o[t]=e,{selected:r,textInputListContent:o}}))}},{key:"render",value:function(){var e=this,t=Pa.industries,n=this.state,r=n.error,o=n.selected,a=n.textInputListContent;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("In which industry does the store operate?","woocommerce-admin")),Object(c.createElement)("p",{className:"woocommerce-profile-wizard__intro-paragraph"},Object(_e.__)("Choose any that apply")),Object(c.createElement)(I.Card,null,Object(c.createElement)("div",{className:"woocommerce-profile-wizard__checkbox-group"},Object.keys(t).map((function(n){var r=Object(s.find)(o,{slug:n});return Object(c.createElement)("div",{key:"div-".concat(n)},Object(c.createElement)(qt.a,{key:"checkbox-control-".concat(n),label:t[n].label,onChange:function(){return e.onIndustryChange(n)},checked:r||!1,className:"woocommerce-profile-wizard__checkbox"}),t[n].use_description&&r&&Object(c.createElement)(I.TextControl,{key:"text-control-".concat(r.slug),label:t[r.slug].description_label,value:r.detail||a[n]||"",onChange:function(t){return e.onDetailChange(t,r.slug)},className:"woocommerce-profile-wizard__text"}))})),r&&Object(c.createElement)("span",{className:"woocommerce-profile-wizard__error"},r)),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:this.onContinue,disabled:!o.length},Object(_e.__)("Continue","woocommerce-admin"))))}}]),t}(c.Component),Da=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItems,r=t.getProfileItemsError;return{isError:Boolean(r()),profileItems:n()}})),Object(a.withDispatch)((function(e){var t=e("wc-api").updateProfileItems;return{createNotice:e("core/notices").createNotice,updateProfileItems:t}})))(Wa),Ha=Object(ye.g)("onboarding",{}).activePlugins,Xa=void 0===Ha?[]:Ha,Va=Object(s.difference)(["jetpack","woocommerce-services"],Xa),Ia=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).state={step:"install"},e.activatePlugins=e.activatePlugins.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=this.props.isJetpackConnected;if(0===Va.length&&e)return Object(Oe.updateQueryString)({step:"store-details"});this.props.installPlugins(Va)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.createNotice,r=t.errors,o=t.installedPlugins,c=t.activatedPlugins,a=t.jetpackConnectUrl,i=t.isJetpackConnected;if(a&&(window.location=a),Object(s.difference)(r,e.errors).map((function(e){return n("error",e)})),e.installedPlugins.length!==Va.length&&o.length===Va.length&&this.setState({step:"activate"}),!Va.includes("jetpack")&&e.activatedPlugins.length!==Va.length&&c.length===Va.length&&i)return Object(Oe.updateQueryString)({step:"store-details"})}},{key:"activatePlugins",value:(n=gr()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),!this.props.isRequesting){e.next=4;break}return e.abrupt("return",!1);case 4:Object(an.b)("storeprofiler_install_plugin"),this.props.activatePlugins(Va);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.hasErrors,n=e.isRequesting,r=e.isJetpackConnected,o=e.jetpackConnectUrl,a=this.state.step;if(0===Va.length&&!r)return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("Connecting your store","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("You will be redirected to WordPress.com to continue connecting your site.","woocommerce-admin")," "));var i=Va.map((function(e){return Ta[e]})).join(" & "),s=n||!r&&null!==o;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("Enhance your store setup","woocommerce-admin")),Object(c.createElement)(I.Card,{className:"woocommerce-profile-wizard__plugins-card"},Object(c.createElement)(I.Stepper,{isVertical:!0,currentStep:a,isPending:n&&!t,steps:[{label:Object(_e.sprintf)(Object(_e.__)("Install %s","woocommerce-admin"),i),key:"install"},{label:Object(_e.sprintf)(Object(_e.__)("Activate %s","woocommerce-admin"),i),key:"activate"}]}),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__plugins-actions"},t&&Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){return location.reload()}},Object(_e.__)("Retry","woocommerce-admin")),!t&&"activate"===a&&Object(c.createElement)(Ur.a,{isPrimary:!0,isBusy:s,onClick:this.activatePlugins},Object(_e.__)("Activate & continue","woocommerce-admin")))))}}]),t}(c.Component),Fa=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getJetpackConnectUrl,r=t.isGetJetpackConnectUrlRequesting,o=t.getJetpackConnectUrlError,c=t.getPluginInstallations,a=t.getPluginInstallationErrors,i=t.getPluginActivations,s=t.getPluginActivationErrors,l=t.isPluginActivateRequesting,u=t.isPluginInstallRequesting,d=t.isJetpackConnected,p=s(Va),m=Object.keys(i(Va)),b=a(Va),h=Object.keys(c(Va)),f={redirect_url:Object(ye.f)(Object(Oe.getNewPath)({step:"store-details"}))},g=null,v=!1,M=null;(m.includes("jetpack")||0===Va.length&&!d()||m.includes("woocommerce-services")&&!d())&&(v=r(f),g=n(f),M=o(f));var O=[];Object.keys(p).map((function(e){return O.push(p[e].message)})),Object.keys(b).map((function(e){return O.push(b[e].message)})),M&&O.push(M.message);var y=Boolean(O.length),w=l()||u()||v;return{activatedPlugins:m,installedPlugins:h,jetpackConnectUrl:g,isJetpackConnectUrlRequesting:v,errors:O,hasErrors:y,isRequesting:w,isJetpackConnected:d()}})),Object(a.withDispatch)((function(e){var t=e("core/notices").createNotice,n=e("wc-api");return{activatePlugins:n.activatePlugins,createNotice:t,installPlugins:n.installPlugins}})))(Ia),Ua=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).call(this));var r=Object(s.get)(e,"profileItems",{});return n.state={error:null,selected:r.product_types||[]},n.onContinue=n.onContinue.bind(ft()(n)),n.onChange=n.onChange.bind(ft()(n)),n}var n,r;return V()(t,e),R()(t,[{key:"validateField",value:(r=gr()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.state.selected.length?null:Object(_e.__)("Please select at least one product type","woocommerce-admin"),this.setState({error:t});case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onContinue",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.validateField();case 2:if(!this.state.error){e.next=4;break}return e.abrupt("return");case 4:return t=this.props,n=t.createNotice,r=t.goToNextStep,o=t.isError,c=t.updateProfileItems,Object(an.b)("storeprofiler_store_product_type_continue",{product_type:this.state.selected}),e.next=8,c({product_types:this.state.selected});case 8:o?n("error",Object(_e.__)("There was a problem updating your product types.","woocommerce-admin")):r();case 9:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onChange",value:function(e){var t=this;this.setState((function(t){if(Object(s.includes)(t.selected,e))return{selected:Object(s.filter)(t.selected,(function(t){return t!==e}))||[]};var n=t.selected;return n.push(e),{selected:n}}),(function(){return t.validateField()}))}},{key:"onLearnMore",value:function(e){Object(an.b)("storeprofiler_store_product_type_learn_more",{product_type:e})}},{key:"render",value:function(){var e=this,t=Object(ye.g)("onboarding",{}).productTypes,n=void 0===t?{}:t,r=this.state,o=r.error,a=r.selected;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("What type of products will be listed?","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("Choose any that apply")),Object(c.createElement)(I.Card,null,Object(c.createElement)("div",{className:"woocommerce-profile-wizard__checkbox-group"},Object.keys(n).map((function(t){var r=n[t].description&&Qr()({mixedString:n[t].description+(n[t].more_url?" {{moreLink/}}":""),components:{moreLink:n[t].more_url?Object(c.createElement)(I.Link,{href:n[t].more_url,target:"_blank",type:"external",onClick:function(){return e.onLearnMore(t)}},Object(_e.__)("Learn more","woocommerce-admin")):""}});return Object(c.createElement)(qt.a,{key:t,label:n[t].label,help:r,onChange:function(){return e.onChange(t)},checked:a.includes(t),className:"woocommerce-profile-wizard__checkbox"})})),o&&Object(c.createElement)("span",{className:"woocommerce-profile-wizard__error"},o)),Object(c.createElement)(Ur.a,{isPrimary:!0,className:"woocommerce-profile-wizard__continue",onClick:this.onContinue,disabled:!a.length},Object(_e.__)("Continue","woocommerce-admin"))))}}]),t}(c.Component),Ga=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItems,r=t.getProfileItemsError;return{isError:Boolean(r()),profileItems:n()}})),Object(a.withDispatch)((function(e){var t=e("wc-api").updateProfileItems;return{createNotice:e("core/notices").createNotice,updateProfileItems:t}})))(Ua),Qa=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props.isJetpackConnected,t=e?Object(_e.__)("WooCommerce","woocommerce-admin"):Object(_e.__)("Jetpack + WooCommerce","woocommerce-admin"),n=Rt()("woocommerce-profile-wizard__header-logo",{"woocommerce-profile-wizard__header-logo-with-jetpack":!e});return Object(c.createElement)("svg",{role:"img","aria-label":t,width:"200",viewBox:"0 0 1270 170",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:n},Object(c.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,!e&&Object(c.createElement)("g",{transform:"translate(219 35.082353)",className:"woocommerce-profile-wizard__plus"},Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"72",width:"72",fill:"#2B2D2F"},Object(c.createElement)("g",{xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})))),Object(c.createElement)("g",{fillRule:"nonzero",transform:"translate(360)"},Object(c.createElement)("path",{d:"M23.7,0.2 L222.8,0.2 C235.4,0.2 245.6,10.4 245.6,23 L245.6,99 C245.6,111.6 235.4,121.8 222.8,121.8 L151.4,121.8 L161.2,145.8 L118.1,121.8 L23.8,121.8 C11.2,121.8 1,111.6 1,99 L1,23 C0.9,10.5 11.1,0.2 23.7,0.2 Z",id:"Shape",fill:"#2B2D2F"}),Object(c.createElement)("path",{d:"M13.2,20.9 C14.6,19 16.7,18 19.5,17.8 C24.6,17.4 27.5,19.8 28.2,25 C31.3,45.9 34.7,63.6 38.3,78.1 L60.2,36.4 C62.2,32.6 64.7,30.6 67.7,30.4 C72.1,30.1 74.8,32.9 75.9,38.8 C78.4,52.1 81.6,63.4 85.4,73 C88,47.6 92.4,29.3 98.6,18 C100.1,15.2 102.3,13.8 105.2,13.6 C107.5,13.4 109.6,14.1 111.5,15.6 C113.4,17.1 114.4,19 114.6,21.3 C114.7,23.1 114.4,24.6 113.6,26.1 C109.7,33.3 106.5,45.4 103.9,62.2 C101.4,78.5 100.5,91.2 101.1,100.3 C101.3,102.8 100.9,105 99.9,106.9 C98.7,109.1 96.9,110.3 94.6,110.5 C92,110.7 89.3,109.5 86.7,106.8 C77.4,97.3 70,83.1 64.6,64.2 C58.1,77 53.3,86.6 50.2,93 C44.3,104.3 39.3,110.1 35.1,110.4 C32.4,110.6 30.1,108.3 28.1,103.5 C23,90.4 17.5,65.1 11.6,27.6 C11.3,25 11.8,22.7 13.2,20.9 Z",id:"Shape",fill:"#F6F6F6",fillRule:"nonzero"}),Object(c.createElement)("path",{d:"M228.2,36.6 C224.6,30.3 219.3,26.5 212.2,25 C210.3,24.6 208.5,24.4 206.8,24.4 C197.2,24.4 189.4,29.4 183.3,39.4 C178.1,47.9 175.5,57.3 175.5,67.6 C175.5,75.3 177.1,81.9 180.3,87.4 C183.9,93.7 189.2,97.5 196.3,99 C198.2,99.4 200,99.6 201.7,99.6 C211.4,99.6 219.2,94.6 225.2,84.6 C230.4,76 233,66.6 233,56.3 C233,48.5 231.4,42 228.2,36.6 Z M215.6,64.3 C214.2,70.9 211.7,75.8 208,79.1 C205.1,81.7 202.4,82.8 199.9,82.3 C197.5,81.8 195.5,79.7 194,75.8 C192.8,72.7 192.2,69.6 192.2,66.7 C192.2,64.2 192.4,61.7 192.9,59.4 C193.8,55.3 195.5,51.3 198.2,47.5 C201.5,42.6 205,40.6 208.6,41.3 C211,41.8 213,43.9 214.5,47.8 C215.7,50.9 216.3,54 216.3,56.9 C216.3,59.5 216,62 215.6,64.3 Z",id:"Shape",fill:"#F6F6F6",fillRule:"nonzero"}),Object(c.createElement)("path",{d:"M165.5,36.6 C161.9,30.3 156.5,26.5 149.5,25 C147.6,24.6 145.8,24.4 144.1,24.4 C134.5,24.4 126.7,29.4 120.6,39.4 C115.4,47.9 112.8,57.3 112.8,67.6 C112.8,75.3 114.4,81.9 117.6,87.4 C121.2,93.7 126.5,97.5 133.6,99 C135.5,99.4 137.3,99.6 139,99.6 C148.7,99.6 156.5,94.6 162.5,84.6 C167.7,76 170.3,66.6 170.3,56.3 C170.3,48.5 168.7,42 165.5,36.6 Z M152.9,64.3 C151.5,70.9 149,75.8 145.3,79.1 C142.4,81.7 139.7,82.8 137.2,82.3 C134.8,81.8 132.8,79.7 131.3,75.8 C130.1,72.7 129.5,69.6 129.5,66.7 C129.5,64.2 129.7,61.7 130.2,59.4 C131.1,55.3 132.8,51.3 135.5,47.5 C138.8,42.6 142.3,40.6 145.9,41.3 C148.3,41.8 150.3,43.9 151.8,47.8 C153,50.9 153.6,54 153.6,56.9 C153.6,59.5 153.4,62 152.9,64.3 Z",id:"Shape",fill:"#F6F6F6",fillRule:"nonzero"})),!e&&Object(c.createElement)("svg",{height:"150",width:"150",viewBox:"0 0 32 32"},Object(c.createElement)("path",{fill:"#2B2D2F",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),Object(c.createElement)("polygon",{fill:"#F6F6F6",points:"15,19 7,19 15,3 "}),Object(c.createElement)("polygon",{fill:"#F6F6F6",points:"17,29 17,13 25,13 "}))))))}}]),t}(c.Component),Ka=Object(ke.a)(rn((function(e){return{isJetpackConnected:(0,e("wc-api").isJetpackConnected)()}})))(Qa),$a=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"renderStepper",value:function(){var e=this.props,t=e.currentStep,n=e.steps,r=Object(s.filter)(n,(function(e){return!!e.label})),o=r.findIndex((function(e){return e.key===t}));return r.map((function(e,t){var n=r[t-1];return t<o&&(e.isComplete=!0),n&&!n.isComplete||(e.onClick=function(e){return Object(Oe.updateQueryString)({step:e})}),e})),Object(c.createElement)(I.Stepper,{steps:r,currentStep:t})}},{key:"render",value:function(){var e=this,t=this.props.steps.find((function(t){return t.key===e.props.currentStep})),n=!(!t||!t.label),r=Rt()("woocommerce-profile-wizard__header",{"is-stepper":n});return Object(c.createElement)("div",{className:r},n?this.renderStepper():Object(c.createElement)(Ka,null))}}]),t}(c.Component),Ja=function(){return Object(c.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("g",null,Object(c.createElement)("mask",{id:"card_mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"4",width:"20",height:"16"},Object(c.createElement)("path",{id:"icon/action/payment_24px_2",fillRule:"evenodd",clipRule:"evenodd",d:"M20 4H4C2.89 4 2.01 4.89 2.01 6L2 18C2 19.11 2.89 20 4 20H20C21.11 20 22 19.11 22 18V6C22 4.89 21.11 4 20 4ZM20 18H4V12H20V18ZM4 8H20V6H4V8Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#card_mask)"},Object(c.createElement)("g",null,Object(c.createElement)("rect",{width:"24",height:"24",fill:"#50575D"})))))},Za=function(){return Object(c.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("mask",{id:"security_mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"1",width:"18",height:"22"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5L12 1L21 5V11C21 16.55 17.16 21.74 12 23C6.84 21.74 3 16.55 3 11V5ZM19 11.99H12V3.19L5 6.3V12H12V20.93C15.72 19.78 18.47 16.11 19 11.99Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#security_mask)"},Object(c.createElement)("rect",{width:"24",height:"24",fill:"#50575D"})))},Ya=function(){return Object(c.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("mask",{id:"local_atm_mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"4",width:"20",height:"16"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 4H4C2.89 4 2.01 4.89 2.01 6L2 18C2 19.11 2.89 20 4 20H20C21.11 20 22 19.11 22 18V6C22 4.89 21.11 4 20 4ZM11 17H13V16H14C14.55 16 15 15.55 15 15V12C15 11.45 14.55 11 14 11H11V10H15V8H13V7H11V8H10C9.45 8 9 8.45 9 9V12C9 12.55 9.45 13 10 13H13V14H9V16H11V17ZM4 18H20V6H4V18Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#local_atm_mask)"},Object(c.createElement)("rect",{width:"24",height:"24",fill:"#50575D"})))},ei=function(){return Object(c.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("mask",{id:"flash_on_mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"7",y:"2",width:"10",height:"20"},Object(c.createElement)("path",{d:"M7 2V13H10V22L17 10H13L16 2H7Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#flash_on_mask)"},Object(c.createElement)("rect",{width:"24",height:"24",fill:"#50575D"})))},ti=function(){return Object(c.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("mask",{id:"phone_android_mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"5",y:"1",width:"14",height:"22"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 1H8C6.34 1 5 2.34 5 4V20C5 21.66 6.34 23 8 23H16C17.66 23 19 21.66 19 20V4C19 2.34 17.66 1 16 1ZM14 21H10V20H14V21ZM7 18H17V4H7V18Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#phone_android_mask)"},Object(c.createElement)("rect",{width:"24",height:"24",fill:"#50575D"})))},ni=function(){return Object(c.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("g",null,Object(c.createElement)("mask",{id:"print_mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"20",height:"18"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 8H18V3H6V8H5C3.34 8 2 9.34 2 11V17H6V21H18V17H22V11C22 9.34 20.66 8 19 8ZM8 5H16V8H8V5ZM16 19V17V15H8V19H16ZM18 15V13H6V15H4V11C4 10.45 4.45 10 5 10H19C19.55 10 20 10.45 20 11V15H18ZM17 11.5C17 10.9477 17.4477 10.5 18 10.5C18.5523 10.5 19 10.9477 19 11.5C19 12.0523 18.5523 12.5 18 12.5C17.4477 12.5 17 12.0523 17 11.5Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#print_mask)"},Object(c.createElement)("g",null,Object(c.createElement)("rect",{width:"24",height:"24",fill:"#50575D"})))))},ri=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={allowTracking:e.allowTracking},n.onTrackingChange=n.onTrackingChange.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"onTrackingChange",value:function(){this.setState({allowTracking:!this.state.allowTracking})}},{key:"componentDidUpdate",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a,i,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.props,r=n.hasErrors,o=n.isRequesting,c=n.onClose,a=n.onContinue,i=n.createNotice,s=!o&&t.isRequesting&&!r,l=!o&&t.isRequesting&&r,s&&(c(),a()),l&&(i("error",Object(_e.__)("There was a problem updating your preferences.","woocommerce-admin")),c());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"updateTracking",value:function(){(0,this.props.updateOptions)({woocommerce_allow_tracking:this.state.allowTracking?"yes":"no"})}},{key:"render",value:function(){var e=this,t=this.state.allowTracking,n=this.props.isRequesting,r=Qr()({mixedString:Object(_e.__)("Get improved features and faster fixes by sharing non-sensitive data via {{link}}usage tracking{{/link}} that shows us how WooCommerce is used. No personal data is tracked or stored.","woocommerce-admin"),components:{link:Object(c.createElement)(I.Link,{href:"https://woocommerce.com/usage-tracking",target:"_blank",type:"external"})}});return Object(c.createElement)(Ac,{title:Object(_e.__)("Build a Better WooCommerce","woocommerce-admin"),onRequestClose:function(){return e.props.onClose()},className:"woocommerce-profile-wizard__usage-modal"},Object(c.createElement)("div",{className:"woocommerce-profile-wizard__usage-wrapper"},Object(c.createElement)("div",{className:"woocommerce-profile-wizard__usage-modal-message"},r),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__tracking"},Object(c.createElement)(qt.a,{className:"woocommerce-profile-wizard__tracking-checkbox",checked:t,label:Object(_e.__)("Yes, count me in!","woocommerce-admin"),onChange:this.onTrackingChange}),Object(c.createElement)($c.a,{"aria-hidden":"true",checked:t,onChange:this.onTrackingChange,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"})),Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,isBusy:n,onClick:function(){return e.updateTracking()}},Object(_e.__)("Continue","woocommerce-admin"))))}}]),t}(c.Component),oi=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getOptions,r=t.getOptionsError,o=t.isUpdateOptionsRequesting,c=n(["woocommerce_allow_tracking"]);return{allowTracking:"yes"===Object(s.get)(c,["woocommerce_allow_tracking"],!1),isRequesting:Boolean(o(["woocommerce_allow_tracking"])),hasErrors:Boolean(r(["woocommerce_allow_tracking"]))}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(ri),ci=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={showUsageModal:!1,continueAction:""},n.startWizard=n.startWizard.bind(ft()(n)),n.skipWizard=n.skipWizard.bind(ft()(n)),n}var n,r;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.updateProfileItems,n=e.profileItems,r=e.tosAccepted;if(e.isJetpackConnected&&this.props.activePlugins.includes("woocommerce-services")&&r)return"already-installed"!==n.plugins&&Object(an.b)("wcadmin_storeprofiler_already_installed_plugins",{}),t({plugins:"already-installed"}),Object(Oe.updateQueryString)({step:"store-details"})}},{key:"skipWizard",value:(r=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.createNotice,r=t.isProfileItemsError,o=t.updateProfileItems,c=t.isJetpackConnected,a=c?"skipped-wcs":"skipped",e.next=4,o({plugins:a});case 4:if(!r){e.next=8;break}n("error",Object(_e.__)("There was a problem updating your preferences.","woocommerce-admin")),e.next=10;break;case 8:return Object(an.b)("storeprofiler_welcome_clicked",{get_started:!0,plugins:a}),e.abrupt("return",Object(Oe.updateQueryString)({step:"store-details"}));case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"startWizard",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r,o,c,a,i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.createNotice,r=t.isProfileItemsError,o=t.updateProfileItems,c=t.updateOptions,a=t.goToNextStep,i=t.isJetpackConnected,e.next=3,c({woocommerce_setup_jetpack_opted_in:!0});case 3:return s=i?"installed-wcs":"installed",e.next=6,o({plugins:s});case 6:r?n("error",Object(_e.__)("There was a problem updating your preferences.","woocommerce-admin")):(Object(an.b)("storeprofiler_welcome_clicked",{get_started:!0,plugins:s}),a());case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"renderBenefit",value:function(e){var t=e.description,n=e.icon,r=e.title;return Object(c.createElement)("div",{className:"woocommerce-profile-wizard__benefit",key:r},n,Object(c.createElement)("div",{className:"woocommerce-profile-wizard__benefit-content"},Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__benefit-title"},r),Object(c.createElement)("p",null,t)))}},{key:"getBenefits",value:function(){var e=this.props,t=e.activePlugins,n=e.isJetpackConnected,r=e.tosAccepted;return[{title:Object(_e.__)("Security","woocommerce-admin"),icon:Object(c.createElement)(Za,null),description:Object(_e.__)("Jetpack automatically blocks brute force attacks to protect your store from unauthorized access.","woocommerce-admin"),visible:!n},{title:Object(_e.__)("Sales Tax","woocommerce-admin"),icon:Object(c.createElement)(Ya,null),description:Object(_e.__)("With WooCommerce Services we ensure that the correct rate of tax is charged on all of your orders.","woocommerce-admin"),visible:!t.includes("woocommerce-services")||!r},{title:Object(_e.__)("Speed","woocommerce-admin"),icon:Object(c.createElement)(ei,null),description:Object(_e.__)("Cache your images and static files on our own powerful global network of servers and speed up your site.","woocommerce-admin"),visible:!n},{title:Object(_e.__)("Mobile App","woocommerce-admin"),icon:Object(c.createElement)(ti,null),description:Object(_e.__)("Your store in your pocket. Manage orders, receive sales notifications, and more. Only with a Jetpack connection.","woocommerce-admin"),visible:!n},{title:Object(_e.__)("Print your own shipping labels","woocommerce-admin"),icon:Object(c.createElement)(ni,null),description:Object(_e.__)("Save time at the Post Office by printing USPS shipping labels at home.","woocommerce-admin"),visible:n||!r},{title:Object(_e.__)("Simple payment setup","woocommerce-admin"),icon:Object(c.createElement)(Ja,null),description:Object(_e.__)("WooCommerce Services enables us to provision Stripe and Paypal accounts quickly and easily for you.","woocommerce-admin"),visible:n||!r}]}},{key:"renderBenefits",value:function(){var e=this;return Object(c.createElement)("div",{className:"woocommerce-profile-wizard__benefits"},Object(s.filter)(this.getBenefits(),(function(e){return e.visible})).map((function(t){return e.renderBenefit(t)})))}},{key:"render",value:function(){var e=this,t=this.state,n=t.showUsageModal,r=t.continueAction,o=this.props,a=o.isJetpackConnected,i=o.activePlugins,s=[];a||s.push("jetpack"),i.includes("woocommerce-services")||s.push("woocommerce-services");var l=s.map((function(e){return Ta[e]})).join(" & ");return Object(c.createElement)(c.Fragment,null,n&&Object(c.createElement)(oi,{onContinue:function(){return"wizard"===r?e.startWizard():e.skipWizard()},onClose:function(){return e.setState({showUsageModal:!1,continueAction:""})}}),Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("Start setting up your WooCommerce store","woocommerce-admin")),Object(c.createElement)("p",null,Qr()({mixedString:Object(_e.sprintf)(Object(_e.__)("Simplify and enhance the setup of your store with the free features and benefits offered by {{strong}}%s{{/strong}}.","woocommerce-admin"),l),components:{strong:Object(c.createElement)("strong",null)}})),Object(c.createElement)(I.Card,null,this.renderBenefits(),Object(c.createElement)("p",{className:"woocommerce-profile-wizard__tos"},Qr()({mixedString:Object(_e.__)("By connecting your site you agree to our fascinating {{tosLink}}Terms of Service{{/tosLink}} and to {{detailsLink}}share details{{/detailsLink}} with WordPress.com. ","woocommerce-admin"),components:{tosLink:Object(c.createElement)(I.Link,{href:"https://wordpress.com/tos",target:"_blank",type:"external"}),detailsLink:Object(c.createElement)(I.Link,{href:"https://jetpack.com/support/what-data-does-jetpack-sync",target:"_blank",type:"external"})}})),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){return e.setState({showUsageModal:!0,continueAction:"wizard"})},className:"woocommerce-profile-wizard__continue"},Object(_e.__)("Get started","woocommerce-admin"))),0!==s.length&&Object(c.createElement)("p",null,Object(c.createElement)(Ur.a,{isLink:!0,className:"woocommerce-profile-wizard__skip",onClick:function(){return e.setState({showUsageModal:!0,continueAction:"skip"})}},Object(_e.sprintf)(Object(_e.__)("Proceed without %s","woocommerce-admin"),l))))}}]),t}(c.Component),ai=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItemsError,r=t.getActivePlugins,o=t.getOptions,c=t.getProfileItems,a=t.isJetpackConnected,i=Boolean(n()),l=o(["woocommerce_setup_jetpack_opted_in","wc_connect_options"]),u=Object(s.get)(l,["wc_connect_options"],{}).tos_accepted;return{isProfileItemsError:i,activePlugins:r(),tosAccepted:u,profileItems:c(),isJetpackConnected:a()}})),Object(a.withDispatch)((function(e){var t=e("wc-api"),n=t.updateProfileItems,r=t.updateOptions;return{createNotice:e("core/notices").createNotice,updateProfileItems:n,updateOptions:r}})))(ci),ii=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).apply(this,arguments));var r=e.profileItems,o=e.settings;n.state={showUsageModal:!1};var c=o.woocommerce_store_address&&o.woocommerce_default_country||"";return n.initialValues={addressLine1:o.woocommerce_store_address||"",addressLine2:o.woocommerce_store_address_2||"",city:o.woocommerce_store_city||"",countryState:c,postCode:o.woocommerce_store_postcode||"",isClient:r.setup_client||!1},n.onContinue=n.onContinue.bind(ft()(n)),n.onSubmit=n.onSubmit.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"componentWillUnmount",value:function(){Le()({path:"/wc-admin/onboarding/tasks/create_store_pages",method:"POST"})}},{key:"deriveCurrencySettings",value:function(e){if(!e)return null;var t=kc(e),n=Object(wt.getCurrencyData)();return n[t]||n.US}},{key:"onSubmit",value:function(e){"already-installed"!==this.props.profileItems.plugins?this.onContinue(e):this.setState({showUsageModal:!0})}},{key:"onContinue",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a,i,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,r=n.createNotice,o=n.goToNextStep,c=n.isSettingsError,a=n.updateSettings,i=n.updateProfileItems,s=n.isProfileItemsError,l=this.deriveCurrencySettings(t.countryState),Et(l),Object(an.b)("storeprofiler_store_details_continue",{store_country:jc(t.countryState),derived_currency:l.code,setup_client:t.isClient}),e.next=6,a({general:{woocommerce_store_address:t.addressLine1,woocommerce_store_address_2:t.addressLine2,woocommerce_default_country:t.countryState,woocommerce_store_city:t.city,woocommerce_store_postcode:t.postCode,woocommerce_currency:l.code,woocommerce_currency_pos:l.symbolPosition,woocommerce_price_thousand_sep:l.thousandSeparator,woocommerce_price_decimal_sep:l.decimalSeparator,woocommerce_price_num_decimals:l.precision}});case 6:return e.next=8,i({setup_client:t.isClient});case 8:c||s?r("error",Object(_e.__)("There was a problem saving your store details.","woocommerce-admin")):o();case 9:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state.showUsageModal;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("Where is your store based?","woocommerce-admin")),Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-subtitle"},Object(_e.__)("This will help us configure your store and get you started quickly","woocommerce-admin")),Object(c.createElement)(I.Card,null,Object(c.createElement)(I.Form,{initialValues:this.initialValues,onSubmitCallback:this.onSubmit,validate:Gc},(function(n){var r=n.getInputProps,o=n.handleSubmit,a=n.values,i=n.isValidForm,s=n.setValue;return Object(c.createElement)(c.Fragment,null,t&&Object(c.createElement)(oi,{onContinue:function(){return e.onContinue(a)},onClose:function(){return e.setState({showUsageModal:!1})}}),Object(c.createElement)(Qc,{getInputProps:r,setValue:s}),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__client"},Object(c.createElement)(qt.a,N()({label:Object(_e.__)("I'm setting up a store for a client","woocommerce-admin")},r("isClient")))),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:o,disabled:!i},Object(_e.__)("Continue","woocommerce-admin")))}))))}}]),t}(c.Component),si=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getSettings,r=t.getSettingsError,o=t.isGetSettingsRequesting,c=t.getProfileItemsError,a=t.getProfileItems,i=n("general"),s=Boolean(r("general")),l=o("general"),u=a();return{getSettings:n,isProfileItemsError:Boolean(c()),profileItems:u,isSettingsError:s,isSettingsRequesting:l,settings:i}})),Object(a.withDispatch)((function(e){var t=e("core/notices").createNotice,n=e("wc-api");return{createNotice:t,updateSettings:n.updateSettings,updateProfileItems:n.updateProfileItems}})))(ii),li=n(407),ui=(n(406),Object(c.createContext)({addDropZone:function(){},removeDropZone:function(){}})),di=ui.Provider,pi=ui.Consumer,mi=function(e){var t=e.dataTransfer;if(t){if(Object(s.includes)(t.types,"Files"))return"file";if(Object(s.includes)(t.types,"text/html"))return"html"}return"default"},bi=function(e,t){return"file"===e&&t.onFilesDrop||"html"===e&&t.onHTMLDrop||"default"===e&&t.onDrop},hi=function(e){function t(){var e;return Object(nc.a)(this,t),(e=Object(oc.a)(this,Object(cc.a)(t).apply(this,arguments))).onDragOver=e.onDragOver.bind(Object(lc.a)(e)),e.onDrop=e.onDrop.bind(Object(lc.a)(e)),e.addDropZone=e.addDropZone.bind(Object(lc.a)(e)),e.removeDropZone=e.removeDropZone.bind(Object(lc.a)(e)),e.resetDragState=e.resetDragState.bind(Object(lc.a)(e)),e.toggleDraggingOverDocument=Object(s.throttle)(e.toggleDraggingOverDocument.bind(Object(lc.a)(e)),200),e.dropZones=[],e.dropZoneCallbacks={addDropZone:e.addDropZone,removeDropZone:e.removeDropZone},e.state={hoveredDropZone:-1,isDraggingOverDocument:!1,position:null},e}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("dragover",this.onDragOver),window.addEventListener("mouseup",this.resetDragState)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragover",this.onDragOver),window.removeEventListener("mouseup",this.resetDragState)}},{key:"addDropZone",value:function(e){this.dropZones.push(e)}},{key:"removeDropZone",value:function(e){this.dropZones=Object(s.filter)(this.dropZones,(function(t){return t!==e}))}},{key:"resetDragState",value:function(){this.toggleDraggingOverDocument.cancel();var e=this.state,t=e.isDraggingOverDocument,n=e.hoveredDropZone;(t||-1!==n)&&(this.setState({hoveredDropZone:-1,isDraggingOverDocument:!1,position:null}),this.dropZones.forEach((function(e){return e.setState({isDraggingOverDocument:!1,isDraggingOverElement:!1,position:null,type:null})})))}},{key:"toggleDraggingOverDocument",value:function(e,t){var n=this,r=window.CustomEvent&&e instanceof window.CustomEvent?e.detail:e,o=Object(s.filter)(this.dropZones,(function(e){return bi(t,e)&&function(e,t,n){var r=e.getBoundingClientRect();return r.bottom!==r.top&&r.left!==r.right&&(t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom)}(e.element,r.clientX,r.clientY)})),c=Object(s.find)(o,(function(e){return!Object(s.some)(o,(function(t){return t!==e&&e.element.parentElement.contains(t.element)}))})),a=this.dropZones.indexOf(c),i=null;if(c){var l=c.element.getBoundingClientRect();i={x:r.clientX-l.left<l.right-r.clientX?"left":"right",y:r.clientY-l.top<l.bottom-r.clientY?"top":"bottom"}}var u=[];this.state.isDraggingOverDocument?a!==this.state.hoveredDropZone?(-1!==this.state.hoveredDropZone&&u.push(this.dropZones[this.state.hoveredDropZone]),c&&u.push(c)):c&&a===this.state.hoveredDropZone&&!Object(s.isEqual)(i,this.state.position)&&u.push(c):u=this.dropZones,u.forEach((function(e){var r=n.dropZones.indexOf(e)===a;e.setState({isDraggingOverDocument:bi(t,e),isDraggingOverElement:r,position:r?i:null,type:r?t:null})}));var d={isDraggingOverDocument:!0,hoveredDropZone:a,position:i};tn()(d,this.state)||this.setState(d)}},{key:"onDragOver",value:function(e){this.toggleDraggingOverDocument(e,mi(e)),e.preventDefault()}},{key:"onDrop",value:function(e){e.dataTransfer&&e.dataTransfer.files.length;var t=this.state,n=t.position,r=t.hoveredDropZone,o=mi(e),c=this.dropZones[r];if(this.resetDragState(),c)switch(o){case"file":c.onFilesDrop(Object(i.a)(e.dataTransfer.files),n);break;case"html":c.onHTMLDrop(e.dataTransfer.getData("text/html"),n);break;case"default":c.onDrop(e,n)}e.stopPropagation(),e.preventDefault()}},{key:"render",value:function(){return Object(c.createElement)("div",{onDrop:this.onDrop,className:"components-drop-zone__provider"},Object(c.createElement)(di,{value:this.dropZoneCallbacks},this.props.children))}}]),t}(c.Component),fi=function(e){function t(){var e;return Object(nc.a)(this,t),(e=Object(oc.a)(this,Object(cc.a)(t).apply(this,arguments))).openFileDialog=e.openFileDialog.bind(Object(lc.a)(e)),e.bindInput=e.bindInput.bind(Object(lc.a)(e)),e}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"openFileDialog",value:function(){this.input.click()}},{key:"bindInput",value:function(e){this.input=e}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.children,r=e.icon,o=void 0===r?"upload":r,a=e.multiple,i=void 0!==a&&a,s=e.onChange,l=e.render,u=Object(tc.a)(e,["accept","children","icon","multiple","onChange","render"]),d=l?l({openFileDialog:this.openFileDialog}):Object(c.createElement)(Tt.a,Object(oe.a)({icon:o,onClick:this.openFileDialog},u),n);return Object(c.createElement)("div",{className:"components-form-file-upload"},d,Object(c.createElement)("input",{type:"file",ref:this.bindInput,multiple:i,style:{display:"none"},accept:t,onChange:s}))}}]),t}(c.Component),gi=n(79),vi=function(e){function t(){var e;return Object(nc.a)(this,t),(e=Object(oc.a)(this,Object(cc.a)(t).apply(this,arguments))).dropZoneElement=Object(c.createRef)(),e.dropZone={element:null,onDrop:e.props.onDrop,onFilesDrop:e.props.onFilesDrop,onHTMLDrop:e.props.onHTMLDrop,setState:e.setState.bind(Object(lc.a)(e))},e.state={isDraggingOverDocument:!1,isDraggingOverElement:!1,position:null,type:null},e}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"componentDidMount",value:function(){this.dropZone.element=this.dropZoneElement.current,this.props.addDropZone(this.dropZone)}},{key:"componentWillUnmount",value:function(){this.props.removeDropZone(this.dropZone)}},{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.label,o=t.onFilesDrop,a=t.onHTMLDrop,i=t.onDrop,s=this.state,u=s.isDraggingOverDocument,d=s.isDraggingOverElement,p=s.position,m=s.type,b=Rt()("components-drop-zone",n,Object(l.a)({"is-active":(u||d)&&("file"===m&&o||"html"===m&&a||"default"===m&&i),"is-dragging-over-document":u,"is-dragging-over-element":d,"is-close-to-top":p&&"top"===p.y,"is-close-to-bottom":p&&"bottom"===p.y,"is-close-to-left":p&&"left"===p.x,"is-close-to-right":p&&"right"===p.x},"is-dragging-".concat(m),!!m));return d&&(e=Object(c.createElement)("div",{className:"components-drop-zone__content"},Object(c.createElement)(gi.a,{icon:"upload",size:"40",className:"components-drop-zone__content-icon"}),Object(c.createElement)("span",{className:"components-drop-zone__content-text"},r||Object(_e.__)("Drop files to upload")))),Object(c.createElement)("div",{ref:this.dropZoneElement,className:b},e)}}]),t}(c.Component),Mi=function(e){return Object(c.createElement)(pi,null,(function(t){var n=t.addDropZone,r=t.removeDropZone;return Object(c.createElement)(vi,Object(oe.a)({addDropZone:n,removeDropZone:r},e))}))},Oi=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).state={isUploading:!1},e.handleFilesUpload=e.handleFilesUpload.bind(ft()(e)),e.handleFilesDrop=e.handleFilesDrop.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"handleFilesDrop",value:function(e){var t=e[0];this.uploadTheme(t)}},{key:"handleFilesUpload",value:function(e){var t=e.target.files[0];this.uploadTheme(t)}},{key:"uploadTheme",value:function(e){var t=this,n=this.props,r=n.createNotice,o=n.onUploadComplete;this.setState({isUploading:!0});var c=new FormData;return c.append("pluginzip",e),Le()({path:"/wc-admin/themes",method:"POST",body:c}).then((function(e){o(e),t.setState({isUploading:!1}),r(e.status,e.message)})).catch((function(e){t.setState({isUploading:!1}),e&&e.message&&r("error",e.message)}))}},{key:"render",value:function(){var e=this.props.className,t=this.state.isUploading,n=Rt()("woocommerce-theme-uploader",e,{"is-uploading":t});return Object(c.createElement)(I.Card,{className:n},Object(c.createElement)(hi,null,t?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.Spinner,null),Object(c.createElement)(I.H,{className:"woocommerce-theme-uploader__title"},Object(_e.__)("Uploading theme","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("Your theme is being uploaded","woocommerce-admin"))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(fi,{accept:".zip",onChange:this.handleFilesUpload},Object(c.createElement)(Eo.a,{icon:"cloud-upload"}),Object(c.createElement)(I.H,{className:"woocommerce-theme-uploader__title"},Object(_e.__)("Upload a theme","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("Drop a theme zip file here to upload","woocommerce-admin"))),Object(c.createElement)(Mi,{label:Object(_e.__)("Drop your theme zip file here","woocommerce-admin"),onFilesDrop:this.handleFilesDrop}))))}}]),t}(c.Component);Oi.propTypes={className:K.a.string,onUploadComplete:K.a.func},Oi.defaultProps={onUploadComplete:s.noop};var yi=Object(ke.a)(Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}})))(Oi),wi=[{key:"mobile",icon:"phone_android"},{key:"tablet",icon:"tablet_android"},{key:"desktop",icon:"desktop_windows"}],zi=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).state={device:"desktop"},e.handleDeviceClick=e.handleDeviceClick.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"handleDeviceClick",value:function(e){var t=this.props.theme;Object(an.b)("storeprofiler_store_theme_demo_device",{device:e,theme:t.slug}),this.setState({device:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.isBusy,r=t.onChoose,o=t.onClose,a=t.theme,i=a.demo_url,s=a.slug,l=a.title,u=this.state.device;return Object(c.createElement)("div",{className:"woocommerce-theme-preview"},Object(c.createElement)("div",{className:"woocommerce-theme-preview__toolbar"},Object(c.createElement)(Ur.a,{className:"woocommerce-theme-preview__close",onClick:o},Object(c.createElement)("i",{className:"material-icons-outlined"},"close")),Object(c.createElement)("div",{className:"woocommerce-theme-preview__theme-name"},Qr()({mixedString:Object(_e.sprintf)(Object(_e.__)("{{strong}}%s{{/strong}} developed by WooCommerce","woocommerce-admin"),l),components:{strong:Object(c.createElement)("strong",null)}})),Object(c.createElement)("div",{className:"woocommerce-theme-preview__devices"},wi.map((function(t){return Object(c.createElement)(Ur.a,{key:t.key,className:Rt()("woocommerce-theme-preview__device",{"is-selected":t.key===u}),onClick:function(){return e.handleDeviceClick(t.key)}},Object(c.createElement)("i",{className:"material-icons-outlined"},t.icon))}))),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){return r(s,"preview")},isBusy:n},Object(_e.__)("Choose","woocommerce-admin"))),Object(c.createElement)(I.WebPreview,{src:i,title:l,className:"is-".concat(u)}))}}]),t}(c.Component);function _i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ai=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).state={activeTab:"all",chosen:null,demo:null,uploadedThemes:[]},e.handleUploadComplete=e.handleUploadComplete.bind(ft()(e)),e.onChoose=e.onChoose.bind(ft()(e)),e.onClosePreview=e.onClosePreview.bind(ft()(e)),e.onSelectTab=e.onSelectTab.bind(ft()(e)),e.openDemo=e.openDemo.bind(ft()(e)),e.skipStep=e.skipStep.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isError,r=t.isGetProfileItemsRequesting,o=t.createNotice,c=this.state.chosen,a=!r&&e.isGetProfileItemsRequesting&&!n&&c,i=!r&&e.isRequesting&&n;a&&(this.setState({chosen:null}),this.props.goToNextStep()),i&&(this.setState({chosen:null}),o("error",Object(_e.__)("There was a problem selecting your store theme.","woocommerce-admin")))}},{key:"onChoose",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.props.updateProfileItems,r=e.price,o=e.slug,c=Object(ye.g)("onboarding",{}),a=c.activeTheme,i=void 0===a?"":a;this.setState({chosen:o}),Object(an.b)("storeprofiler_store_theme_choose",{theme:o,location:t}),e!==i&&Cc(r)<=0?this.installTheme(o):n({theme:o})}},{key:"installTheme",value:function(e){var t=this,n=this.props.createNotice;Le()({path:"/wc-admin/onboarding/themes/install?theme="+e,method:"POST"}).then((function(){t.activateTheme(e)})).catch((function(e){t.setState({chosen:null}),n("error",e.message)}))}},{key:"activateTheme",value:function(e){var t=this,n=this.props,r=n.createNotice,o=n.updateProfileItems;Le()({path:"/wc-admin/onboarding/themes/activate?theme="+e,method:"POST"}).then((function(t){r("success",Object(_e.sprintf)(Object(_e.__)("%s was installed and activated on your site.","woocommerce-admin"),t.name)),Object(ye.h)("onboarding",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_i(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Object(ye.g)("onboarding",{}),{activeTheme:t.slug})),o({theme:e})})).catch((function(e){t.setState({chosen:null}),r("error",e.message)}))}},{key:"onClosePreview",value:function(){var e=this.state.demo;Object(an.b)("storeprofiler_store_theme_demo_close",{theme:e.slug}),document.body.classList.remove("woocommerce-theme-preview-active"),this.setState({demo:null})}},{key:"openDemo",value:function(e){Object(an.b)("storeprofiler_store_theme_live_demo",{theme:e.slug}),document.body.classList.add("woocommerce-theme-preview-active"),this.setState({demo:e})}},{key:"skipStep",value:function(){var e=Object(ye.g)("onboarding",{}).activeTheme,t=void 0===e?"":e;Object(an.b)("storeprofiler_store_theme_skip_step",{activeTheme:t}),this.props.goToNextStep()}},{key:"renderTheme",value:function(e){var t=this,n=e.demo_url,r=e.has_woocommerce_support,o=e.image,a=e.slug,i=e.title,s=this.state.chosen,l=Object(ye.g)("onboarding",{}).activeTheme,u=void 0===l?"":l;return Object(c.createElement)(I.Card,{className:"woocommerce-profile-wizard__theme",key:e.slug},o&&Object(c.createElement)("div",{className:"woocommerce-profile-wizard__theme-image",style:{backgroundImage:"url(".concat(o,")")},role:"img","aria-label":i}),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__theme-details"},Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__theme-name"},i,!r&&Object(c.createElement)(Nr.a,{text:Object(_e.__)("This theme does not support WooCommerce.","woocommerce-admin")},Object(c.createElement)("span",null,Object(c.createElement)(Eo.a,{icon:"info",role:"img","aria-hidden":"true",focusable:"false"})))),Object(c.createElement)("p",{className:"woocommerce-profile-wizard__theme-status"},this.getThemeStatus(e)),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__theme-actions"},a===u?Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){return t.onChoose(e,"card")},isBusy:s===a},Object(_e.__)("Continue with my active theme","woocommerce-admin")):Object(c.createElement)(Ur.a,{isDefault:!0,onClick:function(){return t.onChoose(e,"card")},isBusy:s===a},Object(_e.__)("Choose","woocommerce-admin")),n&&Object(c.createElement)(Ur.a,{isTertiary:!0,onClick:function(){return t.openDemo(e)}},Object(_e.__)("Live demo","woocommerce-admin")))))}},{key:"getThemeStatus",value:function(e){var t=e.is_installed,n=e.price,r=e.slug,o=Object(ye.g)("onboarding",{}).activeTheme;return(void 0===o?"":o)===r?Object(_e.__)("Currently active theme","woocommerce-admin"):t?Object(_e.__)("Installed","woocommerce-admin"):Cc(n)<=0?Object(_e.__)("Free","woocommerce-admin"):Object(_e.sprintf)(Object(_e.__)("%s per year","woocommerce-admin"),Object(En.decodeEntities)(n))}},{key:"doesActiveThemeSupportWooCommerce",value:function(){var e=Object(ye.g)("onboarding",{}).activeTheme,t=void 0===e?"":e,n=this.getThemes().find((function(e){return e.slug===t}));return n&&n.has_woocommerce_support}},{key:"onSelectTab",value:function(e){Object(an.b)("storeprofiler_store_theme_navigate",{navigation:e}),this.setState({activeTab:e})}},{key:"getPriceValue",value:function(e){return Number(Object(En.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}},{key:"getThemes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",t=this.state.uploadedThemes,n=Object(ye.g)("onboarding",{}),r=n.activeTheme,o=void 0===r?"":r,c=n.themes,a=void 0===c?[]:c,i=[].concat(St()(a.filter((function(e){return e.has_woocommerce_support||e.slug===o}))),St()(t));switch(e){case"paid":return i.filter((function(e){return Cc(e.price)>0}));case"free":return i.filter((function(e){return Cc(e.price)<=0}));case"all":default:return i}}},{key:"handleUploadComplete",value:function(e){"success"===e.status&&e.theme_data&&(this.setState({uploadedThemes:[].concat(St()(this.state.uploadedThemes),[e.theme_data])}),Object(an.b)("storeprofiler_store_theme_upload",{theme:e.theme_data.slug}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.activeTab,r=t.chosen,o=t.demo,a=this.getThemes(n),i=this.doesActiveThemeSupportWooCommerce();return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-title"},Object(_e.__)("Choose a theme","woocommerce-admin")),Object(c.createElement)(I.H,{className:"woocommerce-profile-wizard__header-subtitle"},Object(_e.__)("Choose how your store appears to customers. And don't worry, you can always switch themes and edit them later.","woocommerce-admin")),Object(c.createElement)(li.a,{className:"woocommerce-profile-wizard__themes-tab-panel",activeClass:"is-active",onSelect:this.onSelectTab,tabs:[{name:"all",title:Object(_e.__)("All themes","woocommerce-admin")},{name:"paid",title:Object(_e.__)("Paid themes","woocommerce-admin")},{name:"free",title:Object(_e.__)("Free themes","woocommerce-admin")}]},(function(){return Object(c.createElement)("div",{className:"woocommerce-profile-wizard__themes"},a&&a.map((function(t){return e.renderTheme(t)})),Object(c.createElement)(yi,{onUploadComplete:e.handleUploadComplete}))})),o&&Object(c.createElement)(zi,{theme:o,onChoose:this.onChoose,onClose:this.onClosePreview,isBusy:r===o.slug}),i&&Object(c.createElement)("p",null,Object(c.createElement)(Ur.a,{isLink:!0,className:"woocommerce-profile-wizard__skip",onClick:function(){return e.skipStep()}},Object(_e.__)("Skip this step","woocommerce-admin"))))}}]),t}(c.Component),ji=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getProfileItems,r=t.getProfileItemsError,o=t.isGetProfileItemsRequesting;return{isError:Boolean(r()),isGetProfileItemsRequesting:o(),profileItems:n()}})),Object(a.withDispatch)((function(e){var t=e("wc-api").updateProfileItems;return{createNotice:e("core/notices").createNotice,updateProfileItems:t}})))(Ai),ki=(n(408),function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).state={showCartModal:!1,cartRedirectUrl:null},e.goToNextStep=e.goToNextStep.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=e.query.step,n=this.props.query.step,r=this.props,o=r.isError,c=r.isGetProfileItemsRequesting,a=r.createNotice;!c&&e.isRequesting&&o&&a("error",Object(_e.__)("There was a problem finishing the profile wizard.","woocommerce-admin")),t!==n&&(window.document.documentElement.scrollTop=0)}},{key:"componentDidMount",value:function(){document.documentElement.classList.remove("wp-toolbar"),document.body.classList.add("woocommerce-onboarding"),document.body.classList.add("woocommerce-profile-wizard__body"),document.body.classList.add("woocommerce-admin-full-screen")}},{key:"componentWillUnmount",value:function(){var e=this.state.cartRedirectUrl;e&&(document.body.classList.add("woocommerce-admin-is-loading"),window.location=e),document.documentElement.classList.add("wp-toolbar"),document.body.classList.remove("woocommerce-onboarding"),document.body.classList.remove("woocommerce-profile-wizard__body"),document.body.classList.remove("woocommerce-admin-full-screen")}},{key:"getSteps",value:function(){var e=this.props.profileItems,t=[];return t.push({key:"start",container:ai}),t.push({key:"plugins",container:Fa,isComplete:e.hasOwnProperty("plugins")&&null!==e.plugins}),t.push({key:"store-details",container:si,label:Object(_e.__)("Store Details","woocommerce-admin"),isComplete:e.hasOwnProperty("setup_client")&&null!==e.setup_client}),t.push({key:"industry",container:Da,label:Object(_e.__)("Industry","woocommerce-admin"),isComplete:e.hasOwnProperty("industry")&&null!==e.industry}),t.push({key:"product-types",container:Ga,label:Object(_e.__)("Product Types","woocommerce-admin"),isComplete:e.hasOwnProperty("product_types")&&null!==e.product_types}),t.push({key:"business-details",container:Ra,label:Object(_e.__)("Business Details","woocommerce-admin"),isComplete:e.hasOwnProperty("product_count")&&null!==e.product_count}),t.push({key:"theme",container:ji,label:Object(_e.__)("Theme","woocommerce-admin"),isComplete:e.hasOwnProperty("theme")&&null!==e.theme}),t}},{key:"getCurrentStep",value:function(){var e=this.props.query.step,t=this.getSteps().find((function(t){return t.key===e}));return t||this.getSteps()[0]}},{key:"goToNextStep",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getCurrentStep(),n=this.getSteps().findIndex((function(e){return e.key===t.key})),Object(an.b)("storeprofiler_step_complete",{step:t.key}),void 0!==(r=this.getSteps()[n+1])){e.next=7;break}return this.possiblyShowCart(),e.abrupt("return");case 7:return e.abrupt("return",Object(Oe.updateQueryString)({step:r.key}));case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"possiblyShowCart",value:function(){Ec(this.props.profileItems).length?this.setState({showCartModal:!0}):this.completeProfiler()}},{key:"completeProfiler",value:function(){var e=this.props,t=e.notes,n=e.updateNote;(0,e.updateProfileItems)({completed:!0}),Object(an.b)("storeprofiler_complete");var r=t.find((function(e){return"wc-admin-onboarding-profiler-reminder"===e.name}));r&&n(r.id,{status:"actioned"})}},{key:"markCompleteAndPurchase",value:function(e){this.setState({cartRedirectUrl:e}),this.completeProfiler()}},{key:"render",value:function(){var e=this,t=this.props.query,n=this.state.showCartModal,r=this.getCurrentStep(),o=Object(c.createElement)(r.container,{query:t,step:r,goToNextStep:this.goToNextStep}),a=this.getSteps().map((function(e){return Object(s.pick)(e,["key","label","isComplete"])}));return Object(c.createElement)(c.Fragment,null,n&&Object(c.createElement)(Sc,{onClose:function(){return e.setState({showCartModal:!1})},onClickPurchaseNow:function(t){return e.markCompleteAndPurchase(t)},onClickPurchaseLater:function(){return e.completeProfiler()}}),Object(c.createElement)($a,{currentStep:r.key,steps:a}),Object(c.createElement)("div",{className:"woocommerce-profile-wizard__container"},o))}}]),t}(c.Component)),Ei=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getNotes,r=t.getProfileItems,o=t.getProfileItemsError,c=n({page:1,per_page:rt,type:"update",status:"unactioned"});return{isError:Boolean(o()),notes:c,profileItems:r()}})),Object(a.withDispatch)((function(e){var t=e("wc-api"),n=t.updateNote,r=t.updateProfileItems;return{createNotice:e("core/notices").createNotice,updateNote:n,updateProfileItems:r}})))(ki),Ci=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.path,n=e.profileItems,r=e.query;return Lc()&&!n.completed?Object(c.createElement)(Ei,{query:r}):Object(c.createElement)(qa,{query:r,path:t})}}]),t}(c.Component),Li=Object(ke.a)(rn((function(e){if(Lc())return{profileItems:(0,e("wc-api").getProfileItems)()}})))(Ci),Ni=function(e){function t(){var e,n,r;x()(this,t);for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];return W()(r,(n=r=W()(this,(e=H()(t)).call.apply(e,[this].concat(c))),r.state={example:null},n))}var r;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.getExample()}},{key:"getExample",value:(r=gr()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t=n(409)("./".concat(this.props.filePath,"/docs/example"))}catch(e){console.error(e)}if(t){e.next=3;break}return e.abrupt("return");case 3:this.setState({example:G.a.createElement(t.default||t)});case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var e=this.state.example;return Object(c.createElement)("div",{className:"woocommerce-devdocs__example"},e)}}]),t}(c.Component),Si=n(226),qi=n.n(Si),Ti=n(143),xi=n.n(Ti);n(452);xi.a.languages.es6=xi.a.languages.javascript,qi.a.setOptions({highlight:function(e,t){var n=xi.a.languages[t];return n?xi.a.highlight(e,n):e}});var Bi=function(e){function t(){var e,n,r;x()(this,t);for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];return W()(r,(n=r=W()(this,(e=H()(t)).call.apply(e,[this].concat(c))),r.state={readme:null},n))}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.getReadme()}},{key:"getReadme",value:function(){var e=this.props.filePath,t=n(453)("./".concat(e,"/README.md"));t&&this.setState({readme:t})}},{key:"render",value:function(){var e=this.state.readme;return e?Object(c.createElement)("div",{className:"woocommerce-devdocs__docs",dangerouslySetInnerHTML:{__html:qi()(e)}}):null}}]),t}(c.Component),Ri=n(227),Pi=(n(497),function(e){return e.replace(/\.?([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^-/,"")}),Wi=(c.Component,function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){window.document.documentElement.scrollTop=0}},{key:"componentDidUpdate",value:function(e){var t=this.getQuery(e.location.search),n=Object(s.omit)(this.getQuery(e.location.search),"paged"),r=Object(s.omit)(this.getQuery(this.props.location.search),"paged");t.paged>1&&!Object(s.isEqual)(n,r)&&Object(Oe.getHistory)().replace(Object(Oe.getNewPath)({paged:1})),e.match.url!==this.props.match.url&&(window.document.documentElement.scrollTop=0)}},{key:"getQuery",value:function(e){if(!e)return{};var t=e.substring(1);return Object(we.parse)(t)}},{key:"render",value:function(){var e=this.props,t=e.page,n=e.match,r=e.location,o=n.url,a=n.params,i=this.getQuery(r.search);return window.wpNavMenuUrlUpdate(i),window.wpNavMenuClassChange(t,o),Object(c.createElement)(t.container,{params:a,path:o,pathMatch:t.path,query:i})}}]),t}(c.Component));window.wpNavMenuUrlUpdate=function(e){var t=Object(ze.applyFilters)("woocommerce_admin_time_excluded_screens",["devdocs","stock","settings","customers"]),n=Object(Oe.getPersistedQuery)(e);Array.from(document.querySelectorAll("#adminmenu a")).forEach((function(e){return function(e,t,n){if(/admin.php\?page=wc-admin/.test(e.href)){var r=Object(s.last)(e.href.split("?")),o=Object(we.parse)(r),c=(o.path||"dashboard").replace("/analytics","").replace("/",""),a=n.includes(c),i="admin.php?"+Object(we.stringify)(Object.assign(o,a?{}:t));e.href=i,e.onclick=function(e){e.preventDefault(),Object(Oe.getHistory)().push(i)}}}(e,n,t)}))},window.wpNavMenuClassChange=function(e,t){Array.from(document.getElementsByClassName("current")).forEach((function(e){e.classList.remove("current")})),Array.from(document.querySelectorAll(".wp-has-current-submenu")).forEach((function(e){e.classList.remove("wp-has-current-submenu"),e.classList.remove("wp-menu-open"),e.classList.remove("selected"),e.classList.add("wp-not-current-submenu"),e.classList.add("menu-top")}));var n="/"===t?"admin.php?page=wc-admin":"admin.php?page=wc-admin&path="+encodeURIComponent(t),r="/"===t?'li > a[href$="'.concat(n,'"], li > a[href*="').concat(n,'?"]'):'li > a[href*="'.concat(n,'"]'),o=document.querySelectorAll(r);if(Array.from(o).forEach((function(e){e.parentElement.classList.add("current")})),e.wpOpenMenu){var c=document.querySelector("#"+e.wpOpenMenu);c.classList.remove("wp-not-current-submenu"),c.classList.add("wp-has-current-submenu"),c.classList.add("wp-menu-open"),c.classList.add("current")}document.querySelector("#wpwrap").classList.remove("wp-responsive-open")};n(498);var Di=n(365),Hi=n.n(Di),Xi=(n(500),function(e){var t=e.height,n=void 0===t?24:t,r=e.width,o=void 0===r?24:r,a=e.hasUnread,i=void 0!==a&&a,s=Rt()("woocommerce-layout__activity-panel-toggle-bubble",{"has-unread":i});return Object(c.createElement)("div",{className:s},Object(c.createElement)("svg",{height:n,width:o,viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M18.9 2H5.1C3.4 2 2 3.4 2 5.1v10.7C2 17.6 3.4 19 5.1 19H9l6 3-1-3h4.9c1.7 0 3.1-1.4 3.1-3.1V5.1C22 3.4 20.6 2 18.9 2zm-1.5 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7-.1.2-.3.4-.6.4s-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6.5 0 .8.3.9.9.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2.2.2.3.4.3.6 0 .2 0 .4-.1.5z"})))});Xi.propTypes={height:K.a.number,width:K.a.number,hasUnread:K.a.bool};var Vi=Xi;n(501);var Ii=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.hasAction,r=e.hasDate,o=e.hasSubtitle,a=e.lines,i=Rt()("woocommerce-activity-card is-loading",t);return Object(c.createElement)("div",{className:i,"aria-hidden":!0},Object(c.createElement)("span",{className:"woocommerce-activity-card__icon"},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)("div",{className:"woocommerce-activity-card__header"},Object(c.createElement)("div",{className:"woocommerce-activity-card__title is-placeholder"}),o&&Object(c.createElement)("div",{className:"woocommerce-activity-card__subtitle is-placeholder"}),r&&Object(c.createElement)("div",{className:"woocommerce-activity-card__date"},Object(c.createElement)("span",{className:"is-placeholder"}))),Object(c.createElement)("div",{className:"woocommerce-activity-card__body"},Object(s.range)(a).map((function(e){return Object(c.createElement)("span",{className:"is-placeholder",key:e})}))),n&&Object(c.createElement)("div",{className:"woocommerce-activity-card__actions"},Object(c.createElement)("span",{className:"is-placeholder"})))}}]),t}(c.Component);Ii.propTypes={className:K.a.string,hasAction:K.a.bool,hasDate:K.a.bool,hasSubtitle:K.a.bool,lines:K.a.number},Ii.defaultProps={hasAction:!1,hasDate:!1,hasSubtitle:!1,lines:1};var Fi=Ii,Ui=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.actions,n=e.className,r=e.children,o=e.date,a=e.icon,i=e.subtitle,s=e.title,l=e.unread,u=Rt()("woocommerce-activity-card",n),d=Array.isArray(t)?t:[t];return Object(c.createElement)("section",{className:u},l&&Object(c.createElement)("span",{className:"woocommerce-activity-card__unread"}),Object(c.createElement)("span",{className:"woocommerce-activity-card__icon","aria-hidden":!0},a),Object(c.createElement)("header",{className:"woocommerce-activity-card__header"},Object(c.createElement)(I.H,{className:"woocommerce-activity-card__title"},s),i&&Object(c.createElement)("div",{className:"woocommerce-activity-card__subtitle"},i),o&&Object(c.createElement)("span",{className:"woocommerce-activity-card__date"},Ft.a.utc(o).fromNow())),Object(c.createElement)(I.Section,{className:"woocommerce-activity-card__body"},r),t&&Object(c.createElement)("footer",{className:"woocommerce-activity-card__actions"},d.map((function(e,t){return Object(c.cloneElement)(e,{key:t})}))))}}]),t}(c.Component);Ui.propTypes={actions:K.a.oneOfType([K.a.arrayOf(K.a.element),K.a.element]),className:K.a.string,children:K.a.node.isRequired,date:K.a.string,icon:K.a.node,subtitle:K.a.node,title:K.a.oneOfType([K.a.string,K.a.node]).isRequired,unread:K.a.bool},Ui.defaultProps={icon:Object(c.createElement)(Eo.a,{icon:"notice-outline",size:48}),unread:!1};n(502);var Gi=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.className,r=e.menu,o=Rt()("woocommerce-layout__activity-panel-header",n);return Object(c.createElement)("div",{className:o},Object(c.createElement)(I.H,{className:"woocommerce-layout__activity-panel-header-title"},t),r&&Object(c.createElement)("div",{className:"woocommerce-layout__activity-panel-header-menu"},r))}}]),t}(c.Component);Gi.propTypes={className:K.a.string,title:K.a.string.isRequired,menu:K.a.shape({type:K.a.oneOf([I.EllipsisMenu])})};var Qi=Gi,Ki=n(366),$i=n.n(Ki),Ji=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={inAction:!1},n.handleActionClick=n.handleActionClick.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"handleActionClick",value:function(e){var t=this.props,n=t.action,r=t.noteId,o=t.triggerNoteAction,c=e.target.href||"",a=!0;c.length&&!c.startsWith(ye.a)&&(e.preventDefault(),a=!1,window.open(c,"_blank")),this.setState({inAction:a},(function(){return o(r,n.id)}))}},{key:"render",value:function(){var e=this.props.action;return Object(c.createElement)(Ur.a,{isDefault:!0,isPrimary:e.primary,isBusy:this.state.inAction,disabled:this.state.inAction,href:e.url||void 0,onClick:this.handleActionClick},e.label)}}]),t}(c.Component);Ji.propTypes={noteId:K.a.number,action:K.a.shape({id:K.a.number.isRequired,url:K.a.string,label:K.a.string.isRequired,primary:K.a.bool.isRequired})};var Zi=Object(ke.a)(Object(a.withDispatch)((function(e){return{triggerNoteAction:e("wc-api").triggerNoteAction}})))(Ji),Yi=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).onVisible=n.onVisible.bind(ft()(n)),n.hasBeenSeen=!1,n}return V()(t,e),R()(t,[{key:"onVisible",value:function(e){if(e&&!this.hasBeenSeen){var t=this.props.note,n=t.content,r=t.name,o=t.title,c=t.type,a=t.icon;Object(an.b)("inbox_note_view",{note_content:n,note_name:r,note_title:o,note_type:c,note_icon:a}),this.hasBeenSeen=!0}}},{key:"render",value:function(){var e=this.props,t=e.lastRead,n=e.note;return Object(c.createElement)($i.a,{onChange:this.onVisible},Object(c.createElement)(Ui,{className:Rt()("woocommerce-inbox-activity-card",{actioned:"unactioned"!==n.status}),title:n.title,date:n.date_created,icon:Object(c.createElement)(Eo.a,{icon:n.icon,size:48}),unread:!t||!n.date_created_gmt||new Date(n.date_created_gmt+"Z").getTime()>t,actions:n.actions?n.actions.map((function(e){return Object(c.createElement)(Zi,{noteId:n.id,action:e})})):[]},Object(c.createElement)("span",{dangerouslySetInnerHTML:Xo(n.content)})))}}]),t}(c.Component);Yi.propTypes={note:K.a.shape({id:K.a.number,status:K.a.string,title:K.a.string,icon:K.a.string,content:K.a.string,date_created:K.a.string,date_created_gmt:K.a.string,actions:K.a.arrayOf(K.a.shape({id:K.a.number.isRequired,url:K.a.string,label:K.a.string.isRequired,primary:K.a.bool.isRequired}))}),lastRead:K.a.number};var es=Yi,ts=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).mountTime=Date.now(),n}return V()(t,e),R()(t,[{key:"componentWillUnmount",value:function(){var e=je()({},"activity_panel_inbox_last_read",this.mountTime);this.props.updateCurrentUserData(e)}},{key:"renderEmptyCard",value:function(){return Object(c.createElement)(Ui,{className:"woocommerce-empty-activity-card",title:Object(_e.__)("Your inbox is empty","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"checkmark",size:48})},Object(_e.__)("As things begin to happen in your store your inbox will start to fill up. You'll see things like achievements, new feature announcements, extension recommendations and more!","woocommerce-admin"))}},{key:"renderNotes",value:function(){var e=this.props,t=e.lastRead,n=e.notes;return 0===Object.keys(n).length?this.renderEmptyCard():Object.keys(n).map((function(e){return n[e]})).map((function(e){return Object(c.createElement)(es,{key:e.id,note:e,lastRead:t})}))}},{key:"render",value:function(){var e=this.props,t=e.isError,n=e.isRequesting;if(t){var r=Object(_e.__)("There was an error getting your inbox. Please try again.","woocommerce-admin"),o=Object(_e.__)("Reload","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.EmptyContent,{title:r,actionLabel:o,actionURL:null,actionCallback:function(){window.location.reload()}}))}return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Qi,{title:Object(_e.__)("Inbox","woocommerce-admin")}),Object(c.createElement)(I.Section,null,n?Object(c.createElement)(Fi,{className:"woocommerce-inbox-activity-card",hasAction:!0,hasDate:!0,lines:2}):this.renderNotes()))}}]),t}(c.Component),ns=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getCurrentUserData,r=t.getNotes,o=t.getNotesError,c=t.isGetNotesRequesting,a=n(),i={page:1,per_page:rt,type:"info,warning",orderby:"date",order:"desc",status:"unactioned"};return{notes:r(i),isError:Boolean(o(i)),isRequesting:c(i),lastRead:a.activity_panel_inbox_last_read}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(ts),rs=(n(503),function(e){var t=e.href,n=e.type,r=e.className,o=e.children,a=q()(e,["href","type","className","children"]),i=Rt()("woocommerce-layout__activity-panel-outbound-link",r);return Object(c.createElement)(I.Link,N()({href:t,type:n,className:i},a),o,Object(c.createElement)(Eo.a,{icon:"arrow-right"}))});rs.propTypes={href:K.a.string.isRequired,type:K.a.oneOf(["wp-admin","wc-admin","external"]).isRequired,className:K.a.string},rs.defaultProps={type:"wp-admin"};var os=rs,cs=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"renderEmptyCard",value:function(){return this.props.hasNonActionableOrders?Object(c.createElement)(Ui,{className:"woocommerce-empty-activity-card",title:Object(_e.__)("You have no orders to fulfill","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"checkmark",size:48})},Object(_e.__)("Good job, you've fulfilled all of your new orders!","woocommerce-admin")):Object(c.createElement)(Ui,{className:"woocommerce-empty-activity-card",title:Object(_e.__)("You have no orders to fulfill","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"time",size:48}),actions:Object(c.createElement)(Ur.a,{href:"https://docs.woocommerce.com/document/managing-orders/",isDefault:!0,target:"_blank"},Object(_e.__)("Learn more","woocommerce-admin"))},Object(_e.__)("You're still waiting for your customers to make their first orders. While you wait why not learn how to manage orders?","woocommerce-admin"))}},{key:"renderOrders",value:function(){var e=this.props.orders;if(0===e.length)return this.renderEmptyCard();var t=function(e){var t=(e.extended_info||{}).customer||{},n=t.first_name,r=t.last_name;if(!n&&!r)return"";var o=[n,r].join(" ");return Object(_e.sprintf)(Object(_e.__)("placed by {{customerLink}}%(customerName)s{{/customerLink}}","woocommerce-admin"),{customerName:o})},n=function(e){var n=e.extended_info,r=e.order_id,o=e.order_number,a=(n||{}).customer,i=a.customer_id?Object(Oe.getNewPath)({},"/analytics/customers",{filter:"single_customer",customers:a.customer_id}):null;return Object(c.createElement)(c.Fragment,null,Qr()({mixedString:Object(_e.sprintf)(Object(_e.__)("Order {{orderLink}}#%(orderNumber)s{{/orderLink}} %(customerString)s {{destinationFlag/}}","woocommerce-admin"),{orderNumber:o,customerString:t(e)}),components:{orderLink:Object(c.createElement)(I.Link,{href:Object(ye.f)("post.php?action=edit&post="+r),type:"wp-admin"}),destinationFlag:a.country?Object(c.createElement)(I.Flag,{code:a.country,round:!1}):null,customerLink:i?Object(c.createElement)(I.Link,{href:i,type:"wc-admin"}):Object(c.createElement)("span",null)}}))},r=[];return e.forEach((function(e){var t=e.extended_info||{},o=t&&t.products?t.products.length:0,a=e.total_sales;r.push(Object(c.createElement)(Ui,{key:e.order_id,className:"woocommerce-order-activity-card",title:n(e),date:e.date_created_gmt,subtitle:Object(c.createElement)("div",null,Object(c.createElement)("span",null,Object(_e.sprintf)(Object(_e._n)("%d product","%d products",o,"woocommerce-admin"),o)),Object(c.createElement)("span",null,_t(a))),actions:Object(c.createElement)(Ur.a,{isDefault:!0,href:Object(ye.f)("post.php?action=edit&post="+e.order_id)},Object(_e.__)("Begin fulfillment"))},Object(c.createElement)(I.OrderStatus,{order:e,orderStatusMap:Object(ye.g)("orderStatuses",{})})))})),Object(c.createElement)(c.Fragment,null,r,Object(c.createElement)(os,{href:"edit.php?post_type=shop_order"},Object(_e.__)("Manage all orders","woocommerce-admin")))}},{key:"render",value:function(){var e=this.props,t=e.orders,n=e.isRequesting,r=e.isError,o=e.orderStatuses;if(r){if(!o.length)return Object(c.createElement)(I.EmptyContent,{title:Object(_e.__)("You currently don't have any actionable statuses. To display orders here, select orders that require further review in settings.","woocommerce-admin"),actionLabel:Object(_e.__)("Settings","woocommerce-admin"),actionURL:Object(ye.f)("admin.php?page=wc-admin&path=/analytics/settings")});var a=Object(_e.__)("There was an error getting your orders. Please try again.","woocommerce-admin"),i=Object(_e.__)("Reload","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.EmptyContent,{title:a,actionLabel:i,actionURL:null,actionCallback:function(){window.location.reload()}}))}var s=n||t.length?Object(_e.__)("Orders","woocommerce-admin"):Object(_e.__)("No orders to fulfill","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Qi,{title:s}),Object(c.createElement)(I.Section,null,n?Object(c.createElement)(Fi,{className:"woocommerce-order-activity-card",hasAction:!0,hasDate:!0,lines:2}):this.renderOrders()))}}]),t}(c.Component);cs.propTypes={orders:K.a.array.isRequired,isError:K.a.bool,isRequesting:K.a.bool},cs.defaultProps={orders:[],isError:!1,isRequesting:!1};var as=Object(ke.a)(rn((function(e,t){var n=t.hasActionableOrders,r=e("wc-api"),o=r.getItems,c=r.getItemsTotalCount,a=r.getItemsError,i=r.isGetItemsRequesting,l=r.getReportItems,u=r.getReportItemsError,d=r.isReportItemsRequesting,p=Object(ye.g)("wcAdminSettings",{}).woocommerce_actionable_order_statuses,m=void 0===p?nt:p;if(!m.length)return{orders:[],isError:!0,isRequesting:!1,orderStatuses:m};if(n){var b={page:1,per_page:rt,status:m,_fields:["id","date_created_gmt","status"]},h=Array.from(o("orders",b).values()),f=i("orders",b);if(f)return{isError:Boolean(a("orders",b)),isRequesting:f,orderStatuses:m};var g={page:1,per_page:rt,extended_info:!0,order_includes:Object(s.map)(h,"id")},v=l("orders",g).data,M=Boolean(u("orders",g)),O=d("orders",g),y=[];if(v&&v.length){var w=Object(s.keyBy)(h,"id");y=v.map((function(e){return Object(s.merge)({},e,w[e.order_id]||{})}))}return{orders:y,isError:M,isRequesting:O,orderStatuses:m}}var z={page:1,per_page:1,_fields:["id"]};return o("orders",z),{hasNonActionableOrders:c("orders",z)>0,isError:Boolean(a("orders",z)),isRequesting:i("orders",z),orderStatuses:m}})))(cs),is=n(68),ss=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={quantity:e.product.stock_quantity,editing:!1,edited:!1},n.beginEdit=n.beginEdit.bind(ft()(n)),n.cancelEdit=n.cancelEdit.bind(ft()(n)),n.onQuantityChange=n.onQuantityChange.bind(ft()(n)),n.handleKeyDown=n.handleKeyDown.bind(ft()(n)),n.onSubmit=n.onSubmit.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"beginEdit",value:function(){var e=this,t=this.props.product;this.setState({editing:!0,quantity:t.stock_quantity},(function(){e.quantityInput&&e.quantityInput.focus()}))}},{key:"cancelEdit",value:function(){var e=this.props.product;this.setState({editing:!1,quantity:e.stock_quantity})}},{key:"handleKeyDown",value:function(e){e.keyCode===uc.ESCAPE&&this.cancelEdit()}},{key:"onQuantityChange",value:function(e){this.setState({quantity:e.target.value})}},{key:"onSubmit",value:function(){var e=this.props,t=e.product,n=e.updateProductStock,r=this.state.quantity;this.setState({editing:!1,edited:!0}),n(t,r)}},{key:"getActions",value:function(){return this.state.editing?[Object(c.createElement)(Ur.a,{type:"submit",isPrimary:!0},Object(_e.__)("Save","woocommerce-admin")),Object(c.createElement)(Ur.a,{type:"reset"},Object(_e.__)("Cancel","woocommerce-admin"))]:[Object(c.createElement)(Ur.a,{isDefault:!0,onClick:this.beginEdit},Object(_e.__)("Update stock","woocommerce-admin"))]}},{key:"getBody",value:function(){var e=this,t=this.props.product,n=this.state,r=n.editing,o=n.quantity;return r?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(is.a,{className:"woocommerce-stock-activity-card__edit-quantity"},Object(c.createElement)("input",{className:"components-text-control__input",type:"number",value:o,onKeyDown:this.handleKeyDown,onChange:this.onQuantityChange,ref:function(t){e.quantityInput=t}})),Object(c.createElement)("span",null,Object(_e.__)("in stock","woocommerce-admin"))):Object(c.createElement)("span",{className:"woocommerce-stock-activity-card__stock-quantity"},Object(_e.sprintf)(Object(_e.__)("%d in stock","woocommerce-admin"),t.stock_quantity))}},{key:"render",value:function(){var e=this.props.product,t=this.state,n=t.edited,r=t.editing,o=Object(ye.g)("notifyLowStockAmount",0),a=Number.isFinite(e.low_stock_amount)?e.low_stock_amount:o,i=e.stock_quantity<=a;if(!i&&!n)return null;var l=Object(c.createElement)(I.Link,{href:"post.php?action=edit&post="+(e.parent_id||e.id),type:"wp-admin"},e.name),u=null;"variation"===e.type&&(u=Object.values(e.attributes).map((function(e){return e.option})).join(", "));var d=Object(s.get)(e,["images",0])||Object(s.get)(e,["image"]),p=Rt()("woocommerce-stock-activity-card__image-overlay__product",{"is-placeholder":!d||!d.src}),m=Object(c.createElement)("div",{className:"woocommerce-stock-activity-card__image-overlay"},Object(c.createElement)("div",{className:p},Object(c.createElement)(I.ProductImage,{product:e}))),b=Rt()("woocommerce-stock-activity-card",{"is-dimmed":!r&&!i}),h=Object(c.createElement)(Ui,{className:b,title:l,subtitle:u,icon:m,actions:this.getActions()},this.getBody());return r?Object(c.createElement)("form",{onReset:this.cancelEdit,onSubmit:this.onSubmit},h):h}}]),t}(c.Component),ls=Object(ke.a)(Object(a.withDispatch)((function(e){return{updateProductStock:e("wc-api").updateProductStock}})))(ss),us=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"renderEmptyCard",value:function(){return Object(c.createElement)(Ui,{className:"woocommerce-empty-activity-card",title:Object(_e.__)("Your stock is in good shape.","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"checkmark",size:48})},Object(_e.__)("You currently have no products running low on stock.","woocommerce-admin"))}},{key:"renderProducts",value:function(){var e=this.props.products;return 0===e.length?this.renderEmptyCard():e.map((function(e){return Object(c.createElement)(ls,{key:e.id,product:e})}))}},{key:"render",value:function(){var e=this.props,t=e.isError,n=e.isRequesting,r=e.products;if(t){var o=Object(_e.__)("There was an error getting your low stock products. Please try again.","woocommerce-admin"),a=Object(_e.__)("Reload","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.EmptyContent,{title:o,actionLabel:a,actionURL:null,actionCallback:function(){window.location.reload()}}))}var i=n||r.length>0?Object(_e.__)("Stock","woocommerce-admin"):Object(_e.__)("No products with low stock","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Qi,{title:i}),Object(c.createElement)(I.Section,null,n?Object(c.createElement)(Fi,{className:"woocommerce-stock-activity-card",hasAction:!0,lines:1}):this.renderProducts()))}}]),t}(c.Component);us.propTypes={products:K.a.array.isRequired,isError:K.a.bool,isRequesting:K.a.bool},us.defaultProps={products:[],isError:!1,isRequesting:!1};var ds=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getItems,r=t.getItemsError,o=t.isGetItemsRequesting,c={page:1,per_page:rt,low_in_stock:!0,status:"publish"};return{products:Array.from(n("products",c).values()),isError:Boolean(r("products",c)),isRequesting:o("products",c)}})))(us),ps=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).mountTime=(new Date).getTime(),e}return V()(t,e),R()(t,[{key:"renderReview",value:function(e,t){var n=t.lastRead,r=e&&e._embedded&&e._embedded.up&&e._embedded.up[0]||null;if(Object(s.isNull)(r))return null;var o=Qr()({mixedString:Object(_e.sprintf)(Object(_e.__)("{{productLink}}%s{{/productLink}} reviewed by {{authorLink}}%s{{/authorLink}}","woocommerce-admin"),r.name,e.reviewer),components:{productLink:Object(c.createElement)(I.Link,{href:r.permalink,type:"external"}),authorLink:Object(c.createElement)(I.Link,{href:"mailto:"+e.reviewer_email,type:"external"})}}),a=Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.ReviewRating,{review:e}),e.verified&&Object(c.createElement)("span",{className:"woocommerce-review-activity-card__verified"},Object(c.createElement)(Eo.a,{icon:"checkmark",size:18}),Object(_e.__)("Verified customer","woocommerce-admin"))),i=Object(s.get)(r,["images",0])||Object(s.get)(r,["image"]),l=Rt()("woocommerce-review-activity-card__image-overlay__product",{"is-placeholder":!i||!i.src}),u=Object(c.createElement)("div",{className:"woocommerce-review-activity-card__image-overlay"},Object(c.createElement)(I.Gravatar,{user:e.reviewer_email,size:24}),Object(c.createElement)("div",{className:l},Object(c.createElement)(I.ProductImage,{product:r}))),d={date:e.date_created_gmt,status:e.status},p=Object(c.createElement)(Ur.a,{isDefault:!0,onClick:function(){return Object(an.b)("review_manage_click",d)},href:Object(ye.f)("comment.php?action=editcomment&c="+e.id)},Object(_e.__)("Manage","woocommerce-admin"));return Object(c.createElement)(Ui,{className:"woocommerce-review-activity-card",key:e.id,title:o,subtitle:a,date:e.date_created_gmt,icon:u,actions:p,unread:"hold"===e.status||!n||!e.date_created_gmt||new Date(e.date_created_gmt+"Z").getTime()>n},Object(c.createElement)("span",{dangerouslySetInnerHTML:Xo(e.review)}))}},{key:"renderEmptyMessage",value:function(){var e=this.props.lastApprovedReviewTime,t=Object(_e.__)("You have no reviews to moderate","woocommerce-admin"),n="",r="",o="",a="";if(e){((new Date).getTime()-e)/864e5>30?(n="https://woocommerce.com/posts/reviews-woocommerce-best-practices/",r="_blank",o=Object(_e.__)("Learn more","woocommerce-admin"),a=Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,Object(_e.__)("We noticed that it's been a while since your products had any reviews.","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("Take some time to learn about best practices for collecting and using your reviews.","woocommerce-admin")))):(n=Object(ye.f)("edit-comments.php?comment_type=review"),o=Object(_e.__)("View all Reviews","woocommerce-admin"),a=Object(c.createElement)("p",null,Object(_e.__)("Awesome, you've moderated all of your product reviews. How about responding to some of those negative reviews?","woocommerce-admin")))}else n="https://woocommerce.com/posts/reviews-woocommerce-best-practices/",r="_blank",o=Object(_e.__)("Learn more","woocommerce-admin"),a=Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,Object(_e.__)("Your customers haven't started reviewing your products.","woocommerce-admin")),Object(c.createElement)("p",null,Object(_e.__)("Take some time to learn about best practices for collecting and using your reviews.","woocommerce-admin")));return Object(c.createElement)(Ui,{className:"woocommerce-empty-activity-card",title:t,icon:Object(c.createElement)(Eo.a,{icon:"time",size:48}),actions:Object(c.createElement)(Ur.a,{href:n,target:r,isDefault:!0},o)},a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isError,r=t.isRequesting,o=t.reviews;if(n){var a=Object(_e.__)("There was an error getting your reviews. Please try again.","woocommerce-admin"),i=Object(_e.__)("Reload","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.EmptyContent,{title:a,actionLabel:i,actionURL:null,actionCallback:function(){window.location.reload()}}))}var s=r||o.length?Object(_e.__)("Reviews","woocommerce-admin"):Object(_e.__)("No reviews to moderate","woocommerce-admin");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Qi,{title:s}),Object(c.createElement)(I.Section,null,r?Object(c.createElement)(Fi,{className:"woocommerce-review-activity-card",hasAction:!0,hasDate:!0,lines:2}):Object(c.createElement)(c.Fragment,null,o.length?o.map((function(t){return e.renderReview(t,e.props)})):this.renderEmptyMessage())))}}]),t}(c.Component);ps.propTypes={reviews:K.a.array.isRequired,isError:K.a.bool,isRequesting:K.a.bool},ps.defaultProps={reviews:[],isError:!1,isRequesting:!1};var ms=rn((function(e,t){var n=t.hasUnapprovedReviews,r=e("wc-api"),o=r.getReviews,c=r.getReviewsError,a=r.isGetReviewsRequesting,i=[],s=!1,l=!1,u=null;if(n){var d={page:1,per_page:rt,status:"hold",_embed:1};i=o(d),s=Boolean(c(d)),l=a(d)}else{var p={page:1,per_page:1,status:"approved",_embed:1},m=o(p);if(m.length){var b=m[0];if(b.date_created_gmt)u=new Date(b.date_created_gmt).getTime()}s=Boolean(c(p)),l=a(p)}return{reviews:i,isError:s,isRequesting:l,lastApprovedReviewTime:u}}))(ps),bs=Object(ye.g)("manageStock","no"),hs=Object(ye.g)("reviewsEnabled","no"),fs=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).togglePanel=e.togglePanel.bind(ft()(e)),e.clearPanel=e.clearPanel.bind(ft()(e)),e.toggleMobile=e.toggleMobile.bind(ft()(e)),e.renderTab=e.renderTab.bind(ft()(e)),e.state={isPanelOpen:!1,mobileOpen:!1,currentTab:"",isPanelSwitching:!1},e}return V()(t,e),R()(t,[{key:"togglePanel",value:function(e){var t=this.state,n=t.isPanelOpen,r=t.currentTab;n&&e===r||Object(an.b)("activity_panel_open",{tab:e}),this.setState((function(t){return e===t.currentTab||""===t.currentTab?{isPanelOpen:!t.isPanelOpen,currentTab:e,mobileOpen:!t.isPanelOpen}:{currentTab:e,isPanelSwitching:!0}}))}},{key:"clearPanel",value:function(){this.setState((function(e){return e.isPanelOpen?{isPanelSwitching:!1}:{currentTab:""}}))}},{key:"toggleMobile",value:function(){var e=this.getTabs();this.setState((function(t){return{mobileOpen:!t.mobileOpen,currentTab:t.mobileOpen?"":e[0].name,isPanelOpen:!t.mobileOpen}}))}},{key:"handleClickOutside",value:function(){var e=this.state,t=e.isPanelOpen,n=e.currentTab;t&&this.togglePanel(n)}},{key:"getTabs",value:function(){var e=this.props,t=e.hasUnreadNotes,n=e.hasUnreadOrders,r=e.hasUnapprovedReviews,o=e.hasUnreadStock;return[{name:"inbox",title:Object(_e.__)("Inbox","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"mail"}),unread:t},{name:"orders",title:Object(_e.__)("Orders","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"pages"}),unread:n},"yes"===bs?{name:"stock",title:Object(_e.__)("Stock","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"clipboard"}),unread:o}:null,"yes"===hs?{name:"reviews",title:Object(_e.__)("Reviews","woocommerce-admin"),icon:Object(c.createElement)(Eo.a,{icon:"star"}),unread:r}:null].filter(Boolean)}},{key:"getPanelContent",value:function(e){switch(e){case"inbox":return Object(c.createElement)(ns,null);case"orders":var t=this.props.hasUnreadOrders;return Object(c.createElement)(as,{hasActionableOrders:t});case"stock":return Object(c.createElement)(ds,null);case"reviews":var n=this.props.hasUnapprovedReviews;return Object(c.createElement)(ms,{hasUnapprovedReviews:n});default:return null}}},{key:"renderPanel",value:function(){var e=this.state,t=e.isPanelOpen,n=e.currentTab,r=e.isPanelSwitching,o=Object(s.find)(this.getTabs(),{name:n});if(!o)return Object(c.createElement)("div",{className:"woocommerce-layout__activity-panel-wrapper"});var a=Rt()("woocommerce-layout__activity-panel-wrapper",{"is-open":t,"is-switching":r});return Object(c.createElement)("div",{className:a,tabIndex:0,role:"tabpanel","aria-label":o.title,onTransitionEnd:this.clearPanel,onAnimationEnd:this.clearPanel},Object(c.createElement)("div",{className:"woocommerce-layout__activity-panel-content",key:"activity-panel-"+n,id:"activity-panel-"+n},this.getPanelContent(n)))}},{key:"renderTab",value:function(e,t){var n=this.state,r=n.currentTab,o=n.isPanelOpen,a=Rt()("woocommerce-layout__activity-panel-tab",{"is-active":o&&e.name===r,"has-unread":e.unread}),i=e.name===r,l=-1;return(i||!o&&0===t)&&(l=null),Object(c.createElement)(Tt.a,{role:"tab",className:a,tabIndex:l,"aria-selected":i,"aria-controls":"activity-panel-"+e.name,key:"activity-panel-tab-"+e.name,id:"activity-panel-tab-"+e.name,onClick:Object(s.partial)(this.togglePanel,e.name),icon:e.icon},e.title," ",e.unread&&Object(c.createElement)("span",{className:"screen-reader-text"},Object(_e.__)("unread activity","woocommerce-admin")))}},{key:"render",value:function(){var e=this.getTabs(),t=this.state.mobileOpen,n=Object(s.uniqueId)("activity-panel-header_"),r=Rt()("woocommerce-layout__activity-panel",{"is-mobile-open":this.state.mobileOpen}),o=e.some((function(e){return e.unread})),a=o?Object(_e.__)("View Activity Panel, you have unread activity","woocommerce-admin"):Object(_e.__)("View Activity Panel","woocommerce-admin");return Object(c.createElement)("div",null,Object(c.createElement)(I.H,{id:n,className:"screen-reader-text"},Object(_e.__)("Store Activity","woocommerce-admin")),Object(c.createElement)(I.Section,{component:"aside",id:"woocommerce-activity-panel","aria-labelledby":n},Object(c.createElement)(Tt.a,{onClick:this.toggleMobile,icon:t?Object(c.createElement)(Eo.a,{icon:"cross-small"}):Object(c.createElement)(Vi,{hasUnread:o}),label:t?Object(_e.__)("Close Activity Panel","woocommerce-admin"):a,"aria-expanded":t,tooltip:!1,className:"woocommerce-layout__activity-panel-mobile-toggle"}),Object(c.createElement)("div",{className:r},Object(c.createElement)(Co.a,{role:"tablist",orientation:"horizontal",className:"woocommerce-layout__activity-panel-tabs"},e&&e.map(this.renderTab)),this.renderPanel())))}}]),t}(c.Component),gs=rn((function(e){return{hasUnreadNotes:function(e){var t=e("wc-api"),n=t.getCurrentUserData,r=t.getNotes,o=t.getNotesError,c=t.isGetNotesRequesting,a=n();if(!a)return null;var i={page:1,per_page:1,type:"info,warning",orderby:"date",order:"desc"},s=r(i),l=Boolean(o(i)),u=c(i);return l||u?null:s[0]&&new Date(s[0].date_created_gmt+"Z").getTime()>a.activity_panel_inbox_last_read}(e),hasUnreadOrders:function(e){var t=e("wc-api"),n=t.getItems,r=t.getItemsTotalCount,o=t.getItemsError,c=t.isGetItemsRequesting,a=Object(ye.g)("wcAdminSettings",{}).woocommerce_actionable_order_statuses,i=void 0===a?nt:a;if(!i.length)return!1;var s={page:1,per_page:1,status:i,_fields:["id"]};n("orders",s);var l=r("orders",s),u=Boolean(o("orders",s)),d=c("orders",s);return u||d?null:l>0}(e),hasUnreadStock:Object(ye.g)("hasLowStock",!1),hasUnapprovedReviews:function(e){var t=e("wc-api"),n=t.getReviewsTotalCount,r=t.getReviewsError,o=t.isGetReviewsRequesting;if("yes"===Object(ye.g)("reviewsEnabled")){var c={page:1,per_page:1,status:"hold"},a=n(c),i=Boolean(r(c)),s=o(c);if(!i&&!s)return a>0}return!1}(e)}}))(Hi()(fs)),vs=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).state={isScrolled:!1},e.onWindowScroll=e.onWindowScroll.bind(ft()(e)),e.updateIsScrolled=e.updateIsScrolled.bind(ft()(e)),e.trackLinkClick=e.trackLinkClick.bind(ft()(e)),e.updateDocumentTitle=e.updateDocumentTitle.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.threshold=Object(c.findDOMNode)(this).offsetTop,window.addEventListener("scroll",this.onWindowScroll),this.updateIsScrolled()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.onWindowScroll),window.cancelAnimationFrame(this.handle)}},{key:"onWindowScroll",value:function(){this.handle=window.requestAnimationFrame(this.updateIsScrolled)}},{key:"updateIsScrolled",value:function(){var e=window.pageYOffset>this.threshold-20;e!==this.state.isScrolled&&this.setState({isScrolled:e})}},{key:"trackLinkClick",value:function(e){var t=e.target.closest("a").getAttribute("href");Object(an.b)("navbar_breadcrumb_click",{href:t,text:e.target.innerText})}},{key:"updateDocumentTitle",value:function(){var e=this.props,t=e.sections;if(!e.isEmbedded){var n=(Array.isArray(t)?t:[t]).map((function(e){return Array.isArray(e)?e[1]:e})).reverse().join(" &lsaquo; ");document.title=Object(En.decodeEntities)(Object(_e.sprintf)(Object(_e.__)("%1$s &lsaquo; %2$s &#8212; WooCommerce","woocommerce-admin"),n,Object(ye.g)("siteTitle","")))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.sections,r=t.isEmbedded,o=this.state.isScrolled,a=Array.isArray(n)?n:[n];this.updateDocumentTitle();var i=Rt()("woocommerce-layout__header",{"is-scrolled":o});return Object(c.createElement)("div",{className:i},Object(c.createElement)("h1",{className:"woocommerce-layout__header-breadcrumbs"},Object(c.createElement)("span",null,Object(c.createElement)(I.Link,{href:r?Object(ye.f)("admin.php?page=wc-admin"):"admin.php?page=wc-admin",type:r?"wp-admin":"wc-admin",onClick:this.trackLinkClick},Object(_e.__)("WooCommerce","woocommerce-admin"))),a.map((function(t,n){var o=Array.isArray(t)?Object(c.createElement)(I.Link,{href:r?Object(ye.f)(t[0]):Object(Oe.getNewPath)({},t[0],{}),type:r?"wp-admin":"wc-admin",onClick:e.trackLinkClick},t[1]):t;return Object(c.createElement)("span",{key:n},Object(En.decodeEntities)(o))}))),Object(c.createElement)(gs,null))}}]),t}(c.Component);vs.propTypes={sections:K.a.node.isRequired,isEmbedded:K.a.bool},vs.defaultProps={isEmbedded:!1};var Ms=vs,Os=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){return Object(c.createElement)("div",{id:"woocommerce-layout__notice-list",className:"woocommerce-layout__notice-list"})}}]),t}(c.Component),ys=n(41),ws=n(228),zs=n(763);var _s=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,a=void 0===o?s.noop:o,i=Object(zs.a)(),l=Object(c.useState)((function(){return new WeakMap})),u=Object(ys.a)(l,1)[0],d=Object(ws.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=Object(Se.a)(b.a.mark((function t(n){return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:u.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=Object(Se.a)(b.a.mark((function e(t){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:i});n=Rt()("components-snackbar-list",n);var p=function(e){return function(){return a(e.id)}};return Object(c.createElement)("div",{className:n},r,d.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(c.createElement)(ws.animated.div,{key:n,style:r},Object(c.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&u.set(t,e)}},Object(c.createElement)(ec,Object(oe.a)({},Object(s.omit)(t,["content"]),{onRemove:p(t)}),t.content)))})))},As=(n(504),function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.notices,r=e.onRemove,o=Rt()("woocommerce-transient-notices","components-notices__snackbar",t);return Object(c.createElement)(_s,{notices:n,className:o,onRemove:r})}}]),t}(c.Component));As.propTypes={className:K.a.string,notices:K.a.array};var js=Object(ke.a)(rn((function(e){return{notices:e("core/notices").getNotices()}})),Object(a.withDispatch)((function(e){return{onRemove:e("core/notices").removeNotice}})))(As),ks=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props.hasMultipleAlerts;return Object(c.createElement)("div",{className:"woocommerce-card woocommerce-store-alerts is-loading","aria-hidden":!0},Object(c.createElement)("div",{className:"woocommerce-card__header"},Object(c.createElement)("div",{className:"woocommerce-card__title woocommerce-card__header-item"},Object(c.createElement)("span",{className:"is-placeholder"})),e&&Object(c.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},Object(c.createElement)("span",{className:"is-placeholder"}))),Object(c.createElement)("div",{className:"woocommerce-card__body"},Object(c.createElement)("div",{className:"woocommerce-store-alerts__message"},Object(c.createElement)("span",{className:"is-placeholder"}),Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)("div",{className:"woocommerce-store-alerts__actions"},Object(c.createElement)("span",{className:"is-placeholder"}))))}}]),t}(c.Component),Es=ks;ks.propTypes={hasMultipleAlerts:K.a.bool},ks.defaultProps={hasMultipleAlerts:!1};n(505);var Cs=function(e){function t(e){var n;x()(this,t);var r=(n=W()(this,H()(t).call(this,e))).props.alerts;return n.state={currentIndex:r?0:null},n.previousAlert=n.previousAlert.bind(ft()(n)),n.nextAlert=n.nextAlert.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"previousAlert",value:function(e){e.stopPropagation();var t=this.state.currentIndex;t>0&&this.setState({currentIndex:t-1})}},{key:"nextAlert",value:function(e){e.stopPropagation();var t=this.props.alerts,n=this.state.currentIndex;n<t.length-1&&this.setState({currentIndex:n+1})}},{key:"renderActions",value:function(e){var t=this.props,n=t.triggerNoteAction,r=t.updateNote,o=e.actions.map((function(t){return Object(c.createElement)(Ur.a,{key:t.name,isDefault:!0,isPrimary:t.primary,href:t.url||void 0,onClick:function(){return n(e.id,t.id)}},t.label)})),a=[{value:Ft()().add(4,"hours").unix().toString(),label:Object(_e.__)("Later Today","woocommerce-admin")},{value:Ft()().add(1,"day").hour(9).minute(0).second(0).millisecond(0).unix().toString(),label:Object(_e.__)("Tomorrow","woocommerce-admin")},{value:Ft()().add(1,"week").hour(9).minute(0).second(0).millisecond(0).unix().toString(),label:Object(_e.__)("Next Week","woocommerce-admin")},{value:Ft()().add(1,"month").hour(9).minute(0).second(0).millisecond(0).unix().toString(),label:Object(_e.__)("Next Month","woocommerce-admin")}],i=e.is_snoozable&&Object(c.createElement)(uo.a,{className:"woocommerce-store-alerts__snooze",options:[{label:Object(_e.__)("Remind Me Later","woocommerce-admin"),value:"0"}].concat(a),onChange:function(t){if("0"!==t){var n=a.find((function(e){return e.value===t}));!function(t){r(e.id,{status:"snoozed",date_reminder:t.value});var n={alert_name:e.name,alert_title:e.title,snooze_duration:t.value,snooze_label:t.label};Object(an.b)("store_alert_snooze",n)}({value:t,label:n&&n.label})}}});if(o||i)return Object(c.createElement)("div",{className:"woocommerce-store-alerts__actions"},o,i)}},{key:"render",value:function(){var e=this.props.alerts||[],t=Object(ye.g)("alertCount",0,(function(e){return parseInt(e,10)}));if(t>0&&this.props.isLoading)return Object(c.createElement)(Es,{hasMultipleAlerts:t>1});if(0===e.length)return null;var n=this.state.currentIndex,r=e.length,o=e[n],a=o.type,i=Rt()("woocommerce-store-alerts","woocommerce-analytics__card",{"is-alert-error":"error"===a,"is-alert-update":"update"===a});return Object(c.createElement)(I.Card,{title:[o.icon&&Object(c.createElement)(gi.a,{key:"icon",icon:o.icon}),Object(c.createElement)(c.Fragment,{key:"title"},o.title)],className:i,action:r>1&&Object(c.createElement)("div",{className:"woocommerce-store-alerts__pagination"},Object(c.createElement)(Tt.a,{icon:"arrow-left-alt2",onClick:this.previousAlert,disabled:0===n,label:Object(_e.__)("Previous Alert","woocommerce-admin")}),Object(c.createElement)("span",{className:"woocommerce-store-alerts__pagination-label",role:"status","aria-live":"polite"},Qr()({mixedString:Object(_e.__)("{{current /}} of {{total /}}","woocommerce-admin"),components:{current:Object(c.createElement)(c.Fragment,null,n+1),total:Object(c.createElement)(c.Fragment,null,r)}})),Object(c.createElement)(Tt.a,{icon:"arrow-right-alt2",onClick:this.nextAlert,disabled:r-1===n,label:Object(_e.__)("Next Alert","woocommerce-admin")}))},Object(c.createElement)("div",{className:"woocommerce-store-alerts__message",dangerouslySetInnerHTML:Xo(o.content)}),this.renderActions(o))}}]),t}(c.Component),Ls=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getNotes,r=t.isGetNotesRequesting,o={page:1,per_page:rt,type:"error,update",status:"unactioned"};return{alerts:n(o).filter((function(e){return"unactioned"===e.status})),isLoading:r(o)}})),Object(a.withDispatch)((function(e){var t=e("wc-api");return{triggerNoteAction:t.triggerNoteAction,updateNote:t.updateNote}})))(Cs),Ns=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props.children;return Object(c.createElement)("div",{className:"woocommerce-layout__primary",id:"woocommerce-layout__primary"},Object(c.createElement)(Ls,null),Object(c.createElement)(Os,null),e)}}]),t}(c.Component),Ss=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.recordPageViewTrack(),document.body.classList.remove("woocommerce-admin-is-loading")}},{key:"componentDidUpdate",value:function(e){var t=Object(s.get)(e,"location.pathname"),n=Object(s.get)(this.props,"location.pathname");t&&n&&t!==n&&this.recordPageViewTrack()}},{key:"recordPageViewTrack",value:function(){var e=this.props.isEmbedded;if(e){var t=document.location.pathname+document.location.search;Object(an.c)(t,{isEmbedded:e})}else{var n=Object(s.get)(this.props,"location.pathname");if(n){var r=n.substring(1).replace(/\//g,"_");0===r.length&&(r="dashboard"),Object(an.c)(r)}}}},{key:"render",value:function(){var e=this.props,t=e.isEmbedded,n=q()(e,["isEmbedded"]),r=this.props.page.breadcrumbs;return Object(c.createElement)("div",{className:"woocommerce-layout"},Object(c.createElement)(Ms,{sections:Object(s.isFunction)(r)?r(this.props):r,isEmbedded:t}),Object(c.createElement)(js,null),!t&&Object(c.createElement)(Ns,null,Object(c.createElement)("div",{className:"woocommerce-layout__main"},Object(c.createElement)(Wi,n))))}}]),t}(c.Component);Ss.propTypes={isEmbedded:K.a.bool,page:K.a.shape({container:K.a.func,path:K.a.string,breadcrumbs:K.a.oneOfType([K.a.func,K.a.arrayOf(K.a.oneOfType([K.a.arrayOf(K.a.string),K.a.string]))]).isRequired,wpOpenMenu:K.a.string}).isRequired};var qs=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){return Object(c.createElement)(le,{history:Object(Oe.getHistory)()},Object(c.createElement)(Me,null,(e=[],e.push({container:Li,path:"/",breadcrumbs:[Object(_e.__)("Dashboard","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce"}),e.push({container:_o,path:"/analytics/settings",breadcrumbs:[["/analytics/revenue",Object(_e.__)("Analytics","woocommerce-admin")],Object(_e.__)("Settings","woocommerce-admin")],wpOpenMenu:"toplevel_page_wc-admin-path--analytics-revenue"}),e.push({container:Fr,path:"/customers",breadcrumbs:[Object(_e.__)("Customers","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce"}),e.push({container:Fr,path:"/analytics/:report",breadcrumbs:function(e){var t=e.match,n=Object(s.find)(Xr(),{report:t.params.report});return n?[["/analytics/revenue",Object(_e.__)("Analytics","woocommerce-admin")],n.title]:[]},wpOpenMenu:"toplevel_page_wc-admin-path--analytics-revenue"}),Object(ze.applyFilters)("woocommerce_admin_pages_list",e)).map((function(e){return Object(c.createElement)(me,{key:e.path,path:e.path,exact:!0,render:function(t){return Object(c.createElement)(Ss,N()({page:e},t))}})}))));var e}}]),t}(c.Component),Ts=Object(I.useFilters)(["woocommerce_admin_pages_list",Dr])(qs),xs=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){return Object(c.createElement)(Ss,{page:{breadcrumbs:Object(ye.g)("embedBreadcrumbs",[])},isEmbedded:!0})}}]),t}(c.Component),Bs=n(230),Rs=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ps={INIT:"@@redux/INIT"+Rs(),REPLACE:"@@redux/REPLACE"+Rs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Rs()}};function Ws(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ds(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(Ds)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,c=t,a=[],i=a,s=!1;function l(){i===a&&(i=a.slice())}function u(){if(s)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function d(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(s)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return l(),i.push(e),function(){if(t){if(s)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,l();var n=i.indexOf(e);i.splice(n,1),a=null}}}function p(e){if(!Ws(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,c=o(c,e)}finally{s=!1}for(var t=a=i,n=0;n<t.length;n++){(0,t[n])()}return e}function m(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,p({type:Ps.REPLACE})}function b(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[Bs.a]=function(){return this},e}return p({type:Ps.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:m})[Bs.a]=b,r}function Hs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hs(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vs={resources:{}};function Is(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vs,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FRESH_DATA_REQUESTED":return Fs(e,t);case"FRESH_DATA_RECEIVED":return Us(e,t);default:return e}}function Fs(e,t){return Gs(e,t.resourceNames.reduce((function(e,n){return e[n]={lastRequested:t.time},e}),{}))}function Us(e,t){return Gs(e,Object.keys(t.resources).reduce((function(e,n){var r=Xs({},t.resources[n]);return r.data&&(r.lastReceived=t.time),r.error&&(r.lastError=t.time),e[n]=r,e}),{}))}function Gs(e,t){var n=Object.keys(t).reduce((function(e,n){var r=e[n],o=t[n];return e[n]=Xs({},r,{},o),e}),Xs({},e.resources));return Xs({},e,{resources:n})}var Qs=function(e,t){var n=function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION__;return Ds(Is,t&&t({name:e,instanceId:e}))}(e),r=function(e){return{dataRequested:function(t){document.hidden||e.dispatch({type:"FRESH_DATA_REQUESTED",resourceNames:t,time:new Date})},dataReceived:function(t){e.dispatch({type:"FRESH_DATA_RECEIVED",resources:t,time:new Date})}}}(n),o=new Ze(t);return o.setDataHandlers(r),n.subscribe((function(){o.setState(n.getState())})),o};function Ks(e,t){var n=JSON.stringify(t,Object.keys(t).sort());return"".concat(e,":").concat(n)}function $s(e){return e.substring(0,e.indexOf(":"))}function Js(e,t){return $s(e)===t}function Zs(e){var t=e.substring(e.indexOf(":")+1);return JSON.parse(t)}function Ys(e,t,n){return e.filter((function(e){return e.startsWith("report-export-")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(r){var o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=$s(r),c=o.split("-").pop(),a=et+"/reports/"+c+"/export",e.prev=3,e.next=6,n({path:a,method:"POST",data:{report_args:t[r],email:!0}});case 6:return i=e.sent,e.abrupt("return",je()({},r,je()({},i.status,i.message)));case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",je()({},r,{error:e.t0}));case 13:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(t){return e.apply(this,arguments)}}())}var el={mutations:{initiateReportExport:function(e){return function(){var t=gr()(regeneratorRuntime.mark((function t(n,r,o){var c,i,s,l,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=Object(a.dispatch)("core/notices"),i=c.createNotice,s=Ks("report-export-".concat(n),o),t.next=4,e.update([s],je()({},s,o));case 4:l=t.sent,(u=l[0][s])&&u.success&&i("success",Object(_e.sprintf)(Object(_e.__)("Your %s Report will be emailed to you.","woocommerce-admin"),r)),u&&u.error&&i("error",Object(_e.sprintf)(Object(_e.__)("There was a problem exporting your %s Report. Please try again.","woocommerce-admin"),r));case 8:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}},operations:{update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a;return St()(Ys(e,t,n))}}};function tl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tl(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rl(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cl={"items-query-categories":"products/categories","items-query-customers":"customers","items-query-coupons":"coupons","items-query-leaderboards":"leaderboards","items-query-orders":"orders","items-query-products":"products","items-query-taxes":"taxes"};var al={mutations:{updateProductStock:function(e){return function(){var t=gr()(regeneratorRuntime.mark((function t(n,r){var o,c,i,s,l,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=Object(a.dispatch)("core/notices"),c=o.createNotice,i=n.stock_quantity,s=Ks("items-query-products-item",n.id),e.updateLocally([s],je()({},s,nl({},n,{stock_quantity:r}))),t.next=6,e.update([s],je()({},s,{id:n.id,type:n.type,parent_id:n.parent_id,stock_quantity:r}));case 6:l=t.sent,(u=l[0][s])&&u.data&&c("success",Object(_e.sprintf)(Object(_e.__)("%s stock updated.","woocommerce-admin"),n.name)),u&&u.error&&(c("error",Object(_e.sprintf)(Object(_e.__)("%s stock could not be updated.","woocommerce-admin"),n.name)),e.updateLocally([s],je()({},s,nl({},n,{stock_quantity:i}))));case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}},operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a,n=e.filter((function(e){var t=$s(e);return Boolean(cl[t])}));return n.map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o,c,a,i,s,l,u,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$s(n),o=cl[r],c=Zs(n),a=Object(Ee.addQueryArgs)("".concat(et,"/").concat(o),c),i=-1===c.per_page,e.prev=5,e.next=8,t({parse:i,path:a});case 8:if(s=e.sent,!i){e.next=14;break}u=(l=s).length,e.next=18;break;case 14:return e.next=16,s.json();case 16:l=e.sent,u=parseInt(s.headers.get("x-wp-total"));case 18:return d=l.map((function(e){return e.id})),p=l.reduce((function(e,t){return e[Ks("".concat(r,"-item"),t.id)]={data:t},e}),{}),e.abrupt("return",ol(je()({},n,{data:d,totalCount:u}),p));case 23:return e.prev=23,e.t0=e.catch(5),e.abrupt("return",je()({},n,{error:e.t0}));case 26:case"end":return e.stop()}}),e,null,[[5,23]])})));return function(t){return e.apply(this,arguments)}}())},update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a,r=["items-query-products-item"],o=e.filter((function(e){return r.includes($s(e))}));return o.map(function(){var e=gr()(regeneratorRuntime.mark((function e(r){var o,c,a,i,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=t[r],c=o.id,a=o.parent_id,i=o.type,s=q()(o,["id","parent_id","type"]),l=et,e.t0=i,e.next="variation"===e.t0?5:"variable"===e.t0?7:(e.t0,7);break;case 5:return l+="/products/".concat(a,"/variations/").concat(c),e.abrupt("break",8);case 7:l+="/products/".concat(c);case 8:return e.abrupt("return",n({path:l,method:"PUT",data:s}).then((function(e){return je()({},r,{data:e})})).catch((function(e){return je()({},r,{error:e})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},updateLocally:function(e,t){var n=["items-query-products-item"],r=e.filter((function(e){return n.includes($s(e))})),o=Ks("items-query-products",{page:1,per_page:1,low_in_stock:!0,status:"publish"});return r.map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(r={},je()(r,n,{data:t[n]}),je()(r,o,{lastReceived:null}),r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},selectors:{getItems:function(e,t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tt,c=Ks("items-query-".concat(n),r),a=t(o,c).data||[],i=new Map;return a.forEach((function(t){i.set(t,e(Ks("items-query-".concat(n,"-item"),t)).data)})),i}},getItemsError:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("items-query-".concat(t),n);return e(r).error}},getItemsTotalCount:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("items-query-".concat(t),n);return e(r).totalCount||0}},isGetItemsRequesting:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("items-query-".concat(t),n),o=e(r),c=o.lastRequested,a=o.lastReceived;return!(!Object(s.isNil)(c)&&!Object(s.isNil)(a))||c>a}}}},il={"import-status":"reports/import/status","import-totals":"reports/import/totals"};function sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ll(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ul={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a,n=e.filter((function(e){var t=$s(e);return Boolean(il[t])}));return n.map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o,c,a,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$s(n),o=il[r],c=Zs(n),a={parse:!1,path:Object(Ee.addQueryArgs)("".concat(et,"/").concat(o),Object(s.omit)(c,["timestamp"]))},e.prev=4,e.next=7,t(a);case 7:return i=e.sent,e.next=10,i.json();case 10:return l=e.sent,e.abrupt("return",je()({},n,{data:l}));case 14:return e.prev=14,e.t0=e.catch(4),e.abrupt("return",je()({},n,{error:e.t0}));case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}())}},selectors:{getImportStatus:function(e,t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,r=Ks("import-status",e);return t(n,r).data||{}}},isGetImportStatusRequesting:function(e){return function(t){var n=Ks("import-status",t),r=e(n),o=r.lastRequested,c=r.lastReceived;return!(!Object(s.isNil)(o)&&!Object(s.isNil)(c))||o>c}},getImportTotals:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tt,o=ll({},e,{timestamp:n}),c=Ks("import-totals",o);return t(r,c).data||{}}}}};function dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dl(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ml(e,t){return e.filter((function(e){return Js(e,"note-query")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o,c,a,i,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Zs(n),o=Object(Ee.addQueryArgs)("".concat(et,"/admin/notes"),r),e.prev=2,e.next=5,t({parse:!1,path:o});case 5:return c=e.sent,e.next=8,c.json();case 8:return a=e.sent,i=parseInt(c.headers.get("x-wp-total")),s=a.map((function(e){return e.id})),l=a.reduce((function(e,t){return e[Ks("note",t.id)]={data:t},e}),{}),e.abrupt("return",pl(je()({},n,{data:s,totalCount:i}),l));case 15:return e.prev=15,e.t0=e.catch(2),e.abrupt("return",je()({},n,{error:e.t0}));case 18:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}())}function bl(e,t){return e.filter((function(e){return Js(e,"note")})).map((function(e){return function(e,t){var n=Zs(e),r="".concat(et,"/admin/notes/").concat(n);return t({path:r}).then((function(t){return je()({},e,{data:t})})).catch((function(t){return je()({},e,{error:t})}))}(e,t)}))}function hl(e,t,n){if(e.includes("note")){var r=t.note,o=r.noteId,c=q()(r,["noteId"]);return[n({path:"".concat(et,"/admin/notes/").concat(o),method:"PUT",data:c}).then((function(e){return je()({},"note:"+o,{data:e})})).catch((function(e){return je()({},"note:"+o,{error:e})}))]}return[]}function fl(e,t,n){if(e.includes("note-action")){var r=t["note-action"],o=r.noteId,c=r.actionId;return[n({path:"".concat(et,"/admin/notes/").concat(o,"/action/").concat(c),method:"POST"}).then((function(e){return je()({},"note:"+o,{data:e})})).catch((function(e){return je()({},"note:"+o,{error:e})}))]}return[]}function gl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var vl={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a;return[].concat(St()(bl(e,t)),St()(ml(e,t)))},update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a;return[].concat(St()(hl(e,t,n)),St()(fl(e,t,n)))},triggerAction:fl},selectors:{getNotes:function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,o=Ks("note-query",n),c=t(r,o).data||[],a=c.map((function(t){return e(Ks("note",t)).data||{}}));return a}},getNotesError:function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Ks("note-query",t);return e(n).error}},isGetNotesRequesting:function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Ks("note-query",t),r=e(n),o=r.lastRequested,c=r.lastReceived;return!(!Object(s.isNil)(o)&&!Object(s.isNil)(c))||o>c}}},mutations:{updateNote:function(e){return function(t,n){e.update(["note"],je()({},"note",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gl(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({noteId:t},n)))}},triggerNoteAction:function(e){return function(t,n){e.update(["note-action"],je()({},"note-action",{noteId:t,actionId:n}))}}}};function Ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ml(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yl(e,t){if(e.includes("onboarding-profile")){return[t({path:"/wc-admin/onboarding/profile"}).then(zl).catch((function(e){return je()({},"onboarding-profile",{error:String(e.message)})}))]}return[]}function wl(e,t,n){if(e.includes("onboarding-profile")){return[n({path:"/wc-admin/onboarding/profile",method:"POST",data:t["onboarding-profile"]}).then(_l.bind(null,t["onboarding-profile"])).catch((function(e){return je()({},"onboarding-profile",{error:e})}))]}return[]}function zl(e){var t=Object.keys(e),n={};return t.forEach((function(t){var r=e[t];n[Ks("onboarding-profile",t)]={data:r}})),Ol(je()({},"onboarding-profile",{data:t}),n)}function _l(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[Ks("onboarding-profile",n)]={data:r}})),Ol(je()({},"onboarding-profile",{lastReceived:Date.now()}),t)}function Al(e,t){if(e.includes("active-plugins")){return[t({path:"/wc-admin/onboarding/plugins/active"}).then(jl).catch((function(e){return je()({},"active-plugins",{error:String(e.message)})}))]}return[]}function jl(e){var t=e.plugins;return je()({},"active-plugins",{data:t})}function kl(e,t,n){if(e.includes("plugin-activate")){var r=t["plugin-activate"];return[n({path:"/wc-admin/onboarding/plugins/activate",method:"POST",data:{plugins:r.join(",")}}).then((function(e){return function(e,t){var n,r=Object(ye.g)("onboarding",{}).activePlugins,o=void 0===r?[]:r;Object(ye.h)("onboarding",Ol({},Object(ye.g)("onboarding",{}),{activePlugins:Object(s.uniq)([].concat(St()(o),St()(t)))}));var c=(n={},je()(n,"plugin-activate",{data:t}),je()(n,"active-plugins",{data:e.active}),n);return Object.keys(t).forEach((function(e){var n=t[e];c[Ks("plugin-activate",n)]={data:n}})),c}(e,r)})).catch((function(e){var t=je()({},"plugin-activate",{error:e});return Object.keys(r).forEach((function(n){var o=Ol({},e),c=r[n];o.message=Ll("activate",c),t[Ks("plugin-activate",c)]={error:o}})),t}))]}return[]}function El(e,t){if(e.includes("jetpack-status")){return[t({path:"/jetpack/v4/connection"}).then((function(e){return je()({},"jetpack-status",{data:e})})).catch((function(e){return je()({},"jetpack-status",{error:String(e.message)})}))]}return[]}function Cl(e,t){return e.filter((function(e){return e.startsWith("jetpack-connect-url")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Zs(n),o=Object(Ee.addQueryArgs)("/wc-admin/onboarding/plugins/connect-jetpack",r),e.abrupt("return",t({path:o}).then((function(e){return je()({},n,{data:e.connectAction})})).catch((function(e){return e.message=Ll("connect","jetpack"),je()({},n,{error:e})})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function Ll(e,t){var n=Ta[t]||t;switch(e){case"install":return Object(_e.sprintf)(Object(_e.__)("There was an error installing %s. Please try again.","woocommerce-admin"),n);case"connect":return Object(_e.sprintf)(Object(_e.__)("There was an error connecting to %s. Please try again.","woocommerce-admin"),n);case"activate":default:return Object(_e.sprintf)(Object(_e.__)("There was an error activating %s. Please try again.","woocommerce-admin"),n)}}function Nl(e,t,n){if(e.includes("plugin-install")){var r=t["plugin-install"];return r.map(function(){var e=gr()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n({path:"".concat("/wc-admin","/onboarding/plugins/install"),method:"POST",data:{plugin:t}}).then((function(e){var n,o=Object(ye.g)("onboarding",{}).installedPlugins,c=void 0===o?[]:o;return Object(ye.h)("onboarding",Ol({},Object(ye.g)("onboarding",{}),{installedPlugins:Object(s.uniq)([].concat(St()(c),St()(r)))})),n={},je()(n,"plugin-install",{data:r}),je()(n,Ks("plugin-install",t),{data:e}),n})).catch((function(e){var n;return e.message=Ll("install",Ta[t]||t),n={},je()(n,"plugin-install",{data:r}),je()(n,Ks("plugin-install",t),{error:e}),n})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}return[]}var Sl={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a;return[].concat(St()(Al(e,t)),St()(yl(e,t)),St()(El(e,t)),St()(Cl(e,t)))},update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a;return[].concat(St()(kl(e,t,n)),St()(Nl(e,t,n)),St()(wl(e,t,n)))}},selectors:{getProfileItems:function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tt,r="onboarding-profile",o=t(n,r).data||[],c=Object(ye.g)("onboarding",{}),a=c.profile;if(!o.length){var i={};return Object.keys(a).forEach((function(t){i[t]=e(Ks(r,t)).data||a[t]})),i}var s={};return o.forEach((function(t){s[t]=e(Ks(r,t)).data})),s}},getProfileItemsError:function(e){return function(){return e("onboarding-profile").error}},isGetProfileItemsRequesting:function(e){return function(){var t=e("onboarding-profile"),n=t.lastReceived,r=t.lastRequested;return!(!Object(s.isNil)(r)&&!Object(s.isNil)(n))||r>n}},getJetpackConnectUrl:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,r=Ks("jetpack-connect-url",e);return t(n,r).data}},getJetpackConnectUrlError:function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Ks("jetpack-connect-url",t);return e(n).error}},isGetJetpackConnectUrlRequesting:function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Ks("jetpack-connect-url",t),r=e(n),o=r.lastReceived,c=r.lastRequested;return!(!Object(s.isNil)(c)&&!Object(s.isNil)(o))||c>o}},getActivePlugins:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tt,n="active-plugins",r=t(e,n).data||[];return r.length?r:Object(ye.g)("onboarding",{},(function(e){return e.activePlugins||[]}))}},getActivePluginsError:function(e){return function(){return e("active-plugins").error}},isGetActivePluginsRequesting:function(e){return function(){var t=e("active-plugins"),n=t.lastReceived,r=t.lastRequested;return!(!Object(s.isNil)(r)&&!Object(s.isNil)(n))||r>n}},getPluginActivations:function(e){return function(t){var n={};return t.forEach((function(t){var r=e(Ks("plugin-activate",t)).data;r&&(n[t]=r)})),n}},getPluginInstallations:function(e){return function(t){var n={};return t.forEach((function(t){var r=e(Ks("plugin-install",t)).data;r&&(n[t]=r)})),n}},getPluginInstallationErrors:function(e){return function(t){var n={};return t.forEach((function(t){var r=e(Ks("plugin-install",t)).error;r&&(n[t]=r)})),n}},getPluginActivationErrors:function(e){return function(t){var n={};return t.forEach((function(t){var r=e(Ks("plugin-activate",t)).error;r&&(n[t]=r)})),n}},isPluginActivateRequesting:function(e){return function(){var t=e("plugin-activate"),n=t.lastReceived,r=t.lastRequested;return!(Object(s.isNil)(r)||!Object(s.isNil)(n))||r>n}},isPluginInstallRequesting:function(e){return function(){var t=e("plugin-install"),n=t.lastReceived,r=t.lastRequested;return!(Object(s.isNil)(r)||!Object(s.isNil)(n))||r>n}},isJetpackConnected:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tt,n=Object(ye.g)("onboarding",{},(function(n){return t(e,"active-plugins").data||n.activePlugins}));if(!n.includes("jetpack"))return!1;var r=Object(ye.g)("dataEndpoints",{},(function(n){return t(e,"jetpack-status").data||n.jetpackStatus}));return r&&r.isActive||!1}}},mutations:{activatePlugins:function(e){return function(t){e.update(["plugin-activate"],je()({},"plugin-activate",t))}},installPlugins:function(e){return function(t){e.update(["plugin-install"],je()({},"plugin-install",t))}},updateProfileItems:function(e){return function(t){e.update(["onboarding-profile"],je()({},"onboarding-profile",t))}}}};function ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ql(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ql(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xl(e,t){return e.filter((function(e){return e.startsWith("options")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Zs(n),o="/wc-admin/options?options="+r.join(","),e.abrupt("return",t({path:o}).then(Rl).catch((function(e){return je()({},n,{error:String(e.message)})})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function Bl(e,t,n){return e.filter((function(e){return e.startsWith("options-update")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n({path:"/wc-admin/options",method:"POST",data:t[r]}).then((function(){return Rl(t[r],!0)})).catch((function(e){return je()({},r,{error:e})})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function Rl(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object.keys(e),r=Ks(t?"options-update":"options",n),o={};return n.forEach((function(t){return o[Ks("options",t)]={data:e[t]}})),Tl(je()({},r,{data:n}),o)}var Pl={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a;return St()(xl(e,t))},update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a;return St()(Bl(e,t,n))}},selectors:{getOptions:function(e,t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,o=Ks("options",n),c={},a=t(r,o).data||n;return a.forEach((function(t){var n=Object(ye.g)("preloadOptions",{},(function(n){return e(Ks("options",t)).data||n[t]}));n&&(c[t]=n)})),c}},getOptionsError:function(e){return function(t){return e(Ks("options",t)).error}},isGetOptionsRequesting:function(e){return function(t){var n=e(Ks("options",t)),r=n.lastReceived,o=n.lastRequested;return!(Object(s.isNil)(o)||!Object(s.isNil)(r))||o>r}},isUpdateOptionsRequesting:function(e){return function(t){var n=e(Ks("options-update",t)),r=n.lastReceived,o=n.lastRequested;return!(Object(s.isNil)(o)||!Object(s.isNil)(r))||o>r}}},mutations:{updateOptions:function(e){return function(t){var n=Ks("options-update",Object.keys(t));e.update([n],je()({},n,t))}}}},Wl={"report-items-query-orders":"orders","report-items-query-revenue":"revenue","report-items-query-products":"products","report-items-query-categories":"categories","report-items-query-coupons":"coupons","report-items-query-taxes":"taxes","report-items-query-variations":"variations","report-items-query-downloads":"downloads","report-items-query-customers":"customers","report-items-query-stock":"stock","report-items-query-performance-indicators":"performance-indicators"};var Dl={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a,n=e.filter((function(e){var t=$s(e);return Boolean(Wl[t])}));return n.map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o,c,a,i,s,l,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$s(n),o=Wl[r],c=Zs(n),a={parse:!1,path:Object(Ee.addQueryArgs)("".concat(et,"/reports/").concat(o),c)},e.prev=4,e.next=7,t(a);case 7:return i=e.sent,e.next=10,i.json();case 10:return s=e.sent,l=parseInt(i.headers.get("x-wp-total")),u=parseInt(i.headers.get("x-wp-totalpages")),e.abrupt("return",je()({},n,{data:s,totalResults:l,totalPages:u}));case 16:return e.prev=16,e.t0=e.catch(4),e.abrupt("return",je()({},n,{error:e.t0}));case 19:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t){return e.apply(this,arguments)}}())}},selectors:{getReportItems:function(e,t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tt,o=Ks("report-items-query-".concat(e),n);return t(r,o)||{}}},getReportItemsError:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("report-items-query-".concat(t),n);return e(r).error}},isReportItemsRequesting:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("report-items-query-".concat(t),n),o=e(r),c=o.lastRequested,a=o.lastReceived;return!(!Object(s.isNil)(c)&&!Object(s.isNil)(a))||c>a}}}},Hl=["coupons","downloads","orders","products","revenue","stock","taxes","customers"],Xl={"report-stats-query-orders":"orders","report-stats-query-revenue":"revenue","report-stats-query-products":"products","report-stats-query-categories":"categories","report-stats-query-downloads":"downloads","report-stats-query-coupons":"coupons","report-stats-query-stock":"stock","report-stats-query-taxes":"taxes","report-stats-query-customers":"customers"};var Vl={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a,n=e.filter((function(e){var t=$s(e);return Boolean(Xl[t])}));return n.map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o,c,a,i,s,l,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$s(n),o=Xl[r],c=Zs(n),a={parse:!1},Hl.indexOf(o)>=0?a.path=Object(Ee.addQueryArgs)("".concat(et,"/reports/").concat(o,"/stats"),c):a.path=Object(Ee.addQueryArgs)(o,c),e.prev=5,e.next=8,t(a);case 8:return i=e.sent,e.next=11,i.json();case 11:return s=e.sent,l=parseInt(i.headers.get("x-wp-total")),u=parseInt(i.headers.get("x-wp-totalpages")),e.abrupt("return",je()({},n,{data:s,totalResults:l,totalPages:u}));case 17:return e.prev=17,e.t0=e.catch(5),e.abrupt("return",je()({},n,{error:e.t0}));case 20:case"end":return e.stop()}}),e,null,[[5,17]])})));return function(t){return e.apply(this,arguments)}}())}},selectors:{getReportStats:function(e,t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tt,o=Ks("report-stats-query-".concat(e),n),c=t(r,o)||{};return c}},getReportStatsError:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("report-stats-query-".concat(t),n);return e(r).error}},isReportStatsRequesting:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ks("report-stats-query-".concat(t),n),o=e(r),c=o.lastRequested,a=o.lastReceived;return!(!Object(s.isNil)(c)&&!Object(s.isNil)(a))||c>a}}}};function Il(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Il(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ul(e,t){return e.filter((function(e){return Js(e,"review-query")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r,o,c,a,i,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Zs(n),o=Object(Ee.addQueryArgs)("".concat(et,"/products/reviews"),r),e.prev=2,e.next=5,t({parse:!1,path:o});case 5:return c=e.sent,e.next=8,c.json();case 8:return a=e.sent,i=parseInt(c.headers.get("x-wp-total")),s=a.map((function(e){return e.id})),l=a.reduce((function(e,t){return e[Ks("review",t.id)]={data:t},e}),{}),e.abrupt("return",Fl(je()({},n,{data:s,totalCount:i}),l));case 15:return e.prev=15,e.t0=e.catch(2),e.abrupt("return",je()({},n,{error:e.t0}));case 18:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}())}function Gl(e,t){return e.filter((function(e){return Js(e,"review")})).map((function(e){return function(e,t){var n=Zs(e),r="".concat(et,"/products/reviews/").concat(n);return t({path:r}).then((function(t){return je()({},e,{data:t})})).catch((function(t){return je()({},e,{error:t})}))}(e,t)}))}var Ql={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a;return[].concat(St()(Gl(e,t)),St()(Ul(e,t)))}},selectors:{getReviews:function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,o=Ks("review-query",n),c=t(r,o).data||[],a=c.map((function(t){return e(Ks("review",t)).data||{}}));return a}},getReviewsError:function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Ks("review-query",t);return e(n).error}},getReviewsTotalCount:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,r=Ks("review-query",e);return t(n,r).totalCount||0}},isGetReviewsRequesting:function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Ks("review-query",t),r=e(n),o=r.lastRequested,c=r.lastReceived;return!(!Object(s.isNil)(o)&&!Object(s.isNil)(c))||o>c}}}};function Kl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $l(e,t){return e.filter((function(e){return e.startsWith("settings/")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=et+"/"+n,e.abrupt("return",t({path:r}).then(Zl.bind(null,n)).catch((function(e){return je()({},n,{error:String(e.message)})})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function Jl(e,t,n){return e.filter((function(e){return e.startsWith("settings/")})).map(function(){var e=gr()(regeneratorRuntime.mark((function e(r){var o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=et+"/"+r+"/batch",c=Object.keys(t[r]).map((function(e){return{id:e,value:t[r][e]}})),e.abrupt("return",n({path:o,method:"POST",data:{update:c}}).then(Yl.bind(null,r)).catch((function(e){return je()({},r,{error:e})})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function Zl(e,t){var n={},r=t.map((function(e){return e.id}));return t.forEach((function(t){return n[Ks(e,t.id)]={data:t.value}})),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kl(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(je()({},e,{data:r}),n)}function Yl(e,t){if(void 0===t.update)return"";var n=je()({},e,{lastReceived:Date.now()});return t.update.forEach((function(t){return n[Ks(e,t.id)]={data:t.value}})),n}var eu={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a;return St()($l(e,t))},update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a;return St()(Jl(e,t,n))}},selectors:{getSettings:function(e,t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt,o="settings/".concat(n),c=t(r,o).data||[],a={};if(!c.length){var i=Object(ye.g)("preloadSettings",{});if(i[n])return i[n]}return c.forEach((function(t){a[t]=Object(ye.g)("preloadSettings",{},(function(n){return e(Ks(o,t)).data||n[t]}))})),a}},getSettingsError:function(e){return function(t){return e("settings/".concat(t)).error}},isGetSettingsRequesting:function(e){return function(t){var n=e("settings/".concat(t)),r=n.lastReceived,o=n.lastRequested;if(Object(s.isNil)(o)||Object(s.isNil)(r))return!0;if("wc_admin"!==t)return o>r;var c=oo.length?oo[0].name:"woocommerce_actionable_order_statuses",a=e(Ks("settings/wc_admin",c)).lastReceived;return Object(s.isNil)(a)?o>r:o>a}}},mutations:{updateSettings:function(e){return function(t){Object.keys(t).map((function(n){return e.update(["settings/"+n],je()({},"settings/"+n,t[n]))}))}}}};function tu(e,t){if(e.includes("current-user-data")){return[t({path:"/wp/v2/users/me?context=edit"}).then(ru).catch((function(e){return je()({},"current-user-data",{error:String(e.message)})}))]}return[]}function nu(e,t,n){if(e.includes("current-user-data")){var r=Object(s.pick)(t["current-user-data"],["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"]);return[n({path:"/wp/v2/users/me",method:"POST",data:{woocommerce_meta:Object(s.mapValues)(r,JSON.stringify)}}).then(ru).catch((function(e){return je()({},"current-user-data",{error:e})}))]}return[]}function ru(e){var t=Object(s.mapValues)(e.woocommerce_meta,(function(e){return e&&0!==e.length?JSON.parse(e):""}));return je()({},"current-user-data",{data:t})}var ou={operations:{read:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le.a;return St()(tu(e,t))},update:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le.a;return St()(nu(e,t,n))}},selectors:{getCurrentUserData:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tt;return Object(ye.g)("currentUserData",{},(function(n){return t(e,"current-user-data").data||n}))}}},mutations:{updateCurrentUserData:function(e){return function(t){e.update(["current-user-data"],je()({},"current-user-data",t))}}}};function cu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function au(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cu(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iu,su={name:"wcApi",mutations:au({},el.mutations,{},al.mutations,{},vl.mutations,{},Sl.mutations,{},Pl.mutations,{},eu.mutations,{},ou.mutations),selectors:au({},ul.selectors,{},al.selectors,{},vl.selectors,{},Sl.selectors,{},Pl.selectors,{},Dl.selectors,{},Vl.selectors,{},Ql.selectors,{},eu.selectors,{},ou.selectors),operations:{read:function(e){return document.hidden?[]:[].concat(St()(ul.operations.read(e)),St()(al.operations.read(e)),St()(vl.operations.read(e)),St()(Sl.operations.read(e)),St()(Pl.operations.read(e)),St()(Dl.operations.read(e)),St()(Vl.operations.read(e)),St()(Ql.operations.read(e)),St()(eu.operations.read(e)),St()(ou.operations.read(e)))},update:function(e,t){return[].concat(St()(el.operations.update(e,t)),St()(al.operations.update(e,t)),St()(vl.operations.update(e,t)),St()(Sl.operations.update(e,t)),St()(Pl.operations.update(e,t)),St()(eu.operations.update(e,t)),St()(ou.operations.update(e,t)))},updateLocally:function(e,t){return St()(al.operations.updateLocally(e,t))}}};Object(a.registerGenericStore)("wc-api",{getSelectors:function(){return function(e){return function(e){var t=[];return{selectors:iu.getSelectors(t),onComplete:function(){0===t.length?iu.clearComponentRequirements(e):iu.setComponentRequirements(e,t)},onUnmount:function(){iu.clearComponentRequirements(e)}}}(e&&e.component?e.component:e)}},getActions:function(){return iu.getMutations()},subscribe:(iu=Qs("wc-api",su)).subscribe});var lu=document.getElementById("root");if(lu)Object(c.render)(Object(c.createElement)(Ts,null),lu);else{var uu=document.getElementById("woocommerce-embedded-root");Object(c.render)(Object(c.createElement)(xs,null),uu),uu.classList.remove("is-embed-loading");var du=document.getElementById("wpbody-content"),pu=du.querySelector(".wrap"),mu=document.createElement("div");Object(c.render)(Object(c.createElement)("div",{className:"woocommerce-layout"},Object(c.createElement)(Ns,null)),du.insertBefore(mu,pu))}},function(e,t,n){"use strict";var r=n(22),o=n(15),c=n(14),a=n(17),i=n(18),s=n(5),l=n(19),u=n(0),d=n(3),p=n(59),m=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document.querySelector("body");return n&&n.appendChild(t),t},b=function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""},h="",f=function(e){return e=e.replace(/<[^<>]+>/g," "),h===e&&(e+=" "),h=e,e};Object(p.a)((function(){var e=document.getElementById("a11y-speak-polite"),t=document.getElementById("a11y-speak-assertive");null===e&&m("polite"),null===t&&m("assertive")}));var g=function(e,t){b(),e=f(e);var n=document.getElementById("a11y-speak-polite"),r=document.getElementById("a11y-speak-assertive");r&&"assertive"===t?r.textContent=e:n&&(n.textContent=e)},v=n(70);t.a=Object(v.a)((function(e){return function(t){function n(){var e;return Object(o.a)(this,n),(e=Object(a.a)(this,Object(i.a)(n).apply(this,arguments))).debouncedSpeak=Object(d.debounce)(e.speak.bind(Object(s.a)(e)),500),e}return Object(l.a)(n,t),Object(c.a)(n,[{key:"speak",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"polite";g(e,t)}},{key:"componentWillUnmount",value:function(){this.debouncedSpeak.cancel()}},{key:"render",value:function(){return Object(u.createElement)(e,Object(r.a)({},this.props,{speak:this.speak,debouncedSpeak:this.debouncedSpeak}))}}]),n}(u.Component)}),"withSpokenMessages")},,function(e,t,n){"use strict";n.r(t);var r=n(35),o=n.n(r),c=n(0),a=n(4),i=n(403),s=n(396),l=n(762),u=n(3),d=n(6),p=n.n(d),m=n(91),b=n(68);var h=Object(m.a)((function(e){var t=e.label,n=e.className,r=e.selected,o=e.help,a=e.instanceId,i=e.onChange,s=e.options,l=void 0===s?[]:s,d="inspector-radio-control-".concat(a),m=function(e){return i(e.target.value)};return!Object(u.isEmpty)(l)&&Object(c.createElement)(b.a,{label:t,id:d,help:o,className:p()(n,"components-radio-control")},l.map((function(e,t){return Object(c.createElement)("div",{key:"".concat(d,"-").concat(t),className:"components-radio-control__option"},Object(c.createElement)("input",{id:"".concat(d,"-").concat(t),className:"components-radio-control__input",type:"radio",name:d,value:e.value,onChange:m,checked:e.value===r,"aria-describedby":o?"".concat(d,"__help"):void 0}),Object(c.createElement)("label",{htmlFor:"".concat(d,"-").concat(t)},e.label))})))})),f=n(87),g=function(e){var t={};return e.firstName||(t.firstName="First name is required"),e.lastName.length<3&&(t.lastName="Last name must be at least 3 characters"),t},v=function(e){return console.log(e)},M={firstName:"",lastName:"",select:"3",checkbox:!0,radio:"2"};t.default=function(){return Object(c.createElement)(a.Form,{validate:g,onSubmitCallback:v,initialValues:M},(function(e){var t=e.getInputProps,n=e.values,r=e.errors,a=e.handleSubmit;return Object(c.createElement)("div",null,Object(c.createElement)(i.a,o()({label:"First Name"},t("firstName"))),Object(c.createElement)(i.a,o()({label:"Last Name"},t("lastName"))),Object(c.createElement)(s.a,o()({label:"Select",options:[{label:"Option 1",value:"1"},{label:"Option 2",value:"2"},{label:"Option 3",value:"3"}]},t("select"))),Object(c.createElement)(l.a,o()({label:"Checkbox"},t("checkbox"))),Object(c.createElement)(h,o()({label:"Radio",options:[{label:"Option 1",value:"1"},{label:"Option 2",value:"2"},{label:"Option 3",value:"3"}]},t("radio"))),Object(c.createElement)(f.a,{isPrimary:!0,onClick:a,disabled:Object.keys(r).length},"Submit"),Object(c.createElement)("br",null),Object(c.createElement)("br",null),"Values: ",JSON.stringify(n),Object(c.createElement)("br",null),"Errors: ",JSON.stringify(r),Object(c.createElement)("br",null))}))}},,,,,,function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(91),i=n(68),s=n(79);t.a=Object(a.a)((function(e){var t=e.label,n=e.className,a=e.heading,l=e.checked,u=e.help,d=e.instanceId,p=e.onChange,m=Object(o.a)(e,["label","className","heading","checked","help","instanceId","onChange"]),b="inspector-checkbox-control-".concat(d);return Object(c.createElement)(i.a,{label:a,id:b,help:u,className:n},Object(c.createElement)("span",{className:"components-checkbox-control__input-container"},Object(c.createElement)("input",Object(r.a)({id:b,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:function(e){return p(e.target.checked)},checked:l,"aria-describedby":u?b+"__help":void 0},m)),l?Object(c.createElement)(s.a,{icon:"yes",className:"components-checkbox-control__checked",role:"presentation"}):null),Object(c.createElement)("label",{className:"components-checkbox-control__label",htmlFor:b},t))}))},function(e,t,n){"use strict";(function(e){var r=n(100),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(66))}]);
24
  *
25
  * This source code is licensed under the MIT license found in the
26
  * LICENSE file in the root directory of this source tree.
27
+ */Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,c=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,f=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.fundamental"):60117,M=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case a:case s:case i:case b:return e;default:switch(e=e&&e.$$typeof){case u:case m:case g:case f:case l:return e;default:return t}}case c:return t}}}function w(e){return y(e)===p}t.typeOf=y,t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=m,t.Fragment=a,t.Lazy=g,t.Memo=f,t.Portal=c,t.Profiler=s,t.StrictMode=i,t.Suspense=b,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===b||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===u||e.$$typeof===m||e.$$typeof===v||e.$$typeof===M||e.$$typeof===O)},t.isAsyncMode=function(e){return w(e)||y(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return y(e)===m},t.isFragment=function(e){return y(e)===a},t.isLazy=function(e){return y(e)===g},t.isMemo=function(e){return y(e)===f},t.isPortal=function(e){return y(e)===c},t.isProfiler=function(e){return y(e)===s},t.isStrictMode=function(e){return y(e)===i},t.isSuspense=function(e){return y(e)===b}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){const r=n(450),o=n(451),c=n(182),a=n(240),i=n(239),s=n(238),{merge:l,checkSanitizeDeprecation:u,escape:d}=n(106),{getDefaults:p,changeDefaults:m,defaults:b}=n(125);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=l({},h.defaults,t||{}),u(t);const c=t.highlight;let a,i,s=0;try{a=r.lex(e,t)}catch(e){return n(e)}i=a.length;const d=function(e){if(e)return t.highlight=c,n(e);let r;try{r=o.parse(a,t)}catch(t){e=t}return t.highlight=c,e?n(e):n(null,r)};if(!c||c.length<3)return d();if(delete t.highlight,!i)return d();for(;s<a.length;s++)!function(e){"code"!==e.type?--i||d():c(e.text,e.lang,(function(t,n){return t?d(t):null==n||n===e.text?--i||d():(e.text=n,e.escaped=!0,void(--i||d()))}))}(a[s])}else try{return t=l({},h.defaults,t||{}),u(t),o.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return l(h.defaults,e),m(h.defaults),h},h.getDefaults=p,h.defaults=b,h.Parser=o,h.parser=o.parse,h.Renderer=c,h.TextRenderer=a,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=i,h.inlineLexer=i.output,h.Slugger=s,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse('[{"component":"AdvancedFilters"},{"component":"AnimationSlider"},{"component":"Calendar"},{"component":"Card"},{"component":"Chart"},{"component":"CompareFilter"},{"component":"Count"},{"component":"Date"},{"component":"DateRangeFilterPicker"},{"component":"DropdownButton"},{"component":"EllipsisMenu"},{"component":"EmptyContent"},{"component":"FilterPicker"},{"component":"Flag"},{"component":"Form"},{"component":"Gravatar"},{"component":"ImageAsset"},{"component":"ImageUpload"},{"component":"Link"},{"component":"List"},{"component":"OrderStatus"},{"component":"Pagination"},{"component":"ProductImage"},{"component":"Rating"},{"component":"ScrollTo"},{"component":"Search"},{"component":"SearchListControl"},{"component":"Section"},{"component":"SegmentedSelection"},{"component":"SelectControl"},{"component":"Spinner"},{"component":"SplitButton"},{"component":"Stepper"},{"component":"Summary"},{"component":"Table"},{"component":"Tag"},{"component":"TextControl"},{"component":"TextControlWithAffixes"},{"component":"ViewMoreList"},{"component":"WebPreview"}]')},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(35)),c=r(n(235)),a=n(29),i=r(a),s=r(n(163)),l=r(n(16)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var f,g,v=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(l(t))}))},t}return s(t,e),t}(v),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(l(t))}))},t}s(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function y(e,t){f={fn:e,transform:t}}function w(e){g=e}var z,_=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},A=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function j(e){z=e}var k,E=function(){return Date.now()};function C(e){k=e}var L,N,S=function(e){return e.current};function q(e){L=e}var T=Object.freeze({get applyAnimatedValues(){return f},injectApplyAnimatedValues:y,get colorNames(){return g},injectColorNames:w,get requestFrame(){return _},get cancelFrame(){return A},injectFrame:function(e,t){_=e,A=t},get interpolation(){return z},injectStringInterpolator:j,get now(){return E},injectNow:function(e){E=e},get defaultElement(){return k},injectDefaultElement:C,get animatedApi(){return S},injectAnimatedApi:function(e){S=e},get createAnimatedStyle(){return L},injectCreateAnimatedStyle:q,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),x=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:L(t.style)}):t,r.update=n,r.attach(),r}return s(t,e),t}(O),B=!1,R=new Set,P=function e(){if(!B)return!1;var t=E(),n=R,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var a=c,i=!1,s=0;s<a.configs.length;s++){for(var l=a.configs[s],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var m=l.animatedValues[p];if(!m.done){var b=l.fromValues[p],h=l.toValues[p],f=m.lastPosition,g=h instanceof v,M=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)m.setValue(h),m.done=!0;else if("string"!=typeof b&&"string"!=typeof h){if(void 0!==l.duration)f=b+l.easing((t-m.startTime)/l.duration)*(h-b),u=t>=m.startTime+l.duration;else if(l.decay)f=b+M/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-f)<.1)&&(h=f);else{d=void 0!==m.lastTime?m.lastTime:t,M=void 0!==m.lastVelocity?m.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),y=0;y<O;++y){f+=1*(M+=1*((-l.tension*(f-h)+-l.friction*M)/l.mass)/1e3)/1e3}var w=!(!l.clamp||0===l.tension)&&(b<h?f>h:f<h),z=Math.abs(M)<=l.precision,A=0===l.tension||Math.abs(h-f)<=l.precision;u=w||z&&A,m.lastVelocity=M,m.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(m.value!==h&&(f=h),m.done=!0):i=!0,m.setValue(f),m.lastPosition=f}else m.setValue(h),m.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),i||(R.delete(a),a.stop(!0))}return R.size?N?N():_(e):B=!1,B};function W(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return W({range:e,output:t,extrapolate:n});if(z&&"string"==typeof e.output[0])return z(e);var r=e,o=r.output,c=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",i=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,a,i,s){var l=s?s(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===i)return l;"clamp"===i&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=c(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,c[t],c[t+1],o[t],o[t+1],s,a,i,r.map)}}var D=function(e){function t(n,r,o,c){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof M&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=W(r,o,c),a}s(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=W(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(M);var H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}s(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new D(this,e,t,n)},t}(v),X=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}s(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new D(this,e,t)},t}(M),V=0,I=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=V++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),n=t.delay,r=void 0===n?0:n,a=t.to,i=c(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},i,{delay:r,to:a}));else if(a){var s={};Object.entries(a).forEach((function(e){var t,n=e[0],c=e[1],a=o({to:(t={},t[n]=c,t),delay:b(r,n)},i),l=s[a.delay]&&s[a.delay].to;s[a.delay]=o({},s[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,a=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var i=t.delay,s=c(t,["delay"]),l=function(t){o===a.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(s.to)||u.fun(s.to);i?setTimeout((function(){r===n.guid&&(d?n.runAsync(s,l):n.diff(s).start(l))}),i):d?n.runAsync(s,l):n.diff(s).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,R.has(t)||R.add(t),B||(B=!0,_(N||P));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,R.has(t)&&R.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),a=this.local,i=Promise.resolve(void 0);if(u.arr(r.to))for(var s=function(e){var t=e,c=o({},r,h(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},l=0;l<r.to.length;l++)s(l);else if(u.fun(r.to)){var d,p=0;i=i.then((function(){return r.to((function(e){var t=o({},r,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,a=n.to,i=void 0===a?{}:a,s=n.config,l=void 0===s?{}:s,d=n.reverse,h=n.attach,f=n.reset,v=n.immediate;if(d){var M=[i,c];c=M[0],i=M[1]}this.merged=o({},c,this.merged,i),this.hasChanged=!1;var O=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],i=e[r]||{},s=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),M=!s&&!h&&!d,y=u.und(c[r])?a:c[r],w=s||h?a:d?a:1,_=b(l,r);O&&(w=O.animations[r].parent);var A,j=i.parent,k=i.interpolation,C=m(O?w.getPayload():w),L=a;M&&(L=z({range:[0,1],output:[a,a]})(1));var N,S=k&&k.getValue(),q=!u.und(j)&&i.animatedValues.some((function(e){return!e.done})),T=!u.equ(L,S),x=!u.equ(L,i.previous),B=!u.equ(_,i.config);if(f||x&&T||B){var R;if(s||d)j=k=i.parent||new H(y);else if(h)j=k=i.parent||new X(y);else if(M){var P=i.interpolation&&i.interpolation.calc(i.parent.value);P=void 0===P||f?y:P,i.parent?(j=i.parent).setValue(0,!1):j=new H(0);var W={output:[P,a]};i.interpolation?(k=i.interpolation,i.interpolation.updateConfig(W)):k=j.interpolate(W)}return C=m(O?w.getPayload():w),A=m(j.getPayload()),f&&!M&&j.setValue(y,!1),t.hasChanged=!0,A.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=q?e.lastVelocity:void 0,e.lastTime=q?e.lastTime:void 0,e.startTime=E(),e.done=!1,e.animatedStyles.clear()})),b(v,r)&&j.setValue(M?w:a,!1),o({},e,((R={})[r]=o({},i,{name:r,parent:j,interpolation:k,animatedValues:A,toValues:C,previous:L,config:_,fromValues:m(j.getValue()),immediate:b(v,r),initialVelocity:p(_.velocity,0),clamp:p(_.clamp,!1),precision:p(_.precision,.01),tension:p(_.tension,170),friction:p(_.friction,26),mass:p(_.mass,1),duration:_.duration,easing:p(_.easing,(function(e){return e})),decay:_.decay}),R))}return T?e:(M&&(j.setValue(1,!1),k.updateConfig({output:[L,L]})),j.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:L}),N)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),F=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=u.fun(t),c=a.useMemo((function(){var n;return(r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new I,a=o?b(t,r,c):t[r];return 0===r&&(n=a.ref),c.update(a),n||c.start(),c})),n])}),[e]),i=c[0],s=c[1];r.current=i;a.useImperativeHandle(s,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var l=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?b(e,n,t):e[n]),s||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||l(t):s||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},U=0,G=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},Q=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,a=c(e,["items","keys"]);return t=m(void 0!==t?t:null),o({items:t,keys:G(t,r)},a)};function K(e,t){var n=function(){if(o){if(c>=r.length)return"break";a=r[c++]}else{if((c=r.next()).done)return"break";a=c.value}var n=a.key,i=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=f.transform(t)),n.payload=t,n}return s(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+",Y=Z+"%";function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var te=new RegExp("rgb"+ee(Z,Z,Z)),ne=new RegExp("rgba"+ee(Z,Z,Z,Z)),re=new RegExp("hsl"+ee(Z,Y,Y)),oe=new RegExp("hsla"+ee(Z,Y,Y,Z)),ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,se=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),a=le(o,r,e),i=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*a)<<16|Math.round(255*i)<<8}function de(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function pe(e){return(parseFloat(e)%360+360)%360/360}function me(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function be(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function he(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=te.exec(t))?(de(n[1])<<24|de(n[2])<<16|de(n[3])<<8|255)>>>0:(n=ne.exec(t))?(de(n[1])<<24|de(n[2])<<16|de(n[3])<<8|me(n[4]))>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=se.exec(t))?parseInt(n[1],16)>>>0:(n=ae.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=re.exec(t))?(255|ue(pe(n[1]),be(n[2]),be(n[3])))>>>0:(n=oe.exec(t))?(ue(pe(n[1]),be(n[2]),be(n[3]))|me(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var fe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=new RegExp("("+Object.keys(J).join("|")+")","g"),Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oe=["Webkit","Ms","Moz","O"];function ye(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Me.hasOwnProperty(e)&&Me[e]?(""+t).trim():t+"px"}Me=Object.keys(Me).reduce((function(e,t){return Oe.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Me);var we={};q((function(e){return new $(e)})),C("div"),j((function(e){var t=e.output.map((function(e){return e.replace(ge,he)})).map((function(e){return e.replace(ve,he)})),n=t[0].match(fe).map((function(){return[]}));t.forEach((function(e){e.match(fe).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(fe).map((function(t,r){return W(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(fe,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),y((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,i=c(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ye(l,n[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in i){var m=s?p:we[p]||(we[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,i[p])}}),(function(e){return e}));var ze,_e,Ae=(ze=function(e){return a.forwardRef((function(t,n){var r=d(),s=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),m=a.useCallback((function(e){var t=l.current;l.current=new x(e,(function(){var e=!1;p.current&&(e=f.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){s.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return S(p,s,r)})),m(t);var b,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,c(h,["scrollTop","scrollLeft"])),v=(b=e,!u.fun(b)||b.prototype instanceof i.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return i.createElement(e,o({},g,{ref:v}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ze(n),e}),ze)}),je=Ae(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ae,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=P,t.animated=je,t.a=je,t.interpolate=function(e,t,n){return e&&new D(e,t,n)},t.Globals=T,t.useSpring=function(e){var t=u.fun(e),n=F(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=u.fun(t),c=b(t),i=a.useRef(),s=F(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},c,{config:b(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),l=s[0],d=s[1],p=s[2],m=a.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=i.current[r];return o({},e,{config:b(e.config||c.config,t),attach:a&&function(){return a}})}))}}),[e,c.reverse]);return a.useEffect((function(){n.current&&!r&&m(t)})),a.useEffect((function(){n.current=!0}),[]),r?[l,m,p]:l},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),i=Q(r),s=i.lazy,l=void 0!==s&&s,u=(i.unique,i.reset),p=void 0!==u&&u,m=(i.enter,i.leave,i.update,i.onDestroyed),h=(i.keys,i.items,i.onFrame),f=i.onRest,g=i.onStart,v=i.ref,M=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),y=a.useRef(!1),w=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!y.current&&new Map,forceUpdate:O});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,a=c(e,["first","prevProps"]),i=Q(t),s=i.items,l=i.keys,u=i.initial,d=i.from,p=i.enter,m=i.leave,h=i.update,f=i.trail,g=void 0===f?0:f,v=i.unique,M=i.config,O=i.order,y=void 0===O?["enter","leave","update"]:O,w=Q(r),z=w.keys,_=w.items,A=o({},a.current),j=[].concat(a.deleted),k=Object.keys(A),E=new Set(k),C=new Set(l),L=l.filter((function(e){return!E.has(e)})),N=a.transitions.filter((function(e){return!e.destroyed&&!C.has(e.originalKey)})).map((function(e){return e.originalKey})),S=l.filter((function(e){return E.has(e)})),q=-g;for(;y.length;){switch(y.shift()){case"enter":L.forEach((function(e,t){v&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var r=l.indexOf(e),o=s[r],c=n&&void 0!==u?"initial":"enter";A[e]={slot:c,originalKey:e,key:v?String(e):U++,item:o,trail:q+=g,config:b(M,o,c),from:b(n&&void 0!==u?u||{}:d,o),to:b(p,o)}}));break;case"leave":N.forEach((function(e){var t=z.indexOf(e),n=_[t];j.unshift(o({},A[e],{slot:"leave",destroyed:!0,left:z[Math.max(0,t-1)],right:z[Math.min(z.length,t+1)],trail:q+=g,config:b(M,n,"leave"),to:b(m,n)})),delete A[e]}));break;case"update":S.forEach((function(e){var t=l.indexOf(e),n=s[t];A[e]=o({},A[e],{item:n,slot:"update",trail:q+=g,config:b(M,n,"update"),to:b(h,n)})}))}}var T=l.map((function(e){return A[e]}));return j.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=T.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),T=[].concat(T.slice(0,t),[r],T.slice(t))})),o({},a,{changed:L.length||N.length||S.length,first:n&&0===L.length,transitions:T,current:A,deleted:j,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,a=e.trail,i=e.key,s=e.item;w.current.instances.has(i)||w.current.instances.set(i,new I);var u=w.current.instances.get(i),d=o({},M,{to:r,from:n,config:c,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||l||K(w,i),m&&m(s)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||l)&&w.current.deleted.length>0&&K(w),f&&f(s,t,n))},onStart:g&&function(){return g(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),w.current.paused||u.start()})),a.useEffect((function(){return w.current.mounted=y.current=!0,function(){w.current.mounted=y.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var a=c.controllers;if(a.length){var i=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=F},function(e,t,n){var r=n(506);e.exports=m,e.exports.parse=c,e.exports.compile=function(e,t){return i(c(e,t),t)},e.exports.tokensToFunction=i,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function c(e,t){for(var n,r=[],c=0,a=0,i="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],m=n.index;if(i+=e.slice(a,m),a=m+d.length,p)i+=p[1];else{var b=e[a],h=n[2],f=n[3],g=n[4],v=n[5],M=n[6],O=n[7];i&&(r.push(i),i="");var y=null!=h&&null!=b&&b!==h,w="+"===M||"*"===M,z="?"===M||"*"===M,_=n[2]||u,A=g||v;r.push({name:f||c++,prefix:h||"",delimiter:_,optional:z,repeat:w,partial:y,asterisk:!!O,pattern:A?l(A):O?".*":"[^"+s(_)+"]+?"})}}return a<e.length&&(i+=e.substr(a)),i&&r.push(i),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function i(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",d(t)));return function(t,o){for(var c="",i=t||{},s=(o||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var d,p=i[u.name];if(null==p){if(u.optional){u.partial&&(c+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var m=0;m<p.length;m++){if(d=s(p[m]),!n[l].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");c+=(0===m?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[l].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');c+=u.prefix+d}}else c+=u}return c}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,c=!1!==n.end,a="",i=0;i<e.length;i++){var l=e[i];if("string"==typeof l)a+=s(l);else{var p=s(l.prefix),m="(?:"+l.pattern+")";t.push(l),l.repeat&&(m+="(?:"+p+m+")*"),a+=m=l.optional?l.partial?p+"("+m+")?":"(?:"+p+"("+m+"))?":p+"("+m+")"}}var b=s(n.delimiter||"/"),h=a.slice(-b.length)===b;return o||(a=(h?a.slice(0,-b.length):a)+"(?:"+b+"(?=$))?"),a+=c?"$":o&&h?"":"(?="+b+"|$)",u(new RegExp("^"+a,d(n)),t)}function m(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(m(e[o],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return p(c(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";(function(e,r){var o,c=n(368);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=Object(c.a)(o);t.a=a}).call(this,n(57),n(507)(e))},,,function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(3),i=n(39),s=n(15),l=n(14),u=n(17),d=n(18),p=n(5),m=n(19),b=n(52);var h=function(e){function t(){var e;return Object(s.a)(this,t),(e=Object(u.a)(this,Object(d.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(p.a)(e)),e.bindContainer=e.bindContainer.bind(Object(p.a)(e)),e.getFocusableContext=e.getFocusableContext.bind(Object(p.a)(e)),e.getFocusableIndex=e.getFocusableIndex.bind(Object(p.a)(e)),e}return Object(m.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}},{key:"componentWillUnmount",value:function(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}},{key:"bindContainer",value:function(e){var t=this.props.forwardedRef;this.container=e,Object(a.isFunction)(t)?t(e):t&&"current"in t&&(t.current=e)}},{key:"getFocusableContext",value:function(e){var t=(this.props.onlyBrowserTabstops?b.a.tabbable:b.a.focusable).find(this.container),n=this.getFocusableIndex(t,e);return n>-1&&e?{index:n,target:e,focusables:t}:null}},{key:"getFocusableIndex",value:function(e,t){var n=e.indexOf(t);if(-1!==n)return n}},{key:"onKeyDown",value:function(e){this.props.onKeyDown&&this.props.onKeyDown(e);var t=this.getFocusableContext,n=this.props,r=n.cycle,o=void 0===r||r,c=n.eventToOffset,i=n.onNavigate,s=void 0===i?a.noop:i,l=n.stopNavigationEvents,u=c(e);if(void 0!==u&&l&&(e.stopImmediatePropagation(),"menuitem"===e.target.getAttribute("role")&&e.preventDefault()),u){var d=t(document.activeElement);if(d){var p=d.index,m=d.focusables,b=o?function(e,t,n){var r=e+n;return r<0?t+r:r>=t?r-t:r}(p,m.length,u):p+u;b>=0&&b<m.length&&(m[b].focus(),s(b,m[b]))}}}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({ref:this.bindContainer},Object(a.omit)(n,["stopNavigationEvents","eventToOffset","onNavigate","cycle","onlyBrowserTabstops","forwardedRef"])),t)}}]),t}(c.Component),f=function(e,t){return Object(c.createElement)(h,Object(r.a)({},e,{forwardedRef:t}))};f.displayName="NavigableContainer";var g=Object(c.forwardRef)(f);t.a=Object(c.forwardRef)((function(e,t){var n=e.role,s=void 0===n?"menu":n,l=e.orientation,u=void 0===l?"vertical":l,d=Object(o.a)(e,["role","orientation"]);return Object(c.createElement)(g,Object(r.a)({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:s,"aria-orientation":"presentation"===s?null:u,eventToOffset:function(e){var t=e.keyCode,n=[i.DOWN],r=[i.UP];return"horizontal"===u&&(n=[i.RIGHT],r=[i.LEFT]),"both"===u&&(n=[i.RIGHT,i.DOWN],r=[i.LEFT,i.UP]),Object(a.includes)(n,t)?1:Object(a.includes)(r,t)?-1:void 0}},d))}))},,function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){const{noopTest:r,edit:o,merge:c}=n(106),a={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};a.def=o(a.def).replace("label",a._label).replace("title",a._title).getRegex(),a.bullet=/(?:[*+-]|\d{1,9}\.)/,a.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,a.item=o(a.item,"gm").replace(/bull/g,a.bullet).getRegex(),a.list=o(a.list).replace(/bull/g,a.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+a.def.source+")").getRegex(),a._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",a._comment=/<!--(?!-?>)[\s\S]*?-->/,a.html=o(a.html,"i").replace("comment",a._comment).replace("tag",a._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a.paragraph=o(a._paragraph).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.blockquote=o(a.blockquote).replace("paragraph",a.paragraph).getRegex(),a.normal=c({},a),a.gfm=c({},a.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),a.pedantic=c({},a.normal,{html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",a._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:o(a.normal._paragraph).replace("hr",a.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const i={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};i.em=o(i.em).replace(/punctuation/g,i._punctuation).getRegex(),i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=o(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=o(i.tag).replace("comment",a._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,i._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=o(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=o(i.reflink).replace("label",i._label).getRegex(),i.normal=c({},i),i.pedantic=c({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=c({},i.normal,{escape:o(i.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),i.gfm.url=o(i.gfm.url,"i").replace("email",i.gfm._extended_email).getRegex(),i.breaks=c({},i.gfm,{br:o(i.br).replace("{2,}","*").getRegex(),text:o(i.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:a,inline:i}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(182),{defaults:o}=n(125),{inline:c}=n(237),{findClosingBracket:a,escape:i}=n(106);e.exports=class e{constructor(e,t){if(this.options=t||o,this.links=e,this.rules=c.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=c.pedantic:this.options.gfm&&(this.options.breaks?this.rules=c.breaks:this.rules=c.gfm)}static get rules(){return c}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,o,c,s,l,u="";for(;t;)if(s=this.rules.escape.exec(t))t=t.substring(s[0].length),u+=i(s[1]);else if(s=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),t=t.substring(s[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0];else if(s=this.rules.link.exec(t)){const r=a(s[2],"()");if(r>-1){const e=(0===s[0].indexOf("!")?5:4)+s[1].length+r;s[2]=s[2].substring(0,r),s[0]=s[0].substring(0,e).trim(),s[3]=""}t=t.substring(s[0].length),this.inLink=!0,o=s[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o),n?(o=n[1],c=n[3]):c=""):c=s[3]?s[3].slice(1,-1):"",o=o.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(s,{href:e.escapes(o),title:e.escapes(c)}),this.inLink=!1}else if((s=this.rules.reflink.exec(t))||(s=this.rules.nolink.exec(t))){if(t=t.substring(s[0].length),n=(s[2]||s[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){u+=s[0].charAt(0),t=s[0].substring(1)+t;continue}this.inLink=!0,u+=this.outputLink(s,n),this.inLink=!1}else if(s=this.rules.strong.exec(t))t=t.substring(s[0].length),u+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(t))t=t.substring(s[0].length),u+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(t))t=t.substring(s[0].length),u+=this.renderer.codespan(i(s[2].trim(),!0));else if(s=this.rules.br.exec(t))t=t.substring(s[0].length),u+=this.renderer.br();else if(s=this.rules.del.exec(t))t=t.substring(s[0].length),u+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(t))t=t.substring(s[0].length),"@"===s[2]?(r=i(this.mangle(s[1])),o="mailto:"+r):(r=i(s[1]),o=r),u+=this.renderer.link(o,null,r);else if(this.inLink||!(s=this.rules.url.exec(t))){if(s=this.rules.text.exec(t))t=t.substring(s[0].length),this.inRawBlock?u+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0]):u+=this.renderer.text(i(this.smartypants(s[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===s[2])r=i(s[0]),o="mailto:"+r;else{do{l=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(l!==s[0]);r=i(s[0]),o="www."===s[1]?"http://"+r:r}t=t.substring(s[0].length),u+=this.renderer.link(o,null,r)}return u}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?i(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,i(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",o=0;for(;o<t;o++)n=e.charCodeAt(o),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.keys,o=Object.freeze,c=Object.seal,a="undefined"!=typeof Reflect&&Reflect,i=a.apply,s=a.construct;i||(i=function(e,t,n){return e.apply(t,n)}),o||(o=function(e){return e}),c||(c=function(e){return e}),s||(s=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var l=z(Array.prototype.forEach),u=z(Array.prototype.indexOf),d=z(Array.prototype.join),p=z(Array.prototype.pop),m=z(Array.prototype.push),b=z(Array.prototype.slice),h=z(String.prototype.toLowerCase),f=z(String.prototype.match),g=z(String.prototype.replace),v=z(String.prototype.indexOf),M=z(String.prototype.trim),O=z(RegExp.prototype.test),y=_(RegExp),w=_(TypeError);function z(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return i(e,t,r)}}function _(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return s(e,n)}}function A(e,r){t&&t(e,null);for(var o=r.length;o--;){var c=r[o];if("string"==typeof c){var a=h(c);a!==c&&(n(r)||(r[o]=a),c=a)}e[c]=!0}return e}function j(t){var n={},r=void 0;for(r in t)i(e,t,[r])&&(n[r]=t[r]);return n}var k=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),E=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),C=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),N=o(["#text"]),S=o(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","minlength","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),q=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),T=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),x=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=c(/\{\{[\s\S]*|[\s\S]*\}\}/gm),R=c(/<%[\s\S]*|[\s\S]*%>/gm),P=c(/^data-[\-\w.\u00B7-\uFFFF]/),W=c(/^aria-[\-\w]+$/),D=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=c(/^(?:\w+script|data):/i),X=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function I(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var F=function(){return"undefined"==typeof window?null:window},U=function(e,t){if("object"!==(void 0===e?"undefined":V(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F(),n=function(t){return e(t)};if(n.version="2.0.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var c=t.document,a=!1,i=!1,s=t.document,z=t.DocumentFragment,_=t.HTMLTemplateElement,G=t.Node,Q=t.NodeFilter,K=t.NamedNodeMap,$=void 0===K?t.NamedNodeMap||t.MozNamedAttrMap:K,J=t.Text,Z=t.Comment,Y=t.DOMParser,ee=t.trustedTypes;if("function"==typeof _){var te=s.createElement("template");te.content&&te.content.ownerDocument&&(s=te.content.ownerDocument)}var ne=U(ee,c),re=ne?ne.createHTML(""):"",oe=s,ce=oe.implementation,ae=oe.createNodeIterator,ie=oe.getElementsByTagName,se=oe.createDocumentFragment,le=c.importNode,ue={};n.isSupported=ce&&void 0!==ce.createHTMLDocument&&9!==s.documentMode;var de=B,pe=R,me=P,be=W,he=H,fe=X,ge=D,ve=null,Me=A({},[].concat(I(k),I(E),I(C),I(L),I(N))),Oe=null,ye=A({},[].concat(I(S),I(q),I(T),I(x))),we=null,ze=null,_e=!0,Ae=!0,je=!1,ke=!1,Ee=!1,Ce=!1,Le=!1,Ne=!1,Se=!1,qe=!1,Te=!1,xe=!1,Be=!0,Re=!0,Pe=!1,We={},De=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),He=A({},["audio","video","img","source","image"]),Xe=null,Ve=A({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ie=null,Fe=s.createElement("form"),Ue=function(e){Ie&&Ie===e||(e&&"object"===(void 0===e?"undefined":V(e))||(e={}),ve="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):Me,Oe="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):ye,Xe="ADD_URI_SAFE_ATTR"in e?A(j(Ve),e.ADD_URI_SAFE_ATTR):Ve,we="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},ze="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},We="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=e.SAFE_FOR_JQUERY||!1,Ee=e.SAFE_FOR_TEMPLATES||!1,Ce=e.WHOLE_DOCUMENT||!1,Se=e.RETURN_DOM||!1,qe=e.RETURN_DOM_FRAGMENT||!1,Te=e.RETURN_DOM_IMPORT||!1,xe=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Re=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||ge,Ee&&(Ae=!1),qe&&(Se=!0),We&&(ve=A({},[].concat(I(N))),Oe=[],!0===We.html&&(A(ve,k),A(Oe,S)),!0===We.svg&&(A(ve,E),A(Oe,q),A(Oe,x)),!0===We.svgFilters&&(A(ve,C),A(Oe,q),A(Oe,x)),!0===We.mathMl&&(A(ve,L),A(Oe,T),A(Oe,x))),e.ADD_TAGS&&(ve===Me&&(ve=j(ve)),A(ve,e.ADD_TAGS)),e.ADD_ATTR&&(Oe===ye&&(Oe=j(Oe)),A(Oe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(Xe,e.ADD_URI_SAFE_ATTR),Re&&(ve["#text"]=!0),Ce&&A(ve,["html","head","body"]),ve.table&&(A(ve,["tbody"]),delete we.tbody),o&&o(e),Ie=e)},Ge=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=re}},Qe=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}t.removeAttribute(e)},Ke=function(e){var t=void 0,n=void 0;if(Ne)e="<remove></remove>"+e;else{var r=f(e,/^[\s]+/);n=r&&r[0]}var o=ne?ne.createHTML(e):e;if(a)try{t=(new Y).parseFromString(o,"text/html")}catch(e){}if(i&&A(we,["title"]),!t||!t.documentElement){var c=(t=ce.createHTMLDocument("")).body;c.parentNode.removeChild(c.parentNode.firstElementChild),c.outerHTML=o}return e&&n&&t.body.insertBefore(s.createTextNode(n),t.body.childNodes[0]||null),ie.call(t,Ce?"html":"body")[0]};n.isSupported&&(function(){try{Ke('<svg><p><textarea><img src="</textarea><img src=x abc=1//">').querySelector("svg img")&&(a=!0)}catch(e){}}(),function(){try{var e=Ke("<x/><title>&lt;/title&gt;&lt;img&gt;");O(/<\/title/,e.querySelector("title").innerHTML)&&(i=!0)}catch(e){}}());var $e=function(e){return ae.call(e.ownerDocument||e,e,Q.SHOW_ELEMENT|Q.SHOW_COMMENT|Q.SHOW_TEXT,(function(){return Q.FILTER_ACCEPT}),!1)},Je=function(e){return!(e instanceof J||e instanceof Z||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof $&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI)},Ze=function(e){return"object"===(void 0===G?"undefined":V(G))?e instanceof G:e&&"object"===(void 0===e?"undefined":V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ye=function(e,t,r){ue[e]&&l(ue[e],(function(e){e.call(n,t,r,Ie)}))},et=function(e){var t=void 0;if(Ye("beforeSanitizeElements",e,null),Je(e))return Ge(e),!0;var r=h(e.nodeName);if(Ye("uponSanitizeElement",e,{tagName:r,allowedTags:ve}),("svg"===r||"math"===r)&&0!==e.querySelectorAll("p, br").length)return Ge(e),!0;if(!ve[r]||we[r]){if(Re&&!De[r]&&"function"==typeof e.insertAdjacentHTML)try{var o=e.innerHTML;e.insertAdjacentHTML("AfterEnd",ne?ne.createHTML(o):o)}catch(e){}return Ge(e),!0}return"noscript"===r&&O(/<\/noscript/i,e.innerHTML)?(Ge(e),!0):"noembed"===r&&O(/<\/noembed/i,e.innerHTML)?(Ge(e),!0):(!ke||e.firstElementChild||e.content&&e.content.firstElementChild||!O(/</g,e.textContent)||(m(n.removed,{element:e.cloneNode()}),e.innerHTML?e.innerHTML=g(e.innerHTML,/</g,"&lt;"):e.innerHTML=g(e.textContent,/</g,"&lt;")),Ee&&3===e.nodeType&&(t=e.textContent,t=g(t,de," "),t=g(t,pe," "),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ye("afterSanitizeElements",e,null),!1)},tt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in s||n in Fe))return!1;if(Ae&&O(me,t));else if(_e&&O(be,t));else{if(!Oe[t]||ze[t])return!1;if(Xe[t]);else if(O(ge,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!He[e])if(je&&!O(he,g(n,fe,"")));else if(n)return!1}return!0},nt=function(e){var t=void 0,o=void 0,c=void 0,a=void 0,i=void 0;Ye("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Oe};for(i=s.length;i--;){var m=t=s[i],f=m.name,v=m.namespaceURI;if(o=M(t.value),c=h(f),l.attrName=c,l.attrValue=o,l.keepAttr=!0,l.forceKeepAttr=void 0,Ye("uponSanitizeAttribute",e,l),o=l.attrValue,!l.forceKeepAttr){if("name"===c&&"IMG"===e.nodeName&&s.id)a=s.id,s=b(s,[]),Qe("id",e),Qe(f,e),u(s,a)>i&&e.setAttribute("id",a.value);else{if("INPUT"===e.nodeName&&"type"===c&&"file"===o&&l.keepAttr&&(Oe[c]||!ze[c]))continue;"id"===f&&e.setAttribute(f,""),Qe(f,e)}if(l.keepAttr)if(ke&&O(/\/>/i,o))Qe(f,e);else if(O(/svg|math/i,e.namespaceURI)&&O(y("</("+d(r(De),"|")+")","i"),o))Qe(f,e);else{Ee&&(o=g(o,de," "),o=g(o,pe," "));var w=e.nodeName.toLowerCase();if(tt(w,c,o))try{v?e.setAttributeNS(v,f,o):e.setAttribute(f,o),p(n.removed)}catch(e){}}}}Ye("afterSanitizeAttributes",e,null)}},rt=function e(t){var n=void 0,r=$e(t);for(Ye("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Ye("uponSanitizeShadowNode",n,null),et(n)||(n.content instanceof z&&e(n.content),nt(n));Ye("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var o=void 0,a=void 0,i=void 0,s=void 0,l=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Ze(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported){if("object"===V(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Ze(e))return t.toStaticHTML(e.outerHTML)}return e}if(Le||Ue(r),n.removed=[],"string"==typeof e&&(Pe=!1),Pe);else if(e instanceof G)1===(a=(o=Ke("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName?o=a:"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!Se&&!Ee&&!Ce&&xe&&-1===e.indexOf("<"))return ne?ne.createHTML(e):e;if(!(o=Ke(e)))return Se?null:re}o&&Ne&&Ge(o.firstChild);for(var u=$e(Pe?e:o);i=u.nextNode();)3===i.nodeType&&i===s||et(i)||(i.content instanceof z&&rt(i.content),nt(i),s=i);if(s=null,Pe)return e;if(Se){if(qe)for(l=se.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return Te&&(l=le.call(c,l,!0)),l}var d=Ce?o.outerHTML:o.innerHTML;return Ee&&(d=g(d,de," "),d=g(d,pe," ")),ne&&xe?ne.createHTML(d):d},n.setConfig=function(e){Ue(e),Le=!0},n.clearConfig=function(){Ie=null,Le=!1},n.isValidAttribute=function(e,t,n){Ie||Ue({});var r=h(e),o=h(t);return tt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ue[e]=ue[e]||[],m(ue[e],t))},n.removeHook=function(e){ue[e]&&p(ue[e])},n.removeHooks=function(e){ue[e]&&(ue[e]=[])},n.removeAllHooks=function(){ue={}},n}()}()},function(e,t,n){"use strict";var r=n(22),o=n(15),c=n(14),a=n(17),i=n(18),s=n(5),l=n(19),u=n(0),d=n(6),p=n.n(d),m=n(88),b=function(e){function t(){var e;return Object(o.a)(this,t),(e=Object(a.a)(this,Object(i.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(s.a)(e)),e.close=e.close.bind(Object(s.a)(e)),e.closeIfFocusOutside=e.closeIfFocusOutside.bind(Object(s.a)(e)),e.containerRef=Object(u.createRef)(),e.state={isOpen:!1},e}return Object(l.a)(t,e),Object(c.a)(t,[{key:"componentWillUnmount",value:function(){var e=this.state.isOpen,t=this.props.onToggle;e&&t&&t(!1)}},{key:"componentDidUpdate",value:function(e,t){var n=this.state.isOpen,r=this.props.onToggle;t.isOpen!==n&&r&&r(n)}},{key:"toggle",value:function(){this.setState((function(e){return{isOpen:!e.isOpen}}))}},{key:"closeIfFocusOutside",value:function(){this.containerRef.current.contains(document.activeElement)||document.activeElement.closest('[role="dialog"]')||this.close()}},{key:"close",value:function(){this.props.onClose&&this.props.onClose(),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this.state.isOpen,t=this.props,n=t.renderContent,o=t.renderToggle,c=t.position,a=void 0===c?"bottom":c,i=t.className,s=t.contentClassName,l=t.expandOnMobile,d=t.headerTitle,b=t.focusOnMount,h=t.popoverProps,f={isOpen:e,onToggle:this.toggle,onClose:this.close};return Object(u.createElement)("div",{className:p()("components-dropdown",i),ref:this.containerRef},o(f),e&&Object(u.createElement)(m.a,Object(r.a)({className:s,position:a,onClose:this.close,onFocusOutside:this.closeIfFocusOutside,expandOnMobile:l,headerTitle:d,focusOnMount:b},h),n(f)))}}]),t}(u.Component);t.a=b},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var c=n(499),a=n(29),i=n(74);e.exports=function(e){var t=e.displayName||e.name,n=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.handleClickOutside=t.handleClickOutside.bind(t),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),o(n,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleClickOutside,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleClickOutside,!0)}},{key:"handleClickOutside",value:function(e){var t=this.__domNode;t&&t.contains(e.target)||!this.__wrappedInstance||"function"!=typeof this.__wrappedInstance.handleClickOutside||this.__wrappedInstance.handleClickOutside(e)}},{key:"render",value:function(){var t=this,n=this.props,o=n.wrappedRef,c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["wrappedRef"]);return a.createElement(e,r({},c,{ref:function(e){t.__wrappedInstance=e,t.__domNode=i.findDOMNode(e),o&&o(e)}}))}}]),n}(a.Component);return n.displayName="clickOutside("+t+")",c(n,e)}},function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(5)()},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t,n){var r=e.direction,o=e.value;switch(r){case"top":return n.top+o<t.top&&n.bottom>t.bottom&&n.left<t.left&&n.right>t.right;case"left":return n.left+o<t.left&&n.bottom>t.bottom&&n.top<t.top&&n.right>t.right;case"bottom":return n.bottom-o>t.bottom&&n.left<t.left&&n.right>t.right&&n.top<t.top;case"right":return n.right-o>t.right&&n.left<t.left&&n.top<t.top&&n.bottom>t.bottom}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(1),o=n.n(r),c=n(2),a=n.n(c),i=n(0),s=n.n(i),l=n(3),u=n.n(l);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?b(e):t}(this,m(t).call(this,e)),f(b(n),"getContainer",(function(){return n.props.containment||window})),f(b(n),"addEventListener",(function(e,t,r,o){var c;n.debounceCheck||(n.debounceCheck={});var a=function(){c=null,n.check()},i={target:e,fn:o>-1?function(){c||(c=setTimeout(a,o||0))}:function(){clearTimeout(c),c=setTimeout(a,r||0)},getLastTimeout:function(){return c}};e.addEventListener(t,i.fn),n.debounceCheck[t]=i})),f(b(n),"startWatching",(function(){n.debounceCheck||n.interval||(n.props.intervalCheck&&(n.interval=setInterval(n.check,n.props.intervalDelay)),n.props.scrollCheck&&n.addEventListener(n.getContainer(),"scroll",n.props.scrollDelay,n.props.scrollThrottle),n.props.resizeCheck&&n.addEventListener(window,"resize",n.props.resizeDelay,n.props.resizeThrottle),!n.props.delayedCall&&n.check())})),f(b(n),"stopWatching",(function(){if(n.debounceCheck)for(var e in n.debounceCheck)if(n.debounceCheck.hasOwnProperty(e)){var t=n.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),n.debounceCheck[e]=null}n.debounceCheck=null,n.interval&&(n.interval=clearInterval(n.interval))})),f(b(n),"check",(function(){var e,t,r=n.node;if(!r)return n.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(n.roundRectDown(r.getBoundingClientRect())),n.props.containment){var o=n.props.containment.getBoundingClientRect();t={top:o.top,left:o.left,bottom:o.bottom,right:o.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var c=n.props.offset||{};"object"===d(c)&&(t.top+=c.top||0,t.left+=c.left||0,t.bottom-=c.bottom||0,t.right-=c.right||0);var a={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},i=e.height>0&&e.width>0,s=i&&a.top&&a.left&&a.bottom&&a.right;if(i&&n.props.partialVisibility){var l=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof n.props.partialVisibility&&(l=a[n.props.partialVisibility]),s=n.props.minTopValue?l&&e.top<=t.bottom-n.props.minTopValue:l}"string"==typeof c.direction&&"number"==typeof c.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",c.direction,c.value),s=u()(c,e,t));var p=n.state;return n.state.isVisible!==s&&(p={isVisible:s,visibilityRect:a},n.setState(p),n.props.onChange&&n.props.onChange(s)),p})),n.state={isVisible:null,visibilityRect:{}},n}var n,r,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.node=a.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(e){this.node=a.a.findDOMNode(this),this.props.active&&!e.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):o.a.Children.only(this.props.children)}}])&&p(n.prototype,r),c&&p(n,c),t}(o.a.Component);f(g,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:o.a.createElement("span",null)}),f(g,"propTypes",{onChange:s.a.func,active:s.a.bool,partialVisibility:s.a.oneOfType([s.a.bool,s.a.oneOf(["top","right","bottom","left"])]),delayedCall:s.a.bool,offset:s.a.oneOfType([s.a.shape({top:s.a.number,left:s.a.number,bottom:s.a.number,right:s.a.number}),s.a.shape({direction:s.a.oneOf(["top","right","bottom","left"]),value:s.a.number})]),scrollCheck:s.a.bool,scrollDelay:s.a.number,scrollThrottle:s.a.number,resizeCheck:s.a.bool,resizeDelay:s.a.number,resizeThrottle:s.a.number,intervalCheck:s.a.bool,intervalDelay:s.a.number,containment:"undefined"!=typeof window?s.a.instanceOf(window.Element):s.a.any,children:s.a.oneOfType([s.a.element,s.a.func]),minTopValue:s.a.number})},function(e,t,n){"use strict";var r=n(6);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=r(n(29),n(74))},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(57))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},,,,,,,,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function i(e,t,n,r){var o=t&&t.prototype instanceof u?t:u,c=Object.create(o.prototype),a=new w(r||[]);return c._invoke=function(e,t,n){var r="suspendedStart";return function(o,c){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw c;return _()}for(n.method=o,n.arg=c;;){var a=n.delegate;if(a){var i=M(a,n);if(i){if(i===l)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),c}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=i;var l={};function u(){}function d(){}function p(){}var m={};m[o]=function(){return this};var b=Object.getPrototypeOf,h=b&&b(b(z([])));h&&h!==t&&n.call(h,o)&&(m=h);var f=p.prototype=u.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function v(e){var t;this._invoke=function(r,o){function c(){return new Promise((function(t,c){!function t(r,o,c,a){var i=s(e[r],e,o);if("throw"!==i.type){var l=i.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,c,a)}),(function(e){t("throw",e,c,a)})):Promise.resolve(u).then((function(e){l.value=e,c(l)}),(function(e){return t("throw",e,c,a)}))}a(i.arg)}(r,o,t,c)}))}return t=t?t.then(c,c):c()}}function M(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.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,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(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 w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function z(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 r=-1,c=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return c.next=c}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=f.constructor=p,p.constructor=d,p[a]=d.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(f),e},e.awrap=function(e){return{__await:e}},g(v.prototype),v.prototype[c]=function(){return this},e.AsyncIterator=v,e.async=function(t,n,r,o){var c=new v(i(t,n,r,o));return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(f),f[a]="Generator",f[o]=function(){return this},f.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=z,w.prototype={constructor:w,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)&&n.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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var i=n.call(c,"catchLoc"),s=n.call(c,"finallyLoc");if(i&&s){if(this.prev<c.catchLoc)return r(c.catchLoc,!0);if(this.prev<c.finallyLoc)return r(c.finallyLoc)}else if(i){if(this.prev<c.catchLoc)return r(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return r(c.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var c=o;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var a=c?c.completion:{};return a.type=e,a.arg=t,c?(this.method="next",this.next=c.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),y(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;y(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:z(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";var r=Object.keys;e.exports=function(e,t){var n,o,c,a,i;if(e===t)return!0;if(n=r(e),o=r(t),n.length!==o.length)return!1;for(c=0;c<n.length;){if(void 0===(i=e[a=n[c]])&&!t.hasOwnProperty(a)||i!==t[a])return!1;c++}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n;if(e===t)return!0;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){},function(e,t,n){"use strict";var r=n(3);t.a=r.flowRight},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(){return Object(r.createElement)("span",{className:"components-spinner"})}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(22),o=n(36),c=n(27),a=n(0),i=n(3),s=n(91),l=n(68);t.a=Object(s.a)((function(e){var t=e.help,n=e.instanceId,s=e.label,u=e.multiple,d=void 0!==u&&u,p=e.onChange,m=e.options,b=void 0===m?[]:m,h=e.className,f=e.hideLabelFromVision,g=Object(c.a)(e,["help","instanceId","label","multiple","onChange","options","className","hideLabelFromVision"]),v="inspector-select-control-".concat(n);return!Object(i.isEmpty)(b)&&Object(a.createElement)(l.a,{label:s,hideLabelFromVision:f,id:v,help:t,className:h},Object(a.createElement)("select",Object(r.a)({id:v,className:"components-select-control__input",onChange:function(e){if(d){var t=Object(o.a)(e.target.options).filter((function(e){return e.selected})).map((function(e){return e.value}));p(t)}else p(e.target.value)},"aria-describedby":t?"".concat(v,"__help"):void 0,multiple:d},g),b.map((function(e,t){return Object(a.createElement)("option",{key:"".concat(e.label,"-").concat(e.value,"-").concat(t),value:e.value,disabled:e.disabled},e.label)}))))}))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(91),i=n(68);t.a=Object(a.a)((function(e){var t=e.label,n=e.hideLabelFromVision,a=e.value,s=e.help,l=e.className,u=e.instanceId,d=e.onChange,p=e.type,m=void 0===p?"text":p,b=Object(o.a)(e,["label","hideLabelFromVision","value","help","className","instanceId","onChange","type"]),h="inspector-text-control-".concat(u);return Object(c.createElement)(i.a,{label:t,hideLabelFromVision:n,id:h,help:s,className:l},Object(c.createElement)("input",Object(r.a)({className:"components-text-control__input",type:m,id:h,value:a,onChange:function(e){return d(e.target.value)},"aria-describedby":s?h+"__help":void 0},b)))}))},function(e,t,n){},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(0),a=n(6),i=n.n(a),s=n(3),l=n(60);t.a=function(e){var t=e.className,n=e.checked,a=e.id,u=e.onChange,d=void 0===u?s.noop:u,p=Object(o.a)(e,["className","checked","id","onChange"]),m=i()("components-form-toggle",t,{"is-checked":n});return Object(c.createElement)("span",{className:m},Object(c.createElement)("input",Object(r.a)({className:"components-form-toggle__input",id:a,type:"checkbox",checked:n,onChange:d},p)),Object(c.createElement)("span",{className:"components-form-toggle__track"}),Object(c.createElement)("span",{className:"components-form-toggle__thumb"}),n?Object(c.createElement)(l.b,{className:"components-form-toggle__on",width:"2",height:"6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2 6"},Object(c.createElement)(l.a,{d:"M0 0h2v6H0z"})):Object(c.createElement)(l.b,{className:"components-form-toggle__off",width:"6",height:"6","aria-hidden":"true",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},Object(c.createElement)(l.a,{d:"M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})))}},function(e,t,n){},function(e,t,n){"use strict";var r=n(31),o=n(15),c=n(14),a=n(17),i=n(18),s=n(5),l=n(19),u=n(22),d=n(27),p=n(0),m=n(6),b=n.n(m),h=n(3),f=n(91),g=n(233),v=n(87),M=function(e){var t=e.tabId,n=e.onClick,r=e.children,o=e.selected,c=Object(d.a)(e,["tabId","onClick","children","selected"]);return Object(p.createElement)(v.a,Object(u.a)({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:t,onClick:n},c),r)},O=function(e){function t(){var e;Object(o.a)(this,t);var n=(e=Object(a.a)(this,Object(i.a)(t).apply(this,arguments))).props,r=n.tabs,c=n.initialTabName;return e.handleClick=e.handleClick.bind(Object(s.a)(e)),e.onNavigate=e.onNavigate.bind(Object(s.a)(e)),e.state={selected:c||(r.length>0?r[0].name:null)},e}return Object(l.a)(t,e),Object(c.a)(t,[{key:"handleClick",value:function(e){var t=this.props.onSelect,n=void 0===t?h.noop:t;this.setState({selected:e}),n(e)}},{key:"onNavigate",value:function(e,t){t.click()}},{key:"render",value:function(){var e=this,t=this.state.selected,n=this.props,o=n.activeClass,c=void 0===o?"is-active":o,a=n.className,i=n.instanceId,s=n.orientation,l=void 0===s?"horizontal":s,u=n.tabs,d=Object(h.find)(u,{name:t}),m=i+"-"+d.name;return Object(p.createElement)("div",{className:a},Object(p.createElement)(g.a,{role:"tablist",orientation:l,onNavigate:this.onNavigate,className:"components-tab-panel__tabs"},u.map((function(n){return Object(p.createElement)(M,{className:b()(n.className,Object(r.a)({},c,n.name===t)),tabId:i+"-"+n.name,"aria-controls":i+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:Object(h.partial)(e.handleClick,n.name)},n.title)}))),d&&Object(p.createElement)("div",{"aria-labelledby":m,role:"tabpanel",id:m+"-view",className:"components-tab-panel__tab-content",tabIndex:"0"},this.props.children(d)))}}]),t}(p.Component);t.a=Object(f.a)(O)},function(e,t,n){},function(e,t,n){var r={"./advanced-filters/docs/example":410,"./animation-slider/docs/example":411,"./calendar/docs/example":412,"./card/docs/example":413,"./chart/docs/example":414,"./compare-filter/docs/example":415,"./count/docs/example":416,"./date-range-filter-picker/docs/example":417,"./date/docs/example":418,"./dropdown-button/docs/example":419,"./ellipsis-menu/docs/example":420,"./empty-content/docs/example":421,"./filter-picker/docs/example":422,"./filters/docs/example":423,"./flag/docs/example":424,"./form/docs/example":756,"./gravatar/docs/example":425,"./image-upload/docs/example":426,"./link/docs/example":427,"./list/docs/example":428,"./order-status/docs/example":429,"./pagination/docs/example":430,"./product-image/docs/example":431,"./rating/docs/example":432,"./scroll-to/docs/example":433,"./search-list-control/docs/example":434,"./search/docs/example":435,"./section-header/docs/example":436,"./section/docs/example":437,"./segmented-selection/docs/example":438,"./select-control/docs/example":439,"./spinner/docs/example":440,"./split-button/docs/example":441,"./stepper/docs/example":442,"./summary/docs/example":443,"./table/docs/example":444,"./tag/docs/example":445,"./text-control-with-affixes/docs/example":446,"./text-control/docs/example":447,"./view-more-list/docs/example":448,"./web-preview/docs/example":449};function o(e){var t=c(e);return n(t)}function c(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=c,e.exports=o,o.id=409},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(86),a={cancelled:"Cancelled",completed:"Completed",failed:"Failed","on-hold":"On hold",pending:"Pending payment",processing:"Processing",refunded:"Refunded"},i=new(n.n(c).a),s=new URL(document.location).searchParams.get("path")||"/devdocs",l={component:"advanced-filters"},u={title:"Orders Match {{select /}} Filters",filters:{status:{labels:{add:"Order Status",remove:"Remove order status filter",rule:"Select an order status filter match",title:"{{title}}Order Status{{/title}} {{rule /}} {{filter /}}",filter:"Select an order status"},rules:[{value:"is",label:"Is"},{value:"is_not",label:"Is Not"}],input:{component:"SelectControl",options:Object.keys(a).map((function(e){return{value:e,label:a[e]}}))}},product:{labels:{add:"Products",placeholder:"Search products",remove:"Remove products filter",rule:"Select a product filter match",title:"{{title}}Product{{/title}} {{rule /}} {{filter /}}",filter:"Select products"},rules:[{value:"includes",label:"Includes"},{value:"excludes",label:"Excludes"}],input:{component:"Search",type:"products",getLabels:function(){return Promise.resolve([])}}},customer:{labels:{add:"Customer Type",remove:"Remove customer filter",rule:"Select a customer filter match",title:"{{title}}Customer is{{/title}} {{filter /}}",filter:"Select a customer type"},input:{component:"SelectControl",options:[{value:"new",label:"New"},{value:"returning",label:"Returning"}],defaultOption:"new"}},quantity:{labels:{add:"Item Quantity",remove:"Remove item quantity filter",rule:"Select an item quantity filter match",title:"{{title}}Item Quantity is{{/title}} {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number"}},subtotal:{labels:{add:"Subtotal",remove:"Remove subtotal filter",rule:"Select a subtotal filter match",title:"{{title}}Subtotal is{{/title}} {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number",type:"currency"}}}};t.default=function(){return Object(r.createElement)(o.AdvancedFilters,{siteLocale:"en_US",path:s,query:l,filterTitle:"Orders",config:u,currency:i})}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(9),o=n.n(r),c=n(10),a=n.n(c),i=n(7),s=n.n(i),l=n(11),u=n.n(l),d=n(16),p=n.n(d),m=n(12),b=n.n(m),h=n(0),f=n(4),g=function(e){function t(){var e;return o()(this,t),(e=s()(this,u()(t).call(this))).state={pages:[44,55,66,77,88],page:0,animate:null},e.forward=e.forward.bind(p()(e)),e.back=e.forward.bind(p()(e)),e}return b()(t,e),a()(t,[{key:"forward",value:function(){this.setState((function(e){return{page:e.page+1,animate:"left"}}))}},{key:"back",value:function(){this.setState((function(e){return{page:e.page-1,animate:"right"}}))}},{key:"render",value:function(){var e=this.state,t=e.page,n=e.pages,r=e.animate,o={margin:"16px 0",padding:"8px 16px",color:"white",fontWeight:"bold",backgroundColor:"#246EB9"};return Object(h.createElement)("div",null,Object(h.createElement)(f.AnimationSlider,{animationKey:t,animate:r},(function(){return Object(h.createElement)("div",{style:o},n[t])})),Object(h.createElement)("button",{onClick:this.back,disabled:0===t},"Back"),Object(h.createElement)("button",{onClick:this.forward,disabled:t===n.length+1},"Forward"))}}]),t}(h.Component)},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(20),a=n.n(c),i=n(71);t.default=Object(i.a)({after:null,afterText:"",before:null,beforeText:"",afterError:null,beforeError:null,focusedInput:"startDate"})((function(e){var t=e.after,n=e.afterText,c=e.before,i=e.beforeText,s=e.afterError,l=e.focusedInput,u=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Date Range Picker"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.DateRange,{after:t,afterText:n,before:c,beforeText:i,onUpdate:function(e){u(e)},shortDateFormat:"MM/DD/YYYY",focusedInput:l,isInvalidDate:function(e){return a()().isBefore(a()(e),"date")}})),Object(r.createElement)(o.H,null,"Date Picker"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.DatePicker,{date:t,text:n,error:s,onUpdate:function(e){var t=e.date,n=e.text,r=e.error;u({after:t,afterText:n,afterError:r})},dateFormat:"MM/DD/YYYY",isInvalidDate:function(e){return 1===a()(e).day()}})))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Card,{title:"Store Performance",description:"Key performance metrics"},Object(r.createElement)("p",null,"Your stuff in a Card.")),Object(r.createElement)(o.Card,{title:"Inactive Card",isInactive:!0},Object(r.createElement)("p",null,"This Card is grayed out and has no box-shadow.")))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=[{date:"2018-05-30T00:00:00",Hoodie:{label:"Hoodie",value:21599},Sunglasses:{label:"Sunglasses",value:38537},Cap:{label:"Cap",value:106010}},{date:"2018-05-31T00:00:00",Hoodie:{label:"Hoodie",value:14205},Sunglasses:{label:"Sunglasses",value:24721},Cap:{label:"Cap",value:70131}},{date:"2018-06-01T00:00:00",Hoodie:{label:"Hoodie",value:10581},Sunglasses:{label:"Sunglasses",value:19991},Cap:{label:"Cap",value:53552}},{date:"2018-06-02T00:00:00",Hoodie:{label:"Hoodie",value:9250},Sunglasses:{label:"Sunglasses",value:16072},Cap:{label:"Cap",value:47821}}];t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Chart,{data:c,title:"Example Chart",layout:"item-comparison"}))}},function(e,t,n){"use strict";n.r(t);var r=n(35),o=n.n(r),c=n(0),a=n(4),i=new URL(document.location).searchParams.get("path")||"/devdocs",s={},l={type:"products",param:"product",getLabels:function(){return Promise.resolve([])},labels:{helpText:"Select at least two products to compare",placeholder:"Search for products to compare",title:"Compare Products",update:"Compare"}};t.default=function(){return Object(c.createElement)(a.CompareFilter,o()({path:i,query:s},l))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Count,{count:33})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(38),a=n(3),i={},s=Object(a.partialRight)(c.getDateParamsFromQuery,"period=month&compare=previous_year"),l=Object(a.partialRight)(c.getCurrentDates,"period=month&compare=previous_year"),u=s(i),d=u.period,p=u.compare,m=u.before,b=u.after,h=l(i),f={period:d,compare:p,before:m,after:b,primaryDate:h.primary,secondaryDate:h.secondary};t.default=function(){return Object(r.createElement)(o.DateRangeFilterPicker,{key:"daterange",query:i,onRangeSelect:function(){},dateQuery:f,isoDateFormat:c.isoDateFormat})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Date,{date:"2019-01-01"})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(364);t.default=function(){return Object(r.createElement)(c.a,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(r.createElement)(o.DropdownButton,{onClick:n,isOpen:t,labels:["All Products Sold"]})},renderContent:function(){return Object(r.createElement)("p",null,"Dropdown content here")}})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71),a=n(119);t.default=Object(c.a)({showCustomers:!0,showOrders:!0})((function(e){var t=e.setState,n=e.showCustomers,c=e.showOrders;return Object(r.createElement)(o.EllipsisMenu,{label:"Choose which analytics to display",renderContent:function(e){var i=e.onToggle;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.MenuTitle,null,"Display Stats"),Object(r.createElement)(o.MenuItem,{isCheckbox:!0,isClickable:!0,checked:n,onInvoke:function(){return t({showCustomers:!n})}},"Show Customers"),Object(r.createElement)(o.MenuItem,{isCheckbox:!0,isClickable:!0,checked:c,onInvoke:function(){return t({showOrders:!c})}},"Show Orders"),Object(r.createElement)(o.MenuItem,{isClickable:!0,onInvoke:i},Object(r.createElement)(a.a,{icon:"no-alt"}),"Close Menu"))}})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.EmptyContent,{title:"Nothing here",message:"Some descriptive text",actionLabel:"Reload page",actionURL:"#"})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=new URL(document.location).searchParams.get("path")||"/devdocs",a={meal:"breakfast"},i={label:"Meal",staticParams:[],param:"meal",showFilters:function(){return!0},filters:[{label:"Breakfast",value:"breakfast"},{label:"Lunch",value:"lunch",subFilters:[{label:"Meat",value:"meat",path:["lunch"]},{label:"Vegan",value:"vegan",path:["lunch"]},{label:"Pescatarian",value:"fish",path:["lunch"],subFilters:[{label:"Snapper",value:"snapper",path:["lunch","fish"]},{label:"Cod",value:"cod",path:["lunch","fish"]},{label:"Other",value:"other_fish",path:["lunch","fish"],component:"OtherFish"}]}]},{label:"Dinner",value:"dinner"}]};t.default=function(){return Object(r.createElement)(o.FilterPicker,{config:i,path:c,query:a})}},function(e,t,n){"use strict";n.r(t);var r=n(35),o=n.n(r),c=n(0),a=n(4),i=n(38),s=n(3),l={cancelled:"Cancelled",completed:"Completed",failed:"Failed","on-hold":"On hold",pending:"Pending payment",processing:"Processing",refunded:"Refunded"},u={getDateParamsFromQuery:Object(s.partialRight)(i.getDateParamsFromQuery,"period=month&compare=previous_year"),getCurrentDates:Object(s.partialRight)(i.getCurrentDates,"period=month&compare=previous_year"),isoDateFormat:i.isoDateFormat},d={},p=[{label:"Show",staticParams:["chart"],param:"filter",showFilters:function(){return!0},filters:[{label:"All Orders",value:"all"},{label:"Advanced Filters",value:"advanced"}]}],m={title:"Orders Match {{select /}} Filters",filters:{status:{labels:{add:"Order Status",remove:"Remove order status filter",rule:"Select an order status filter match",title:"Order Status {{rule /}} {{filter /}}",filter:"Select an order status"},rules:[{value:"is",label:"Is"},{value:"is_not",label:"Is Not"}],input:{component:"SelectControl",options:Object.keys(l).map((function(e){return{value:e,label:l[e]}}))}},product:{labels:{add:"Products",placeholder:"Search products",remove:"Remove products filter",rule:"Select a product filter match",title:"Product {{rule /}} {{filter /}}",filter:"Select products"},rules:[{value:"includes",label:"Includes"},{value:"excludes",label:"Excludes"}],input:{component:"Search",type:"products",getLabels:function(){return Promise.resolve([])}}},customer:{labels:{add:"Customer Type",remove:"Remove customer filter",rule:"Select a customer filter match",title:"Customer is {{filter /}}",filter:"Select a customer type"},input:{component:"SelectControl",options:[{value:"new",label:"New"},{value:"returning",label:"Returning"}],defaultOption:"new"}},quantity:{labels:{add:"Item Quantity",remove:"Remove item quantity filter",rule:"Select an item quantity filter match",title:"Item Quantity is {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number"}},subtotal:{labels:{add:"Subtotal",remove:"Remove subtotal filter",rule:"Select a subtotal filter match",title:"Subtotal is {{rule /}} {{filter /}}"},rules:[{value:"lessthan",label:"Less Than"},{value:"morethan",label:"More Than"},{value:"between",label:"Between"}],input:{component:"Number",type:"currency"}}}},b={type:"products",param:"product",getLabels:function(){return Promise.resolve([])},labels:{helpText:"Select at least two products to compare",placeholder:"Search for products to compare",title:"Compare Products",update:"Compare"}};t.default=function(){return Object(c.createElement)("div",null,Object(c.createElement)(a.H,null,"Date picker only"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.ReportFilters,{path:"",query:d,storeDate:u})),Object(c.createElement)(a.H,null,"Date picker & more filters"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.ReportFilters,{filters:p,path:"",query:d,storeDate:u})),Object(c.createElement)(a.H,null,"Advanced Filters"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.AdvancedFilters,{siteLocale:"en_US",path:"",query:d,filterTitle:"Orders",config:m})),Object(c.createElement)(a.H,null,"Compare Filter"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.CompareFilter,o()({path:"",query:d},b))))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Default (inherits parent font size)"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Flag,{code:"VU"})),Object(r.createElement)(o.H,null,"Large"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Flag,{code:"VU",size:48})),Object(r.createElement)(o.H,null,"Invalid Country Code"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Flag,{code:"invalid country code"})))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Gravatar,{user:"email@example.org",size:48})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({image:null})((function(e){var t=e.setState,n=e.logo;return Object(r.createElement)(o.ImageUpload,{image:n,onChange:function(e){return t({logo:e})}})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.Link,{href:"edit.php?post_type=shop_coupon",type:"wp-admin"},"Coupons")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(37),a=n.n(c),i=[{title:"List item title",content:"List item description text"},{before:Object(r.createElement)(a.a,{icon:"star"}),title:"List item with before icon",content:"List item description text"},{before:Object(r.createElement)(a.a,{icon:"star"}),after:Object(r.createElement)(a.a,{icon:"chevron-right"}),title:"List item with before and after icons",content:"List item description text"},{title:"Clickable list item",content:"List item description text",onClick:function(){return alert("List item clicked")}}];t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.List,{items:i}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a={processing:Object(c.__)("Processing Order"),pending:Object(c.__)("Pending Order"),completed:Object(c.__)("Completed Order")};t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.OrderStatus,{order:{status:"processing"},orderStatusMap:a}),Object(r.createElement)(o.OrderStatus,{order:{status:"pending"},orderStatusMap:a}),Object(r.createElement)(o.OrderStatus,{order:{status:"completed"},orderStatusMap:a}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({page:2,perPage:50})((function(e){var t=e.page,n=e.perPage,c=e.setState;return Object(r.createElement)(o.Pagination,{page:t,perPage:n,total:500,onPageChange:function(e){return c({page:e})},onPerPageChange:function(e){return c({perPage:e})}})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.ProductImage,{product:null}),Object(r.createElement)(o.ProductImage,{product:{images:[]}}),Object(r.createElement)(o.ProductImage,{product:{images:[{src:"https://cldup.com/6L9h56D9Bw.jpg"}]}}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)("div",null,Object(r.createElement)(o.Rating,{rating:4,totalStars:5})),Object(r.createElement)("div",null,Object(r.createElement)(o.Rating,{rating:2.5,totalStars:6})),Object(r.createElement)("div",null,Object(r.createElement)(o.ProductRating,{product:{average_rating:3.5}})),Object(r.createElement)("div",null,Object(r.createElement)(o.ReviewRating,{review:{rating:5}})))}},function(e,t,n){"use strict";n.r(t);var r=n(0);n(4);t.default=function(){return Object(r.createElement)("div",null,"Have the web broswer automatically scroll to this component on page render.")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({selected:[],loading:!0})((function(e){var t=e.selected,n=e.loading,c=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)("button",{onClick:function(){return c({loading:!n})}},"Toggle loading state"),Object(r.createElement)(o.SearchListControl,{list:[{id:1,name:"Apricots"},{id:2,name:"Clementine"},{id:3,name:"Elderberry"},{id:4,name:"Guava"},{id:5,name:"Lychee"},{id:6,name:"Mulberry"}],isLoading:n,selected:t,onChange:function(e){return c({selected:e})}}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({selected:[],inlineSelected:[]})((function(e){var t=e.selected,n=e.inlineSelected,c=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Tags Below Input"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Search,{type:"products",placeholder:"Search for a product",selected:t,onChange:function(e){return c({selected:e})}})),Object(r.createElement)(o.H,null,"Tags Inline with Input"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)(o.Search,{type:"products",placeholder:"Search for a product",selected:n,onChange:function(e){return c({inlineSelected:e})},inlineTags:!0})))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.SectionHeader,{title:"Store Performance"})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.H,null,"Header using a contextual level (h3)"),Object(r.createElement)(o.Section,{component:"article"},Object(r.createElement)("p",null,"This is an article component wrapper."),Object(r.createElement)(o.H,null,"Another header with contextual level (h4)"),Object(r.createElement)(o.Section,{component:!1},Object(r.createElement)("p",null,"There is no wrapper component here."),Object(r.createElement)(o.H,null,"This is an h5"))))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({selected:"two"})((function(e){var t=e.selected,n=e.setState;return Object(r.createElement)(o.SegmentedSelection,{options:[{value:"one",label:"One"},{value:"two",label:"Two"},{value:"three",label:"Three"},{value:"four",label:"Four"}],selected:t,legend:"Select a number",onSelect:function(e){return n({selected:e.number})},name:"number"})}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71),a=[{key:"apple",label:"Apple",value:{id:"apple"}},{key:"apricot",label:"Apricot",value:{id:"apricot"}},{key:"banana",label:"Banana",keywords:["best","fruit"],value:{id:"banana"}},{key:"blueberry",label:"Blueberry",value:{id:"blueberry"}},{key:"cherry",label:"Cherry",value:{id:"cherry"}},{key:"cantaloupe",label:"Cantaloupe",value:{id:"cantaloupe"}},{key:"dragonfruit",label:"Dragon Fruit",value:{id:"dragonfruit"}},{key:"elderberry",label:"Elderberry",value:{id:"elderberry"}}];t.default=Object(c.a)({simpleSelected:[],simpleMultipleSelected:[],singleSelected:[],singleSelectedShowAll:[],multipleSelected:[],inlineSelected:[]})((function(e){var t=e.simpleSelected,n=e.simpleMultipleSelected,c=e.singleSelected,i=e.singleSelectedShowAll,s=e.multipleSelected,l=e.inlineSelected,u=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.SelectControl,{label:"Simple single value",onChange:function(e){return u({simpleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:t}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Multiple values",multiple:!0,onChange:function(e){return u({simpleMultipleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:n}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Single value searchable",isSearchable:!0,onChange:function(e){return u({singleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:c}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Single value searchable with options on refocus",isSearchable:!0,onChange:function(e){return u({singleSelectedShowAll:e})},options:a,placeholder:"Start typing to filter options...",selected:i,showAllOnFocus:!0}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{label:"Inline tags searchable",isSearchable:!0,multiple:!0,inlineTags:!0,onChange:function(e){return u({inlineSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:l}),Object(r.createElement)("br",null),Object(r.createElement)(o.SelectControl,{hideBeforeSearch:!0,isSearchable:!0,label:"Hidden options before search",multiple:!0,onChange:function(e){return u({multipleSelected:e})},options:a,placeholder:"Start typing to filter options...",selected:s,showClearButton:!0}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Spinner,null))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(37),a=n.n(c);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.SplitButton,{isPrimary:!0,mainLabel:"Primary Button",menuLabel:"Select an action",onClick:function(){return alert("Primary Main Action clicked")},controls:[{label:"Up",onClick:function(){return alert("Primary Up clicked")}},{label:"Right",onClick:function(){return alert("Primary Right clicked")}},{label:"Down",icon:Object(r.createElement)(a.a,{icon:"arrow-down"}),onClick:function(){return alert("Primary Down clicked")}},{label:"Left",icon:Object(r.createElement)(a.a,{icon:"arrow-left"}),onClick:function(){return alert("Primary Left clicked")}}]}),Object(r.createElement)(o.SplitButton,{mainIcon:Object(r.createElement)(a.a,{icon:"pencil"}),menuLabel:"Select an action",onClick:function(){return alert("Icon Only Action clicked")},controls:[{label:"Up",icon:Object(r.createElement)(a.a,{icon:"arrow-up"}),onClick:function(){return alert("Icon Only Up clicked")}},{label:"Right",onClick:function(){return alert("Icon Only Right clicked")}},{label:"Down",icon:Object(r.createElement)(a.a,{icon:"arrow-down"}),onClick:function(){return alert("Icon Only Down clicked")}},{label:"Left",icon:Object(r.createElement)(a.a,{icon:"arrow-left"}),onClick:function(){return alert("Icon Only Left clicked")}}]}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({currentStep:"first",isComplete:!1,isPending:!1})((function(e){var t=e.currentStep,n=e.isComplete,c=e.isPending,a=e.setState,i=function(e){a({currentStep:e})},s=[{key:"first",label:"First",description:"Step item description",content:Object(r.createElement)("div",null,"First step content."),onClick:i},{key:"second",label:"Second",description:"Step item description",content:Object(r.createElement)("div",null,"Second step content."),onClick:i},{label:"Third",key:"third",description:"Step item description",content:Object(r.createElement)("div",null,"Third step content."),onClick:i},{label:"Fourth",key:"fourth",description:"Step item description",content:Object(r.createElement)("div",null,"Fourth step content."),onClick:i}],l=s.findIndex((function(e){return t===e.key}));return n&&s.forEach((function(e){return e.isComplete=!0})),Object(r.createElement)("div",null,n?Object(r.createElement)("button",{onClick:function(){return a({currentStep:"first",isComplete:!1})}},"Reset"):Object(r.createElement)("div",null,Object(r.createElement)("button",{onClick:function(){return a({currentStep:s[l-1].key})},disabled:l<1},"Previous step"),Object(r.createElement)("button",{onClick:function(){return a({currentStep:s[l+1].key})},disabled:l>=s.length-1},"Next step"),Object(r.createElement)("button",{onClick:function(){return a({isComplete:!0})},disabled:l!==s.length-1},"Complete"),Object(r.createElement)("button",{onClick:function(){return a({isPending:!c})}},"Toggle Spinner")),Object(r.createElement)(o.Stepper,{steps:s,currentStep:t,isPending:c}),Object(r.createElement)("br",null),Object(r.createElement)(o.Stepper,{isPending:c,isVertical:!0,steps:s,currentStep:t}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.SummaryList,null,(function(){return[Object(r.createElement)(o.SummaryNumber,{key:"revenue",value:"$829.40",label:"Total Sales",delta:29,href:"/analytics/report"}),Object(r.createElement)(o.SummaryNumber,{key:"refunds",value:"$24.00",label:"Refunds",delta:-10,href:"/analytics/report",selected:!0}),Object(r.createElement)(o.SummaryNumber,{key:"coupons",value:"$49.90",label:"Coupons",href:"/analytics/report"})]}))}},function(e,t,n){"use strict";n.r(t);var r=n(13),o=n.n(r),c=n(0),a=n(4),i=n(71),s=[{key:"month",label:"Month"},{key:"orders",label:"Orders"},{key:"revenue",label:"Revenue"}],l=[[{display:"January",value:1},{display:10,value:10},{display:"$530.00",value:530}],[{display:"February",value:2},{display:13,value:13},{display:"$675.00",value:675}],[{display:"March",value:3},{display:9,value:9},{display:"$460.00",value:460}]],u=[{label:"Gross Income",value:"$830.00"},{label:"Taxes",value:"$96.32"},{label:"Shipping",value:"$50.00"}];t.default=Object(i.a)({query:{paged:1}})((function(e){var t=e.query,n=e.setState;return Object(c.createElement)("div",null,Object(c.createElement)(a.H,null,"TableCard"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.TableCard,{title:"Revenue Last Week",rows:l,headers:s,onQueryChange:function(e){return function(t){return n({query:o()({},e,t)})}},query:t,rowsPerPage:7,totalRows:10,summary:u})),Object(c.createElement)(a.H,null,"Table only"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.Card,{className:"woocommerce-analytics__card"},Object(c.createElement)(a.Table,{caption:"Revenue Last Week",rows:l,headers:s}))),Object(c.createElement)(a.H,null,"Summary only"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.TableSummary,{data:u})),Object(c.createElement)(a.H,null,"Placeholder"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.Card,{className:"woocommerce-analytics__card"},Object(c.createElement)(a.TablePlaceholder,{caption:"Revenue Last Week",headers:s}))),Object(c.createElement)(a.H,null,"Empty Table"),Object(c.createElement)(a.Section,{component:!1},Object(c.createElement)(a.EmptyTable,null,"There are no entries.")))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=function(){};t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.Tag,{label:"My tag",id:1}),Object(r.createElement)(o.Tag,{label:"Removable tag",id:2,remove:c}),Object(r.createElement)(o.Tag,{label:"Tag with popover",popoverContents:Object(r.createElement)("p",null,"This is a popover")}))}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({first:"",second:"",third:"",fourth:"",fifth:""})((function(e){var t=e.first,n=e.second,c=e.third,a=e.fourth,i=e.fifth,s=e.setState;return Object(r.createElement)("div",null,Object(r.createElement)(o.TextControlWithAffixes,{label:"Text field without affixes",value:t,placeholder:"Placeholder",onChange:function(e){return s({first:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{label:"Disabled text field without affixes",value:t,placeholder:"Placeholder",onChange:function(e){return s({first:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Text field with a prefix",value:n,onChange:function(e){return s({second:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Disabled text field with a prefix",value:n,onChange:function(e){return s({second:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"Prefix",suffix:"Suffix",label:"Text field with both affixes",value:c,onChange:function(e){return s({third:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"Prefix",suffix:"Suffix",label:"Disabled text field with both affixes",value:c,onChange:function(e){return s({third:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{suffix:"%",label:"Text field with a suffix",value:a,onChange:function(e){return s({fourth:e})}}),Object(r.createElement)(o.TextControlWithAffixes,{suffix:"%",label:"Disabled text field with a suffix",value:a,onChange:function(e){return s({fourth:e})},disabled:!0}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Text field with prefix and help text",value:i,onChange:function(e){return s({fifth:e})},help:"This is some help text."}),Object(r.createElement)(o.TextControlWithAffixes,{prefix:"$",label:"Disabled text field with prefix and help text",value:i,onChange:function(e){return s({fifth:e})},help:"This is some help text.",disabled:!0}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(71);t.default=Object(c.a)({value:""})((function(e){var t=e.setState,n=e.value;return Object(r.createElement)("div",null,Object(r.createElement)(o.TextControl,{name:"text-control",label:"Enter text here",onChange:function(e){return t({value:e})},value:n}),Object(r.createElement)("br",null),Object(r.createElement)(o.TextControl,{label:"Disabled field",disabled:!0,value:""}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)(o.ViewMoreList,{items:[Object(r.createElement)("i",null,"Lorem"),Object(r.createElement)("i",null,"Ipsum"),Object(r.createElement)("i",null,"Dolor"),Object(r.createElement)("i",null,"Sit")]})}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4);t.default=function(){return Object(r.createElement)("div",null,Object(r.createElement)(o.WebPreview,{src:"https://themes.woocommerce.com/?name=galleria",title:"My Web Preview"}))}},function(e,t,n){const{defaults:r}=n(125),{block:o}=n(237),{rtrim:c,splitCells:a,escape:i}=n(106);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=o.normal,this.options.pedantic?this.rules=o.pedantic:this.options.gfm&&(this.rules=o.gfm)}static get rules(){return o}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,s,l,u,d,p,m,b,h,f,g,v,M,O,y;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(s[0].length),t&&"paragraph"===t.type?t.text+="\n"+s[0].trimRight():(s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?s:c(s,"\n")}))}else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2]?s[2].trim():s[2],text:s[3]||""});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if((s=this.rules.nptable.exec(e))&&(d={type:"table",header:a(s[1].replace(/^ *| *\| *$/g,"")),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3]?s[3].replace(/\n$/,"").split("\n"):[]},d.header.length===d.align.length)){for(e=e.substring(s[0].length),f=0;f<d.align.length;f++)/^ *-+: *$/.test(d.align[f])?d.align[f]="right":/^ *:-+: *$/.test(d.align[f])?d.align[f]="center":/^ *:-+ *$/.test(d.align[f])?d.align[f]="left":d.align[f]=null;for(f=0;f<d.cells.length;f++)d.cells[f]=a(d.cells[f],d.header.length);this.tokens.push(d)}else if(s=this.rules.hr.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"hr"});else if(s=this.rules.blockquote.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"blockquote_start"}),s=s[0].replace(/^ *> ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),l=s[2],M=l.length>1,p={type:"list_start",ordered:M,start:M?+l:"",loose:!1},this.tokens.push(p),s=s[0].match(this.rules.item),m=[],n=!1,v=s.length,f=0;f<v;f++)d=s[f],h=d.length,d=d.replace(/^ *([*+-]|\d+\.) */,""),~d.indexOf("\n ")&&(h-=d.length,d=this.options.pedantic?d.replace(/^ {1,4}/gm,""):d.replace(new RegExp("^ {1,"+h+"}","gm"),"")),f!==v-1&&(u=o.bullet.exec(s[f+1])[0],(l.length>1?1===u.length:u.length>1||this.options.smartLists&&u!==l)&&(e=s.slice(f+1).join("\n")+e,f=v-1)),r=n||/\n\n(?!\s*$)/.test(d),f!==v-1&&(n="\n"===d.charAt(d.length-1),r||(r=n)),r&&(p.loose=!0),O=/^\[[ xX]\] /.test(d),y=void 0,O&&(y=" "!==d[1],d=d.replace(/^\[[ xX]\] +/,"")),b={type:"list_item_start",task:O,checked:y,loose:r},m.push(b),this.tokens.push(b),this.token(d,!1),this.tokens.push({type:"list_item_end"});if(p.loose)for(v=m.length,f=0;f<v;f++)m[f].loose=!0;this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===s[1]||"script"===s[1]||"style"===s[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):i(s[0]):s[0]});else if(t&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),s[3]&&(s[3]=s[3].substring(1,s[3].length-1)),g=s[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[g]||(this.tokens.links[g]={href:s[2],title:s[3]});else if((s=this.rules.table.exec(e))&&(d={type:"table",header:a(s[1].replace(/^ *| *\| *$/g,"")),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3]?s[3].replace(/\n$/,"").split("\n"):[]},d.header.length===d.align.length)){for(e=e.substring(s[0].length),f=0;f<d.align.length;f++)/^ *-+: *$/.test(d.align[f])?d.align[f]="right":/^ *:-+: *$/.test(d.align[f])?d.align[f]="center":/^ *:-+ *$/.test(d.align[f])?d.align[f]="left":d.align[f]=null;for(f=0;f<d.cells.length;f++)d.cells[f]=a(d.cells[f].replace(/^ *\| *| *\| *$/g,""),d.header.length);this.tokens.push(d)}else if(s=this.rules.lheading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:"="===s[2].charAt(0)?1:2,text:s[1]});else if(t&&(s=this.rules.paragraph.exec(e)))e=e.substring(s[0].length),this.tokens.push({type:"paragraph",text:"\n"===s[1].charAt(s[1].length-1)?s[1].slice(0,-1):s[1]});else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"text",text:s[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(182),o=n(238),c=n(239),a=n(240),{defaults:i}=n(125),{merge:s,unescape:l}=n(106);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||i,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new o}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new c(e.links,this.options),this.inlineText=new c(e.links,s({},this.options,{renderer:new a})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,o,c="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(c+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",o=0;o<n.length;o++)r+=this.renderer.tablecell(this.inline.output(n[o]),{header:!1,align:this.token.align[o]});e+=this.renderer.tablerow(r)}return this.renderer.table(c,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t){!function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var o=[],c=0;c<t.length;c++){var a=t[c],i=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?o.length>0&&o[o.length-1].tagName===n(a.content[0].content[1])&&o.pop():"/>"===a.content[a.content.length-1].content||o.push({tagName:n(a.content[0].content[1]),openedBraces:0}):o.length>0&&"punctuation"===a.type&&"{"===a.content?o[o.length-1].openedBraces++:o.length>0&&o[o.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?o[o.length-1].openedBraces--:i=!0),(i||"string"==typeof a)&&o.length>0&&0===o[o.length-1].openedBraces){var s=n(a);c<t.length-1&&("string"==typeof t[c+1]||"plain-text"===t[c+1].type)&&(s+=n(t[c+1]),t.splice(c+1,1)),c>0&&("string"==typeof t[c-1]||"plain-text"===t[c-1].type)&&(s=n(t[c-1])+s,t.splice(c-1,1),c--),t[c]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&r(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(Prism)},function(e,t,n){var r={"./advanced-filters/README.md":454,"./animation-slider/README.md":455,"./calendar/README.md":456,"./card/README.md":457,"./chart/README.md":458,"./chart/d3chart/d3base/README.md":459,"./compare-filter/README.md":460,"./count/README.md":461,"./date-range-filter-picker/README.md":462,"./date/README.md":463,"./dropdown-button/README.md":464,"./ellipsis-menu/README.md":465,"./empty-content/README.md":466,"./filter-picker/README.md":467,"./filters/README.md":468,"./flag/README.md":469,"./form/README.md":470,"./gravatar/README.md":471,"./higher-order/use-filters/README.md":472,"./image-upload/README.md":473,"./link/README.md":474,"./list/README.md":475,"./order-status/README.md":476,"./pagination/README.md":477,"./product-image/README.md":478,"./rating/README.md":479,"./scroll-to/README.md":480,"./search-list-control/README.md":481,"./search/README.md":482,"./section-header/README.md":483,"./section/README.md":484,"./segmented-selection/README.md":485,"./select-control/README.md":486,"./spinner/README.md":487,"./split-button/README.md":488,"./stepper/README.md":489,"./summary/README.md":490,"./table/README.md":491,"./tag/README.md":492,"./text-control-with-affixes/README.md":493,"./text-control/README.md":494,"./view-more-list/README.md":495,"./web-preview/README.md":496};function o(e){var t=c(e);return n(t)}function c(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=c,e.exports=o,o.id=453},function(e,t){e.exports="Advanced Filters\n===\n\nDisplays a configurable set of filters which can modify query parameters. Display, behavior, and types of filters can be designated by a configuration object.\n\n## Usage\n\nBelow is a config example complete with translation strings. Advanced Filters makes use of [interpolateComponents](https://github.com/Automattic/interpolate-components#readme) to organize sentence structure, resulting in a filter visually represented as a sentence fragment in any language.\n\n```js\nconst config = {\n\ttitle: __(\n\t\t// A sentence describing filters for Orders\n\t\t// See screen shot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t'Orders Match {{select /}} Filters',\n\t\t'woocommerce-admin'\n\t),\n\tfilters: {\n\t\tstatus: {\n\t\t\tlabels: {\n\t\t\t\tadd: __( 'Order Status', 'woocommerce-admin' ),\n\t\t\t\tremove: __( 'Remove order status filter', 'woocommerce-admin' ),\n\t\t\t\trule: __( 'Select an order status filter match', 'woocommerce-admin' ),\n\t\t\t\t// A sentence describing an Order Status filter\n\t\t\t\t// See screen shot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t\t\ttitle: __( 'Order Status {{rule /}} {{filter /}}', 'woocommerce-admin' ),\n\t\t\t\tfilter: __( 'Select an order status', 'woocommerce-admin' ),\n\t\t\t},\n\t\t\trules: [\n\t\t\t\t{\n\t\t\t\t\tvalue: 'is',\n\t\t\t\t\t// Sentence fragment, logical, \"Is\"\n\t\t\t\t\t// Refers to searching for orders matching a chosen order status\n\t\t\t\t\t// Screenshot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t\t\t\tlabel: _x( 'Is', 'order status', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'is_not',\n\t\t\t\t\t// Sentence fragment, logical, \"Is Not\"\n\t\t\t\t\t// Refers to searching for orders that don't match a chosen order status\n\t\t\t\t\t// Screenshot for context: https://cloudup.com/cSsUY9VeCVJ\n\t\t\t\t\tlabel: _x( 'Is Not', 'order status', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t],\n\t\t\tinput: {\n\t\t\t\tcomponent: 'SelectControl',\n\t\t\t\toptions: Object.keys( orderStatuses ).map( key => ( {\n\t\t\t\t\tvalue: key,\n\t\t\t\t\tlabel: orderStatuses[ key ],\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\nWhen filters are applied, the query string will be modified using a combination of rule names and selected filter values.\n\nTaking the above configuration as an example, applying the filter will result in a query parameter like `status_is=pending` or `status_is_not=cancelled`.\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`config` | Object | `null` | (required) The configuration object required to render filters. See example above.\n`path` | String | `null` | (required) Name of this filter, used in translations.\n`query` | Object | `null` | The query string represented in object form.\n`onAdvancedFilterAction` | Function | `null` | Function to be called after an advanced filter action has been taken.\n`siteLocale` | string | `'en_US'` | The siteLocale for the site.\n`currency` | Object | `null` | (required) The currency instance for the site (@woocommerce/currency).\n\n\n## Input Components\n\n\n### SelectControl\n\nRender a select component with options.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tfruit: {\n\t\t\tinput: {\n\t\t\t\tcomponent: 'SelectControl',\n\t\t\t\toptions: [\n\t\t\t\t\t{ label: 'Apples', key: 'apples' },\n\t\t\t\t\t{ label: 'Oranges', key: 'oranges' },\n\t\t\t\t\t{ label: 'Bananas', key: 'bananas' },\n\t\t\t\t\t{ label: 'Cherries', key: 'cherries' },\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\n`options`: An array of objects with `key` and `label` properties.\n\n\n### Search\n\nRender an input for users to search and select using an autocomplete.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tproduct: {\n\t\t\tinput: {\n\t\t\t\tcomponent: 'Search',\n\t\t\t\ttype: 'products',\n\t\t\t\tgetLabels: getRequestByIdString( NAMESPACE + 'products', product => ( {\n\t\t\t\t\tid: product.id,\n\t\t\t\t\tlabel: product.name,\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\n`type`: A string Autocompleter type used by the [Search Component](https://github.com/woocommerce/woocommerce-admin/tree/master/packages/components/src/search).\n`getLabels`: A function returning a Promise resolving to an array of objects with `id` and `label` properties.\n\n\n### Date\n\nRenders an input or two inputs allowing a user to filter based on a date value or range of values.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tregistered: {\n\t\t\trules: [\n\t\t\t\t{\n\t\t\t\t\tvalue: 'before',\n\t\t\t\t\tlabel: __( 'Before', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'after',\n\t\t\t\t\tlabel: __( 'After', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'between',\n\t\t\t\t\tlabel: __( 'Between', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t],\n\t\t\tinput: {\n\t\t\t\tcomponent: 'Date',\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\n\n### Numeric Value\n\nRenders an input or two inputs allowing a user to filter based on a numeric value or range of values. Can also render inputs for currency values.\n\nValid rule values are `after`, `before`, and `between`. Use any combination you'd like.\n\n```js\nconst config = {\n\t...,\n\tfilters: {\n\t\tquantity: {\n\t\t\trules: [\n\t\t\t\t{\n\t\t\t\t\tvalue: 'lessthan',\n\t\t\t\t\tlabel: __( 'Less Than', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'morethan',\n\t\t\t\t\tlabel: __( 'More Than', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tvalue: 'between',\n\t\t\t\t\tlabel: __( 'Between', 'woocommerce-admin' ),\n\t\t\t\t},\n\t\t\t],\n\t\t\tinput: {\n\t\t\t\tcomponent: 'Number',\n\t\t\t},\n\t\t},\n\t},\n};\n```\n\nValid rule values are `lessthan`, `morethan`, and `between`. Use any combination you'd like.\n\nSpecify `input.type` as `'currency'` if you'd like to render currency inputs, which respects store currency locale.\n"},function(e,t){e.exports="AnimationSlider\n===\n\nThis component creates slideable content controlled by an animate prop to direct the contents to slide left or right.\nAll other props are passed to `CSSTransition`. More info at http://reactcommunity.org/react-transition-group/css-transition\n\n## Usage\n\n```jsx\n<AnimationSlider animationKey=\"1\" animate=\"right\">\n\t{ ( status ) => (\n\t\t<span>One (1)</span>\n\t) }\n</AnimationSlider>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | function | `null` | (required) A function returning rendered content with argument status, reflecting `CSSTransition` status\n`animationKey` | any | `null` | (required) A unique identifier for each slideable page\n`animate` | string | `null` | null, 'left', 'right', to designate which direction to slide on a change\n`onExited` | function | `null` | A function to be executed after a transition is complete, passing the containing ref as the argument\n"},function(e,t){e.exports='DatePicker\n===\n\n## Usage\n\n```jsx\n<DatePicker\n\tdate={ date }\n\ttext={ text }\n\terror={ error }\n\tonUpdate={ ( { date, text, error } ) => setState( { date, text, error } ) }\n\tdateFormat="MM/DD/YYYY"\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`date` | Object | `null` | A moment date object representing the selected date. `null` for no selection\n`disabled` | Boolean | `null` | Whether the input is disabled\n`text` | String | `null` | The date in human-readable format. Displayed in the text input\n`error` | String | `null` | A string error message, shown to the user\n`onUpdate` | Function | `null` | (required) A function called upon selection of a date or input change\n`dateFormat` | String | `null` | (required) The date format in moment.js-style tokens\n`isInvalidDate` | Function | `null` | A function to determine if a day on the calendar is not valid\n\n\nDateRange\n===\n\nThis is wrapper for a [react-dates](https://github.com/airbnb/react-dates) powered calendar.\n\n## Usage\n\n```jsx\n<DateRange\n\tafter={ after }\n\tafterText={ afterText }\n\tbefore={ before }\n\tbeforeText={ beforeText }\n\tonUpdate={ ( update ) => setState( update ) }\n\tshortDateFormat="MM/DD/YYYY"\n\tfocusedInput="startDate"\n\tisInvalidDate={ date => (\n\t\t// not a future date\n\t\tmoment().isBefore( moment( date ), \'date\' )\n\t) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`after` | Object | `null` | A moment date object representing the selected start. `null` for no selection\n`afterError` | String | `null` | A string error message, shown to the user\n`afterText` | String | `null` | The start date in human-readable format. Displayed in the text input\n`before` | Object | `null` | A moment date object representing the selected end. `null` for no selection\n`beforeError` | String | `null` | A string error message, shown to the user\n`beforeText` | String | `null` | The end date in human-readable format. Displayed in the text input\n`focusedInput` | String | `null` | String identifying which is the currently focused input (start or end)\n`isInvalidDate` | Function | `null` | A function to determine if a day on the calendar is not valid\n`onUpdate` | Function | `null` | (required) A function called upon selection of a date\n`shortDateFormat` | String | `null` | (required) The date format in moment.js-style tokens\n'},function(e,t){e.exports='Card\n===\n\nA basic card component with a header. The header can contain a title, an action, and an `EllipsisMenu` menu.\n\n## Usage\n\n```jsx\n<div>\n\t<Card title="Store Performance" description="Key performance metrics">\n\t\t<p>Your stuff in a Card.</p>\n\t</Card>\n\t<Card title="Inactive Card" isInactive>\n\t\t<p>This Card is grayed out and has no box-shadow.</p>\n\t</Card>\n</div>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`action` | ReactNode | `null` | One "primary" action for this card, appears in the card header\n`className` | String | `null` | Additional CSS classes\n`description` | One of type: string, node | `null` | The description displayed beneath the title\n`isInactive` | Boolean | `null` | Boolean representing whether the card is inactive or not\n`menu` | (custom validator) | `null` | An `EllipsisMenu`, with filters used to control the content visible in this card\n`title` | One of type: string, node | `null` | The title to use for this card\n'},function(e,t){e.exports="Chart\n===\n\nA chart container using d3, to display timeseries data with an interactive legend.\n\n## Usage\n\n```jsx\nconst data = [\n\t{\n\t\tdate: '2018-05-30T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 21599,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 38537,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 106010,\n\t\t},\n\t},\n\t{\n\t\tdate: '2018-05-31T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 14205,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 24721,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 70131,\n\t\t},\n\t},\n\t{\n\t\tdate: '2018-06-01T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 10581,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 19991,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 53552,\n\t\t},\n\t},\n\t{\n\t\tdate: '2018-06-02T00:00:00',\n\t\tHoodie: {\n\t\t\tlabel: 'Hoodie',\n\t\t\tvalue: 9250,\n\t\t},\n\t\tSunglasses: {\n\t\t\tlabel: 'Sunglasses',\n\t\t\tvalue: 16072,\n\t\t},\n\t\tCap: {\n\t\t\tlabel: 'Cap',\n\t\t\tvalue: 47821,\n\t\t},\n\t},\n];\n\n<Chart data={ data } title=\"Example Chart\" layout=\"item-comparison\" />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`allowedIntervals` | Array | `null` | Allowed intervals to show in a dropdown\n`baseValue` | Number | `0` | Base chart value. If no data value is different than the baseValue, the `emptyMessage` will be displayed if provided\n`chartType` | One of: 'bar', 'line' | `'line'` | Chart type of either `line` or `bar`\n`data` | Array | `[]` | An array of data\n`dateParser` | String | `'%Y-%m-%dT%H:%M:%S'` | Format to parse dates into d3 time format\n`emptyMessage` | String | `null` | The message to be displayed if there is no data to render. If no message is provided, nothing will be displayed\n`filterParam` | String | `null` | Name of the param used to filter items. If specified, it will be used, in combination with query, to detect which elements are being used by the current filter and must be displayed even if their value is 0\n`itemsLabel` | String | `null` | Label describing the legend items\n`mode` | One of: 'item-comparison', 'time-comparison' | `'time-comparison'` | `item-comparison` (default) or `time-comparison`, this is used to generate correct ARIA properties\n`path` | String | `null` | Current path\n`query` | Object | `null` | The query string represented in object form\n`interactiveLegend` | Boolean | `true` | Whether the legend items can be activated/deactivated\n`interval` | One of: 'hour', 'day', 'week', 'month', 'quarter', 'year' | `'day'` | Interval specification (hourly, daily, weekly etc)\n`intervalData` | Object | `null` | Information about the currently selected interval, and set of allowed intervals for the chart. See `getIntervalsForQuery`\n`isRequesting` | Boolean | `false` | Render a chart placeholder to signify an in-flight data request\n`legendPosition` | One of: 'bottom', 'side', 'top' | `null` | Position the legend must be displayed in. If it's not defined, it's calculated depending on the viewport width and the mode\n`legendTotals` | Object | `null` | Values to overwrite the legend totals. If not defined, the sum of all line values will be used\n`screenReaderFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the screen reader labels\n`showHeaderControls` | Boolean | `true` | Wether header UI controls must be displayed\n`title` | String | `null` | A title describing this chart\n`tooltipLabelFormat` | One of type: string, func | `'%B %-d, %Y'` | A datetime formatting string or overriding function to format the tooltip label\n`tooltipValueFormat` | One of type: string, func | `','` | A number formatting string or function to format the value displayed in the tooltips\n`tooltipTitle` | String | `null` | A string to use as a title for the tooltip. Takes preference over `tooltipLabelFormat`\n`valueType` | String | `null` | What type of data is to be displayed? Number, Average, String?\n`xFormat` | String | `'%d'` | A datetime formatting string, passed to d3TimeFormat\n`x2Format` | String | `'%b %Y'` | A datetime formatting string, passed to d3TimeFormat\n`yBelow1Format` | String | `null` | A number formatting string, passed to d3Format\n`yFormat` | String | `null` | A number formatting string, passed to d3Format\n`currency` | Object | `{}` | An object with currency properties for usage in the chart. The following properties are expected: `decimal`, `symbol`, `symbolPosition`, `thousands`. This is passed to d3Format.\n"},function(e,t){e.exports="# D3 Base Component\n\nIntegrate React Lifecyle methods with d3.js charts.\n\n### Base Component Responsibilities\n\n* Create and manage mounting and unmounting parent `div` and `svg`\n* Handle resize events, resulting re-renders, and event listeners\n* Handle re-renders as a result of new props\n\n## Props\n\n### className\n{ string } A class to be applied to the parent `div`\n\n### getParams( node )\n{ function } A function returning an object containing required properties for drawing a chart. This object is created before re-render, making it an ideal place for calculating scales and other props or user input based properties.\n* `svg` { node } The parent `div`. Useful for calculating available widths\n\n### drawChart( svg, params )\n{ function } draw the chart\n* `svg` { node } Base element \n* `params` { Object } Properties created by the `getParams` function "},function(e,t){e.exports="CompareFilter\n===\n\nDisplays a card + search used to filter results as a comparison between objects.\n\n## Usage\n\n```jsx\nconst path = ''; // from React Router\nconst getLabels = () => Promise.resolve( [] );\nconst labels = {\n\thelpText: 'Select at least two products to compare',\n\tplaceholder: 'Search for products to compare',\n\ttitle: 'Compare Products',\n\tupdate: 'Compare',\n};\n\n<CompareFilter\n\ttype=\"products\"\n\tparam=\"product\"\n\tpath={ path }\n\tgetLabels={ getLabels }\n\tlabels={ labels }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`getLabels` | Function | `null` | (required) Function used to fetch object labels via an API request, returns a Promise\n`labels` | Object | `{}` | Object of localized labels\n`param` | String | `null` | (required) The parameter to use in the querystring\n`path` | String | `null` | (required) The `path` parameter supplied by React-Router\n`query` | Object | `{}` | The query string represented in object form\n`type` | String | `null` | (required) Which type of autocompleter should be used in the Search\n"},function(e,t){e.exports="Count\n===\n\nDisplay a number with a styled border.\n\n## Usage\n\n```jsx\n<Count count={ 33 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`count` | Number | `null` | (required) Value of the number to be displayed\n`label` | String | `''` | A translated label with the number in context, used for screen readers\n"},function(e,t){e.exports="Date Range Picker\n===\n\nSelect a range of dates or single dates\n\n## Usage\n\n```jsx\nimport {\n\tgetDateParamsFromQuery,\n\tgetCurrentDates,\n\tisoDateFormat,\n\tloadLocaleData,\n} from '@woocommerce/date';\n\n/**\n * External dependencies\n */\nimport { partialRight } from 'lodash';\n\nconst query = {};\n\n// Fetch locale from store settings and load for date functions.\nconst localeSettings = {\n\tuserLocale: 'fr_FR',\n\tweekdaysShort: [ 'dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam' ],\n};\nloadLocaleData( localeSettings );\n\nconst defaultDateRange = 'period=month&compare=previous_year';\nconst storeGetDateParamsFromQuery = partialRight( getDateParamsFromQuery, defaultDateRange );\nconst storeGetCurrentDates = partialRight( getCurrentDates, defaultDateRange );\nconst { period, compare, before, after } = storeGetDateParamsFromQuery( query );\nconst { primary: primaryDate, secondary: secondaryDate } = storeGetCurrentDates( query );\nconst dateQuery = {\n\tperiod,\n\tcompare,\n\tbefore,\n\tafter,\n\tprimaryDate,\n\tsecondaryDate,\n};\n\n<DateRangeFilterPicker\n\tkey=\"daterange\"\n\tonRangeSelect={ () => {} }\n\tdateQuery={ dateQuery }\n\tisoDateFormat={ isoDateFormat }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n------- | -------- | ------- | ---\n`isDateFormat` | string | `null` | (required) ISO date format string\n`onRangeSelect` | Function | `null` | Callback called when selection is made\n`dateQuery` | object | `null` | (required) Date initialization object\n\n## URL as the source of truth\n\nThe Date Range Picker reads parameters from the URL querystring and updates them by creating a link to reflect newly selected parameters, which is rendered as the \"Update\" button.\n\nURL Parameter | Default | Possible Values\n--- | --- | ---\n`period` | `today` | `today`, `yesterday`, `week`, `last_week`, `month`, `last_month`, `quarter`, `last_quarter`, `year`, `last_year`, `custom`\n`compare` | `previous_period` | `previous_period`, `previous_year`\n`start` | none | start date for custom periods `2018-04-15`. [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)\n`end` | none | end date for custom periods `2018-04-15`. [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)\n"},function(e,t){e.exports="Date\n===\n\nUse the `Date` component to display accessible dates or times.\n\n## Usage\n\n```jsx\n<Date date=\"2019-01-01\" />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`date` | One of type: string, object | `null` | (required) Date to use in the component\n`machineFormat` | String | `'Y-m-d H:i:s'` | Date format used in the `datetime` prop of the `time` element\n`screenReaderFormat` | String | `'F j, Y'` | Date format used for screen readers\n`visibleFormat` | String | `'Y-m-d'` | Date format displayed in the page\n"},function(e,t){e.exports="DropdownButton\n===\n\nA button useful for a launcher of a dropdown component. The button is 100% width of its container and displays single or multiple lines rendered as `<span/>` elments.\n\n## Usage\n\n```jsx\n<Dropdown\n\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t<DropdownButton\n\t\t\tonClick={ onToggle }\n\t\t\tisOpen={ isOpen }\n\t\t\tlabels={ [ 'All Products Sold' ] }\n\t\t/>\n\t) }\n\trenderContent={ () => (\n\t\t<p>Dropdown content here</p>\n\t) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`labels` | Array | `null` | (required) An array of elements to be rendered as the content of the button\n`isOpen` | Boolean | `null` | Boolean describing if the dropdown in open or not\n"},function(e,t){e.exports='EllipsisMenu\n===\n\nThis is a dropdown menu hidden behind a vertical ellipsis icon. When clicked, the inner MenuItems are displayed.\n\n## Usage\n\n```jsx\n<EllipsisMenu label="Choose which analytics to display"\n\trenderContent={ ( { onToggle } )=> {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<MenuTitle>Display Stats</MenuTitle>\n\t\t\t\t<MenuItem onInvoke={ () => setState( { showCustomers: ! showCustomers } ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel="Show Customers"\n\t\t\t\t\t\tchecked={ showCustomers }\n\t\t\t\t\t\tonChange={ () => setState( { showCustomers: ! showCustomers } ) }\n\t\t\t\t\t/>\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem onInvoke={ () => setState( { showOrders: ! showOrders } ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel="Show Orders"\n\t\t\t\t\t\tchecked={ showOrders }\n\t\t\t\t\t\tonChange={ () => setState( { showOrders: ! showOrders } ) }\n\t\t\t\t\t/>\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem onInvoke={ onToggle }>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel="Close menu"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\tClose Menu\n\t\t\t\t\t</Button>\n\t\t\t\t</MenuItem>\n\t\t\t</div>\n\t\t);\n\t} }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`label` | String | `null` | (required) The label shown when hovering/focusing on the icon button\n`renderContent` | Function | `null` | A function returning `MenuTitle`/`MenuItem` components as a render prop. Arguments from Dropdown passed as function arguments\n\n\nMenuItem\n===\n\n`MenuItem` is used to give the item an accessible wrapper, with the `menuitem` role and added keyboard functionality (`onInvoke`).\n`MenuItem`s can also be deemed "clickable", though this is disabled by default because generally the inner component handles\nthe click event.\n\n## Usage\n\n```jsx\n<MenuItem onInvoke={ onToggle }>\n\t<Button\n\t\tlabel="Close menu"\n\t\tonClick={ onToggle }\n\t>\n\tClose Menu\n\t</Button>\n</MenuItem>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`checked` | Boolean | `null` | Whether the menu item is checked or not. Only relevant for menu items with `isCheckbox`\n`children` | ReactNode | `null` | A renderable component (or string) which will be displayed as the content of this item. Generally a `ToggleControl`\n`isCheckbox` | Boolean | `false` | Whether the menu item is a checkbox (will render a FormToggle and use the `menuitemcheckbox` role)\n`isClickable` | Boolean | `false` | Boolean to control whether the MenuItem should handle the click event. Defaults to false, assuming your child component handles the click event\n`onInvoke` | Function | `null` | (required) A function called when this item is activated via keyboard ENTER or SPACE; or when the item is clicked (only if `isClickable` is set)\n\n\nMenuTitle\n===\n\n`MenuTitle` is another valid Menu child, but this does not have any accessibility attributes associated\n(so this should not be used in place of the `EllipsisMenu` prop `label`).\n\n## Usage\n\n```jsx\n<MenuTitle>Display Stats</MenuTitle>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | ReactNode | `null` | A renderable component (or string) which will be displayed as the content of this item\n'},function(e,t){e.exports='EmptyContent\n===\n\nA component to be used when there is no data to show.\nIt can be used as an opportunity to provide explanation or guidance to help a user progress.\n\n## Usage\n\n```jsx\n<EmptyContent\n\ttitle="Nothing here"\n\tmessage="Some descriptive text"\n\tactionLabel="Reload page"\n\tactionURL="#"\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`title` | String | `null` | (required) The title to be displayed\n`message` | String | `null` | An additional message to be displayed\n`illustration` | String | `\'/empty-content.svg\'` | The url string of an image path. Prefix with `/` to load an image relative to the plugin directory\n`illustrationHeight` | Number | `null` | Height to use for the illustration\n`illustrationWidth` | Number | `400` | Width to use for the illustration\n`actionLabel` | String | `null` | (required) Label to be used for the primary action button\n`actionURL` | String | `null` | URL to be used for the primary action button\n`actionCallback` | Function | `null` | Callback to be used for the primary action button\n`secondaryActionLabel` | String | `null` | Label to be used for the secondary action button\n`secondaryActionURL` | String | `null` | URL to be used for the secondary action button\n`secondaryActionCallback` | Function | `null` | Callback to be used for the secondary action button\n`className` | String | `null` | Additional CSS classes\n'},function(e,t){e.exports="Filter Picker\n===\n\nModify a url query parameter via a dropdown selection of configurable options. This component manipulates the `filter` query parameter.\n\n## Usage\n\n```jsx\nimport { FilterPicker } from '@woocommerce/components';\n\nconst renderFilterPicker = () => {\n\tconst filters = [\n\t\t{ label: 'Breakfast', value: 'breakfast' },\n\t\t{\n\t\t\tlabel: 'Lunch',\n\t\t\tvalue: 'lunch',\n\t\t\tsubFilters: [\n\t\t\t\t{ label: 'Meat', value: 'meat', path: [ 'lunch' ] },\n\t\t\t\t{ label: 'Vegan', value: 'vegan', path: [ 'lunch' ] },\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Pescatarian',\n\t\t\t\t\tvalue: 'fish',\n\t\t\t\t\tpath: [ 'lunch' ],\n\t\t\t\t\tsubFilters: [\n\t\t\t\t\t\t{ label: 'Snapper', value: 'snapper', path: [ 'lunch', 'fish' ] },\n\t\t\t\t\t\t{ label: 'Cod', value: 'cod', path: [ 'lunch', 'fish' ] },\n\t\t\t\t\t\t// Specify a custom component to render (Work in Progress)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Other',\n\t\t\t\t\t\t\tvalue: 'other_fish',\n\t\t\t\t\t\t\tpath: [ 'lunch', 'fish' ],\n\t\t\t\t\t\t\tcomponent: 'OtherFish',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{ label: 'Dinner', value: 'dinner' },\n\t];\n\n\treturn <FilterPicker filters={ filters } path={ path } query={ query } />;\n};\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`config` | Object | `null` | (required) An array of filters and subFilters to construct the menu\n`path` | String | `null` | (required) The `path` parameter supplied by React-Router\n`query` | Object | `{}` | The query string represented in object form\n`onFilterSelect` | Function | `() => {}` | Function to be called after filter selection\n\n### `config` structure\n\nThe `config` prop has the following structure:\n\n- `label`: String - A label above the filter selector.\n- `staticParams`: Array - Url parameters to persist when selecting a new filter.\n- `param`: String - The url paramter this filter will modify.\n- `defaultValue`: String - The default paramter value to use instead of 'all'.\n- `showFilters`: Function - Determine if the filter should be shown. Supply a function with the query object as an argument returning a boolean.\n- `filters`: Array - Array of filter objects.\n\n### `filters` structure\n\nThe `filters` prop is an array of filter objects. Each filter object should have the following format:\n\n- `chartMode`: One of: 'item-comparison', 'time-comparison'\n- `component`: String - A custom component used instead of a button, might have special handling for filtering. TBD, not yet implemented.\n- `label`: String - The label for this filter. Optional only for custom component filters.\n- `path`: String - An array representing the \"path\" to this filter, if nested.\n- `subFilters`: Array - An array of more filter objects that act as \"children\" to this item. This set of filters is shown if the parent filter is clicked.\n- `value`: String - The value for this filter, used to set the `filter` query param when clicked, if there are no `subFilters`.\n"},function(e,t){e.exports='ReportFilters\n===\n\nAdd a collection of report filters to a page. This uses `DatePicker` & `FilterPicker` for the "basic" filters, and `AdvancedFilters`\nor a comparison card if "advanced" or "compare" are picked from `FilterPicker`.\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`advancedFilters` | Object | `{}` | Config option passed through to `AdvancedFilters`\n`siteLocale` | string| `en_US` | The locale of the site. Passed through to `AdvancedFilters`\n`currency` | object | {} | The currency of the site. Passed through to `AdvancedFilters`\n`filters` | Array | `[]` | Config option passed through to `FilterPicker` - if not used, `FilterPicker` is not displayed\n`path` | String | `null` | (required) The `path` parameter supplied by React-Router\n`query` | Object | `{}` | The query string represented in object form\n`showDatePicker` | Boolean | `true` | Whether the date picker must be shown\n`onDateSelect` | Function | `() => {}` | Function to be called after date selection\n`onFilterSelect` | Function | `null` | Function to be called after filter selection\n`onAdvancedFilterAction` | Function | `null` | Function to be called after an advanced filter action has been taken\n`storeDate` | object | `null` | (required) Date utility function object bound to store settings.\n'},function(e,t){e.exports="Flag\n===\n\nUse the `Flag` component to display a country's flag using the operating system's emojis.\n\n React component.\n\n## Usage\n\n```jsx\n<Flag code=\"VU\" size={ 48 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`code` | String | `null` | Two letter, three letter or three digit country code\n`order` | Object | `null` | An order can be passed instead of `code` and the code will automatically be pulled from the billing or shipping data\n`className` | String | `null` | Additional CSS classes\n`size` | Number | `null` | Supply a font size to be applied to the emoji flag\n"},function(e,t){e.exports="Form\n===\n\nA form component to handle form state and provide input helper props.\n\n## Usage\n\n```jsx\nconst initialValues = { firstName: '' };\n\n<Form\n\tonSubmitCallback={ ( values ) => {} }\n\tinitialValues={ initialValues }\n>\n\t{ ( {\n\t\tgetInputProps,\n\t\tvalues,\n\t\terrors,\n\t\thandleSubmit,\n\t} ) => (\n\t\t<div>\n\t\t\t<TextControl\n\t\t\t\tlabel={ 'First Name' }\n\t\t\t\t{ ...getInputProps( 'firstName' ) }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\tisPrimary\n\t\t\t\tonClick={ handleSubmit }\n\t\t\t\tdisabled={ Object.keys( errors ).length }\n\t\t\t>\n\t\t\t\tSubmit\n\t\t\t</Button>\n\t\t</div>\n\t) }\n</Form>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | * | `null` | A renderable component in which to pass this component's state and helpers. Generally a number of input or other form elements\n`errors` | Object | `{}` | Object of all initial errors to store in state\n`initialValues` | Object | `{}` | Object key:value pair list of all initial field values\n`onSubmitCallback` | Function | `noop` | Function to call when a form is submitted with valid fields\n`validate` | Function | `noop` | A function that is passed a list of all values and should return an `errors` object with error response\n`touched` | | `{}` | \n"},function(e,t){e.exports='Gravatar\n===\n\nDisplay a users Gravatar.\n\n## Usage\n\n```jsx\n<Gravatar\n\tuser="email@example.org"\n\tsize={ 48 }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`user` | One of type: object, string | `null` | The address to hash for displaying a Gravatar. Can be an email address or WP-API user object\n`alt` | String | `null` | Text to display as the image alt attribute\n`title` | String | `null` | Text to use for the image\'s title\n`size` | Number | `60` | Default 60. The size of Gravatar to request\n`className` | String | `null` | Additional CSS classes\n'},function(e,t){e.exports="useFilters\n==========\n\n`useFilters` is a fork of [gutenberg's `withFilters`.](https://github.com/WordPress/gutenberg/tree/master/packages/components/src/higher-order/with-filters) It is also a React [higher-order component.](https://facebook.github.io/react/docs/higher-order-components.html)\n\nWrapping a component with `useFilters` provides a filtering capability controlled externally by the list of `hookName`s.\n\n## Usage\n\n```jsx\nimport { applyFilters } from '@wordpress/hooks';\nimport { useFilters } from '@woocommerce/components';\n\nfunction MyCustomElement() {\n\treturn <h3>{ applyFilters( 'woocommerce.componentTitle', 'Title Text' ) }</h3>;\n}\n\nexport default useFilters( [ 'woocommerce.componentTitle' ] )( MyCustomElement );\n```\n\n`useFilters` expects an array argument which provides a list of hook names. It returns a function which can then be used in composing your component. The list of hook names are used in your component with `applyFilters`. Any filters added to the given hooks are run when added, and update your content (the title text, in this example).\n\n### Adding filters\n\n```js\nfunction editText( string ) {\n\treturn `Filtered: ${ string }`;\n}\naddFilter( 'woocommerce.componentTitle', 'editText', editText );\n```\n\nIf we added this filter, our `MyCustomElement` component would display:\n\n```html\n<h3>Filtered: Title Text</h3>\n```\n"},function(e,t){e.exports="ImageUpload\n===\n\nImageUpload - Adds an upload area for selecting or uploading an image from the WordPress media gallery.\n\n## Usage\n\n```jsx\n\t<ImageUpload image={ image } onChange={ newImage => setState( { url: newImage } ) } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`image` | Object | `null` | Image information containing media gallery `id` and image `url`\n`onChange` | Function | `null` | Function to trigger when the selected image changes\n`className` | String | `null` | Additional class name to style the component\n"},function(e,t){e.exports="Link\n===\n\nUse `Link` to create a link to another resource. It accepts a type to automatically\ncreate wp-admin links, wc-admin links, and external links.\n\n## Usage\n\n```jsx\n<Link\n\thref=\"edit.php?post_type=shop_coupon\"\n\ttype=\"wp-admin\"\n>\n\tCoupons\n</Link>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`href` | String | `null` | (required) The resource to link to\n`type` | One of: 'wp-admin', 'wc-admin', 'external' | `'wc-admin'` | Type of link. For wp-admin and wc-admin, the correct prefix is appended\n"},function(e,t){e.exports="List\n===\n\nList component to display a list of items.\n\n## Usage\n\n```jsx\nconst listItems = [\n\t{\n\t\ttitle: 'List item title',\n\t\tdescription: 'List item description text',\n\t},\n\t{\n\t\tbefore: <Gridicon icon=\"star\" />,\n\t\ttitle: 'List item with before icon',\n\t\tdescription: 'List item description text',\n\t},\n\t{\n\t\tbefore: <Gridicon icon=\"star\" />,\n\t\tafter: <Gridicon icon=\"chevron-right\" />,\n\t\ttitle: 'List item with before and after icons',\n\t\tdescription: 'List item description text',\n\t},\n\t{\n\t\ttitle: 'Clickable list item',\n\t\tdescription: 'List item description text',\n\t\tonClick: () => alert( 'List item clicked' ),\n\t},\n];\n\n<List items={ listItems } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n`items` | Array | `null` | (required) An array of list items\n\n`items` structure:\n\n* `after`: ReactNode - Content displayed after the list item text.\n* `before`: ReactNode - Content displayed before the list item text.\n* `className`: String - Additional class name to style the list item.\n* `description`: String - Description displayed beneath the list item title.\n* `href`: String - Href attribute used in a Link wrapped around the item.\n* `onClick`: Function - Called when the list item is clicked.\n* `target`: String - Target attribute used for Link wrapper.\n* `title`: String - Title displayed for the list item."},function(e,t){e.exports="OrderStatus\n===\n\nUse `OrderStatus` to display a badge with human-friendly text describing the current order status.\n\n## Usage\n\n```jsx\nconst order = { status: 'processing' }; // Use a real WooCommerce Order here.\n\n<OrderStatus order={ order } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`order` | Object | `null` | (required) The order to display a status for. See: https://woocommerce.github.io/woocommerce-rest-api-docs/#order-properties\n`className` | String | `null` | Additional CSS classes\n`orderStatusMap` | Object | {} | A map of order status to human-friendly label.\n"},function(e,t){e.exports="Pagination\n===\n\nUse `Pagination` to allow navigation between pages that represent a collection of items.\nThe component allows for selecting a new page and items per page options.\n\n## Usage\n\n```jsx\n<Pagination\n\tpage={ 1 }\n\tperPage={ 10 }\n\ttotal={ 500 }\n\tonPageChange={ ( newPage ) => setState( { page: newPage } ) }\n\tonPerPageChange={ ( newPerPage ) => setState( { perPage: newPerPage } ) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`page` | Number | `null` | (required) The current page of the collection\n`onPageChange` | Function | `noop` | A function to execute when the page is changed\n`perPage` | Number | `null` | (required) The amount of results that are being displayed per page\n`onPerPageChange` | Function | `noop` | A function to execute when the per page option is changed\n`total` | Number | `null` | (required) The total number of results\n`className` | String | `null` | Additional classNames\n"},function(e,t){e.exports="ProductImage\n===\n\nUse `ProductImage` to display a product's or variation's featured image.\nIf no image can be found, a placeholder matching the front-end image\nplaceholder will be displayed.\n\n## Usage\n\n```jsx\n// Use a real WooCommerce Product here.\nconst product = {\n\timages: [\n\t\t{\n\t\t\tsrc: 'https://cldup.com/6L9h56D9Bw.jpg',\n\t\t},\n\t],\n};\n\n<ProductImage product={ product } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`width` | Number | `60` | The width of image to display\n`height` | Number | `60` | The height of image to display\n`className` | String | `''` | Additional CSS classes\n`product` | Object | `null` | Product or variation object. The image to display will be pulled from `product.images` or `variation.image`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties and https://woocommerce.github.io/woocommerce-rest-api-docs/#product-variation-properties\n`alt` | String | `null` | Text to use as the image alt attribute\n"},function(e,t){e.exports="Rating\n===\n\nUse `Rating` to display a set of stars, filled, empty or half-filled, that represents a\nrating in a scale between 0 and the prop `totalStars` (default 5).\n\n## Usage\n\n```jsx\n<Rating rating={ 2.5 } totalStars={ 6 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`rating` | Number | `0` | Number of stars that should be filled. You can pass a partial number of stars like `2.5`\n`totalStars` | Number | `5` | The total number of stars the rating is out of\n`size` | Number | `18` | The size in pixels the stars should be rendered at\n`className` | String | `null` | Additional CSS classes\n\n\nProductRating\n===\n\nDisplay a set of stars representing the product's average rating.\n\n## Usage\n\n```jsx\n// Use a real WooCommerce Product here.\nconst product = { average_rating: 3.5 };\n\n<ProductRating product={ product } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`product` | Object | `null` | (required) A product object containing a `average_rating`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#products\n\n\nReviewRating\n===\n\nDisplay a set of stars representing the review's rating.\n\n## Usage\n\n```jsx\n// Use a real WooCommerce Review here.\nconst review = { rating: 5 };\n\n<ReviewRating review={ review } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`review` | Object | `null` | (required) A review object containing a `rating`. See https://woocommerce.github.io/woocommerce-rest-api-docs/#retrieve-product-reviews\n"},function(e,t){e.exports="ScrollTo\n===\n\n\n\n## Usage\n\n```jsx\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`offset` | String | ``'0'`` | The offset from the top of the component\n"},function(e,t){e.exports='SearchListControl\n===\n\nComponent to display a searchable, selectable list of items.\n\n## Usage\n\n```jsx\n<SearchListControl\n\tlist={ list }\n\tisLoading={ loading }\n\tselected={ selected }\n\tonChange={ items => setState( { selected: items } ) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`isHierarchical` | Boolean | `null` | Whether the list of items is hierarchical or not. If true, each list item is expected to have a parent property\n`isLoading` | Boolean | `null` | Whether the list of items is still loading\n`isSingle` | Boolean | `null` | Restrict selections to one item\n`list` | Array | `null` | A complete list of item objects, each with id, name properties. This is displayed as a clickable/keyboard-able list, and possibly filtered by the search term (searches name)\n`messages` | Object | `null` | Messages displayed or read to the user. Configure these to reflect your object type. See `defaultMessages` above for examples\n`onChange` | Function | `null` | (required) Callback fired when selected items change, whether added, cleared, or removed. Passed an array of item objects (as passed in via props.list)\n`onSearch` | Function | `null` | Callback fired when the search field is used\n`renderItem` | Function | `null` | Callback to render each item in the selection list, allows any custom object-type rendering\n`selected` | Array | `null` | (required) The list of currently selected items\n`search` | String | `null` | \n`setState` | Function | `null` | \n`debouncedSpeak` | Function | `null` | \n`instanceId` | Number | `null` | \n\n### `list` item structure:\n\n - `id`: Number\n - `name`: String\n\n### `messages` object structure:\n\n - `clear`: String - A more detailed label for the "Clear all" button, read to screen reader users.\n - `list`: String - Label for the list of selectable items, only read to screen reader users.\n - `noItems`: String - Message to display when the list is empty (implies nothing loaded from the server\nor parent component).\n - `noResults`: String - Message to display when no matching results are found. %s is the search term.\n - `search`: String - Label for the search input\n - `selected`: Function - Label for the selected items. This is actually a function, so that we can pass\nthrough the count of currently selected items.\n - `updated`: String - Label indicating that search results have changed, read to screen reader users.\n\n\nSearchListItem\n===\n\n## Usage\n\nUsed implicitly by `SearchListControl` when the `renderItem` prop is omitted.\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`countLabel` | ReactNode | `null` | Label to display if `showCount` is set to true. If undefined, it will use `item.count`\n`depth` | Number | `0` | Depth, non-zero if the list is hierarchical\n`item` | Object | `null` | Current item to display\n`isSelected` | Boolean | `null` | Whether this item is selected\n`isSingle` | Boolean | `null` | Whether this should only display a single item (controls radio vs checkbox icon)\n`onSelect` | Function | `null` | Callback for selecting the item\n`search` | String | `\'\'` | Search string, used to highlight the substring in the item name\n`showCount` | Boolean | `false` | Toggles the "count" bubble on/off\n'},function(e,t){e.exports="Search\n===\n\nA search box which autocompletes results while typing, allowing for the user to select an existing object\n(product, order, customer, etc). Currently only products are supported.\n\n## Usage\n\n```jsx\n<Search\n\ttype=\"products\"\n\tplaceholder=\"Search for a product\"\n\tselected={ selected }\n\tonChange={ items => setState( { selected: items } ) }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`allowFreeTextSearch` | Boolean | `false` | Render additional options in the autocompleter to allow free text entering depending on the type\n`className` | String | `null` | Class name applied to parent div\n`onChange` | Function | `noop` | Function called when selected results change, passed result list\n`type` | One of: 'categories', 'countries', 'coupons', 'customers', 'downloadIps', 'emails', 'orders', 'products', 'taxes', 'usernames', 'variations' | `null` | (required) The object type to be used in searching\n`placeholder` | String | `null` | A placeholder for the search input\n`selected` | Array | `[]` | An array of objects describing selected values. If the label of the selected value is omitted, the Tag of that value will not be rendered inside the search box.\n`inlineTags` | Boolean | `false` | Render tags inside input, otherwise render below input\n`showClearButton` | Boolean | `false` | Render a 'Clear' button next to the input box to remove its contents\n`staticResults` | Boolean | `false` | Render results list positioned statically instead of absolutely\n`disabled` | Boolean | `false` | Whether the control is disabled or not\n\n### `selected` item structure:\n\n- `id`: One of type: number, string\n- `label`: String"},function(e,t){e.exports='SectionHeader\n===\n\nA header component. The header can contain a title, actions via children, and an `EllipsisMenu` menu.\n\n## Usage\n\n```jsx\n<SectionHeader title="Section Title" />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`menu` | (custom validator) | `null` | An `EllipsisMenu`, with filters used to control the content visible in this card\n`title` | One of type: string, node | `null` | (required) The title to use for this card\n'},function(e,t){e.exports='H\n===\n\nThese components are used to frame out the page content for accessible heading hierarchy. Instead of defining fixed heading levels\n(`h2`, `h3`, …) you can use `<H />` to create "section headings", which look to the parent `<Section />`s for the appropriate\nheading level.\n\n## Usage\n\n```jsx\n<div>\n\t<H>Header using a contextual level (h3)</H>\n\t<Section component="article">\n\t\t<p>This is an article component wrapper.</p>\n\t\t<H>Another header with contextual level (h4)</H>\n\t\t<Section component={ false }>\n\t\t\t<p>There is no wrapper component here.</p>\n\t\t\t<H>This is an h5</H>\n\t\t</Section>\n\t</Section>\n</div>\n```\n\nSection\n===\n\nThe section wrapper, used to indicate a sub-section (and change the header level context).\n\n## Usage\n\nSee above\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`component` | One of type: func, string, bool | `null` | The wrapper component for this section. Optional, defaults to `div`. If passed false, no wrapper is used. Additional props passed to Section are passed on to the component\n`children` | ReactNode | `null` | The children inside this section, rendered in the `component`. This increases the context level for the next heading used\n'},function(e,t){e.exports="SegmentedSelection\n===\n\nCreate a panel of styled selectable options rendering stylized checkboxes and labels\n\n## Usage\n\n```jsx\n<SegmentedSelection\n\toptions={ [\n\t\t{ value: 'one', label: 'One' },\n\t\t{ value: 'two', label: 'Two' },\n\t\t{ value: 'three', label: 'Three' },\n\t\t{ value: 'four', label: 'Four' },\n\t] }\n\tselected={ selected }\n\tlegend=\"Select a number\"\n\tonSelect={ ( data ) => setState( { selected: data[ name ] } ) }\n\tname={ name }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional CSS classes\n`options` | Array | `null` | (required) An Array of options to render. The array needs to be composed of objects with properties `label` and `value`\n`selected` | String | `null` | Value of selected item\n`onSelect` | Function | `null` | (required) Callback to be executed after selection\n`name` | String | `null` | (required) This will be the key in the key and value arguments supplied to `onSelect`\n`legend` | String | `null` | (required) Create a legend visible to screen readers\n\n### `options` structure\n\nThe `options` array needs to be composed of objects with properties:\n\n- `value`: String - Input value for this option.\n- `label`: String - Label for this option."},function(e,t){e.exports="# SelectControl\n\nA search box which filters options while typing,\nallowing a user to select from an option from a filtered list.\n\n## Usage\n\n```jsx\nconst options = [\n\t{\n\t\tkey: 'apple',\n\t\tlabel: 'Apple',\n\t\tvalue: { id: 'apple' },\n\t},\n\t{\n\t\tkey: 'apricot',\n\t\tlabel: 'Apricot',\n\t\tvalue: { id: 'apricot' },\n\t},\n];\n\n<SelectControl\n\tlabel=\"Single value\"\n\tonChange={ selected => setState( { singleSelected: selected } ) }\n\toptions={ options }\n\tplaceholder=\"Start typing to filter options...\"\n\tselected={ singleSelected }\n/>;\n```\n\n### Props\n\n| Name | Type | Default | Description |\n| ------------------------ | ------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `className` | string | `null` | Class name applied to parent div |\n| `excludeSelectedOptions` | boolean | `true` | Exclude already selected options from the options list |\n| `onFilter` | function | `identity` | Add or remove items to the list of options after filtering, passed the array of filtered options and should return an array of options. |\n| `getSearchExpression` | function | `identity` | Function to add regex expression to the filter the results, passed the search query |\n| `help` | string\\|node | `null` | Help text to be appended beneath the input |\n| `inlineTags` | boolean | `false` | Render tags inside input, otherwise render below input |\n| `label` | string | `null` | A label to use for the main input |\n| `onChange` | function | `noop` | Function called when selected results change, passed result list |\n| `onSearch` | function | `noop` | Function to run after the search query is updated, passed the search query |\n| `options` | array | `null` | (required) An array of objects for the options list. The option along with its key, label and value will be returned in the onChange event |\n| `placeholder` | string | `null` | A placeholder for the search input |\n| `selected` | array | `[]` | An array of objects describing selected values. If the label of the selected value is omitted, the Tag of that value will not be rendered inside the search box |\n| `maxResults` | number | `0` | A limit for the number of results shown in the options menu. Set to 0 for no limit |\n| `multiple` | boolean | `false` | Allow multiple option selections |\n| `showClearButton` | boolean | `false` | Render a 'Clear' button next to the input box to remove its contents |\n| `hideBeforeSearch` | boolean | `false` | Only show list options after typing a search query |\n| `staticList` | boolean | `false` | Render results list positioned statically instead of absolutely |\n"},function(e,t){e.exports="Spinner\n===\n\nSpinner - An indeterminate circular progress indicator.\n\n## Usage\n\n```jsx\n<Spinner />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n"},function(e,t){e.exports="SplitButton\n===\n\nA component for displaying a button with a main action plus a secondary set of actions behind a menu toggle.\n\n## Usage\n\n```jsx\n<SplitButton\n\tisPrimary\n\tmainLabel=\"Primary Button\"\n\tmenuLabel=\"Select an action\"\n\tonClick={ () => alert( 'Primary Main Action clicked' ) }\n\tcontrols={ [\n\t\t{\n\t\t\tlabel: 'Up',\n\t\t\tonClick: () => alert( 'Primary Up clicked' ),\n\t\t},\n\t\t{\n\t\t\tlabel: 'Down',\n\t\t\ticon: <Gridicon icon=\"arrow-down\" />,\n\t\t\tonClick: () => alert( 'Primary Down clicked' ),\n\t\t},\n\t] }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`isPrimary` | Boolean | `false` | Whether the button is styled as a primary button\n`mainIcon` | ReactNode | `null` | Icon for the main button\n`mainLabel` | String | `null` | Label for the main button\n`onClick` | Function | `noop` | Function to activate when the the main button is clicked\n`menuLabel` | String | `null` | Label to display for the menu of actions, used as a heading on the mobile popover and for accessible text\n`controls` | Array | `null` | (required) An array of additional actions. Accepts additional icon, label, and onClick props\n`className` | String | `null` | Additional CSS classes\n\n### `controls` structure\n\nArray of additional actions with properties:\n\n- `icon`: One of type: string, element\n- `label`: String - Label displayed for this button.\n- `onClick`: Function - Click handler for this button."},function(e,t){e.exports="Stepper\n===\n\nA stepper component to indicate progress in a set number of steps.\n\n## Usage\n\n```jsx\nconst steps = [\n\t{\n\t\tkey: 'first',\n\t\tlabel: 'First',\n\t\tdescription: 'Step item description',\n\t\tcontent: <div>First step content.</div>,\n\t},\n\t{\n\t\tkey: 'second',\n\t\tlabel: 'Second',\n\t\tdescription: 'Step item description',\n\t\tcontent: <div>Second step content.</div>,\n\t},\n];\n\n<Stepper\n\tsteps={ steps }\n\tcurrentStep=\"first\"\n\tisPending={ true }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n`currentStep` | String | `null` | (required) The current step's key\n`steps` | Array | `null` | (required) An array of steps used\n`isVertical` | Boolean | `false` | If the stepper is vertical instead of horizontal\n`isPending` | Boolean | `false` | Optionally mark the current step as pending to show a spinner\n\n### `steps` structure\n\nArray of step objects with properties:\n\n- `key:` String - Key used to identify step.\n- `label`: String - Label displayed in stepper.\n- `description`: String - Description displayed beneath the label.\n- `isComplete`: Boolean - Optionally mark a step complete regardless of step index.\n- `content`: ReactNode - Content displayed when the step is active."},function(e,t){e.exports='SummaryList\n===\n\nA container element for a list of SummaryNumbers. This component handles detecting & switching to the mobile format on smaller screens.\n\n## Usage\n\n```jsx\n<SummaryList>\n\t{ () => {\n\t\treturn [\n\t\t\t<SummaryNumber\n\t\t\t\tkey="revenue"\n\t\t\t\tvalue={ \'$829.40\' }\n\t\t\t\tlabel="Total Sales"\n\t\t\t\tdelta={ 29 }\n\t\t\t\thref="/analytics/report"\n\t\t\t/>,\n\t\t\t<SummaryNumber\n\t\t\t\tkey="refunds"\n\t\t\t\tvalue={ \'$24.00\' }\n\t\t\t\tlabel="Refunds"\n\t\t\t\tdelta={ -10 }\n\t\t\t\thref="/analytics/report"\n\t\t\t\tselected\n\t\t\t/>,\n\t\t];\n\t} }\n</SummaryList>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`children` | Function | `null` | (required) A function returning a list of `<SummaryNumber />`s\n`label` | String | `__( \'Performance Indicators\', \'woocommerce-admin\' )` | An optional label of this group, read to screen reader users\n\n\nSummaryNumber\n===\n\nA component to show a value, label, and an optional change percentage. Can also act as a link to a specific report focus.\n\n## Usage\n\nSee above\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`delta` | Number | `null` | A number to represent the percentage change since the last comparison period - positive numbers will show a green up arrow, negative numbers will show a red down arrow, and zero will show a flat right arrow. If omitted, no change value will display\n`href` | String | `\'\'` | An internal link to the report focused on this number\n`isOpen` | Boolean | `false` | Boolean describing whether the menu list is open. Only applies in mobile view, and only applies to the toggle-able item (first in the list)\n`label` | String | `null` | (required) A string description of this value, ex "Revenue", or "New Customers"\n`onToggle` | Function | `null` | A function used to switch the given SummaryNumber to a button, and called on click\n`prevLabel` | String | `__( \'Previous Period:\', \'woocommerce-admin\' )` | A string description of the previous value\'s timeframe, ex "Previous Year:"\n`prevValue` | One of type: number, string | `null` | A string or number value to display - a string is allowed so we can accept currency formatting. If omitted, this section won\'t display\n`reverseTrend` | Boolean | `false` | A boolean used to indicate that a negative delta is "good", and should be styled like a positive (and vice-versa)\n`selected` | Boolean | `false` | A boolean used to show a highlight style on this number\n`value` | One of type: number, string | `null` | A string or number value to display - a string is allowed so we can accept currency formatting\n`onLinkClickCallback` | Function | `noop` | A function to be called after a SummaryNumber, rendered as a link, is clicked\n\n\nSummaryListPlaceholder\n===\n\n`SummaryListPlaceholder` behaves like `SummaryList` but displays placeholder summary items instead of data. This can be used while loading data.\n\n## Usage\n\n```jsx\n<SummaryListPlaceholder numberOfItems={ 2 } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`numberOfItems` | Number | `null` | (required) An integer with the number of summary items to display\n`numberOfRows` | | `5` | \n'},function(e,t){e.exports="TableCard\n===\n\nThis is an accessible, sortable, and scrollable table for displaying tabular data (like revenue and other analytics data).\nIt accepts `headers` for column headers, and `rows` for the table content.\n`rowHeader` can be used to define the index of the row header (or false if no header).\n\n`TableCard` serves as Card wrapper & contains a card header, `<Table />`, `<TableSummary />`, and `<Pagination />`.\nThis includes filtering and comparison functionality for report pages.\n\n## Usage\n\n```jsx\nconst headers = [\n\t{ key: 'month', label: 'Month' },\n\t{ key: 'orders', label: 'Orders' },\n\t{ key: 'revenue', label: 'Revenue' },\n];\nconst rows = [\n\t[\n\t\t{ display: 'January', value: 1 },\n\t\t{ display: 10, value: 10 },\n\t\t{ display: '$530.00', value: 530 },\n\t],\n\t[\n\t\t{ display: 'February', value: 2 },\n\t\t{ display: 13, value: 13 },\n\t\t{ display: '$675.00', value: 675 },\n\t],\n\t[\n\t\t{ display: 'March', value: 3 },\n\t\t{ display: 9, value: 9 },\n\t\t{ display: '$460.00', value: 460 },\n\t],\n];\nconst summary = [\n\t{ label: 'Gross Income', value: '$830.00' },\n\t{ label: 'Taxes', value: '$96.32' },\n\t{ label: 'Shipping', value: '$50.00' },\n];\n\n<TableCard\n\ttitle=\"Revenue Last Week\"\n\trows={ rows }\n\theaders={ headers }\n\tquery={ { page: 2 } }\n\trowsPerPage={ 7 }\n\ttotalRows={ 10 }\n\tsummary={ summary }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`compareBy` | String | `null` | The string to use as a query parameter when comparing row items\n`compareParam` | String | `'filter'` | Url query parameter compare function operates on\n`headers` | Array | `null` | An array of column headers (see `Table` props)\n`labels` | Object | `null` | Custom labels for table header actions\n`ids` | Array | `null` | A list of IDs, matching to the row list so that ids[ 0 ] contains the object ID for the object displayed in row[ 0 ]\n`isLoading` | Boolean | `false` | Defines if the table contents are loading. It will display `TablePlaceholder` component instead of `Table` if that's the case\n`onQueryChange` | Function | `noop` | A function which returns a callback function to update the query string for a given `param`\n`onColumnsChange` | Function | `noop` | A function which returns a callback function which is called upon the user changing the visiblity of columns\n`onSearch` | Function | `noop` | A function which is called upon the user searching in the table header\n`onSort` | Function | `undefined` | A function which is called upon the user changing the sorting of the table\n`downloadable` | Boolean | `false` | Whether the table must be downloadable. If true, the download button will appear\n`onClickDownload` | Function | `null` | A callback function called when the \"download\" button is pressed. Optional, if used, the download button will appear\n`query` | Object | `{}` | An object of the query parameters passed to the page, ex `{ page: 2, per_page: 5 }`\n`rowHeader` | One of type: number, bool | `0` | An array of arrays of display/value object pairs (see `Table` props)\n`rows` | Array | `[]` | Which column should be the row header, defaults to the first item (`0`) (see `Table` props)\n`rowsPerPage` | Number | `null` | (required) The total number of rows to display per page\n`searchBy` | String | `null` | The string to use as a query parameter when searching row items\n`showMenu` | Boolean | `true` | Boolean to determine whether or not ellipsis menu is shown\n`summary` | Array | `null` | An array of objects with `label` & `value` properties, which display in a line under the table. Optional, can be left off to show no summary\n`title` | String | `null` | (required) The title used in the card header, also used as the caption for the content in this table\n`totalRows` | Number | `null` | (required) The total number of rows (across all pages)\n`baseSearchQuery` | Object | `{}` | Pass in query parameters to be included in the path when onSearch creates a new url\n\n### `labels` structure\n\nTable header action labels object with properties:\n\n- `compareButton`: String - Compare button label\n- `downloadButton`: String - Download button label\n- `helpText`: String - \n- `placeholder`: String - \n\n### `summary` structure\n\nArray of summary items objects with properties:\n\n- `label`: ReactNode\n- `value`: One of type: string, number \n\n\nEmptyTable\n===\n\n`EmptyTable` displays a blank space with an optional message passed as a children node\nwith the purpose of replacing a table with no rows.\nIt mimics the same height a table would have according to the `numberOfRows` prop.\n\n## Usage\n\n```jsx\n<EmptyTable>\n\tThere are no entries.\n</EmptyTable>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`numberOfRows` | Number | `5` | An integer with the number of rows the box should occupy\n\n\nTablePlaceholder\n===\n\n`TablePlaceholder` behaves like `Table` but displays placeholder boxes instead of data. This can be used while loading.\n\n## Usage\n\n```jsx\nconst headers = [\n\t{ key: 'month', label: 'Month' },\n\t{ key: 'orders', label: 'Orders' },\n\t{ key: 'revenue', label: 'Revenue' },\n];\n\n<TablePlaceholder\n\tcaption=\"Revenue Last Week\"\n\theaders={ headers }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`query` | Object | `null` | An object of the query parameters passed to the page, ex `{ page: 2, per_page: 5 }`\n`caption` | String | `null` | (required) A label for the content in this table\n`headers` | Array | `null` | An array of column headers (see `Table` props)\n`numberOfRows` | Number | `5` | An integer with the number of rows to display\n\n\nTableSummary\n===\n\nA component to display summarized table data - the list of data passed in on a single line.\n\n## Usage\n\n```jsx\nconst summary = [\n\t{ label: 'Gross Income', value: '$830.00' },\n\t{ label: 'Taxes', value: '$96.32' },\n\t{ label: 'Shipping', value: '$50.00' },\n];\n\n<TableSummary data={ summary } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`data` | Array | `null` | An array of objects with `label` & `value` properties, which display on a single line\n\n\nTable\n===\n\nA table component, without the Card wrapper. This is a basic table display, sortable, but no default filtering.\n\nRow data should be passed to the component as a list of arrays, where each array is a row in the table.\nHeaders are passed in separately as an array of objects with column-related properties. For example,\nthis data would render the following table.\n\n```js\nconst headers = [ { label: 'Month' }, { label: 'Orders' }, { label: 'Revenue' } ];\nconst rows = [\n\t[\n\t\t{ display: 'January', value: 1 },\n\t\t{ display: 10, value: 10 },\n\t\t{ display: '$530.00', value: 530 },\n\t],\n\t[\n\t\t{ display: 'February', value: 2 },\n\t\t{ display: 13, value: 13 },\n\t\t{ display: '$675.00', value: 675 },\n\t],\n\t[\n\t\t{ display: 'March', value: 3 },\n\t\t{ display: 9, value: 9 },\n\t\t{ display: '$460.00', value: 460 },\n\t],\n]\n```\n\n| Month | Orders | Revenue |\n| ---------|--------|---------|\n| January | 10 | $530.00 |\n| February | 13 | $675.00 |\n| March | 9 | $460.00 |\n\n## Usage\n\n```jsx\n<Table\n\tcaption=\"Revenue Last Week\"\n\trows={ rows }\n\theaders={ headers }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`ariaHidden` | Boolean | `false` | Controls whether this component is hidden from screen readers. Used by the loading state, before there is data to read. Don't use this on real tables unless the table data is loaded elsewhere on the page\n`caption` | String | `null` | (required) A label for the content in this table\n`className` | String | `null` | Additional CSS classes\n`headers` | Array | `[]` | An array of column headers, as objects\n`onSort` | Function | `noop` | A function called when sortable table headers are clicked, gets the `header.key` as argument\n`query` | Object | `{}` | The query string represented in object form\n`rows` | Array | `null` | (required) An array of arrays of display/value object pairs\n`rowHeader` | One of type: number, bool | `0` | Which column should be the row header, defaults to the first item (`0`) (but could be set to `1`, if the first col is checkboxes, for example). Set to false to disable row headers\n\n### `headers` structure\n\nArray of column header objects with properties:\n\n- `defaultSort`: Boolean - Boolean, true if this column is the default for sorting. Only one column should have this set.\n- `defaultOrder`: String - String, asc|desc if this column is the default for sorting. Only one column should have this set.\n- `isLeftAligned`: Boolean - Boolean, true if this column should be aligned to the left.\n- `isNumeric`: Boolean - Boolean, true if this column is a number value.\n- `isSortable`: Boolean - Boolean, true if this column is sortable.\n- `key`: String - The API parameter name for this column, passed to `orderby` when sorting via API.\n- `label`: ReactNode - The display label for this column.\n- `required`: Boolean - Boolean, true if this column should always display in the table (not shown in toggle-able list).\n- `screenReaderLabel`: String - The label used for screen readers for this column. \n\n### `rows` structure\n\nArray of arrays representing rows and columns. Column object properties:\n\n- `display`: ReactNode - Display value, used for rendering - strings or elements are best here.\n- `value`: One of type: string, number, bool"},function(e,t){e.exports='Tag\n===\n\nThis component can be used to show an item styled as a "tag", optionally with an `X` + "remove"\nor with a popover that is shown on click.\n\n\n\n## Usage\n\n```jsx\n<Tag label="My tag" id={ 1 } />\n<Tag label="Removable tag" id={ 2 } remove={ noop } />\n<Tag label="Tag with popover" popoverContents={ ( <p>This is a popover</p> ) } />\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`id` | One of type: number, string | `null` | The ID for this item, used in the remove function\n`label` | String | `null` | (required) The name for this item, displayed as the tag\'s text\n`popoverContents` | ReactNode | `null` | Contents to display on click in a popover\n`remove` | Function | `null` | A function called when the remove X is clicked. If not used, no X icon will display\n`screenReaderLabel` | String | `null` | A more descriptive label for screen reader users. Defaults to the `name` prop\n'},function(e,t){e.exports='TextControlWithAffixes\n===\n\nThis component is essentially a wrapper (really a reimplementation) around the\nTextControl component that adds support for affixes, i.e. the ability to display\na fixed part either at the beginning or at the end of the text input.\n\n## Usage\n\n```jsx\n<TextControlWithAffixes\n suffix="%"\n label="Text field with a suffix"\n value={ fourth }\n onChange={ value => setState( { fourth: value } ) }\n/>\n<TextControlWithAffixes\n prefix="$"\n label="Text field with prefix and help text"\n value={ fifth }\n onChange={ value => setState( { fifth: value } ) }\n help="This is some help text."\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`label` | String | `null` | If this property is added, a label will be generated using label property as the content\n`help` | String | `null` | If this property is added, a help text will be generated using help property as the content\n`type` | String | `\'text\'` | Type of the input element to render. Defaults to "text"\n`value` | String | `null` | (required) The current value of the input\n`className` | String | `null` | The class that will be added with "components-base-control" to the classes of the wrapper div. If no className is passed only components-base-control is used\n`onChange` | Function | `null` | (required) A function that receives the value of the input\n`prefix` | ReactNode | `null` | Markup to be inserted at the beginning of the input\n`suffix` | ReactNode | `null` | Markup to be appended at the end of the input\n`disabled` | Boolean | `null` | Disables the field\n'},function(e,t){e.exports='TextControl\n===\n\nAn input field use for text inputs in forms.\n\n## Usage\n\n```jsx\n<TextControl\n\tlabel="Input label"\n\tvalue={ value }\n\tonChange={ value => setState( { value } ) }\n/>;\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | ``null`` | Additional CSS classes\n`disabled` | Boolean | ``null`` | Disables the field\n`label` | String | ``null`` | Input label used as a placeholder\n`onClick` | Function | ``null`` | On click handler called when the component is clicked, passed the click event\n`value` | String | ``null`` | The value of the input field\n'},function(e,t){e.exports="ViewMoreList\n===\n\nThis component displays a 'X more' button that displays a list of items on a popover when clicked.\n\n\n\n## Usage\n\n```jsx\n<ViewMoreList\n items={ [ <i>Lorem</i>, <i>Ipsum</i>, <i>Dolor</i>, <i>Sit</i> ] }\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`items` | Array | `[]` | `ReactNodes` to list in the popover\n"},function(e,t){e.exports='WebPreview\n===\n\nWebPreview component to display an iframe of another page.\n\n## Usage\n\n```jsx\n<WebPreview\n title="My Web Preview"\n src="https://themes.woocommerce.com/?name=galleria"\n/>\n```\n\n### Props\n\nName | Type | Default | Description\n--- | --- | --- | ---\n`className` | String | `null` | Additional class name to style the component\n`loadingContent` | ReactNode | `<Spinner />` | Content shown when iframe is still loading\n`onLoad` | Function | `noop` | Function to fire when iframe content is loaded\n`src` | String | `null` | (required) Iframe src to load\n`title` | String | `null` | (required) Iframe title\n'},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},c=Object.defineProperty,a=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,u=l&&l(Object);e.exports=function e(t,n,d){if("string"!=typeof n){if(u){var p=l(n);p&&p!==u&&e(t,p,d)}var m=a(n);i&&(m=m.concat(i(n)));for(var b=0;b<m.length;++b){var h=m[b];if(!(r[h]||o[h]||d&&d[h])){var f=s(n,h);try{c(t,h,f)}catch(e){}}}return t}return t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"createNotice",(function(){return f})),n.d(r,"createSuccessNotice",(function(){return g})),n.d(r,"createInfoNotice",(function(){return v})),n.d(r,"createErrorNotice",(function(){return M})),n.d(r,"createWarningNotice",(function(){return O})),n.d(r,"removeNotice",(function(){return y}));var o={};n.r(o),n.d(o,"getNotices",(function(){return z}));var c=n(0),a=n(24),i=n(36),s=n(3),l=n(31);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var c=t(n[o],r);return c===n[o]?n:d({},n,Object(l.a)({},o,c))}}}("context")((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return[].concat(Object(i.a)(Object(s.reject)(e,{id:t.notice.id})),[t.notice]);case"REMOVE_NOTICE":return Object(s.reject)(e,{id:t.id})}return e})),m=n(63),b=n.n(m),h=b.a.mark(f);function f(){var e,t,n,r,o,c,a,i,l,u,d,p,m,f,g,v,M=arguments;return b.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:if(e=M.length>0&&void 0!==M[0]?M[0]:"info",t=M.length>1?M[1]:void 0,n=M.length>2&&void 0!==M[2]?M[2]:{},r=n.speak,o=void 0===r||r,c=n.isDismissible,a=void 0===c||c,i=n.context,l=void 0===i?"global":i,u=n.id,d=void 0===u?Object(s.uniqueId)(l):u,p=n.actions,m=void 0===p?[]:p,f=n.type,g=void 0===f?"default":f,v=n.__unstableHTML,t=String(t),!o){b.next=8;break}return b.next=8,{type:"SPEAK",message:t,ariaLive:"snackbar"===g?"polite":"assertive"};case 8:return b.next=10,{type:"CREATE_NOTICE",context:l,notice:{id:d,status:e,content:t,__unstableHTML:v,isDismissible:a,actions:m,type:g}};case 10:case"end":return b.stop()}}),h)}function g(e,t){return f("success",e,t)}function v(e,t){return f("info",e,t)}function M(e,t){return f("error",e,t)}function O(e,t){return f("warning",e,t)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return{type:"REMOVE_NOTICE",id:e,context:t}}var w=[];function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return e[t]||w}var _,A=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document.querySelector("body");return n&&n.appendChild(t),t},j=function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""},k="",E=function(e){return e=e.replace(/<[^<>]+>/g," "),k===e&&(e+=" "),k=e,e};_=function(){var e=document.getElementById("a11y-speak-polite"),t=document.getElementById("a11y-speak-assertive");null===e&&A("polite"),null===t&&A("assertive")},"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",_):_();var C={SPEAK:function(e){!function(e,t){j(),e=E(e);var n=document.getElementById("a11y-speak-polite"),r=document.getElementById("a11y-speak-assertive");r&&"assertive"===t?r.textContent=e:n&&(n.textContent=e)}(e.message,e.ariaLive||"assertive")}},L=(Object(a.registerStore)("core/notices",{reducer:p,actions:r,selectors:o,controls:C}),n(377),n(35)),N=n.n(L),S=n(75),q=n.n(S),T=n(9),x=n.n(T),B=n(10),R=n.n(B),P=n(7),W=n.n(P),D=n(11),H=n.n(D),X=n(12),V=n.n(X),I=n(4);function F(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var U=n(29),G=n.n(U),Q=n(2),K=n.n(Q),$=n(80),J=n(163),Z=n.n(J),Y=n(367),ee=n.n(Y);function te(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var ne=G.a.createContext||function(e,t){var n,r,o="__create-react-context-"+ee()()+"__",c=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=te(t.props.value),t}Z()(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[o]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((c=r)===(a=o)?0!==c||1/c==1/a:c!=c&&a!=a)?n=0:(n="function"==typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var c,a},r.render=function(){return this.props.children},n}(U.Component);c.childContextTypes=((n={})[o]=K.a.object.isRequired,n);var a=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Z()(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},r.getValue=function(){return this.context[o]?this.context[o].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(U.Component);return a.contextTypes=((r={})[o]=K.a.object,r),{Provider:c,Consumer:a}},re=n(65),oe=n(22),ce=n(229),ae=n.n(ce),ie=(n(144),n(76)),se=(n(162),function(e){var t=ne();return t.displayName=e,t}("Router")),le=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}F(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return G.a.createElement(se.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(G.a.Component);G.a.Component;G.a.Component;var ue={},de=0;function pe(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,c=void 0!==o&&o,a=n.strict,i=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=ue[n]||(ue[n]={});if(r[e])return r[e];var o=[],c={regexp:ae()(e,o,t),keys:o};return de<1e4&&(r[e]=c,de++),c}(n,{end:c,strict:i,sensitive:l}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var u=s[0],d=s.slice(1),p=e===u;return c&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var me=function(e){function t(){return e.apply(this,arguments)||this}return F(t,e),t.prototype.render=function(){var e=this;return G.a.createElement(se.Consumer,null,(function(t){t||Object(re.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?pe(n.pathname,e.props):t.match,o=Object(oe.a)({},t,{location:n,match:r}),c=e.props,a=c.children,i=c.component,s=c.render;return Array.isArray(a)&&0===a.length&&(a=null),G.a.createElement(se.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:i?G.a.createElement(i,o):s?s(o):null:"function"==typeof a?a(o):null)}))},t}(G.a.Component);function be(e){return"/"===e.charAt(0)?e:"/"+e}function he(e,t){if(!e)return t;var n=be(e);return 0!==t.pathname.indexOf(n)?t:Object(oe.a)({},t,{pathname:t.pathname.substr(n.length)})}function fe(e){return"string"==typeof e?e:Object($.d)(e)}function ge(e){return function(){Object(re.a)(!1)}}function ve(){}G.a.Component;var Me=function(e){function t(){return e.apply(this,arguments)||this}return F(t,e),t.prototype.render=function(){var e=this;return G.a.createElement(se.Consumer,null,(function(t){t||Object(re.a)(!1);var n,r,o=e.props.location||t.location;return G.a.Children.forEach(e.props.children,(function(e){if(null==r&&G.a.isValidElement(e)){n=e;var c=e.props.path||e.props.from;r=c?pe(o.pathname,Object(oe.a)({},e.props,{path:c})):t.match}})),r?G.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(G.a.Component);G.a.useContext;var Oe=n(21),ye=n(8),we=(n(379),n(55)),ze=n(33),_e=n(1),Ae=n(13),je=n.n(Ae),ke=n(390),Ee=(n(380),n(40)),Ce=n(26),Le=n.n(Ce);function Ne(e){return[e.country,e.state,e.name||Object(_e.__)("TAX","woocommerce-admin"),e.priority].map((function(e){return e.toString().toUpperCase().trim()})).filter(Boolean).join("-")}var Se=n(69),qe=n(97),Te=n.n(qe);function xe(e,t,n,r,o){void 0===n&&(n=500),void 0===r&&(r=3e4),void 0===o&&(o=new Date);var c={updates:[],nextUpdate:r};return function(e,t,n,r){Object.keys(t).forEach((function(o){var c=t[o],a=n[o]||{};!function(e,t,n,r,o){var c=r.lastRequested,a=r.lastReceived,i=c&&(!a||c>a),s=Be(n.timeout,r,o),l=Re(n.freshness,r,o),u=i&&0>=l?s:l;e.nextUpdate=Math.min(e.nextUpdate,u),u<0&&e.updates.push(t)}(e,o,c,a,r)}))}(c,e,t,o),c.nextUpdate=Math.max(c.nextUpdate,n),c}function Be(e,t,n){var r=t.lastRequested||Number.MIN_SAFE_INTEGER,o=t.lastReceived||Number.MIN_SAFE_INTEGER;return e&&r&&r>o?e-(n-r):Number.MAX_SAFE_INTEGER}function Re(e,t,n){var r=t.lastReceived;return e&&r?e-(n-r):e?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER}var Pe="overdue",We="fetching",De="stale",He="fresh",Xe="notRequired";function Ve(e){var t=e.state.resources||{},n=e.requirementsByResource;return Object(s.union)(Object.keys(t),Object.keys(n)).reduce((function(r,o){var c=t[o]||{},a=c.data,i=function(e,t){if(!t)return Xe;var n=t.freshness,r=t.timeout,o=new Date,c=Re(n,e,o);if(e&&e.lastRequested>e.lastReceived){return Be(r,e,o)<0?Pe:We}if(c<0)return De;return He}(c,n[o]),l=function(e,t,n){var r=new Date;switch(e){case Pe:return"Timed out for "+Ie(-Be(n.timeout,t,r));case We:return Ie(Be(n.timeout,t,r))+" until timeout";case De:return"Stale for "+Ie(-Re(n.freshness,t,r));case He:return"Fresh for "+Ie(Re(n.freshness,t,r));case Xe:default:return"Resource is not fetched directly."}}(i,c,n[o]);if(r[o]={status:i,summary:l,data:a},n[o]){var u=function(e){void 0===e&&(e={});var t=e,n=t.freshness,r=t.timeout,o=Object(ie.a)(t,["freshness","timeout"]);return Object(oe.a)({freshness:Ie(n),timeout:Ie(r)},o)}(n[o]),d=function(e,t){var n=[];return e.forEach((function(e,r){Object(s.find)(e,{resourceName:t})&&n.push(r)})),n.length?n:null}(e.requirementsByComponent,o);r[o].combinedRequirement=u,r[o].componentsRequiring=d}return r}),{})}function Ie(e){if(!e)return"";var t=Math.floor(e/36e5);e-=36e5*t;var n=Math.floor(e/6e4),r=(e-=6e4*n)/1e3,o="";return o=t?t+" hours ":o,o=n?""+o+n+" mins ":o,o=r?""+o+r+" secs ":o}function Fe(e){var t=Object.keys(e),n=[],r=0,o=0,c=0,a=0,i=0;t.forEach((function(t){var l=e[t];switch(n=Object(s.union)(n,l.componentsRequiring),l.status){case Pe:c++;break;case We:a++;break;case De:o++;break;case He:r++;break;case Xe:i++}}));var l=t.length+" resources, "+n.length+" components ( ";return r&&(l+=r+" fresh "),o&&(l+=o+" stale "),i&&(l+=i+" not required "),c&&(l+=c+" timed out "),a&&(l+=a+" fetching "),l+=")"}var Ue={};function Ge(e){!0===window.__FRESH_DATA_DEV_INFO__&&(Ue[e.getName()]=function(e){var t=function(e){var t=[];return e.requirementsByComponent.forEach((function(e,n){t.push({component:n,requirements:e})})),t}(e),n=Ve(e);return{summary:Fe(n),resources:n,components:t}}(e),window.freshData||(window.freshData=Ue))}var Qe={freshness:Number.MAX_SAFE_INTEGER,timeout:2e4};function Ke(e){var t={};return e.forEach((function(e){e.forEach((function(e){var n=e.resourceName,r=Object(ie.a)(e,["resourceName"]);!function(e,t,n){var r=e[n]||Object(oe.a)({},Qe);(function(e,t){var n=e.freshness||Qe.freshness,r=e.timeout||Qe.timeout,o=t.freshness||Number.MAX_SAFE_INTEGER,c=t.timeout||Number.MAX_SAFE_INTEGER;e.freshness=Math.min(n,o),e.timeout=Math.min(r,c)})(r,t),e[n]=r}(t,r,n)}))})),t}function $e(e,t){return window.setTimeout(e,t)}function Je(e){return window.clearTimeout(e)}var Ze=function(e,t,n){var r=this;void 0===t&&(t=$e),void 0===n&&(n=Je),this.getName=function(){return r.name||"UID_"+r.uid},this.mapOperations=function(e){return Object.keys(e).reduce((function(t,n){return t[n]=function(t,o){var c=e[n];return r.applyOperation(c,t,o)},t}),{})},this.setDataHandlers=function(e){var t=e.dataRequested,n=e.dataReceived;r.dataHandlers={dataRequested:t,dataReceived:n}},this.setState=function(e,t){void 0===t&&(t=new Date),r.state!==e&&(r.state=e,r.updateTimer(t),r.subscriptionCallbacks.forEach((function(e){return e(r)})),Ge(r))},this.subscribe=function(e){return r.subscriptionCallbacks.has(e)?(r.debug("Attempting to add a subscription callback twice:",e),!1):(r.subscriptionCallbacks.add(e),e)},this.unsubscribe=function(e){return r.subscriptionCallbacks.has(e)?(r.subscriptionCallbacks.delete(e),e):(r.debug("Attempting to remove a callback that is not subscribed:",e),!1)},this.getResource=function(e){return(r.state.resources||{})[e]||{}},this.requireResource=function(e){return function(t,n){return e.push(Object(oe.a)({},t,{resourceName:n})),r.getResource(n)}},this.getMutations=function(){return r.mutations},this.getSelectors=function(e){return Ye(r.selectors,r.getResource,r.requireResource(e))},this.clearComponentRequirements=function(e,t){void 0===t&&(t=new Date),r.requirementsByComponent.delete(e),r.updateRequirementsByResource(t)},this.setComponentRequirements=function(e,t,n){void 0===n&&(n=new Date),r.requirementsByComponent.set(e,t),r.updateRequirementsByResource(n)},this.setComponentData=function(e,t,n){if(void 0===n&&(n=new Date),t){var o=[];t(r.getSelectors(o)),r.setComponentRequirements(e,o,n)}else r.clearComponentRequirements(e,n)},this.updateRequirementsByResource=function(e){void 0===e&&(e=new Date);var t=Ke(r.requirementsByComponent);Object(s.isEqual)(r.requirementsByResource,t)||(r.requirementsByResource=t,r.updateTimer(e))},this.updateRequirementsData=function(){var e=Object(Se.a)(b.a.mark((function e(t){var n,o,c,a,i,l,u,d,p,m,h,f;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.requirementsByComponent,o=r.requirementsByResource,c=r.state,a=r.minUpdate,i=r.maxUpdate,l=c.resources||{},u=n.size,d=Object.keys(o).length,r.debug("Updating requirements for "+u+" components and "+d+" resources."),Ge(r),Object(s.isEmpty)(o)){e.next=20;break}if(p=xe(o,l,a,i,t),m=p.nextUpdate,!((h=p.updates)&&h.length>0)){e.next=15;break}if(f=r.readOperationName,r.operations[f]){e.next=13;break}throw new Error('Operation "'+f+'" not found.');case 13:return e.next=15,r.operations[f](h);case 15:r.debug("Scheduling next update for "+m/1e3+" seconds."),Ge(r),r.updateTimer(t,m),e.next=21;break;case 20:r.timeoutId&&(r.debug("Unscheduling future updates"),Ge(r),r.updateTimer(t,null));case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.updateTimer=function(e,t){void 0===t&&(t=void 0);var n=r.requirementsByResource,o=r.state,c=r.minUpdate,a=r.maxUpdate,i=o.resources||{};void 0===t&&(t=xe(n,i,c,a,e).nextUpdate),r.timeoutId&&(r.clearTimer(r.timeoutId),r.timeoutId=null),t&&(r.timeoutId=r.setTimer(r.updateRequirementsData,t))},this.applyOperation=function(){var e=Object(Se.a)(b.a.mark((function e(t,n,o){var c,a,i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.dataRequested(n),c=t(n,o)||[],a=Object(s.isArray)(c)?c:[c],i=a.map(function(){var e=Object(Se.a)(b.a.mark((function e(t){var n;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return n=e.sent,r.dataReceived(n),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=7,Promise.all(i);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(0),r.debug("Error caught while applying operation: ",t),e.t0;case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n,r){return e.apply(this,arguments)}}(),this.dataRequested=function(e){if(r.dataHandlers)return r.dataHandlers.dataRequested(e),e;r.debug("Data requested before dataHandlers set. Disregarding.")},this.dataReceived=function(e){if(r.dataHandlers)return r.dataHandlers.dataReceived(e),e;r.debug("Data received before dataHandlers set. Disregarding.")};var o=e.operations,c=e.mutations,a=e.selectors,i=e.readOperationName||"read";this.uid=Object(s.uniqueId)(),this.name=e.name,this.debug=Te()("fresh-data:api-client["+this.uid+"]"),this.debug("New ApiClient for apiSpec: ",e),this.operations=o&&this.mapOperations(o),this.mutations=c&&Ye(c,this.operations),this.selectors=a,this.readOperationName=i,this.dataHandlers=null,this.subscriptionCallbacks=new Set,this.requirementsByComponent=new Map,this.requirementsByResource={},this.minUpdate=500,this.maxUpdate=3e4,this.setTimer=t,this.clearTimer=n,this.timeoutId=null,this.state={},Ge(this)};function Ye(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.keys(e).reduce((function(t,r){return t[r]=e[r].apply(e,n),t}),{})}var et="/wc-analytics",tt={timeout:6e4,freshness:18e5},nt=["processing","on-hold"],rt=25;function ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.identity;return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,o="function"==typeof e?e(r):e,c=Object(Oe.getIdsFromQuery)(n);if(c.length<1)return Promise.resolve([]);var a={include:c.join(","),per_page:c.length};return Le()({path:Object(Ee.addQueryArgs)(o,a)}).then((function(e){return e.map(t)}))}}var ct=ot(et+"/products/categories",(function(e){return{key:e.id,label:e.name}})),at=ot(et+"/coupons",(function(e){return{key:e.id,label:e.code}})),it=ot(et+"/customers",(function(e){return{key:e.id,label:e.name}})),st=ot(et+"/products",(function(e){return{key:e.id,label:e.name}})),lt=ot(et+"/taxes",(function(e){return{key:e.id,label:Ne(e)}})),ut=ot((function(e){return et+"/products/".concat(e.products,"/variations")}),(function(e){return{key:e.id,label:e.attributes.reduce((function(e,t,n,r){return e+"".concat(t.option).concat(r.length===n+1?"":", ")}),"")}})),dt=Object(ze.applyFilters)("woocommerce_admin_orders_report_charts",[{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),type:"number"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_total",type:"currency"},{key:"avg_order_value",label:Object(_e.__)("Average Order Value","woocommerce-admin"),type:"currency"},{key:"avg_items_per_order",label:Object(_e.__)("Average Items Per Order","woocommerce-admin"),order:"desc",orderby:"num_items_sold",type:"average"}]),pt=Object(ze.applyFilters)("woocommerce_admin_orders_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:["chart"],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Orders","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),mt=Object(ze.applyFilters)("woocommerce_admin_orders_report_advanced_filters",{title:Object(_e._x)("Orders Match {{select /}} Filters","A sentence describing filters for Orders. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ","woocommerce-admin"),filters:{status:{labels:{add:Object(_e.__)("Order Status","woocommerce-admin"),remove:Object(_e.__)("Remove order status filter","woocommerce-admin"),rule:Object(_e.__)("Select an order status filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Order Status{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select an order status","woocommerce-admin")},rules:[{value:"is",label:Object(_e._x)("Is","order status","woocommerce-admin")},{value:"is_not",label:Object(_e._x)("Is Not","order status","woocommerce-admin")}],input:{component:"SelectControl",options:Object.keys(ye.d).map((function(e){return{value:e,label:ye.d[e]}}))}},product:{labels:{add:Object(_e.__)("Products","woocommerce-admin"),placeholder:Object(_e.__)("Search products","woocommerce-admin"),remove:Object(_e.__)("Remove products filter","woocommerce-admin"),rule:Object(_e.__)("Select a product filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Product{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select products","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","products","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","products","woocommerce-admin")}],input:{component:"Search",type:"products",getLabels:st}},coupon:{labels:{add:Object(_e.__)("Coupon Codes","woocommerce-admin"),placeholder:Object(_e.__)("Search coupons","woocommerce-admin"),remove:Object(_e.__)("Remove coupon filter","woocommerce-admin"),rule:Object(_e.__)("Select a coupon filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Coupon Code{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select coupon codes","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","coupon code","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","coupon code","woocommerce-admin")}],input:{component:"Search",type:"coupons",getLabels:at}},customer_type:{labels:{add:Object(_e.__)("Customer Type","woocommerce-admin"),remove:Object(_e.__)("Remove customer filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Customer is{{/title}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select a customer type","woocommerce-admin")},input:{component:"SelectControl",options:[{value:"new",label:Object(_e.__)("New","woocommerce-admin")},{value:"returning",label:Object(_e.__)("Returning","woocommerce-admin")}],defaultOption:"new"}},refunds:{labels:{add:Object(_e.__)("Refunds","woocommerce-admin"),remove:Object(_e.__)("Remove refunds filter","woocommerce-admin"),rule:Object(_e.__)("Select a refund filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Refunds{{/title}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select a refund type","woocommerce-admin")},input:{component:"SelectControl",options:[{value:"all",label:Object(_e.__)("All","woocommerce-admin")},{value:"partial",label:Object(_e.__)("Partially refunded","woocommerce-admin")},{value:"full",label:Object(_e.__)("Fully refunded","woocommerce-admin")},{value:"none",label:Object(_e.__)("None","woocommerce-admin")}],defaultOption:"all"}},tax_rate:{labels:{add:Object(_e.__)("Tax Rates","woocommerce-admin"),placeholder:Object(_e.__)("Search tax rates","woocommerce-admin"),remove:Object(_e.__)("Remove tax rate filter","woocommerce-admin"),rule:Object(_e.__)("Select a tax rate filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Tax Rate{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select tax rates","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","tax rate","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","tax rate","woocommerce-admin")}],input:{component:"Search",type:"taxes",getLabels:lt}}}});function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(s.find)(t,{key:e});return n||t[0]}var ht=n(16),ft=n.n(ht),gt=n(38),vt=Object(ye.g)("wcAdminSettings",{}).woocommerce_default_date_range,Mt=void 0===vt?"period=month&compare=previous_year":vt,Ot=Object(s.partialRight)(gt.getDateParamsFromQuery,Mt),yt=Object(s.partialRight)(gt.getCurrentDates,Mt),wt=n(86),zt=new(n.n(wt).a)(ye.b),_t=zt.formatCurrency.bind(zt),At=zt.formatDecimal.bind(zt),jt=zt.formatDecimalString.bind(zt),kt=zt.render.bind(zt),Et=zt.setCurrency.bind(zt),Ct=n(98),Lt=(Object(s.partial)(Ct.numberFormat,ye.b),Object(s.partial)(Ct.formatValue,ye.b)),Nt=n(32),St=n.n(Nt),qt=n(762),Tt=n(78),xt=n(52),Bt=n(6),Rt=n.n(Bt),Pt=function(){return Object(c.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M18,9c-0.009,0-0.017,0.002-0.025,0.003C17.72,5.646,14.922,3,11.5,3C7.91,3,5,5.91,5,9.5c0,0.524,0.069,1.031,0.186,1.519 C5.123,11.016,5.064,11,5,11c-2.209,0-4,1.791-4,4c0,1.202,0.541,2.267,1.38,3h18.593C22.196,17.089,23,15.643,23,14 C23,11.239,20.761,9,18,9z M12,16l-4-5h3V8h2v3h3L12,16z"}))},Wt=n(165),Dt=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e,t,n,r,o=this.props,a=o.className,i=o.isError,s=o.isEmpty;return i?(e=Object(_e.__)("There was an error getting your stats. Please try again.","woocommerce-admin"),t=Object(_e.__)("Reload","woocommerce-admin"),r=function(){window.location.reload()}):s&&(e=Object(_e.__)("No results could be found for this date range.","woocommerce-admin"),t=Object(_e.__)("View Orders","woocommerce-admin"),n=Object(ye.f)("edit.php?post_type=shop_order")),Object(c.createElement)(I.EmptyContent,{className:a,title:e,actionLabel:t,actionURL:n,actionCallback:r})}}]),t}(c.Component);Dt.propTypes={className:K.a.string,isError:K.a.bool,isEmpty:K.a.bool},Dt.defaultProps={className:""};var Ht=Dt,Xt=n(142),Vt=n.n(Xt),It=n(20),Ft=n.n(It);function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qt(e){var t=e.endpoint,n=e.query,r=e.limitBy,o=e.filters,c=void 0===o?[]:o,a=e.advancedFilters,i=void 0===a?{}:a;return n.search?(r||[t]).reduce((function(e,t){return e[t]=n[t],e}),{}):c.map((function(e){return function(e,t,n){var r=n[e.param];if(!r)return{};if("advanced"===r){var o=Object(Oe.getActiveFiltersFromQuery)(n,t.filters);return 0===o.length?{}:o.map((function(e){return function(e,t){var n=e.filters[t.key];if("Date"!==Object(s.get)(n,["input","component"]))return t;var r=t.rule,o=t.value,c={after:"start",before:"end"};if(Array.isArray(o)){var a=Vt()(o,2),i=a[0],l=a[1];return Object.assign({},t,{value:[Object(gt.appendTimestamp)(Ft()(i),c.after),Object(gt.appendTimestamp)(Ft()(l),c.before)]})}return Object.assign({},t,{value:Object(gt.appendTimestamp)(Ft()(o),c[r])})}(t,e)})).reduce((function(e,t){var n=t.key,r=t.rule,o=t.value;return e[Object(Oe.getUrlKey)(n,r)]=o,e}),{match:n.match||"all"})}var c=Object(s.find)(Object(Oe.flattenFilters)(e.filters),{value:r});if(!c)return{};if(c.settings&&c.settings.param){var a=c.settings.param;return n[a]?je()({},a,n[a]):{}}return je()({},e.param,r)}(e,i,n)})).reduce((function(e,t){return Object.assign(e,t)}),{})}var Kt=["stock","customers"];function $t(e){var t=e.endpoint,n=e.dataType,r=e.query,o=yt(r),c=Object(gt.getIntervalForQuery)(r),a=Qt(e),i=o[n].before;return Gt(Object(s.includes)(Kt,t)?{}:{order:"asc",interval:c,per_page:100,after:Object(gt.appendTimestamp)(o[n].after,"start"),before:Object(gt.appendTimestamp)(i,"end"),segmentby:r.segmentby},a)}function Jt(e){var t=e.endpoint,n=(0,e.select)("wc-api"),r=n.getReportStats,o=n.getReportStatsError,c=n.isReportStatsRequesting,a={isEmpty:!1,isError:!1,isRequesting:!1,data:{totals:{},intervals:[]}},i=$t(e),l=r(t,i);if(c(t,i))return Gt({},a,{isRequesting:!0});if(o(t,i))return Gt({},a,{isError:!0});if(function(e,t){return!e||(!e.data||(!(e.data.totals&&!Object(s.isNull)(e.data.totals))||!(Object(s.includes)(Kt,t)||e.data.intervals&&0!==e.data.intervals.length)))}(l,t))return Gt({},a,{isEmpty:!0});var u=l&&l.data&&l.data.totals||null,d=l&&l.data&&l.data.intervals||[];if(l.totalResults>100){for(var p=!0,m=!1,b=[],h=Math.ceil(l.totalResults/100),f=1,g=2;g<=h;g++){var v=Gt({},i,{page:g}),M=r(t,v);if(!c(t,v)){if(o(t,v)){m=!0,p=!1;break}if(b.push(M),++f===h){p=!1;break}}}if(p)return Gt({},a,{isRequesting:!0});if(m)return Gt({},a,{isError:!0});Object(s.forEach)(b,(function(e){d=d.concat(e.data.intervals)}))}return Gt({},a,{data:{totals:u,intervals:d}})}function Zt(e){switch(e){case"currency":return _t;case"percent":return".0%";case"number":return",";case"average":return",.2r";default:return","}}function Yt(e){var t=e.query,n=e.tableQuery,r=void 0===n?{}:n,o=Qt(e),c=yt(t),a=Object(s.includes)(Kt,e.endpoint);return Gt({orderby:t.orderby||"date",order:t.order||"desc",after:a?void 0:Object(gt.appendTimestamp)(c.primary.after,"start"),before:a?void 0:Object(gt.appendTimestamp)(c.primary.before,"end"),page:t.paged||1,per_page:t.per_page||rt},o,{},r)}var en=n(120),tn=n.n(en),nn=n(70),rn=function(e){return Object(nn.a)((function(t){var n={},r=function(r){function o(e){var t;return x()(this,o),(t=W()(this,H()(o).call(this,e))).onStoreChange=t.onStoreChange.bind(ft()(t)),t.subscribe(e.registry),t.onUnmounts={},t.mergeProps=t.getNextMergeProps(e),t}return V()(o,r),R()(o,[{key:"getNextMergeProps",value:function(t){var r=this,o={},c=[],a={component:this},i=e((function(e){return o[e]||function(e,t,n){var a=t.select(e);if(Object(s.isFunction)(a)){var i=a(n),l=i.selectors,u=i.onComplete,d=i.onUnmount;u&&c.push(u),d&&(r.onUnmounts[e]=d),o[e]=l}else o[e]=a}(e,t.registry,a),o[e]}),t.ownProps)||n;return c.forEach((function(e){return e()})),i}},{key:"componentDidMount",value:function(){this.canRunSelection=!0,this.hasQueuedSelection&&(this.hasQueuedSelection=!1,this.onStoreChange())}},{key:"componentWillUnmount",value:function(){var e=this;this.canRunSelection=!1,this.unsubscribe(),Object.keys(this.onUnmounts).forEach((function(t){return e.onUnmounts[t]()}))}},{key:"shouldComponentUpdate",value:function(e,t){var n=e.registry!==this.props.registry;n&&(this.unsubscribe(),this.subscribe(e.registry));var r=n||!tn()(this.props.ownProps,e.ownProps);if(this.state===t&&!r)return!1;if(r){var o=this.getNextMergeProps(e);tn()(this.mergeProps,o)||(this.mergeProps=o)}return!0}},{key:"onStoreChange",value:function(){if(this.canRunSelection){var e=this.getNextMergeProps(this.props);tn()(this.mergeProps,e)||(this.mergeProps=e,this.setState({}))}else this.hasQueuedSelection=!0}},{key:"subscribe",value:function(e){this.unsubscribe=e.subscribe(this.onStoreChange)}},{key:"render",value:function(){return Object(c.createElement)(t,N()({},this.props.ownProps,this.mergeProps))}}]),o}(c.Component);return function(e){return Object(c.createElement)(a.RegistryConsumer,null,(function(t){return Object(c.createElement)(r,{ownProps:e,registry:t})}))}}),"withSelect")};function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var an=n(23);n(389);function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var un=function(e){function t(e){var n;x()(this,t);var r=(n=W()(this,H()(t).call(this,e))).props,o=r.query,a=r.compareBy,i=o.filter?Object(Oe.getIdsFromQuery)(o[a]):[];return n.state={selectedRows:i},n.onColumnsChange=n.onColumnsChange.bind(ft()(n)),n.onPageChange=n.onPageChange.bind(ft()(n)),n.onSort=n.onSort.bind(ft()(n)),n.scrollPointRef=Object(c.createRef)(),n.trackTableSearch=n.trackTableSearch.bind(ft()(n)),n.onClickDownload=n.onClickDownload.bind(ft()(n)),n.onCompare=n.onCompare.bind(ft()(n)),n.onSearchChange=n.onSearchChange.bind(ft()(n)),n.selectRow=n.selectRow.bind(ft()(n)),n.selectAllRows=n.selectAllRows.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=e.query,n=this.props,r=n.compareBy,o=n.query;if(o.filter||t.filter){var c=t.filter?Object(Oe.getIdsFromQuery)(t[r]):[],a=o.filter?Object(Oe.getIdsFromQuery)(o[r]):[];Object(s.isEqual)(c.sort(),a.sort())||this.setState({selectedRows:a})}}},{key:"onColumnsChange",value:function(e,t){var n=this.props,r=n.columnPrefsKey,o=n.endpoint,c=n.getHeadersContent,a=n.updateCurrentUserData,i=c().map((function(e){return e.key})).filter((function(t){return!e.includes(t)}));r&&a(je()({},r,i));if(t){var s={report:o,column:t,status:e.includes(t)?"on":"off"};Object(an.b)("analytics_table_header_toggle",s)}}},{key:"onPageChange",value:function(e,t){var n=this.props.endpoint;this.scrollPointRef.current.scrollIntoView();var r=this.scrollPointRef.current.nextSibling.querySelector(".woocommerce-table__table"),o=xt.a.focusable.find(r);o.length&&o[0].focus(),t&&("goto"===t?Object(an.b)("analytics_table_go_to_page",{report:n,page:e}):Object(an.b)("analytics_table_page_click",{report:n,direction:t}))}},{key:"trackTableSearch",value:function(){var e=this.props.endpoint;Object(an.b)("analytics_table_filter",{report:e})}},{key:"onSort",value:function(e,t){Object(Oe.onQueryChange)("sort")(e,t);var n={report:this.props.endpoint,column:e,direction:t};Object(an.b)("analytics_table_sort",n)}},{key:"filterShownHeaders",value:function(e,t){return t?e.map((function(e){return ln({},e,{visible:e.required||!t.includes(e.key)})})):e.map((function(e){return ln({},e,{visible:e.required||!e.hiddenByDefault})}))}},{key:"onClickDownload",value:function(){var e=this.props,t=e.endpoint,n=e.getHeadersContent,r=e.getRowsContent,o=e.initiateReportExport,c=e.query,a=e.searchBy,i=e.tableData,s=e.title,l=Object.assign({},c),u=i.items,d=i.query,p=u.data,m=u.totalResults,b="browser";delete l.extended_info,l.search&&delete l[a],p&&p.length===m?Object(Wt.downloadCSVFile)(Object(Wt.generateCSVFileName)(s,l),Object(Wt.generateCSVDataFromTable)(n(),r(p))):(b="email",o(t,s,d)),Object(an.b)("analytics_table_download",{report:t,rows:m,downloadType:b})}},{key:"onCompare",value:function(){var e=this.props,t=e.compareBy,n=e.compareParam,r=this.state.selectedRows;t&&Object(Oe.onQueryChange)("compare")(t,n,r.join(","))}},{key:"onSearchChange",value:function(e){var t,n=this.props,r=n.baseSearchQuery,o=n.compareParam,c=n.searchBy,a=e.map((function(e){return e.label.replace(",","%2C")}));a.length?Object(Oe.updateQueryString)(ln((t={filter:void 0},je()(t,o,void 0),je()(t,c,void 0),t),r,{search:Object(s.uniq)(a).join(",")})):Object(Oe.updateQueryString)({search:void 0});this.trackTableSearch()}},{key:"selectAllRows",value:function(e){var t=this.props.ids;this.setState({selectedRows:e?t:[]})}},{key:"selectRow",value:function(e,t){var n=this.props.ids;t?this.setState((function(t){var r=t.selectedRows;return{selectedRows:Object(s.uniq)([n[e]].concat(St()(r)))}})):this.setState((function(t){var r=t.selectedRows,o=r.indexOf(n[e]);return{selectedRows:[].concat(St()(r.slice(0,o)),St()(r.slice(o+1)))}}))}},{key:"getCheckbox",value:function(e){var t=this.props.ids,n=void 0===t?[]:t,r=-1!==this.state.selectedRows.indexOf(n[e]);return{display:Object(c.createElement)(qt.a,{onChange:Object(s.partial)(this.selectRow,e),checked:r}),value:!1}}},{key:"getAllCheckbox",value:function(){var e=this.props.ids,t=void 0===e?[]:e,n=this.state.selectedRows,r=t.length>0,o=r&&t.length===n.length;return{cellClassName:"is-checkbox-column",key:"compare",label:Object(c.createElement)(qt.a,{onChange:this.selectAllRows,"aria-label":Object(_e.__)("Select All"),checked:o,disabled:!r}),required:!0}}},{key:"render",value:function(){var e=this,t=this.state.selectedRows,n=this.props,r=n.getHeadersContent,o=n.getRowsContent,a=n.getSummary,i=n.isRequesting,l=(n.itemIdField,n.primaryData),u=n.tableData,d=n.endpoint,p=(n.tableQuery,n.userPrefColumns),m=n.compareBy,b=n.searchBy,h=n.labels,f=void 0===h?{}:h,g=q()(n,["getHeadersContent","getRowsContent","getSummary","isRequesting","itemIdField","primaryData","tableData","endpoint","tableQuery","userPrefColumns","compareBy","searchBy","labels"]),v=u.items,M=u.query;if(u.isError||l.isError)return Object(c.createElement)(Ht,{isError:!0});var O=i||u.isRequesting||l.isRequesting,y=Object(s.get)(l,["data","totals"],{}),w=v.totalResults,z=0<w,_=Object(Oe.getSearchWords)(this.props.query).map((function(e){return{key:e,label:e}})),A=Object(ze.applyFilters)("woocommerce_admin_report_table",{endpoint:d,headers:r(),rows:o(v.data),totals:y,summary:a?a(y,w):null,items:v}),j=A.headers,k=A.rows,E=A.summary;m&&(k=k.map((function(t,n){return[e.getCheckbox(n)].concat(St()(t))})),j=[this.getAllCheckbox()].concat(St()(j)));var C=this.filterShownHeaders(j,p),L=Rt()("woocommerce-report-table",{"has-compare":!!m,"has-search":!!b});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-report-table__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(c.createElement)(I.TableCard,N()({className:L,actions:[m&&Object(c.createElement)(I.CompareButton,{key:"compare",className:"woocommerce-table__compare",count:t.length,helpText:f.helpText||Object(_e.__)("Check at least two items below to compare","woocommerce-admin"),onClick:this.onCompare,disabled:!z},f.compareButton||Object(_e.__)("Compare","woocommerce-admin")),b&&Object(c.createElement)(I.Search,{allowFreeTextSearch:!0,inlineTags:!0,key:"search",onChange:this.onSearchChange,placeholder:f.placeholder||Object(_e.__)("Search by item name","woocommerce-admin"),selected:_,showClearButton:!0,type:b,disabled:!z}),z&&Object(c.createElement)(Tt.a,{key:"download",className:"woocommerce-table__download-button",disabled:O,onClick:this.onClickDownload,isLink:!0},Object(c.createElement)(Pt,null),Object(c.createElement)("span",{className:"woocommerce-table__download-button__label"},f.downloadButton||Object(_e.__)("Download","woocommerce-admin")))],headers:C,isLoading:O,onQueryChange:Oe.onQueryChange,onColumnsChange:this.onColumnsChange,onSort:this.onSort,onPageChange:this.onPageChange,rows:k,rowsPerPage:parseInt(M.per_page)||rt,summary:E,totalRows:w},g)))}}]),t}(c.Component);un.propTypes={baseSearchQuery:K.a.object,compareBy:K.a.string,compareParam:K.a.string,columnPrefsKey:K.a.string,endpoint:K.a.string,extendItemsMethodNames:K.a.shape({getError:K.a.string,isRequesting:K.a.string,load:K.a.string}),getHeadersContent:K.a.func.isRequired,getRowsContent:K.a.func.isRequired,getSummary:K.a.func,itemIdField:K.a.string,labels:K.a.shape({compareButton:K.a.string,downloadButton:K.a.string,helpText:K.a.string,placeholder:K.a.string}),primaryData:K.a.object,searchBy:K.a.string,tableData:K.a.object.isRequired,tableQuery:K.a.object,title:K.a.string.isRequired},un.defaultProps={primaryData:{},tableData:{items:{data:[],totalResults:0},query:{}},tableQuery:{},compareParam:"filter",downloadable:!1,onSearch:s.noop,baseSearchQuery:{}};var dn=Object(ke.a)(rn((function(e,t){var n=t.endpoint,r=t.getSummary,o=t.isRequesting,c=t.itemIdField,a=t.query,i=t.tableData,l=t.tableQuery,u=t.columnPrefsKey,d=t.filters,p=t.advancedFilters,m=[];if(u){var b=(0,e("wc-api").getCurrentUserData)();m=b&&b[u]?b[u]:m}if(o||a.search&&(!a[n]||!a[n].length))return{userPrefColumns:m};var h=["variations","categories"].includes(n)?"products":n,f=r?Jt({endpoint:h,dataType:"primary",query:a,select:e,filters:d,advancedFilters:p,tableQuery:l}):{},g=function(e,t,n){var r=t.extendItemsMethodNames,o=t.itemIdField,c=n.items.data;if(!(Array.isArray(c)&&c.length&&r&&o))return n;var a=e("wc-api"),i=a[r.getError],l=a[r.isRequesting],u=a[r.load],d={include:c.map((function(e){return e[o]})).join(","),per_page:c.length},p=u(d),m=!!l&&l(d),b=!!i&&i(d),h=c.map((function(e){var t=Object(s.first)(p.filter((function(t){return e.id===t.id})));return cn({},e,{},t)}));return cn({},n,{isRequesting:n.isRequesting||m,isError:n.isError||b,items:cn({},n.items,{data:h})})}(e,t,i||function(e){var t=e.endpoint,n=(0,e.select)("wc-api"),r=n.getReportItems,o=n.getReportItemsError,c=n.isReportItemsRequesting,a=Yt(e),i={query:a,isRequesting:!1,isError:!1,items:{data:[],totalResults:0}},s=r(t,a);return c(t,a)?Gt({},i,{isRequesting:!0}):o(t,a)?Gt({},i,{isError:!0}):Gt({},i,{items:s})}({endpoint:n,query:a,select:e,tableQuery:l,filters:d,advancedFilters:p}));return{primaryData:f,ids:c?g.items.data.map((function(e){return e[c]})):[],tableData:g,query:ln({},l,{},a),userPrefColumns:m}})),Object(a.withDispatch)((function(e){var t=e("wc-api");return{initiateReportExport:t.initiateReportExport,updateCurrentUserData:t.updateCurrentUserData}})))(un),pn=(n(391),function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Date","woocommerce-admin"),key:"date",required:!0,defaultSort:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Order #","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Order Number","woocommerce-admin"),key:"order_number",required:!0},{label:Object(_e.__)("Status","woocommerce-admin"),key:"status",required:!1,isSortable:!1},{label:Object(_e.__)("Customer","woocommerce-admin"),key:"customer_id",required:!1,isSortable:!1},{label:Object(_e.__)("Product(s)","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Products","woocommerce-admin"),key:"products",required:!1,isSortable:!1},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"num_items_sold",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Coupon(s)","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Coupons","woocommerce-admin"),key:"coupons",required:!1,isSortable:!1},{label:Object(_e.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_total",required:!0,isSortable:!0,isNumeric:!0}]}},{key:"getCustomerType",value:function(e){switch(e){case"new":return Object(_e._x)("New","customer type","woocommerce-admin");case"returning":return Object(_e._x)("Returning","customer type","woocommerce-admin");default:return Object(_e._x)("N/A","customer type","woocommerce-admin")}}},{key:"getRowsContent",value:function(e){var t=this,n=this.props.query,r=Object(Oe.getPersistedQuery)(n);return Object(s.map)(e,(function(e){var n=e.currency,o=e.customer_type,a=e.date_created,i=e.net_total,s=e.num_items_sold,l=e.order_id,u=e.order_number,d=e.parent_id,p=e.status,m=e.extended_info||{},b=m.coupons,h=m.products.sort((function(e,t){return t.quantity-e.quantity})).map((function(e){return{label:e.name,quantity:e.quantity,href:Object(Oe.getNewPath)(r,"/analytics/products",{filter:"single_product",products:e.id})}})),f=b.map((function(e){return{label:e.code,href:Object(Oe.getNewPath)(r,"/analytics/coupons",{filter:"single_coupon",coupons:e.id})}}));return[{display:Object(c.createElement)(I.Date,{date:a,visibleFormat:gt.defaultTableDateFormat}),value:a},{display:Object(c.createElement)(I.Link,{href:"post.php?post="+(d||l)+"&action=edit"+(d?"#order_refunds":""),type:"wp-admin"},u),value:u},{display:Object(c.createElement)(I.OrderStatus,{className:"woocommerce-orders-table__status",order:{status:p},orderStatusMap:Object(ye.g)("orderStatuses",{})}),value:p},{display:t.getCustomerType(o),value:o},{display:t.renderList(h.length?[h[0]]:[],h.map((function(e){return{label:Object(_e.sprintf)(Object(_e.__)("%s× %s","woocommerce-admin"),e.quantity,e.label),href:e.href}}))),value:h.map((function(e){var t=e.quantity,n=e.label;return Object(_e.sprintf)(Object(_e.__)("%s× %s","woocommerce-admin"),t,n)})).join(", ")},{display:Lt("number",s),value:s},{display:t.renderList(f.length?[f[0]]:[],f),value:f.map((function(e){return e.label})).join(", ")},{display:kt(i,n),value:i}]}))}},{key:"getSummary",value:function(e){var t=e.orders_count,n=void 0===t?0:t,r=e.num_new_customers,o=void 0===r?0:r,c=e.num_returning_customers,a=void 0===c?0:c,i=e.products,s=void 0===i?0:i,l=e.num_items_sold,u=void 0===l?0:l,d=e.coupons_count,p=void 0===d?0:d,m=e.net_revenue,b=void 0===m?0:m;return[{label:Object(_e._n)("order","orders",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("new customer","new customers",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e._n)("returning customer","returning customers",a,"woocommerce-admin"),value:Lt("number",a)},{label:Object(_e._n)("product","products",s,"woocommerce-admin"),value:Lt("number",s)},{label:Object(_e._n)("item sold","items sold",u,"woocommerce-admin"),value:Lt("number",u)},{label:Object(_e._n)("coupon","coupons",p,"woocommerce-admin"),value:Lt("number",p)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(b)}]}},{key:"renderLinks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e,t){return Object(c.createElement)(I.Link,{href:e.href,key:t,type:"wc-admin"},e.label)}))}},{key:"renderList",value:function(e,t){return Object(c.createElement)(c.Fragment,null,this.renderLinks(e),t.length>1&&Object(c.createElement)(I.ViewMoreList,{items:this.renderLinks(t)}))}},{key:"render",value:function(){var e=this.props,t=e.query,n=e.filters,r=e.advancedFilters;return Object(c.createElement)(dn,{endpoint:"orders",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:t,tableQuery:{extended_info:!0},title:Object(_e.__)("Orders","woocommerce-admin"),columnPrefsKey:"orders_report_columns",filters:n,advancedFilters:r})}}]),t}(c.Component)),mn=n(82);function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"shouldComponentUpdate",value:function(e){return e.isRequesting!==this.props.isRequesting||e.primaryData.isRequesting!==this.props.primaryData.isRequesting||e.secondaryData.isRequesting!==this.props.secondaryData.isRequesting||!Object(s.isEqual)(e.query,this.props.query)}},{key:"getItemChartData",value:function(){var e=this.props,t=e.primaryData,n=e.selectedChart;return t.data.intervals.map((function(e){var t={};return e.subtotals.segments.forEach((function(e){if(e.segment_label){var r=t[e.segment_label]?e.segment_label+" (#"+e.segment_id+")":e.segment_label;t[e.segment_id]={label:r,value:e.subtotals[n.key]||0}}})),hn({date:Object(mn.a)("Y-m-d\\TH:i:s",e.date_start)},t)}))}},{key:"getTimeChartData",value:function(){var e=this.props,t=e.query,n=e.primaryData,r=e.secondaryData,o=e.selectedChart,c=Object(gt.getIntervalForQuery)(t),a=yt(t),i=a.primary,s=a.secondary;return n.data.intervals.map((function(e,n){var a=Object(gt.getPreviousDate)(e.date_start,i.after,s.after,t.compare,c),l=r.data.intervals[n];return{date:Object(mn.a)("Y-m-d\\TH:i:s",e.date_start),primary:{label:"".concat(i.label," (").concat(i.range,")"),labelDate:e.date_start,value:e.subtotals[o.key]||0},secondary:{label:"".concat(s.label," (").concat(s.range,")"),labelDate:a.format("YYYY-MM-DD HH:mm:ss"),value:l&&l.subtotals[o.key]||0}}}))}},{key:"getTimeChartTotals",value:function(){var e=this.props,t=e.primaryData,n=e.secondaryData,r=e.selectedChart;return{primary:Object(s.get)(t,["data","totals",r.key],null),secondary:Object(s.get)(n,["data","totals",r.key],null)}}},{key:"renderChart",value:function(e,t,n,r){var o=this.props,a=o.emptySearchResults,i=o.filterParam,s=o.interactiveLegend,l=o.itemsLabel,u=o.legendPosition,d=o.path,p=o.query,m=o.selectedChart,b=o.showHeaderControls,h=o.primaryData,f=Object(gt.getIntervalForQuery)(p),g=Object(gt.getAllowedIntervalsForQuery)(p),v=Object(gt.getDateFormatsForInterval)(f,h.data.intervals.length),M=a?Object(_e.__)("No data for the current search","woocommerce-admin"):Object(_e.__)("No data for the selected date range","woocommerce-admin");return Object(c.createElement)(I.Chart,{allowedIntervals:g,data:n,dateParser:"%Y-%m-%dT%H:%M:%S",emptyMessage:M,filterParam:i,interactiveLegend:s,interval:f,isRequesting:t,itemsLabel:l,legendPosition:u,legendTotals:r,mode:e,path:d,query:p,screenReaderFormat:v.screenReaderFormat,showHeaderControls:b,title:m.label,tooltipLabelFormat:v.tooltipLabelFormat,tooltipTitle:"time-comparison"===e&&m.label||null,tooltipValueFormat:Zt(m.type),chartType:Object(gt.getChartTypeForQuery)(p),valueType:m.type,xFormat:v.xFormat,x2Format:v.x2Format,currency:ye.b})}},{key:"renderItemComparison",value:function(){var e=this.props,t=e.isRequesting,n=e.primaryData;if(n.isError)return Object(c.createElement)(Ht,{isError:!0});var r=t||n.isRequesting,o=this.getItemChartData();return this.renderChart("item-comparison",r,o)}},{key:"renderTimeComparison",value:function(){var e=this.props,t=e.isRequesting,n=e.primaryData,r=e.secondaryData;if(!n||n.isError||r.isError)return Object(c.createElement)(Ht,{isError:!0});var o=t||n.isRequesting||r.isRequesting,a=this.getTimeChartData(),i=this.getTimeChartTotals();return this.renderChart("time-comparison",o,a,i)}},{key:"render",value:function(){return"item-comparison"===this.props.mode?this.renderItemComparison():this.renderTimeComparison()}}]),t}(c.Component);fn.propTypes={filters:K.a.array,isRequesting:K.a.bool,itemsLabel:K.a.string,limitProperties:K.a.array,mode:K.a.string,path:K.a.string.isRequired,primaryData:K.a.object,query:K.a.object.isRequired,secondaryData:K.a.object,selectedChart:K.a.shape({key:K.a.string.isRequired,label:K.a.string.isRequired,order:K.a.oneOf(["asc","desc"]),orderby:K.a.string,type:K.a.oneOf(["average","number","currency"]).isRequired}).isRequired},fn.defaultProps={isRequesting:!1,primaryData:{data:{intervals:[]},isError:!1,isRequesting:!1},secondaryData:{data:{intervals:[]},isError:!1,isRequesting:!1}};var gn=Object(ke.a)(rn((function(e,t){var n=t.endpoint,r=t.filters,o=t.isRequesting,c=t.limitProperties,a=t.query,i=t.advancedFilters,l=c||[n],u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||0===t.length)return null;var o=t.slice(0),c=o.pop();if(c.showFilters(n,r)){var a=Object(Oe.flattenFilters)(c.filters),i=n[c.param]||c.defaultValue||"all";return Object(s.find)(a,{value:i})}return e(o,n,r)}(r,a),d=Object(s.get)(u,["settings","param"]),p=t.mode||function(e,t){if(e&&t){var n=Object(s.get)(e,["settings","param"]);if(!n||Object.keys(t).includes(n))return Object(s.get)(e,["chartMode"])}return null}(u,a)||"time-comparison",m={mode:p,filterParam:d};if(o)return m;var b=l.some((function(e){return a[e]&&a[e].length}));if(a.search&&!b)return hn({},m,{emptySearchResults:!0});var h=Jt({endpoint:n,dataType:"primary",query:a,select:e,limitBy:l,filters:r,advancedFilters:i});return hn({},m,"item-comparison"===p?{primaryData:h}:{primaryData:h,secondaryData:Jt({endpoint:n,dataType:"secondary",query:a,select:e,limitBy:l,filters:r,advancedFilters:i})})})))(fn),vn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"formatVal",value:function(e,t){return"currency"===t?_t(e):Lt(t,e)}},{key:"getValues",value:function(e,t){var n=this.props,r=n.emptySearchResults,o=n.summaryData.totals,c=r?0:o.primary[e],a=r?0:o.secondary[e];return{delta:Object(Ct.calculateDelta)(c,a),prevValue:this.formatVal(a,t),value:this.formatVal(c,t)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.charts,r=t.isRequesting,o=t.query,a=t.selectedChart,i=t.summaryData,s=t.endpoint,l=t.report,u=i.isError,d=i.isRequesting;if(u)return Object(c.createElement)(Ht,{isError:!0});if(r||d)return Object(c.createElement)(I.SummaryListPlaceholder,{numberOfItems:n.length});var p=Ot(o).compare;return Object(c.createElement)(I.SummaryList,null,(function(t){var r=t.onToggle;return n.map((function(t){var n=t.key,o=t.order,i=t.orderby,u=t.label,d=t.type,m={chart:n};i&&(m.orderby=i),o&&(m.order=o);var b=Object(Oe.getNewPath)(m),h=a.key===n,f=e.getValues(n,d),g=f.delta,v=f.prevValue,M=f.value;return Object(c.createElement)(I.SummaryNumber,{key:n,delta:g,href:b,label:u,prevLabel:"previous_period"===p?Object(_e.__)("Previous Period:","woocommerce-admin"):Object(_e.__)("Previous Year:","woocommerce-admin"),prevValue:v,selected:h,value:M,onLinkClickCallback:function(){r&&r(),Object(an.b)("analytics_chart_tab_click",{report:l||s,key:n})}})}))}))}}]),t}(c.Component);vn.propTypes={charts:K.a.array.isRequired,endpoint:K.a.string.isRequired,limitProperties:K.a.array,query:K.a.object.isRequired,isRequesting:K.a.bool,selectedChart:K.a.shape({key:K.a.string.isRequired,label:K.a.string.isRequired,order:K.a.oneOf(["asc","desc"]),orderby:K.a.string,type:K.a.oneOf(["average","number","currency"]).isRequired}).isRequired,summaryData:K.a.object,report:K.a.string},vn.defaultProps={summaryData:{totals:{primary:{},secondary:{}},isError:!1,isRequesting:!1}};var Mn=Object(ke.a)(rn((function(e,t){var n=t.endpoint,r=t.isRequesting,o=t.limitProperties,c=t.query,a=t.filters,i=t.advancedFilters,s=o||[n];if(r)return{};var l=s.some((function(e){return c[e]&&c[e].length}));return c.search&&!l?{emptySearchResults:!0}:{summaryData:function(e){var t=e.endpoint,n=(0,e.select)("wc-api"),r=n.getReportStats,o=n.getReportStatsError,c=n.isReportStatsRequesting,a={isRequesting:!1,isError:!1,totals:{primary:null,secondary:null}},i=$t(Gt({},e,{dataType:"primary"})),s=r(t,i);if(c(t,i))return Gt({},a,{isRequesting:!0});if(o(t,i))return Gt({},a,{isError:!0});var l=s&&s.data&&s.data.totals||null,u=$t(Gt({},e,{dataType:"secondary"})),d=r(t,u);return c(t,u)?Gt({},a,{isRequesting:!0}):o(t,u)?Gt({},a,{isError:!0}):Gt({},a,{totals:{primary:l,secondary:d&&d.data&&d.data.totals||null}})}({endpoint:n,query:c,select:e,limitBy:s,filters:a,advancedFilters:i})}})))(vn);function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var yn=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).trackDateSelect=e.trackDateSelect.bind(ft()(e)),e.trackFilterSelect=e.trackFilterSelect.bind(ft()(e)),e.trackAdvancedFilterAction=e.trackAdvancedFilterAction.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"trackDateSelect",value:function(e){var t=this.props.report;Object(an.b)("datepicker_update",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({report:t},Object(s.omitBy)(e,s.isUndefined)))}},{key:"trackFilterSelect",value:function(e){var t=this.props.report;Object(an.b)("analytics_filter",{report:t,filter:e.filter||"all"})}},{key:"trackAdvancedFilterAction",value:function(e,t){var n=this.props.report;switch(e){case"add":Object(an.b)("analytics_filters_add",{report:n,filter:t.key});break;case"remove":Object(an.b)("analytics_filters_remove",{report:n,filter:t.key});break;case"filter":var r=Object.keys(t).reduce((function(e,n){return e[Object(s.snakeCase)(n)]=t[n],e}),{});Object(an.b)("analytics_filters_filter",{report:n,snakeCaseData:r});break;case"clear_all":Object(an.b)("analytics_filters_clear_all",{report:n});break;case"match":Object(an.b)("analytics_filters_all_any",{report:n,value:t.match})}}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.path,o=e.query,a=e.showDatePicker,i=Ot(o),s=i.period,l=i.compare,u=i.before,d=i.after,p=yt(o),m={period:s,compare:l,before:u,after:d,primaryDate:p.primary,secondaryDate:p.secondary};return Object(c.createElement)(I.ReportFilters,{query:o,siteLocale:ye.c.siteLocale,currency:zt,path:r,filters:n,advancedFilters:t,showDatePicker:a,onDateSelect:this.trackDateSelect,onFilterSelect:this.trackFilterSelect,onAdvancedFilterAction:this.trackAdvancedFilterAction,dateQuery:m,isoDateFormat:gt.isoDateFormat})}}]),t}(c.Component);yn.propTypes={advancedFilters:K.a.object,filters:K.a.array,path:K.a.string.isRequired,query:K.a.object,showDatePicker:K.a.bool,report:K.a.string.isRequired};var wn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.path,n=e.query;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:t,filters:pt,advancedFilters:mt,report:"orders"}),Object(c.createElement)(Mn,{charts:dt,endpoint:"orders",query:n,selectedChart:bt(n.chart,dt),filters:pt,advancedFilters:mt}),Object(c.createElement)(gn,{endpoint:"orders",path:t,query:n,selectedChart:bt(n.chart,dt),filters:pt,advancedFilters:mt}),Object(c.createElement)(pn,{query:n,filters:pt,advancedFilters:mt}))}}]),t}(c.Component);wn.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var zn=Object(ze.applyFilters)("woocommerce_admin_products_report_charts",[{key:"items_sold",label:Object(_e.__)("Items Sold","woocommerce-admin"),order:"desc",orderby:"items_sold",type:"number"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_revenue",type:"currency"},{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"}]),_n={label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Products","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Product","woocommerce-admin"),value:"select_product",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_product",chartMode:"item-comparison",path:["select_product"],settings:{type:"products",param:"products",getLabels:st,labels:{placeholder:Object(_e.__)("Type to search for a product","woocommerce-admin"),button:Object(_e.__)("Single Product","woocommerce-admin")}}}]},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-products",chartMode:"item-comparison",settings:{type:"products",param:"products",getLabels:st,labels:{helpText:Object(_e.__)("Check at least two products below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for products to compare","woocommerce-admin"),title:Object(_e.__)("Compare Products","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]},An={showFilters:function(e){return"single_product"===e.filter&&!!e.products&&e["is-variable"]},staticParams:["filter","products"],param:"filter-variations",filters:[{label:Object(_e.__)("All Variations","woocommerce-admin"),chartMode:"item-comparison",value:"all"},{label:Object(_e.__)("Comparison","woocommerce-admin"),chartMode:"item-comparison",value:"compare-variations",settings:{type:"variations",param:"variations",getLabels:ut,labels:{helpText:Object(_e.__)("Check at least two variations below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for variations to compare","woocommerce-admin"),title:Object(_e.__)("Compare Variations","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]},jn=Object(ze.applyFilters)("woocommerce_admin_products_report_filters",[_n,An]),kn=Object(ze.applyFilters)("woocommerce_admin_products_report_advanced_filters",{}),En=n(44),Cn=n(392),Ln=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getCategoryAncestorIds",value:function(e,t){for(var n=[],r=e.parent;r;)n.unshift(r),r=t.get(r).parent;return n}},{key:"getCategoryAncestors",value:function(e,t){var n=this.getCategoryAncestorIds(e,t);if(n.length)return 1===n.length?t.get(Object(s.first)(n)).name+" › ":2===n.length?t.get(Object(s.first)(n)).name+" › "+t.get(Object(s.last)(n)).name+" › ":t.get(Object(s.first)(n)).name+" … "+t.get(Object(s.last)(n)).name+" › "}},{key:"render",value:function(){var e=this.props,t=e.categories,n=e.category,r=e.query,o=Object(Oe.getPersistedQuery)(r);return n?Object(c.createElement)("div",{className:"woocommerce-table__breadcrumbs"},this.getCategoryAncestors(n,t),Object(c.createElement)(I.Link,{href:Object(Oe.getNewPath)(o,"/analytics/categories",{filter:"single_category",categories:n.id}),type:"wc-admin"},n.name)):Object(c.createElement)(Cn.a,null)}}]),t}(c.Component);function Nn(e,t,n){return!!t&&("instock"===e&&t<=n)}n(393);var Sn=Object(ye.g)("manageStock","no"),qn=Object(ye.g)("stockStatuses",{}),Tn=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Product Title","woocommerce-admin"),key:"product_name",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("SKU","woocommerce-admin"),key:"sku",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Category","woocommerce-admin"),key:"product_cat"},{label:Object(_e.__)("Variations","woocommerce-admin"),key:"variations",isSortable:!0},"yes"===Sn?{label:Object(_e.__)("Status","woocommerce-admin"),key:"stock_status"}:null,"yes"===Sn?{label:Object(_e.__)("Stock","woocommerce-admin"),key:"stock",isNumeric:!0}:null].filter(Boolean)}},{key:"getRowsContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.props.query,r=Object(Oe.getPersistedQuery)(n);return Object(s.map)(t,(function(t){var o=t.product_id,a=t.items_sold,i=t.net_revenue,s=t.orders_count,l=t.extended_info||{},u=l.category_ids,d=l.low_stock_amount,p=l.manage_stock,m=l.sku,b=l.stock_status,h=l.stock_quantity,f=l.variations,g=void 0===f?[]:f,v=Object(En.decodeEntities)(l.name),M=Object(Oe.getNewPath)(r,"/analytics/orders",{filter:"advanced",product_includes:o}),O=Object(Oe.getNewPath)(r,"/analytics/products",{filter:"single_product",products:o}),y=e.props.categories,w=u&&u.map((function(e){return y.get(e)})).filter(Boolean)||[],z=Nn(b,h,d)?Object(c.createElement)(I.Link,{href:Object(ye.f)("post.php?action=edit&post="+o),type:"wp-admin"},Object(_e._x)("Low","Indication of a low quantity","woocommerce-admin")):qn[b];return[{display:Object(c.createElement)(I.Link,{href:O,type:"wc-admin"},v),value:v},{display:m,value:m},{display:Lt("number",a),value:a},{display:kt(i),value:At(i)},{display:Object(c.createElement)(I.Link,{href:M,type:"wc-admin"},s),value:s},{display:Object(c.createElement)("div",{className:"woocommerce-table__product-categories"},w[0]&&Object(c.createElement)(Ln,{category:w[0],categories:y}),w.length>1&&Object(c.createElement)(I.Tag,{label:Object(_e.sprintf)(Object(_e._x)("+%d more","categories","woocommerce-admin"),w.length-1),popoverContents:w.map((function(e){return Object(c.createElement)(Ln,{category:e,categories:y,key:e.id,query:n})}))})),value:w.map((function(e){return e.name})).join(", ")},{display:Lt("number",g.length),value:g.length},"yes"===Sn?{display:p?z:Object(_e.__)("N/A","woocommerce-admin"),value:p?qn[b]:null}:null,"yes"===Sn?{display:p?Lt("number",h):Object(_e.__)("N/A","woocommerce-admin"),value:h}:null].filter(Boolean)}))}},{key:"getSummary",value:function(e){var t=e.products_count,n=void 0===t?0:t,r=e.items_sold,o=void 0===r?0:r,c=e.net_revenue,a=void 0===c?0:c,i=e.orders_count,s=void 0===i?0:i;return[{label:Object(_e._n)("product","products",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("item sold","items sold",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(a)},{label:Object(_e._n)("orders","orders",s,"woocommerce-admin"),value:Lt("number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.baseSearchQuery,r=e.filters,o=e.hideCompare,a=e.isRequesting,i=e.query,s={helpText:Object(_e.__)("Check at least two products below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search by product name or SKU","woocommerce-admin")};return Object(c.createElement)(dn,{compareBy:o?void 0:"products",endpoint:"products",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,itemIdField:"product_id",isRequesting:a,labels:s,query:i,searchBy:"products",baseSearchQuery:n,tableQuery:{orderby:i.orderby||"items_sold",order:i.order||"desc",extended_info:!0,segmentby:i.segmentby},title:Object(_e.__)("Products","woocommerce-admin"),columnPrefsKey:"products_report_columns",filters:r,advancedFilters:t})}}]),t}(c.Component),xn=Object(ke.a)(rn((function(e,t){var n=t.query;if(t.isRequesting||n.search&&(!n.products||!n.products.length))return{};var r=e("wc-api"),o=r.getItems,c=r.getItemsError,a=r.isGetItemsRequesting,i={per_page:-1};return{categories:o("categories",i),isError:Boolean(c("categories",i)),isRequesting:a("categories",i)}})))(Tn),Bn=Object(ye.g)("manageStock","no"),Rn=Object(ye.g)("stockStatuses",{}),Pn=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Product / Variation Title","woocommerce-admin"),key:"name",required:!0,isLeftAligned:!0},{label:Object(_e.__)("SKU","woocommerce-admin"),key:"sku",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},"yes"===Bn?{label:Object(_e.__)("Status","woocommerce-admin"),key:"stock_status"}:null,"yes"===Bn?{label:Object(_e.__)("Stock","woocommerce-admin"),key:"stock",isNumeric:!0}:null].filter(Boolean)}},{key:"getRowsContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.props.query,n=Object(Oe.getPersistedQuery)(t);return Object(s.map)(e,(function(e){var r=e.items_sold,o=e.net_revenue,a=e.orders_count,i=e.product_id,l=e.extended_info||{},u=l.stock_status,d=l.stock_quantity,p=l.low_stock_amount,m=l.sku,b=Object(s.get)(e,["extended_info","name"],""),h=Object(Oe.getNewPath)(n,"/analytics/orders",{filter:"advanced",product_includes:t.products}),f=Object(ye.f)("post.php?post=".concat(i,"&action=edit"));return[{display:Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},b),value:b},{display:m,value:m},{display:Lt("number",r),value:r},{display:_t(o),value:At(o)},{display:Object(c.createElement)(I.Link,{href:h,type:"wc-admin"},a),value:a},"yes"===Bn?{display:Nn(u,d,p)?Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},Object(_e._x)("Low","Indication of a low quantity","woocommerce-admin")):Rn[u],value:Rn[u]}:null,"yes"===Bn?{display:d,value:d}:null].filter(Boolean)}))}},{key:"getSummary",value:function(e){var t=e.variations_count,n=void 0===t?0:t,r=e.items_sold,o=void 0===r?0:r,c=e.net_revenue,a=void 0===c?0:c,i=e.orders_count,s=void 0===i?0:i;return[{label:Object(_e._n)("variation sold","variations sold",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("item sold","items sold",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(a)},{label:Object(_e._n)("orders","orders",s,"woocommerce-admin"),value:Lt("number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.baseSearchQuery,r=e.filters,o=e.isRequesting,a=e.query,i={helpText:Object(_e.__)("Check at least two variations below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search by variation name or SKU","woocommerce-admin")};return Object(c.createElement)(dn,{baseSearchQuery:n,compareBy:"variations",compareParam:"filter-variations",endpoint:"variations",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,isRequesting:o,itemIdField:"variation_id",labels:i,query:a,getSummary:this.getSummary,searchBy:"variations",tableQuery:{orderby:a.orderby||"items_sold",order:a.order||"desc",extended_info:!0,products:a.products,variations:a.variations},title:Object(_e.__)("Variations","woocommerce-admin"),columnPrefsKey:"variations_report_columns",filters:r,advancedFilters:t})}}]),t}(c.Component);function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e=this.props,t=e.query,n=e.isSingleProductView,r=e.isSingleProductVariable,o="compare-products"===t.filter&&t.products&&t.products.split(",").length>1||n&&r?"item-comparison":"time-comparison";return{compareObject:n&&r?"variations":"products",itemsLabel:n&&r?Object(_e.__)("%d variations","woocommerce-admin"):Object(_e.__)("%d products","woocommerce-admin"),mode:o}}},{key:"render",value:function(){var e=this.getChartMeta(),t=e.compareObject,n=e.itemsLabel,r=e.mode,o=this.props,a=o.path,i=o.query,s=o.isError,l=o.isRequesting,u=o.isSingleProductVariable;if(s)return Object(c.createElement)(Ht,{isError:!0});var d=Dn({},i);return"item-comparison"===r&&(d.segmentby="products"===t?"product":"variation"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:i,path:a,filters:jn,advancedFilters:kn,report:"products"}),Object(c.createElement)(Mn,{mode:r,charts:zn,endpoint:"products",isRequesting:l,query:d,selectedChart:bt(i.chart,zn),filters:jn,advancedFilters:kn}),Object(c.createElement)(gn,{mode:r,filters:jn,advancedFilters:kn,endpoint:"products",isRequesting:l,itemsLabel:n,path:a,query:d,selectedChart:bt(d.chart,zn)}),u?Object(c.createElement)(Pn,{baseSearchQuery:{filter:"single_product"},isRequesting:l,query:i,filters:jn,advancedFilters:kn}):Object(c.createElement)(xn,{isRequesting:l,query:i,filters:jn,advancedFilters:kn}))}}]),t}(c.Component);Hn.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var Xn=Object(ke.a)(rn((function(e,t){var n=t.query,r=t.isRequesting,o=!n.search&&n.products&&1===n.products.split(",").length;if(r)return{query:Dn({},n),isSingleProductView:o,isRequesting:r};var c=e("wc-api"),a=c.getItems,i=c.isGetItemsRequesting,s=c.getItemsError;if(o){var l=parseInt(n.products),u={include:l},d=a("products",u),p=d&&d.get(l)&&"variable"===d.get(l).type,m=i("products",u),b=Boolean(s("products",u));return{query:Dn({},n,{"is-variable":p}),isSingleProductView:o,isSingleProductVariable:p,isRequesting:m,isError:b}}return{query:n,isSingleProductView:o}})))(Hn),Vn=Object(ze.applyFilters)("woocommerce_admin_revenue_report_charts",[{key:"gross_sales",label:Object(_e.__)("Gross Sales","woocommerce-admin"),order:"desc",orderby:"gross_sales",type:"currency"},{key:"refunds",label:Object(_e.__)("Returns","woocommerce-admin"),order:"desc",orderby:"refunds",type:"currency"},{key:"coupons",label:Object(_e.__)("Coupons","woocommerce-admin"),order:"desc",orderby:"coupons",type:"currency"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),orderby:"net_revenue",type:"currency"},{key:"taxes",label:Object(_e.__)("Taxes","woocommerce-admin"),order:"desc",orderby:"taxes",type:"currency"},{key:"shipping",label:Object(_e.__)("Shipping","woocommerce-admin"),orderby:"shipping",type:"currency"},{key:"total_sales",label:Object(_e.__)("Total Sales","woocommerce-admin"),order:"desc",orderby:"total_sales",type:"currency"}]),In=Object(ze.applyFilters)("woocommerce_admin_revenue_report_filters",[]),Fn=Object(ze.applyFilters)("woocommerce_admin_revenue_report_advanced_filters",{}),Un=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Date","woocommerce-admin"),key:"date",required:!0,defaultSort:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Gross Sales","woocommerce-admin"),key:"gross_sales",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Returns","woocommerce-admin"),key:"refunds",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Coupons","woocommerce-admin"),key:"coupons",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Taxes","woocommerce-admin"),key:"taxes",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Shipping","woocommerce-admin"),key:"shipping",required:!1,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Total Sales","woocommerce-admin"),key:"total_sales",required:!0,isSortable:!0,isNumeric:!0}]}},{key:"getRowsContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){var t=e.subtotals,n=t.coupons,r=t.gross_sales,o=t.total_sales,a=t.net_revenue,i=t.orders_count,s=t.refunds,l=t.shipping,u=t.taxes,d=Object(c.createElement)(I.Link,{href:"edit.php?post_type=shop_order&m="+Object(mn.a)("Ymd",e.date_start),type:"wp-admin"},Lt("number",i));return[{display:Object(c.createElement)(I.Date,{date:e.date_start,visibleFormat:gt.defaultTableDateFormat}),value:e.date_start},{display:d,value:Number(i)},{display:kt(r),value:At(r)},{display:_t(s),value:At(s)},{display:_t(n),value:At(n)},{display:kt(a),value:At(a)},{display:kt(u),value:At(u)},{display:kt(l),value:At(l)},{display:kt(o),value:At(o)}]}))}},{key:"getSummary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.orders_count,r=void 0===n?0:n,o=e.gross_sales,c=void 0===o?0:o,a=e.total_sales,i=void 0===a?0:a,s=e.refunds,l=void 0===s?0:s,u=e.coupons,d=void 0===u?0:u,p=e.taxes,m=void 0===p?0:p,b=e.shipping,h=void 0===b?0:b,f=e.net_revenue,g=void 0===f?0:f;return[{label:Object(_e._n)("day","days",t,"woocommerce-admin"),value:Lt("number",t)},{label:Object(_e._n)("order","orders",r,"woocommerce-admin"),value:Lt("number",r)},{label:Object(_e.__)("gross sales","woocommerce-admin"),value:_t(c)},{label:Object(_e.__)("returns","woocommerce-admin"),value:_t(l)},{label:Object(_e.__)("coupons","woocommerce-admin"),value:_t(d)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(g)},{label:Object(_e.__)("taxes","woocommerce-admin"),value:_t(m)},{label:Object(_e.__)("shipping","woocommerce-admin"),value:_t(h)},{label:Object(_e.__)("total sales","woocommerce-admin"),value:_t(i)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.tableData,o=e.query;return Object(c.createElement)(dn,{endpoint:"revenue",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:o,tableData:r,title:Object(_e.__)("Revenue","woocommerce-admin"),columnPrefsKey:"revenue_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component),Gn=Object(ke.a)(rn((function(e,t){var n=t.query,r=t.filters,o=t.advancedFilters,c=yt(n),a=e("wc-api"),i=a.getReportStats,l=a.getReportStatsError,u=a.isReportStatsRequesting,d={interval:"day",orderby:n.orderby||"date",order:n.order||"desc",page:n.paged||1,per_page:n.per_page||rt,after:Object(gt.appendTimestamp)(c.primary.after,"start"),before:Object(gt.appendTimestamp)(c.primary.before,"end")},p=Yt({endpoint:"revenue",query:n,select:e,tableQuery:d,filters:r,advancedFilters:o}),m=i("revenue",p),b=Boolean(l("revenue",p)),h=u("revenue",p);return{tableData:{items:{data:Object(s.get)(m,["data","intervals"],[]),totalResults:Object(s.get)(m,["totalResults"],0)},isError:b,isRequesting:h,query:d}}})))(Un),Qn=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.path,n=e.query;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:t,report:"revenue",filters:In,advancedFilters:Fn}),Object(c.createElement)(Mn,{charts:Vn,endpoint:"revenue",query:n,selectedChart:bt(n.chart,Vn),filters:In,advancedFilters:Fn}),Object(c.createElement)(gn,{endpoint:"revenue",path:t,query:n,selectedChart:bt(n.chart,Vn),filters:In,advancedFilters:Fn}),Object(c.createElement)(Gn,{query:n,filters:In,advancedFilters:Fn}))}}]),t}(c.Component);Qn.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var Kn=Object(ze.applyFilters)("woocommerce_admin_categories_report_charts",[{key:"items_sold",label:Object(_e.__)("Items Sold","woocommerce-admin"),order:"desc",orderby:"items_sold",type:"number"},{key:"net_revenue",label:Object(_e.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_revenue",type:"currency"},{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"}]),$n=Object(ze.applyFilters)("woocommerce_admin_categories_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Categories","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Category","woocommerce-admin"),value:"select_category",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_category",chartMode:"item-comparison",path:["select_category"],settings:{type:"categories",param:"categories",getLabels:ct,labels:{placeholder:Object(_e.__)("Type to search for a category","woocommerce-admin"),button:Object(_e.__)("Single Category","woocommerce-admin")}}}]},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-categories",chartMode:"item-comparison",settings:{type:"categories",param:"categories",getLabels:ct,labels:{helpText:Object(_e.__)("Check at least two categories below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for categories to compare","woocommerce-admin"),title:Object(_e.__)("Compare Categories","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]}]),Jn=Object(ze.applyFilters)("woocommerce_admin_category_report_advanced_filters",{}),Zn=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).getRowsContent=n.getRowsContent.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Category","woocommerce-admin"),key:"category",required:!0,isSortable:!0,isLeftAligned:!0},{label:Object(_e.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Net Sales","woocommerce-admin"),key:"net_revenue",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Products","woocommerce-admin"),key:"products_count",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0}]}},{key:"getRowsContent",value:function(e){var t=this;return Object(s.map)(e,(function(e){var n=e.category_id,r=e.items_sold,o=e.net_revenue,a=e.products_count,i=e.orders_count,s=t.props,l=s.categories,u=s.query,d=l.get(n),p=Object(Oe.getPersistedQuery)(u);return[{display:Object(c.createElement)(Ln,{query:u,category:d,categories:l}),value:d&&d.name},{display:Lt("number",r),value:r},{display:kt(o),value:At(o)},{display:d&&Object(c.createElement)(I.Link,{href:Object(Oe.getNewPath)(p,"/analytics/categories",{filter:"single_category",categories:d.id}),type:"wc-admin"},Lt("number",a)),value:a},{display:Lt("number",i),value:i}]}))}},{key:"getSummary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.items_sold,r=void 0===n?0:n,o=e.net_revenue,c=void 0===o?0:o,a=e.orders_count,i=void 0===a?0:a;return[{label:Object(_e._n)("category","categories",t,"woocommerce-admin"),value:Lt("number",t)},{label:Object(_e._n)("item sold","items sold",r,"woocommerce-admin"),value:Lt("number",r)},{label:Object(_e.__)("net sales","woocommerce-admin"),value:_t(c)},{label:Object(_e._n)("order","orders",i,"woocommerce-admin"),value:Lt("number",i)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.isRequesting,o=e.query,a={helpText:Object(_e.__)("Check at least two categories below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search by category name","woocommerce-admin")};return Object(c.createElement)(dn,{compareBy:"categories",endpoint:"categories",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:r,itemIdField:"category_id",query:o,searchBy:"categories",labels:a,tableQuery:{orderby:o.orderby||"items_sold",order:o.order||"desc",extended_info:!0},title:Object(_e.__)("Categories","woocommerce-admin"),columnPrefsKey:"categories_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component),Yn=Object(ke.a)(rn((function(e,t){var n=t.isRequesting,r=t.query;if(n||r.search&&(!r.categories||!r.categories.length))return{};var o=e("wc-api"),c=o.getItems,a=o.getItemsError,i=o.isGetItemsRequesting,s={per_page:-1};return{categories:c("categories",s),isError:Boolean(a("categories",s)),isRequesting:i("categories",s)}})))(Zn);function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var tr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e=this.props.query,t="compare-categories"===e.filter&&e.categories&&e.categories.split(",").length>1,n="single_category"===e.filter&&!!e.categories,r=t||n?"item-comparison":"time-comparison";return{isSingleCategoryView:n,itemsLabel:n?Object(_e.__)("%d products","woocommerce-admin"):Object(_e.__)("%d categories","woocommerce-admin"),mode:r}}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=this.getChartMeta(),a=o.mode,i=o.itemsLabel,s=o.isSingleCategoryView,l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?er(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return"item-comparison"===a&&(l.segmentby=s?"product":"category"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:$n,advancedFilters:Jn,report:"categories"}),Object(c.createElement)(Mn,{charts:Kn,endpoint:"products",isRequesting:t,limitProperties:s?["products","categories"]:["categories"],query:l,selectedChart:bt(n.chart,Kn),filters:$n,advancedFilters:Jn,report:"categories"}),Object(c.createElement)(gn,{filters:$n,advancedFilters:Jn,mode:a,endpoint:"products",limitProperties:s?["products","categories"]:["categories"],path:r,query:l,isRequesting:t,itemsLabel:i,selectedChart:bt(n.chart,Kn)}),s?Object(c.createElement)(xn,{isRequesting:t,query:l,baseSearchQuery:{filter:"single_category"},hideCompare:s,filters:$n,advancedFilters:Jn}):Object(c.createElement)(Yn,{isRequesting:t,query:n,filters:$n,advancedFilters:Jn}))}}]),t}(c.Component);tr.propTypes={query:K.a.object.isRequired,path:K.a.string.isRequired};var nr=Object(ze.applyFilters)("woocommerce_admin_coupons_report_charts",[{key:"orders_count",label:Object(_e.__)("Discounted Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"},{key:"amount",label:Object(_e.__)("Amount","woocommerce-admin"),order:"desc",orderby:"amount",type:"currency"}]),rr=Object(ze.applyFilters)("woocommerce_admin_coupons_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Coupons","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Coupon","woocommerce-admin"),value:"select_coupon",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_coupon",chartMode:"item-comparison",path:["select_coupon"],settings:{type:"coupons",param:"coupons",getLabels:at,labels:{placeholder:Object(_e.__)("Type to search for a coupon","woocommerce-admin"),button:Object(_e.__)("Single Coupon","woocommerce-admin")}}}]},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-coupons",settings:{type:"coupons",param:"coupons",getLabels:at,labels:{title:Object(_e.__)("Compare Coupon Codes","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin"),helpText:Object(_e.__)("Check at least two coupon codes below to compare","woocommerce-admin")}}}]}]),or=Object(ze.applyFilters)("woocommerce_admin_coupon_report_advanced_filters",{}),cr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Coupon Code","woocommerce-admin"),key:"code",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Amount Discounted","woocommerce-admin"),key:"amount",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Created","woocommerce-admin"),key:"created"},{label:Object(_e.__)("Expires","woocommerce-admin"),key:"expires"},{label:Object(_e.__)("Type","woocommerce-admin"),key:"type"}]}},{key:"getRowsContent",value:function(e){var t=this,n=this.props.query,r=Object(Oe.getPersistedQuery)(n);return Object(s.map)(e,(function(e){var n=e.amount,o=e.coupon_id,a=e.orders_count,i=e.extended_info||{},s=i.code,l=i.date_created,u=i.date_expires,d=i.discount_type,p=Object(Oe.getNewPath)(r,"/analytics/coupons",{filter:"single_coupon",coupons:o}),m=Object(c.createElement)(I.Link,{href:p,type:"wc-admin"},s),b=Object(Oe.getNewPath)(r,"/analytics/orders",{filter:"advanced",coupon_includes:o});return[{display:m,value:s},{display:Object(c.createElement)(I.Link,{href:b,type:"wc-admin"},Lt("number",a)),value:a},{display:_t(n),value:At(n)},{display:Object(c.createElement)(I.Date,{date:l,visibleFormat:gt.defaultTableDateFormat}),value:l},{display:u?Object(c.createElement)(I.Date,{date:u,visibleFormat:gt.defaultTableDateFormat}):Object(_e.__)("N/A","woocommerce-admin"),value:u},{display:t.getCouponType(d),value:d}]}))}},{key:"getSummary",value:function(e){var t=e.coupons_count,n=void 0===t?0:t,r=e.orders_count,o=void 0===r?0:r,c=e.amount,a=void 0===c?0:c;return[{label:Object(_e._n)("coupon","coupons",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("order","orders",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("amount discounted","woocommerce-admin"),value:_t(a)}]}},{key:"getCouponType",value:function(e){return{percent:Object(_e.__)("Percentage","woocommerce-admin"),fixed_cart:Object(_e.__)("Fixed cart","woocommerce-admin"),fixed_product:Object(_e.__)("Fixed product","woocommerce-admin")}[e]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.isRequesting,o=e.query;return Object(c.createElement)(dn,{compareBy:"coupons",endpoint:"coupons",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:r,itemIdField:"coupon_id",query:o,searchBy:"coupons",tableQuery:{orderby:o.orderby||"orders_count",order:o.order||"desc",extended_info:!0},title:Object(_e.__)("Coupons","woocommerce-admin"),columnPrefsKey:"coupons_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component);function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ir=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e=this.props.query,t="compare-coupons"===e.filter&&e.coupons&&e.coupons.split(",").length>1?"item-comparison":"time-comparison";return{itemsLabel:Object(_e.__)("%d coupons","woocommerce-admin"),mode:t}}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=this.getChartMeta(),a=o.mode,i=o.itemsLabel,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return"item-comparison"===a&&(s.segmentby="coupon"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:rr,advancedFilters:or,report:"coupons"}),Object(c.createElement)(Mn,{charts:nr,endpoint:"coupons",isRequesting:t,query:s,selectedChart:bt(n.chart,nr),filters:rr,advancedFilters:or}),Object(c.createElement)(gn,{filters:rr,advancedFilters:or,mode:a,endpoint:"coupons",path:r,query:s,isRequesting:t,itemsLabel:i,selectedChart:bt(n.chart,nr)}),Object(c.createElement)(cr,{isRequesting:t,query:n,filters:rr,advancedFilters:or}))}}]),t}(c.Component);ir.propTypes={query:K.a.object.isRequired};var sr=Object(ze.applyFilters)("woocommerce_admin_taxes_report_charts",[{key:"total_tax",label:Object(_e.__)("Total Tax","woocommerce-admin"),order:"desc",orderby:"total_tax",type:"currency"},{key:"order_tax",label:Object(_e.__)("Order Tax","woocommerce-admin"),order:"desc",orderby:"order_tax",type:"currency"},{key:"shipping_tax",label:Object(_e.__)("Shipping Tax","woocommerce-admin"),order:"desc",orderby:"shipping_tax",type:"currency"},{key:"orders_count",label:Object(_e.__)("Orders","woocommerce-admin"),order:"desc",orderby:"orders_count",type:"number"}]),lr=Object(ze.applyFilters)("woocommerce_admin_taxes_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:["chart"],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Taxes","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Comparison","woocommerce-admin"),value:"compare-taxes",chartMode:"item-comparison",settings:{type:"taxes",param:"taxes",getLabels:ot(et+"/taxes",(function(e){return{id:e.id,label:Ne(e)}})),labels:{helpText:Object(_e.__)("Check at least two tax codes below to compare","woocommerce-admin"),placeholder:Object(_e.__)("Search for tax codes to compare","woocommerce-admin"),title:Object(_e.__)("Compare Tax Codes","woocommerce-admin"),update:Object(_e.__)("Compare","woocommerce-admin")}}}]}]),ur=Object(ze.applyFilters)("woocommerce_admin_taxes_report_advanced_filters",{}),dr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Tax Code","woocommerce-admin"),key:"tax_code",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Rate","woocommerce-admin"),key:"rate",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Total Tax","woocommerce-admin"),key:"total_tax",isSortable:!0},{label:Object(_e.__)("Order Tax","woocommerce-admin"),key:"order_tax",isSortable:!0},{label:Object(_e.__)("Shipping Tax","woocommerce-admin"),key:"shipping_tax",isSortable:!0},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0}]}},{key:"getRowsContent",value:function(e){var t=this;return Object(s.map)(e,(function(e){var n=t.props.query,r=e.order_tax,o=e.orders_count,a=e.tax_rate,i=e.tax_rate_id,s=e.total_tax,l=e.shipping_tax,u=Ne(e),d=Object(Oe.getPersistedQuery)(n),p=Object(Oe.getNewPath)(d,"/analytics/orders",{filter:"advanced",tax_rate_includes:i});return[{display:Object(c.createElement)(I.Link,{href:p,type:"wc-admin"},u),value:u},{display:a.toFixed(2)+"%",value:a},{display:kt(s),value:At(s)},{display:kt(r),value:At(r)},{display:kt(l),value:At(l)},{display:Lt("number",o),value:o}]}))}},{key:"getSummary",value:function(e){var t=e.tax_codes,n=void 0===t?0:t,r=e.total_tax,o=void 0===r?0:r,c=e.order_tax,a=void 0===c?0:c,i=e.shipping_tax,s=void 0===i?0:i,l=e.orders_count,u=void 0===l?0:l;return[{label:Object(_e._n)("tax code","tax codes",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e.__)("total tax","woocommerce-admin"),value:_t(o)},{label:Object(_e.__)("order tax","woocommerce-admin"),value:_t(a)},{label:Object(_e.__)("shipping tax","woocommerce-admin"),value:_t(s)},{label:Object(_e._n)("order","orders",u,"woocommerce-admin"),value:Lt("number",u)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.isRequesting,o=e.query;return Object(c.createElement)(dn,{compareBy:"taxes",endpoint:"taxes",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:r,itemIdField:"tax_rate_id",query:o,searchBy:"taxes",tableQuery:{orderby:o.orderby||"tax_rate_id"},title:Object(_e.__)("Taxes","woocommerce-admin"),columnPrefsKey:"taxes_report_columns",filters:n,advancedFilters:t})}}]),t}(c.Component);function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var mr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getChartMeta",value:function(){var e="compare-taxes"===this.props.query.filter?"item-comparison":"time-comparison";return{itemsLabel:Object(_e.__)("%d taxes","woocommerce-admin"),mode:e}}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=this.getChartMeta(),a=o.mode,i=o.itemsLabel,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return"item-comparison"===a&&(s.segmentby="tax_rate_id"),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:lr,advancedFilters:ur,report:"taxes"}),Object(c.createElement)(Mn,{charts:sr,endpoint:"taxes",isRequesting:t,query:s,selectedChart:bt(n.chart,sr),filters:lr,advancedFilters:ur}),Object(c.createElement)(gn,{filters:lr,advancedFilters:ur,mode:a,endpoint:"taxes",query:s,path:r,isRequesting:t,itemsLabel:i,selectedChart:bt(n.chart,sr)}),Object(c.createElement)(dr,{isRequesting:t,query:n,filters:lr,advancedFilters:ur}))}}]),t}(c.Component);mr.propTypes={query:K.a.object.isRequired};var br,hr,fr=n(30),gr=n.n(fr),vr=Object(ze.applyFilters)("woocommerce_admin_downloads_report_charts",[{key:"download_count",label:Object(_e.__)("Downloads","woocommerce-admin"),type:"number"}]),Mr=Object(ze.applyFilters)("woocommerce_admin_downloads_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Downloads","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),Or=Object(ze.applyFilters)("woocommerce_admin_downloads_report_advanced_filters",{title:Object(_e._x)("Downloads Match {{select /}} Filters","A sentence describing filters for Downloads. See screen shot for context: https://cloudup.com/ccxhyH2mEDg","woocommerce-admin"),filters:{product:{labels:{add:Object(_e.__)("Product","woocommerce-admin"),placeholder:Object(_e.__)("Search","woocommerce-admin"),remove:Object(_e.__)("Remove product filter","woocommerce-admin"),rule:Object(_e.__)("Select a product filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Product{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select product","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","products","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","products","woocommerce-admin")}],input:{component:"Search",type:"products",getLabels:st}},customer:{labels:{add:Object(_e.__)("Username","woocommerce-admin"),placeholder:Object(_e.__)("Search customer username","woocommerce-admin"),remove:Object(_e.__)("Remove customer username filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer username filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Username{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer username","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer usernames","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer usernames","woocommerce-admin")}],input:{component:"Search",type:"usernames",getLabels:it}},order:{labels:{add:Object(_e.__)("Order number","woocommerce-admin"),placeholder:Object(_e.__)("Search order number","woocommerce-admin"),remove:Object(_e.__)("Remove order number filter","woocommerce-admin"),rule:Object(_e.__)("Select a order number filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Order number{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select order number","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","order numbers","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","order numbers","woocommerce-admin")}],input:{component:"Search",type:"orders",getLabels:(hr=gr()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split(","),e.next=3,n.map((function(e){return{id:e,label:"#"+e}}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return hr.apply(this,arguments)})}},ip_address:{labels:{add:Object(_e.__)("IP Address","woocommerce-admin"),placeholder:Object(_e.__)("Search IP address","woocommerce-admin"),remove:Object(_e.__)("Remove IP address filter","woocommerce-admin"),rule:Object(_e.__)("Select an IP address filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}IP Address{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select IP address","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","IP addresses","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","IP addresses","woocommerce-admin")}],input:{component:"Search",type:"downloadIps",getLabels:(br=gr()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split(","),e.next=3,n.map((function(e){return{id:e,label:e}}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return br.apply(this,arguments)})}}}}),yr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Date","woocommerce-admin"),key:"date",defaultSort:!0,required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Product Title","woocommerce-admin"),key:"product",isSortable:!0,required:!0},{label:Object(_e.__)("File Name","woocommerce-admin"),key:"file_name"},{label:Object(_e.__)("Order #","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Order Number","woocommerce-admin"),key:"order_number"},{label:Object(_e.__)("User Name","woocommerce-admin"),key:"user_id"},{label:Object(_e.__)("IP","woocommerce-admin"),key:"ip_address"}]}},{key:"getRowsContent",value:function(e){var t=this.props.query,n=Object(Oe.getPersistedQuery)(t);return Object(s.map)(e,(function(e){var t=e._embedded,r=e.date,o=e.file_name,a=e.file_path,i=e.ip_address,s=e.order_id,l=e.order_number,u=e.product_id,d=e.username,p=t.product[0].name,m=Object(Oe.getNewPath)(n,"/analytics/products",{filter:"single_product",products:u});return[{display:Object(c.createElement)(I.Date,{date:r,visibleFormat:gt.defaultTableDateFormat}),value:r},{display:Object(c.createElement)(I.Link,{href:m,type:"wc-admin"},p),value:p},{display:Object(c.createElement)(I.Link,{href:a,type:"external"},o),value:o},{display:Object(c.createElement)(I.Link,{href:Object(ye.f)("post.php?post=".concat(s,"&action=edit")),type:"wp-admin"},l),value:l},{display:d,value:d},{display:i,value:i}]}))}},{key:"getSummary",value:function(e){var t=e.download_count,n=void 0===t?0:t,r=this.props.query,o=yt(r),c=Ft()(o.primary.after),a=Ft()(o.primary.before).diff(c,"days")+1;return[{label:Object(_e._n)("day","days",a,"woocommerce-admin"),value:Lt("number",a)},{label:Object(_e._n)("download","downloads",n,"woocommerce-admin"),value:Lt("number",n)}]}},{key:"render",value:function(){var e=this.props,t=e.query,n=e.filters,r=e.advancedFilters;return Object(c.createElement)(dn,{endpoint:"downloads",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:t,tableQuery:{_embed:!0},title:Object(_e.__)("Downloads","woocommerce-admin"),columnPrefsKey:"downloads_report_columns",filters:n,advancedFilters:r})}}]),t}(c.Component),wr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.query,n=e.path;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:t,path:n,filters:Mr,advancedFilters:Or,report:"downloads"}),Object(c.createElement)(Mn,{charts:vr,endpoint:"downloads",query:t,selectedChart:bt(t.chart,vr),filters:Mr,advancedFilters:Or}),Object(c.createElement)(gn,{endpoint:"downloads",path:n,query:t,selectedChart:bt(t.chart,vr),filters:Mr,advancedFilters:Or}),Object(c.createElement)(yr,{query:t,filters:Mr,advancedFilters:Or}))}}]),t}(c.Component);wr.propTypes={query:K.a.object.isRequired};var zr=Object(ze.applyFilters)("woocommerce_admin_stock_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"type",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Products","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Out of Stock","woocommerce-admin"),value:"outofstock"},{label:Object(_e.__)("Low Stock","woocommerce-admin"),value:"lowstock"},{label:Object(_e.__)("In Stock","woocommerce-admin"),value:"instock"},{label:Object(_e.__)("On Backorder","woocommerce-admin"),value:"onbackorder"}]}]),_r=Object(ze.applyFilters)("woocommerce_admin_stock_report_advanced_filters",{});var Ar=Object(ye.g)("stockStatuses",{}),jr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Product / Variation","woocommerce-admin"),key:"title",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("SKU","woocommerce-admin"),key:"sku",isSortable:!0},{label:Object(_e.__)("Status","woocommerce-admin"),key:"stock_status",isSortable:!0,defaultSort:!0},{label:Object(_e.__)("Stock","woocommerce-admin"),key:"stock_quantity",isSortable:!0}]}},{key:"getRowsContent",value:function(e){var t=this.props.query,n=Object(Oe.getPersistedQuery)(t);return e.map((function(e){var t,r,o,a=e.id,i=e.manage_stock,s=e.parent_id,l=e.sku,u=e.stock_quantity,d=e.stock_status,p=e.low_stock_amount,m=Object(En.decodeEntities)(e.name),b=Object(Oe.getNewPath)(n,"/analytics/products",{filter:"single_product",products:s||a}),h=Object(c.createElement)(I.Link,{href:b,type:"wc-admin"},m),f=Object(ye.f)("post.php?action=edit&post="+(s||a));return[{display:h,value:m},{display:l,value:l},{display:(t=d,o=p,(r=u)&&"instock"===t&&r<=o?Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},Object(_e._x)("Low","Indication of a low quantity","woocommerce-admin")):Object(c.createElement)(I.Link,{href:f,type:"wp-admin"},Ar[d])),value:d},{display:i?Lt("number",u):Object(_e.__)("N/A","woocommerce-admin"),value:u}]}))}},{key:"getSummary",value:function(e){var t=e.products,n=void 0===t?0:t,r=e.outofstock,o=void 0===r?0:r,c=e.lowstock,a=void 0===c?0:c,i=e.instock,s=void 0===i?0:i,l=e.onbackorder,u=void 0===l?0:l;return[{label:Object(_e._n)("product","products",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e.__)("out of stock",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("low stock",a,"woocommerce-admin"),value:Lt("number",a)},{label:Object(_e.__)("on backorder",u,"woocommerce-admin"),value:Lt("number",u)},{label:Object(_e.__)("in stock",s,"woocommerce-admin"),value:Lt("number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,n=e.filters,r=e.query;return Object(c.createElement)(dn,{endpoint:"stock",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,query:r,tableQuery:{orderby:r.orderby||"stock_status",order:r.order||"asc",type:r.type||"all"},title:Object(_e.__)("Stock","woocommerce-admin"),filters:n,advancedFilters:t})}}]),t}(c.Component),kr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.query,n=e.path;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:t,path:n,showDatePicker:!1,filters:zr,advancedFilters:_r,report:"stock"}),Object(c.createElement)(jr,{query:t,filters:zr,advancedFilters:_r}))}}]),t}(c.Component);kr.propTypes={query:K.a.object.isRequired};var Er=Object(ye.g)("dataEndpoints",{countries:{}}).countries,Cr=Object(ze.applyFilters)("woocommerce_admin_customers_report_filters",[{label:Object(_e.__)("Show","woocommerce-admin"),staticParams:[],param:"filter",showFilters:function(){return!0},filters:[{label:Object(_e.__)("All Customers","woocommerce-admin"),value:"all"},{label:Object(_e.__)("Single Customer","woocommerce-admin"),value:"select_customer",chartMode:"item-comparison",subFilters:[{component:"Search",value:"single_customer",chartMode:"item-comparison",path:["select_customer"],settings:{type:"customers",param:"customers",getLabels:it,labels:{placeholder:Object(_e.__)("Type to search for a customer","woocommerce-admin"),button:Object(_e.__)("Single Customer","woocommerce-admin")}}}]},{label:Object(_e.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),Lr=Object(ze.applyFilters)("woocommerce_admin_customers_report_advanced_filters",{title:Object(_e._x)("Customers Match {{select /}} Filters","A sentence describing filters for Customers. See screen shot for context: https://cloudup.com/cCsm3GeXJbE","woocommerce-admin"),filters:{name:{labels:{add:Object(_e.__)("Name","woocommerce-admin"),placeholder:Object(_e.__)("Search","woocommerce-admin"),remove:Object(_e.__)("Remove customer name filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer name filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Name{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer name","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer names","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer names","woocommerce-admin")}],input:{component:"Search",type:"customers",getLabels:ot(et+"/customers",(function(e){return{id:e.id,label:e.name}}))}},country:{labels:{add:Object(_e.__)("Country / Region","woocommerce-admin"),placeholder:Object(_e.__)("Search","woocommerce-admin"),remove:Object(_e.__)("Remove country / region filter","woocommerce-admin"),rule:Object(_e.__)("Select a country / region filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Country / Region{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select country / region","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","countries","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","countries","woocommerce-admin")}],input:{component:"Search",type:"countries",getLabels:function(){var e=gr()(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Er.map((function(e){return{key:e.code,label:Object(En.decodeEntities)(e.name)}})),r=t.split(","),e.next=4,n.filter((function(e){return r.includes(e.key)}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},username:{labels:{add:Object(_e.__)("Username","woocommerce-admin"),placeholder:Object(_e.__)("Search customer username","woocommerce-admin"),remove:Object(_e.__)("Remove customer username filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer username filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Username{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer username","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer usernames","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer usernames","woocommerce-admin")}],input:{component:"Search",type:"usernames",getLabels:it}},email:{labels:{add:Object(_e.__)("Email","woocommerce-admin"),placeholder:Object(_e.__)("Search customer email","woocommerce-admin"),remove:Object(_e.__)("Remove customer email filter","woocommerce-admin"),rule:Object(_e.__)("Select a customer email filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Email{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select customer email","woocommerce-admin")},rules:[{value:"includes",label:Object(_e._x)("Includes","customer emails","woocommerce-admin")},{value:"excludes",label:Object(_e._x)("Excludes","customer emails","woocommerce-admin")}],input:{component:"Search",type:"emails",getLabels:ot(et+"/customers",(function(e){return{id:e.id,label:e.email}}))}},orders_count:{labels:{add:Object(_e.__)("No. of Orders","woocommerce-admin"),remove:Object(_e.__)("Remove order filter","woocommerce-admin"),rule:Object(_e.__)("Select an order count filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}No. of Orders{{/title}} {{rule /}} {{filter /}}","woocommerce-admin")},rules:[{value:"max",label:Object(_e._x)("Less Than","number of orders","woocommerce-admin")},{value:"min",label:Object(_e._x)("More Than","number of orders","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","number of orders","woocommerce-admin")}],input:{component:"Number"}},total_spend:{labels:{add:Object(_e.__)("Total Spend","woocommerce-admin"),remove:Object(_e.__)("Remove total spend filter","woocommerce-admin"),rule:Object(_e.__)("Select a total spend filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Total Spend{{/title}} {{rule /}} {{filter /}}","woocommerce-admin")},rules:[{value:"max",label:Object(_e._x)("Less Than","total spend by customer","woocommerce-admin")},{value:"min",label:Object(_e._x)("More Than","total spend by customer","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","total spend by customer","woocommerce-admin")}],input:{component:"Currency"}},avg_order_value:{labels:{add:Object(_e.__)("AOV","woocommerce-admin"),remove:Object(_e.__)("Remove average order value filter","woocommerce-admin"),rule:Object(_e.__)("Select an average order value filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}AOV{{/title}} {{rule /}} {{filter /}}","woocommerce-admin")},rules:[{value:"max",label:Object(_e._x)("Less Than","average order value of customer","woocommerce-admin")},{value:"min",label:Object(_e._x)("More Than","average order value of customer","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","average order value of customer","woocommerce-admin")}],input:{component:"Currency"}},registered:{labels:{add:Object(_e.__)("Registered","woocommerce-admin"),remove:Object(_e.__)("Remove registered filter","woocommerce-admin"),rule:Object(_e.__)("Select a registered filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Registered{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select registered date","woocommerce-admin")},rules:[{value:"before",label:Object(_e._x)("Before","date","woocommerce-admin")},{value:"after",label:Object(_e._x)("After","date","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","date","woocommerce-admin")}],input:{component:"Date"}},last_active:{labels:{add:Object(_e.__)("Last active","woocommerce-admin"),remove:Object(_e.__)("Remove last active filter","woocommerce-admin"),rule:Object(_e.__)("Select a last active filter match","woocommerce-admin"),title:Object(_e.__)("{{title}}Last active{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(_e.__)("Select registered date","woocommerce-admin")},rules:[{value:"before",label:Object(_e._x)("Before","date","woocommerce-admin")},{value:"after",label:Object(_e._x)("After","date","woocommerce-admin")},{value:"between",label:Object(_e._x)("Between","date","woocommerce-admin")}],input:{component:"Date"}}}}),Nr=n(141),Sr=Object(ye.g)("dataEndpoints",{countries:{}}).countries,qr=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).call(this))).getHeadersContent=e.getHeadersContent.bind(ft()(e)),e.getRowsContent=e.getRowsContent.bind(ft()(e)),e.getSummary=e.getSummary.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"getHeadersContent",value:function(){return[{label:Object(_e.__)("Name","woocommerce-admin"),key:"name",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(_e.__)("Username","woocommerce-admin"),key:"username",hiddenByDefault:!0},{label:Object(_e.__)("Last Active","woocommerce-admin"),key:"date_last_active",defaultSort:!0,isSortable:!0},{label:Object(_e.__)("Sign Up","woocommerce-admin"),key:"date_registered",isSortable:!0},{label:Object(_e.__)("Email","woocommerce-admin"),key:"email"},{label:Object(_e.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("Total Spend","woocommerce-admin"),key:"total_spend",isSortable:!0,isNumeric:!0},{label:Object(_e.__)("AOV","woocommerce-admin"),screenReaderLabel:Object(_e.__)("Average Order Value","woocommerce-admin"),key:"avg_order_value",isNumeric:!0},{label:Object(_e.__)("Country / Region","woocommerce-admin"),key:"country",isSortable:!0},{label:Object(_e.__)("City","woocommerce-admin"),key:"city",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Region","woocommerce-admin"),key:"state",hiddenByDefault:!0,isSortable:!0},{label:Object(_e.__)("Postal Code","woocommerce-admin"),key:"postcode",hiddenByDefault:!0,isSortable:!0}]}},{key:"getCountryName",value:function(e){return void 0!==Sr[e]?Sr[e]:null}},{key:"getRowsContent",value:function(e){var t=this;return e.map((function(e){var n=e.avg_order_value,r=e.date_last_active,o=e.date_registered,a=e.email,i=e.name,s=e.user_id,l=e.orders_count,u=e.username,d=e.total_spend,p=e.postcode,m=e.city,b=e.state,h=e.country,f=t.getCountryName(h),g=s?Object(c.createElement)(I.Link,{href:Object(ye.f)("user-edit.php?user_id="+s),type:"wp-admin"},i):i,v=r?Object(c.createElement)(I.Date,{date:r,visibleFormat:gt.defaultTableDateFormat}):"—",M=o?Object(c.createElement)(I.Date,{date:o,visibleFormat:gt.defaultTableDateFormat}):"—",O=Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Nr.a,{text:f},Object(c.createElement)("span",{"aria-hidden":"true"},h)),Object(c.createElement)("span",{className:"screen-reader-text"},f));return[{display:g,value:i},{display:u,value:u},{display:v,value:r},{display:M,value:o},{display:Object(c.createElement)("a",{href:"mailto:"+a},a),value:a},{display:Lt("number",l),value:l},{display:_t(d),value:At(d)},{display:_t(n),value:At(n)},{display:O,value:h},{display:m,value:m},{display:b,value:b},{display:p,value:p}]}))}},{key:"getSummary",value:function(e){var t=e.customers_count,n=void 0===t?0:t,r=e.avg_orders_count,o=void 0===r?0:r,c=e.avg_total_spend,a=void 0===c?0:c,i=e.avg_avg_order_value,s=void 0===i?0:i;return[{label:Object(_e._n)("customer","customers",n,"woocommerce-admin"),value:Lt("number",n)},{label:Object(_e._n)("average order","average orders",o,"woocommerce-admin"),value:Lt("number",o)},{label:Object(_e.__)("average lifetime spend","woocommerce-admin"),value:_t(a)},{label:Object(_e.__)("average order value","woocommerce-admin"),value:_t(s)}]}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.filters,o=e.advancedFilters;return Object(c.createElement)(dn,{endpoint:"customers",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,isRequesting:t,itemIdField:"id",query:n,labels:{placeholder:Object(_e.__)("Search by customer name","woocommerce-admin")},searchBy:"customers",title:Object(_e.__)("Customers","woocommerce-admin"),columnPrefsKey:"customers_report_columns",filters:r,advancedFilters:o})}}]),t}(c.Component);function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xr=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.query,r=e.path,o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({orderby:"date_last_active",order:"desc"},n);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(yn,{query:n,path:r,filters:Cr,showDatePicker:!1,advancedFilters:Lr,report:"customers"}),Object(c.createElement)(qr,{isRequesting:t,query:o,filters:Cr,advancedFilters:Lr}))}}]),t}(c.Component);function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Br(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}xr.propTypes={query:K.a.object.isRequired};var Dr="woocommerce_admin_reports_list",Hr=Object(ye.g)("manageStock","no"),Xr=function(){var e=[{report:"revenue",title:Object(_e.__)("Revenue","woocommerce-admin"),component:Qn},{report:"products",title:Object(_e.__)("Products","woocommerce-admin"),component:Xn},{report:"orders",title:Object(_e.__)("Orders","woocommerce-admin"),component:wn},{report:"categories",title:Object(_e.__)("Categories","woocommerce-admin"),component:tr},{report:"coupons",title:Object(_e.__)("Coupons","woocommerce-admin"),component:ir},{report:"taxes",title:Object(_e.__)("Taxes","woocommerce-admin"),component:mr},{report:"downloads",title:Object(_e.__)("Downloads","woocommerce-admin"),component:wr},"yes"===Hr?{report:"stock",title:Object(_e.__)("Stock","woocommerce-admin"),component:kr}:null,{report:"customers",title:Object(_e.__)("Customers","woocommerce-admin"),component:xr},{report:"downloads",title:Object(_e.__)("Downloads","woocommerce-admin"),component:wr}].filter(Boolean);return Object(ze.applyFilters)(Dr,e)},Vr=function(e){var t=e.params,n=e.path;return t.report||n.replace(/^\/+/,"")},Ir=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).state={hasError:!1},e}return V()(t,e),R()(t,[{key:"componentDidCatch",value:function(e){this.setState({hasError:!0}),console.warn(e)}},{key:"render",value:function(){if(this.state.hasError)return null;if(this.props.isError)return Object(c.createElement)(Ht,{isError:!0});var e=Vr(this.props),t=Object(s.find)(Xr(),{report:e});if(!t)return null;var n=t.component;return Object(c.createElement)(n,this.props)}}]),t}(c.Component);Ir.propTypes={params:K.a.object.isRequired};var Fr=Object(ke.a)(Object(I.useFilters)(Dr),rn((function(e,t){var n=Object(Oe.getQuery)();if(!n.search)return{};var r=Vr(t),o=Object(Oe.getSearchWords)(n),c="categories"===r&&"single_category"===n.filter?"products":r,a=function(e,t,n){var r=e("wc-api"),o=r.getItems,c=r.getItemsError,a=r.isGetItemsRequesting,i={},s=!1,l=!1;return n.forEach((function(e){var n={search:e,per_page:10};o(t,n).forEach((function(e,t){i[t]=e})),a(t,n)&&(s=!0),c(t,n)&&(l=!0)})),{items:i,isRequesting:s,isError:l}}(e,c,o),i=a.isError,s=a.isRequesting,l=a.items,u=Object.keys(l);return u.length?{isError:i,isRequesting:s,query:Wr({},t.query,je()({},c,u.join(",")))}:{isError:i,isRequesting:s}})))(Ir),Ur=n(87),Gr=(n(394),n(34)),Qr=n.n(Gr),Kr=function(e){var t=e.value,n=e.onChange,r=Object(we.parse)(t.replace(/&amp;/g,"&")),o=Ot(r),a=o.period,i=o.compare,s=o.before,l=o.after,u=yt(r),d={period:a,compare:i,before:s,after:l,primaryDate:u.primary,secondaryDate:u.secondary};return Object(c.createElement)(I.DateRangeFilterPicker,{query:r,onRangeSelect:function(e){n({target:{name:"woocommerce_default_date_range",value:Object(we.stringify)(e)}})},dateQuery:d,isoDateFormat:gt.isoDateFormat})},$r=["completed","processing","refunded","cancelled","failed","pending","on-hold"],Jr=Object(ye.g)("wcAdminSettings",{woocommerce_actionable_order_statuses:[],woocommerce_excluded_report_order_statuses:[],woocommerce_default_date_range:"period=month&compare=previous_year"}),Zr=Jr.woocommerce_actionable_order_statuses,Yr=Jr.woocommerce_excluded_report_order_statuses,eo=Jr.woocommerce_default_date_range,to=Array.isArray(Zr)?Zr:[],no=Array.isArray(Yr)?Yr:[],ro=Object.keys(ye.d).filter((function(e){return"refunded"!==e})).map((function(e){return{value:e,label:ye.d[e],description:Object(_e.sprintf)(Object(_e.__)("Exclude the %s status from reports","woocommerce-admin"),ye.d[e])}})),oo=Object(ze.applyFilters)("woocommerce_admin_analytics_settings",[{name:"woocommerce_excluded_report_order_statuses",label:Object(_e.__)("Excluded Statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:[{key:"defaultStatuses",options:ro.filter((function(e){return $r.includes(e.value)}))},{key:"customStatuses",label:Object(_e.__)("Custom Statuses","woocommerce-admin"),options:ro.filter((function(e){return!$r.includes(e.value)}))}],helpText:Qr()({mixedString:Object(_e.__)("Orders with these statuses are excluded from the totals in your reports. The {{strong}}Refunded{{/strong}} status can not be excluded.","woocommerce-admin"),components:{strong:Object(c.createElement)("strong",null)}}),initialValue:St()(no),defaultValue:["pending","cancelled","failed"]},{name:"woocommerce_actionable_order_statuses",label:Object(_e.__)("Actionable Statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:[{key:"defaultStatuses",options:ro.filter((function(e){return $r.includes(e.value)}))},{key:"customStatuses",label:Object(_e.__)("Custom Statuses","woocommerce-admin"),options:ro.filter((function(e){return!$r.includes(e.value)}))}],helpText:Object(_e.__)("Orders with these statuses require action on behalf of the store admin.These orders will show up in the Orders tab under the activity panel.","woocommerce-admin"),initialValue:St()(to),defaultValue:nt},{name:"woocommerce_default_date_range",label:Object(_e.__)("Default Date Range:","woocommerce-admin"),inputType:"component",component:Kr,helpText:Object(_e.__)("Select a default date range. When no range is selected, reports will be viewed by the default date range.","woocommerce-admin"),initialValue:eo,defaultValue:"period=month&compare=previous_year"}]),co=(n(395),function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).renderInput=function(){var e=n.props,t=e.handleChange,r=e.name,o=e.inputText,a=e.inputType,i=e.options,l=e.value,u=e.component,d=n.state.disabled,p=Object(s.uniqueId)(r);switch(a){case"checkboxGroup":return i.map((function(e){return e.options.length>0&&Object(c.createElement)("div",{className:"woocommerce-setting__options-group",key:e.key,"aria-labelledby":r+"-label"},e.label&&Object(c.createElement)("span",{className:"woocommerce-setting__options-group-label"},e.label),n.renderCheckboxOptions(e.options))}));case"checkbox":return n.renderCheckboxOptions(i);case"button":return Object(c.createElement)(Ur.a,{isDefault:!0,onClick:n.handleInputCallback,disabled:d},o);case"component":var m=u;return Object(c.createElement)(m,N()({value:l,onChange:t},n.props));case"text":default:return Object(c.createElement)("input",{id:p,type:"text",name:r,onChange:t,value:l,placeholder:o,disabled:d})}},n.handleInputCallback=function(){var e=n.props,t=e.createNotice,r=e.callback;if("function"==typeof r)return new Promise((function(e,o){n.setState({disabled:!0}),r(e,o,t)})).then((function(){n.setState({disabled:!1})})).catch((function(){n.setState({disabled:!1})}))},n.state={disabled:!1},n}return V()(t,e),R()(t,[{key:"renderCheckboxOptions",value:function(e){var t=this.props,n=t.handleChange,r=t.name,o=t.value,a=this.state.disabled;return e.map((function(e){var t=Object(s.uniqueId)(r+"-"+e.value);return Object(c.createElement)("label",{htmlFor:t,key:e.value},Object(c.createElement)("input",{id:t,type:"checkbox",name:r,onChange:n,"aria-label":e.description,checked:o&&o.includes(e.value),value:e.value,disabled:a}),e.label)}))}},{key:"render",value:function(){var e=this.props,t=e.helpText,n=e.label,r=e.name;return Object(c.createElement)("div",{className:"woocommerce-setting"},Object(c.createElement)("div",{className:"woocommerce-setting__label",id:r+"-label"},n),Object(c.createElement)("div",{className:"woocommerce-setting__input"},this.renderInput(),t&&Object(c.createElement)("span",{className:"woocommerce-setting__help"},t)))}}]),t}(c.Component));co.propTypes={callback:K.a.func,handleChange:K.a.func.isRequired,helpText:K.a.oneOfType([K.a.string,K.a.array]),inputText:K.a.string,inputType:K.a.oneOf(["button","checkbox","checkboxGroup","text","component"]),label:K.a.string.isRequired,name:K.a.string.isRequired,options:K.a.arrayOf(K.a.shape({value:K.a.string,label:K.a.string,description:K.a.string,key:K.a.string,options:K.a.array})),value:K.a.oneOfType([K.a.string,K.a.array])};var ao=Object(ke.a)(Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}})))(co),io=n(754),so=function(e,t,n){var r={};if(n&&(r.skip_existing=!0),"all"!==t.label)if("custom"===t.label){var o=Ft()().diff(Ft()(t.date,e),"days",!0);r.days=Math.floor(o)}else r.days=parseInt(t.label,10);return r};var lo=function(e){var t,n=e.importDate,r=e.onDeletePreviousData,o=e.onReimportData,a=e.onStartImport,i=e.onStopImport,s=e.status;return Object(c.createElement)("div",{className:"woocommerce-settings__actions woocommerce-settings-historical-data__actions"},(t="ready"!==s,["initializing","customers","orders","finalizing"].includes(s)?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{className:"woocommerce-settings-historical-data__action-button",isPrimary:!0,onClick:i},Object(_e.__)("Stop Import","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-setting__help woocommerce-settings-historical-data__action-help"},Object(_e.__)("Imported data will not be lost if the import is stopped.","woocommerce-admin"),Object(c.createElement)("br",null),Object(_e.__)("Navigating away from this page will not affect the import.","woocommerce-admin"))):["ready","nothing"].includes(s)?n?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:a,disabled:t},Object(_e.__)("Start","woocommerce-admin")),Object(c.createElement)(Ur.a,{isDefault:!0,onClick:r},Object(_e.__)("Delete Previously Imported Data","woocommerce-admin"))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:a,disabled:t},Object(_e.__)("Start","woocommerce-admin"))):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isDefault:!0,onClick:o},Object(_e.__)("Re-import Data","woocommerce-admin")),Object(c.createElement)(Ur.a,{isDefault:!0,onClick:r},Object(_e.__)("Delete Previously Imported Data","woocommerce-admin")))))},uo=n(396);var po=function(e){var t,n=e.dateFormat,r=e.disabled,o=e.onDateChange,a=e.onPeriodChange,i=e.value,s=function(e){e.date&&e.date.isValid?o(e.date.format(n)):o(e.text)},l=function(e){return e.isValid()&&i.date.length===n.length?e.isAfter(new Date,"day")?gt.dateValidationMessages.future:null:gt.dateValidationMessages.invalid};return Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__columns"},Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__column"},Object(c.createElement)(uo.a,{label:Object(_e.__)("Import Historical Data","woocommerce-admin"),value:i.label,disabled:r,onChange:function(e){a(e)},options:[{label:"All",value:"all"},{label:"Last 365 days",value:"365"},{label:"Last 90 days",value:"90"},{label:"Last 30 days",value:"30"},{label:"Last 7 days",value:"7"},{label:"Last 24 hours",value:"1"},{label:"Custom",value:"custom"}]})),"custom"===i.label&&(t=Ft()(i.date,n),Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__column"},Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__column-label"},Object(_e.__)("Beginning on","woocommerce-admin")),Object(c.createElement)(I.DatePicker,{date:t.isValid()?t.toDate():null,dateFormat:n,disabled:r,error:l(t),isInvalidDate:function(e){return Ft()(e).isAfter(new Date,"day")},onUpdate:s,text:i.date}))))};var mo=function(e){var t=e.label,n=e.progress,r=e.total,o=Object(_e.sprintf)(Object(_e.__)("Imported %(label)s","woocommerce-admin"),{label:t}),a=Object(s.isNil)(r)?null:Object(_e.sprintf)(Object(_e.__)("%(progress)s of %(total)s","woocommerce-admin"),{progress:n||0,total:r});return Object(c.createElement)("div",{className:"woocommerce-settings-historical-data__progress"},Object(c.createElement)("span",{className:"woocommerce-settings-historical-data__progress-label"},o),a&&Object(c.createElement)("span",{className:"woocommerce-settings-historical-data__progress-label"},a),Object(c.createElement)("progress",{className:"woocommerce-settings-historical-data__progress-bar",max:r,value:n||0}))};var bo=Object(I.useFilters)("woocommerce_admin_import_status")((function(e){var t=e.importDate,n=e.status,r=Object(ze.applyFilters)("woocommerce_admin_import_status",{nothing:Object(_e.__)("Nothing To Import","woocommerce-admin"),ready:Object(_e.__)("Ready To Import","woocommerce-admin"),initializing:[Object(_e.__)("Initializing","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],customers:[Object(_e.__)("Importing Customers","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],orders:[Object(_e.__)("Importing Orders","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],finalizing:[Object(_e.__)("Finalizing","woocommerce-admin"),Object(c.createElement)(Cn.a,{key:"spinner"})],finished:-1===t?Object(_e.__)("All historical data imported","woocommerce-admin"):Object(_e.sprintf)(Object(_e.__)("Historical data from %s onward imported","woocommerce-admin"),Ft()(t).format("YYYY-MM-DD"))});return Object(c.createElement)("span",{className:"woocommerce-settings-historical-data__status"},Object(_e.__)("Status:","woocommerce-admin")+" ",r[n])}));var ho=function(e){var t=e.checked,n=e.disabled,r=e.onChange;return Object(c.createElement)(qt.a,{className:"woocommerce-settings-historical-data__skip-checkbox",checked:t,disabled:n,label:Object(_e.__)("Skip previously imported customers and orders","woocommerce-admin"),onChange:r})},fo=(n(397),function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.customersProgress,n=e.customersTotal,r=e.dateFormat,o=e.importDate,a=e.inProgress,i=e.onPeriodChange,l=e.onDateChange,u=e.onSkipChange,d=e.onDeletePreviousData,p=e.onReimportData,m=e.onStartImport,b=e.onStopImport,h=e.ordersProgress,f=e.ordersTotal,g=e.period,v=e.skipChecked,M=function(e){var t=e.customersProgress,n=e.customersTotal,r=e.inProgress,o=e.ordersProgress,c=e.ordersTotal;return r?Object(s.isNil)(t)||Object(s.isNil)(o)||Object(s.isNil)(n)||Object(s.isNil)(c)?"initializing":t<n?"customers":o<c?"orders":"finalizing":n>0||c>0?t===n&&o===c?"finished":"ready":"nothing"}({customersProgress:t,customersTotal:n,inProgress:a,ordersProgress:h,ordersTotal:f});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SectionHeader,{title:Object(_e.__)("Import Historical Data","woocommerce-admin")}),Object(c.createElement)("div",{className:"woocommerce-settings__wrapper"},Object(c.createElement)("div",{className:"woocommerce-setting"},Object(c.createElement)("div",{className:"woocommerce-setting__input"},Object(c.createElement)("span",{className:"woocommerce-setting__help"},Object(_e.__)("This tool populates historical analytics data by processing customers and orders created prior to activating WooCommerce Admin.","woocommerce-admin")),"finished"!==M&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(po,{dateFormat:r,disabled:a,onPeriodChange:i,onDateChange:l,value:g}),Object(c.createElement)(ho,{disabled:a,checked:v,onChange:u}),Object(c.createElement)(mo,{label:Object(_e.__)("Registered Customers","woocommerce-admin"),progress:t,total:n}),Object(c.createElement)(mo,{label:Object(_e.__)("Orders and Refunds","woocommerce-admin"),progress:h,total:f})),Object(c.createElement)(bo,{importDate:o,status:M})))),Object(c.createElement)(lo,{importDate:o,onDeletePreviousData:d,onReimportData:p,onStartImport:m,onStopImport:b,status:M}))}}]),t}(c.Component)),go=rn((function(e,t){var n=e("wc-api"),r=n.getImportStatus,o=n.isGetImportStatusRequesting,c=n.getImportTotals,a=t.activeImport,i=t.dateFormat,l=t.lastImportStartTimestamp,u=t.lastImportStopTimestamp,d=t.onImportStarted,p=t.onImportFinished,m=t.period,b=t.skipChecked,h=void 0!==l&&void 0===u||l>u,f=c(so(i,m,b),u),g=f.customers,v=f.orders,M=r(l,h?{freshness:3e3,timeout:3e3}:tt),O=M.customers,y=M.imported_from,w=M.is_importing,z=M.orders,_=O||{},A=_.imported,j=_.total,k=z||{},E=k.imported,C=k.total,L=o(l);return Boolean(!l&&!L&&!h&&!0===w)&&d(),Boolean(!L&&h&&!1===w&&(A===j&&j>0||E===C&&C>0))&&p(),a?{customersProgress:A,customersTotal:Object(s.isNil)(j)?g:j,importDate:y,inProgress:h,ordersProgress:E,ordersTotal:Object(s.isNil)(C)?v:C}:{customersTotal:g,importDate:y,ordersTotal:v}}))(fo);function vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oo=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).dateFormat=Object(_e.__)("MM/DD/YYYY","woocommerce-admin"),e.state={activeImport:null,lastImportStartTimestamp:0,lastImportStopTimestamp:0,period:{date:Ft()().format(e.dateFormat),label:"all"},skipChecked:!0},e.makeQuery=e.makeQuery.bind(ft()(e)),e.onImportFinished=e.onImportFinished.bind(ft()(e)),e.onImportStarted=e.onImportStarted.bind(ft()(e)),e.onDeletePreviousData=e.onDeletePreviousData.bind(ft()(e)),e.onReimportData=e.onReimportData.bind(ft()(e)),e.onStartImport=e.onStartImport.bind(ft()(e)),e.onStopImport=e.onStopImport.bind(ft()(e)),e.onDateChange=e.onDateChange.bind(ft()(e)),e.onPeriodChange=e.onPeriodChange.bind(ft()(e)),e.onSkipChange=e.onSkipChange.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"makeQuery",value:function(e,t){var n=this,r=this.props.createNotice;Le()({path:e,method:"POST"}).then((function(e){"success"===e.status?r("success",e.message):(r("error",t),n.setState({activeImport:!1,lastImportStopTimestamp:Date.now()}))})).catch((function(e){e&&e.message&&(r("error",e.message),n.setState({activeImport:!1,lastImportStopTimestamp:Date.now()}))}))}},{key:"onImportFinished",value:function(){(0,this.props.debouncedSpeak)("Import complete"),this.setState({lastImportStopTimestamp:Date.now()})}},{key:"onImportStarted",value:function(){var e=this.props,t=e.notes,n=e.updateNote,r=t.find((function(e){return"wc-admin-historical-data"===e.name}));r&&n(r.id,{status:"actioned"}),this.setState({activeImport:!0,lastImportStartTimestamp:Date.now()})}},{key:"onDeletePreviousData",value:function(){var e=Object(_e.__)("There was a problem deleting your previous data.","woocommerce-admin");this.makeQuery("/wc-analytics/reports/import/delete",e),this.setState({activeImport:!1}),Object(an.b)("analytics_import_delete_previous")}},{key:"onReimportData",value:function(){this.setState({activeImport:!1})}},{key:"onStartImport",value:function(){var e=this.state,t=e.period,n=e.skipChecked,r=Object(Ee.addQueryArgs)("/wc-analytics/reports/import",so(this.dateFormat,t,n)),o=Object(_e.__)("There was a problem rebuilding your report data.","woocommerce-admin");this.makeQuery(r,o),this.onImportStarted()}},{key:"onStopImport",value:function(){this.setState({lastImportStopTimestamp:Date.now()});var e=Object(_e.__)("There was a problem stopping your current import.","woocommerce-admin");this.makeQuery("/wc-analytics/reports/import/cancel",e)}},{key:"onPeriodChange",value:function(e){this.setState({activeImport:!1,period:Mo({},this.state.period,{label:e})})}},{key:"onDateChange",value:function(e){this.setState({activeImport:!1,period:{date:e,label:"custom"}})}},{key:"onSkipChange",value:function(e){this.setState({activeImport:!1,skipChecked:e})}},{key:"render",value:function(){var e=this.state,t=e.activeImport,n=e.lastImportStartTimestamp,r=e.lastImportStopTimestamp,o=e.period,a=e.skipChecked;return Object(c.createElement)(go,{activeImport:t,dateFormat:this.dateFormat,onImportFinished:this.onImportFinished,onImportStarted:this.onImportStarted,lastImportStartTimestamp:n,lastImportStopTimestamp:r,onPeriodChange:this.onPeriodChange,onDateChange:this.onDateChange,onSkipChange:this.onSkipChange,onDeletePreviousData:this.onDeletePreviousData,onReimportData:this.onReimportData,onStartImport:this.onStartImport,onStopImport:this.onStopImport,period:o,skipChecked:a})}}]),t}(c.Component),yo=Object(ke.a)([rn((function(e){return{notes:(0,e("wc-api").getNotes)({page:1,per_page:rt,type:"update",status:"unactioned"})}})),Object(a.withDispatch)((function(e){return{updateNote:e("wc-api").updateNote}})),io.a])(Oo),wo=function(e){function t(){var e;x()(this,t),e=W()(this,H()(t).apply(this,arguments)),zo.call(ft()(e));var n={};return oo.forEach((function(e){return n[e.name]=e.initialValue})),e.state={settings:n,saving:!1,isDirty:!1},e.handleInputChange=e.handleInputChange.bind(ft()(e)),e.warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(ft()(e)),e}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentDidCatch",value:function(e){this.setState({hasError:!0}),console.warn(e)}},{key:"warnIfUnsavedChanges",value:function(e){if(this.state.isDirty)return e.returnValue=Object(_e.__)("You have unsaved changes. If you proceed, they will be lost.","woocommerce-admin"),e.returnValue}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.createNotice,n=e.isError,r=e.isRequesting,o=this.state,c=o.saving,a=o.isDirty;c&&!r&&(n?t("error",Object(_e.__)("There was an error saving your settings. Please try again.","woocommerce-admin")):(t("success",Object(_e.__)("Your settings have been successfully saved.","woocommerce-admin")),a=!1),this.setState({saving:!1,isDirty:a}))}},{key:"persistChanges",value:function(e){var t=Object(ye.g)("wcAdminSettings",{});oo.forEach((function(n){var r=e.settings[n.name];t[n.name]=r,n.initialValue=r})),Object(ye.h)("wcAdminSettings",t)}},{key:"handleInputChange",value:function(e){var t=e.target,n=t.checked,r=t.name,o=t.type,c=t.value,a=this.state.settings;"checkbox"===o?n?a[r].push(c):Object(s.remove)(a[r],(function(e){return e===c})):a[r]=c,this.setState({settings:a,isDirty:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.createNotice,r=t.query;return this.state.hasError?null:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SectionHeader,{title:Object(_e.__)("Analytics Settings","woocommerce-admin")}),Object(c.createElement)("div",{className:"woocommerce-settings__wrapper"},oo.map((function(t){return Object(c.createElement)(ao,N()({handleChange:e.handleInputChange,value:e.state.settings[t.name],key:t.name},t))})),Object(c.createElement)("div",{className:"woocommerce-settings__actions"},Object(c.createElement)(Ur.a,{isDefault:!0,onClick:this.resetDefaults},Object(_e.__)("Reset Defaults","woocommerce-admin")),Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:this.saveChanges},Object(_e.__)("Save Settings","woocommerce-admin")))),"true"===r.import?Object(c.createElement)(I.ScrollTo,{offset:"-56"},Object(c.createElement)(yo,{createNotice:n})):Object(c.createElement)(yo,{createNotice:n}))}}]),t}(c.Component),zo=function(){var e=this;this.resetDefaults=function(){if(window.confirm(Object(_e.__)("Are you sure you want to reset all settings to default values?","woocommerce-admin"))){var t={};oo.forEach((function(e){return t[e.name]=e.defaultValue})),e.setState({settings:t},Object(s.partial)(e.saveChanges,"reset"))}},this.saveChanges=function(t){var n=e.state.settings,r=e.props.query;if(e.persistChanges(e.state),e.props.updateSettings({wc_admin:n}),"reset"===t)Object(an.b)("analytics_settings_reset_defaults");else{var o=Object(s.transform)(oo,(function(e,t){e[t.name]=n[t.name]}),{});Object(an.b)("analytics_settings_save",o)}e.setState({saving:!0,isDirty:!1}),r.period=void 0,r.compare=void 0,r.before=void 0,r.after=void 0,r.interval=void 0,r.type=void 0,window.wpNavMenuUrlUpdate(r)}},_o=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getSettings,r=t.getSettingsError,o=t.isGetSettingsRequesting,c=n("wc_admin");return{getSettings:n,isError:Boolean(r("wc_admin")),isRequesting:o("wc_admin"),settings:c}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateSettings:e("wc-api").updateSettings}})))(Object(I.useFilters)("woocommerce_admin_analytics_settings")(wo)),Ao=(n(236),n(364)),jo=n(119),ko=n(37),Eo=n.n(ko),Co=n(233),Lo=(n(398),function(e){function t(){var e,n,r;x()(this,t);for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];return W()(r,(n=r=W()(this,(e=H()(t)).call.apply(e,[this].concat(c))),r.handleChartClick=function(){var e=r.props.charts;if(!e||!e.length)return null;Object(Oe.getHistory)().push(r.getChartPath(e[0]))},n))}return V()(t,e),R()(t,[{key:"getChartPath",value:function(e){return Object(Oe.getNewPath)({chart:e.key},"/analytics/"+e.endpoint,Object(Oe.getPersistedQuery)())}},{key:"render",value:function(){var e=this.props,t=e.charts,n=e.endpoint,r=e.path,o=e.query;return t&&t.length?Object(c.createElement)("div",{role:"presentation",className:"woocommerce-dashboard__chart-block-wrapper",onClick:this.handleChartClick},Object(c.createElement)(I.Card,{className:"woocommerce-dashboard__chart-block woocommerce-analytics__card",title:t[0].label},Object(c.createElement)("a",{className:"screen-reader-text",href:Object(ye.f)(this.getChartPath(t[0]))},Object(_e.sprintf)(Object(_e.__)("%s Report","woocommerce-admin"),t[0].label)),Object(c.createElement)(gn,{endpoint:n,query:o,interactiveLegend:!1,legendPosition:"bottom",path:r,selectedChart:t[0],showHeaderControls:!1}))):null}}]),t}(c.Component));Lo.propTypes={charts:K.a.array,endpoint:K.a.string.isRequired,path:K.a.string.isRequired,query:K.a.object.isRequired};var No=Lo;function So(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var qo={revenue:Vn,orders:dt,products:zn,coupons:nr,taxes:sr,downloads:vr},To=[{label:Object(_e.__)("Total Sales","woocommerce-admin"),report:"revenue",key:"total_sales"},{label:Object(_e.__)("Net Sales","woocommerce-admin"),report:"revenue",key:"net_revenue"},{label:Object(_e.__)("Orders","woocommerce-admin"),report:"orders",key:"orders_count"},{label:Object(_e.__)("Average Order Value","woocommerce-admin"),report:"orders",key:"avg_order_value"},{label:Object(_e.__)("Items Sold","woocommerce-admin"),report:"products",key:"items_sold"},{label:Object(_e.__)("Returns","woocommerce-admin"),report:"revenue",key:"refunds"},{label:Object(_e.__)("Discounted Orders","woocommerce-admin"),report:"coupons",key:"orders_count"},{label:Object(_e.__)("Gross discounted","woocommerce-admin"),report:"coupons",key:"amount"},{label:Object(_e.__)("Total Tax","woocommerce-admin"),report:"taxes",key:"total_tax"},{label:Object(_e.__)("Order Tax","woocommerce-admin"),report:"taxes",key:"order_tax"},{label:Object(_e.__)("Shipping Tax","woocommerce-admin"),report:"taxes",key:"shipping_tax"},{label:Object(_e.__)("Shipping","woocommerce-admin"),report:"revenue",key:"shipping"},{label:Object(_e.__)("Downloads","woocommerce-admin"),report:"downloads",key:"download_count"}],xo=Object(ze.applyFilters)("woocommerce_admin_dashboard_charts_filter",To.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},qo[e.report].find((function(t){return t.key===e.key})),{label:e.label,endpoint:e.report})})));n(399);function Bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ro=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).apply(this,arguments))).setInterval=function(e){n.setState({interval:e},(function(){var t=je()({},"dashboard_chart_interval",n.state.interval);n.props.updateCurrentUserData(t),Object(an.b)("dash_charts_interval",{interval:e})}))},n.state={chartType:e.userPrefChartType||"line",interval:e.userPrefChartInterval||"day"},n}return V()(t,e),R()(t,[{key:"handleTypeToggle",value:function(e){var t=this;return function(){t.setState({chartType:e});var n=je()({},"dashboard_chart_type",e);t.props.updateCurrentUserData(n),Object(an.b)("dash_charts_type_toggle",{chart_type:e})}}},{key:"renderMenu",value:function(){var e=this.props,t=e.hiddenBlocks,n=e.isFirst,r=e.isLast,o=e.onMove,a=e.onRemove,i=e.onTitleBlur,s=e.onTitleChange,l=e.onToggleHiddenBlock,u=e.titleInput,d=e.controls;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Choose which charts to display","woocommerce-admin"),renderContent:function(e){var p=e.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.MenuTitle,null,Object(_e.__)("Charts","woocommerce-admin")),xo.map((function(e){var n=e.endpoint+"_"+e.key,r=!t.includes(n);return Object(c.createElement)(I.MenuItem,{checked:r,isCheckbox:!0,isClickable:!0,key:e.endpoint+"_"+e.key,onInvoke:function(){l(n)(),Object(an.b)("dash_charts_chart_toggle",{status:r?"off":"on",key:n})}},e.label)})),Object(c.createElement)(d,{onToggle:p,onMove:o,onRemove:a,isFirst:n,isLast:r,onTitleBlur:i,onTitleChange:s,titleInput:u}))}})}},{key:"renderIntervalSelector",value:function(){var e=Object(gt.getAllowedIntervalsForQuery)(this.props.query);if(!e||e.length<1)return null;var t={hour:Object(_e.__)("By hour","woocommerce-admin"),day:Object(_e.__)("By day","woocommerce-admin"),week:Object(_e.__)("By week","woocommerce-admin"),month:Object(_e.__)("By month","woocommerce-admin"),quarter:Object(_e.__)("By quarter","woocommerce-admin"),year:Object(_e.__)("By year","woocommerce-admin")};return Object(c.createElement)(uo.a,{className:"woocommerce-chart__interval-select",value:this.state.interval,options:e.map((function(e){return{value:e,label:t[e]}})),onChange:this.setInterval})}},{key:"render",value:function(){var e=this.props,t=e.hiddenBlocks,n=e.path,r=e.title,o=this.state,a=o.chartType,i=o.interval,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props.query,{chartType:a,interval:i});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-dashboard__dashboard-charts"},Object(c.createElement)(I.SectionHeader,{title:r||Object(_e.__)("Charts","woocommerce-admin"),menu:this.renderMenu(),className:"has-interval-select"},this.renderIntervalSelector(),Object(c.createElement)(Co.a,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(c.createElement)(Tt.a,{className:Rt()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":!s.chartType||"line"===s.chartType}),icon:Object(c.createElement)(Eo.a,{icon:"line-graph"}),title:Object(_e.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===s.chartType,role:"menuitemradio",tabIndex:"line"===s.chartType?0:-1,onClick:this.handleTypeToggle("line")}),Object(c.createElement)(Tt.a,{className:Rt()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===s.chartType}),icon:Object(c.createElement)(Eo.a,{icon:"stats-alt"}),title:Object(_e.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===s.chartType,role:"menuitemradio",tabIndex:"bar"===s.chartType?0:-1,onClick:this.handleTypeToggle("bar")}))),Object(c.createElement)("div",{className:"woocommerce-dashboard__columns"},xo.map((function(e){return t.includes(e.endpoint+"_"+e.key)?null:Object(c.createElement)(No,{charts:[e],endpoint:e.endpoint,key:e.endpoint+"_"+e.key,path:n,query:s})})))))}}]),t}(c.Component);Ro.propTypes={path:K.a.string.isRequired,query:K.a.object.isRequired};var Po=Object(ke.a)(rn((function(e){var t=(0,e("wc-api").getCurrentUserData)();return{userPrefChartType:t.dashboard_chart_type,userPrefChartInterval:t.dashboard_chart_interval}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Ro),Wo=n(363),Do=["a","b","em","i","strong","p"],Ho=["target","href","rel","name","download"],Xo=function(e){return{__html:Object(Wo.sanitize)(e,{ALLOWED_TAGS:Do,ALLOWED_ATTR:Ho})}},Vo=(n(400),function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"getFormattedHeaders",value:function(){return this.props.headers.map((function(e,t){return{isLeftAligned:0===t,hiddenByDefault:!1,isSortable:!1,key:e.label,label:e.label}}))}},{key:"getFormattedRows",value:function(){return this.props.rows.map((function(e){return e.map((function(e){return{display:Object(c.createElement)("div",{dangerouslySetInnerHTML:Xo(e.display)}),value:e.value}}))}))}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.isError,r=e.totalRows,o=e.title,a=this.getFormattedRows(),i="woocommerce-leaderboard";return n?Object(c.createElement)(Ht,{className:i,isError:!0}):t||0!==a.length?Object(c.createElement)(I.TableCard,{className:i,headers:this.getFormattedHeaders(),isLoading:t,rows:a,rowsPerPage:r,showMenu:!1,title:o,totalRows:r}):Object(c.createElement)(I.Card,{title:o,className:i},Object(c.createElement)(I.EmptyTable,null,Object(_e.__)("No data recorded for the selected time period.","woocommerce-admin")))}}]),t}(c.Component));Vo.propTypes={headers:K.a.arrayOf(K.a.shape({label:K.a.string})),id:K.a.string.isRequired,query:K.a.object,rows:K.a.arrayOf(K.a.arrayOf(K.a.shape({display:K.a.node,value:K.a.oneOfType([K.a.string,K.a.number,K.a.bool])}))).isRequired,title:K.a.string.isRequired,totalRows:K.a.number.isRequired},Vo.defaultProps={rows:[],isError:!1,isRequesting:!1};var Io=Object(ke.a)(rn((function(e,t){var n=t.id,r=t.query;return function(e){var t=e.per_page,n=e.persisted_query,r=e.query,o=(0,e.select)("wc-api"),c=o.getItems,a=o.getItemsError,i=o.isGetItemsRequesting,s={isRequesting:!1,isError:!1,rows:[]},l=yt(r),u={after:Object(gt.appendTimestamp)(l.primary.after,"start"),before:Object(gt.appendTimestamp)(l.primary.before,"end"),per_page:t,persisted_query:JSON.stringify(n)},d=c("leaderboards",u).get(e.id);return i("leaderboards",u)?Rr({},s,{isRequesting:!0}):a("leaderboards",u)?Rr({},s,{isError:!0}):Rr({},s,{rows:d.rows})}({id:n,per_page:t.totalRows,persisted_query:Object(Oe.getPersistedQuery)(r),query:r,select:e})})))(Vo),Fo=(n(401),function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).apply(this,arguments))).setRowsPerTable=function(e){n.setState({rowsPerTable:parseInt(e)});var t=je()({},"dashboard_leaderboard_rows",parseInt(e));n.props.updateCurrentUserData(t)},n.state={rowsPerTable:parseInt(e.userPrefLeaderboardRows)||5},n}return V()(t,e),R()(t,[{key:"renderMenu",value:function(){var e=this,t=this.props,n=t.allLeaderboards,r=t.isFirst,o=t.isLast,a=t.hiddenBlocks,i=t.onMove,s=t.onRemove,l=t.onTitleBlur,u=t.onTitleChange,d=t.onToggleHiddenBlock,p=t.titleInput,m=t.controls,b=this.state.rowsPerTable;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Choose which leaderboards to display and other settings","woocommerce-admin"),renderContent:function(t){var h=t.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.MenuTitle,null,Object(_e.__)("Leaderboards","woocommerce-admin")),n.map((function(e){var t=!a.includes(e.id);return Object(c.createElement)(I.MenuItem,{checked:t,isCheckbox:!0,isClickable:!0,key:e.id,onInvoke:function(){d(e.id)(),Object(an.b)("dash_leaderboards_toggle",{status:t?"off":"on",key:e.id})}},e.label)})),Object(c.createElement)(uo.a,{className:"woocommerce-dashboard__dashboard-leaderboards__select",label:Object(_e.__)("Rows Per Table","woocommerce-admin"),value:b,options:Array.from({length:20},(function(e,t){return{v:t+1,label:t+1}})),onChange:e.setRowsPerTable}),Object(c.createElement)(m,{onToggle:h,onMove:i,onRemove:s,isFirst:r,isLast:o,onTitleBlur:l,onTitleChange:u,titleInput:p}))}})}},{key:"renderLeaderboards",value:function(){var e=this.state.rowsPerTable,t=this.props,n=t.allLeaderboards,r=t.hiddenBlocks,o=t.query;return n.map((function(t){if(!r.includes(t.id))return Object(c.createElement)(Io,{headers:t.headers,id:t.id,key:t.id,query:o,title:t.label,totalRows:e})}))}},{key:"render",value:function(){var e=this.props.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-dashboard__dashboard-leaderboards"},Object(c.createElement)(I.SectionHeader,{title:e||Object(_e.__)("Leaderboards","woocommerce-admin"),menu:this.renderMenu()}),Object(c.createElement)("div",{className:"woocommerce-dashboard__columns"},this.renderLeaderboards())))}}]),t}(c.Component));Fo.propTypes={query:K.a.object.isRequired};var Uo=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getCurrentUserData,r=t.getItems,o=t.getItemsError,c=t.isGetItemsRequesting,a=n();return{allLeaderboards:Object(ye.g)("dataEndpoints",{leaderboards:[]}).leaderboards,getItems:r,getItemsError:o,isGetItemsRequesting:c,userPrefLeaderboardRows:a.dashboard_leaderboard_rows}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Fo),Go=(n(402),Object(ye.g)("dataEndpoints",{performanceIndicators:""}).performanceIndicators),Qo=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"renderMenu",value:function(){var e=this.props,t=e.hiddenBlocks,n=e.isFirst,r=e.isLast,o=e.onMove,a=e.onRemove,i=e.onTitleBlur,s=e.onTitleChange,l=e.onToggleHiddenBlock,u=e.titleInput,d=e.controls;return Object(c.createElement)(I.EllipsisMenu,{label:Object(_e.__)("Choose which analytics to display and the section name","woocommerce-admin"),renderContent:function(e){var p=e.onToggle;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.MenuTitle,null,Object(_e.__)("Display Stats:","woocommerce-admin")),Go.map((function(e,n){var r=!t.includes(e.stat);return Object(c.createElement)(I.MenuItem,{checked:r,isCheckbox:!0,isClickable:!0,key:n,onInvoke:function(){l(e.stat)(),Object(an.b)("dash_indicators_toggle",{status:r?"off":"on",key:e.stat})}},e.label)})),Object(c.createElement)(d,{onToggle:p,onMove:o,onRemove:a,isFirst:n,isLast:r,onTitleBlur:i,onTitleChange:s,titleInput:u}))}})}},{key:"renderList",value:function(){var e=this.props,t=e.query,n=e.primaryRequesting,r=e.secondaryRequesting,o=e.primaryError,a=e.secondaryError,i=e.primaryData,l=e.secondaryData,u=e.userIndicators;if(n||r)return Object(c.createElement)(I.SummaryListPlaceholder,{numberOfItems:u.length});if(o||a)return null;var d=Object(Oe.getPersistedQuery)(t),p="previous_period"===Ot(t).compare?Object(_e.__)("Previous Period:","woocommerce-admin"):Object(_e.__)("Previous Year:","woocommerce-admin");return Object(c.createElement)(I.SummaryList,null,(function(){return u.map((function(e,t){var n=Object(s.find)(i.data,(function(t){return t.stat===e.stat})),r=Object(s.find)(l.data,(function(t){return t.stat===e.stat}));if(!n||!r)return null;var o=n._links&&n._links.report[0]&&n._links.report[0].href||"",a=o&&Object(Oe.getNewPath)(d,o,{chart:n.chart})||"",u="currency"===n.format,m=Object(Ct.calculateDelta)(n.value,r.value),b=u?_t(n.value):Lt(n.format,n.value),h=u?_t(r.value):Lt(r.format,r.value);return Object(c.createElement)(I.SummaryNumber,{key:t,href:a,label:e.label,value:b,prevLabel:p,prevValue:h,delta:m,onLinkClickCallback:function(){Object(an.b)("dash_indicators_click",{key:e.stat})}})}))}))}},{key:"render",value:function(){var e=this.props,t=e.userIndicators,n=e.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.SectionHeader,{title:n||Object(_e.__)("Store Performance","woocommerce-admin"),menu:this.renderMenu()}),t.length>0&&Object(c.createElement)("div",{className:"woocommerce-dashboard__store-performance"},this.renderList()))}}]),t}(c.Component),Ko=Object(ke.a)(rn((function(e,t){var n=t.hiddenBlocks,r=t.query,o=e("wc-api"),c=o.getReportItems,a=o.getReportItemsError,i=o.isReportItemsRequesting,s=yt(r),l=s.primary.before,u=s.secondary.before,d=Go.filter((function(e){return!n.includes(e.stat)})),p=d.map((function(e){return e.stat})).join(",");if(0===p.length)return{hiddenBlocks:n,userIndicators:d,indicators:Go};var m={after:Object(gt.appendTimestamp)(s.primary.after,"start"),before:Object(gt.appendTimestamp)(l,l.isSame(Ft()(),"day")?"now":"end"),stats:p},b={after:Object(gt.appendTimestamp)(s.secondary.after,"start"),before:Object(gt.appendTimestamp)(u,u.isSame(Ft()(),"day")?"now":"end"),stats:p},h=c("performance-indicators",m),f=a("performance-indicators",m)||null,g=i("performance-indicators",m),v=c("performance-indicators",b),M=a("performance-indicators",b)||null,O=i("performance-indicators",b);return{hiddenBlocks:n,userIndicators:d,indicators:Go,primaryData:h,primaryError:f,primaryRequesting:g,secondaryData:v,secondaryError:M,secondaryRequesting:O}})),Object(a.withDispatch)((function(e){return{updateCurrentUserData:e("wc-api").updateCurrentUserData}})))(Qo),$o=Object(ze.applyFilters)("woocommerce_dashboard_default_sections",[{key:"store-performance",component:Ko,title:Object(_e.__)("Performance","woocommerce-admin"),isVisible:!0,icon:"arrow-right-alt",hiddenBlocks:["coupons/amount","coupons/orders_count","downloads/download_count","taxes/order_tax","taxes/total_tax","taxes/shipping_tax","revenue/shipping"]},{key:"charts",component:Po,title:Object(_e.__)("Charts","woocommerce-admin"),isVisible:!0,icon:"chart-bar",hiddenBlocks:["avg_order_value","avg_items_per_order","items_sold","total_sales","refunds","coupons","taxes","shipping","amount","total_tax","order_tax","shipping_tax","download_count"]},{key:"leaderboards",component:Uo,title:Object(_e.__)("Leaderboards","woocommerce-admin"),isVisible:!0,icon:"editor-ol",hiddenBlocks:["coupons","customers"]}]),Jo=n(403),Zo=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).onMoveUp=n.onMoveUp.bind(ft()(n)),n.onMoveDown=n.onMoveDown.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"onMoveUp",value:function(){var e=this.props,t=e.onMove,n=e.onToggle;t(-1),n()}},{key:"onMoveDown",value:function(){var e=this.props,t=e.onMove,n=e.onToggle;t(1),n()}},{key:"render",value:function(){var e=this.props,t=e.onRemove,n=e.isFirst,r=e.isLast,o=e.onTitleBlur,a=e.onTitleChange,i=e.titleInput;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-ellipsis-menu__item"},Object(c.createElement)(Jo.a,{label:Object(_e.__)("Section Title","woocommerce-admin"),onBlur:o,onChange:a,required:!0,value:i})),Object(c.createElement)("div",{className:"woocommerce-dashboard-section-controls"},!n&&Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:this.onMoveUp},Object(c.createElement)(jo.a,{icon:"arrow-up-alt2",label:Object(_e.__)("Move up")}),Object(_e.__)("Move up","woocommerce-admin")),!r&&Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:this.onMoveDown},Object(c.createElement)(jo.a,{icon:"arrow-down-alt2",label:Object(_e.__)("Move Down")}),Object(_e.__)("Move Down","woocommerce-admin")),Object(c.createElement)(I.MenuItem,{isClickable:!0,onInvoke:t},Object(c.createElement)(jo.a,{icon:"trash",label:Object(_e.__)("Remove block")}),Object(_e.__)("Remove section","woocommerce-admin"))))}}]),t}(c.Component),Yo=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).call(this,e));var r=e.title;return n.state={titleInput:r},n.onToggleHiddenBlock=n.onToggleHiddenBlock.bind(ft()(n)),n.onTitleChange=n.onTitleChange.bind(ft()(n)),n.onTitleBlur=n.onTitleBlur.bind(ft()(n)),n}return V()(t,e),R()(t,[{key:"onTitleChange",value:function(e){this.setState({titleInput:e})}},{key:"onTitleBlur",value:function(){var e=this.props,t=e.onTitleUpdate,n=e.title,r=this.state.titleInput;""===r?this.setState({titleInput:n}):t&&t(r)}},{key:"onToggleHiddenBlock",value:function(e){var t=this;return function(){var n=Object(s.xor)(t.props.hiddenBlocks,[e]);t.props.onChangeHiddenBlocks(n)}}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.onChangeHiddenBlocks,e.onTitleUpdate,q()(e,["component","onChangeHiddenBlocks","onTitleUpdate"])),r=this.state.titleInput;return Object(c.createElement)("div",{className:"woocommerce-dashboard-section"},Object(c.createElement)(t,N()({onTitleChange:this.onTitleChange,onTitleBlur:this.onTitleBlur,onToggleHiddenBlock:this.onToggleHiddenBlock,titleInput:r,controls:Zo},n)))}}]),t}(c.Component);var ec=Object(c.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,a=void 0===o?[]:o,i=e.onRemove,l=void 0===i?s.noop:i;Object(c.useEffect)((function(){var e=setTimeout((function(){l()}),1e4);return function(){return clearTimeout(e)}}),[]);var u=Rt()(n,"components-snackbar");return a&&a.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),a=[a[0]]),Object(c.createElement)("div",{ref:t,className:u,onClick:l,tabIndex:"0",role:"button",onKeyPress:l,label:Object(_e.__)("Dismiss this notice")},Object(c.createElement)("div",{className:"components-snackbar__content"},r,a.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(c.createElement)(Ur.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))})),tc=n(27),nc=n(15),rc=n(14),oc=n(17),cc=n(18),ac=n(19),ic=n(91),sc=n(101),lc=n(5),uc=n(39),dc=n(103),pc=n(102),mc=n(105),bc=n(99),hc=function(e){function t(){var e;return Object(nc.a)(this,t),(e=Object(oc.a)(this,Object(cc.a)(t).apply(this,arguments))).containerRef=Object(c.createRef)(),e.handleKeyDown=e.handleKeyDown.bind(Object(lc.a)(e)),e.handleFocusOutside=e.handleFocusOutside.bind(Object(lc.a)(e)),e.focusFirstTabbable=e.focusFirstTabbable.bind(Object(lc.a)(e)),e}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusFirstTabbable()}},{key:"focusFirstTabbable",value:function(){var e=xt.a.tabbable.find(this.containerRef.current);e.length&&e[0].focus()}},{key:"handleFocusOutside",value:function(e){this.props.shouldCloseOnClickOutside&&this.onRequestClose(e)}},{key:"handleKeyDown",value:function(e){e.keyCode===uc.ESCAPE&&this.handleEscapeKeyDown(e)}},{key:"handleEscapeKeyDown",value:function(e){this.props.shouldCloseOnEsc&&(e.stopPropagation(),this.onRequestClose(e))}},{key:"onRequestClose",value:function(e){var t=this.props.onRequestClose;t&&t(e)}},{key:"render",value:function(){var e=this.props,t=e.overlayClassName,n=e.contentLabel,r=e.aria,o=r.describedby,a=r.labelledby,i=e.children,s=e.className,l=e.role,u=e.style;return Object(c.createElement)(dc.a,{className:Rt()("components-modal__screen-overlay",t),onKeyDown:this.handleKeyDown},Object(c.createElement)("div",{className:Rt()("components-modal__frame",s),style:u,ref:this.containerRef,role:l,"aria-label":n,"aria-labelledby":n?null:a,"aria-describedby":o,tabIndex:"-1"},i))}}]),t}(c.Component),fc=Object(ke.a)([mc.a,bc.a,pc.a])(hc),gc=function(e){var t=e.icon,n=e.title,r=e.onClose,o=e.closeLabel,a=e.headingId,i=e.isDismissible,s=o||Object(_e.__)("Close dialog");return Object(c.createElement)("div",{className:"components-modal__header"},Object(c.createElement)("div",{className:"components-modal__header-heading-container"},t&&Object(c.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},t),n&&Object(c.createElement)("h1",{id:a,className:"components-modal__header-heading"},n)),i&&Object(c.createElement)(Tt.a,{onClick:r,icon:"no-alt",label:s}))},vc=new Set(["alert","status","log","marquee","timer"]),Mc=[],Oc=!1;function yc(e){if(!Oc){var t=document.body.children;Object(s.forEach)(t,(function(t){t!==e&&function(e){var t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||vc.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),Mc.push(t))})),Oc=!0}}var wc,zc=0,_c=function(e){function t(e){var n;return Object(nc.a)(this,t),(n=Object(oc.a)(this,Object(cc.a)(t).call(this,e))).prepareDOM(),n}return Object(ac.a)(t,e),Object(rc.a)(t,[{key:"componentDidMount",value:function(){1===++zc&&this.openFirstModal()}},{key:"componentWillUnmount",value:function(){0===--zc&&this.closeLastModal(),this.cleanDOM()}},{key:"prepareDOM",value:function(){wc||(wc=document.createElement("div"),document.body.appendChild(wc)),this.node=document.createElement("div"),wc.appendChild(this.node)}},{key:"cleanDOM",value:function(){wc.removeChild(this.node)}},{key:"openFirstModal",value:function(){yc(wc),document.body.classList.add(this.props.bodyOpenClassName)}},{key:"closeLastModal",value:function(){document.body.classList.remove(this.props.bodyOpenClassName),Oc&&(Object(s.forEach)(Mc,(function(e){e.removeAttribute("aria-hidden")})),Mc=[],Oc=!1)}},{key:"render",value:function(){var e=this.props,t=e.onRequestClose,n=e.title,r=e.icon,o=e.closeButtonLabel,a=e.children,i=e.aria,s=e.instanceId,l=e.isDismissible,u=e.isDismissable,d=Object(tc.a)(e,["onRequestClose","title","icon","closeButtonLabel","children","aria","instanceId","isDismissible","isDismissable"]),p=i.labelledby||"components-modal-header-".concat(s);return u&&Object(sc.a)("isDismissable prop of the Modal component",{alternative:"isDismissible prop (renamed) of the Modal component"}),Object(c.createPortal)(Object(c.createElement)(fc,Object(oe.a)({onRequestClose:t,aria:{labelledby:n?p:null,describedby:i.describedby}},d),Object(c.createElement)("div",{className:"components-modal__content",tabIndex:"0"},Object(c.createElement)(gc,{closeLabel:o,headingId:p,icon:r,isDismissible:l||u,onClose:t,title:n}),a)),this.node)}}]),t}(c.Component);_c.defaultProps={bodyOpenClassName:"modal-open",role:"dialog",title:null,focusOnMount:!0,shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,isDismissible:!0,aria:{labelledby:null,describedby:null}};var Ac=Object(ic.a)(_c);n(404);function jc(e){return e?e.split(":")[0]:null}function kc(e){var t=jc(e);return Object(s.without)(Object(ye.g)("onboarding",{euCountries:[]}).euCountries,"GB").includes(t)&&(t="EU"),t}function Ec(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=Object(ye.g)("onboarding",{}),o=e.product_types||[];if(!r.productTypes)return n;o.forEach((function(e){r.productTypes[e]&&r.productTypes[e].product&&(t||!r.installedPlugins.includes(r.productTypes[e].slug))&&n.push(r.productTypes[e].product)}));var c=r.themes.find((function(t){return t.slug===e.theme}));return c&&c.id&&Cc(c.price)>0&&(t||!c.is_installed)&&n.push(c.id),n}function Cc(e){return Number(Object(En.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}function Lc(){return Object(ye.g)("onboardingEnabled",!1)}var Nc=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).state={purchaseNowButtonBusy:!1,purchaseLaterButtonBusy:!1},n}return V()(t,e),R()(t,[{key:"onClickPurchaseNow",value:function(){var e=this.props,t=e.productIds,n=e.onClickPurchaseNow;this.setState({purchaseNowButtonBusy:!0});var r=Object(Oe.getNewPath)({},"/",{}),o=Object(ye.g)("onboarding",{}).connectNonce;if(t.length){Object(an.b)("tasklist_modal_proceed_checkout",{product_ids:t,purchase_install:!1});var c=Object(Ee.addQueryArgs)("https://woocommerce.com/cart",{"wccom-site":Object(ye.g)("siteUrl"),"wccom-woo-version":Object(ye.g)("wcVersion"),"wccom-replace-with":t.join(","),"wccom-connect-nonce":o,"wccom-back":r});n?n(c):window.location=c}}},{key:"onClickPurchaseLater",value:function(){var e=this.props.productIds;Object(an.b)("tasklist_modal_proceed_checkout",{product_ids:e,purchase_install:!1}),this.setState({purchaseLaterButtonBusy:!0}),this.props.onClickPurchaseLater()}},{key:"onClose",value:function(){var e=this.props,t=e.onClose,n=e.productIds;Object(an.b)("tasklist_modal_proceed_checkout",{product_ids:n,purchase_install:!1}),t()}},{key:"renderProducts",value:function(){var e=this.props.productIds,t=Object(ye.g)("onboarding",{}),n=t.productTypes,r=void 0===n?{}:n,o=t.themes,a=void 0===o?[]:o,i=[];return e.forEach((function(e){var t=Object(s.find)(r,(function(t){return t.product===e}));t&&i.push({title:t.label,content:t.description});var n=Object(s.find)(a,(function(t){return t.id===e}));n&&i.push({title:Object(_e.sprintf)(Object(_e.__)("%s — %s per year","woocommerce-admin"),n.title,Object(En.decodeEntities)(n.price)),content:Object(c.createElement)("span",{dangerouslySetInnerHTML:Xo(n.excerpt)})})})),Object(c.createElement)(I.List,{items:i})}},{key:"render",value:function(){var e=this,t=this.state,n=t.purchaseNowButtonBusy,r=t.purchaseLaterButtonBusy;return Object(c.createElement)(Ac,{title:Object(_e.__)("Would you like to purchase and install the following features now?","woocommerce-admin"),onRequestClose:function(){return e.onClose()},className:"woocommerce-cart-modal"},this.renderProducts(),Object(c.createElement)("p",{className:"woocommerce-cart-modal__help-text"},Object(_e.__)("You won't have access to this functionality until the extensions have been purchased and installed.","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-cart-modal__actions"},Object(c.createElement)(Ur.a,{isLink:!0,isBusy:r,onClick:function(){return e.onClickPurchaseLater()}},Object(_e.__)("I'll do it later","woocommerce-admin")),Object(c.createElement)(Ur.a,{isPrimary:!0,isDefault:!0,isBusy:n,onClick:function(){return e.onClickPurchaseNow()}},Object(_e.__)("Purchase & install now","woocommerce-admin"))))}}]),t}(c.Component),Sc=Object(ke.a)(rn((function(e){var t=(0,e("wc-api").getProfileItems)();return{profileItems:t,productIds:Ec(t)}})))(Nc);function qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xc=function(e){function t(e){var n;x()(this,t),n=W()(this,H()(t).call(this,e));var r=Object(ye.g)("onboarding",{}),o=r.hasHomepage,c=r.hasProducts;return n.stepVisibility={homepage:!o,import:!c},n.state={isDirty:!1,isPending:!1,logo:null,stepIndex:0,storeNoticeText:e.options.woocommerce_demo_store_notice||""},n.completeStep=n.completeStep.bind(ft()(n)),n.createHomepage=n.createHomepage.bind(ft()(n)),n.importProducts=n.importProducts.bind(ft()(n)),n.updateLogo=n.updateLogo.bind(ft()(n)),n.updateNotice=n.updateNotice.bind(ft()(n)),n}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=Object(ye.g)("onboarding",{}).themeMods;e.custom_logo&&this.setState({logo:{id:e.custom_logo}})}},{key:"componentDidUpdate",value:(n=gr()(regeneratorRuntime.mark((function e(t){var n,r,o,c,a,i,l,u,d,p,m,b,h=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.state,r=n.isPending,o=n.logo,c=n.stepIndex,a=this.props,i=a.createNotice,l=a.errors,u=a.hasErrors,d=a.isRequesting,p=a.options,m=this.getSteps()[c].key,b=!d&&t.isRequesting&&!u,!o||o.url||r||(this.setState({isPending:!0}),wp.media.attachment(o.id).fetch().then((function(){var e=wp.media.attachment(o.id).get("url");h.setState({isPending:!1,logo:{id:o.id,url:e}})}))),p.woocommerce_demo_store_notice&&t.options.woocommerce_demo_store_notice!==p.woocommerce_demo_store_notice&&this.setState({storeNoticeText:p.woocommerce_demo_store_notice}),"logo"===m&&b&&(i("success",Object(_e.__)("Store logo updated sucessfully.","woocommerce-admin")),this.completeStep()),"notice"===m&&b&&(i("success",Object(_e.__)("🎨 Your store is looking great! Don't forget to continue personalizing it.","woocommerce-admin")),this.completeStep()),Object(s.difference)(l,t.errors).map((function(e){return i("error",e)}));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"completeStep",value:function(){var e=this.state.stepIndex;this.getSteps()[e+1]?this.setState({stepIndex:e+1}):Object(Oe.getHistory)().push(Object(Oe.getNewPath)({},"/",{}))}},{key:"importProducts",value:function(){var e=this,t=this.props.createNotice;this.setState({isPending:!0}),Object(an.b)("tasklist_appearance_import_demo",{}),Le()({path:"".concat("/wc-admin","/onboarding/tasks/import_sample_products"),method:"POST"}).then((function(n){n.failed&&n.failed.length?t("error",Object(_e.__)("There was an error importing some of the demo products.","woocommerce-admin")):(t("success",Object(_e.__)("All demo products have been imported.","woocommerce-admin")),Object(ye.h)("onboarding",Tc({},Object(ye.g)("onboarding",{}),{hasProducts:!0}))),e.setState({isPending:!1}),e.completeStep()})).catch((function(n){t("error",n.message),e.setState({isPending:!1})}))}},{key:"createHomepage",value:function(){var e=this,t=this.props.createNotice;this.setState({isPending:!0}),Object(an.b)("tasklist_appearance_create_homepage",{create_homepage:!0}),Le()({path:"/wc-admin/onboarding/tasks/create_homepage",method:"POST"}).then((function(n){t(n.status,n.message,{actions:n.edit_post_link?[{label:Object(_e.__)("Customize","woocommerce-admin"),onClick:function(){Object(an.a)("tasklist_appearance_customize_homepage",{}),window.location="".concat(n.edit_post_link,"&wc_onboarding_active_task=homepage")}}]:null}),e.setState({isPending:!1}),e.completeStep()})).catch((function(n){t("error",n.message),e.setState({isPending:!1})}))}},{key:"updateLogo",value:function(){var e=this.props.updateOptions,t=this.state.logo,n=Object(ye.g)("onboarding",{}),r=n.stylesheet,o=Tc({},n.themeMods,{custom_logo:t?t.id:null});Object(an.b)("tasklist_appearance_upload_logo"),Object(ye.h)("onboarding",Tc({},Object(ye.g)("onboarding",{}),{themeMods:o})),e(je()({},"theme_mods_".concat(r),o))}},{key:"updateNotice",value:function(){var e=this.props.updateOptions,t=this.state.storeNoticeText;Object(an.b)("tasklist_appearance_set_store_notice",{added_text:Boolean(t.length)}),Object(ye.h)("onboarding",Tc({},Object(ye.g)("onboarding",{}),{isAppearanceComplete:!0})),e({woocommerce_task_list_appearance_complete:!0,woocommerce_demo_store:t.length?"yes":"no",woocommerce_demo_store_notice:t})}},{key:"getSteps",value:function(){var e=this,t=this.state,n=t.isDirty,r=t.isPending,o=t.logo,a=t.storeNoticeText,i=this.props.isRequesting,l=[{key:"import",label:Object(_e.__)("Import demo products","woocommerce-admin"),description:Object(_e.__)("We’ll add some products that will make it easier to see what your store looks like","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{onClick:this.importProducts,isBusy:r,isPrimary:!0},Object(_e.__)("Import products","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){return e.completeStep()}},Object(_e.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.import},{key:"homepage",label:Object(_e.__)("Create a custom homepage","woocommerce-admin"),description:Object(_e.__)("Create a new homepage and customize it to suit your needs","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Ur.a,{isPrimary:!0,isBusy:r,onClick:this.createHomepage},Object(_e.__)("Create homepage","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){Object(an.b)("tasklist_appearance_create_homepage",{create_homepage:!1}),e.completeStep()}},Object(_e.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.homepage},{key:"logo",label:Object(_e.__)("Upload a logo","woocommerce-admin"),description:Object(_e.__)("Ensure your store is on-brand by adding your logo","woocommerce-admin"),content:r?null:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.ImageUpload,{image:o,onChange:function(t){return e.setState({isDirty:!0,logo:t})}}),Object(c.createElement)(Ur.a,{disabled:!o&&!n,onClick:this.updateLogo,isBusy:i,isPrimary:!0},Object(_e.__)("Proceed","woocommerce-admin")),Object(c.createElement)(Ur.a,{onClick:function(){return e.completeStep()}},Object(_e.__)("Skip","woocommerce-admin"))),visible:!0},{key:"notice",label:Object(_e.__)("Set a store notice","woocommerce-admin"),description:Object(_e.__)("Optionally display a prominent notice across all pages of your store","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.TextControl,{label:Object(_e.__)("Store notice text","woocommerce-admin"),placeholder:Object(_e.__)("Store notice text","woocommerce-admin"),value:a,onChange:function(t){return e.setState({storeNoticeText:t})}}),Object(c.createElement)(Ur.a,{onClick:this.updateNotice,isPrimary:!0},Object(_e.__)("Complete task","woocommerce-admin"))),visible:!0}];return Object(s.filter)(l,(function(e){return e.visible}))}},{key:"render",value:function(){var e=this.state,t=e.isPending,n=e.stepIndex,r=this.props,o=r.isRequesting,a=r.hasErrors,i=this.getSteps()[n].key;return Object(c.createElement)("div",{className:"woocommerce-task-appearance"},Object(c.createElement)(I.Card,{className:"is-narrow"},Object(c.createElement)(I.Stepper,{isPending:o&&!a||t,isVertical:!0,currentStep:i,steps:this.getSteps()})))}}]),t}(c.Component),Bc=Object(ke.a)(rn((function(e){var t=e("wc-api"),n=t.getOptions,r=t.getOptionsError,o=t.isUpdateOptionsRequesting,c=Object(ye.g)("onboarding",{}).stylesheet,a=n(["woocommerce_demo_store","woocommerce_demo_store_notice"]),i=[],s=r(["theme_mods_".concat(c)]),l=r(["woocommerce_demo_store","woocommerce_demo_store_notice"]);return s&&i.push(s.message),l&&i.push(l.message),{errors:i,getOptionsError:r,hasErrors:Boolean(i.length),isRequesting:Boolean(o(["theme_mods_".concat(c)]))||Boolean(o(["woocommerce_task_list_appearance_complete","woocommerce_demo_store","woocommerce_demo_store_notice"])),options:a}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e("wc-api").updateOptions}})))(xc);function Rc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Pc=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}var n,r;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){document.body.classList.add("woocommerce-admin-is-loading");var e=this.props.query;"1"!==e.deny?e["wccom-connected"]&&e.request_token?this.finish():this.request():this.errorMessage(Object(_e.__)("You must click approve to install your extensions and connect to WooCommerce.com.","woocommerce-admin"))}},{key:"baseQuery",value:function(){var e=this.props.query,t=Object(s.omit)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rc(Object(n),!0).forEach((function(t){je()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{page:"wc-admin"}),["task","wccom-connected","request_token","deny"]);return Object(Oe.getNewPath)({},"/",t)}},{key:"errorMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(_e.__)("There was an error connecting to WooCommerce.com. Please try again.","woocommerce-admin");document.body.classList.remove("woocommerce-admin-is-loading"),Object(Oe.getHistory)().push(this.baseQuery()),this.props.createNotice("error",e)}},{key:"request",value:(r=gr()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Le()({path:"".concat("/wc-admin","/onboarding/plugins/request-wccom-connect"),method:"POST"});case 3:if(!(t=e.sent)||!t.connectAction){e.next=7;break}return window.location=t.connectAction,e.abrupt("return");case 7:throw new Error;case 10:e.prev=10,e.t0=e.catch(0),this.errorMessage();case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return r.apply(this,arguments)})},{key:"finish",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.query,e.prev=1,e.next=4,Le()({path:"".concat("/wc-admin","/onboarding/plugins/finish-wccom-connect"),method:"POST",data:{request_token:t.request_token}});case 4:if(!(n=e.sent)||!n.success){e.next=10;break}return e.next=8,this.props.updateProfileItems({wccom_connected:!0});case 8:return this.props.isProfileItemsError?this.errorMessage():(this.props.createNotice("success",Object(_e.__)("Store connected to WooCommerce.com and extensions are being installed.","woocommerce-admin")),document.body.classList.remove("woocommerce-admin-is-loading"),Object(Oe.getHistory)().push(this.baseQuery())),e.abrupt("return");case 10:throw new Error;case 13:e.prev=13,e.t0=e.catch(1),this.errorMessage();case 16:case"end":return e.stop()}}),e,this,[[1,13]])}))),function(){return n.apply(this,arguments)})},{key:"render",value:function(){return null}}]),t}(c.Component),Wc=Object(ke.a)(rn((function(e){var t=e("wc-api").getProfileItemsError;return{isProfileItemsError:Boolean(t())}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateProfileItems:e("wc-api").updateProfileItems}})))(Pc),Dc=[{title:Object(_e.__)("Add manually (recommended)","woocommerce-admin"),content:Object(_e.__)("For small stores we recommend adding products manually","woocommerce-admin"),before:Object(c.createElement)("i",{className:"material-icons-outlined"},"add_box"),after:Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),onClick:function(){return Object(an.b)("tasklist_add_product",{method:"manually"})},href:Object(ye.f)("post-new.php?post_type=product&wc_onboarding_active_task=products&tutorial=true")},{title:Object(_e.__)("Import","woocommerce-admin"),content:Object(_e.__)("For larger stores we recommend importing all products at once via CSV file","woocommerce-admin"),before:Object(c.createElement)("i",{className:"material-icons-outlined"},"import_export"),after:Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),onClick:function(){return Object(an.b)("tasklist_add_product",{method:"import"})},href:Object(ye.f)("edit.php?post_type=product&page=product_importer&wc_onboarding_active_task=product-import")},{title:Object(_e.__)("Migrate","woocommerce-admin"),content:Object(_e.__)("For stores currently selling elsewhere we suggest using a product migration service","woocommerce-admin"),before:Object(c.createElement)("i",{className:"material-icons-outlined"},"cloud_download"),after:Object(c.createElement)("i",{className:"material-icons-outlined"},"chevron_right"),onClick:function(){return Object(an.b)("tasklist_add_product",{method:"migrate"})},href:"https://woocommerce.com/products/cart2cart/",target:"_blank"}],Hc=function(e){function t(){return x()(this,t),W()(this,H()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(I.Card,{className:"woocommerce-task-card"},Object(c.createElement)(I.List,{items:Dc})))}}]),t}(c.Component),Xc=function(e){function t(e){var n;return x()(this,t),(n=W()(this,H()(t).call(this,e))).connectJetpack=n.connectJetpack.bind(ft()(n)),e.setIsPending(!0),n}var n;return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.createNotice,r=t.error,o=t.isRequesting,c=t.setIsPending;e.isRequesting&&!o&&c(!1),r&&r!==e.error&&n("error",r)}},{key:"connectJetpack",value:(n=gr()(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props,n=t.jetpackConnectUrl,(r=t.onConnect)&&r(),window.location=n;case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.hasErrors,n=e.isRequesting,r=e.onSkip,o=e.skipText;return Object(c.createElement)(c.Fragment,null,t?Object(c.createElement)(Ur.a,{isPrimary:!0,onClick:function(){return location.reload()}},Object(_e.__)("Retry","woocommerce-admin")):Object(c.createElement)(Ur.a,{disabled:n,isPrimary:!0,onClick:this.connectJetpack},Object(_e.__)("Connect","woocommerce-admin")),r&&Object(c.createElement)(Ur.a,{onClick:r},o||Object(_e.__)("No thanks","woocommerce-admin")))}}]),t}(c.Component);Xc.propTypes={createNotice:K.a.func.isRequired,error:K.a.string,hasErrors:K.a.bool,isRequesting:K.a.bool,jetpackConnectUrl:K.a.string,onSkip:K.a.func,redirectUrl:K.a.string,skipText:K.a.string,setIsPending:K.a.func},Xc.defaultProps={setIsPending:function(){}};var Vc=Object(ke.a)(rn((function(e,t){var n=e("wc-api"),r=n.getJetpackConnectUrl,o=n.isGetJetpackConnectUrlRequesting,c=n.getJetpackConnectUrlError,a={redirect_url:t.redirectUrl||window.location.href},i=o(a);return{error:c(a),isRequesting:i,jetpackConnectUrl:r(a)}})),Object(a.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}})))(Xc),Ic=function(e){function t(){var e;return x()(this,t),(e=W()(this,H()(t).apply(this,arguments))).installAndActivatePlugins=e.installAndActivatePlugins.bind(ft()(e)),e.skipInstaller=e.skipInstaller.bind(ft()(e)),e}var n;return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){this.props.autoInstall&&this.installAndActivatePlugins()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.activatedPlugins,r=t.activatePlugins,o=t.onComplete,c=t.crea