{"ast":null,"code":"import React, { Component } from 'react';\nimport { DomHandler, classNames, ObjectUtils, ZIndexUtils } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\nimport PrimeReact from 'primereact/api';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _createSuper$1(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$1();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$1() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar MenubarSubComponent = /*#__PURE__*/function (_Component) {\n _inherits(MenubarSubComponent, _Component);\n\n var _super = _createSuper$1(MenubarSubComponent);\n\n function MenubarSubComponent(props) {\n var _this;\n\n _classCallCheck(this, MenubarSubComponent);\n\n _this = _super.call(this, props);\n _this.state = {\n activeItem: null\n };\n _this.onLeafClick = _this.onLeafClick.bind(_assertThisInitialized(_this));\n _this.onChildItemKeyDown = _this.onChildItemKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MenubarSubComponent, [{\n key: \"getElementRef\",\n value: function getElementRef(el) {\n this.element = el;\n\n if (this.props.forwardRef) {\n return this.props.forwardRef(el);\n }\n\n return this.element;\n }\n }, {\n key: \"onItemMouseEnter\",\n value: function onItemMouseEnter(event, item) {\n if (item.disabled || this.props.mobileActive) {\n event.preventDefault();\n return;\n }\n\n if (this.props.root) {\n if (this.state.activeItem || this.props.popup) {\n this.setState({\n activeItem: item\n });\n }\n } else {\n this.setState({\n activeItem: item\n });\n }\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (!item.url) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item\n });\n }\n\n if (item.items) {\n if (this.state.activeItem && item === this.state.activeItem) {\n this.setState({\n activeItem: null\n });\n } else {\n this.setState({\n activeItem: item\n });\n }\n } else {\n this.onLeafClick();\n }\n }\n }, {\n key: \"onItemKeyDown\",\n value: function onItemKeyDown(event, item) {\n var listItem = event.currentTarget.parentElement;\n\n switch (event.which) {\n //down\n case 40:\n if (this.props.root) {\n if (item.items) {\n this.expandSubmenu(item, listItem);\n }\n } else {\n this.navigateToNextItem(listItem);\n }\n\n event.preventDefault();\n break;\n //up\n\n case 38:\n if (!this.props.root) {\n this.navigateToPrevItem(listItem);\n }\n\n event.preventDefault();\n break;\n //right\n\n case 39:\n if (this.props.root) {\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.children[0].focus();\n }\n } else {\n if (item.items) {\n this.expandSubmenu(item, listItem);\n }\n }\n\n event.preventDefault();\n break;\n //left\n\n case 37:\n if (this.props.root) {\n this.navigateToPrevItem(listItem);\n }\n\n event.preventDefault();\n break;\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(event, listItem);\n }\n }\n }, {\n key: \"onChildItemKeyDown\",\n value: function onChildItemKeyDown(event, childListItem) {\n if (this.props.root) {\n //up\n if (event.which === 38 && childListItem.previousElementSibling == null) {\n this.collapseMenu(childListItem);\n }\n } else {\n //left\n if (event.which === 37) {\n this.collapseMenu(childListItem);\n }\n }\n }\n }, {\n key: \"expandSubmenu\",\n value: function expandSubmenu(item, listItem) {\n this.setState({\n activeItem: item\n });\n setTimeout(function () {\n listItem.children[1].children[0].children[0].focus();\n }, 50);\n }\n }, {\n key: \"collapseMenu\",\n value: function collapseMenu(listItem) {\n this.setState({\n activeItem: null\n });\n listItem.parentElement.previousElementSibling.focus();\n }\n }, {\n key: \"navigateToNextItem\",\n value: function navigateToNextItem(listItem) {\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.children[0].focus();\n }\n }\n }, {\n key: \"navigateToPrevItem\",\n value: function navigateToPrevItem(listItem) {\n var prevItem = this.findPrevItem(listItem);\n\n if (prevItem) {\n prevItem.children[0].focus();\n }\n }\n }, {\n key: \"findNextItem\",\n value: function findNextItem(item) {\n var nextItem = item.nextElementSibling;\n if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? this.findNextItem(nextItem) : nextItem;else return null;\n }\n }, {\n key: \"findPrevItem\",\n value: function findPrevItem(item) {\n var prevItem = item.previousElementSibling;\n if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? this.findPrevItem(prevItem) : prevItem;else return null;\n }\n }, {\n key: \"onLeafClick\",\n value: function onLeafClick() {\n this.setState({\n activeItem: null\n });\n\n if (this.props.onLeafClick) {\n this.props.onLeafClick();\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this2.element && !_this2.element.contains(event.target)) {\n _this2.setState({\n activeItem: null\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.parentActive && !this.props.parentActive) {\n this.setState({\n activeItem: null\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"renderSeparator\",\n value: function renderSeparator(index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: 'separator_' + index,\n className: \"p-menu-separator\",\n role: \"separator\"\n });\n }\n }, {\n key: \"renderSubmenu\",\n value: function renderSubmenu(item) {\n if (item.items) {\n return /*#__PURE__*/React.createElement(MenubarSub, {\n model: item.items,\n mobileActive: this.props.mobileActive,\n onLeafClick: this.onLeafClick,\n onKeyDown: this.onChildItemKeyDown,\n parentActive: item === this.state.activeItem\n });\n }\n\n return null;\n }\n }, {\n key: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this3 = this;\n\n var className = classNames('p-menuitem', {\n 'p-menuitem-active': this.state.activeItem === item\n }, item.className);\n var linkClassName = classNames('p-menuitem-link', {\n 'p-disabled': item.disabled\n });\n var iconClassName = classNames('p-menuitem-icon', item.icon);\n var submenuIconClassName = classNames('p-submenu-icon pi', {\n 'pi-angle-down': this.props.root,\n 'pi-angle-right': !this.props.root\n });\n var icon = item.icon && /*#__PURE__*/React.createElement(\"span\", {\n className: iconClassName\n });\n var label = item.label && /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-menuitem-text\"\n }, item.label);\n var submenuIcon = item.items && /*#__PURE__*/React.createElement(\"span\", {\n className: submenuIconClassName\n });\n var submenu = this.renderSubmenu(item);\n var content = /*#__PURE__*/React.createElement(\"a\", {\n href: item.url || '#',\n role: \"menuitem\",\n className: linkClassName,\n target: item.target,\n \"aria-haspopup\": item.items != null,\n onClick: function onClick(event) {\n return _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\n }\n }, icon, label, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null));\n\n if (item.template) {\n var defaultContentOptions = {\n onClick: function onClick(event) {\n return _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\n },\n className: linkClassName,\n labelClassName: 'p-menuitem-text',\n iconClassName: iconClassName,\n submenuIconClassName: submenuIconClassName,\n element: content,\n props: this.props\n };\n content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: item.label + '_' + index,\n role: \"none\",\n className: className,\n style: item.style,\n onMouseEnter: function onMouseEnter(event) {\n return _this3.onItemMouseEnter(event, item);\n }\n }, content, submenu);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n if (item.separator) return this.renderSeparator(index);else return this.renderMenuitem(item, index);\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this4 = this;\n\n if (this.props.model) {\n return this.props.model.map(function (item, index) {\n return _this4.renderItem(item, index);\n });\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var className = classNames({\n 'p-submenu-list': !this.props.root,\n 'p-menubar-root-list': this.props.root\n });\n var submenu = this.renderMenu();\n return /*#__PURE__*/React.createElement(\"ul\", {\n ref: function ref(el) {\n return _this5.getElementRef(el);\n },\n className: className,\n role: this.props.root ? 'menubar' : 'menu'\n }, submenu);\n }\n }]);\n\n return MenubarSubComponent;\n}(Component);\n\n_defineProperty(MenubarSubComponent, \"defaultProps\", {\n model: null,\n root: false,\n className: null,\n popup: false,\n onLeafClick: null,\n onKeyDown: null,\n parentActive: false,\n mobileActive: false,\n forwardRef: null\n});\n\nvar MenubarSub = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(MenubarSubComponent, _extends({\n forwardRef: ref\n }, props));\n});\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar Menubar = /*#__PURE__*/function (_Component) {\n _inherits(Menubar, _Component);\n\n var _super = _createSuper(Menubar);\n\n function Menubar(props) {\n var _this;\n\n _classCallCheck(this, Menubar);\n\n _this = _super.call(this, props);\n _this.state = {\n mobileActive: false\n };\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));\n _this.onLeafClick = _this.onLeafClick.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Menubar, [{\n key: \"toggle\",\n value: function toggle(event) {\n var _this2 = this;\n\n event.preventDefault();\n this.setState(function (prevState) {\n return {\n mobileActive: !prevState.mobileActive\n };\n }, function () {\n if (_this2.state.mobileActive) {\n ZIndexUtils.set('menu', _this2.rootmenu, PrimeReact.autoZIndex, PrimeReact.zIndex['menu']);\n\n _this2.bindDocumentClickListener();\n } else {\n _this2.unbindDocumentClickListener();\n\n ZIndexUtils.clear(_this2.rootmenu);\n }\n });\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this3 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this3.state.mobileActive && _this3.isOutsideClicked(event)) {\n _this3.setState({\n mobileActive: false\n }, function () {\n _this3.unbindDocumentClickListener();\n\n ZIndexUtils.clear(_this3.rootmenu);\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(event) {\n return this.rootmenu !== event.target && !this.rootmenu.contains(event.target) && this.menubutton !== event.target && !this.menubutton.contains(event.target);\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"onLeafClick\",\n value: function onLeafClick() {\n var _this4 = this;\n\n this.setState({\n mobileActive: false\n }, function () {\n _this4.unbindDocumentClickListener();\n\n ZIndexUtils.clear(_this4.rootmenu);\n });\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n ZIndexUtils.clear(this.rootmenu);\n }\n }, {\n key: \"renderCustomContent\",\n value: function renderCustomContent() {\n if (this.props.children) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-menubar-custom\"\n }, this.props.children);\n }\n\n return null;\n }\n }, {\n key: \"renderStartContent\",\n value: function renderStartContent() {\n if (this.props.start) {\n var start = ObjectUtils.getJSXElement(this.props.start, this.props);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-menubar-start\"\n }, start);\n }\n\n return null;\n }\n }, {\n key: \"renderEndContent\",\n value: function renderEndContent() {\n if (this.props.end) {\n var end = ObjectUtils.getJSXElement(this.props.end, this.props);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-menubar-end\"\n }, end);\n }\n\n return null;\n }\n }, {\n key: \"renderMenuButton\",\n value: function renderMenuButton() {\n var _this5 = this;\n /* eslint-disable */\n\n\n var button = /*#__PURE__*/React.createElement(\"a\", {\n ref: function ref(el) {\n return _this5.menubutton = el;\n },\n href: '#',\n role: \"button\",\n tabIndex: 0,\n className: \"p-menubar-button\",\n onClick: this.toggle\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"pi pi-bars\"\n }));\n /* eslint-enable */\n\n return button;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var className = classNames('p-menubar p-component', {\n 'p-menubar-mobile-active': this.state.mobileActive\n }, this.props.className);\n var start = this.renderStartContent();\n var end = this.renderEndContent();\n var menuButton = this.renderMenuButton();\n return /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: className,\n style: this.props.style\n }, start, menuButton, /*#__PURE__*/React.createElement(MenubarSub, {\n ref: function ref(el) {\n return _this6.rootmenu = el;\n },\n model: this.props.model,\n root: true,\n mobileActive: this.state.mobileActive,\n onLeafClick: this.onLeafClick\n }), end);\n }\n }]);\n\n return Menubar;\n}(Component);\n\n_defineProperty(Menubar, \"defaultProps\", {\n id: null,\n model: null,\n style: null,\n className: null,\n start: null,\n end: null\n});\n\nexport { Menubar };","map":{"version":3,"names":["React","Component","DomHandler","classNames","ObjectUtils","ZIndexUtils","Ripple","PrimeReact","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","prototype","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","constructor","value","_typeof","obj","Symbol","iterator","_possibleConstructorReturn","call","_getPrototypeOf","getPrototypeOf","_defineProperty","_extends","assign","arguments","source","hasOwnProperty","apply","_createSuper$1","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct$1","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","e","MenubarSubComponent","_Component","_super","_this","state","activeItem","onLeafClick","bind","onChildItemKeyDown","getElementRef","el","element","forwardRef","onItemMouseEnter","event","item","disabled","mobileActive","preventDefault","root","popup","setState","onItemClick","url","command","originalEvent","items","onItemKeyDown","listItem","currentTarget","parentElement","which","expandSubmenu","navigateToNextItem","navigateToPrevItem","nextItem","findNextItem","children","focus","onKeyDown","childListItem","previousElementSibling","collapseMenu","setTimeout","prevItem","findPrevItem","nextElementSibling","hasClass","componentDidMount","_this2","documentClickListener","contains","document","addEventListener","componentDidUpdate","prevProps","parentActive","componentWillUnmount","removeEventListener","renderSeparator","index","createElement","className","role","renderSubmenu","MenubarSub","model","renderMenuitem","_this3","linkClassName","iconClassName","icon","submenuIconClassName","label","submenuIcon","submenu","content","href","onClick","template","defaultContentOptions","labelClassName","getJSXElement","style","onMouseEnter","renderItem","separator","renderMenu","_this4","map","render","_this5","ref","_createSuper","_isNativeReflectConstruct","Menubar","toggle","prevState","set","rootmenu","autoZIndex","zIndex","bindDocumentClickListener","unbindDocumentClickListener","clear","isOutsideClicked","menubutton","renderCustomContent","renderStartContent","start","renderEndContent","end","renderMenuButton","button","tabIndex","_this6","menuButton","id"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/menubar/menubar.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { DomHandler, classNames, ObjectUtils, ZIndexUtils } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\nimport PrimeReact from 'primereact/api';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$1() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar MenubarSubComponent = /*#__PURE__*/function (_Component) {\n _inherits(MenubarSubComponent, _Component);\n\n var _super = _createSuper$1(MenubarSubComponent);\n\n function MenubarSubComponent(props) {\n var _this;\n\n _classCallCheck(this, MenubarSubComponent);\n\n _this = _super.call(this, props);\n _this.state = {\n activeItem: null\n };\n _this.onLeafClick = _this.onLeafClick.bind(_assertThisInitialized(_this));\n _this.onChildItemKeyDown = _this.onChildItemKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(MenubarSubComponent, [{\n key: \"getElementRef\",\n value: function getElementRef(el) {\n this.element = el;\n\n if (this.props.forwardRef) {\n return this.props.forwardRef(el);\n }\n\n return this.element;\n }\n }, {\n key: \"onItemMouseEnter\",\n value: function onItemMouseEnter(event, item) {\n if (item.disabled || this.props.mobileActive) {\n event.preventDefault();\n return;\n }\n\n if (this.props.root) {\n if (this.state.activeItem || this.props.popup) {\n this.setState({\n activeItem: item\n });\n }\n } else {\n this.setState({\n activeItem: item\n });\n }\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(event, item) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (!item.url) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item\n });\n }\n\n if (item.items) {\n if (this.state.activeItem && item === this.state.activeItem) {\n this.setState({\n activeItem: null\n });\n } else {\n this.setState({\n activeItem: item\n });\n }\n } else {\n this.onLeafClick();\n }\n }\n }, {\n key: \"onItemKeyDown\",\n value: function onItemKeyDown(event, item) {\n var listItem = event.currentTarget.parentElement;\n\n switch (event.which) {\n //down\n case 40:\n if (this.props.root) {\n if (item.items) {\n this.expandSubmenu(item, listItem);\n }\n } else {\n this.navigateToNextItem(listItem);\n }\n\n event.preventDefault();\n break;\n //up\n\n case 38:\n if (!this.props.root) {\n this.navigateToPrevItem(listItem);\n }\n\n event.preventDefault();\n break;\n //right\n\n case 39:\n if (this.props.root) {\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.children[0].focus();\n }\n } else {\n if (item.items) {\n this.expandSubmenu(item, listItem);\n }\n }\n\n event.preventDefault();\n break;\n //left\n\n case 37:\n if (this.props.root) {\n this.navigateToPrevItem(listItem);\n }\n\n event.preventDefault();\n break;\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(event, listItem);\n }\n }\n }, {\n key: \"onChildItemKeyDown\",\n value: function onChildItemKeyDown(event, childListItem) {\n if (this.props.root) {\n //up\n if (event.which === 38 && childListItem.previousElementSibling == null) {\n this.collapseMenu(childListItem);\n }\n } else {\n //left\n if (event.which === 37) {\n this.collapseMenu(childListItem);\n }\n }\n }\n }, {\n key: \"expandSubmenu\",\n value: function expandSubmenu(item, listItem) {\n this.setState({\n activeItem: item\n });\n setTimeout(function () {\n listItem.children[1].children[0].children[0].focus();\n }, 50);\n }\n }, {\n key: \"collapseMenu\",\n value: function collapseMenu(listItem) {\n this.setState({\n activeItem: null\n });\n listItem.parentElement.previousElementSibling.focus();\n }\n }, {\n key: \"navigateToNextItem\",\n value: function navigateToNextItem(listItem) {\n var nextItem = this.findNextItem(listItem);\n\n if (nextItem) {\n nextItem.children[0].focus();\n }\n }\n }, {\n key: \"navigateToPrevItem\",\n value: function navigateToPrevItem(listItem) {\n var prevItem = this.findPrevItem(listItem);\n\n if (prevItem) {\n prevItem.children[0].focus();\n }\n }\n }, {\n key: \"findNextItem\",\n value: function findNextItem(item) {\n var nextItem = item.nextElementSibling;\n if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? this.findNextItem(nextItem) : nextItem;else return null;\n }\n }, {\n key: \"findPrevItem\",\n value: function findPrevItem(item) {\n var prevItem = item.previousElementSibling;\n if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? this.findPrevItem(prevItem) : prevItem;else return null;\n }\n }, {\n key: \"onLeafClick\",\n value: function onLeafClick() {\n this.setState({\n activeItem: null\n });\n\n if (this.props.onLeafClick) {\n this.props.onLeafClick();\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this2.element && !_this2.element.contains(event.target)) {\n _this2.setState({\n activeItem: null\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.parentActive && !this.props.parentActive) {\n this.setState({\n activeItem: null\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"renderSeparator\",\n value: function renderSeparator(index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: 'separator_' + index,\n className: \"p-menu-separator\",\n role: \"separator\"\n });\n }\n }, {\n key: \"renderSubmenu\",\n value: function renderSubmenu(item) {\n if (item.items) {\n return /*#__PURE__*/React.createElement(MenubarSub, {\n model: item.items,\n mobileActive: this.props.mobileActive,\n onLeafClick: this.onLeafClick,\n onKeyDown: this.onChildItemKeyDown,\n parentActive: item === this.state.activeItem\n });\n }\n\n return null;\n }\n }, {\n key: \"renderMenuitem\",\n value: function renderMenuitem(item, index) {\n var _this3 = this;\n\n var className = classNames('p-menuitem', {\n 'p-menuitem-active': this.state.activeItem === item\n }, item.className);\n var linkClassName = classNames('p-menuitem-link', {\n 'p-disabled': item.disabled\n });\n var iconClassName = classNames('p-menuitem-icon', item.icon);\n var submenuIconClassName = classNames('p-submenu-icon pi', {\n 'pi-angle-down': this.props.root,\n 'pi-angle-right': !this.props.root\n });\n var icon = item.icon && /*#__PURE__*/React.createElement(\"span\", {\n className: iconClassName\n });\n var label = item.label && /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-menuitem-text\"\n }, item.label);\n var submenuIcon = item.items && /*#__PURE__*/React.createElement(\"span\", {\n className: submenuIconClassName\n });\n var submenu = this.renderSubmenu(item);\n var content = /*#__PURE__*/React.createElement(\"a\", {\n href: item.url || '#',\n role: \"menuitem\",\n className: linkClassName,\n target: item.target,\n \"aria-haspopup\": item.items != null,\n onClick: function onClick(event) {\n return _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\n }\n }, icon, label, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null));\n\n if (item.template) {\n var defaultContentOptions = {\n onClick: function onClick(event) {\n return _this3.onItemClick(event, item);\n },\n onKeyDown: function onKeyDown(event) {\n return _this3.onItemKeyDown(event, item);\n },\n className: linkClassName,\n labelClassName: 'p-menuitem-text',\n iconClassName: iconClassName,\n submenuIconClassName: submenuIconClassName,\n element: content,\n props: this.props\n };\n content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: item.label + '_' + index,\n role: \"none\",\n className: className,\n style: item.style,\n onMouseEnter: function onMouseEnter(event) {\n return _this3.onItemMouseEnter(event, item);\n }\n }, content, submenu);\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n if (item.separator) return this.renderSeparator(index);else return this.renderMenuitem(item, index);\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this4 = this;\n\n if (this.props.model) {\n return this.props.model.map(function (item, index) {\n return _this4.renderItem(item, index);\n });\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var className = classNames({\n 'p-submenu-list': !this.props.root,\n 'p-menubar-root-list': this.props.root\n });\n var submenu = this.renderMenu();\n return /*#__PURE__*/React.createElement(\"ul\", {\n ref: function ref(el) {\n return _this5.getElementRef(el);\n },\n className: className,\n role: this.props.root ? 'menubar' : 'menu'\n }, submenu);\n }\n }]);\n\n return MenubarSubComponent;\n}(Component);\n\n_defineProperty(MenubarSubComponent, \"defaultProps\", {\n model: null,\n root: false,\n className: null,\n popup: false,\n onLeafClick: null,\n onKeyDown: null,\n parentActive: false,\n mobileActive: false,\n forwardRef: null\n});\n\nvar MenubarSub = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(MenubarSubComponent, _extends({\n forwardRef: ref\n }, props));\n});\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar Menubar = /*#__PURE__*/function (_Component) {\n _inherits(Menubar, _Component);\n\n var _super = _createSuper(Menubar);\n\n function Menubar(props) {\n var _this;\n\n _classCallCheck(this, Menubar);\n\n _this = _super.call(this, props);\n _this.state = {\n mobileActive: false\n };\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));\n _this.onLeafClick = _this.onLeafClick.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Menubar, [{\n key: \"toggle\",\n value: function toggle(event) {\n var _this2 = this;\n\n event.preventDefault();\n this.setState(function (prevState) {\n return {\n mobileActive: !prevState.mobileActive\n };\n }, function () {\n if (_this2.state.mobileActive) {\n ZIndexUtils.set('menu', _this2.rootmenu, PrimeReact.autoZIndex, PrimeReact.zIndex['menu']);\n\n _this2.bindDocumentClickListener();\n } else {\n _this2.unbindDocumentClickListener();\n\n ZIndexUtils.clear(_this2.rootmenu);\n }\n });\n }\n }, {\n key: \"bindDocumentClickListener\",\n value: function bindDocumentClickListener() {\n var _this3 = this;\n\n if (!this.documentClickListener) {\n this.documentClickListener = function (event) {\n if (_this3.state.mobileActive && _this3.isOutsideClicked(event)) {\n _this3.setState({\n mobileActive: false\n }, function () {\n _this3.unbindDocumentClickListener();\n\n ZIndexUtils.clear(_this3.rootmenu);\n });\n }\n };\n\n document.addEventListener('click', this.documentClickListener);\n }\n }\n }, {\n key: \"isOutsideClicked\",\n value: function isOutsideClicked(event) {\n return this.rootmenu !== event.target && !this.rootmenu.contains(event.target) && this.menubutton !== event.target && !this.menubutton.contains(event.target);\n }\n }, {\n key: \"unbindDocumentClickListener\",\n value: function unbindDocumentClickListener() {\n if (this.documentClickListener) {\n document.removeEventListener('click', this.documentClickListener);\n this.documentClickListener = null;\n }\n }\n }, {\n key: \"onLeafClick\",\n value: function onLeafClick() {\n var _this4 = this;\n\n this.setState({\n mobileActive: false\n }, function () {\n _this4.unbindDocumentClickListener();\n\n ZIndexUtils.clear(_this4.rootmenu);\n });\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n ZIndexUtils.clear(this.rootmenu);\n }\n }, {\n key: \"renderCustomContent\",\n value: function renderCustomContent() {\n if (this.props.children) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-menubar-custom\"\n }, this.props.children);\n }\n\n return null;\n }\n }, {\n key: \"renderStartContent\",\n value: function renderStartContent() {\n if (this.props.start) {\n var start = ObjectUtils.getJSXElement(this.props.start, this.props);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-menubar-start\"\n }, start);\n }\n\n return null;\n }\n }, {\n key: \"renderEndContent\",\n value: function renderEndContent() {\n if (this.props.end) {\n var end = ObjectUtils.getJSXElement(this.props.end, this.props);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-menubar-end\"\n }, end);\n }\n\n return null;\n }\n }, {\n key: \"renderMenuButton\",\n value: function renderMenuButton() {\n var _this5 = this;\n\n /* eslint-disable */\n var button = /*#__PURE__*/React.createElement(\"a\", {\n ref: function ref(el) {\n return _this5.menubutton = el;\n },\n href: '#',\n role: \"button\",\n tabIndex: 0,\n className: \"p-menubar-button\",\n onClick: this.toggle\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"pi pi-bars\"\n }));\n /* eslint-enable */\n\n return button;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var className = classNames('p-menubar p-component', {\n 'p-menubar-mobile-active': this.state.mobileActive\n }, this.props.className);\n var start = this.renderStartContent();\n var end = this.renderEndContent();\n var menuButton = this.renderMenuButton();\n return /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: className,\n style: this.props.style\n }, start, menuButton, /*#__PURE__*/React.createElement(MenubarSub, {\n ref: function ref(el) {\n return _this6.rootmenu = el;\n },\n model: this.props.model,\n root: true,\n mobileActive: this.state.mobileActive,\n onLeafClick: this.onLeafClick\n }), end);\n }\n }]);\n\n return Menubar;\n}(Component);\n\n_defineProperty(Menubar, \"defaultProps\", {\n id: null,\n model: null,\n style: null,\n className: null,\n start: null,\n end: null\n});\n\nexport { Menubar };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,UAAT,EAAqBC,UAArB,EAAiCC,WAAjC,EAA8CC,WAA9C,QAAiE,kBAAjE;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,WAAnC,EAAgD;EAC9C,IAAI,EAAED,QAAQ,YAAYC,WAAtB,CAAJ,EAAwC;IACtC,MAAM,IAAIC,SAA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