woocommerce/chart-stories-chart-story.d...

1 line
89 KiB
JavaScript

(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[5750],{"../../packages/js/components/src/section/context.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>Level});var Level=(0,__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js").createContext)(2)},"../../packages/js/components/src/section/header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>H});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_context__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../packages/js/components/src/section/context.tsx");function H(props){var level=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context__WEBPACK_IMPORTED_MODULE_1__.$),Heading="h"+Math.min(level,6);return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Heading,props)}try{H.displayName="H",H.__docgenInfo={description:'These components are used to frame out the page content for accessible heading hierarchy. Instead of defining fixed heading levels\n(`h2`, `h3`, …) you can use `<H />` to create "section headings", which look to the parent `<Section />`s for the appropriate\nheading level.',displayName:"H",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/section/header.tsx#H"]={docgenInfo:H.__docgenInfo,name:"H",path:"../../packages/js/components/src/section/header.tsx#H"})}catch(__react_docgen_typescript_loader_error){}},"../../packages/js/components/src/section/section.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{w:()=>Section});var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),_wordpress_element__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../packages/js/components/src/section/context.tsx"),_excluded=["component","children"],Section=function Section(_ref){var component=_ref.component,children=_ref.children,props=(0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__.A)(_ref,_excluded),Component=component||"div";return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_context__WEBPACK_IMPORTED_MODULE_2__.$.Consumer,null,(function(level){return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_context__WEBPACK_IMPORTED_MODULE_2__.$.Provider,{value:level+1},!1===component?children:(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Component,props,children))}))};try{Section.displayName="Section",Section.__docgenInfo={description:"The section wrapper, used to indicate a sub-section (and change the header level context).",displayName:"Section",props:{component:{defaultValue:null,description:"The wrapper component for this section. Optional, defaults to `div`. If passed false, no wrapper is used. Additional props passed to Section are passed on to the component.",name:"component",required:!1,type:{name:"string | false | ComponentType<{}>"}},className:{defaultValue:null,description:"Optional classname",name:"className",required:!1,type:{name:"string"}},children:{defaultValue:null,description:"The children inside this section, rendered in the `component`. This increases the context level for the next heading used.",name:"children",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../packages/js/components/src/section/section.tsx#Section"]={docgenInfo:Section.__docgenInfo,name:"Section",path:"../../packages/js/components/src/section/section.tsx#Section"})}catch(__react_docgen_typescript_loader_error){}},"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale sync recursive ^\\.\\/.*$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./af":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/af.js","./af.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/af.js","./ar":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar.js","./ar-dz":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-dz.js","./ar-dz.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-dz.js","./ar-kw":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-kw.js","./ar-kw.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-kw.js","./ar-ly":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ly.js","./ar-ly.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ly.js","./ar-ma":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ma.js","./ar-ma.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-ma.js","./ar-sa":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-sa.js","./ar-sa.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-sa.js","./ar-tn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-tn.js","./ar-tn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar-tn.js","./ar.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ar.js","./az":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/az.js","./az.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/az.js","./be":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/be.js","./be.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/be.js","./bg":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bg.js","./bg.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bg.js","./bm":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bm.js","./bm.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bm.js","./bn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn.js","./bn-bd":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn-bd.js","./bn-bd.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn-bd.js","./bn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bn.js","./bo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bo.js","./bo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bo.js","./br":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/br.js","./br.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/br.js","./bs":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bs.js","./bs.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/bs.js","./ca":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ca.js","./ca.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ca.js","./cs":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cs.js","./cs.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cs.js","./cv":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cv.js","./cv.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cv.js","./cy":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cy.js","./cy.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/cy.js","./da":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/da.js","./da.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/da.js","./de":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de.js","./de-at":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-at.js","./de-at.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-at.js","./de-ch":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-ch.js","./de-ch.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de-ch.js","./de.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/de.js","./dv":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/dv.js","./dv.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/dv.js","./el":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/el.js","./el.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/el.js","./en-au":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-au.js","./en-au.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-au.js","./en-ca":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ca.js","./en-ca.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ca.js","./en-gb":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-gb.js","./en-gb.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-gb.js","./en-ie":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ie.js","./en-ie.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-ie.js","./en-il":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-il.js","./en-il.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-il.js","./en-in":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-in.js","./en-in.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-in.js","./en-nz":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-nz.js","./en-nz.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-nz.js","./en-sg":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-sg.js","./en-sg.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/en-sg.js","./eo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eo.js","./eo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eo.js","./es":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es.js","./es-do":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-do.js","./es-do.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-do.js","./es-mx":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-mx.js","./es-mx.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-mx.js","./es-us":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-us.js","./es-us.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es-us.js","./es.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/es.js","./et":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/et.js","./et.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/et.js","./eu":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eu.js","./eu.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/eu.js","./fa":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fa.js","./fa.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fa.js","./fi":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fi.js","./fi.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fi.js","./fil":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fil.js","./fil.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fil.js","./fo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fo.js","./fo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fo.js","./fr":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr.js","./fr-ca":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ca.js","./fr-ca.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ca.js","./fr-ch":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ch.js","./fr-ch.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr-ch.js","./fr.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fr.js","./fy":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fy.js","./fy.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/fy.js","./ga":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ga.js","./ga.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ga.js","./gd":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gd.js","./gd.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gd.js","./gl":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gl.js","./gl.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gl.js","./gom-deva":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-deva.js","./gom-deva.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-deva.js","./gom-latn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-latn.js","./gom-latn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gom-latn.js","./gu":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gu.js","./gu.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/gu.js","./he":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/he.js","./he.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/he.js","./hi":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hi.js","./hi.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hi.js","./hr":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hr.js","./hr.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hr.js","./hu":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hu.js","./hu.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hu.js","./hy-am":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hy-am.js","./hy-am.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/hy-am.js","./id":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/id.js","./id.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/id.js","./is":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/is.js","./is.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/is.js","./it":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it.js","./it-ch":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it-ch.js","./it-ch.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it-ch.js","./it.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/it.js","./ja":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ja.js","./ja.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ja.js","./jv":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/jv.js","./jv.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/jv.js","./ka":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ka.js","./ka.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ka.js","./kk":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kk.js","./kk.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kk.js","./km":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/km.js","./km.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/km.js","./kn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kn.js","./kn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/kn.js","./ko":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ko.js","./ko.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ko.js","./ku":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ku.js","./ku.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ku.js","./ky":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ky.js","./ky.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ky.js","./lb":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lb.js","./lb.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lb.js","./lo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lo.js","./lo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lo.js","./lt":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lt.js","./lt.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lt.js","./lv":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lv.js","./lv.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/lv.js","./me":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/me.js","./me.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/me.js","./mi":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mi.js","./mi.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mi.js","./mk":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mk.js","./mk.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mk.js","./ml":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ml.js","./ml.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ml.js","./mn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mn.js","./mn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mn.js","./mr":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mr.js","./mr.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mr.js","./ms":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms.js","./ms-my":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms-my.js","./ms-my.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms-my.js","./ms.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ms.js","./mt":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mt.js","./mt.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/mt.js","./my":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/my.js","./my.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/my.js","./nb":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nb.js","./nb.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nb.js","./ne":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ne.js","./ne.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ne.js","./nl":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl.js","./nl-be":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl-be.js","./nl-be.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl-be.js","./nl.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nl.js","./nn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nn.js","./nn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/nn.js","./oc-lnc":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/oc-lnc.js","./oc-lnc.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/oc-lnc.js","./pa-in":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pa-in.js","./pa-in.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pa-in.js","./pl":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pl.js","./pl.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pl.js","./pt":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt.js","./pt-br":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt-br.js","./pt-br.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt-br.js","./pt.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/pt.js","./ro":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ro.js","./ro.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ro.js","./ru":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ru.js","./ru.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ru.js","./sd":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sd.js","./sd.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sd.js","./se":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/se.js","./se.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/se.js","./si":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/si.js","./si.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/si.js","./sk":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sk.js","./sk.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sk.js","./sl":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sl.js","./sl.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sl.js","./sq":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sq.js","./sq.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sq.js","./sr":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr.js","./sr-cyrl":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr-cyrl.js","./sr-cyrl.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr-cyrl.js","./sr.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sr.js","./ss":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ss.js","./ss.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ss.js","./sv":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sv.js","./sv.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sv.js","./sw":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sw.js","./sw.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/sw.js","./ta":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ta.js","./ta.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ta.js","./te":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/te.js","./te.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/te.js","./tet":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tet.js","./tet.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tet.js","./tg":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tg.js","./tg.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tg.js","./th":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/th.js","./th.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/th.js","./tk":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tk.js","./tk.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tk.js","./tl-ph":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tl-ph.js","./tl-ph.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tl-ph.js","./tlh":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tlh.js","./tlh.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tlh.js","./tr":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tr.js","./tr.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tr.js","./tzl":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzl.js","./tzl.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzl.js","./tzm":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm.js","./tzm-latn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm-latn.js","./tzm-latn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm-latn.js","./tzm.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/tzm.js","./ug-cn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ug-cn.js","./ug-cn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ug-cn.js","./uk":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uk.js","./uk.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uk.js","./ur":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ur.js","./ur.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/ur.js","./uz":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz.js","./uz-latn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz-latn.js","./uz-latn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz-latn.js","./uz.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/uz.js","./vi":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/vi.js","./vi.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/vi.js","./x-pseudo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/x-pseudo.js","./x-pseudo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/x-pseudo.js","./yo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/yo.js","./yo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/yo.js","./zh-cn":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-cn.js","./zh-cn.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-cn.js","./zh-hk":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-hk.js","./zh-hk.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-hk.js","./zh-mo":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-mo.js","./zh-mo.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-mo.js","./zh-tw":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-tw.js","./zh-tw.js":"../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale/zh-tw.js"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/locale sync recursive ^\\.\\/.*$"},"../../packages/js/components/src/chart/stories/chart.story.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>chart_story});var react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),slicedToArray=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/slicedToArray.js")),classCallCheck=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),createClass=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/createClass.js"),assertThisInitialized=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),inherits=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/inherits.js"),possibleConstructorReturn=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),getPrototypeOf=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),build_module=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.sort.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.function.bind.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.reduce.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.parse-int.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.6.1/node_modules/@wordpress/i18n/build-module/index.js")),classnames=__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),defaultLocale=__webpack_require__("../../node_modules/.pnpm/d3-format@1.4.5/node_modules/d3-format/src/defaultLocale.js"),lodash=__webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"),line_graph=__webpack_require__("../../node_modules/.pnpm/gridicons@3.4.2_react@17.0.2/node_modules/gridicons/dist/line-graph.js"),stats_alt=__webpack_require__("../../node_modules/.pnpm/gridicons@3.4.2_react@17.0.2/node_modules/gridicons/dist/stats-alt.js"),select_control=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/select-control/index.js"),menu=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/navigable-container/menu.js"),build_module_button=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/button/index.js"),viridis=__webpack_require__("../../node_modules/.pnpm/d3-scale-chromatic@1.5.0/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js"),memoize_one_esm=__webpack_require__("../../node_modules/.pnpm/memoize-one@6.0.0/node_modules/memoize-one/dist/memoize-one.esm.js"),prop_types=__webpack_require__("../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),viewport_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+viewport@4.20.0_react@17.0.2/node_modules/@wordpress/viewport/build-module/index.js"),purify=__webpack_require__("../../node_modules/.pnpm/dompurify@2.4.7/node_modules/dompurify/dist/purify.js"),src=__webpack_require__("../../packages/js/navigation/src/index.js"),spinner=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/spinner/index.js");function _createSuper(Derived){var hasNativeReflectConstruct=function _isNativeReflectConstruct(){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}}();return function _createSuperInternal(){var result,Super=(0,getPrototypeOf.A)(Derived);if(hasNativeReflectConstruct){var NewTarget=(0,getPrototypeOf.A)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return(0,possibleConstructorReturn.A)(this,result)}}var ChartPlaceholder=function(_Component){(0,inherits.A)(ChartPlaceholder,_Component);var _super=_createSuper(ChartPlaceholder);function ChartPlaceholder(){return(0,classCallCheck.A)(this,ChartPlaceholder),_super.apply(this,arguments)}return(0,createClass.A)(ChartPlaceholder,[{key:"render",value:function render(){var height=this.props.height;return(0,react.createElement)("div",{"aria-hidden":"true",className:"woocommerce-chart-placeholder",style:{height}},(0,react.createElement)(spinner.A,null))}}]),ChartPlaceholder}(react.Component);ChartPlaceholder.propTypes={height:prop_types_default().number},ChartPlaceholder.defaultProps={height:0};const placeholder=ChartPlaceholder;var header=__webpack_require__("../../packages/js/components/src/section/header.tsx"),section=__webpack_require__("../../packages/js/components/src/section/section.tsx"),with_instance_id=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js"),toConsumableArray=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),src_defaultLocale=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.set.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("../../node_modules/.pnpm/d3-time-format@2.3.0/node_modules/d3-time-format/src/defaultLocale.js")),getFormatter=function getFormatter(format){var formatter=arguments.length>1&&void 0!==arguments[1]?arguments[1]:defaultLocale.GP;return"function"==typeof format?format:formatter(format)},getUniqueKeys=function getUniqueKeys(data){var keys=new Set(data.reduce((function(acc,curr){return acc.concat(Object.keys(curr))}),[]));return(0,toConsumableArray.A)(keys).filter((function(key){return"date"!==key}))},hooks_build_module=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.date.to-string.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@3.6.1/node_modules/@wordpress/hooks/build-module/index.js")),colorScales=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1],[0,.2,.4,.6,.8,1],[0,.16,.32,.48,.64,.8,1],[0,.14,.28,.42,.56,.7,.84,1],[0,.12,.24,.36,.48,.6,.72,.84,1],[0,.11,.22,.33,.44,.55,.66,.77,.88,1]],getColor=function getColor(orderedKeys,colorScheme){return function(key){var len=orderedKeys.length>10?10:orderedKeys.length,idx=(0,lodash.findIndex)(orderedKeys,(function(d){return d.key===key})),color=(0,hooks_build_module.W5)("woocommerce_admin_chart_item_color",idx,key,orderedKeys);if(color&&color.toString().startsWith("#"))return color;var keyValue=idx<=9?colorScales[len][idx]:0;return colorScheme(keyValue)}};function legend_createSuper(Derived){var hasNativeReflectConstruct=function legend_isNativeReflectConstruct(){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}}();return function _createSuperInternal(){var result,Super=(0,getPrototypeOf.A)(Derived);if(hasNativeReflectConstruct){var NewTarget=(0,getPrototypeOf.A)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return(0,possibleConstructorReturn.A)(this,result)}}var D3Legend=function(_Component){(0,inherits.A)(D3Legend,_Component);var _super=legend_createSuper(D3Legend);function D3Legend(){var _this;return(0,classCallCheck.A)(this,D3Legend),(_this=_super.call(this)).listRef=(0,react.createRef)(),_this.state={isScrollable:!1},_this}return(0,createClass.A)(D3Legend,[{key:"componentDidMount",value:function componentDidMount(){this.updateListScroll(),window.addEventListener("resize",this.updateListScroll)}},{key:"componentWillUnmount",value:function componentWillUnmount(){window.removeEventListener("resize",this.updateListScroll)}},{key:"updateListScroll",value:function updateListScroll(){if(this&&this.listRef){var list=this.listRef.current,scrolledToEnd=list.scrollHeight-list.scrollTop<=list.offsetHeight;this.setState({isScrollable:!scrolledToEnd})}}},{key:"render",value:function render(){var _this$props=this.props,colorScheme=_this$props.colorScheme,data=_this$props.data,handleLegendHover=_this$props.handleLegendHover,handleLegendToggle=_this$props.handleLegendToggle,interactive=_this$props.interactive,legendDirection=_this$props.legendDirection,legendValueFormat=_this$props.legendValueFormat,instanceId=_this$props.instanceId,totalLabel=_this$props.totalLabel,isScrollable=this.state.isScrollable,visibleData=data.filter((function(key){return key.visible})),numberOfRowsVisible=visibleData.length,showTotalLabel="column"===legendDirection&&data.length>10&&totalLabel,keys=data.length>10?visibleData:data;return(0,react.createElement)("div",{className:classnames_default()("woocommerce-legend","woocommerce-legend__direction-".concat(legendDirection),{"has-total":showTotalLabel,"is-scrollable":isScrollable},this.props.className)},(0,react.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:showTotalLabel?this.updateListScroll:null},data.map((function(row){return(0,react.createElement)("li",{className:classnames_default()("woocommerce-legend__item",{"woocommerce-legend__item-checked":row.visible}),key:row.key,id:"woocommerce-legend-".concat(instanceId,"__item__").concat(row.key),onMouseEnter:handleLegendHover,onMouseLeave:handleLegendHover,onBlur:handleLegendHover,onFocus:handleLegendHover},(0,react.createElement)("button",{role:"checkbox","aria-checked":row.visible?"true":"false",onClick:handleLegendToggle,id:"woocommerce-legend-".concat(instanceId,"__item-button__").concat(row.key),disabled:row.visible&&numberOfRowsVisible<=1||!row.visible&&numberOfRowsVisible>=10||!interactive,title:numberOfRowsVisible>=10?(0,build_module.nv)((0,build_module.__)("You may select up to %d items.","woocommerce"),10):""},(0,react.createElement)("div",{className:"woocommerce-legend__item-container"},(0,react.createElement)("span",{className:classnames_default()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":row.visible}),style:row.visible?{color:getColor(keys,colorScheme)(row.key)}:null}),(0,react.createElement)("span",{className:"woocommerce-legend__item-title"},row.label),(0,react.createElement)("span",{className:"woocommerce-legend__item-total"},getFormatter(legendValueFormat)(row.total)))))}))),showTotalLabel&&(0,react.createElement)("div",{className:"woocommerce-legend__total"},totalLabel))}}]),D3Legend}(react.Component);D3Legend.propTypes={className:prop_types_default().string,colorScheme:prop_types_default().func,data:prop_types_default().array.isRequired,handleLegendToggle:prop_types_default().func,handleLegendHover:prop_types_default().func,interactive:prop_types_default().bool,legendDirection:prop_types_default().oneOf(["row","column"]),legendValueFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),totalLabel:prop_types_default().string,instanceId:prop_types_default().number},D3Legend.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};const d3chart_legend=(0,with_instance_id.A)(D3Legend);var src_select=__webpack_require__("../../node_modules/.pnpm/d3-selection@1.4.2/node_modules/d3-selection/src/select.js");function d3base_createSuper(Derived){var hasNativeReflectConstruct=function d3base_isNativeReflectConstruct(){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}}();return function _createSuperInternal(){var result,Super=(0,getPrototypeOf.A)(Derived);if(hasNativeReflectConstruct){var NewTarget=(0,getPrototypeOf.A)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return(0,possibleConstructorReturn.A)(this,result)}}var D3Base=function(_Component){(0,inherits.A)(D3Base,_Component);var _super=d3base_createSuper(D3Base);function D3Base(props){var _this;return(0,classCallCheck.A)(this,D3Base),(_this=_super.call(this,props)).chartRef=(0,react.createRef)(),_this}return(0,createClass.A)(D3Base,[{key:"componentDidMount",value:function componentDidMount(){this.drawUpdatedChart()}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(nextProps){return this.props.className!==nextProps.className||!(0,lodash.isEqual)(this.props.data,nextProps.data)||!(0,lodash.isEqual)(this.props.orderedKeys,nextProps.orderedKeys)||this.props.drawChart!==nextProps.drawChart||this.props.height!==nextProps.height||this.props.chartType!==nextProps.chartType||this.props.width!==nextProps.width}},{key:"componentDidUpdate",value:function componentDidUpdate(){this.drawUpdatedChart()}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.deleteChart()}},{key:"delayedScroll",value:function delayedScroll(){var tooltip=this.props.tooltip;return(0,lodash.throttle)((function(){tooltip&&tooltip.hide()}),300)}},{key:"deleteChart",value:function deleteChart(){(0,src_select.A)(this.chartRef.current).selectAll("svg").remove()}},{key:"drawUpdatedChart",value:function drawUpdatedChart(){(0,this.props.drawChart)(this.getContainer())}},{key:"getContainer",value:function getContainer(){var _this$props=this.props,className=_this$props.className,height=_this$props.height,width=_this$props.width;this.deleteChart();var svg=(0,src_select.A)(this.chartRef.current).append("svg").attr("viewBox","0 0 ".concat(width," ").concat(height)).attr("height",height).attr("width",width).attr("preserveAspectRatio","xMidYMid meet");return className&&svg.attr("class","".concat(className,"__viewbox")),svg.append("g")}},{key:"render",value:function render(){var className=this.props.className;return(0,react.createElement)("div",{className:classnames_default()("d3-base",className),ref:this.chartRef,onScroll:this.delayedScroll()})}}]),D3Base}(react.Component);D3Base.propTypes={className:prop_types_default().string,data:prop_types_default().array,orderedKeys:prop_types_default().array,tooltip:prop_types_default().object,chartType:prop_types_default().string};__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.number.is-finite.js");var d3_scale_src=__webpack_require__("../../node_modules/.pnpm/d3-scale@2.2.2/node_modules/d3-scale/src/index.js"),moment=__webpack_require__("../../node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js"),moment_default=__webpack_require__.n(moment),getXGroupScale=function getXGroupScale(orderedKeys,xScale){var compact=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,d3_scale_src.WH)().domain(orderedKeys.filter((function(d){return d.visible})).map((function(d){return d.key}))).rangeRound([0,xScale.bandwidth()]).padding(compact?0:.07)},getXLineScale=function getXLineScale(uniqueDates,width){return(0,d3_scale_src.w7)().domain([moment_default()(uniqueDates[0],"YYYY-MM-DD HH:mm").toDate(),moment_default()(uniqueDates[uniqueDates.length-1],"YYYY-MM-DD HH:mm").toDate()]).rangeRound([0,width])},getYScaleLimits=function getYScaleLimits(data){var _getYValueLimits=function getYValueLimits(data){var maxYValue=Number.NEGATIVE_INFINITY,minYValue=Number.POSITIVE_INFINITY;return data.forEach((function(d){for(var _i=0,_Object$entries=Object.entries(d);_i<_Object$entries.length;_i++){var _Object$entries$_i=(0,slicedToArray.A)(_Object$entries[_i],2),key=_Object$entries$_i[0],item=_Object$entries$_i[1];"date"!==key&&Number.isFinite(item.value)&&item.value>maxYValue&&(maxYValue=item.value),"date"!==key&&Number.isFinite(item.value)&&item.value<minYValue&&(minYValue=item.value)}})),{upper:maxYValue,lower:minYValue}}(data),minValue=_getYValueLimits.lower,maxValue=_getYValueLimits.upper,step=function calculateStep(minValue,maxValue){if(!Number.isFinite(minValue)||!Number.isFinite(maxValue))return 1;if(0===maxValue&&0===minValue)return 1/3;var maxLimit=4/3*Math.max(-minValue,maxValue),pow3Y=3*Math.pow(10,(Math.log(maxLimit)*Math.LOG10E+1|0)-2),step=Math.ceil(maxLimit/pow3Y)*pow3Y/3;return maxValue<1&&minValue>-1?Math.round(4*step)/4:Math.ceil(step)}(minValue,maxValue),limits={lower:0,upper:0,step};return(Number.isFinite(minValue)||minValue<0)&&(limits.lower=Math.floor(minValue/step)*step,limits.lower===minValue&&0!==minValue&&(limits.lower-=step)),(Number.isFinite(maxValue)||maxValue>0)&&(limits.upper=Math.ceil(maxValue/step)*step,limits.upper===maxValue&&0!==maxValue&&(limits.upper+=step)),limits},d3_axis_src=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.constructor.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.split.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.join.js"),__webpack_require__("../../node_modules/.pnpm/d3-axis@1.0.12/node_modules/d3-axis/src/index.js")),getFactors=function getFactors(inputNum){for(var numFactors=[],i=1;i<=Math.floor(Math.sqrt(inputNum));i++)inputNum%i==0&&(numFactors.push(i),inputNum/i!==i&&numFactors.push(inputNum/i));return numFactors.sort((function(x,y){return x-y})),numFactors},getXTicks=function getXTicks(uniqueDates,width,mode,interval){var maxTicks=function calculateMaxXTicks(width,mode){if(width<783)return 7;if(width>=783&&width<=1130)return 12;if(width>1130&&width<=1365){if("time-comparison"===mode)return 16;if("item-comparison"===mode)return 12}else if(width>1365){if("time-comparison"===mode)return 31;if("item-comparison"===mode)return 16}return 16}(width,mode);if((uniqueDates.length>=63&&"day"===interval||uniqueDates.length>=9&&"week"===interval)&&(uniqueDates=function getFirstDatePerMonth(dates){return dates.filter((function(date,i){return 0===i||moment_default()(date).toDate().getMonth()!==moment_default()(dates[i-1]).toDate().getMonth()}))}(uniqueDates)),uniqueDates.length<=maxTicks||"hour"===interval&&function areDatesInTheSameDay(dates){var firstDate=moment_default()(dates[0]).toDate(),lastDate=moment_default()(dates[dates.length-1]).toDate();return firstDate.getDate()===lastDate.getDate()&&firstDate.getMonth()===lastDate.getMonth()&&firstDate.getFullYear()===lastDate.getFullYear()}(uniqueDates)&&width>783)return uniqueDates;var incrementFactor=function calculateXTicksIncrementFactor(uniqueDates,maxTicks){for(var factors=[],i=1;factors.length<=3;)factors=getFactors(uniqueDates.length-i),i+=1;return factors.find((function(f){return uniqueDates.length/f<maxTicks}))}(uniqueDates,maxTicks);return function getXTicksFromIncrementFactor(uniqueDates,incrementFactor){for(var ticks=[],idx=0;idx<uniqueDates.length;idx+=incrementFactor)ticks.push(uniqueDates[idx]);return ticks[0]!==uniqueDates[0]&&ticks.unshift(uniqueDates[0]),ticks}(uniqueDates,incrementFactor)},removeDuplicateDates=function removeDuplicateDates(d,i,ticks,formatter){var monthDate=moment_default()(d).toDate(),prevMonth=0!==i?ticks[i-1]:ticks[i];return prevMonth=prevMonth instanceof Date?prevMonth:moment_default()(prevMonth).toDate(),0===i?formatter(monthDate):function compareStrings(s1,s2){for(var splitChar=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new RegExp([" |,"],"g"),string1=s1.split(splitChar),string2=s2.split(splitChar),diff=[],_long=s1.length>s2.length?string1:string2,x=0;x<_long.length;x++)string1[x]!==string2[x]&&diff.push(string2[x]);return diff}(formatter(prevMonth),formatter(monthDate)).join(" ")},calculateYGridValues=function calculateYGridValues(numberOfTicks,limit,roundValues){for(var grids=[],i=0;i<numberOfTicks;i++){var val=(i+1)/numberOfTicks*limit,rVal=roundValues?Math.round(val):val;grids[grids.length-1]!==rVal&&grids.push(rVal)}return grids},getYGrids=function getYGrids(yMin,yMax,step){return[0].concat((0,toConsumableArray.A)(function getNegativeYGrids(yMin,step){if(yMin>=0)return[];var numberOfTicks=Math.ceil(-yMin/step);return calculateYGridValues(numberOfTicks,yMin,yMin<-1)}(yMin,step)),(0,toConsumableArray.A)(function getPositiveYGrids(yMax,step){if(yMax<=0)return[];var numberOfTicks=Math.ceil(yMax/step);return calculateYGridValues(numberOfTicks,yMax,yMax>1)}(yMax,step)))},drawAxis=function drawAxis(node,params,scales,formats,margin,isRTL){!function drawXAxis(node,params,scales,formats){var height=scales.yScale.range()[0],ticks=getXTicks(params.uniqueDates,scales.xScale.range()[1],params.mode,params.interval);"line"===params.chartType&&(ticks=ticks.map((function(d){return moment_default()(d).toDate()}))),node.append("g").attr("class","axis").attr("aria-hidden","true").attr("transform","translate(0, ".concat(height,")")).call((0,d3_axis_src.l7)(scales.xScale).tickValues(ticks).tickFormat((function(d,i){return"hour"===params.interval?formats.xFormat(d instanceof Date?d:moment_default()(d).toDate()):removeDuplicateDates(d,i,ticks,formats.xFormat)}))),node.append("g").attr("class","axis axis-month").attr("aria-hidden","true").attr("transform","translate(0, ".concat(height+14,")")).call((0,d3_axis_src.l7)(scales.xScale).tickValues(ticks).tickFormat((function(d,i){return removeDuplicateDates(d,i,ticks,formats.x2Format)}))),node.append("g").attr("class","pipes").attr("transform","translate(0, ".concat(height,")")).call((0,d3_axis_src.l7)(scales.xScale).tickValues(ticks).tickSize(5).tickFormat(""))}(node,params,scales,formats),function drawYAxis(node,scales,formats,margin,isRTL){var yGrids=getYGrids(scales.yScale.domain()[0],scales.yScale.domain()[1],scales.step),width=scales.xScale.range()[1],xPosition=isRTL?width+margin.left+margin.right/2-15:-margin.left/2-15,withPositiveValuesClass=scales.yMin>=0||scales.yMax>0?" with-positive-ticks":"";node.append("g").attr("class","grid"+withPositiveValuesClass).attr("transform","translate(-".concat(margin.left,", 0)")).call((0,d3_axis_src.V4)(scales.yScale).tickValues(yGrids).tickSize(-width-margin.left-margin.right).tickFormat("")),node.append("g").attr("class","axis y-axis").attr("aria-hidden","true").attr("transform","translate("+xPosition+", 12)").attr("text-anchor","start").call((0,d3_axis_src.V4)(scales.yScale).tickValues(0===scales.yMax&&0===scales.yMin?[yGrids[0]]:yGrids).tickFormat((function(d){return d>-1&&d<1&&formats.yBelow1Format?formats.yBelow1Format(d):formats.yFormat(d)})))}(node,scales,formats,margin,isRTL),node.selectAll(".domain").remove(),node.selectAll(".axis .tick line").remove()},on=__webpack_require__("../../node_modules/.pnpm/d3-selection@1.4.2/node_modules/d3-selection/src/selection/on.js"),defineProperty=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js"),__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js"),__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js")),line=(__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.reverse.js"),__webpack_require__("../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/line.js"));function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.A)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var getLine=function getLine(xScale,yScale){return(0,line.A)().x((function(d){return xScale(moment_default()(d.date).toDate())})).y((function(d){return yScale(d.value)}))},drawLines=function drawLines(node,data,params,scales,formats,tooltip){var height=scales.yScale.range()[0],width=scales.xScale.range()[1],line=getLine(scales.xScale,scales.yScale),lineData=function getLineData(data,orderedKeys){return orderedKeys.map((function(row){return{key:row.key,focus:row.focus,visible:row.visible,label:row.label,values:data.map((function(d){return{date:d.date,labelDate:d[row.key].labelDate,focus:row.focus,value:(0,lodash.get)(d,[row.key,"value"],0),visible:row.visible}}))}}))}(data,params.visibleKeys),series=node.append("g").attr("class","lines").selectAll(".line-g").data(lineData.filter((function(d){return d.visible})).reverse()).enter().append("g").attr("class","line-g").attr("role","region").attr("aria-label",(function(d){return d.label||d.key})),dateSpaces=function getDateSpaces(data,uniqueDates,visibleKeys,width,xScale){var reversedKeys=visibleKeys.slice().reverse();return uniqueDates.map((function(d,i){var datapoints=(0,lodash.first)(data.filter((function(item){return item.date===d}))),xNow=xScale(moment_default()(d).toDate()),xPrev=xScale(i>=1?moment_default()(uniqueDates[i-1]).toDate():moment_default()(uniqueDates[0]).toDate()),xNext=i<uniqueDates.length-1?xScale(moment_default()(uniqueDates[i+1]).toDate()):xScale(moment_default()(uniqueDates[uniqueDates.length-1]).toDate()),xWidth=0===i?xNext-xNow:xNow-xPrev,xStart=0===i?0:xNow-xWidth/2;return xWidth=0===i||i===uniqueDates.length-1?xWidth/2:xWidth,{date:d,start:uniqueDates.length>1?xStart:0,width:uniqueDates.length>1?xWidth:width,values:reversedKeys.map((function(_ref){var key=_ref.key,datapoint=datapoints[key];return datapoint?{key,value:datapoint.value,date:d}:null})).filter(Boolean)}}))}(data,params.uniqueDates,params.visibleKeys,width,scales.xScale),lineStroke=width<=1365||params.uniqueDates.length>50?2:3;lineStroke=width<=783?1.25:lineStroke;var dotRadius=width<=1365?4:6;params.uniqueDates.length>1&&series.append("path").attr("fill","none").attr("stroke-width",lineStroke).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",(function(d){return params.getColor(d.key)})).style("opacity",(function(d){var opacity=d.focus?1:.1;return d.visible?opacity:0})).attr("d",(function(d){return line(d.values)}));width/params.uniqueDates.length>36&&series.selectAll("circle").data((function(d,i){return d.values.map((function(row){return _objectSpread(_objectSpread({},row),{},{i,visible:d.visible,key:d.key})}))})).enter().append("circle").attr("r",dotRadius).attr("fill",(function(d){return params.getColor(d.key)})).attr("stroke","#fff").attr("stroke-width",lineStroke+1).style("opacity",(function(d){var opacity=d.focus?1:.1;return d.visible?opacity:0})).attr("cx",(function(d){return scales.xScale(moment_default()(d.date).toDate())})).attr("cy",(function(d){return scales.yScale(d.value)})).attr("tabindex","0").attr("role","graphics-symbol").attr("aria-label",(function(d){var label=formats.screenReaderFormat(d.labelDate instanceof Date?d.labelDate:moment_default()(d.labelDate).toDate());return"".concat(label," ").concat(tooltip.valueFormat(d.value))})).on("focus",(function(d,i,nodes){tooltip.show(data.find((function(e){return e.date===d.date})),nodes[i].parentNode,on.f0.target)})).on("blur",(function(){return tooltip.hide()}));var focus=node.append("g").attr("class","focusspaces").selectAll(".focus").data(dateSpaces).enter().append("g").attr("class","focus"),focusGrid=focus.append("g").attr("class","focus-grid").attr("opacity","0");focusGrid.append("line").attr("x1",(function(d){return scales.xScale(moment_default()(d.date).toDate())})).attr("y1",0).attr("x2",(function(d){return scales.xScale(moment_default()(d.date).toDate())})).attr("y2",height),focusGrid.selectAll("circle").data((function(d){return d.values})).enter().append("circle").attr("r",dotRadius+2).attr("fill",(function(d){return params.getColor(d.key)})).attr("stroke","#fff").attr("stroke-width",lineStroke+2).attr("cx",(function(d){return scales.xScale(moment_default()(d.date).toDate())})).attr("cy",(function(d){return scales.yScale(d.value)})),focus.append("rect").attr("class","focus-g").attr("x",(function(d){return d.start})).attr("y",0).attr("width",(function(d){return d.width})).attr("height",height).attr("opacity",0).on("mouseover",(function(d,i,nodes){var elementWidthRatio=(0===i||i===dateSpaces.length-1)&&params.uniqueDates.length>1?0:.5;tooltip.show(data.find((function(e){return e.date===d.date})),on.f0.target,nodes[i].parentNode,elementWidthRatio)})).on("mouseout",(function(){return tooltip.hide()}))};const utils_tooltip=function(){function ChartTooltip(){(0,classCallCheck.A)(this,ChartTooltip),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return(0,createClass.A)(ChartTooltip,[{key:"calculateXPosition",value:function calculateXPosition(elementCoords,chartCoords,elementWidthRatio){var tooltipSize=this.ref.getBoundingClientRect(),d3BaseCoords=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),leftMargin=Math.max(d3BaseCoords.left,chartCoords.left);if("below"===this.position)return Math.max(this.margin,Math.min(elementCoords.left+.5*elementCoords.width-tooltipSize.width/2-leftMargin,d3BaseCoords.width-tooltipSize.width-this.margin));var xPosition=elementCoords.left+elementCoords.width*elementWidthRatio+this.margin-leftMargin;return xPosition+tooltipSize.width+this.margin>d3BaseCoords.width?Math.max(this.margin,elementCoords.left+elementCoords.width*(1-elementWidthRatio)-tooltipSize.width-this.margin-leftMargin):xPosition}},{key:"calculateYPosition",value:function calculateYPosition(elementCoords,chartCoords){if("below"===this.position)return chartCoords.height;var tooltipSize=this.ref.getBoundingClientRect(),yPosition=elementCoords.top+this.margin-chartCoords.top;return yPosition+tooltipSize.height+this.margin>chartCoords.height?Math.max(0,elementCoords.top-tooltipSize.height-this.margin-chartCoords.top):yPosition}},{key:"calculatePosition",value:function calculatePosition(element){var elementWidthRatio=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,elementCoords=element.getBoundingClientRect(),chartCoords=this.chart.getBoundingClientRect();return"below"===this.position&&(elementWidthRatio=0),{x:this.calculateXPosition(elementCoords,chartCoords,elementWidthRatio),y:this.calculateYPosition(elementCoords,chartCoords)}}},{key:"hide",value:function hide(){(0,src_select.A)(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),(0,src_select.A)(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function getTooltipRowLabel(d,row){return d[row.key].labelDate?this.labelFormat(moment_default()(d[row.key].labelDate).toDate()):row.label||row.key}},{key:"show",value:function show(d,triggerElement,parentNode){var _this=this,elementWidthRatio=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){(0,src_select.A)(parentNode).select(".focus-grid, .barfocus").attr("opacity","1");var position=this.calculatePosition(triggerElement,elementWidthRatio),keys=this.visibleKeys.map((function(row){return'\n\t\t\t\t\t<li class="key-row">\n\t\t\t\t\t\t<div class="key-container">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass="key-color"\n\t\t\t\t\t\t\t\tstyle="background-color: '.concat(_this.getColor(row.key),'">\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class="key-key">').concat(_this.getTooltipRowLabel(d,row),'</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class="key-value">').concat(_this.valueFormat(d[row.key].value),"</span>\n\t\t\t\t\t</li>\n\t\t\t\t")})),tooltipTitle=this.title?this.title:this.labelFormat(moment_default()(d.date).toDate());(0,src_select.A)(this.ref).style("left",position.x+"px").style("top",position.y+"px").style("visibility","visible").html("\n\t\t\t\t<div>\n\t\t\t\t\t<h4>".concat(tooltipTitle,"</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t").concat(keys.join(""),"\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t"))}}}]),ChartTooltip}();function chart_createSuper(Derived){var hasNativeReflectConstruct=function chart_isNativeReflectConstruct(){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}}();return function _createSuperInternal(){var result,Super=(0,getPrototypeOf.A)(Derived);if(hasNativeReflectConstruct){var NewTarget=(0,getPrototypeOf.A)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return(0,possibleConstructorReturn.A)(this,result)}}var isRTL=function isRTL(){return"rtl"===document.documentElement.dir},D3Chart=function(_Component){(0,inherits.A)(D3Chart,_Component);var _super=chart_createSuper(D3Chart);function D3Chart(props){var _this;return(0,classCallCheck.A)(this,D3Chart),(_this=_super.call(this,props)).drawChart=_this.drawChart.bind((0,assertThisInitialized.A)(_this)),_this.getParams=_this.getParams.bind((0,assertThisInitialized.A)(_this)),_this.tooltipRef=(0,react.createRef)(),_this}return(0,createClass.A)(D3Chart,[{key:"getFormatParams",value:function getFormatParams(){var _this$props=this.props,screenReaderFormat=_this$props.screenReaderFormat,xFormat=_this$props.xFormat,x2Format=_this$props.x2Format,yFormat=_this$props.yFormat,yBelow1Format=_this$props.yBelow1Format;return{screenReaderFormat:getFormatter(screenReaderFormat,src_defaultLocale.DC),xFormat:getFormatter(xFormat,src_defaultLocale.DC),x2Format:getFormatter(x2Format,src_defaultLocale.DC),yBelow1Format:getFormatter(yBelow1Format),yFormat:getFormatter(yFormat)}}},{key:"getScaleParams",value:function getScaleParams(uniqueDates){var _this$props2=this.props,data=_this$props2.data,height=_this$props2.height,orderedKeys=_this$props2.orderedKeys,chartType=_this$props2.chartType,margin=this.getMargin(),adjHeight=height-margin.top-margin.bottom,adjWidth=this.getWidth()-margin.left-margin.right,_getYScaleLimits=getYScaleLimits(data),yMax=_getYScaleLimits.upper,yMin=_getYScaleLimits.lower,step=_getYScaleLimits.step,yScale=function getYScale(height,yMin,yMax){return(0,d3_scale_src.m4)().domain([Math.min(yMin,0),0===yMax&&0===yMin?1:Math.max(yMax,0)]).rangeRound([height,0])}(adjHeight,yMin,yMax);if("line"===chartType)return{step,xScale:getXLineScale(uniqueDates,adjWidth),yMax,yMin,yScale};var compact=this.shouldBeCompact(),xScale=function getXScale(uniqueDates,width){var compact=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,d3_scale_src.WH)().domain(uniqueDates).range([0,width]).paddingInner(compact?0:.1)}(uniqueDates,adjWidth,compact);return{step,xGroupScale:getXGroupScale(orderedKeys,xScale,compact),xScale,yMax,yMin,yScale}}},{key:"getParams",value:function getParams(uniqueDates){var _this$props3=this.props,chartType=_this$props3.chartType,colorScheme=_this$props3.colorScheme,data=_this$props3.data,interval=_this$props3.interval,mode=_this$props3.mode,newOrderedKeys=_this$props3.orderedKeys||function getOrderedKeys(data){return getUniqueKeys(data).map((function(key){return{key,focus:!0,total:data.reduce((function(a,c){return a+c[key].value}),0),visible:!0}})).sort((function(a,b){return b.total-a.total}))}(data),visibleKeys=newOrderedKeys.filter((function(key){return key.visible})),colorKeys=newOrderedKeys.length>10?visibleKeys:newOrderedKeys;return{getColor:getColor(colorKeys,colorScheme),interval,mode,chartType,uniqueDates,visibleKeys}}},{key:"createTooltip",value:function createTooltip(chart,getColorFunction,visibleKeys){var _this$props4=this.props,tooltipLabelFormat=_this$props4.tooltipLabelFormat,tooltipPosition=_this$props4.tooltipPosition,tooltipTitle=_this$props4.tooltipTitle,tooltipValueFormat=_this$props4.tooltipValueFormat,tooltip=new utils_tooltip;tooltip.ref=this.tooltipRef.current,tooltip.chart=chart,tooltip.position=tooltipPosition,tooltip.title=tooltipTitle,tooltip.labelFormat=getFormatter(tooltipLabelFormat,src_defaultLocale.DC),tooltip.valueFormat=getFormatter(tooltipValueFormat),tooltip.visibleKeys=visibleKeys,tooltip.getColor=getColorFunction,this.tooltip=tooltip}},{key:"drawChart",value:function drawChart(node){var _this$props5=this.props,data=_this$props5.data,dateParser=_this$props5.dateParser,chartType=_this$props5.chartType,margin=this.getMargin(),uniqueDates=function getUniqueDates(data,dateParser){var parseDate=(0,src_defaultLocale.GY)(dateParser),dates=new Set(data.map((function(d){return d.date})));return(0,toConsumableArray.A)(dates).sort((function(a,b){return parseDate(a)-parseDate(b)}))}(data,dateParser),formats=this.getFormatParams(),params=this.getParams(uniqueDates),scales=this.getScaleParams(uniqueDates),g=node.attr("id","chart").append("g").attr("transform","translate(".concat(margin.left,", ").concat(margin.top,")"));this.createTooltip(g.node(),params.getColor,params.visibleKeys),drawAxis(g,params,scales,formats,margin,isRTL()),"line"===chartType&&drawLines(g,data,params,scales,formats,this.tooltip),"bar"===chartType&&function drawBars(node,data,params,scales,formats,tooltip){var height=scales.yScale.range()[0],barGroup=node.append("g").attr("class","bars").selectAll("g").data(data).enter().append("g").attr("transform",(function(d){return"translate(".concat(scales.xScale(d.date),", 0)")})).attr("class","bargroup").attr("role","region").attr("aria-label",(function(d){return"item-comparison"===params.mode?formats.screenReaderFormat(d.date instanceof Date?d.date:moment_default()(d.date).toDate()):null}));barGroup.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",scales.xGroupScale.range()[1]).attr("height",height).attr("opacity","0").on("mouseover",(function(d,i,nodes){tooltip.show(data.find((function(e){return e.date===d.date})),on.f0.target,nodes[i].parentNode)})).on("mouseout",(function(){return tooltip.hide()}));var basePosition=scales.yScale(0);barGroup.selectAll(".bar").data((function(d){return params.visibleKeys.map((function(row){return{key:row.key,focus:row.focus,value:(0,lodash.get)(d,[row.key,"value"],0),label:row.label,visible:row.visible,date:d.date}}))})).enter().append("rect").attr("class","bar").attr("x",(function(d){return scales.xGroupScale(d.key)})).attr("y",(function(d){return Math.min(basePosition,scales.yScale(d.value))})).attr("width",scales.xGroupScale.bandwidth()).attr("height",(function(d){return Math.abs(basePosition-scales.yScale(d.value))})).attr("fill",(function(d){return params.getColor(d.key)})).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",(function(d){var label=d.label||d.key;if("time-comparison"===params.mode){var dayData=data.find((function(e){return e.date===d.date}));label=formats.screenReaderFormat(moment_default()(dayData[d.key].labelDate).toDate())}return"".concat(label," ").concat(tooltip.valueFormat(d.value))})).style("opacity",(function(d){var opacity=d.focus?1:.1;return d.visible?opacity:0})).on("focus",(function(d,i,nodes){var targetNode=d.value>0?on.f0.target:on.f0.target.parentNode;tooltip.show(data.find((function(e){return e.date===d.date})),targetNode,nodes[i].parentNode)})).on("blur",(function(){return tooltip.hide()}))}(g,data,params,scales,formats,this.tooltip)}},{key:"shouldBeCompact",value:function shouldBeCompact(){var _this$props6=this.props,data=_this$props6.data,chartType=_this$props6.chartType,width=_this$props6.width;if("bar"!==chartType)return!1;var margin=this.getMargin(),widthWithoutMargins=width-margin.left-margin.right,columnsPerDate=data&&data.length?Object.keys(data[0]).length-1:0;return widthWithoutMargins<data.length*(columnsPerDate+1)}},{key:"getMargin",value:function getMargin(){var margin=this.props.margin;return isRTL()?{bottom:margin.bottom,left:margin.right,right:margin.left,top:margin.top}:margin}},{key:"getWidth",value:function getWidth(){var _this$props7=this.props,data=_this$props7.data,chartType=_this$props7.chartType,width=_this$props7.width;if("bar"!==chartType)return width;var margin=this.getMargin(),columnsPerDate=data&&data.length?Object.keys(data[0]).length-1:0,minimumWidth=this.shouldBeCompact()?data.length*columnsPerDate:data.length*(columnsPerDate+1);return Math.max(width,minimumWidth+margin.left+margin.right)}},{key:"getEmptyMessage",value:function getEmptyMessage(){var _this$props8=this.props,baseValue=_this$props8.baseValue,data=_this$props8.data,emptyMessage=_this$props8.emptyMessage;if(emptyMessage&&function isDataEmpty(data){for(var baseValue=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<data.length;i++)for(var _i=0,_Object$entries=Object.entries(data[i]);_i<_Object$entries.length;_i++){var _Object$entries$_i=(0,slicedToArray.A)(_Object$entries[_i],2),key=_Object$entries$_i[0],item=_Object$entries$_i[1];if("date"!==key&&!(0,lodash.isNil)(item.value)&&item.value!==baseValue)return!1}return!0}(data,baseValue))return(0,react.createElement)("div",{className:"d3-chart__empty-message"},emptyMessage)}},{key:"render",value:function render(){var _this$props9=this.props,className=_this$props9.className,data=_this$props9.data,height=_this$props9.height,orderedKeys=_this$props9.orderedKeys,chartType=_this$props9.chartType,computedWidth=this.getWidth();return(0,react.createElement)("div",{className:classnames_default()("d3-chart__container",className),style:{height}},this.getEmptyMessage(),(0,react.createElement)("div",{className:"d3-chart__tooltip",ref:this.tooltipRef}),(0,react.createElement)(D3Base,{className:classnames_default()(className),data,drawChart:this.drawChart,height,orderedKeys,tooltip:this.tooltip,chartType,width:computedWidth}))}}]),D3Chart}(react.Component);D3Chart.propTypes={baseValue:prop_types_default().number,className:prop_types_default().string,colorScheme:prop_types_default().func,data:prop_types_default().array.isRequired,dateParser:prop_types_default().string.isRequired,emptyMessage:prop_types_default().string,height:prop_types_default().number,interval:prop_types_default().oneOf(["hour","day","week","month","quarter","year"]),margin:prop_types_default().shape({bottom:prop_types_default().number,left:prop_types_default().number,right:prop_types_default().number,top:prop_types_default().number}),mode:prop_types_default().oneOf(["item-comparison","time-comparison"]),screenReaderFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),orderedKeys:prop_types_default().array,tooltipLabelFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),tooltipValueFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),tooltipPosition:prop_types_default().oneOf(["below","over"]),tooltipTitle:prop_types_default().string,chartType:prop_types_default().oneOf(["bar","line"]),width:prop_types_default().number,xFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),x2Format:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),yBelow1Format:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),yFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func])},D3Chart.defaultProps={baseValue:0,data:[],dateParser:"%Y-%m-%dT%H:%M:%S",height:200,margin:{bottom:30,left:40,right:0,top:20},mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",tooltipPosition:"over",tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",chartType:"line",width:600,xFormat:"%Y-%m-%d",x2Format:"",yBelow1Format:".3~f",yFormat:".3~s"};const chart=D3Chart;function src_chart_createSuper(Derived){var hasNativeReflectConstruct=function src_chart_isNativeReflectConstruct(){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}}();return function _createSuperInternal(){var result,Super=(0,getPrototypeOf.A)(Derived);if(hasNativeReflectConstruct){var NewTarget=(0,getPrototypeOf.A)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return(0,possibleConstructorReturn.A)(this,result)}}function getD3CurrencyFormat(symbol,position){switch(position){case"left_space":return[symbol+" ",""];case"right":return["",symbol];case"right_space":return[""," "+symbol];default:return[symbol,""]}}var Chart=function(_Component){(0,inherits.A)(Chart,_Component);var _super=src_chart_createSuper(Chart);function Chart(props){var _this;(0,classCallCheck.A)(this,Chart),(_this=_super.call(this,props)).chartBodyRef=(0,react.createRef)();var dataKeys=_this.getDataKeys();return _this.state={focusedKeys:[],visibleKeys:dataKeys.slice(0,10),width:0},_this.prevDataKeys=dataKeys.sort(),_this.handleTypeToggle=_this.handleTypeToggle.bind((0,assertThisInitialized.A)(_this)),_this.handleLegendToggle=_this.handleLegendToggle.bind((0,assertThisInitialized.A)(_this)),_this.handleLegendHover=_this.handleLegendHover.bind((0,assertThisInitialized.A)(_this)),_this.updateDimensions=_this.updateDimensions.bind((0,assertThisInitialized.A)(_this)),_this.getVisibleData=(0,memoize_one_esm.A)(_this.getVisibleData),_this.getOrderedKeys=(0,memoize_one_esm.A)(_this.getOrderedKeys),_this.setInterval=_this.setInterval.bind((0,assertThisInitialized.A)(_this)),_this}return(0,createClass.A)(Chart,[{key:"getDataKeys",value:function getDataKeys(){var _this$props=this.props,data=_this$props.data,filterParam=_this$props.filterParam,mode=_this$props.mode,query=_this$props.query;if("item-comparison"===mode){var selectedIds=filterParam?(0,src.DF)(query[filterParam]):[];return this.getOrderedKeys([],[],selectedIds).map((function(orderedItem){return orderedItem.key}))}return getUniqueKeys(data)}},{key:"componentDidUpdate",value:function componentDidUpdate(){var data=this.props.data;if(data&&data.length){var uniqueKeys=getUniqueKeys(data).sort();if(!(0,lodash.isEqual)(uniqueKeys,this.prevDataKeys)){var dataKeys=this.getDataKeys();this.prevDataKeys=uniqueKeys,this.setState({visibleKeys:dataKeys.slice(0,10)})}}}},{key:"componentDidMount",value:function componentDidMount(){this.updateDimensions(),this.setD3DefaultFormat(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function componentWillUnmount(){window.removeEventListener("resize",this.updateDimensions)}},{key:"setD3DefaultFormat",value:function setD3DefaultFormat(){var _this$props$currency=this.props.currency,currencySymbol=_this$props$currency.symbol,symbolPosition=_this$props$currency.symbolPosition,decimal=_this$props$currency.decimalSeparator,thousands=_this$props$currency.thousandSeparator;(0,defaultLocale.Ay)({decimal,thousands,grouping:[3],currency:getD3CurrencyFormat(currencySymbol,symbolPosition)})}},{key:"getOrderedKeys",value:function getOrderedKeys(focusedKeys,visibleKeys){var selectedIds=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],_this$props2=this.props,data=_this$props2.data,legendTotals=_this$props2.legendTotals,mode=_this$props2.mode;if(!data||0===data.length)return[];var uniqueKeys=data.reduce((function(accum,curr){return Object.entries(curr).forEach((function(_ref){var _ref2=(0,slicedToArray.A)(_ref,2),key=_ref2[0],value=_ref2[1];"date"===key||accum[key]||(accum[key]=value.label)})),accum}),{}),updatedKeys=Object.entries(uniqueKeys).map((function(_ref3){var _ref4=(0,slicedToArray.A)(_ref3,2),key=_ref4[0],label=_ref4[1];return label=(0,purify.sanitize)(label,{ALLOWED_TAGS:[]}),{focus:0===focusedKeys.length||focusedKeys.includes(key),key,label,total:legendTotals&&void 0!==legendTotals[key]?legendTotals[key]:data.reduce((function(a,c){return a+c[key].value}),0),visible:visibleKeys.includes(key)}}));return"item-comparison"===mode?updatedKeys.sort((function(a,b){return b.total-a.total})).filter((function(key){return key.total>0||selectedIds.includes(parseInt(key.key,10))})):updatedKeys}},{key:"handleTypeToggle",value:function handleTypeToggle(chartType){if(this.props.chartType!==chartType){var _this$props3=this.props,path=_this$props3.path,query=_this$props3.query;(0,src.Ze)({chartType},path,query)}}},{key:"handleLegendToggle",value:function handleLegendToggle(event){if(this.props.interactiveLegend){var key=event.currentTarget.id.split("_").pop(),_this$state=this.state,focusedKeys=_this$state.focusedKeys,visibleKeys=_this$state.visibleKeys;visibleKeys.includes(key)?this.setState({focusedKeys:(0,lodash.without)(focusedKeys,key),visibleKeys:(0,lodash.without)(visibleKeys,key)}):this.setState({focusedKeys:focusedKeys.concat([key]),visibleKeys:visibleKeys.concat([key])})}}},{key:"handleLegendHover",value:function handleLegendHover(event){if("mouseleave"===event.type||"blur"===event.type)this.setState({focusedKeys:[]});else if("mouseenter"===event.type||"focus"===event.type){var key=event.currentTarget.id.split("__").pop();this.setState({focusedKeys:[key]})}}},{key:"updateDimensions",value:function updateDimensions(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function getVisibleData(data,orderedKeys){var visibleKeys=orderedKeys.filter((function(d){return d.visible}));return data.map((function(d){var newRow={date:d.date};return visibleKeys.forEach((function(row){newRow[row.key]=d[row.key]})),newRow}))}},{key:"setInterval",value:function setInterval(interval){var _this$props4=this.props,path=_this$props4.path,query=_this$props4.query;(0,src.Ze)({interval},path,query)}},{key:"renderIntervalSelector",value:function renderIntervalSelector(){var _this$props5=this.props,interval=_this$props5.interval,allowedIntervals=_this$props5.allowedIntervals;if(!allowedIntervals||allowedIntervals.length<1)return null;var intervalLabels={hour:(0,build_module.__)("By hour","woocommerce"),day:(0,build_module.__)("By day","woocommerce"),week:(0,build_module.__)("By week","woocommerce"),month:(0,build_module.__)("By month","woocommerce"),quarter:(0,build_module.__)("By quarter","woocommerce"),year:(0,build_module.__)("By year","woocommerce")};return(0,react.createElement)("div",{className:"woocommerce-chart__interval-select"},(0,react.createElement)(select_control.A,{value:interval,options:allowedIntervals.map((function(allowedInterval){return{value:allowedInterval,label:intervalLabels[allowedInterval]}})),onChange:this.setInterval}))}},{key:"getChartHeight",value:function getChartHeight(){var _this$props6=this.props,isViewportLarge=_this$props6.isViewportLarge;return _this$props6.isViewportMobile?180:isViewportLarge?300:220}},{key:"getLegendPosition",value:function getLegendPosition(){var _this$props7=this.props,legendPosition=_this$props7.legendPosition,mode=_this$props7.mode,isViewportWide=_this$props7.isViewportWide;return legendPosition||(isViewportWide&&"time-comparison"===mode?"top":isViewportWide&&"item-comparison"===mode?"side":"bottom")}},{key:"render",value:function render(){var _this$state2=this.state,focusedKeys=_this$state2.focusedKeys,visibleKeys=_this$state2.visibleKeys,width=_this$state2.width,_this$props8=this.props,baseValue=_this$props8.baseValue,chartType=_this$props8.chartType,data=_this$props8.data,dateParser=_this$props8.dateParser,emptyMessage=_this$props8.emptyMessage,filterParam=_this$props8.filterParam,interactiveLegend=_this$props8.interactiveLegend,interval=_this$props8.interval,isRequesting=_this$props8.isRequesting,isViewportLarge=_this$props8.isViewportLarge,itemsLabel=_this$props8.itemsLabel,mode=_this$props8.mode,query=_this$props8.query,screenReaderFormat=_this$props8.screenReaderFormat,showHeaderControls=_this$props8.showHeaderControls,title=_this$props8.title,tooltipLabelFormat=_this$props8.tooltipLabelFormat,tooltipValueFormat=_this$props8.tooltipValueFormat,tooltipTitle=_this$props8.tooltipTitle,valueType=_this$props8.valueType,xFormat=_this$props8.xFormat,x2Format=_this$props8.x2Format,yBelow1Format=_this$props8.yBelow1Format,yFormat=_this$props8.yFormat,selectedIds=filterParam?(0,src.DF)(query[filterParam]):[],orderedKeys=this.getOrderedKeys(focusedKeys,visibleKeys,selectedIds),visibleData=isRequesting?null:this.getVisibleData(data,orderedKeys),legendPosition=this.getLegendPosition(),legendDirection="top"===legendPosition?"row":"column",chartDirection="side"===legendPosition?"row":"column",chartHeight=this.getChartHeight(),legend="hidden"!==legendPosition&&isRequesting?null:(0,react.createElement)(d3chart_legend,{colorScheme:viridis.Ay,data:orderedKeys,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:interactiveLegend,legendDirection,legendValueFormat:tooltipValueFormat,totalLabel:(0,build_module.nv)(itemsLabel,orderedKeys.length)}),d3chartYFormat=yFormat,d3chartYBelow1Format=yBelow1Format;if(!yFormat)switch(valueType){case"average":case"number":d3chartYFormat=",.0f";break;case"currency":d3chartYFormat="$.3~s",d3chartYBelow1Format="$.3~f"}return(0,react.createElement)("div",{className:"woocommerce-chart"},showHeaderControls&&(0,react.createElement)("div",{className:"woocommerce-chart__header"},(0,react.createElement)(header.H,{className:"woocommerce-chart__title"},title),"top"===legendPosition&&legend,this.renderIntervalSelector(),(0,react.createElement)(menu.A,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},(0,react.createElement)(build_module_button.A,{className:classnames_default()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===chartType}),title:(0,build_module.__)("Line chart","woocommerce"),"aria-checked":"line"===chartType,role:"menuitemradio",tabIndex:"line"===chartType?0:-1,onClick:(0,lodash.partial)(this.handleTypeToggle,"line")},(0,react.createElement)(line_graph.A,null)),(0,react.createElement)(build_module_button.A,{className:classnames_default()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===chartType}),title:(0,build_module.__)("Bar chart","woocommerce"),"aria-checked":"bar"===chartType,role:"menuitemradio",tabIndex:"bar"===chartType?0:-1,onClick:(0,lodash.partial)(this.handleTypeToggle,"bar")},(0,react.createElement)(stats_alt.A,null)))),(0,react.createElement)(section.w,{component:!1},(0,react.createElement)("div",{className:classnames_default()("woocommerce-chart__body","woocommerce-chart__body-".concat(chartDirection)),ref:this.chartBodyRef},"side"===legendPosition&&legend,isRequesting&&(0,react.createElement)(react.Fragment,null,(0,react.createElement)("span",{className:"screen-reader-text"},(0,build_module.__)("Your requested data is loading","woocommerce")),(0,react.createElement)(placeholder,{height:chartHeight})),!isRequesting&&width>0&&(0,react.createElement)(chart,{baseValue,chartType,colorScheme:viridis.Ay,data:visibleData,dateParser,height:chartHeight,emptyMessage,interval,margin:{bottom:50,left:80,right:30,top:0},mode,orderedKeys,screenReaderFormat,tooltipLabelFormat,tooltipValueFormat,tooltipPosition:isViewportLarge?"over":"below",tooltipTitle,valueType,width:"row"===chartDirection?width-320:width,xFormat,x2Format,yBelow1Format:d3chartYBelow1Format,yFormat:d3chartYFormat})),"bottom"===legendPosition&&(0,react.createElement)("div",{className:"woocommerce-chart__footer"},legend)))}}]),Chart}(react.Component);Chart.propTypes={allowedIntervals:prop_types_default().array,baseValue:prop_types_default().number,chartType:prop_types_default().oneOf(["bar","line"]),data:prop_types_default().array.isRequired,dateParser:prop_types_default().string.isRequired,emptyMessage:prop_types_default().string,filterParam:prop_types_default().string,itemsLabel:prop_types_default().string,mode:prop_types_default().oneOf(["item-comparison","time-comparison"]),path:prop_types_default().string,query:prop_types_default().object,interactiveLegend:prop_types_default().bool,interval:prop_types_default().oneOf(["hour","day","week","month","quarter","year"]),intervalData:prop_types_default().object,isRequesting:prop_types_default().bool,legendPosition:prop_types_default().oneOf(["bottom","side","top","hidden"]),legendTotals:prop_types_default().object,screenReaderFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),showHeaderControls:prop_types_default().bool,title:prop_types_default().string,tooltipLabelFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),tooltipValueFormat:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().func]),tooltipTitle:prop_types_default().string,valueType:prop_types_default().string,xFormat:prop_types_default().string,x2Format:prop_types_default().string,yBelow1Format:prop_types_default().string,yFormat:prop_types_default().string,currency:prop_types_default().object},Chart.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:","}};const src_chart=(0,viewport_build_module.uE)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(Chart);var data=[{date:"2018-05-30T00:00:00",Hoodie:{label:"Hoodie",value:21599},Sunglasses:{label:"Sunglasses",value:38537},Cap:{label:"Cap",value:106010},Tshirt:{label:"Tshirt",value:26784},Jeans:{label:"Jeans",value:35645},Headphones:{label:"Headphones",value:19500},Lamp:{label:"Lamp",value:21599},Socks:{label:"Socks",value:32572},Mug:{label:"Mug",value:10991},Case:{label:"Case",value:35537}},{date:"2018-05-31T00:00:00",Hoodie:{label:"Hoodie",value:14205},Sunglasses:{label:"Sunglasses",value:24721},Cap:{label:"Cap",value:70131},Tshirt:{label:"Tshirt",value:16784},Jeans:{label:"Jeans",value:25645},Headphones:{label:"Headphones",value:39500},Lamp:{label:"Lamp",value:15599},Socks:{label:"Socks",value:27572},Mug:{label:"Mug",value:110991},Case:{label:"Case",value:21537}},{date:"2018-06-01T00:00:00",Hoodie:{label:"Hoodie",value:10581},Sunglasses:{label:"Sunglasses",value:19991},Cap:{label:"Cap",value:53552},Tshirt:{label:"Tshirt",value:41784},Jeans:{label:"Jeans",value:17645},Headphones:{label:"Headphones",value:22500},Lamp:{label:"Lamp",value:25599},Socks:{label:"Socks",value:14572},Mug:{label:"Mug",value:20991},Case:{label:"Case",value:11537}},{date:"2018-06-02T00:00:00",Hoodie:{label:"Hoodie",value:9250},Sunglasses:{label:"Sunglasses",value:16072},Cap:{label:"Cap",value:47821},Tshirt:{label:"Tshirt",value:18784},Jeans:{label:"Jeans",value:29645},Headphones:{label:"Headphones",value:24500},Lamp:{label:"Lamp",value:18599},Socks:{label:"Socks",value:23572},Mug:{label:"Mug",value:20991},Case:{label:"Case",value:16537}}];const chart_story={title:"WooCommerce Admin/components/Chart",component:src_chart,args:{legendPosition:void 0},argTypes:{legendPosition:{control:{type:"select"},options:[void 0,"bottom","side","top","hidden"]}}};var Default=function Default(_ref){var legendPosition=_ref.legendPosition;return(0,react.createElement)(src_chart,{data,legendPosition})};Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"({\n legendPosition\n}) => <Chart data={data} legendPosition={legendPosition} />",...Default.parameters?.docs?.source}}}}}]);