"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkPHVD7FTUjs = require('./chunk-PHVD7FTU.js');var _chunkEFEZKNU3js = require('./chunk-EFEZKNU3.js');var _react = require('react');var _Popover = require('@mui/material/Popover'); var _Popover2 = _interopRequireDefault(_Popover);var _Stack = require('@mui/material/Stack'); var _Stack2 = _interopRequireDefault(_Stack);var _navigation = require('next/navigation');var _jsxruntime = require('react/jsx-runtime');function u(t){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},u(t)}function O(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,n)}return e}function _(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?O(Object(e),!0).forEach(function(n){w(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function w(t,r,e){return(r=A(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function A(t){var r=L(t,"string");return u(r)=="symbol"?r:r+""}function L(t,r){if(u(t)!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var n=e.call(t,r||"default");if(u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function E(t,r){return I(t)||T(t,r)||M(t,r)||x()}function x(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(t,r){if(t){if(typeof t=="string")return j(t,r);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?j(t,r):void 0}}function j(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function T(t,r){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var n,o,c,a,l=[],i=!0,s=!1;try{if(c=(e=e.call(t)).next,r===0){if(Object(e)!==e)return;i=!1}else for(;!(i=(n=c.call(e)).done)&&(l.push(n.value),l.length!==r);i=!0);}catch(f){s=!0,o=f}finally{try{if(!i&&e.return!=null&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}function I(t){if(Array.isArray(t))return t}var S=function(r){var e=r.data,n=r.depth,o=r.slotProps,c=r.hasTabLayout,a=_react.useRef.call(void 0, null),l=_navigation.usePathname.call(void 0, ),i=_chunkEFEZKNU3js.a.call(void 0, _optionalChain([e, 'optionalAccess', _2 => _2.path]),!!e.children),s=_react.useState.call(void 0, !1),f=E(s,2),p=f[0],b=f[1],y=_react.useCallback.call(void 0, function(){b(!1)},[]);_react.useEffect.call(void 0, function(){p&&y()},[l]);var v=_react.useCallback.call(void 0, function(){e.children&&b(!0)},[e.children]);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkPHVD7FTUjs.a,{ref:a,open:p,onMouseEnter:v,onMouseLeave:y,itemData:e,depth:n,hasChild:!!e.children,active:i,className:i?"active":"",sx:n===1?_optionalChain([o, 'optionalAccess', _3 => _3.rootItem]):_optionalChain([o, 'optionalAccess', _4 => _4.subItem]),hasTabLayout:c}),!!e.children&&_jsxruntime.jsx.call(void 0, _Popover2.default,{disableScrollLock:!0,open:p,anchorEl:a.current,anchorOrigin:n===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:n===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:v,onMouseLeave:y,sx:_({minWidth:160},p&&{pointerEvents:"auto"})}},sx:{pointerEvents:"none"},children:_jsxruntime.jsx.call(void 0, _Stack2.default,{spacing:.5,children:e.children.map(function(h){return _jsxruntime.jsx.call(void 0, S,{data:h,depth:n+1,slotProps:o},h.title)})})})]})},J= exports.a =S;exports.a = J;
//# sourceMappingURL=chunk-IE4MYBTO.js.map