1?f:0,width:t.length>1?d:r,values:a.map((function(e){var t=e.key,r=c[t];return r?{key:t,value:r.value,date:n}:null})).filter(Boolean)}}))}(t,n.uniqueDates,n.visibleKeys,l,r.xScale),h=l<=1365||n.uniqueDates.length>50?2:3;h=l<=783?1.25:h;var m=l<=1365?4:6;n.uniqueDates.length>1&&f.append("path").attr("fill","none").attr("stroke-width",h).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",(function(e){return n.getColor(e.key)})).style("opacity",(function(e){var t=e.focus?1:.1;return e.visible?t:0})).attr("d",(function(e){return u(e.values)})),l/n.uniqueDates.length>36&&f.selectAll("circle").data((function(e,t){return e.values.map((function(n){return Yc(Yc({},n),{},{i:t,visible:e.visible,key:e.key})}))})).enter().append("circle").attr("r",m).attr("fill",(function(e){return n.getColor(e.key)})).attr("stroke","#fff").attr("stroke-width",h+1).style("opacity",(function(e){var t=e.focus?1:.1;return e.visible?t:0})).attr("cx",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("cy",(function(e){return r.yScale(e.value)})).attr("tabindex","0").attr("role","graphics-symbol").attr("aria-label",(function(e){var t=o.screenReaderFormat(e.date instanceof Date?e.date:lt()(e.date).toDate());return"".concat(t," ").concat(a.valueFormat(e.value))})).on("focus",(function(e,n,r){a.show(t.find((function(t){return t.date===e.date})),r[n].parentNode,_a.target)})).on("blur",(function(){return a.hide()}));var y=e.append("g").attr("class","focusspaces").selectAll(".focus").data(p).enter().append("g").attr("class","focus"),b=y.append("g").attr("class","focus-grid").attr("opacity","0");b.append("line").attr("x1",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("y1",0).attr("x2",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("y2",s),b.selectAll("circle").data((function(e){return e.values})).enter().append("circle").attr("r",m+2).attr("fill",(function(e){return n.getColor(e.key)})).attr("stroke","#fff").attr("stroke-width",h+2).attr("cx",(function(e){return r.xScale(lt()(e.date).toDate())})).attr("cy",(function(e){return r.yScale(e.value)})),y.append("rect").attr("class","focus-g").attr("x",(function(e){return e.start})).attr("y",0).attr("width",(function(e){return e.width})).attr("height",s).attr("opacity",0).on("mouseover",(function(e,r,o){var i=(0===r||r===p.length-1)&&n.uniqueDates.length>1?0:.5;a.show(t.find((function(t){return t.date===e.date})),_a.target,o[r].parentNode,i)})).on("mouseout",(function(){return a.hide()}))},Qc=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1]],Jc=function(e,t){return function(n){var r=e.length>5?5:e.length,o=Object(_.findIndex)(e,(function(e){return e.key===n})),a=o<=4?Qc[r][o]:0;return t(a)}},Zc=function(){function e(){s()(this,e),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return u()(e,[{key:"calculateXPosition",value:function(e,t,n){var r=this.ref.getBoundingClientRect(),o=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),a=Math.max(o.left,t.left);if("below"===this.position)return Math.max(this.margin,Math.min(e.left+.5*e.width-r.width/2-a,o.width-r.width-this.margin));var i=e.left+e.width*n+this.margin-a;return i+r.width+this.margin>o.width?Math.max(this.margin,e.left+e.width*(1-n)-r.width-this.margin-a):i}},{key:"calculateYPosition",value:function(e,t){if("below"===this.position)return t.height;var n=this.ref.getBoundingClientRect(),r=e.top+this.margin-t.top;return r+n.height+this.margin>t.height?Math.max(0,e.top-n.height-this.margin-t.top):r}},{key:"calculatePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getBoundingClientRect(),r=this.chart.getBoundingClientRect();return"below"===this.position&&(t=0),{x:this.calculateXPosition(n,r,t),y:this.calculateYPosition(n,r)}}},{key:"hide",value:function(){Ma(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),Ma(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function(e,t){return e[t.key].labelDate?this.labelFormat(lt()(e[t.key].labelDate).toDate()):t.label||t.key}},{key:"show",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){Ma(n).select(".focus-grid, .barfocus").attr("opacity","1");var a=this.calculatePosition(t,o),i=this.visibleKeys.map((function(t){return'\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t').concat(r.getTooltipRowLabel(e,t),'\n\t\t\t\t\t\t
\n\t\t\t\t\t\t').concat(r.valueFormat(e[t.key].value),"\n\t\t\t\t\t\n\t\t\t\t")})),c=this.title?this.title:this.labelFormat(lt()(e.date).toDate());Ma(this.ref).style("left",a.x+"px").style("top",a.y+"px").style("visibility","visible").html("\n\t\t\t\t\n\t\t\t\t\t
".concat(c,"
\n\t\t\t\t\t
\n\t\t\t\t\t").concat(i.join(""),"\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t"))}}}]),e}();var Xc=function(){return"rtl"===document.documentElement.dir},es=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).drawChart=t.drawChart.bind(f()(t)),t.getParams=t.getParams.bind(f()(t)),t.tooltipRef=Object(v.createRef)(),t}return u()(o,[{key:"getFormatParams",value:function(){var e=this.props,t=e.screenReaderFormat,n=e.xFormat,r=e.x2Format,o=e.yFormat,a=e.yBelow1Format;return{screenReaderFormat:Ia(t,cr),xFormat:Ia(n,cr),x2Format:Ia(r,cr),yBelow1Format:Ia(a),yFormat:Ia(o)}}},{key:"getScaleParams",value:function(e){var t=this.props,n=t.data,r=t.height,o=t.orderedKeys,a=t.chartType,i=this.getMargin(),c=r-i.top-i.bottom,s=this.getWidth()-i.left-i.right,l=function(e){var t=function(e){var t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return e.forEach((function(e){for(var r=0,o=Object.entries(e);rt&&(t=c.value),"date"!==i&&Number.isFinite(c.value)&&c.value-1?Math.round(4*o)/4:Math.ceil(o)}(n,r),a={lower:0,upper:0,step:o};return(Number.isFinite(n)||n<0)&&(a.lower=Math.floor(n/o)*o,a.lower===n&&0!==n&&(a.lower-=o)),(Number.isFinite(r)||r>0)&&(a.upper=Math.ceil(r/o)*o,a.upper===r&&0!==r&&(a.upper+=o)),a}(n),u=l.upper,d=l.lower,f=l.step,p=function(e,t,n){return function e(){var t=ac(Xi,Xi);return t.copy=function(){return oc(t,e())},$a.apply(t,arguments),ic(t)}().domain([Math.min(t,0),0===n&&0===t?1:Math.max(n,0)]).rangeRound([e,0])}(c,d,u);if("line"===a)return{step:f,xScale:wc(e,s),yMax:u,yMin:d,yScale:p};var h=this.shouldBeCompact(),m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return ii().domain(e).range([0,t]).paddingInner(n?0:.1)}(e,s,h);return{step:f,xGroupScale:Oc(o,m,h),xScale:m,yMax:u,yMin:d,yScale:p}}},{key:"getParams",value:function(e){var t=this.props,n=t.chartType,r=t.colorScheme,o=t.data,a=t.interval,i=t.mode,c=t.orderedKeys||function(e){return Aa(e).map((function(t){return{key:t,focus:!0,total:e.reduce((function(e,n){return e+n[t].value}),0),visible:!0}})).sort((function(e,t){return t.total-e.total}))}(o),s=c.filter((function(e){return e.visible})),l=c.length>5?s:c;return{getColor:Jc(l,r),interval:a,mode:i,chartType:n,uniqueDates:e,visibleKeys:s}}},{key:"createTooltip",value:function(e,t,n){var r=this.props,o=r.tooltipLabelFormat,a=r.tooltipPosition,i=r.tooltipTitle,c=r.tooltipValueFormat,s=new Zc;s.ref=this.tooltipRef.current,s.chart=e,s.position=a,s.title=i,s.labelFormat=Ia(o,cr),s.valueFormat=Ia(c),s.visibleKeys=n,s.getColor=t,this.tooltip=s}},{key:"drawChart",value:function(e){var t=this.props,n=t.data,r=t.dateParser,o=t.chartType,a=this.getMargin(),c=function(e,t){var n=sr(t),r=new Set(e.map((function(e){return e.date})));return i()(r).sort((function(e,t){return n(e)-n(t)}))}(n,r),s=this.getFormatParams(),l=this.getParams(c),u=this.getScaleParams(c),d=e.attr("id","chart").append("g").attr("transform","translate(".concat(a.left,", ").concat(a.top,")"));this.createTooltip(d.node(),l.getColor,l.visibleKeys),Ic(d,l,u,s,a,Xc()),"line"===o&&$c(d,n,l,u,s,this.tooltip),"bar"===o&&function(e,t,n,r,o,a){var i=r.yScale.range()[0],c=e.append("g").attr("class","bars").selectAll("g").data(t).enter().append("g").attr("transform",(function(e){return"translate(".concat(r.xScale(e.date),", 0)")})).attr("class","bargroup").attr("role","region").attr("aria-label",(function(e){return"item-comparison"===n.mode?o.screenReaderFormat(e.date instanceof Date?e.date:lt()(e.date).toDate()):null}));c.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",r.xGroupScale.range()[1]).attr("height",i).attr("opacity","0").on("mouseover",(function(e,n,r){a.show(t.find((function(t){return t.date===e.date})),_a.target,r[n].parentNode)})).on("mouseout",(function(){return a.hide()}));var s=r.yScale(0);c.selectAll(".bar").data((function(e){return n.visibleKeys.map((function(t){return{key:t.key,focus:t.focus,value:Object(_.get)(e,[t.key,"value"],0),label:t.label,visible:t.visible,date:e.date}}))})).enter().append("rect").attr("class","bar").attr("x",(function(e){return r.xGroupScale(e.key)})).attr("y",(function(e){return Math.min(s,r.yScale(e.value))})).attr("width",r.xGroupScale.bandwidth()).attr("height",(function(e){return Math.abs(s-r.yScale(e.value))})).attr("fill",(function(e){return n.getColor(e.key)})).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",(function(e){var r=e.label||e.key;if("time-comparison"===n.mode){var i=t.find((function(t){return t.date===e.date}));r=o.screenReaderFormat(lt()(i[e.key].labelDate).toDate())}return"".concat(r," ").concat(a.valueFormat(e.value))})).style("opacity",(function(e){var t=e.focus?1:.1;return e.visible?t:0})).on("focus",(function(e,n,r){var o=e.value>0?_a.target:_a.target.parentNode;a.show(t.find((function(t){return t.date===e.date})),o,r[n].parentNode)})).on("blur",(function(){return a.hide()}))}(d,n,l,u,s,this.tooltip)}},{key:"shouldBeCompact",value:function(){var e=this.props,t=e.data,n=e.chartType,r=e.width;if("bar"!==n)return!1;var o=this.getMargin(),a=r-o.left-o.right,i=t&&t.length?Object.keys(t[0]).length-1:0;return a1&&void 0!==arguments[1]?arguments[1]:0,n=0;n5&&l,h=n.length>5?d:n;return Object(v.createElement)("div",{className:q()("woocommerce-legend","woocommerce-legend__direction-".concat(i),{"has-total":p,"is-scrollable":u},this.props.className)},Object(v.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:p?this.updateListScroll:null},n.map((function(e){return Object(v.createElement)("li",{className:q()("woocommerce-legend__item",{"woocommerce-legend__item-checked":e.visible}),key:e.key,id:"woocommerce-legend-".concat(s,"__item__").concat(e.key),onMouseEnter:r,onMouseLeave:r,onBlur:r,onFocus:r},Object(v.createElement)("button",{role:"checkbox","aria-checked":e.visible?"true":"false",onClick:o,id:"woocommerce-legend-".concat(s,"__item-button__").concat(e.key),disabled:e.visible&&f<=1||!e.visible&&f>=5||!a,title:f>=5?Object(O.sprintf)(Object(O.__)("You may select up to %d items.","woocommerce-admin"),5):""},Object(v.createElement)("div",{className:"woocommerce-legend__item-container"},Object(v.createElement)("span",{className:q()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":e.visible}),style:e.visible?{color:Jc(h,t)(e.key)}:null}),Object(v.createElement)("span",{className:"woocommerce-legend__item-title"},e.label),Object(v.createElement)("span",{className:"woocommerce-legend__item-total"},Ia(c)(e.total)))))}))),p&&Object(v.createElement)("div",{className:"woocommerce-legend__total"},l))}}]),o}(v.Component);ns.propTypes={className:S.a.string,colorScheme:S.a.func,data:S.a.array.isRequired,handleLegendToggle:S.a.func,handleLegendHover:S.a.func,interactive:S.a.bool,legendDirection:S.a.oneOf(["row","column"]),legendValueFormat:S.a.oneOfType([S.a.string,S.a.func]),totalLabel:S.a.string,instanceId:S.a.number},ns.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};var rs=Object(Z.withInstanceId)(ns);function os(e,t){switch(t){case"left_space":return[e+" ",""];case"right":return["",e];case"right_space":return[""," "+e];case"left":default:return[e,""]}}var as=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;s()(this,o),(t=r.call(this,e)).chartBodyRef=Object(v.createRef)();var n=t.getDataKeys();return t.state={focusedKeys:[],visibleKeys:n.slice(0,5),width:0},t.prevDataKeys=n.sort(),t.handleTypeToggle=t.handleTypeToggle.bind(f()(t)),t.handleLegendToggle=t.handleLegendToggle.bind(f()(t)),t.handleLegendHover=t.handleLegendHover.bind(f()(t)),t.updateDimensions=t.updateDimensions.bind(f()(t)),t.getVisibleData=jn(t.getVisibleData),t.getOrderedKeys=jn(t.getOrderedKeys),t.setInterval=t.setInterval.bind(f()(t)),t}return u()(o,[{key:"getDataKeys",value:function(){var e=this.props,t=e.data,n=e.filterParam,r=e.mode,o=e.query;if("item-comparison"===r){var a=n?Object(P.f)(o[n]):[];return this.getOrderedKeys([],[],a).map((function(e){return e.key}))}return Aa(t)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;if(e&&e.length){var t=Aa(e).sort();if(!Object(_.isEqual)(t,this.prevDataKeys)){var n=this.getDataKeys();this.prevDataKeys=t,this.setState({visibleKeys:n.slice(0,5)})}}}},{key:"componentDidMount",value:function(){this.updateDimensions(),this.setD3DefaultFormat(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"setD3DefaultFormat",value:function(){var e=this.props.currency,t=e.symbol,n=e.symbolPosition;mn({decimal:e.decimalSeparator,thousands:e.thousandSeparator,grouping:[3],currency:os(t,n)})}},{key:"getOrderedKeys",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.props,o=r.data,a=r.legendTotals,i=r.mode;if(!o||0===o.length)return[];var c=o.reduce((function(e,t){return Object.entries(t).forEach((function(t){var n=tt()(t,2),r=n[0],o=n[1];"date"===r||e[r]||(e[r]=o.label)})),e}),{}),s=Object.entries(c).map((function(n){var r=tt()(n,2),i=r[0],c=r[1];return c=Object(Cn.sanitize)(c,{ALLOWED_TAGS:[]}),{focus:0===e.length||e.includes(i),key:i,label:c,total:a&&void 0!==a[i]?a[i]:o.reduce((function(e,t){return e+t[i].value}),0),visible:t.includes(i)}}));return"item-comparison"===i?s.sort((function(e,t){return t.total-e.total})).filter((function(e){return e.total>0||n.includes(parseInt(e.key,10))})):s}},{key:"handleTypeToggle",value:function(e){if(this.props.chartType!==e){var t=this.props,n=t.path,r=t.query;Object(P.k)({chartType:e},n,r)}}},{key:"handleLegendToggle",value:function(e){if(this.props.interactiveLegend){var t=e.currentTarget.id.split("_").pop(),n=this.state,r=n.focusedKeys,o=n.visibleKeys;o.includes(t)?this.setState({focusedKeys:Object(_.without)(r,t),visibleKeys:Object(_.without)(o,t)}):this.setState({focusedKeys:r.concat([t]),visibleKeys:o.concat([t])})}}},{key:"handleLegendHover",value:function(e){if("mouseleave"===e.type||"blur"===e.type)this.setState({focusedKeys:[]});else if("mouseenter"===e.type||"focus"===e.type){var t=e.currentTarget.id.split("__").pop();this.setState({focusedKeys:[t]})}}},{key:"updateDimensions",value:function(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function(e,t){var n=t.filter((function(e){return e.visible}));return e.map((function(e){var t={date:e.date};return n.forEach((function(n){t[n.key]=e[n.key]})),t}))}},{key:"setInterval",value:function(e){var t=this.props,n=t.path,r=t.query;Object(P.k)({interval:e},n,r)}},{key:"renderIntervalSelector",value:function(){var e=this.props,t=e.interval,n=e.allowedIntervals;if(!n||n.length<1)return null;var r={hour:Object(O.__)("By hour","woocommerce-admin"),day:Object(O.__)("By day","woocommerce-admin"),week:Object(O.__)("By week","woocommerce-admin"),month:Object(O.__)("By month","woocommerce-admin"),quarter:Object(O.__)("By quarter","woocommerce-admin"),year:Object(O.__)("By year","woocommerce-admin")};return Object(v.createElement)(w.SelectControl,{className:"woocommerce-chart__interval-select",value:t,options:n.map((function(e){return{value:e,label:r[e]}})),onChange:this.setInterval})}},{key:"getChartHeight",value:function(){var e=this.props,t=e.isViewportLarge;return e.isViewportMobile?180:t?300:220}},{key:"getLegendPosition",value:function(){var e=this.props,t=e.legendPosition,n=e.mode,r=e.isViewportWide;return t||(r&&"time-comparison"===n?"top":r&&"item-comparison"===n?"side":"bottom")}},{key:"render",value:function(){var e=this.state,t=e.focusedKeys,n=e.visibleKeys,r=e.width,o=this.props,a=o.baseValue,i=o.chartType,c=o.data,s=o.dateParser,l=o.emptyMessage,u=o.filterParam,d=o.interactiveLegend,f=o.interval,p=o.isRequesting,h=o.isViewportLarge,m=o.itemsLabel,y=o.mode,b=o.query,g=o.screenReaderFormat,k=o.showHeaderControls,S=o.title,j=o.tooltipLabelFormat,E=o.tooltipValueFormat,C=o.tooltipTitle,D=o.valueType,x=o.xFormat,F=o.x2Format,T=o.yBelow1Format,M=o.yFormat,R=u?Object(P.f)(b[u]):[],I=this.getOrderedKeys(t,n,R),A=p?null:this.getVisibleData(c,I),N=this.getLegendPosition(),L="top"===N?"row":"column",U="side"===N?"row":"column",B=this.getChartHeight(),H=p?null:Object(v.createElement)(rs,{colorScheme:kn,data:I,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:d,legendDirection:L,legendValueFormat:E,totalLabel:Object(O.sprintf)(m,I.length)}),z=M,V=T;if(!M)switch(D){case"average":z=",.0f";break;case"currency":z="$.3~s",V="$.3~f";break;case"number":z=",.0f"}return Object(v.createElement)("div",{className:"woocommerce-chart"},k&&Object(v.createElement)("div",{className:"woocommerce-chart__header"},Object(v.createElement)(pt,{className:"woocommerce-chart__title"},S),"top"===N&&H,this.renderIntervalSelector(),Object(v.createElement)(w.NavigableMenu,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(v.createElement)(w.Button,{className:q()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===i}),title:Object(O.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===i,role:"menuitemradio",tabIndex:"line"===i?0:-1,onClick:Object(_.partial)(this.handleTypeToggle,"line")},Object(v.createElement)(bn.a,null)),Object(v.createElement)(w.Button,{className:q()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===i}),title:Object(O.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===i,role:"menuitemradio",tabIndex:"bar"===i?0:-1,onClick:Object(_.partial)(this.handleTypeToggle,"bar")},Object(v.createElement)(vn.a,null)))),Object(v.createElement)(ht,{component:!1},Object(v.createElement)("div",{className:q()("woocommerce-chart__body","woocommerce-chart__body-".concat(U)),ref:this.chartBodyRef},"side"===N&&H,p&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{className:"screen-reader-text"},Object(O.__)("Your requested data is loading","woocommerce-admin")),Object(v.createElement)(Pn,{height:B})),!p&&r>0&&Object(v.createElement)(ts,{baseValue:a,chartType:i,colorScheme:kn,data:A,dateParser:s,height:B,emptyMessage:l,interval:f,margin:{bottom:50,left:80,right:30,top:0},mode:y,orderedKeys:I,screenReaderFormat:g,tooltipLabelFormat:j,tooltipValueFormat:E,tooltipPosition:h?"over":"below",tooltipTitle:C,valueType:D,width:"row"===U?r-320:r,xFormat:x,x2Format:F,yBelow1Format:V,yFormat:z})),"bottom"===N&&Object(v.createElement)("div",{className:"woocommerce-chart__footer"},H)))}}]),o}(v.Component);as.propTypes={allowedIntervals:S.a.array,baseValue:S.a.number,chartType:S.a.oneOf(["bar","line"]),data:S.a.array.isRequired,dateParser:S.a.string.isRequired,emptyMessage:S.a.string,filterParam:S.a.string,itemsLabel:S.a.string,mode:S.a.oneOf(["item-comparison","time-comparison"]),path:S.a.string,query:S.a.object,interactiveLegend:S.a.bool,interval:S.a.oneOf(["hour","day","week","month","quarter","year"]),intervalData:S.a.object,isRequesting:S.a.bool,legendPosition:S.a.oneOf(["bottom","side","top"]),legendTotals:S.a.object,screenReaderFormat:S.a.oneOfType([S.a.string,S.a.func]),showHeaderControls:S.a.bool,title:S.a.string,tooltipLabelFormat:S.a.oneOfType([S.a.string,S.a.func]),tooltipValueFormat:S.a.oneOfType([S.a.string,S.a.func]),tooltipTitle:S.a.string,valueType:S.a.string,xFormat:S.a.string,x2Format:S.a.string,yBelow1Format:S.a.string,yFormat:S.a.string,currency:S.a.object},as.defaultProps={baseValue:0,chartType:"line",data:[],dateParser:"%Y-%m-%dT%H:%M:%S",interactiveLegend:!0,interval:"day",isRequesting:!1,mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",showHeaderControls:!0,tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",xFormat:"%d",x2Format:"%b %Y",currency:{symbol:"$",symbolPosition:"left",decimalSeparator:".",thousandSeparator:","}},Object(En.withViewportMatch)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(as);var is=n(51),cs=n.n(is),ss=Object(v.createElement)(de.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(de.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"}));var ls=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.renderContent;return n?Object(v.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(v.createElement)(w.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var n=e.onToggle,r=e.isOpen,o=q()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(v.createElement)(w.Button,{className:o,onClick:n,icon:"ellipsis",title:t,"aria-expanded":r},Object(v.createElement)(ue,{icon:ss}))},renderContent:function(e){return Object(v.createElement)(w.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},n(e))}})):null}}]),o}(v.Component);ls.propTypes={label:S.a.string.isRequired,renderContent:S.a.func};var us=ls;function ds(e){return function(t,n,r){if(t[n])return t[n].type&&t[n].type===e?void 0:new Error("Invalid ".concat(n," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}(function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){var e;return s()(this,o),e=r.call(this),cs()("Card",{version:"5.2.0",alternative:"@wordpress/components Card",plugin:"WooCommerce",hint:'Use `import { Card } from "@wordpress/components"`'}),e}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.action,n=e.children,r=e.description,o=e.isInactive,a=e.menu,i=e.title,c=q()("woocommerce-card",this.props.className,{"has-menu":!!a,"has-action":!!t,"is-inactive":!!o});return Object(v.createElement)("div",{className:c},i&&Object(v.createElement)("div",{className:"woocommerce-card__header"},Object(v.createElement)("div",{className:"woocommerce-card__title-wrapper"},Object(v.createElement)(pt,{className:"woocommerce-card__title woocommerce-card__header-item"},i),r&&Object(v.createElement)(pt,{className:"woocommerce-card__description woocommerce-card__header-item"},r)),t&&Object(v.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),a&&Object(v.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},a)),Object(v.createElement)(ht,{className:"woocommerce-card__body"},n))}}]),o}(v.Component)).propTypes={action:S.a.node,className:S.a.string,description:S.a.oneOfType([S.a.string,S.a.node]),isInactive:S.a.bool,menu:ds(us),title:S.a.oneOfType([S.a.string,S.a.node])};var fs=function(e){var t=e.count,n=e.label;return n||(n=Object(O.sprintf)(Object(O.__)("Total %d","woocommerce-admin"),t)),Object(v.createElement)("span",{className:"woocommerce-count","aria-label":n},t)};fs.propTypes={count:S.a.number.isRequired,label:S.a.string},fs.defaultProps={label:""};var ps=function(e){var t=e.className,n=e.count,r=e.children,o=e.disabled,a=e.helpText,i=e.onClick;return!o&&n<2?Object(v.createElement)(w.Tooltip,{text:a},Object(v.createElement)("span",{className:t},Object(v.createElement)(w.Button,{className:"woocommerce-compare-button",disabled:!0,isSecondary:!0},r))):Object(v.createElement)(w.Button,{className:q()("woocommerce-compare-button",t),onClick:i,disabled:o,isSecondary:!0},r)};ps.propTypes={className:S.a.string,count:S.a.number.isRequired,children:S.a.node.isRequired,helpText:S.a.string.isRequired,onClick:S.a.func.isRequired,disabled:S.a.bool};var hs=ps;var ms=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(e){var t,n=e.getLabels,o=e.param,i=e.query;return s()(this,a),(t=r.apply(this,arguments)).state={selected:[]},t.clearQuery=t.clearQuery.bind(f()(t)),t.updateQuery=t.updateQuery.bind(f()(t)),t.updateLabels=t.updateLabels.bind(f()(t)),t.onButtonClicked=t.onButtonClicked.bind(f()(t)),i[o]&&n(i[o],i).then(t.updateLabels),t}return u()(a,[{key:"componentDidUpdate",value:function(e,t){var n=e.param,r=e.query,o=t.selected,a=this.props,i=a.getLabels,c=a.param,s=a.query,l=this.state.selected;if(n!==c||o.length>0&&0===l.length)this.clearQuery();else{var u=Object(P.f)(r[c]),d=Object(P.f)(s[c]);Object(_.isEqual)(u.sort(),d.sort())||i(s[c],s).then(this.updateLabels)}}},{key:"clearQuery",value:function(){var e=this.props,t=e.param,n=e.path,r=e.query;this.setState({selected:[]}),Object(P.k)(o()({},t,void 0),n,r)}},{key:"updateLabels",value:function(e){this.setState({selected:e})}},{key:"updateQuery",value:function(){var e=this.props,t=e.param,n=e.path,r=e.query,a=this.state.selected.map((function(e){return e.key}));Object(P.k)(o()({},t,a.join(",")),n,r)}},{key:"onButtonClicked",value:function(e){this.updateQuery(e),Object(_.isFunction)(this.props.onClick)&&this.props.onClick(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.labels,r=t.type,o=t.autocompleter,a=this.state.selected;return Object(v.createElement)(w.Card,{className:"woocommerce-filters__compare"},Object(v.createElement)(w.CardHeader,null,Object(v.createElement)(x,{variant:"subtitle.small"},n.title)),Object(v.createElement)(w.CardBody,null,Object(v.createElement)($e,{autocompleter:o,type:r,selected:a,placeholder:n.placeholder,onChange:function(t){e.setState({selected:t})}})),Object(v.createElement)(w.CardFooter,{justify:"flex-start"},Object(v.createElement)(hs,{count:a.length,helpText:n.helpText,onClick:this.onButtonClicked},n.update),a.length>0&&Object(v.createElement)(w.Button,{isLink:!0,onClick:this.clearQuery},Object(O.__)("Clear all","woocommerce-admin"))))}}]),a}(v.Component);ms.propTypes={getLabels:S.a.func.isRequired,labels:S.a.shape({placeholder:S.a.string,title:S.a.string,update:S.a.string}),param:S.a.string.isRequired,path:S.a.string.isRequired,query:S.a.object,type:S.a.string.isRequired,autocompleter:S.a.object},ms.defaultProps={labels:{},query:{}};var ys=n(89),bs=function(e){var t=e.date,n=e.machineFormat,r=e.screenReaderFormat,o=e.visibleFormat;return Object(v.createElement)("time",{dateTime:Object(ys.format)(n,t)},Object(v.createElement)("span",{"aria-hidden":"true"},Object(ys.format)(o,t)),Object(v.createElement)("span",{className:"screen-reader-text"},Object(ys.format)(r,t)))};bs.propTypes={date:S.a.oneOfType([S.a.string,S.a.object]).isRequired,machineFormat:S.a.string,screenReaderFormat:S.a.string,visibleFormat:S.a.string},bs.defaultProps={machineFormat:"Y-m-d H:i:s",screenReaderFormat:"F j, Y",visibleFormat:"Y-m-d"};var gs=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(){return s()(this,a),r.apply(this,arguments)}return u()(a,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.options,r=e.selected,a=e.onSelect,i=e.name,c=e.legend;return Object(v.createElement)("fieldset",{className:"woocommerce-segmented-selection"},Object(v.createElement)("legend",{className:"screen-reader-text"},c),Object(v.createElement)("div",{className:q()(t,"woocommerce-segmented-selection__container")},n.map((function(e){var t=e.value,n=e.label;if(!t||!n)return null;var c=Object(_.uniqueId)("".concat(t,"_"));return Object(v.createElement)("div",{className:"woocommerce-segmented-selection__item",key:t},Object(v.createElement)("input",{className:"woocommerce-segmented-selection__input",type:"radio",name:i,id:c,checked:r===t,onChange:Object(_.partial)(a,o()({},i,t))}),Object(v.createElement)("label",{htmlFor:c},Object(v.createElement)("span",{className:"woocommerce-segmented-selection__label"},n)))}))))}}]),a}(v.Component);gs.propTypes={className:S.a.string,options:S.a.arrayOf(S.a.shape({value:S.a.string.isRequired,label:S.a.string.isRequired})).isRequired,selected:S.a.string,onSelect:S.a.func.isRequired,name:S.a.string.isRequired,legend:S.a.string.isRequired};var vs=gs;var Os=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.onSelect,n=e.compare;return Object(v.createElement)(vs,{options:ct.g,selected:n,onSelect:t,name:"compare",legend:Object(O.__)("compare to","woocommerce-admin")})}}]),o}(v.Component);Os.propTypes={onSelect:S.a.func.isRequired,compare:S.a.string};var ws=Os,_s=n(511),ks={calendarLabel:Object(O.__)("Calendar","woocommerce-admin"),closeDatePicker:Object(O.__)("Close","woocommerce-admin"),focusStartDate:Object(O.__)("Interact with the calendar and select start and end dates.","woocommerce-admin"),clearDate:Object(O.__)("Clear Date","woocommerce-admin"),clearDates:Object(O.__)("Clear Dates","woocommerce-admin"),jumpToPrevMonth:Object(O.__)("Move backward to switch to the previous month.","woocommerce-admin"),jumpToNextMonth:Object(O.__)("Move forward to switch to the next month.","woocommerce-admin"),enterKey:Object(O.__)("Enter key","woocommerce-admin"),leftArrowRightArrow:Object(O.__)("Right and left arrow keys","woocommerce-admin"),upArrowDownArrow:Object(O.__)("up and down arrow keys","woocommerce-admin"),pageUpPageDown:Object(O.__)("page up and page down keys","woocommerce-admin"),homeEnd:Object(O.__)("Home and end keys","woocommerce-admin"),escape:Object(O.__)("Escape key","woocommerce-admin"),questionMark:Object(O.__)("Question mark","woocommerce-admin"),selectFocusedDate:Object(O.__)("Select the date in focus.","woocommerce-admin"),moveFocusByOneDay:Object(O.__)("Move backward (left) and forward (right) by one day.","woocommerce-admin"),moveFocusByOneWeek:Object(O.__)("Move backward (up) and forward (down) by one week.","woocommerce-admin"),moveFocusByOneMonth:Object(O.__)("Switch months.","woocommerce-admin"),moveFocustoStartAndEndOfWeek:Object(O.__)("Go to the first or last day of a week.","woocommerce-admin"),returnFocusToInput:Object(O.__)("Return to the date input field.","woocommerce-admin"),keyboardNavigationInstructions:Object(O.__)("Press the down arrow key to interact with the calendar and select a date.","woocommerce-admin"),chooseAvailableStartDate:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("Select %s as a start date.","woocommerce-admin"),t)},chooseAvailableEndDate:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("Select %s as an end date.","woocommerce-admin"),t)},chooseAvailableDate:function(e){return e.date},dateIsUnavailable:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("%s is not selectable.","woocommerce-admin"),t)},dateIsSelected:function(e){var t=e.date;return Object(O.sprintf)(Object(O.__)("Selected. %s","woocommerce-admin"),t)}};var Ss=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(e){var t;return s()(this,a),(t=r.call(this,e)).onDatesChange=t.onDatesChange.bind(f()(t)),t.onFocusChange=t.onFocusChange.bind(f()(t)),t.onInputChange=t.onInputChange.bind(f()(t)),t.nodeRef=Object(v.createRef)(),t.keepFocusInside=t.keepFocusInside.bind(f()(t)),t}return u()(a,[{key:"keepFocusInside",value:function(e,t){if(this.nodeRef.current){var n=this.props.losesFocusTo;if("container"!==e||!t.target||!t.target.classList.contains("DayPickerNavigation_button")&&!t.target.classList.contains("CalendarDay")||t.relatedTarget&&(t.relatedTarget.classList.contains("DayPickerNavigation_button")||t.relatedTarget.classList.contains("CalendarDay"))){if("onPrevMonthClick"===e||"onNextMonthClick"===e){var r=this.nodeRef.current.querySelector(".DayPickerNavigation_button");r&&r.focus()}}else{if(t.relatedTarget&&(t.relatedTarget.classList.contains("DayPickerNavigation_button")||t.relatedTarget.classList.contains("CalendarDay")))return;if(t.relatedTarget&&n&&n.contains(t.relatedTarget))return;var o=this.nodeRef.current.querySelector(".DayPicker_focusRegion");o&&o.focus()}}}},{key:"onDatesChange",value:function(e){var t=e.startDate,n=e.endDate,r=this.props,o=r.onUpdate,a=r.shortDateFormat;o({after:t,before:n,afterText:t?t.format(a):"",beforeText:n?n.format(a):"",afterError:null,beforeError:null})}},{key:"onFocusChange",value:function(e){this.props.onUpdate({focusedInput:e||"startDate"})}},{key:"onInputChange",value:function(e,t){var n,r=t.target.value,a=this.props,i=a.after,c=a.before,s=a.shortDateFormat,l=Object(ct.j)(e,r,c,i,s),u=l.date,d=l.error;this.props.onUpdate((n={},o()(n,e,u),o()(n,e+"Text",r),o()(n,e+"Error",r.length>0?d:null),n))}},{key:"setTnitialVisibleMonth",value:function(e,t){return function(){var n=t||lt()();return e?n.clone().subtract(1,"month"):n}}},{key:"render",value:function(){var e=this,t=this.props,n=t.after,r=t.before,o=t.focusedInput,a=t.afterText,i=t.beforeText,c=t.afterError,s=t.beforeError,l=t.shortDateFormat,u=t.isViewportMobile,d=t.isViewportSmall,f=t.isInvalidDate,p=u&&!d;return Object(v.createElement)("div",{className:q()("woocommerce-calendar",{"is-mobile":u})},Object(v.createElement)("div",{className:"woocommerce-calendar__inputs"},Object(v.createElement)(dt,{value:a,onChange:Object(_.partial)(this.onInputChange,"after"),dateFormat:l,label:Object(O.__)("Start Date","woocommerce-admin"),error:c,describedBy:Object(O.sprintf)(Object(O.__)("Date input describing a selected date range's start date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("startDate")}}),Object(v.createElement)("div",{className:"woocommerce-calendar__inputs-to"},Object(O.__)("to","woocommerce-admin")),Object(v.createElement)(dt,{value:i,onChange:Object(_.partial)(this.onInputChange,"before"),dateFormat:l,label:Object(O.__)("End Date","woocommerce-admin"),error:s,describedBy:Object(O.sprintf)(Object(O.__)("Date input describing a selected date range's end date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("endDate")}})),Object(v.createElement)("div",{className:"woocommerce-calendar__react-dates",ref:this.nodeRef,onBlur:Object(_.partial)(this.keepFocusInside,"container"),tabIndex:-1},Object(v.createElement)(_s.DayPickerRangeController,{onNextMonthClick:Object(_.partial)(this.keepFocusInside,"onNextMonthClick"),onPrevMonthClick:Object(_.partial)(this.keepFocusInside,"onPrevMonthClick"),onDatesChange:this.onDatesChange,onFocusChange:this.onFocusChange,focusedInput:o,startDate:n,endDate:r,orientation:"horizontal",numberOfMonths:p?2:1,isOutsideRange:function(e){return f&&f(e.toDate())},minimumNights:0,hideKeyboardShortcutsPanel:!0,noBorder:!0,isRTL:"rtl"===document.documentElement.dir,initialVisibleMonth:this.setTnitialVisibleMonth(p,r),phrases:ks})))}}]),a}(v.Component);Ss.propTypes={after:S.a.object,afterError:S.a.string,afterText:S.a.string,before:S.a.object,beforeError:S.a.string,beforeText:S.a.string,focusedInput:S.a.string,isInvalidDate:S.a.func,onUpdate:S.a.func.isRequired,shortDateFormat:S.a.string.isRequired,losesFocusTo:S.a.instanceOf(Element)};var js=Object(En.withViewportMatch)({isViewportMobile:"< medium",isViewportSmall:"< small"})(Ss);var Es=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.onSelect,n=e.period;return Object(v.createElement)(vs,{options:Object(_.filter)(ct.h,(function(e){return"custom"!==e.value})),selected:n,onSelect:t,name:"period",legend:Object(O.__)("select a preset period","woocommerce-admin")})}}]),o}(v.Component);Es.propTypes={onSelect:S.a.func.isRequired,period:S.a.string};var Cs=Es;var Ds=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){var e;return s()(this,o),(e=r.call(this)).onTabSelect=e.onTabSelect.bind(f()(e)),e.controlsRef=Object(v.createRef)(),e}return u()(o,[{key:"onTabSelect",value:function(e){var t=this.props,n=t.onUpdate,r=t.period;"period"===e&&"custom"===r&&n({period:"today"})}},{key:"isFutureDate",value:function(e){return lt()().isBefore(lt()(e),"day")}},{key:"render",value:function(){var e=this,t=this.props,n=t.period,r=t.compare,o=t.after,a=t.before,i=t.onUpdate,c=t.onClose,s=t.onSelect,l=t.isValidSelection,u=t.resetCustomValues,d=t.focusedInput,f=t.afterText,p=t.beforeText,h=t.afterError,m=t.beforeError,y=t.shortDateFormat;return Object(v.createElement)("div",null,Object(v.createElement)(pt,{className:"screen-reader-text",tabIndex:"0"},Object(O.__)("Select date range and comparison","woocommerce-admin")),Object(v.createElement)(ht,{component:!1},Object(v.createElement)(pt,{className:"woocommerce-filters-date__text"},Object(O.__)("select a date range","woocommerce-admin")),Object(v.createElement)(w.TabPanel,{tabs:[{name:"period",title:Object(O.__)("Presets","woocommerce-admin"),className:"woocommerce-filters-date__tab"},{name:"custom",title:Object(O.__)("Custom","woocommerce-admin"),className:"woocommerce-filters-date__tab"}],className:"woocommerce-filters-date__tabs",activeClass:"is-active",initialTabName:"custom"===n?"custom":"period",onSelect:this.onTabSelect},(function(t){return Object(v.createElement)(v.Fragment,null,"period"===t.name&&Object(v.createElement)(Cs,{onSelect:i,period:n}),"custom"===t.name&&Object(v.createElement)(js,{after:o,before:a,onUpdate:i,isInvalidDate:e.isFutureDate,focusedInput:d,afterText:f,beforeText:p,afterError:h,beforeError:m,shortDateFormat:y,losesFocusTo:e.controlsRef.current}),Object(v.createElement)("div",{className:q()("woocommerce-filters-date__content-controls",{"is-custom":"custom"===t.name}),ref:e.controlsRef},Object(v.createElement)(pt,{className:"woocommerce-filters-date__text"},Object(O.__)("compare to","woocommerce-admin")),Object(v.createElement)(ws,{onSelect:i,compare:r}),Object(v.createElement)("div",{className:"woocommerce-filters-date__button-group"},"custom"===t.name&&Object(v.createElement)(w.Button,{className:"woocommerce-filters-date__button",isSecondary:!0,onClick:u,disabled:!(o||a)},Object(O.__)("Reset","woocommerce-admin")),l(t.name)?Object(v.createElement)(w.Button,{className:"woocommerce-filters-date__button",onClick:s(t.name,c),isPrimary:!0},Object(O.__)("Update","woocommerce-admin")):Object(v.createElement)(w.Button,{className:"woocommerce-filters-date__button",isPrimary:!0,disabled:!0},Object(O.__)("Update","woocommerce-admin")))))}))))}}]),o}(v.Component);Ds.propTypes={period:S.a.string.isRequired,compare:S.a.string.isRequired,onUpdate:S.a.func.isRequired,onClose:S.a.func.isRequired,onSelect:S.a.func.isRequired,resetCustomValues:S.a.func.isRequired,focusedInput:S.a.string,afterText:S.a.string,beforeText:S.a.string,afterError:S.a.string,beforeError:S.a.string,shortDateFormat:S.a.string.isRequired};var Ps=Ds,xs=function(e){var t=e.labels,n=e.isOpen,r=R()(e,["labels","isOpen"]),o=q()("woocommerce-dropdown-button",{"is-open":n,"is-multi-line":t.length>1});return Object(v.createElement)(w.Button,T()({className:o,"aria-expanded":n},r),Object(v.createElement)("div",{className:"woocommerce-dropdown-button__labels"},t.map((function(e,t){return Object(v.createElement)("span",{key:t},Object(ne.decodeEntities)(e))}))))};xs.propTypes={labels:S.a.array.isRequired,isOpen:S.a.bool};var Fs=xs;var Ts=Object(O.__)("MM/DD/YYYY","woocommerce-admin"),Ms=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state=t.getResetState(),t.update=t.update.bind(f()(t)),t.onSelect=t.onSelect.bind(f()(t)),t.isValidSelection=t.isValidSelection.bind(f()(t)),t.resetCustomValues=t.resetCustomValues.bind(f()(t)),t}return u()(o,[{key:"formatDate",value:function(e,t){return e&&e._isAMomentObject&&"function"==typeof e.format?e.format(t):""}},{key:"getResetState",value:function(){var e=this.props.dateQuery,t=e.period,n=e.compare,r=e.before,o=e.after;return{period:t,compare:n,before:r,after:o,focusedInput:"startDate",afterText:this.formatDate(o,Ts),beforeText:this.formatDate(r,Ts),afterError:null,beforeError:null}}},{key:"update",value:function(e){this.setState(e)}},{key:"onSelect",value:function(e,t){var n=this,r=this.props,o=r.isoDateFormat,a=r.onRangeSelect;return function(r){var i=n.state,c=i.period,s=i.compare,l=i.after,u=i.before,d={period:"custom"===e?"custom":c,compare:s};"custom"===e?(d.after=n.formatDate(l,o),d.before=n.formatDate(u,o)):(d.after=void 0,d.before=void 0),a(d),t(r)}}},{key:"getButtonLabel",value:function(){var e=this.props.dateQuery,t=e.primaryDate,n=e.secondaryDate;return["".concat(t.label," (").concat(t.range,")"),"".concat(Object(O.__)("vs.","woocommerce-admin")," ").concat(n.label," (").concat(n.range,")")]}},{key:"isValidSelection",value:function(e){var t=this.state,n=t.compare,r=t.after,o=t.before;return"custom"!==e||n&&r&&o}},{key:"resetCustomValues",value:function(){this.setState({after:null,before:null,focusedInput:"startDate",afterText:"",beforeText:"",afterError:null,beforeError:null})}},{key:"render",value:function(){var e=this,t=this.state,n=t.period,r=t.compare,o=t.after,a=t.before,i=t.focusedInput,c=t.afterText,s=t.beforeText,l=t.afterError,u=t.beforeError,d=this.props.isViewportMobile,f=q()("woocommerce-filters-date__content",{"is-mobile":d});return Object(v.createElement)("div",{className:"woocommerce-filters-filter"},Object(v.createElement)("span",{className:"woocommerce-filters-label"},Object(O.__)("Date Range","woocommerce-admin"),":"),Object(v.createElement)(w.Dropdown,{contentClassName:f,position:"bottom",expandOnMobile:!0,renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(v.createElement)(Fs,{onClick:r,isOpen:n,labels:e.getButtonLabel()})},renderContent:function(t){var d=t.onClose;return Object(v.createElement)(Ps,{period:n,compare:r,after:o,before:a,onUpdate:e.update,onClose:d,onSelect:e.onSelect,isValidSelection:e.isValidSelection,resetCustomValues:e.resetCustomValues,focusedInput:i,afterText:c,beforeText:s,afterError:l,beforeError:u,shortDateFormat:Ts})}}))}}]),o}(v.Component);Ms.propTypes={onRangeSelect:S.a.func.isRequired,dateQuery:S.a.shape({period:S.a.string.isRequired,compare:S.a.string.isRequired,before:S.a.object,after:S.a.object,primaryDate:S.a.shape({label:S.a.string.isRequired,range:S.a.string.isRequired}).isRequired,secondaryDate:S.a.shape({label:S.a.string.isRequired,range:S.a.string.isRequired}).isRequired}).isRequired};var Rs=Object(En.withViewportMatch)({isViewportMobile:"< medium"})(Ms);var Is=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"renderIllustration",value:function(){var e=this.props,t=e.illustrationWidth,n=e.illustrationHeight,r=e.illustration;return Object(v.createElement)("img",{alt:"",src:r,width:t,height:n,className:"woocommerce-empty-content__illustration"})}},{key:"renderActionButtons",value:function(e){var t="secondary"===e?this.props.secondaryActionLabel:this.props.actionLabel,n="secondary"===e?this.props.secondaryActionURL:this.props.actionURL,r="secondary"===e?this.props.secondaryActionCallback:this.props.actionCallback,o="secondary"!==e;return n&&r?Object(v.createElement)(w.Button,{className:"woocommerce-empty-content__action",isPrimary:o,onClick:r,href:n},t):n?Object(v.createElement)(w.Button,{className:"woocommerce-empty-content__action",isPrimary:o,href:n},t):r?Object(v.createElement)(w.Button,{className:"woocommerce-empty-content__action",isPrimary:o,onClick:r},t):null}},{key:"renderActions",value:function(){var e=this.props,t=e.actionLabel,n=e.secondaryActionLabel;return Object(v.createElement)("div",{className:"woocommerce-empty-content__actions"},t&&this.renderActionButtons("primary"),n&&this.renderActionButtons("secondary"))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.title,r=e.message,o=e.illustration;return Object(v.createElement)("div",{className:q()("woocommerce-empty-content",t)},o&&this.renderIllustration(),n?Object(v.createElement)(pt,{className:"woocommerce-empty-content__title"},n):null,r?Object(v.createElement)("p",{className:"woocommerce-empty-content__message"},r):null,this.renderActions())}}]),o}(v.Component);function As(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 Ns(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:function(){},t=this.state.values,n=this.props.validate(t);this.setState({errors:n},e)}},{key:"setValue",value:function(e,t){var n=this;this.setState((function(n){return{values:Ns(Ns({},n.values),{},o()({},e,t))}}),(function(){n.validate((function(){n.props.onChangeCallback({name:e,value:t},n.state.values,!Object.keys(n.state.errors||{}).length)}))}))}},{key:"setTouched",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.setState((function(n){return{touched:Ns(Ns({},n.touched),{},o()({},e,t))}}))}},{key:"handleChange",value:function(e,t){var n=this.state.values;t.target?"checkbox"===t.target.type?this.setValue(e,!n[e]):this.setValue(e,t.target.value):this.setValue(e,t)}},{key:"handleBlur",value:function(e){this.setTouched(e)}},{key:"handleSubmit",value:(t=G()(J.a.mark((function e(){var t,n;return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.values,n={},Object.keys(t).map((function(e){return n[e]=!0})),this.setState({touched:n}),e.next=6,this.isValidForm();case 6:if(!e.sent){e.next=8;break}this.props.onSubmitCallback(t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getInputProps",value:function(e){var t=this,n=this.state,r=n.errors,o=n.touched,a=n.values;return{value:a[e],checked:Boolean(a[e]),selected:a[e],onChange:function(n){return t.handleChange(e,n)},onBlur:function(){return t.handleBlur(e)},className:o[e]&&r[e]?"has-error":null,help:o[e]?r[e]:null}}},{key:"getStateAndHelpers",value:function(){var e=this.state,t=e.values,n=e.errors;return{values:t,errors:n,touched:e.touched,setTouched:this.setTouched,setValue:this.setValue,handleSubmit:this.handleSubmit,getInputProps:this.getInputProps,isValidForm:!Object.keys(n).length}}},{key:"render",value:function(){var e=this.props.children(this.getStateAndHelpers());return Object(v.cloneElement)(e)}}]),c}(v.Component);Ls.propTypes={children:S.a.any,errors:S.a.object,initialValues:S.a.object.isRequired,onSubmitCallback:S.a.func,onChangeCallback:S.a.func,validate:S.a.func},Ls.defaultProps={errors:{},initialValues:{},onSubmitCallback:function(){},onChangeCallback:function(){},touched:{},validate:function(){}};var Us=Ls,Bs=n(61),Hs=Object(v.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(de.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));function qs(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 zs(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=this.props,r=n.path,a=n.query,i=n.config,c=n.onFilterSelect,s=Object(P.h)(a),l=zs(o()({},i.param,(i.defaultValue||"all")===e?void 0:e),t);i.staticParams.forEach((function(e){l[e]=a[e]})),Object(P.k)(l,r,s),c(l)}},{key:"onTagChange",value:function(e,t,n,r){var a=Object(_.last)(r),i=e.value,c=e.settings.param;a?(this.update(i,o()({},c,a.key)),t()):this.update(n.defaultValue||"all"),this.updateSelectedTag([a])}},{key:"renderButton",value:function(e,t,n){var r=this;if(e.component){var o=e.settings,a=o.type,i=o.labels,c=o.autocompleter,s=this.getFilter().value===e.value?this.state.selectedTag:null;return Object(v.createElement)($e,{autocompleter:c,className:"woocommerce-filters-filter__search",type:a,placeholder:i.placeholder,selected:s?[s]:[],onChange:Object(_.partial)(this.onTagChange,e,t,n),inlineTags:!0,staticResults:!0})}var l=Object(_.partial)(this.selectSubFilter,e.value),u=this.getFilter(),d=u.value===e.value||u.path&&Object(_.includes)(u.path,e.value);return Object(v.createElement)(w.Button,{className:"woocommerce-filters-filter__button",onClick:function(n){d?t(n):e.subFilters?l(n):function(n){t(n),r.update(e.value,e.query||{}),r.setState({selectedTag:null})}(n)}},e.label)}},{key:"onContentMount",value:function(e){var t=this.state.nav,n=t.length&&this.getFilter(t[t.length-1])?1:0,r=Bs.focus.tabbable.find(e)[n];setTimeout((function(){r.focus()}),0)}},{key:"render",value:function(){var e=this,t=this.props.config,n=this.state,r=n.nav,o=n.animate,a=this.getVisibleFilters(t.filters,r),i=!!r.length&&this.getFilter(r[r.length-1]),c=this.getFilter();return Object(v.createElement)("div",{className:"woocommerce-filters-filter"},t.label&&Object(v.createElement)("span",{className:"woocommerce-filters-label"},t.label,":"),Object(v.createElement)(w.Dropdown,{contentClassName:"woocommerce-filters-filter__content",position:"bottom",expandOnMobile:!0,headerTitle:Object(O.__)("filter report to show:","woocommerce-admin"),renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(v.createElement)(Fs,{onClick:r,isOpen:n,labels:e.getButtonLabel(c)})},renderContent:function(n){var s=n.onClose;return Object(v.createElement)(Xt,{animationKey:r,animate:o,onExited:e.onContentMount},(function(){return Object(v.createElement)("ul",{className:"woocommerce-filters-filter__content-list"},i&&Object(v.createElement)("li",{className:"woocommerce-filters-filter__content-list-item"},Object(v.createElement)(w.Button,{className:"woocommerce-filters-filter__button",onClick:e.goBack},Object(v.createElement)(ue,{icon:Hs}),i.label)),a.map((function(n){return Object(v.createElement)("li",{key:n.value,className:q()("woocommerce-filters-filter__content-list-item",{"is-selected":c.value===n.value||c.path&&Object(_.includes)(c.path,n.value)})},e.renderButton(n,s,t))})))}))}}))}}]),a}(v.Component);Vs.propTypes={config:S.a.shape({label:S.a.string,staticParams:S.a.array.isRequired,param:S.a.string.isRequired,defaultValue:S.a.string,showFilters:S.a.func.isRequired,filters:S.a.arrayOf(S.a.shape({chartMode:S.a.oneOf(["item-comparison","time-comparison"]),component:S.a.string,label:S.a.string,path:S.a.string,subFilters:S.a.array,value:S.a.string.isRequired}))}).isRequired,path:S.a.string.isRequired,query:S.a.object,onFilterSelect:S.a.func},Vs.defaultProps={query:{},onFilterSelect:function(){}};var Ks=Vs,Ws=n(164),Gs=n(358),Ys=n.n(Gs),$s=n(280),Qs=n.n($s),Js=function(e){var t,n,r,o,a=e.alt,i=e.title,c=e.size,s=e.user,l=e.className,u=q()("woocommerce-gravatar",l,{"is-placeholder":!s}),d=a||s&&(s.display_name||s.name)||"",f="https://www.gravatar.com/avatar/0?s="+c+"&d=mp";return s&&(t=Object(_.isString)(s)?(o=s,"https://www.gravatar.com/avatar/"+Qs()(o)):s.avatar_URLs[96],n=Ys.a.parse(t),(r=Object(Ws.parse)(n.query)).s=c,r.d="mp",n.search=Object(Ws.stringify)(r),f=Ys.a.format(n)),Object(v.createElement)("img",{alt:d,title:i,className:u,src:f,width:c,height:c})};Js.propTypes={user:S.a.oneOfType([S.a.object,S.a.string]),alt:S.a.string,title:S.a.string,size:S.a.number,className:S.a.string},Js.defaultProps={size:60};Object(v.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(de.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function Zs(e){var t=e.href;return e.linkType||(t?"external":null)}function Xs(e){var t=e.item,n=t.before,r=t.title,o=t.after,a=t.content,i=t.onClick,c=t.href,s=t.target,l=t.listItemTag,u="function"==typeof i||c,d=c?L:"div",f={className:"woocommerce-list__item-inner",onClick:"function"==typeof i?i:null,"aria-disabled":u?"false":null,tabIndex:u?"0":null,role:u?"menuitem":null,onKeyDown:function(e){return u?function(e,t){"function"==typeof t&&e.keyCode===X.ENTER&&t()}(e,i):null},target:c?s:null,type:Zs(t),href:c,"data-list-item-tag":l};return Object(v.createElement)(d,f,n&&Object(v.createElement)("div",{className:"woocommerce-list__item-before"},n),Object(v.createElement)("div",{className:"woocommerce-list__item-text"},Object(v.createElement)("span",{className:"woocommerce-list__item-title"},r),a&&Object(v.createElement)("span",{className:"woocommerce-list__item-content"},a)),o&&Object(v.createElement)("div",{className:"woocommerce-list__item-after"},o))}v.Component,Xs.propTypes={item:S.a.shape({after:S.a.node,before:S.a.node,className:S.a.string,content:S.a.oneOfType([S.a.string,S.a.node]),href:S.a.string,onClick:S.a.func,target:S.a.string,title:S.a.oneOfType([S.a.string,S.a.node])}).isRequired};S.a.string,S.a.arrayOf(S.a.shape({after:S.a.node,before:S.a.node,className:S.a.string,content:S.a.oneOfType([S.a.string,S.a.node]),href:S.a.string,onClick:S.a.func,target:S.a.string,title:S.a.oneOfType([S.a.string,S.a.node]),key:S.a.string}));var el=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){var e;return s()(this,o),(e=r.apply(this,arguments)).onClick=e.onClick.bind(f()(e)),e.onFocusFormToggle=e.onFocusFormToggle.bind(f()(e)),e.onKeyDown=e.onKeyDown.bind(f()(e)),e.container=Object(v.createRef)(),e}return u()(o,[{key:"onClick",value:function(e){var t=this.props,n=t.isClickable,r=t.onInvoke;n&&(e.preventDefault(),r())}},{key:"onKeyDown",value:function(e){e.target.isSameNode(e.currentTarget)&&(e.keyCode!==X.ENTER&&e.keyCode!==X.SPACE||(e.preventDefault(),this.props.onInvoke()),e.keyCode===X.UP&&e.preventDefault(),e.keyCode===X.DOWN&&(e.preventDefault(),(e.target.nextSibling||e.target.parentNode.querySelector(".woocommerce-ellipsis-menu__item")).focus()))}},{key:"onFocusFormToggle",value:function(){this.container.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.checked,n=e.children;return e.isCheckbox?Object(v.createElement)("div",{"aria-checked":t,ref:this.container,role:"menuitemcheckbox",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},Object(v.createElement)(w.BaseControl,{className:"components-toggle-control"},Object(v.createElement)(w.FormToggle,{"aria-hidden":"true",checked:t,onChange:this.props.onInvoke,onFocus:this.onFocusFormToggle,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"}),n)):Object(v.createElement)("div",{role:"menuitem",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},n)}}]),o}(v.Component);el.propTypes={checked:S.a.bool,children:S.a.node,isCheckbox:S.a.bool,isClickable:S.a.bool,onInvoke:S.a.func.isRequired},el.defaultProps={isClickable:!1,isCheckbox:!1};var tl=el,nl=function(e){var t=e.children;return Object(v.createElement)("div",{className:"woocommerce-ellipsis-menu__title"},t)};nl.propTypes={children:S.a.node};var rl=nl;S.a.object.isRequired,S.a.string,S.a.object;var ol=Object(v.createElement)(de.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(v.createElement)(de.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var al=[25,50,75,100],il=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={inputValue:t.props.page},t.previousPage=t.previousPage.bind(f()(t)),t.nextPage=t.nextPage.bind(f()(t)),t.onInputChange=t.onInputChange.bind(f()(t)),t.onInputBlur=t.onInputBlur.bind(f()(t)),t.perPageChange=t.perPageChange.bind(f()(t)),t.selectInputValue=t.selectInputValue.bind(f()(t)),t}return u()(o,[{key:"previousPage",value:function(e){e.stopPropagation();var t=this.props,n=t.page,r=t.onPageChange;n-1<1||r(n-1,"previous")}},{key:"nextPage",value:function(e){e.stopPropagation();var t=this.props,n=t.page,r=t.onPageChange;n+1>this.pageCount||r(n+1,"next")}},{key:"perPageChange",value:function(e){var t=this.props,n=t.onPerPageChange,r=t.onPageChange,o=t.total,a=t.page;n(parseInt(e,10));var i=Math.ceil(o/parseInt(e,10));a>i&&r(i)}},{key:"onInputChange",value:function(e){this.setState({inputValue:e.target.value})}},{key:"onInputBlur",value:function(e){var t=this.props,n=t.onPageChange,r=t.page,o=parseInt(e.target.value,10);o!==r&&Number.isFinite(o)&&o>0&&this.pageCount&&this.pageCount>=o&&n(o,"goto")}},{key:"selectInputValue",value:function(e){e.target.select()}},{key:"renderPageArrows",value:function(){var e=this.props,t=e.page,n=e.showPageArrowsLabel;if(this.pageCount<=1)return null;var r=q()("woocommerce-pagination__link",{"is-active":t>1}),o=q()("woocommerce-pagination__link",{"is-active":t1),onClick:this.previousPage,label:Object(O.__)("Previous Page","woocommerce-admin")},Object(v.createElement)(ue,{icon:Hs})),Object(v.createElement)(w.Button,{className:o,disabled:!(tthis.pageCount,r=q()("woocommerce-pagination__page-picker-input",{"has-error":n}),o=Object(_.uniqueId)("woocommerce-pagination-page-picker-");return Object(v.createElement)("div",{className:"woocommerce-pagination__page-picker"},Object(v.createElement)("label",{htmlFor:o,className:"woocommerce-pagination__page-picker-label"},Object(O.__)("Go to page","woocommerce-admin"),Object(v.createElement)("input",{id:o,className:r,"aria-invalid":n,type:"number",onClick:this.selectInputValue,onChange:this.onInputChange,onBlur:this.onInputBlur,value:t,min:1,max:this.pageCount})))}},{key:"renderPerPagePicker",value:function(){var e=al.map((function(e){return{value:e,label:e}}));return Object(v.createElement)("div",{className:"woocommerce-pagination__per-page-picker"},Object(v.createElement)(w.SelectControl,{label:Object(O.__)("Rows per page","woocommerce-admin"),value:this.props.perPage,onChange:this.perPageChange,options:e}))}},{key:"render",value:function(){var e=this.props,t=e.total,n=e.perPage,r=e.className,o=e.showPagePicker,a=e.showPerPagePicker;this.pageCount=Math.ceil(t/n);var i=q()("woocommerce-pagination",r);return this.pageCount<=1?t>al[0]&&Object(v.createElement)("div",{className:i},this.renderPerPagePicker())||null:Object(v.createElement)("div",{className:i},this.renderPageArrows(),o&&this.renderPagePicker(),a&&this.renderPerPagePicker())}}]),o}(v.Component);il.propTypes={page:S.a.number.isRequired,onPageChange:S.a.func,perPage:S.a.number.isRequired,onPerPageChange:S.a.func,total:S.a.number.isRequired,className:S.a.string,showPagePicker:S.a.bool,showPerPagePicker:S.a.bool,showPageArrowsLabel:S.a.bool},il.defaultProps={onPageChange:_.noop,onPerPageChange:_.noop,showPagePicker:!0,showPerPagePicker:!0,showPageArrowsLabel:!0};var cl=il,sl=n(10),ll=n(359);var ul=function(e){h()(a,e);var t,n,r,o=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g()(n);if(r){var o=g()(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return y()(this,e)});function a(){var e;return s()(this,a),(e=o.apply(this,arguments)).state={hasErrors:!1},e.installAndActivate=e.installAndActivate.bind(f()(e)),e.skipInstaller=e.skipInstaller.bind(f()(e)),e.handleErrors=e.handleErrors.bind(f()(e)),e.handleSuccess=e.handleSuccess.bind(f()(e)),e}return u()(a,[{key:"componentDidMount",value:function(){this.props.autoInstall&&this.installAndActivate()}},{key:"installAndActivate",value:(t=G()(J.a.mark((function e(t){var n,r,o,a,i=this;return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.preventDefault(),n=this.props,r=n.installAndActivatePlugins,o=n.isRequesting,a=n.pluginSlugs,!o){e.next=4;break}return e.abrupt("return",!1);case 4:r(a).then((function(e){i.handleSuccess(e.data.activated,e)})).catch((function(e){i.handleErrors(e.errors,e)}));case 5:case"end":return e.stop()}}),e,this)}))),function(_x){return t.apply(this,arguments)})},{key:"handleErrors",value:function(e,t){var n=this.props.onError;this.setState({hasErrors:!0}),n(e,t)}},{key:"handleSuccess",value:function(e,t){(0,this.props.onComplete)(e,t)}},{key:"skipInstaller",value:function(){this.props.onSkip()}},{key:"render",value:function(){var e=this.props,t=e.isRequesting,n=e.skipText,r=e.autoInstall,o=e.pluginSlugs,a=e.onAbort,i=e.abortText;return this.state.hasErrors?Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{isPrimary:!0,isBusy:t,onClick:this.installAndActivate},Object(O.__)("Retry","woocommerce-admin")),Object(v.createElement)(w.Button,{onClick:this.skipInstaller},Object(O.__)("Continue without installing","woocommerce-admin"))):r?null:0===o.length?Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{isPrimary:!0,isBusy:t,onClick:this.skipInstaller},Object(O.__)("Continue","woocommerce-admin"))):Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{isBusy:t,isPrimary:!0,onClick:this.installAndActivate},Object(O.__)("Install & enable","woocommerce-admin")),Object(v.createElement)(w.Button,{isTertiary:!0,onClick:this.skipInstaller},n||Object(O.__)("No thanks","woocommerce-admin")),a&&Object(v.createElement)(w.Button,{isTertiary:!0,onClick:a},i||Object(O.__)("Abort","woocommerce-admin")))}}]),a}(v.Component);ul.propTypes={onComplete:S.a.func.isRequired,onError:S.a.func,onSkip:S.a.func,skipText:S.a.string,autoInstall:S.a.bool,pluginSlugs:S.a.arrayOf(S.a.string),onAbort:S.a.func,abortText:S.a.string},ul.defaultProps={autoInstall:!1,onError:function(){},onSkip:function(){},pluginSlugs:["jetpack","woocommerce-services"]},Object(Z.compose)(Object(sl.withSelect)((function(e){var t=e(ll.PLUGINS_STORE_NAME),n=t.getActivePlugins,r=t.getInstalledPlugins,o=t.isPluginsRequesting;return{isRequesting:o("activatePlugins")||o("installPlugins"),activePlugins:n(),installedPlugins:r()}})),Object(sl.withDispatch)((function(e){return{installAndActivatePlugins:e(ll.PLUGINS_STORE_NAME).installAndActivatePlugins}})))(ul);var dl=n(512),fl=n.n(dl);var pl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"stars",value:function(e){for(var t=this.props,n=t.size,r=t.totalStars,o={width:n+"px",height:n+"px"},a=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:e,n=Object(_.groupBy)(e,"parent"),r=Object(_.keyBy)(t,"id"),o=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.parent)return t.name?[t.name]:[];var n=e(r[t.parent]);return[].concat(i()(n),[t.name])},a=function e(t){return t.map((function(t){var a=n[t.id];return delete n[t.id],gl(gl({},t),{},{breadcrumbs:o(r[t.parent]),children:a&&a.length?e(a):[]})}))},c=a(n[0]||[]);return delete n[0],Object(_.forEach)(n,(function(e){c.push.apply(c,i()(a(e||[])))})),c}var Ol=function(e){var t=e.countLabel,n=e.className,r=e.depth,o=void 0===r?0:r,a=e.controlId,i=void 0===a?"":a,c=e.item,s=e.isSelected,l=e.isSingle,u=e.onSelect,d=e.search,f=void 0===d?"":d,p=R()(e,["countLabel","className","depth","controlId","item","isSelected","isSingle","onSelect","search"]),h=!Object(_.isNil)(t)||!Object(_.isNil)(c.count),m=[n,"woocommerce-search-list__item"];m.push("depth-".concat(o)),l&&m.push("is-radio-button"),h&&m.push("has-count");var y,b=c.breadcrumbs&&c.breadcrumbs.length,g=p.name||"search-list-item-".concat(i),O="".concat(g,"-").concat(c.id);return Object(v.createElement)("label",{htmlFor:O,className:m.join(" ")},l?Object(v.createElement)("input",T()({type:"radio",id:O,name:g,value:c.value,onChange:u(c),checked:s,className:"woocommerce-search-list__item-input"},p)):Object(v.createElement)("input",T()({type:"checkbox",id:O,name:g,value:c.value,onChange:u(c),checked:s,className:"woocommerce-search-list__item-input"},p)),Object(v.createElement)("span",{className:"woocommerce-search-list__item-label"},b?Object(v.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(y=c.breadcrumbs).length?Object(_.first)(y):2===y.length?Object(_.first)(y)+" › "+Object(_.last)(y):Object(_.first)(y)+" … "+Object(_.last)(y)):null,Object(v.createElement)("span",{className:"woocommerce-search-list__item-name"},function(e,t){if(!t)return e;var n=new RegExp(Object(_.escapeRegExp)(t),"ig");return e.split(n).map((function(e,n){return 0===n?e:Object(v.createElement)(v.Fragment,{key:n},Object(v.createElement)("strong",null,t),e)}))}(c.name,f))),!!h&&Object(v.createElement)("span",{className:"woocommerce-search-list__item-count"},t||c.count))};Ol.propTypes={className:S.a.string,countLabel:S.a.node,controlId:S.a.node,depth:S.a.number,item:S.a.object,name:S.a.string,isSelected:S.a.bool,isSingle:S.a.bool,onSelect:S.a.func,search:S.a.string};var wl=Ol;function _l(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 kl(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=this.props,o=r.isSingle,a=r.search,i=r.instanceId,c=this.props.renderItem||this.defaultRenderItem;return e?e.map((function(e){return Object(v.createElement)(v.Fragment,{key:e.id},Object(v.createElement)("li",null,c({item:e,isSelected:t.isSelected(e),onSelect:t.onSelect,isSingle:o,search:a,depth:n,controlId:i})),t.renderList(e.children,n+1))})):null}},{key:"renderListSection",value:function(){var e=this.props,t=e.isLoading,n=e.search,r=kl(kl({},Sl),this.props.messages);if(t)return Object(v.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(v.createElement)(w.Spinner,null));var o=this.getFilteredList(this.props.list,n);return o.length?Object(v.createElement)("ul",{className:"woocommerce-search-list__list"},this.renderList(o)):Object(v.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(v.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(v.createElement)(yl.a,{role:"img","aria-hidden":"true",focusable:"false"})),Object(v.createElement)("span",{className:"woocommerce-search-list__not-found-text"},n?Object(O.sprintf)(r.noResults,n):r.noItems))}},{key:"renderSelectedSection",value:function(){var e=this,t=this.props,n=t.isLoading,r=t.isSingle,o=t.selected,a=kl(kl({},Sl),this.props.messages);if(n||r||!o)return null;var i=o.length;return Object(v.createElement)("div",{className:"woocommerce-search-list__selected"},Object(v.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(v.createElement)("strong",null,a.selected(i)),i>0?Object(v.createElement)(w.Button,{isLink:!0,isDestructive:!0,onClick:this.onClear,"aria-label":a.clear},Object(O.__)("Clear all","woocommerce-admin")):null),i>0?Object(v.createElement)("ul",null,o.map((function(t,n){return Object(v.createElement)("li",{key:n},Object(v.createElement)(oe,{label:t.name,id:t.id,remove:e.onRemove}))}))):null)}},{key:"render",value:function(){var e=this.props,t=e.className,n=void 0===t?"":t,r=e.isCompact,o=e.search,a=e.setState,i=kl(kl({},Sl),this.props.messages);return Object(v.createElement)("div",{className:q()("woocommerce-search-list",n,{"is-compact":r})},this.renderSelectedSection(),Object(v.createElement)("div",{className:"woocommerce-search-list__search"},Object(v.createElement)(w.TextControl,{label:i.search,type:"search",value:o,onChange:function(e){return a({search:e})}})),this.renderListSection())}}]),o}(v.Component);jl.propTypes={className:S.a.string,isCompact:S.a.bool,isHierarchical:S.a.bool,isLoading:S.a.bool,isSingle:S.a.bool,list:S.a.arrayOf(S.a.shape({id:S.a.number,name:S.a.string})),messages:S.a.shape({clear:S.a.string,noItems:S.a.string,noResults:S.a.string,search:S.a.string,selected:S.a.func,updated:S.a.string}),onChange:S.a.func.isRequired,onSearch:S.a.func,renderItem:S.a.func,selected:S.a.array.isRequired,search:S.a.string,setState:S.a.func,debouncedSpeak:S.a.func,instanceId:S.a.number};var El=Object(Z.compose)([Object(Z.withState)({search:""}),w.withSpokenMessages,Z.withInstanceId])(jl);(function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.menu,r=e.title,o=q()("woocommerce-section-header",this.props.className);return Object(v.createElement)("div",{className:o},Object(v.createElement)(pt,{className:"woocommerce-section-header__title woocommerce-section-header__header-item"},r),Object(v.createElement)("hr",{role:"presentation"}),t&&Object(v.createElement)("div",{className:"woocommerce-section-header__actions woocommerce-section-header__header-item"},t),n&&Object(v.createElement)("div",{className:"woocommerce-section-header__menu woocommerce-section-header__header-item"},n))}}]),o}(v.Component)).propTypes={className:S.a.string,menu:ds(us),title:S.a.oneOfType([S.a.string,S.a.node]).isRequired};var Cl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).scrollTo=t.scrollTo.bind(f()(t)),t}return u()(o,[{key:"componentDidMount",value:function(){setTimeout(this.scrollTo,250)}},{key:"scrollTo",value:function(){var e=this.props.offset;this.ref.current&&this.ref.current.offsetTop?window.scrollTo(0,this.ref.current.offsetTop+parseInt(e,10)):setTimeout(this.scrollTo,250)}},{key:"render",value:function(){var e=this.props.children;return this.ref=Object(v.createRef)(),Object(v.createElement)("span",{ref:this.ref},e)}}]),o}(v.Component);Cl.propTypes={offset:S.a.string},Cl.defaultProps={offset:"0"};var Dl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this.props.className,t=q()("woocommerce-spinner",e);return Object(v.createElement)("svg",{className:t,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)("circle",{className:"woocommerce-spinner__circle",fill:"none",strokeWidth:"5",strokeLinecap:"round",cx:"50",cy:"50",r:"30"}))}}]),o}(v.Component);Dl.propTypes={className:S.a.string};var Pl=Dl,xl=function(){return Object(v.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"14",height:"12"},Object(v.createElement)("path",{d:"M6.59631 11.9062L3.46881 8.77875L2.40381 9.83625L6.59631 14.0287L15.5963 5.02875L14.5388 3.97125L6.59631 11.9062Z",fill:"white"})),Object(v.createElement)("g",{mask:"url(#mask0)"},Object(v.createElement)("rect",{width:"18",height:"18",fill:"white"})))};var Fl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"renderCurrentStepContent",value:function(){var e=this.props,t=e.currentStep,n=e.steps.find((function(e){return t===e.key}));return n.content?Object(v.createElement)("div",{className:"woocommerce-stepper_content"},n.content):null}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.currentStep,o=t.steps,a=t.isVertical,i=t.isPending,c=o.findIndex((function(e){return r===e.key})),s=q()("woocommerce-stepper",n,{"is-vertical":a});return Object(v.createElement)("div",{className:s},Object(v.createElement)("div",{className:"woocommerce-stepper__steps"},o.map((function(t,n){var o=t.key,s=t.label,l=t.description,u=t.isComplete,d=t.onClick,f=o===r,p=q()("woocommerce-stepper__step",{"is-active":f,"is-complete":void 0!==u?u:c>n}),h=f&&i?Object(v.createElement)(Pl,null):Object(v.createElement)("div",{className:"woocommerce-stepper__step-icon"},Object(v.createElement)("span",{className:"woocommerce-stepper__step-number"},n+1),Object(v.createElement)(xl,null)),m="function"==typeof d?"button":"div";return Object(v.createElement)(v.Fragment,{key:o},Object(v.createElement)("div",{className:p},Object(v.createElement)(m,{className:"woocommerce-stepper__step-label-wrapper",onClick:"function"==typeof d?function(){return d(o)}:null},h,Object(v.createElement)("div",{className:"woocommerce-stepper__step-text"},Object(v.createElement)("span",{className:"woocommerce-stepper__step-label"},s),l&&Object(v.createElement)("span",{className:"woocommerce-stepper__step-description"},l))),f&&a&&e.renderCurrentStepContent()),!a&&Object(v.createElement)("div",{className:"woocommerce-stepper__step-divider"}))}))),!a&&this.renderCurrentStepContent())}}]),o}(v.Component);function Tl(e){return e<10?"has-".concat(e,"-items"):"has-10-items"}Fl.propTypes={className:S.a.string,currentStep:S.a.string.isRequired,steps:S.a.arrayOf(S.a.shape({content:S.a.node,description:S.a.oneOfType([S.a.string,S.a.array]),isComplete:S.a.bool,key:S.a.string.isRequired,label:S.a.string.isRequired,onClick:S.a.func})).isRequired,isVertical:S.a.bool,isPending:S.a.bool},Fl.defaultProps={isVertical:!1,isPending:!1};var Ml=function(e){var t=e.label,n=e.orientation,r=e.itemCount,a=e.items,i=Object(_.uniqueId)("woocommerce-summary-helptext-"),c=Tl(r),s=q()("woocommerce-summary",o()({},c,"horizontal"===n));return Object(v.createElement)(w.NavigableMenu,{"aria-label":t,"aria-describedby":i,orientation:n,stopNavigationEvents:!0},Object(v.createElement)("p",{id:i,className:"screen-reader-text"},Object(O.__)("List of data points available for filtering. Use arrow keys to cycle through the list. Click a data point for a detailed report.","woocommerce-admin")),Object(v.createElement)("ul",{className:s},a))};Ml.propTypes={label:S.a.string,orientation:S.a.oneOf(["vertical","horizontal"]).isRequired,items:S.a.node.isRequired,itemCount:S.a.number.isRequired};var Rl=Ml,Il=function(e){var t=e.children,n=e.isDropdownBreakpoint,r=e.label,o=t({}),a=v.Children.count(o)||1,i=n?"vertical":"horizontal",c=Object(v.createElement)(Rl,{label:r,orientation:i,itemCount:a,items:o});if(!n||a<2)return c;var s=o.find((function(e){return!!e.props.selected}));return s?Object(v.createElement)(w.Dropdown,{className:"woocommerce-summary",position:"bottom",headerTitle:r,renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(v.cloneElement)(s,{onToggle:n,isOpen:t})},renderContent:function(e){return Object(v.createElement)(Rl,{label:r,orientation:i,itemCount:a,items:t(e)})}}):c};Il.propTypes={children:S.a.func.isRequired,label:S.a.string},Il.defaultProps={label:Object(O.__)("Performance Indicators","woocommerce-admin")},Object(En.withViewportMatch)({isDropdownBreakpoint:"< large"})(Il);var Al=function(e){var t=e.className;return Object(v.createElement)("li",{"data-testid":"summary-placeholder",className:q()("woocommerce-summary__item-container is-placeholder",t)},Object(v.createElement)("div",{className:"woocommerce-summary__item"},Object(v.createElement)("div",{className:"woocommerce-summary__item-label"}),Object(v.createElement)("div",{className:"woocommerce-summary__item-data"},Object(v.createElement)("div",{className:"woocommerce-summary__item-value"}),Object(v.createElement)("div",{className:"woocommerce-summary__item-delta"}))))},Nl=function(e){h()(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function a(){return s()(this,a),r.apply(this,arguments)}return u()(a,[{key:"render",value:function(){var e,t=this.props.isDropdownBreakpoint,n=t?1:this.props.numberOfItems,r=Tl(n),a=q()("woocommerce-summary",(e={},o()(e,r,!t),o()(e,"is-placeholder",!0),e));return Object(v.createElement)("ul",{className:a,"aria-hidden":"true"},Object(_.range)(n).map((function(e){return Object(v.createElement)(Al,{key:e})})))}}]),a}(v.Component);Nl.propTypes={numberOfItems:S.a.number.isRequired},Nl.defaultProps={numberOfRows:5},Object(En.withViewportMatch)({isDropdownBreakpoint:"< large"})(Nl);var Ll=n(514),Ul=n.n(Ll),Bl=function(e){var t,n=e.children,r=e.delta,o=e.href,a=e.hrefType,i=e.isOpen,c=e.label,s=e.onToggle,l=e.prevLabel,u=e.prevValue,d=e.reverseTrend,f=e.selected,p=e.value,h=e.onLinkClickCallback,m=q()("woocommerce-summary__item-container",{"is-dropdown-button":s,"is-dropdown-expanded":i}),y=q()("woocommerce-summary__item",{"is-selected":f,"is-good-trend":d?r<0:r>0,"is-bad-trend":d?r>0:r<0}),b=r>0?Object(O.sprintf)(Object(O.__)("Up %f%% from %s","woocommerce-admin"),r,l):Object(O.sprintf)(Object(O.__)("Down %f%% from %s","woocommerce-admin"),Math.abs(r),l);r||(b=Object(O.sprintf)(Object(O.__)("No change from %s","woocommerce-admin"),l));var g={className:y,"aria-current":f?"page":null};if(s||o){var k=!!s;t=k?w.Button:L,k?(g.onClick=s,g["aria-expanded"]=i):(g.href=o,g.role="menuitem",g.onClick=h,g.type=a)}else t="div";return Object(v.createElement)("li",{className:m},Object(v.createElement)(t,g,Object(v.createElement)("div",{className:"woocommerce-summary__item-label"},Object(v.createElement)(x,{variant:"body.small"},c)),Object(v.createElement)("div",{className:"woocommerce-summary__item-data"},Object(v.createElement)("div",{className:"woocommerce-summary__item-value"},Object(v.createElement)(x,{variant:"title.small"},Object(_.isNil)(p)?Object(O.__)("N/A","woocommerce-admin"):p)),Object(v.createElement)(w.Tooltip,{text:Object(_.isNil)(u)?Object(O.__)("N/A","woocommerce-admin"):"".concat(l," ").concat(u),position:"top center"},Object(v.createElement)("div",{className:"woocommerce-summary__item-delta",role:"presentation","aria-label":b},Object(v.createElement)(x,{variant:"caption"},Object(_.isNil)(r)?Object(O.__)("N/A","woocommerce-admin"):Object(O.sprintf)(Object(O.__)("%f%%","woocommerce-admin"),r))))),s?Object(v.createElement)(Ul.a,{className:"woocommerce-summary__toggle",size:24}):null,n))};Bl.propTypes={delta:S.a.number,href:S.a.string,hrefType:S.a.oneOf(["wp-admin","wc-admin","external"]).isRequired,isOpen:S.a.bool,label:S.a.string.isRequired,onToggle:S.a.func,prevLabel:S.a.string,prevValue:S.a.oneOfType([S.a.number,S.a.string]),reverseTrend:S.a.bool,selected:S.a.bool,value:S.a.oneOfType([S.a.number,S.a.string]),onLinkClickCallback:S.a.func},Bl.defaultProps={href:"",hrefType:"wc-admin",isOpen:!1,prevLabel:Object(O.__)("Previous Period:","woocommerce-admin"),reverseTrend:!1,selected:!1,onLinkClickCallback:_.noop};var Hl=Object(v.createElement)(de.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(de.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),ql=Object(v.createElement)(de.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(v.createElement)(de.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));var zl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={tabIndex:null,isScrollableRight:!1,isScrollableLeft:!1},t.container=Object(v.createRef)(),t.sortBy=t.sortBy.bind(f()(t)),t.updateTableShadow=t.updateTableShadow.bind(f()(t)),t}return u()(o,[{key:"componentDidMount",value:function(){var e=this.container.current,t=e.scrollWidth>e.clientWidth;this.setState({tabIndex:t?"0":null}),this.updateTableShadow(),window.addEventListener("resize",this.updateTableShadow)}},{key:"componentDidUpdate",value:function(){this.updateTableShadow()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateTableShadow)}},{key:"sortBy",value:function(e){var t=this,n=this.props,r=n.headers,o=n.query;return function(){var n=o.orderby||Object(_.get)(Object(_.find)(r,{defaultSort:!0}),"key",!1),a=o.order||Object(_.get)(Object(_.find)(r,{key:n}),"defaultOrder","desc"),i="desc";e===n&&(i="desc"===a?"asc":"desc"),t.props.onSort(e,i)}}},{key:"updateTableShadow",value:function(){var e=this.container.current,t=this.state,n=t.isScrollableRight,r=t.isScrollableLeft,o=e.scrollWidth-e.scrollLeft<=e.offsetWidth;o&&n?this.setState({isScrollableRight:!1}):o||this.state.isScrollableRight||this.setState({isScrollableRight:!0});var a=e.scrollLeft<=0;a&&r?this.setState({isScrollableLeft:!1}):a||r||this.setState({isScrollableLeft:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.ariaHidden,r=t.caption,o=t.classNames,a=t.headers,i=t.instanceId,c=t.query,s=t.rowHeader,l=t.rows,u=this.state,d=u.isScrollableRight,f=u.isScrollableLeft,p=u.tabIndex,h=q()("woocommerce-table__table",o,{"is-scrollable-right":d,"is-scrollable-left":f}),m=c.orderby||Object(_.get)(Object(_.find)(a,{defaultSort:!0}),"key",!1),y=c.order||Object(_.get)(Object(_.find)(a,{key:m}),"defaultOrder","desc"),b=!!l.length;return Object(v.createElement)("div",{className:h,ref:this.container,tabIndex:p,"aria-hidden":n,"aria-labelledby":"caption-".concat(i),role:"group",onScroll:this.updateTableShadow},Object(v.createElement)("table",null,Object(v.createElement)("caption",{id:"caption-".concat(i),className:"woocommerce-table__caption screen-reader-text"},r,"0"===p&&Object(v.createElement)("small",null,Object(O.__)("(scroll to see more)","woocommerce-admin"))),Object(v.createElement)("tbody",null,Object(v.createElement)("tr",null,a.map((function(t,n){var r=t.cellClassName,o=t.isLeftAligned,a=t.isSortable,c=t.isNumeric,s=t.key,l=t.label,u=t.screenReaderLabel,d="header-".concat(i,"-").concat(n),f={className:q()("woocommerce-table__header",r,{"is-left-aligned":o,"is-sortable":a,"is-sorted":m===s,"is-numeric":c})};a&&(f["aria-sort"]="none",m===s&&(f["aria-sort"]="asc"===y?"ascending":"descending"));var p=m===s&&"asc"!==y?Object(O.sprintf)(Object(O.__)("Sort by %s in ascending order","woocommerce-admin"),u||l):Object(O.sprintf)(Object(O.__)("Sort by %s in descending order","woocommerce-admin"),u||l),h=Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{"aria-hidden":Boolean(u)},l),u&&Object(v.createElement)("span",{className:"screen-reader-text"},u));return Object(v.createElement)("th",T()({role:"columnheader",scope:"col",key:n},f),a?Object(v.createElement)(v.Fragment,null,Object(v.createElement)(w.Button,{"aria-describedby":d,onClick:b?e.sortBy(s):_.noop},m===s&&"asc"===y?Object(v.createElement)(ue,{icon:Hl}):Object(v.createElement)(ue,{icon:ql}),h),Object(v.createElement)("span",{className:"screen-reader-text",id:d},p)):h)}))),b?l.map((function(e,t){return Object(v.createElement)("tr",{key:t},e.map((function(e,t){var n=a[t],r=n.cellClassName,o=n.isLeftAligned,i=n.isNumeric,c=s===t,l=c?"th":"td",u=q()("woocommerce-table__item",r,{"is-left-aligned":o,"is-numeric":i,"is-sorted":m===a[t].key});return Object(v.createElement)(l,{scope:c?"row":null,key:t,className:u},function(e){return e.display||null}(e))})))})):Object(v.createElement)("tr",null,Object(v.createElement)("td",{className:"woocommerce-table__empty-item",colSpan:a.length},Object(O.__)("No data to display","woocommerce-admin"))))))}}]),o}(v.Component);zl.propTypes={ariaHidden:S.a.bool,caption:S.a.string.isRequired,className:S.a.string,headers:S.a.arrayOf(S.a.shape({defaultSort:S.a.bool,defaultOrder:S.a.string,isLeftAligned:S.a.bool,isNumeric:S.a.bool,isSortable:S.a.bool,key:S.a.string,label:S.a.node,required:S.a.bool,screenReaderLabel:S.a.string})),onSort:S.a.func,query:S.a.object,rows:S.a.arrayOf(S.a.arrayOf(S.a.shape({display:S.a.node,value:S.a.oneOfType([S.a.string,S.a.number,S.a.bool])}))).isRequired,rowHeader:S.a.oneOfType([S.a.number,S.a.bool])},zl.defaultProps={ariaHidden:!1,headers:[],onSort:_.noop,query:{},rowHeader:0};var Vl=Object(Z.withInstanceId)(zl);var Kl=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(){return s()(this,o),r.apply(this,arguments)}return u()(o,[{key:"render",value:function(){var e=this,t=this.props,n=t.numberOfRows,r=R()(t,["numberOfRows"]),o=Object(_.range)(n).map((function(){return e.props.headers.map((function(){return{display:Object(v.createElement)("span",{className:"is-placeholder"})}}))}));return Object(v.createElement)(Vl,T()({ariaHidden:!0,classNames:"is-loading",rows:o},r))}}]),o}(v.Component);Kl.propTypes={query:S.a.object,caption:S.a.string.isRequired,headers:S.a.arrayOf(S.a.shape({hiddenByDefault:S.a.bool,defaultSort:S.a.bool,isSortable:S.a.bool,key:S.a.string,label:S.a.node,required:S.a.bool})),numberOfRows:S.a.number},Kl.defaultProps={numberOfRows:5};var Wl=Kl,Gl=function(e){var t=e.data;return Object(v.createElement)("ul",{className:"woocommerce-table__summary"},t.map((function(e,t){var n=e.label,r=e.value;return Object(v.createElement)("li",{className:"woocommerce-table__summary-item",key:t},Object(v.createElement)("span",{className:"woocommerce-table__summary-value"},r),Object(v.createElement)("span",{className:"woocommerce-table__summary-label"},n))})))};Gl.propTypes={data:S.a.array};var Yl=Gl;var $l=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;s()(this,o);var n=(t=r.call(this,e)).getShowCols(e.headers);return t.state={showCols:n},t.onColumnToggle=t.onColumnToggle.bind(f()(t)),t.onPageChange=t.onPageChange.bind(f()(t)),t}return u()(o,[{key:"componentDidUpdate",value:function(e){var t=e.headers,n=e.query,r=this.props,o=r.headers,a=r.onColumnsChange,i=r.query,c=this.state.showCols;if(Object(_.isEqual)(o,t)||this.setState({showCols:this.getShowCols(o)}),i.orderby!==n.orderby&&!c.includes(i.orderby)){var s=c.concat(i.orderby);this.setState({showCols:s}),a(s)}}},{key:"getShowCols",value:function(e){return e.map((function(e){var t=e.key,n=e.visible;return!(void 0!==n&&!n)&&t})).filter(Boolean)}},{key:"getVisibleHeaders",value:function(){var e=this.props.headers,t=this.state.showCols;return e.filter((function(e){var n=e.key;return t.includes(n)}))}},{key:"getVisibleRows",value:function(){var e=this.props,t=e.headers,n=e.rows,r=this.state.showCols;return n.map((function(e){return t.map((function(t,n){var o=t.key;return r.includes(o)&&e[n]})).filter(Boolean)}))}},{key:"onColumnToggle",value:function(e){var t=this,n=this.props,r=n.headers,o=n.query,a=n.onQueryChange,c=n.onColumnsChange;return function(){t.setState((function(t){if(t.showCols.includes(e)){if(o.orderby===e){var n=Object(_.find)(r,{defaultSort:!0})||Object(_.first)(r)||{};a("sort")(n.key,"desc")}var s=Object(_.without)(t.showCols,e);return c(s,e),{showCols:s}}var l=[].concat(i()(t.showCols),[e]);return c(l,e),{showCols:l}}))}}},{key:"onPageChange",value:function(){var e=this.props,t=e.onPageChange,n=e.onQueryChange;t&&t.apply(void 0,arguments),n&&n("paged").apply(void 0,arguments)}},{key:"render",value:function(){var e=this,t=this.props,n=t.actions,r=t.className,o=t.hasSearch,a=t.isLoading,i=t.onQueryChange,c=t.onSort,s=t.query,l=t.rowHeader,u=t.rowsPerPage,d=t.showMenu,f=t.summary,p=t.title,h=t.totalRows,m=this.state.showCols,y=this.props.headers,b=this.getVisibleHeaders(),g=this.getVisibleRows(),_=q()("woocommerce-table",r,{"has-actions":!!n,"has-menu":d,"has-search":o});return Object(v.createElement)(w.Card,{className:_},Object(v.createElement)(w.CardHeader,null,Object(v.createElement)(w.__experimentalText,{variant:"title.small",as:"h2"},p),Object(v.createElement)("div",{className:"woocommerce-table__actions"},n),d&&Object(v.createElement)(us,{label:Object(O.__)("Choose which values to display","woocommerce-admin"),renderContent:function(){return Object(v.createElement)(v.Fragment,null,Object(v.createElement)(rl,null,Object(O.__)("Columns:","woocommerce-admin")),y.map((function(t){var n=t.key,r=t.label;return t.required?null:Object(v.createElement)(tl,{checked:m.includes(n),isCheckbox:!0,isClickable:!0,key:n,onInvoke:e.onColumnToggle(n)},r)})))}})),Object(v.createElement)(w.CardBody,{size:null},a?Object(v.createElement)(v.Fragment,null,Object(v.createElement)("span",{className:"screen-reader-text"},Object(O.__)("Your requested data is loading","woocommerce-admin")),Object(v.createElement)(Wl,{numberOfRows:u,headers:b,rowHeader:l,caption:p,query:s})):Object(v.createElement)(Vl,{rows:g,headers:b,rowHeader:l,caption:p,query:s,onSort:c||i("sort")})),Object(v.createElement)(w.CardFooter,{justify:"center"},Object(v.createElement)(cl,{key:parseInt(s.paged,10)||1,page:parseInt(s.paged,10)||1,perPage:u,total:h,onPageChange:this.onPageChange,onPerPageChange:i("per_page")}),f&&Object(v.createElement)(Yl,{data:f})))}}]),o}(v.Component);$l.propTypes={hasSearch:S.a.bool,headers:S.a.arrayOf(S.a.shape({hiddenByDefault:S.a.bool,defaultSort:S.a.bool,isSortable:S.a.bool,key:S.a.string,label:S.a.oneOfType([S.a.string,S.a.node]),required:S.a.bool})),ids:S.a.arrayOf(S.a.number),isLoading:S.a.bool,onQueryChange:S.a.func,onColumnsChange:S.a.func,onSort:S.a.func,query:S.a.object,rowHeader:S.a.oneOfType([S.a.number,S.a.bool]),rows:S.a.arrayOf(S.a.arrayOf(S.a.shape({display:S.a.node,value:S.a.oneOfType([S.a.string,S.a.number,S.a.bool])}))).isRequired,rowsPerPage:S.a.number.isRequired,showMenu:S.a.bool,summary:S.a.arrayOf(S.a.shape({label:S.a.node,value:S.a.oneOfType([S.a.string,S.a.number])})),title:S.a.string.isRequired,totalRows:S.a.number.isRequired},$l.defaultProps={isLoading:!1,onQueryChange:function(){return function(){}},onColumnsChange:function(){},onSort:void 0,query:{},rowHeader:0,rows:[],showMenu:!0};var Ql=function(e){var t=e.children,n=e.numberOfRows;return Object(v.createElement)("div",{className:"woocommerce-table is-empty",style:{"--number-of-rows":n}},t)};Ql.propTypes={numberOfRows:S.a.number},Ql.defaultProps={numberOfRows:5};var Jl=Object(w.withFocusOutside)(function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={isFocused:!1},t}return u()(o,[{key:"handleFocusOutside",value:function(){this.setState({isFocused:!1})}},{key:"handleOnClick",value:function(e,t){this.setState({isFocused:!0}),"function"==typeof t&&t(e)}},{key:"render",value:function(){var e=this,t=this.state.isFocused,n=this.props,r=n.className,o=n.onClick,a=R()(n,["className","onClick"]),i=a.label,c=a.value,s=a.disabled,l=""===c,u=t&&!s;return Object(v.createElement)(w.TextControl,T()({className:q()("muriel-component","muriel-input-text",r,{disabled:s,empty:l,active:u,"with-value":!l}),placeholder:i,onClick:function(t){return e.handleOnClick(t,o)},onFocus:function(){return e.setState({isFocused:!0})}},a))}}]),o}(v.Component));Jl.propTypes={className:S.a.string,disabled:S.a.bool,label:S.a.string,onClick:S.a.func,value:S.a.string};var Zl=Jl,Xl=function(e){var t=e.item,n=e.className,r=e.clockFormat,o=q()("woocommerce-timeline-item",n),a=Object(ys.format)(r,t.date);return Object(v.createElement)("li",{className:o},Object(v.createElement)("div",{className:"woocommerce-timeline-item__top-border"}),Object(v.createElement)("div",{className:"woocommerce-timeline-item__title"},Object(v.createElement)("div",{className:"woocommerce-timeline-item__headline"},t.icon,Object(v.createElement)("span",null,t.headline)),Object(v.createElement)("span",{className:"woocommerce-timeline-item__timestamp"},t.hideTimestamp?null:a)),Object(v.createElement)("div",{className:"woocommerce-timeline-item__body"},(t.body||[]).map((function(e,t){return Object(v.createElement)("span",{key:"timeline-item-body-".concat(t)},e)}))))};Xl.propTypes={className:S.a.string,item:S.a.shape({date:S.a.instanceOf(Date).isRequired,icon:S.a.element.isRequired,headline:S.a.oneOfType([S.a.element,S.a.string]).isRequired,body:S.a.arrayOf(S.a.oneOfType([S.a.element,S.a.string])),hideTimestamp:S.a.bool,clockFormat:S.a.string}).isRequired},Xl.defaultProps={className:"",item:{}};var eu=Xl,tu=function(e,t){return e.date.getTime()-t.date.getTime()},nu=function(e,t){return t.date.getTime()-e.date.getTime()},ru=function(e){switch(e){case"asc":return tu;case"desc":default:return nu}},ou=function(e){var t=e.group,n=e.className,r=e.orderBy,o=e.clockFormat,a=q()("woocommerce-timeline-group",n);return Object(v.createElement)("li",{className:a},Object(v.createElement)("p",{className:"woocommerce-timeline-group__title"},t.title),Object(v.createElement)("ul",null,t.items.sort(ru(r)).map((function(e,n){var r=t.title+"-"+n;return Object(v.createElement)(eu,{key:r,item:e,clockFormat:o})}))),Object(v.createElement)("hr",null))};ou.propTypes={className:S.a.string,group:S.a.shape({title:S.a.string,items:S.a.arrayOf(S.a.shape({date:S.a.instanceOf(Date).isRequired,icon:S.a.element.isRequired,headline:S.a.oneOfType([S.a.element,S.a.string]).isRequired,body:S.a.arrayOf(S.a.oneOfType([S.a.element,S.a.string])),hideTimestamp:S.a.bool})).isRequired}).isRequired,orderBy:S.a.oneOf(["asc","desc"]),clockFormat:S.a.string},ou.defaultProps={className:"",group:{title:"",items:[]},orderBy:"desc"};var au=ou;function iu(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 cu(e){for(var t=1;t=0?(t[r].items.push(n),t):[].concat(i()(t),[{date:n.date,items:[n]}])}}(r),[]).map((function(e){return cu(cu({},e),{},{title:Object(ys.format)(a,e.date)})})).sort(ru(o)).map((function(e){return Object(v.createElement)(au,{key:e.date.getTime().toString(),group:e,orderBy:o,clockFormat:c})})))):Object(v.createElement)("div",{className:s},Object(v.createElement)("p",{className:"timeline_no_events"},Object(O.__)("No data to display","woocommerce-admin")))};su.propTypes={className:S.a.string,items:S.a.arrayOf(S.a.shape({date:S.a.instanceOf(Date).isRequired,icon:S.a.element.isRequired,headline:S.a.oneOfType([S.a.element,S.a.string]).isRequired,body:S.a.arrayOf(S.a.oneOfType([S.a.element,S.a.string])),hideTimestamp:S.a.bool})).isRequired,groupBy:S.a.oneOf(["day","week","month"]),orderBy:S.a.oneOf(["asc","desc"]),dateFormat:S.a.string,clockFormat:S.a.string},su.defaultProps={className:"",items:[],groupBy:"day",orderBy:"desc",
+/* translators: PHP date format string used to display dates, see php.net/date. */
+dateFormat:Object(O.__)("F j, Y","woocommerce-admin"),
+/* translators: PHP clock format string used to display times, see php.net/date. */
+clockFormat:Object(O.__)("g:ia","woocommerce-admin")},n(45);var lu=function(e){var t=e.items;return Object(v.createElement)(oe,{className:"woocommerce-view-more-list",label:Object(O.sprintf)(Object(O.__)("+%d more","woocommerce-admin"),t.length-1),popoverContents:Object(v.createElement)("ul",{className:"woocommerce-view-more-list__popover"},t.map((function(e,t){return Object(v.createElement)("li",{key:t,className:"woocommerce-view-more-list__popover__item"},e)})))})};lu.propTypes={items:S.a.arrayOf(S.a.node)},lu.defaultProps={items:[]};var uu=function(e){h()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var o=g()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y()(this,e)});function o(e){var t;return s()(this,o),(t=r.call(this,e)).state={isLoading:!0},t.iframeRef=Object(v.createRef)(),t.setLoaded=t.setLoaded.bind(f()(t)),t}return u()(o,[{key:"componentDidMount",value:function(){this.iframeRef.current.addEventListener("load",this.setLoaded)}},{key:"setLoaded",value:function(){this.setState({isLoading:!1}),this.props.onLoad()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.loadingContent,r=e.src,o=e.title,a=this.state.isLoading,i=q()("woocommerce-web-preview",t,{"is-loading":a});return Object(v.createElement)("div",{className:i},a&&n,Object(v.createElement)("div",{className:"woocommerce-web-preview__iframe-wrapper"},Object(v.createElement)("iframe",{ref:this.iframeRef,title:o,src:r})))}}]),o}(v.Component);uu.propTypes={className:S.a.string,loadingContent:S.a.node,onLoad:S.a.func,src:S.a.string.isRequired,title:S.a.string.isRequired},uu.defaultProps={loadingContent:Object(v.createElement)(Pl,null),onLoad:_.noop}},,function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";n.d(t,"e",(function(){return w})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return D})),n.d(t,"j",(function(){return P})),n.d(t,"h",(function(){return R})),n.d(t,"f",(function(){return I})),n.d(t,"g",(function(){return A})),n.d(t,"i",(function(){return N})),n.d(t,"k",(function(){return L})),n.d(t,"a",(function(){return U}));var r=n(153),o=n.n(r),a=(n(504),n(0),n(13)),i=n(164),c=n(6),s=n(45),l=n(4),u=n(42);function d(e){return"/"===e.charAt(0)}function f(e,t){for(var n=t,r=n+1,o=e.length;r=0;u--){var p=o[u];"."===p?f(o,u):".."===p?(f(o,u),l++):l&&(f(o,u),l--)}if(!c)for(;l--;l)o.unshift("..");!c||""===o[0]||o[0]&&d(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}var h,m=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}function b(){try{return window.history.state||{}}catch(e){return{}}}function g(e){void 0===e&&(e={}),m||function(e,t){if(!e)throw new Error("Invariant failed")}(!1);var t,n,r=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,s=void 0!==c&&c,l=i.getUserConfirmation,d=void 0===l?y:l,f=i.keyLength,h=void 0===f?6:f,g=e.basename?function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}("/"===(n=e.basename).charAt(0)?n:"/"+n):"";function v(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return g&&(a=function(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}(a,g)),p(a,r,n)}function O(){return Math.random().toString(36).substr(2,h)}var w,_,k=(w=null,_=[],{setPrompt:function(e){return w=e,function(){w===e&&(w=null)}},confirmTransitionTo:function(e,t,n,r){if(null!=w){var o="function"==typeof w?w(e,t):w;"string"==typeof o?"function"==typeof n?n(o,r):r(!0):r(!1!==o)}else r(!0)},appendListener:function(e){var t=!0;function n(){t&&e.apply(void 0,arguments)}return _.push(n),function(){t=!1,_=_.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:N(),t=Object(s.applyFilters)("woocommerce_admin_persisted_queries",["period","compare","before","after","interval","type"]);return Object(c.pick)(e,t)};function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(c.uniq)(e.split(",").map((function(e){return parseInt(e,10)})).filter(Boolean))}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"wc-admin",o=T(T({page:r},n),e);return"/"!==t&&(o.path=t),Object(a.addQueryArgs)("admin.php",o)}function N(){var e=w().location.search;return e.length&&Object(i.parse)(e.substring(1))||{}}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"wc-admin",o=A(e,t,n,r);w().push(o)}var U=function(e){var t,n,r;return window.wcNavigation&&!window.wcNavigation.historyPatched&&(t=window.history,n=t.pushState,r=t.replaceState,t.pushState=function(e){var r=new CustomEvent("pushstate",{state:e});return window.dispatchEvent(r),n.apply(t,arguments)},t.replaceState=function(e){var n=new CustomEvent("replacestate",{state:e});return window.dispatchEvent(n),r.apply(t,arguments)},window.wcNavigation.historyPatched=!0),window.addEventListener("popstate",e),window.addEventListener("pushstate",e),window.addEventListener("replacestate",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("pushstate",e),window.removeEventListener("replacestate",e)}}},,,,,,,function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return O})),n.d(t,"e",(function(){return w})),n.d(t,"b",(function(){return _})),n.d(t,"j",(function(){return k}));var r=n(21),o=n.n(r),a=n(6),i=n(1),c=n(164),s="YYYY-MM-DD",l=[{value:"today",label:Object(i.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(i.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(i.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(i.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(i.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(i.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(i.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(i.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(i.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(i.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(i.__)("Custom","woocommerce-admin")}],u=[{value:"previous_period",label:Object(i.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(i.__)("Previous Year","woocommerce-admin")}],d=function(e,t){if(e=e.format(s),"start"===t)return e+"T00:00:00";if("now"===t)return e+"T"+o()().format("HH:mm:00");if("end"===t)return e+"T23:59:59";throw new Error("appendTimestamp requires second parameter to be either `start`, `now` or `end`")};function f(e,t){if(o.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var n=o()(t,[s,e],!0);return n.isValid()?n:null}throw new Error("toMoment requires a string to be passed as an argument")}function p(e,t){var n=e.year()===t.year(),r=n&&e.month()===t.month(),o=n&&r&&e.isSame(t,"day"),a=Object(i.__)("MMM D, YYYY","woocommerce-admin");if(o)return e.format(a);if(r){var c=e.date();return e.format(a).replace(c,"".concat(c," - ").concat(t.date()))}if(n){var s=Object(i.__)("MMM D","woocommerce-admin");return"".concat(e.format(s)," - ").concat(t.format(a))}return"".concat(e.format(a)," - ").concat(t.format(a))}function h(e,t){var n,r,a=o()().startOf(e).subtract(1,e),i=a.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(n=o()().startOf(e).subtract(2,e)).clone().endOf(e);else{var c=i.diff(a,"days");n=(r=a.clone().subtract(1,"days")).clone().subtract(c,"days")}else n=a.clone().subtract(1,"years"),r=i.clone().subtract(1,"years");return"month"===e&&(r=r.clone().endOf("month")),{primaryStart:a,primaryEnd:i,secondaryStart:n,secondaryEnd:r}}function m(e,t){var n,r,a=o()().startOf(e),i=o()(),c=i.diff(a,"days");return"previous_period"===t?(n=a.clone().subtract(1,e),r=i.clone().subtract(1,e)):r=(n=a.clone().subtract(1,"years")).clone().add(c+1,"days").subtract(1,"seconds"),{primaryStart:a,primaryEnd:i,secondaryStart:n,secondaryEnd:r}}var y=Object(a.memoize)((function(e,t,n,r){switch(e){case"today":return m("day",t);case"yesterday":return h("day",t);case"week":return m("week",t);case"last_week":return h("week",t);case"month":return m("month",t);case"last_month":return h("month",t);case"quarter":return m("quarter",t);case"last_quarter":return h("quarter",t);case"year":return m("year",t);case"last_year":return h("year",t);case"custom":var o=r.diff(n,"days");if("previous_period"===t){var a=n.clone().subtract(1,"days");return{primaryStart:n,primaryEnd:r,secondaryStart:a.clone().subtract(o,"days"),secondaryEnd:a}}return{primaryStart:n,primaryEnd:r,secondaryStart:n.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}),(function(e,t,n,r){return[e,t,n&&n.format(),r&&r.format()].join(":")})),b=Object(a.memoize)((function(e,t,n,r,a){if(e&&t)return{period:e,compare:t,after:n?o()(n):null,before:r?o()(r):null};var i=Object(c.parse)(a.replace(/&/g,"&"));return{period:i.period,compare:i.compare,after:i.after?o()(i.after):null,before:i.before?o()(i.before):null}}),(function(e,t,n,r,o){return[e,t,n,r,o].join(":")})),g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=month&compare=previous_year",n=e.period,r=e.compare,o=e.after,a=e.before;return b(n,r,o,a,t)},v=Object(a.memoize)((function(e,t,n,r,o,i){return{primary:{label:Object(a.find)(l,(function(t){return t.value===e})).label,range:p(n,r),after:n,before:r},secondary:{label:Object(a.find)(u,(function(e){return e.value===t})).label,range:p(o,i),after:o,before:i}}}),(function(e,t,n,r,o,a){return[e,t,n&&n.format(),r&&r.format(),o&&o.format(),a&&a.format()].join(":")})),O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=month&compare=previous_year",n=g(e,t),r=n.period,o=n.compare,a=n.after,i=n.before,c=y(r,o,a,i),s=c.primaryStart,l=c.primaryEnd,u=c.secondaryStart,d=c.secondaryEnd;return v(r,o,s,l,u,d)};function w(e){var t=function(e){var t,n,r,a,i=[];if("custom"===e.period){var c=O(e).primary,s=(t=c.before,n=c.after,r=o()(t),a=o()(n),r.diff(a,"days"));i=s>=365?["day","week","month","quarter","year"]:s>=90?["day","week","month","quarter"]:s>=28?["day","week","month"]:s>=7?["day","week"]:s>1&&s<7?["day"]:["hour","day"]}else switch(e.period){case"today":case"yesterday":i=["hour","day"];break;case"week":case"last_week":i=["day"];break;case"month":case"last_month":i=["day","week"];break;case"quarter":case"last_quarter":i=["day","week","month"];break;case"year":case"last_year":i=["day","week","month","quarter"];break;default:i=["day"]}return i}(e),n=t[0],r=e.interval||n;return e.interval&&!t.includes(e.interval)&&(r=n),r}var _={invalid:Object(i.__)("Invalid date","woocommerce-admin"),future:Object(i.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(i.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(i.__)("Start date must be before end date","woocommerce-admin")};function k(e,t,n,r,a){var i=f(a,t);return i?o()().isBefore(i,"day")?{date:null,error:_.future}:"after"===e&&n&&i.isAfter(n,"day")?{date:null,error:_.startAfterEnd}:"before"===e&&r&&i.isBefore(r,"day")?{date:null,error:_.endBeforeStart}:{date:i}:{date:null,error:_.invalid}}},function(e,t,n){var r=n(624),o=n(625),a=n(403),i=n(626);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},o=c(n(8)),a=c(n(627)),i=c(n(630));function c(e){return e&&e.__esModule?e:{default:e}}var s=void 0;t.default=function(e){var t=e.mixedString,n=e.components,c=e.throwErrors;if(s=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(c)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var l=(0,i.default)(t);try{return function e(t,n){var i,c,l,u,d,f,p,h,m=[],y={};for(f=0;f "+s);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){i=n[d.value],l=f;break}m.push(n[d.value])}else m.push(d.value);return i&&(u=function(e,t){var n,r,o=t[e],a=0;for(r=e+1;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return s}));var r=n(6),o=n(515),a=n.n(o),i=n(285);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=a()(e).toRgb(),r=n.r,o=n.g,i=n.b;return"rgba(".concat(r,", ").concat(o,", ").concat(i,", ").concat(t,")")}function s(e){return Object(r.get)(i.a,e,"#000")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DISPLAY_FORMAT="L",t.ISO_FORMAT="YYYY-MM-DD",t.ISO_MONTH_FORMAT="YYYY-MM",t.START_DATE="startDate",t.END_DATE="endDate",t.HORIZONTAL_ORIENTATION="horizontal",t.VERTICAL_ORIENTATION="vertical",t.VERTICAL_SCROLLABLE="verticalScrollable",t.ICON_BEFORE_POSITION="before",t.ICON_AFTER_POSITION="after",t.INFO_POSITION_TOP="top",t.INFO_POSITION_BOTTOM="bottom",t.INFO_POSITION_BEFORE="before",t.INFO_POSITION_AFTER="after",t.ANCHOR_LEFT="left",t.ANCHOR_RIGHT="right",t.OPEN_DOWN="down",t.OPEN_UP="up",t.DAY_SIZE=39,t.BLOCKED_MODIFIER="blocked",t.WEEKDAYS=[0,1,2,3,4,5,6],t.FANG_WIDTH_PX=20,t.FANG_HEIGHT_PX=10,t.DEFAULT_VERTICAL_SPACING=22,t.MODIFIER_KEY_NAMES=new Set(["Shift","Control","Alt","Meta"])},,function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return h}));n(182);var r=n(8),o=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;tr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102c.charCodeAt(0)&&(c=c.trim()),c=[c],0p)&&(U=(q=q.replace(" ",":")).length),01&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=S(e),o=n.length>0?n[0]:"",i=j("%"+o+"%",t),s=i.name,l=i.value,u=!1,d=i.alias;d&&(o=d[0],v(n,g([0,1],d)));for(var f=1,p=!0;f=n.length){var _=c(l,m);l=(p=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:l[m]}else p=b(l,m),l=l[m];p&&!u&&(h[s]=l)}}return l}},function(e,t,n){"use strict";function r(e,t){return`${e}:${JSON.stringify(t,Object.keys(t).sort())}`}function o(e){const t=e.indexOf(":");return t<0?e:e.substring(0,t)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}))},,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(8),i=n(284),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=Object(i.a)((function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(70),u=n(154),d=n(152),f=s,p=function(e){return"theme"!==e&&"innerRef"!==e},h=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:p};function m(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 y(e){for(var t=1;t