@amirjalili1374/ui-kit 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,5 +4,5 @@
4
4
  * Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
5
5
  * Licensed under MIT
6
6
  */
7
- function get(e){return getComputedStyle(e)}function set(e,t){for(var a in t){var r=t[a];"number"==typeof r&&(r+="px"),e.style[a]=r}return e}function div(e){var t=document.createElement("div");return t.className=e,t}var elMatches="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function matches(e,t){if(!elMatches)throw new Error("No element matching method supported");return elMatches.call(e,t)}function remove(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function queryChildren(e,t){return Array.prototype.filter.call(e.children,function(e){return matches(e,t)})}var cls={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},scrollingClassTimeout={x:null,y:null};function addScrollingClass(e,t){var a=e.element.classList,r=cls.state.scrolling(t);a.contains(r)?clearTimeout(scrollingClassTimeout[t]):a.add(r)}function removeScrollingClass(e,t){scrollingClassTimeout[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(cls.state.scrolling(t))},e.settings.scrollingThreshold)}function setScrollingClassInstantly(e,t){addScrollingClass(e,t),removeScrollingClass(e,t)}var EventElement=function(e){this.element=e,this.handlers={}},prototypeAccessors={isEmpty:{configurable:!0}};EventElement.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},EventElement.prototype.unbind=function(e,t){var a=this;this.handlers[e]=this.handlers[e].filter(function(r){return!(!t||r===t)||(a.element.removeEventListener(e,r,!1),!1)})},EventElement.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},prototypeAccessors.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(EventElement.prototype,prototypeAccessors);var EventManager=function(){this.eventElements=[]};function createEvent(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function processScrollDiff(e,t,a,r,o){var n;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)n=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");n=["contentWidth","containerWidth","scrollLeft","x","left","right"]}processScrollDiff$1(e,a,n,r,o)}function processScrollDiff$1(e,t,a,r,o){var n=a[0],i=a[1],s=a[2],l=a[3],u=a[4],c=a[5];void 0===r&&(r=!0),void 0===o&&(o=!1);var d=e.element;e.reach[l]=null,d[s]<1&&(e.reach[l]="start"),d[s]>e[n]-e[i]-1&&(e.reach[l]="end"),t&&(d.dispatchEvent(createEvent("ps-scroll-"+l)),t<0?d.dispatchEvent(createEvent("ps-scroll-"+u)):t>0&&d.dispatchEvent(createEvent("ps-scroll-"+c)),r&&setScrollingClassInstantly(e,l)),e.reach[l]&&(t||o)&&d.dispatchEvent(createEvent("ps-"+l+"-reach-"+e.reach[l]))}function toInt(e){return parseInt(e,10)||0}function isEditable(e){return matches(e,"input,[contenteditable]")||matches(e,"select,[contenteditable]")||matches(e,"textarea,[contenteditable]")||matches(e,"button,[contenteditable]")}function outerWidth(e){var t=get(e);return toInt(t.width)+toInt(t.paddingLeft)+toInt(t.paddingRight)+toInt(t.borderLeftWidth)+toInt(t.borderRightWidth)}EventManager.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new EventElement(e),this.eventElements.push(t)),t},EventManager.prototype.bind=function(e,t,a){this.eventElement(e).bind(t,a)},EventManager.prototype.unbind=function(e,t,a){var r=this.eventElement(e);r.unbind(t,a),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},EventManager.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},EventManager.prototype.once=function(e,t,a){var r=this.eventElement(e),o=function(e){r.unbind(t,o),a(e)};r.bind(t,o)};var env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function updateGeometry(e){var t=e.element,a=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.floor(r.width),e.containerHeight=Math.floor(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(queryChildren(t,cls.element.rail("x")).forEach(function(e){return remove(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(queryChildren(t,cls.element.rail("y")).forEach(function(e){return remove(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=getThumbSize(e,toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=getThumbSize(e,toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=toInt(a*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),updateCss(t,e),e.scrollbarXActive?t.classList.add(cls.state.active("x")):(t.classList.remove(cls.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?t.classList.add(cls.state.active("y")):(t.classList.remove(cls.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function getThumbSize(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function updateCss(e,t){var a={width:t.railXWidth},r=Math.floor(e.scrollTop);t.isRtl?a.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:a.left=e.scrollLeft,t.isScrollbarXUsingBottom?a.bottom=t.scrollbarXBottom-r:a.top=t.scrollbarXTop+r,set(t.scrollbarXRail,a);var o={top:r,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?o.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:o.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?o.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:o.left=t.scrollbarYLeft+e.scrollLeft,set(t.scrollbarYRail,o),set(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),set(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function clickRail(e){e.event.bind(e.scrollbarY,"mousedown",function(e){return e.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(t){var a=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=a*e.containerHeight,updateGeometry(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(e){return e.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(t){var a=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=a*e.containerWidth,updateGeometry(e),t.stopPropagation()})}var activeSlider=null;function setupScrollHandlers(e){bindMouseScrollHandler(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),bindMouseScrollHandler(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])}function bindMouseScrollHandler(e,t){var a=t[0],r=t[1],o=t[2],n=t[3],i=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=e.element,p=null,h=null,v=null;function m(t){t.touches&&t.touches[0]&&(t[o]=t.touches[0]["page"+u.toUpperCase()]),activeSlider===i&&(d[l]=p+v*(t[o]-h),addScrollingClass(e,u),updateGeometry(e),t.stopPropagation(),t.preventDefault())}function f(){removeScrollingClass(e,u),e[c].classList.remove(cls.state.clicking),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",f),activeSlider=null}function g(t){null===activeSlider&&(activeSlider=i,p=d[l],t.touches&&(t[o]=t.touches[0]["page"+u.toUpperCase()]),h=t[o],v=(e[r]-e[a])/(e[n]-e[s]),t.touches?(document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",f)):(document.addEventListener("mousemove",m),document.addEventListener("mouseup",f)),e[c].classList.add(cls.state.clicking)),t.stopPropagation(),t.cancelable&&t.preventDefault()}e[i].addEventListener("mousedown",g),e[i].addEventListener("touchstart",g)}function keyboard(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",function(a){if(!(a.isDefaultPrevented&&a.isDefaultPrevented()||a.defaultPrevented)&&(matches(t,":hover")||matches(e.scrollbarX,":focus")||matches(e.scrollbarY,":focus"))){var r=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(r){if("IFRAME"===r.tagName)r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(isEditable(r))return}var o=0,n=0;switch(a.which){case 37:o=a.metaKey?-e.contentWidth:a.altKey?-e.containerWidth:-30;break;case 38:n=a.metaKey?e.contentHeight:a.altKey?e.containerHeight:30;break;case 39:o=a.metaKey?e.contentWidth:a.altKey?e.containerWidth:30;break;case 40:n=a.metaKey?-e.contentHeight:a.altKey?-e.containerHeight:-30;break;case 32:n=a.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:n=e.containerHeight;break;case 34:n=-e.containerHeight;break;case 36:n=e.contentHeight;break;case 35:n=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==o||e.settings.suppressScrollY&&0!==n||(t.scrollTop-=n,t.scrollLeft+=o,updateGeometry(e),function(a,r){var o=Math.floor(t.scrollTop);if(0===a){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var n=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===n&&a<0||n>=e.contentWidth-e.containerWidth&&a>0)return!e.settings.wheelPropagation}return!0}(o,n)&&a.preventDefault())}})}function wheel(e){var t=e.element;function a(a){var r=function(e){var t=e.deltaX,a=-1*e.deltaY;return void 0!==t&&void 0!==a||(t=-1*e.wheelDeltaX/6,a=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,a*=10),t!=t&&a!=a&&(t=0,a=e.wheelDelta),e.shiftKey?[-a,-t]:[t,a]}(a),o=r[0],n=r[1];if(!function(e,a,r){if(!env.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(cls.element.consuming))return!0;var n=get(o);if(r&&n.overflowY.match(/(scroll|auto)/)){var i=o.scrollHeight-o.clientHeight;if(i>0&&(o.scrollTop>0&&r<0||o.scrollTop<i&&r>0))return!0}if(a&&n.overflowX.match(/(scroll|auto)/)){var s=o.scrollWidth-o.clientWidth;if(s>0&&(o.scrollLeft>0&&a<0||o.scrollLeft<s&&a>0))return!0}o=o.parentNode}return!1}(a.target,o,n)){var i=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(n?t.scrollTop-=n*e.settings.wheelSpeed:t.scrollTop+=o*e.settings.wheelSpeed,i=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?t.scrollLeft+=o*e.settings.wheelSpeed:t.scrollLeft-=n*e.settings.wheelSpeed,i=!0):(t.scrollTop-=n*e.settings.wheelSpeed,t.scrollLeft+=o*e.settings.wheelSpeed),updateGeometry(e),i=i||function(a,r){var o=Math.floor(t.scrollTop),n=0===t.scrollTop,i=o+t.offsetHeight===t.scrollHeight,s=0===t.scrollLeft,l=t.scrollLeft+t.offsetWidth===t.scrollWidth;return!(Math.abs(r)>Math.abs(a)?n||i:s||l)||!e.settings.wheelPropagation}(o,n),i&&!a.ctrlKey&&(a.stopPropagation(),a.preventDefault())}}void 0!==window.onwheel?e.event.bind(t,"wheel",a):void 0!==window.onmousewheel&&e.event.bind(t,"mousewheel",a)}function touch(e){if(env.supportsTouch||env.supportsIePointer){var t=e.element,a={startOffset:{},startTime:0,speed:{},easingLoop:null};env.supportsTouch?(e.event.bind(t,"touchstart",i),e.event.bind(t,"touchmove",s),e.event.bind(t,"touchend",l)):env.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",i),e.event.bind(t,"pointermove",s),e.event.bind(t,"pointerup",l)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",i),e.event.bind(t,"MSPointerMove",s),e.event.bind(t,"MSPointerUp",l)))}function r(a,r){t.scrollTop-=r,t.scrollLeft-=a,updateGeometry(e)}function o(e){return e.targetTouches?e.targetTouches[0]:e}function n(t){return t.target!==e.scrollbarX&&t.target!==e.scrollbarY&&((!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)))}function i(e){if(n(e)){var t=o(e);a.startOffset.pageX=t.pageX,a.startOffset.pageY=t.pageY,a.startTime=(new Date).getTime(),null!==a.easingLoop&&clearInterval(a.easingLoop)}}function s(i){if(n(i)){var s=o(i),l={pageX:s.pageX,pageY:s.pageY},u=l.pageX-a.startOffset.pageX,c=l.pageY-a.startOffset.pageY;if(function(e,a,r){if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(cls.element.consuming))return!0;var n=get(o);if(r&&n.overflowY.match(/(scroll|auto)/)){var i=o.scrollHeight-o.clientHeight;if(i>0&&(o.scrollTop>0&&r<0||o.scrollTop<i&&r>0))return!0}if(a&&n.overflowX.match(/(scroll|auto)/)){var s=o.scrollWidth-o.clientWidth;if(s>0&&(o.scrollLeft>0&&a<0||o.scrollLeft<s&&a>0))return!0}o=o.parentNode}return!1}(i.target,u,c))return;r(u,c),a.startOffset=l;var d=(new Date).getTime(),p=d-a.startTime;p>0&&(a.speed.x=u/p,a.speed.y=c/p,a.startTime=d),function(a,r){var o=Math.floor(t.scrollTop),n=t.scrollLeft,i=Math.abs(a),s=Math.abs(r);if(s>i){if(r<0&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return 0===window.scrollY&&r>0&&env.isChrome}else if(i>s&&(a<0&&n===e.contentWidth-e.containerWidth||a>0&&0===n))return!0;return!0}(u,c)&&i.cancelable&&i.preventDefault()}}function l(){e.settings.swipeEasing&&(clearInterval(a.easingLoop),a.easingLoop=setInterval(function(){e.isInitialized?clearInterval(a.easingLoop):a.speed.x||a.speed.y?Math.abs(a.speed.x)<.01&&Math.abs(a.speed.y)<.01?clearInterval(a.easingLoop):(r(30*a.speed.x,30*a.speed.y),a.speed.x*=.8,a.speed.y*=.8):clearInterval(a.easingLoop)},10))}}var defaultSettings=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},handlers={"click-rail":clickRail,"drag-thumb":setupScrollHandlers,keyboard:keyboard,wheel:wheel,touch:touch},PerfectScrollbar=function(e,t){var a=this;if(void 0===t&&(t={}),"string"==typeof e&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var r in this.element=e,e.classList.add(cls.main),this.settings=defaultSettings(),t)this.settings[r]=t[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var o,n,i=function(){return e.classList.add(cls.state.focus)},s=function(){return e.classList.remove(cls.state.focus)};this.isRtl="rtl"===get(e).direction,!0===this.isRtl&&e.classList.add(cls.rtl),this.isNegativeScroll=(n=e.scrollLeft,e.scrollLeft=-1,o=e.scrollLeft<0,e.scrollLeft=n,o),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new EventManager,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=div(cls.element.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=div(cls.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=get(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=toInt(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=toInt(l.borderLeftWidth)+toInt(l.borderRightWidth),set(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=toInt(l.marginLeft)+toInt(l.marginRight),set(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=div(cls.element.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=div(cls.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=get(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=toInt(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?outerWidth(this.scrollbarY):null,this.railBorderYWidth=toInt(u.borderTopWidth)+toInt(u.borderBottomWidth),set(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=toInt(u.marginTop)+toInt(u.marginBottom),set(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(e){return handlers[e](a)}),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",function(e){return a.onScroll(e)}),updateGeometry(this)};PerfectScrollbar.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,set(this.scrollbarXRail,{display:"block"}),set(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=toInt(get(this.scrollbarXRail).marginLeft)+toInt(get(this.scrollbarXRail).marginRight),this.railYMarginHeight=toInt(get(this.scrollbarYRail).marginTop)+toInt(get(this.scrollbarYRail).marginBottom),set(this.scrollbarXRail,{display:"none"}),set(this.scrollbarYRail,{display:"none"}),updateGeometry(this),processScrollDiff(this,"top",0,!1,!0),processScrollDiff(this,"left",0,!1,!0),set(this.scrollbarXRail,{display:""}),set(this.scrollbarYRail,{display:""}))},PerfectScrollbar.prototype.onScroll=function(e){this.isAlive&&(updateGeometry(this),processScrollDiff(this,"top",this.element.scrollTop-this.lastScrollTop),processScrollDiff(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},PerfectScrollbar.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),remove(this.scrollbarX),remove(this.scrollbarY),remove(this.scrollbarXRail),remove(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},PerfectScrollbar.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(e){return!e.match(/^ps([-_].+|)$/)}).join(" ")};const C=vue.defineComponent({__name:"PerfectScrollbar",props:{tag:{default:"div"},options:{default:()=>({})}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(e,{expose:t,emit:a}){const r=e,o=a,n=vue.ref(null),i=vue.ref(null);function s(){n.value&&(i.value=new PerfectScrollbar(n.value,r.options),d())}function l(){i.value&&(d(!1),i.value.destroy(),i.value=null)}vue.watch(()=>r.options,()=>{l(),s()},{deep:!0}),vue.onMounted(()=>{n.value&&s()}),vue.onBeforeUnmount(()=>{l()});const u={scroll:c("scroll"),"ps-scroll-y":c("ps-scroll-y"),"ps-scroll-x":c("ps-scroll-x"),"ps-scroll-up":c("ps-scroll-up"),"ps-scroll-down":c("ps-scroll-down"),"ps-scroll-left":c("ps-scroll-left"),"ps-scroll-right":c("ps-scroll-right"),"ps-y-reach-start":c("ps-y-reach-start"),"ps-y-reach-end":c("ps-y-reach-end"),"ps-x-reach-start":c("ps-x-reach-start"),"ps-x-reach-end":c("ps-x-reach-end")};function c(e){return function(t){o(e,t)}}function d(e=!0){var t;null!=(t=i.value)&&t.element&&Object.entries(u).forEach(([t,a])=>{var r,o;e?null==(r=i.value)||r.element.addEventListener(t,a):null==(o=i.value)||o.element.removeEventListener(t,a)})}return t({ps:i}),(e,t)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.tag),{ref_key:"scrollbar",ref:n,class:"ps"},{default:vue.withCtx(()=>[vue.renderSlot(e.$slots,"default")]),_:3},512))}});function useSticky(e){let{rootEl:t,isSticky:a,layoutItemStyles:r}=e;const o=vue.shallowRef(!1),n=vue.shallowRef(0),i=vue.computed(()=>{const e="boolean"==typeof o.value?"top":o.value;return[a.value?{top:"auto",bottom:"auto",height:void 0}:void 0,o.value?{[e]:convertToUnit(n.value)}:{top:r.value.top}]});vue.onMounted(()=>{vue.watch(a,e=>{e?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),vue.onBeforeUnmount(()=>{window.removeEventListener("scroll",l)});let s=0;function l(){const e=s>window.scrollY?"up":"down",a=t.value.getBoundingClientRect(),i=parseFloat(r.value.top??0),l=window.scrollY-Math.max(0,n.value-i),u=a.height+Math.max(n.value,i)-window.scrollY-window.innerHeight,c=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;a.height<window.innerHeight-i?(o.value="top",n.value=i):"up"===e&&"bottom"===o.value||"down"===e&&"top"===o.value?(n.value=window.scrollY+a.top-c,o.value=!0):"down"===e&&u<=0?(n.value=0,o.value="bottom"):"up"===e&&l<=0&&(c?"top"!==o.value&&(n.value=-l+c+i,o.value="top"):(n.value=a.top+l,o.value="top")),s=window.scrollY}return{isStuck:o,stickyStyles:i}}const HORIZON=100,HISTORY=20;function kineticEnergyToVelocity(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function calculateImpulseVelocity(e){if(e.length<2)return 0;if(2===e.length)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let t=0;for(let a=e.length-1;a>0;a--){if(e[a].t===e[a-1].t)continue;const r=kineticEnergyToVelocity(t),o=(e[a].d-e[a-1].d)/(e[a].t-e[a-1].t);t+=(o-r)*Math.abs(o),a===e.length-1&&(t*=.5)}return 1e3*kineticEnergyToVelocity(t)}function useVelocity(){const e={};return{addMovement:function(t){Array.from(t.changedTouches).forEach(a=>{(e[a.identifier]??(e[a.identifier]=new CircularBuffer(HISTORY))).push([t.timeStamp,a])})},endTouch:function(t){Array.from(t.changedTouches).forEach(t=>{delete e[t.identifier]})},getVelocity:function(t){var a;const r=null==(a=e[t])?void 0:a.values().reverse();if(!r)throw new Error(`No samples for touch id ${t}`);const o=r[0],n=[],i=[];for(const e of r){if(o[0]-e[0]>HORIZON)break;n.push({t:e[0],d:e[1].clientX}),i.push({t:e[0],d:e[1].clientY})}return{x:calculateImpulseVelocity(n),y:calculateImpulseVelocity(i),get direction(){const{x:e,y:t}=this,[a,r]=[Math.abs(e),Math.abs(t)];return a>r&&e>=0?"right":a>r&&e<=0?"left":r>a&&t>=0?"down":r>a&&t<=0?"up":oops$1()}}}}}function oops$1(){throw new Error}function useTouch(e){let{el:t,isActive:a,isTemporary:r,width:o,touchless:n,position:i}=e;vue.onMounted(()=>{window.addEventListener("touchstart",y,{passive:!0}),window.addEventListener("touchmove",b,{passive:!1}),window.addEventListener("touchend",S,{passive:!0})}),vue.onBeforeUnmount(()=>{window.removeEventListener("touchstart",y),window.removeEventListener("touchmove",b),window.removeEventListener("touchend",S)});const s=vue.computed(()=>["left","right"].includes(i.value)),{addMovement:l,endTouch:u,getVelocity:c}=useVelocity();let d=!1;const p=vue.shallowRef(!1),h=vue.shallowRef(0),v=vue.shallowRef(0);let m;function f(e,t){return("left"===i.value?e:"right"===i.value?document.documentElement.clientWidth-e:"top"===i.value?e:"bottom"===i.value?document.documentElement.clientHeight-e:oops())-(t?o.value:0)}function g(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const a="left"===i.value?(e-v.value)/o.value:"right"===i.value?(document.documentElement.clientWidth-e-v.value)/o.value:"top"===i.value?(e-v.value)/o.value:"bottom"===i.value?(document.documentElement.clientHeight-e-v.value)/o.value:oops();return t?clamp(a):a}function y(e){if(n.value)return;const t=e.changedTouches[0].clientX,c=e.changedTouches[0].clientY,p="left"===i.value?t<25:"right"===i.value?t>document.documentElement.clientWidth-25:"top"===i.value?c<25:"bottom"===i.value?c>document.documentElement.clientHeight-25:oops(),y=a.value&&("left"===i.value?t<o.value:"right"===i.value?t>document.documentElement.clientWidth-o.value:"top"===i.value?c<o.value:"bottom"===i.value?c>document.documentElement.clientHeight-o.value:oops());(p||y||a.value&&r.value)&&(m=[t,c],v.value=f(s.value?t:c,a.value),h.value=g(s.value?t:c),d=v.value>-20&&v.value<80,u(e),l(e))}function b(e){const t=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY;if(d){if(!e.cancelable)return void(d=!1);const r=Math.abs(t-m[0]),o=Math.abs(a-m[1]);(s.value?r>o&&r>3:o>r&&o>3)?(p.value=!0,d=!1):(s.value?o:r)>3&&(d=!1)}if(!p.value)return;e.preventDefault(),l(e);const r=g(s.value?t:a,!1);h.value=Math.max(0,Math.min(1,r)),r>1?v.value=f(s.value?t:a,!0):r<0&&(v.value=f(s.value?t:a,!1))}function S(e){if(d=!1,!p.value)return;l(e),p.value=!1;const t=c(e.changedTouches[0].identifier),r=Math.abs(t.x),o=Math.abs(t.y),n=s.value?r>o&&r>400:o>r&&o>3;a.value=n?t.direction===({left:"right",right:"left",top:"down",bottom:"up"}[i.value]||oops()):h.value>.5}const k=vue.computed(()=>p.value?{transform:"left"===i.value?`translateX(calc(-100% + ${h.value*o.value}px))`:"right"===i.value?`translateX(calc(100% - ${h.value*o.value}px))`:"top"===i.value?`translateY(calc(-100% + ${h.value*o.value}px))`:"bottom"===i.value?`translateY(calc(100% - ${h.value*o.value}px))`:oops(),transition:"none"}:void 0);return useToggleScope(p,()=>{var e,a;const r=(null==(e=t.value)?void 0:e.style.transform)??null,o=(null==(a=t.value)?void 0:a.style.transition)??null;vue.watchEffect(()=>{var e,a,r,o;null==(a=t.value)||a.style.setProperty("transform",(null==(e=k.value)?void 0:e.transform)||"none"),null==(o=t.value)||o.style.setProperty("transition",(null==(r=k.value)?void 0:r.transition)||null)}),vue.onScopeDispose(()=>{var e,a;null==(e=t.value)||e.style.setProperty("transform",r),null==(a=t.value)||a.style.setProperty("transition",o)})}),{isDragging:p,dragProgress:h,dragStyles:k}}function oops(){throw new Error}const locations=["start","end","left","right","top","bottom"],makeVNavigationDrawerProps=propsFactory({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>locations.includes(e)},sticky:Boolean,...makeBorderProps(),...makeComponentProps(),...makeDelayProps(),...makeDisplayProps({mobile:null}),...makeElevationProps(),...makeLayoutItemProps(),...makeRoundedProps(),...makeTagProps({tag:"nav"}),...makeThemeProps()},"VNavigationDrawer"),VNavigationDrawer=genericComponent()({name:"VNavigationDrawer",props:makeVNavigationDrawerProps(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:a,emit:r,slots:o}=t;const{isRtl:n}=useRtl(),{themeClasses:i}=provideTheme(e),{borderClasses:s}=useBorder(e),{backgroundColorClasses:l,backgroundColorStyles:u}=useBackgroundColor(()=>e.color),{elevationClasses:c}=useElevation(e),{displayClasses:d,mobile:p}=useDisplay(e),{roundedClasses:h}=useRounded(e),v=useRouter(),m=useProxiedModel(e,"modelValue",null,e=>!!e),{ssrBootStyles:f}=useSsrBoot(),{scopeId:g}=useScopeId(),y=vue.ref(),b=vue.shallowRef(!1),{runOpenDelay:S,runCloseDelay:k}=useDelay(e,e=>{b.value=e}),C=vue.computed(()=>e.rail&&e.expandOnHover&&b.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),x=vue.computed(()=>toPhysical(e.location,n.value)),V=vue.toRef(()=>e.persistent),P=vue.computed(()=>!e.permanent&&(p.value||e.temporary)),w=vue.computed(()=>e.sticky&&!P.value&&"bottom"!==x.value);useToggleScope(()=>e.expandOnHover&&null!=e.rail,()=>{vue.watch(b,e=>r("update:rail",!e))}),useToggleScope(()=>!e.disableResizeWatcher,()=>{vue.watch(P,t=>!e.permanent&&vue.nextTick(()=>m.value=!t))}),useToggleScope(()=>!e.disableRouteWatcher&&!!v,()=>{vue.watch(v.currentRoute,()=>P.value&&(m.value=!1))}),vue.watch(()=>e.permanent,e=>{e&&(m.value=!0)}),null!=e.modelValue||P.value||(m.value=e.permanent||!p.value);const{isDragging:E,dragProgress:_}=useTouch({el:y,isActive:m,isTemporary:P,width:C,touchless:vue.toRef(()=>e.touchless),position:x}),T=vue.computed(()=>{const t=P.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):C.value;return E.value?t*_.value:t}),{layoutItemStyles:I,layoutItemScrimStyles:A}=useLayoutItem({id:e.name,order:vue.computed(()=>parseInt(e.order,10)),position:x,layoutSize:T,elementSize:C,active:vue.readonly(m),disableTransitions:vue.toRef(()=>E.value),absolute:vue.computed(()=>e.absolute||w.value&&"string"!=typeof B.value)}),{isStuck:B,stickyStyles:D}=useSticky({rootEl:y,isSticky:w,layoutItemStyles:I}),F=useBackgroundColor(()=>"string"==typeof e.scrim?e.scrim:null),M=vue.computed(()=>({...E.value?{opacity:.2*_.value,transition:"none"}:void 0,...A.value}));return provideDefaults({VList:{bgColor:"transparent"}}),useRender(()=>{const t=o.image||e.image;return vue.createElementVNode(vue.Fragment,null,[vue.createVNode(e.tag,vue.mergeProps({ref:y,onMouseenter:S,onMouseleave:k,class:["v-navigation-drawer",`v-navigation-drawer--${x.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":b.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":P.value,"v-navigation-drawer--persistent":V.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":w.value},i.value,l.value,s.value,d.value,c.value,h.value,e.class],style:[u.value,I.value,f.value,D.value,e.style]},g,a),{default:()=>{var a,r,n;return[t&&vue.createElementVNode("div",{key:"image",class:"v-navigation-drawer__img"},[o.image?vue.createVNode(VDefaultsProvider,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},o.image):vue.createVNode(VImg,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),o.prepend&&vue.createElementVNode("div",{class:"v-navigation-drawer__prepend"},[null==(a=o.prepend)?void 0:a.call(o)]),vue.createElementVNode("div",{class:"v-navigation-drawer__content"},[null==(r=o.default)?void 0:r.call(o)]),o.append&&vue.createElementVNode("div",{class:"v-navigation-drawer__append"},[null==(n=o.append)?void 0:n.call(o)])]}}),vue.createVNode(vue.Transition,{name:"fade-transition"},{default:()=>[P.value&&(E.value||m.value)&&!!e.scrim&&vue.createElementVNode("div",vue.mergeProps({class:["v-navigation-drawer__scrim",F.backgroundColorClasses.value],style:[M.value,F.backgroundColorStyles.value],onClick:()=>{V.value||(m.value=!1)}},g),null)]})])}),{isStuck:B}}}),_hoisted_1$2={key:0,class:"logo d-flex align-center pa-4"},_hoisted_2$1=["innerHTML"],_hoisted_3$1=["src"],_hoisted_4$1={key:2,class:"logo-text text-h6 ms-2"},_hoisted_5$1=["src"],_sfc_main$2=vue.defineComponent({__name:"AppSidebar",props:{menuItems:{default:()=>[]},logo:{},logoLight:{},logoSvg:{},logoText:{},miniSidebar:{type:Boolean,default:!1},permanent:{type:Boolean,default:!0},temporary:{type:Boolean,default:!1},rail:{type:Boolean,default:!1},location:{default:"left"},width:{default:265},railWidth:{default:75},containerClass:{default:""},hideDefaultLogo:{type:Boolean,default:!1}},setup(e){const t=e,a=useCustomizerStore(),r=vueRouter.useRoute(),o=vueRouter.useRouter(),n=vue.computed(()=>t.miniSidebar||a.mini_sidebar),i=vue.computed({get:()=>a.Sidebar_drawer,set:e=>a.SET_SIDEBAR_DRAWER(e)}),s=vue.computed(()=>n.value?t.railWidth:t.width),l=e=>{e.disabled||(e.to?o.push(e.to):e.href&&window.open(e.href,"_blank"))},u=e=>!!e.to&&(r.path===e.to||r.path.startsWith(e.to+"/")),c=vue.computed(()=>n.value&&!i.value);return(t,r)=>(vue.openBlock(),vue.createBlock(VNavigationDrawer,{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=e=>i.value=e),permanent:e.permanent&&!e.temporary,temporary:e.temporary,rail:e.rail||n.value&&!c.value,"expand-on-hover":c.value,location:e.location,width:s.value,class:vue.normalizeClass([["app-sidebar leftSidebar",{"mini-sidebar":n.value},e.containerClass],"border-0"])},{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"logo",{isMini:n.value,themeMode:vue.unref(a).themeMode},()=>[e.hideDefaultLogo?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[e.logoSvg||e.logo||e.logoText?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[e.logoSvg?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"logo-svg",innerHTML:e.logoSvg,style:{height:"40px",display:"flex",alignItems:"center"}},null,8,_hoisted_2$1)):e.logo&&!n.value?(vue.openBlock(),vue.createElementBlock("img",{key:1,src:"dark"===vue.unref(a).themeMode&&e.logoLight?e.logoLight:e.logo,alt:"Logo",class:"logo-img",style:{"max-height":"40px","max-width":"100%"}},null,8,_hoisted_3$1)):vue.createCommentVNode("",!0),e.logoText&&!n.value?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$1,vue.toDisplayString(e.logoText),1)):vue.createCommentVNode("",!0),!e.logoSvg&&e.logo&&n.value?(vue.openBlock(),vue.createElementBlock("img",{key:3,src:"dark"===vue.unref(a).themeMode&&e.logoLight?e.logoLight:e.logo,alt:"Logo",class:"logo-img-mini",style:{height:"40px",width:"40px","object-fit":"contain"}},null,8,_hoisted_5$1)):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createBlock(VSpacer,{key:1}))]))],!0),vue.createVNode(VDivider),vue.createVNode(vue.unref(C),{class:"scrollnavbar",options:{wheelSpeed:1,swipeEasing:!0,suppressScrollX:!0}},{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"menu",{items:e.menuItems,isActive:u,navigate:l},()=>[vue.createVNode(VList,{lines:!1,class:"pa-0"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.menuItems,(e,t)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:t},[e.divider?(vue.openBlock(),vue.createBlock(VDivider,{key:0,class:"my-2"})):e.items&&e.items.length>0?(vue.openBlock(),vue.createBlock(VListGroup,{key:1,value:e.items.some(e=>u(e))},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VListItem,vue.mergeProps({ref_for:!0},t,{disabled:e.disabled}),vue.createSlots({prepend:vue.withCtx(()=>["string"==typeof e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):e.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.icon),{key:1})):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024)]),_:2},[e.chip?{name:"append",fn:vue.withCtx(()=>[vue.createVNode(VChip,{color:e.chip.color||"primary",size:"small",class:"ms-2"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.chip.content),1)]),_:2},1032,["color"])]),key:"0"}:void 0]),1040,["disabled"])]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.items,(e,t)=>(vue.openBlock(),vue.createBlock(VListItem,{key:t,to:e.to,href:e.href,disabled:e.disabled,active:u(e),onClick:t=>l(e)},vue.createSlots({prepend:vue.withCtx(()=>["string"==typeof e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):e.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.icon),{key:1})):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024)]),_:2},[e.chip?{name:"append",fn:vue.withCtx(()=>[vue.createVNode(VChip,{color:e.chip.color||"primary",size:"small",class:"ms-2"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.chip.content),1)]),_:2},1032,["color"])]),key:"0"}:void 0]),1032,["to","href","disabled","active","onClick"]))),128))]),_:2},1032,["value"])):(vue.openBlock(),vue.createBlock(VListItem,{key:2,to:e.to,href:e.href,disabled:e.disabled,active:u(e),onClick:t=>l(e)},vue.createSlots({prepend:vue.withCtx(()=>["string"==typeof e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):e.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.icon),{key:1})):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024)]),_:2},[e.chip?{name:"append",fn:vue.withCtx(()=>[vue.createVNode(VChip,{color:e.chip.color||"primary",size:"small",class:"ms-2"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.chip.content),1)]),_:2},1032,["color"])]),key:"0"}:void 0]),1032,["to","href","disabled","active","onClick"]))],64))),128))]),_:1})],!0)]),_:3}),vue.renderSlot(t.$slots,"bottom",{},void 0,!0)]),_:3},8,["modelValue","permanent","temporary","rail","expand-on-hover","location","width","class"]))}}),AppSidebar=_export_sfc$1(_sfc_main$2,[["__scopeId","data-v-043a3ef2"]]),makeVToolbarTitleProps=propsFactory({text:String,...makeComponentProps(),...makeTagProps()},"VToolbarTitle"),VToolbarTitle=genericComponent()({name:"VToolbarTitle",props:makeVToolbarTitleProps(),setup(e,t){let{slots:a}=t;return useRender(()=>{const t=!!(a.default||a.text||e.text);return vue.createVNode(e.tag,{class:vue.normalizeClass(["v-toolbar-title",e.class]),style:vue.normalizeStyle(e.style)},{default:()=>{var r;return[t&&vue.createElementVNode("div",{class:"v-toolbar-title__placeholder"},[a.text?a.text():e.text,null==(r=a.default)?void 0:r.call(a)])]}})}),{}}}),allowedDensities=[null,"prominent","default","comfortable","compact"],makeVToolbarProps=propsFactory({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>allowedDensities.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...makeBorderProps(),...makeComponentProps(),...makeElevationProps(),...makeRoundedProps(),...makeTagProps({tag:"header"}),...makeThemeProps()},"VToolbar"),VToolbar=genericComponent()({name:"VToolbar",props:makeVToolbarProps(),setup(e,t){var a;let{slots:r}=t;const{backgroundColorClasses:o,backgroundColorStyles:n}=useBackgroundColor(()=>e.color),{borderClasses:i}=useBorder(e),{elevationClasses:s}=useElevation(e),{roundedClasses:l}=useRounded(e),{themeClasses:u}=provideTheme(e),{rtlClasses:c}=useRtl(),d=vue.shallowRef(null===e.extended?!!(null==(a=r.extension)?void 0:a.call(r)):e.extended),p=vue.computed(()=>parseInt(Number(e.height)+("prominent"===e.density?Number(e.height):0)-("comfortable"===e.density?8:0)-("compact"===e.density?16:0),10)),h=vue.computed(()=>d.value?parseInt(Number(e.extensionHeight)+("prominent"===e.density?Number(e.extensionHeight):0)-("comfortable"===e.density?4:0)-("compact"===e.density?8:0),10):0);return provideDefaults({VBtn:{variant:"text"}}),useRender(()=>{var t;const a=!(!e.title&&!r.title),v=!(!r.image&&!e.image),m=null==(t=r.extension)?void 0:t.call(r);return d.value=null===e.extended?!!m:e.extended,vue.createVNode(e.tag,{class:vue.normalizeClass(["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},o.value,i.value,s.value,l.value,u.value,c.value,e.class]),style:vue.normalizeStyle([n.value,e.style])},{default:()=>[v&&vue.createElementVNode("div",{key:"image",class:"v-toolbar__image"},[r.image?vue.createVNode(VDefaultsProvider,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):vue.createVNode(VImg,{key:"image-img",cover:!0,src:e.image},null)]),vue.createVNode(VDefaultsProvider,{defaults:{VTabs:{height:convertToUnit(p.value)}}},{default:()=>{var t,o,n;return[vue.createElementVNode("div",{class:"v-toolbar__content",style:{height:convertToUnit(p.value)}},[r.prepend&&vue.createElementVNode("div",{class:"v-toolbar__prepend"},[null==(t=r.prepend)?void 0:t.call(r)]),a&&vue.createVNode(VToolbarTitle,{key:"title",text:e.title},{text:r.title}),null==(o=r.default)?void 0:o.call(r),r.append&&vue.createElementVNode("div",{class:"v-toolbar__append"},[null==(n=r.append)?void 0:n.call(r)])])]}}),vue.createVNode(VDefaultsProvider,{defaults:{VTabs:{height:convertToUnit(h.value)}}},{default:()=>[vue.createVNode(VExpandTransition,null,{default:()=>[d.value&&vue.createElementVNode("div",{class:"v-toolbar__extension",style:{height:convertToUnit(h.value)}},[m])]})]})]})}),{contentHeight:p,extensionHeight:h}}}),makeScrollProps=propsFactory({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function useScroll(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{canScroll:a}=t;let r=0,o=0;const n=vue.ref(null),i=vue.shallowRef(0),s=vue.shallowRef(0),l=vue.shallowRef(0),u=vue.shallowRef(!1),c=vue.shallowRef(!1),d=vue.computed(()=>Number(e.scrollThreshold)),p=vue.computed(()=>clamp((d.value-i.value)/d.value||0)),h=()=>{const e=n.value;if(!e||a&&!a.value)return;r=i.value,i.value="window"in e?e.pageYOffset:e.scrollTop;const t=e instanceof Window?document.documentElement.scrollHeight:e.scrollHeight;o===t?(c.value=i.value<r,l.value=Math.abs(i.value-d.value)):o=t};return vue.watch(c,()=>{s.value=s.value||i.value}),vue.watch(u,()=>{s.value=0}),vue.onMounted(()=>{vue.watch(()=>e.scrollTarget,e=>{var t;const a=e?document.querySelector(e):window;a?a!==n.value&&(null==(t=n.value)||t.removeEventListener("scroll",h),n.value=a,n.value.addEventListener("scroll",h,{passive:!0})):consoleWarn(`Unable to locate element with identifier ${e}`)},{immediate:!0})}),vue.onBeforeUnmount(()=>{var e;null==(e=n.value)||e.removeEventListener("scroll",h)}),a&&vue.watch(a,h,{immediate:!0}),{scrollThreshold:d,currentScroll:i,currentThreshold:l,isScrollActive:u,scrollRatio:p,isScrollingUp:c,savedScroll:s}}const makeVAppBarProps=propsFactory({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...makeVToolbarProps(),...makeLayoutItemProps(),...makeScrollProps(),height:{type:[Number,String],default:64}},"VAppBar"),VAppBar=genericComponent()({name:"VAppBar",props:makeVAppBarProps(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const r=vue.ref(),o=useProxiedModel(e,"modelValue"),n=vue.computed(()=>{var t;const a=new Set((null==(t=e.scrollBehavior)?void 0:t.split(" "))??[]);return{hide:a.has("hide"),fullyHide:a.has("fully-hide"),inverted:a.has("inverted"),collapse:a.has("collapse"),elevate:a.has("elevate"),fadeImage:a.has("fade-image")}}),i=vue.computed(()=>{const e=n.value;return e.hide||e.fullyHide||e.inverted||e.collapse||e.elevate||e.fadeImage||!o.value}),{currentScroll:s,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=useScroll(e,{canScroll:i}),d=vue.toRef(()=>n.value.hide||n.value.fullyHide),p=vue.computed(()=>e.collapse||n.value.collapse&&(n.value.inverted?c.value>0:0===c.value)),h=vue.computed(()=>e.flat||n.value.fullyHide&&!o.value||n.value.elevate&&(n.value.inverted?s.value>0:0===s.value)),v=vue.computed(()=>n.value.fadeImage?n.value.inverted?1-c.value:c.value:void 0),m=vue.computed(()=>{var e,t;if(n.value.hide&&n.value.inverted)return 0;const a=(null==(e=r.value)?void 0:e.contentHeight)??0,o=(null==(t=r.value)?void 0:t.extensionHeight)??0;return d.value?s.value<l.value||n.value.fullyHide?a+o:a:a+o});useToggleScope(()=>!!e.scrollBehavior,()=>{vue.watchEffect(()=>{d.value?n.value.inverted?o.value=s.value>l.value:o.value=u.value||s.value<l.value:o.value=!0})});const{ssrBootStyles:f}=useSsrBoot(),{layoutItemStyles:g}=useLayoutItem({id:e.name,order:vue.computed(()=>parseInt(e.order,10)),position:vue.toRef(()=>e.location),layoutSize:m,elementSize:vue.shallowRef(void 0),active:o,absolute:vue.toRef(()=>e.absolute)});return useRender(()=>{const t=VToolbar.filterProps(e);return vue.createVNode(VToolbar,vue.mergeProps({ref:r,class:["v-app-bar",{"v-app-bar--bottom":"bottom"===e.location},e.class],style:[{...g.value,"--v-toolbar-image-opacity":v.value,height:void 0,...f.value},e.style]},t,{collapse:p.value,flat:h.value}),a)}),{}}}),makeVAppBarNavIconProps=propsFactory({...omit(makeVBtnProps({icon:"$menu",variant:"text"}),["spaced"])},"VAppBarNavIcon"),VAppBarNavIcon=genericComponent()({name:"VAppBarNavIcon",props:makeVAppBarNavIconProps(),setup(e,t){let{slots:a}=t;return useRender(()=>vue.createVNode(VBtn,vue.mergeProps(e,{class:["v-app-bar-nav-icon"]}),a)),{}}}),VAppBarTitle=genericComponent()({name:"VAppBarTitle",props:makeVToolbarTitleProps(),setup(e,t){let{slots:a}=t;return useRender(()=>vue.createVNode(VToolbarTitle,vue.mergeProps(e,{class:"v-app-bar-title"}),a)),{}}}),makeVBadgeProps=propsFactory({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:IconValue,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...makeComponentProps(),...makeLocationProps({location:"top end"}),...makeRoundedProps(),...makeTagProps(),...makeThemeProps(),...makeTransitionProps$1({transition:"scale-rotate-transition"}),...makeDimensionProps()},"VBadge"),VBadge=genericComponent()({name:"VBadge",inheritAttrs:!1,props:makeVBadgeProps(),setup(e,t){const{backgroundColorClasses:a,backgroundColorStyles:r}=useBackgroundColor(()=>e.color),{roundedClasses:o}=useRounded(e),{t:n}=useLocale(),{textColorClasses:i,textColorStyles:s}=useTextColor(()=>e.textColor),{themeClasses:l}=useTheme(),{locationStyles:u}=useLocation(e,!0,t=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(t)?Number(e.offsetY??0):["left","right"].includes(t)?Number(e.offsetX??0):0)),{dimensionStyles:c}=useDimension(e);return useRender(()=>{const d=Number(e.content),p=!e.max||isNaN(d)?e.content:d<=Number(e.max)?d:`${e.max}+`,[h,v]=pickWithRest(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return vue.createVNode(e.tag,vue.mergeProps({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},v,{style:e.style}),{default:()=>{var v,m;return[vue.createElementVNode("div",{class:"v-badge__wrapper"},[null==(m=(v=t.slots).default)?void 0:m.call(v),vue.createVNode(MaybeTransition,{transition:e.transition},{default:()=>{var v,m;return[vue.withDirectives(vue.createElementVNode("span",vue.mergeProps({class:["v-badge__badge",l.value,a.value,o.value,i.value],style:[r.value,s.value,c.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":n(e.label,d),"aria-live":"polite",role:"status"},h),[e.dot?void 0:t.slots.badge?null==(m=(v=t.slots).badge)?void 0:m.call(v):e.icon?vue.createVNode(VIcon,{icon:e.icon},null):p]),[[vue.vShow,e.modelValue]])]}})])]}})}),{}}}),_hoisted_1$1={key:0,class:"text-h6"},_hoisted_2={key:1,class:"text-caption text-medium-emphasis"},_hoisted_3={key:2},_hoisted_4={key:2},_hoisted_5={key:2},_sfc_main$1=vue.defineComponent({__name:"AppHeader",props:{title:{},subtitle:{},class:{},ariaLabel:{default:"Application header"},showSidebarToggle:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!1},searchPlaceholder:{default:"جستجو..."},searchValue:{},showNotifications:{type:Boolean,default:!1},notificationCount:{default:0},showProfile:{type:Boolean,default:!1},profileAvatar:{},profileName:{},profileMenu:{default:()=>[]},actions:{default:()=>[]},color:{default:"surface"},elevation:{default:1},height:{default:70},hideDefaultTitle:{type:Boolean,default:!1}},emits:["update:searchValue","toggle-sidebar","search"],setup(e,{emit:t}){const a=e,r=t,o=useCustomizerStore(),n=vue.computed({get:()=>a.searchValue||"",set:e=>{r("update:searchValue",e),r("search",e)}}),i=()=>{o.SET_SIDEBAR_DRAWER(),r("toggle-sidebar")},s=vueRouter.useRouter(),l=vue.computed(()=>a.profileMenu.map(e=>({...e,prependIcon:e.icon,onClick:e.action||(()=>{e.to?s.push(e.to):e.href&&window.open(e.href,"_blank")})})));return(t,r)=>(vue.openBlock(),vue.createBlock(VAppBar,{color:e.color,elevation:e.elevation,height:e.height,class:vue.normalizeClass(["app-header topbar",a.class]),"aria-label":e.ariaLabel,fixed:""},{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"left",{},void 0,!0),e.showSidebarToggle?(vue.openBlock(),vue.createBlock(VAppBarNavIcon,{key:0,variant:"text",onClick:i})):vue.createCommentVNode("",!0),vue.renderSlot(t.$slots,"title",{},()=>[e.hideDefaultTitle||!e.title&&!e.subtitle?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(VAppBarTitle,{key:0,class:"d-flex flex-column"},{default:vue.withCtx(()=>[e.title?(vue.openBlock(),vue.createElementBlock("span",_hoisted_1$1,vue.toDisplayString(e.title),1)):vue.createCommentVNode("",!0),e.subtitle?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2,vue.toDisplayString(e.subtitle),1)):vue.createCommentVNode("",!0)]),_:1}))],!0),vue.createVNode(VSpacer),vue.renderSlot(t.$slots,"center",{},void 0,!0),e.showSearch?(vue.openBlock(),vue.createBlock(VTextField,{key:1,modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=e=>n.value=e),placeholder:e.searchPlaceholder,density:"compact",variant:"outlined","hide-details":"","prepend-inner-icon":"mdi-magnify",class:"search-bar",style:{"max-width":"400px"}},null,8,["modelValue","placeholder"])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.actions,(e,t)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:t},[e.tooltip?(vue.openBlock(),vue.createBlock(VTooltip,{key:0,text:e.tooltip,location:"bottom"},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VBtn,vue.mergeProps({ref_for:!0},t,{icon:e.icon,color:e.color||"primary",variant:e.variant||"text",size:e.size||"default",disabled:e.disabled,class:"ms-2",onClick:e.onClick}),{default:vue.withCtx(()=>[e.badge?(vue.openBlock(),vue.createBlock(VBadge,{key:0,content:e.badge,color:e.badgeColor||"error",overlap:""},{default:vue.withCtx(()=>[e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0)]),_:2},1032,["content","color"])):e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:1,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0),e.label&&!e.icon?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3,vue.toDisplayString(e.label),1)):vue.createCommentVNode("",!0)]),_:2},1040,["icon","color","variant","size","disabled","onClick"])]),_:2},1032,["text"])):(vue.openBlock(),vue.createBlock(VBtn,{key:1,icon:e.icon,color:e.color||"primary",variant:e.variant||"text",size:e.size||"default",disabled:e.disabled,class:"ms-2",onClick:e.onClick},{default:vue.withCtx(()=>[e.badge?(vue.openBlock(),vue.createBlock(VBadge,{key:0,content:e.badge,color:e.badgeColor||"error",overlap:""},{default:vue.withCtx(()=>[e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0)]),_:2},1032,["content","color"])):e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:1,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0),e.label&&!e.icon?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4,vue.toDisplayString(e.label),1)):vue.createCommentVNode("",!0)]),_:2},1032,["icon","color","variant","size","disabled","onClick"]))],64))),128)),vue.renderSlot(t.$slots,"right",{},void 0,!0),e.showNotifications?(vue.openBlock(),vue.createBlock(VMenu,{key:2,location:"bottom end","offset-y":""},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VBtn,vue.mergeProps(t,{icon:"",variant:"text",class:"profileBtn"}),{default:vue.withCtx(()=>[vue.createVNode(VBadge,{content:e.notificationCount>0?e.notificationCount:void 0,color:"error",overlap:""},{default:vue.withCtx(()=>[vue.createVNode(VIcon,{icon:"mdi-bell-outline"})]),_:1},8,["content"])]),_:1},16)]),default:vue.withCtx(()=>[vue.createVNode(VList,null,{default:vue.withCtx(()=>[vue.createVNode(VListItem,null,{default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[...r[1]||(r[1]=[vue.createTextVNode("اعلان‌ها",-1)])]),_:1})]),_:1}),vue.createVNode(VDivider),vue.createVNode(VListItem,null,{default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[...r[2]||(r[2]=[vue.createTextVNode("هیچ اعلان جدیدی وجود ندارد",-1)])]),_:1})]),_:1})]),_:1})]),_:1})):vue.createCommentVNode("",!0),e.showProfile?(vue.openBlock(),vue.createBlock(VMenu,{key:3,location:"bottom end","offset-y":""},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VBtn,vue.mergeProps(t,{icon:!e.profileName&&!e.profileAvatar,variant:"text",class:"profileBtn"}),{default:vue.withCtx(()=>[e.profileAvatar?(vue.openBlock(),vue.createBlock(VAvatar,{key:0,size:"32"},{default:vue.withCtx(()=>[vue.createVNode(VImg,{src:e.profileAvatar,alt:e.profileName||"Profile"},null,8,["src","alt"])]),_:1})):e.profileName?(vue.openBlock(),vue.createElementBlock("span",_hoisted_5,vue.toDisplayString(e.profileName),1)):(vue.openBlock(),vue.createBlock(VIcon,{key:1,icon:"mdi-account-circle"}))]),_:1},16,["icon"])]),default:vue.withCtx(()=>[l.value.length>0?(vue.openBlock(),vue.createBlock(VList,{key:0},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(l.value,(e,t)=>(vue.openBlock(),vue.createBlock(VListItem,{key:t,"prepend-icon":e.icon,to:e.to,href:e.href,onClick:e.onClick},{default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024),e.divider?(vue.openBlock(),vue.createBlock(VDivider,{key:0})):vue.createCommentVNode("",!0)]),_:2},1032,["prepend-icon","to","href","onClick"]))),128))]),_:1})):vue.createCommentVNode("",!0)]),_:1})):vue.createCommentVNode("",!0)]),_:3},8,["color","elevation","height","class","aria-label"]))}}),AppHeader=_export_sfc$1(_sfc_main$1,[["__scopeId","data-v-b45b815e"]]),makeVAppProps=propsFactory({...makeComponentProps(),...omit(makeLayoutProps(),["fullHeight"]),...makeThemeProps()},"VApp"),VApp=genericComponent()({name:"VApp",props:makeVAppProps(),setup(e,t){let{slots:a}=t;const r=provideTheme(e),{layoutClasses:o,getLayoutItem:n,items:i,layoutRef:s}=createLayout({...e,fullHeight:!0}),{rtlClasses:l}=useRtl();return useRender(()=>{var t;return vue.createElementVNode("div",{ref:s,class:vue.normalizeClass(["v-application",r.themeClasses.value,o.value,l.value,e.class]),style:vue.normalizeStyle([e.style])},[vue.createElementVNode("div",{class:"v-application__wrap"},[null==(t=a.default)?void 0:t.call(a)])])}),{getLayoutItem:n,items:i,theme:r}}}),makeVMainProps=propsFactory({scrollable:Boolean,...makeComponentProps(),...makeDimensionProps(),...makeTagProps({tag:"main"})},"VMain"),VMain=genericComponent()({name:"VMain",props:makeVMainProps(),setup(e,t){let{slots:a}=t;const{dimensionStyles:r}=useDimension(e),{mainStyles:o}=useLayout(),{ssrBootStyles:n}=useSsrBoot();return useRender(()=>vue.createVNode(e.tag,{class:vue.normalizeClass(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:vue.normalizeStyle([o.value,n.value,r.value,e.style])},{default:()=>{var t,r;return[e.scrollable?vue.createElementVNode("div",{class:"v-main__scroller"},[null==(t=a.default)?void 0:t.call(a)]):null==(r=a.default)?void 0:r.call(a)]}})),{}}}),_hoisted_1={class:"page-wrapper"},_sfc_main=vue.defineComponent({__name:"AppLayout",props:{header:{default:()=>({title:"Dashboard",subtitle:"",showSidebarToggle:!0,showSearch:!1,searchPlaceholder:"جستجو...",showNotifications:!1,notificationCount:0,showProfile:!1,actions:[],color:"surface",elevation:1,height:70})},sidebar:{default:()=>({menuItems:[],logo:"",logoLight:"",logoText:"UI Kit",miniSidebar:!1,permanent:!0,temporary:!1,rail:!1,location:"left",width:265,railWidth:75})}},setup:e=>(useCustomizerStore(),(t,a)=>(vue.openBlock(),vue.createBlock(VApp,null,{default:vue.withCtx(()=>[vue.createVNode(AppHeader,vue.mergeProps(e.header,{class:"app-header"}),null,16),vue.createVNode(AppSidebar,vue.mergeProps(e.sidebar,{class:"app-sidebar"}),null,16),vue.createVNode(VMain,null,{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1,[vue.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3})]),_:3})))}),AppLayout=_export_sfc$1(_sfc_main,[["__scopeId","data-v-106317c7"]]);function useDataTable(e){const t=vue.ref([]),a=vue.ref(!1),r=vue.ref(null),o=vue.ref(!0),n=vue.ref(!1),i=vue.ref({currentPage:1,itemsPerPage:e.pageSize||10,totalItems:0,totalPages:1}),s=async(s={})=>{var l,u;if(!a.value){a.value=!0,r.value=null;try{const a=getAxiosInstance(),r=await a.get(e.apiResource,{params:{page:i.value.currentPage,per_page:i.value.itemsPerPage,...e.queryParams,...s}}),{data:n,meta:l}=r.data;return l?(t.value=n,i.value={currentPage:l.current_page||1,itemsPerPage:l.per_page||e.pageSize||10,totalItems:l.total||0,totalPages:l.last_page||1},o.value=l.current_page<l.last_page):(t.value=n,o.value=!1),n}catch(c){throw r.value=(null==(u=null==(l=c.response)?void 0:l.data)?void 0:u.message)||"Failed to fetch data",c}finally{a.value=!1,n.value=!1}}},l=core.useDebounceFn(s,300);return vue.watch(()=>e.queryParams,t=>{!1!==e.autoFetch&&l(t)},{deep:!0}),!1!==e.autoFetch&&s(),{items:t,loading:a,error:r,hasMore:o,isLoadingMore:n,pagination:i,fetchData:s,loadMore:async()=>{if(!a.value&&o.value){n.value=!0,i.value.currentPage+=1;try{const a=getAxiosInstance(),r=await a.get(e.apiResource,{params:{page:i.value.currentPage,per_page:i.value.itemsPerPage,...e.queryParams}}),{data:n,meta:s}=r.data;s?(t.value=[...t.value,...n],o.value=s.current_page<s.last_page):(t.value=[...t.value,...n],o.value=!1)}catch(r){throw i.value.currentPage-=1,r}finally{n.value=!1}}},setPage:e=>{e<1||e>i.value.totalPages||(i.value.currentPage=e,s())},setItemsPerPage:e=>{i.value.itemsPerPage=e,i.value.currentPage=1,s()}}}function useTableActions(e={}){const t=vue.ref(!1),a=vue.ref(!1),r=vue.ref(!1),o=vue.ref(!1),n=vue.ref(null),i=vue.ref({}),s=vue.ref(null),l=vue.ref(null),u=e=>{o.value=!!e,n.value=e?{...e}:{},i.value=e?{...e}:{},t.value=!0},c=e=>{s.value=e,a.value=!0},d=(e,t)=>{l.value=e,n.value=t?{...t}:{},i.value=t?{...t}:{},r.value=!0},p=(e,t)=>!e.condition||e.condition(t),h=vue.computed(()=>{const t=Array.isArray(e.actions)&&e.actions.length>0,a=!!e.routes&&Object.keys(e.routes).length>0,r=!!e.downloadLink&&Object.keys(e.downloadLink).length>0,o=Array.isArray(e.customActions)&&e.customActions.length>0,n=Array.isArray(e.customButtons)&&e.customButtons.length>0||!!e.customButtonsFn;return t||a||r||o||n});return{dialog:t,deleteDialog:a,actionDialog:r,isEditing:o,editedItem:n,formModel:i,itemToDelete:s,currentAction:l,hasAnyActions:h,openDialog:u,openDeleteDialog:c,openActionDialog:d,resetDialogs:()=>{t.value=!1,a.value=!1,r.value=!1,o.value=!1,n.value=null,s.value=null,l.value=null,i.value={}},getItemActions:t=>{const a=[];if(e.actions&&(e.actions.includes("view")&&a.push({label:"View",icon:icons.eye,color:"info",outlined:!0,onClick:()=>u(t)}),e.actions.includes("edit")&&a.push({label:"Edit",icon:icons.pencil,color:"primary",outlined:!0,onClick:()=>u(t)}),e.actions.includes("delete")&&a.push({label:"Delete",icon:icons.delete,color:"error",outlined:!0,onClick:()=>c(t)})),e.routes&&Object.entries(e.routes).forEach(([e,t])=>{a.push({label:e.charAt(0).toUpperCase()+e.slice(1),icon:icons.arrowRight,color:"secondary",outlined:!0,onClick:()=>{}})}),e.downloadLink&&Object.entries(e.downloadLink).forEach(([e,t])=>{a.push({label:`Download ${e}`,icon:icons.download,color:"success",outlined:!0,onClick:()=>{}})}),e.customActions&&e.customActions.forEach(e=>{p(e,t)&&a.push({label:e.title,icon:icons.cog,color:"primary",outlined:!0,onClick:()=>d(e,t)})}),e.customButtonsFn){const r=e.customButtonsFn(t);a.push(...r)}else e.customButtons&&a.push(...e.customButtons);return a},shouldShowAction:p}}function useTableHeaders(e,t={}){const{selectable:a=!1,hasActions:r=!1,actionsWidth:o="200px",showSelection:n=!0,showIndex:i=!1,indexLabel:s="#",indexMethod:l}=t,u=vue.computed(()=>a&&n?[{type:"selection",width:"50px",align:"center",fixed:"left",selectable:(e,t)=>!0},...e]:e),c=vue.computed(()=>i?[{type:"index",label:s,width:"60px",align:"center",fixed:"left",index:l||(e=>e+1)},...u.value]:u.value),d=vue.computed(()=>r?[...c.value,{label:"Actions",key:"actions",width:o,fixed:"right",align:"center",render:e=>null}]:c.value),p=vue.computed(()=>d.value.map(e=>({sortable:!1,resizable:!0,minWidth:80,align:"start",showOverflowTooltip:!0,...e,width:"number"==typeof e.width?`${e.width}px`:e.width}))),h=vue.computed(()=>p.value.filter(e=>!0!==e.hidden)),v=vue.computed(()=>p.value.filter(e=>!0===e.fixed||"left"===e.fixed||"right"===e.fixed)),m=vue.computed(()=>p.value.filter(e=>"left"===e.fixed)),f=vue.computed(()=>p.value.filter(e=>"right"===e.fixed)),g=vue.computed(()=>p.value.filter(e=>!e.fixed));return{headers:p,visibleColumns:h,fixedColumns:v,leftFixedColumns:m,rightFixedColumns:f,scrollableColumns:g,getColumnByKey:e=>p.value.find(t=>t.key===e),getColumnIndex:e=>p.value.findIndex(t=>t.key===e)}}const DigitLimit={mounted(e,t){const a=t.value;e.addEventListener("input",e=>{const t=e.target;t.value=t.value.replace(/\D/g,"").slice(0,a),t.dispatchEvent(new Event("input"))})}};class GreetingUtils{static getGreeting(e){const t=(e?new Date(e):new Date).getHours();return t>=5&&t<12?"صبح بخیر":t>=12&&t<17?"ظهر بخیر":t>=17&&t<20?"عصر بخیر":"شب بخیر"}static getGreetingWithName(e,t){return`${this.getGreeting(e)} ${t||"کاربر"}`}static getGreetingWithTime(e){const t=e?new Date(e):new Date,a=t.getHours(),r=t.getMinutes();return`${this.getGreeting(e)} - ساعت ${`${a.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}`}static getTimePeriod(e){const t=(e?new Date(e):new Date).getHours();return t>=5&&t<12?"صبح":t>=12&&t<17?"ظهر":t>=17&&t<20?"عصر":"شب"}static getFullGreeting(e,t){const a=e?new Date(e):new Date;return`${this.getGreeting(e)} ${t||"کاربر"} - ${a.toLocaleDateString("fa-IR",{weekday:"long",year:"numeric",month:"long",day:"numeric"})} - ساعت ${a.toLocaleTimeString("fa-IR",{hour:"2-digit",minute:"2-digit"})}`}}class NationalCodeValidator{static isValid(e,t){if("Real"===t&&!/^\d{10}$/.test(e))return!1;if("Legal"===t&&!/^\d{11}$/.test(e))return!1;if("Legal"===t){return!["00000000000","11111111111","22222222222","33333333333","44444444444","55555555555","66666666666","77777777777","88888888888","99999999999"].includes(e)}if(["0000000000","1111111111","2222222222","3333333333","4444444444","5555555555","6666666666","7777777777","8888888888","9999999999"].includes(e))return!1;const a=e.split("").map(Number),r=a[9],o=a.slice(0,9).reduce((e,t,a)=>e+t*(10-a),0)%11;return o<2&&r===o||o>=2&&r===11-o}}let authConfig=null;function configureAuth(e){authConfig=e}const fetchWrapper={get:request("GET"),post:request("POST"),put:request("PUT"),delete:request("DELETE")};function request(e){return(t,a)=>{const r={method:e,headers:authHeader(t)};return a&&(r.headers["Content-Type"]="application/json",r.body=JSON.stringify(a)),fetch(t,r).then(handleResponse)}}function authHeader(e){var t,a;if(!authConfig)return{};const r=null==(t=authConfig.getToken)?void 0:t.call(authConfig),o=null==(a=authConfig.getApiBaseUrl)?void 0:a.call(authConfig),n=!!r,i=!!o&&e.startsWith(o);return n&&i?{Authorization:`Bearer ${r}`}:{}}function handleResponse(e){return e.text().then(t=>{var a;const r=t&&JSON.parse(t);if(!e.ok){[401,403].includes(e.status)&&(null==(a=null==authConfig?void 0:authConfig.onUnauthorized)||a.call(authConfig));const t=r&&r.message||e.statusText;return Promise.reject(t)}return r})}function nationalCodeRule(e,t){return!NationalCodeValidator.isValid(e,t)&&"کد ملی نامعتبر است"}const BooleanEnum={TRUE:!0,FALSE:!1},BooleanEnumOptions=[{title:"✅",value:BooleanEnum.TRUE},{title:"❌",value:BooleanEnum.FALSE}];function install(e){e.directive("digit-limit",DigitLimit)}const index={install:install};exports.AppHeader=AppHeader,exports.AppLayout=AppLayout,exports.AppSidebar=AppSidebar,exports.AppStepper=AppStepper,exports.BaseBreadcrumb=_sfc_main$i,exports.BaseIcon=_sfc_main$h,exports.BooleanEnum=BooleanEnum,exports.BooleanEnumOptions=BooleanEnumOptions,exports.ConfirmDialog=_sfc_main$g,exports.CustomAutocomplete=CustomAutocomplete,exports.CustomDataTable=_sfc_main$c,exports.DateConverter=DateConverter,exports.DescriptionInput=DescriptionInput,exports.DigitLimit=DigitLimit,exports.DownloadButton=DownloadButton,exports.GreetingUtils=GreetingUtils,exports.Loading=Loading,exports.MoneyInput=_sfc_main$e,exports.NationalCodeValidator=NationalCodeValidator,exports.PdfViewer=PdfViewer,exports.ShamsiDatePicker=ShamsiDatePicker,exports.UiChildCard=_sfc_main$8,exports.UiParentCard=_sfc_main$7,exports.VPriceTextField=_sfc_main$6,exports.configureAuth=configureAuth,exports.configureAxiosInstance=configureAxiosInstance,exports.default=index,exports.fetchWrapper=fetchWrapper,exports.formatNumberWithCommas=formatNumberWithCommas,exports.formatPrice=formatPrice,exports.getAxiosInstance=getAxiosInstance,exports.install=install,exports.nationalCodeRule=nationalCodeRule,exports.useCustomizerStore=useCustomizerStore,exports.useDataTable=useDataTable,exports.useTableActions=useTableActions,exports.useTableHeaders=useTableHeaders,exports.useTableSelection=useTableSelection;
7
+ function get(e){return getComputedStyle(e)}function set(e,t){for(var a in t){var r=t[a];"number"==typeof r&&(r+="px"),e.style[a]=r}return e}function div(e){var t=document.createElement("div");return t.className=e,t}var elMatches="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function matches(e,t){if(!elMatches)throw new Error("No element matching method supported");return elMatches.call(e,t)}function remove(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function queryChildren(e,t){return Array.prototype.filter.call(e.children,function(e){return matches(e,t)})}var cls={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},scrollingClassTimeout={x:null,y:null};function addScrollingClass(e,t){var a=e.element.classList,r=cls.state.scrolling(t);a.contains(r)?clearTimeout(scrollingClassTimeout[t]):a.add(r)}function removeScrollingClass(e,t){scrollingClassTimeout[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(cls.state.scrolling(t))},e.settings.scrollingThreshold)}function setScrollingClassInstantly(e,t){addScrollingClass(e,t),removeScrollingClass(e,t)}var EventElement=function(e){this.element=e,this.handlers={}},prototypeAccessors={isEmpty:{configurable:!0}};EventElement.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},EventElement.prototype.unbind=function(e,t){var a=this;this.handlers[e]=this.handlers[e].filter(function(r){return!(!t||r===t)||(a.element.removeEventListener(e,r,!1),!1)})},EventElement.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},prototypeAccessors.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(EventElement.prototype,prototypeAccessors);var EventManager=function(){this.eventElements=[]};function createEvent(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function processScrollDiff(e,t,a,r,o){var n;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)n=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");n=["contentWidth","containerWidth","scrollLeft","x","left","right"]}processScrollDiff$1(e,a,n,r,o)}function processScrollDiff$1(e,t,a,r,o){var n=a[0],i=a[1],s=a[2],l=a[3],u=a[4],c=a[5];void 0===r&&(r=!0),void 0===o&&(o=!1);var d=e.element;e.reach[l]=null,d[s]<1&&(e.reach[l]="start"),d[s]>e[n]-e[i]-1&&(e.reach[l]="end"),t&&(d.dispatchEvent(createEvent("ps-scroll-"+l)),t<0?d.dispatchEvent(createEvent("ps-scroll-"+u)):t>0&&d.dispatchEvent(createEvent("ps-scroll-"+c)),r&&setScrollingClassInstantly(e,l)),e.reach[l]&&(t||o)&&d.dispatchEvent(createEvent("ps-"+l+"-reach-"+e.reach[l]))}function toInt(e){return parseInt(e,10)||0}function isEditable(e){return matches(e,"input,[contenteditable]")||matches(e,"select,[contenteditable]")||matches(e,"textarea,[contenteditable]")||matches(e,"button,[contenteditable]")}function outerWidth(e){var t=get(e);return toInt(t.width)+toInt(t.paddingLeft)+toInt(t.paddingRight)+toInt(t.borderLeftWidth)+toInt(t.borderRightWidth)}EventManager.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new EventElement(e),this.eventElements.push(t)),t},EventManager.prototype.bind=function(e,t,a){this.eventElement(e).bind(t,a)},EventManager.prototype.unbind=function(e,t,a){var r=this.eventElement(e);r.unbind(t,a),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},EventManager.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},EventManager.prototype.once=function(e,t,a){var r=this.eventElement(e),o=function(e){r.unbind(t,o),a(e)};r.bind(t,o)};var env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function updateGeometry(e){var t=e.element,a=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.floor(r.width),e.containerHeight=Math.floor(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(queryChildren(t,cls.element.rail("x")).forEach(function(e){return remove(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(queryChildren(t,cls.element.rail("y")).forEach(function(e){return remove(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=getThumbSize(e,toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=getThumbSize(e,toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=toInt(a*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),updateCss(t,e),e.scrollbarXActive?t.classList.add(cls.state.active("x")):(t.classList.remove(cls.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?t.classList.add(cls.state.active("y")):(t.classList.remove(cls.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function getThumbSize(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function updateCss(e,t){var a={width:t.railXWidth},r=Math.floor(e.scrollTop);t.isRtl?a.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:a.left=e.scrollLeft,t.isScrollbarXUsingBottom?a.bottom=t.scrollbarXBottom-r:a.top=t.scrollbarXTop+r,set(t.scrollbarXRail,a);var o={top:r,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?o.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:o.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?o.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:o.left=t.scrollbarYLeft+e.scrollLeft,set(t.scrollbarYRail,o),set(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),set(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function clickRail(e){e.event.bind(e.scrollbarY,"mousedown",function(e){return e.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(t){var a=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=a*e.containerHeight,updateGeometry(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(e){return e.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(t){var a=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=a*e.containerWidth,updateGeometry(e),t.stopPropagation()})}var activeSlider=null;function setupScrollHandlers(e){bindMouseScrollHandler(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),bindMouseScrollHandler(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])}function bindMouseScrollHandler(e,t){var a=t[0],r=t[1],o=t[2],n=t[3],i=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=e.element,p=null,h=null,v=null;function m(t){t.touches&&t.touches[0]&&(t[o]=t.touches[0]["page"+u.toUpperCase()]),activeSlider===i&&(d[l]=p+v*(t[o]-h),addScrollingClass(e,u),updateGeometry(e),t.stopPropagation(),t.preventDefault())}function f(){removeScrollingClass(e,u),e[c].classList.remove(cls.state.clicking),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",f),activeSlider=null}function g(t){null===activeSlider&&(activeSlider=i,p=d[l],t.touches&&(t[o]=t.touches[0]["page"+u.toUpperCase()]),h=t[o],v=(e[r]-e[a])/(e[n]-e[s]),t.touches?(document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",f)):(document.addEventListener("mousemove",m),document.addEventListener("mouseup",f)),e[c].classList.add(cls.state.clicking)),t.stopPropagation(),t.cancelable&&t.preventDefault()}e[i].addEventListener("mousedown",g),e[i].addEventListener("touchstart",g)}function keyboard(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",function(a){if(!(a.isDefaultPrevented&&a.isDefaultPrevented()||a.defaultPrevented)&&(matches(t,":hover")||matches(e.scrollbarX,":focus")||matches(e.scrollbarY,":focus"))){var r=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(r){if("IFRAME"===r.tagName)r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(isEditable(r))return}var o=0,n=0;switch(a.which){case 37:o=a.metaKey?-e.contentWidth:a.altKey?-e.containerWidth:-30;break;case 38:n=a.metaKey?e.contentHeight:a.altKey?e.containerHeight:30;break;case 39:o=a.metaKey?e.contentWidth:a.altKey?e.containerWidth:30;break;case 40:n=a.metaKey?-e.contentHeight:a.altKey?-e.containerHeight:-30;break;case 32:n=a.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:n=e.containerHeight;break;case 34:n=-e.containerHeight;break;case 36:n=e.contentHeight;break;case 35:n=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==o||e.settings.suppressScrollY&&0!==n||(t.scrollTop-=n,t.scrollLeft+=o,updateGeometry(e),function(a,r){var o=Math.floor(t.scrollTop);if(0===a){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var n=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===n&&a<0||n>=e.contentWidth-e.containerWidth&&a>0)return!e.settings.wheelPropagation}return!0}(o,n)&&a.preventDefault())}})}function wheel(e){var t=e.element;function a(a){var r=function(e){var t=e.deltaX,a=-1*e.deltaY;return void 0!==t&&void 0!==a||(t=-1*e.wheelDeltaX/6,a=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,a*=10),t!=t&&a!=a&&(t=0,a=e.wheelDelta),e.shiftKey?[-a,-t]:[t,a]}(a),o=r[0],n=r[1];if(!function(e,a,r){if(!env.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(cls.element.consuming))return!0;var n=get(o);if(r&&n.overflowY.match(/(scroll|auto)/)){var i=o.scrollHeight-o.clientHeight;if(i>0&&(o.scrollTop>0&&r<0||o.scrollTop<i&&r>0))return!0}if(a&&n.overflowX.match(/(scroll|auto)/)){var s=o.scrollWidth-o.clientWidth;if(s>0&&(o.scrollLeft>0&&a<0||o.scrollLeft<s&&a>0))return!0}o=o.parentNode}return!1}(a.target,o,n)){var i=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(n?t.scrollTop-=n*e.settings.wheelSpeed:t.scrollTop+=o*e.settings.wheelSpeed,i=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?t.scrollLeft+=o*e.settings.wheelSpeed:t.scrollLeft-=n*e.settings.wheelSpeed,i=!0):(t.scrollTop-=n*e.settings.wheelSpeed,t.scrollLeft+=o*e.settings.wheelSpeed),updateGeometry(e),i=i||function(a,r){var o=Math.floor(t.scrollTop),n=0===t.scrollTop,i=o+t.offsetHeight===t.scrollHeight,s=0===t.scrollLeft,l=t.scrollLeft+t.offsetWidth===t.scrollWidth;return!(Math.abs(r)>Math.abs(a)?n||i:s||l)||!e.settings.wheelPropagation}(o,n),i&&!a.ctrlKey&&(a.stopPropagation(),a.preventDefault())}}void 0!==window.onwheel?e.event.bind(t,"wheel",a):void 0!==window.onmousewheel&&e.event.bind(t,"mousewheel",a)}function touch(e){if(env.supportsTouch||env.supportsIePointer){var t=e.element,a={startOffset:{},startTime:0,speed:{},easingLoop:null};env.supportsTouch?(e.event.bind(t,"touchstart",i),e.event.bind(t,"touchmove",s),e.event.bind(t,"touchend",l)):env.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",i),e.event.bind(t,"pointermove",s),e.event.bind(t,"pointerup",l)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",i),e.event.bind(t,"MSPointerMove",s),e.event.bind(t,"MSPointerUp",l)))}function r(a,r){t.scrollTop-=r,t.scrollLeft-=a,updateGeometry(e)}function o(e){return e.targetTouches?e.targetTouches[0]:e}function n(t){return t.target!==e.scrollbarX&&t.target!==e.scrollbarY&&((!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)))}function i(e){if(n(e)){var t=o(e);a.startOffset.pageX=t.pageX,a.startOffset.pageY=t.pageY,a.startTime=(new Date).getTime(),null!==a.easingLoop&&clearInterval(a.easingLoop)}}function s(i){if(n(i)){var s=o(i),l={pageX:s.pageX,pageY:s.pageY},u=l.pageX-a.startOffset.pageX,c=l.pageY-a.startOffset.pageY;if(function(e,a,r){if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(cls.element.consuming))return!0;var n=get(o);if(r&&n.overflowY.match(/(scroll|auto)/)){var i=o.scrollHeight-o.clientHeight;if(i>0&&(o.scrollTop>0&&r<0||o.scrollTop<i&&r>0))return!0}if(a&&n.overflowX.match(/(scroll|auto)/)){var s=o.scrollWidth-o.clientWidth;if(s>0&&(o.scrollLeft>0&&a<0||o.scrollLeft<s&&a>0))return!0}o=o.parentNode}return!1}(i.target,u,c))return;r(u,c),a.startOffset=l;var d=(new Date).getTime(),p=d-a.startTime;p>0&&(a.speed.x=u/p,a.speed.y=c/p,a.startTime=d),function(a,r){var o=Math.floor(t.scrollTop),n=t.scrollLeft,i=Math.abs(a),s=Math.abs(r);if(s>i){if(r<0&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return 0===window.scrollY&&r>0&&env.isChrome}else if(i>s&&(a<0&&n===e.contentWidth-e.containerWidth||a>0&&0===n))return!0;return!0}(u,c)&&i.cancelable&&i.preventDefault()}}function l(){e.settings.swipeEasing&&(clearInterval(a.easingLoop),a.easingLoop=setInterval(function(){e.isInitialized?clearInterval(a.easingLoop):a.speed.x||a.speed.y?Math.abs(a.speed.x)<.01&&Math.abs(a.speed.y)<.01?clearInterval(a.easingLoop):(r(30*a.speed.x,30*a.speed.y),a.speed.x*=.8,a.speed.y*=.8):clearInterval(a.easingLoop)},10))}}var defaultSettings=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},handlers={"click-rail":clickRail,"drag-thumb":setupScrollHandlers,keyboard:keyboard,wheel:wheel,touch:touch},PerfectScrollbar=function(e,t){var a=this;if(void 0===t&&(t={}),"string"==typeof e&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var r in this.element=e,e.classList.add(cls.main),this.settings=defaultSettings(),t)this.settings[r]=t[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var o,n,i=function(){return e.classList.add(cls.state.focus)},s=function(){return e.classList.remove(cls.state.focus)};this.isRtl="rtl"===get(e).direction,!0===this.isRtl&&e.classList.add(cls.rtl),this.isNegativeScroll=(n=e.scrollLeft,e.scrollLeft=-1,o=e.scrollLeft<0,e.scrollLeft=n,o),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new EventManager,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=div(cls.element.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=div(cls.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=get(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=toInt(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=toInt(l.borderLeftWidth)+toInt(l.borderRightWidth),set(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=toInt(l.marginLeft)+toInt(l.marginRight),set(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=div(cls.element.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=div(cls.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=get(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=toInt(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?outerWidth(this.scrollbarY):null,this.railBorderYWidth=toInt(u.borderTopWidth)+toInt(u.borderBottomWidth),set(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=toInt(u.marginTop)+toInt(u.marginBottom),set(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(e){return handlers[e](a)}),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",function(e){return a.onScroll(e)}),updateGeometry(this)};PerfectScrollbar.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,set(this.scrollbarXRail,{display:"block"}),set(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=toInt(get(this.scrollbarXRail).marginLeft)+toInt(get(this.scrollbarXRail).marginRight),this.railYMarginHeight=toInt(get(this.scrollbarYRail).marginTop)+toInt(get(this.scrollbarYRail).marginBottom),set(this.scrollbarXRail,{display:"none"}),set(this.scrollbarYRail,{display:"none"}),updateGeometry(this),processScrollDiff(this,"top",0,!1,!0),processScrollDiff(this,"left",0,!1,!0),set(this.scrollbarXRail,{display:""}),set(this.scrollbarYRail,{display:""}))},PerfectScrollbar.prototype.onScroll=function(e){this.isAlive&&(updateGeometry(this),processScrollDiff(this,"top",this.element.scrollTop-this.lastScrollTop),processScrollDiff(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},PerfectScrollbar.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),remove(this.scrollbarX),remove(this.scrollbarY),remove(this.scrollbarXRail),remove(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},PerfectScrollbar.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(e){return!e.match(/^ps([-_].+|)$/)}).join(" ")};const C=vue.defineComponent({__name:"PerfectScrollbar",props:{tag:{default:"div"},options:{default:()=>({})}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(e,{expose:t,emit:a}){const r=e,o=a,n=vue.ref(null),i=vue.ref(null);function s(){n.value&&(i.value=new PerfectScrollbar(n.value,r.options),d())}function l(){i.value&&(d(!1),i.value.destroy(),i.value=null)}vue.watch(()=>r.options,()=>{l(),s()},{deep:!0}),vue.onMounted(()=>{n.value&&s()}),vue.onBeforeUnmount(()=>{l()});const u={scroll:c("scroll"),"ps-scroll-y":c("ps-scroll-y"),"ps-scroll-x":c("ps-scroll-x"),"ps-scroll-up":c("ps-scroll-up"),"ps-scroll-down":c("ps-scroll-down"),"ps-scroll-left":c("ps-scroll-left"),"ps-scroll-right":c("ps-scroll-right"),"ps-y-reach-start":c("ps-y-reach-start"),"ps-y-reach-end":c("ps-y-reach-end"),"ps-x-reach-start":c("ps-x-reach-start"),"ps-x-reach-end":c("ps-x-reach-end")};function c(e){return function(t){o(e,t)}}function d(e=!0){var t;null!=(t=i.value)&&t.element&&Object.entries(u).forEach(([t,a])=>{var r,o;e?null==(r=i.value)||r.element.addEventListener(t,a):null==(o=i.value)||o.element.removeEventListener(t,a)})}return t({ps:i}),(e,t)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.tag),{ref_key:"scrollbar",ref:n,class:"ps"},{default:vue.withCtx(()=>[vue.renderSlot(e.$slots,"default")]),_:3},512))}});function useSticky(e){let{rootEl:t,isSticky:a,layoutItemStyles:r}=e;const o=vue.shallowRef(!1),n=vue.shallowRef(0),i=vue.computed(()=>{const e="boolean"==typeof o.value?"top":o.value;return[a.value?{top:"auto",bottom:"auto",height:void 0}:void 0,o.value?{[e]:convertToUnit(n.value)}:{top:r.value.top}]});vue.onMounted(()=>{vue.watch(a,e=>{e?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),vue.onBeforeUnmount(()=>{window.removeEventListener("scroll",l)});let s=0;function l(){const e=s>window.scrollY?"up":"down",a=t.value.getBoundingClientRect(),i=parseFloat(r.value.top??0),l=window.scrollY-Math.max(0,n.value-i),u=a.height+Math.max(n.value,i)-window.scrollY-window.innerHeight,c=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;a.height<window.innerHeight-i?(o.value="top",n.value=i):"up"===e&&"bottom"===o.value||"down"===e&&"top"===o.value?(n.value=window.scrollY+a.top-c,o.value=!0):"down"===e&&u<=0?(n.value=0,o.value="bottom"):"up"===e&&l<=0&&(c?"top"!==o.value&&(n.value=-l+c+i,o.value="top"):(n.value=a.top+l,o.value="top")),s=window.scrollY}return{isStuck:o,stickyStyles:i}}const HORIZON=100,HISTORY=20;function kineticEnergyToVelocity(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function calculateImpulseVelocity(e){if(e.length<2)return 0;if(2===e.length)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let t=0;for(let a=e.length-1;a>0;a--){if(e[a].t===e[a-1].t)continue;const r=kineticEnergyToVelocity(t),o=(e[a].d-e[a-1].d)/(e[a].t-e[a-1].t);t+=(o-r)*Math.abs(o),a===e.length-1&&(t*=.5)}return 1e3*kineticEnergyToVelocity(t)}function useVelocity(){const e={};return{addMovement:function(t){Array.from(t.changedTouches).forEach(a=>{(e[a.identifier]??(e[a.identifier]=new CircularBuffer(HISTORY))).push([t.timeStamp,a])})},endTouch:function(t){Array.from(t.changedTouches).forEach(t=>{delete e[t.identifier]})},getVelocity:function(t){var a;const r=null==(a=e[t])?void 0:a.values().reverse();if(!r)throw new Error(`No samples for touch id ${t}`);const o=r[0],n=[],i=[];for(const e of r){if(o[0]-e[0]>HORIZON)break;n.push({t:e[0],d:e[1].clientX}),i.push({t:e[0],d:e[1].clientY})}return{x:calculateImpulseVelocity(n),y:calculateImpulseVelocity(i),get direction(){const{x:e,y:t}=this,[a,r]=[Math.abs(e),Math.abs(t)];return a>r&&e>=0?"right":a>r&&e<=0?"left":r>a&&t>=0?"down":r>a&&t<=0?"up":oops$1()}}}}}function oops$1(){throw new Error}function useTouch(e){let{el:t,isActive:a,isTemporary:r,width:o,touchless:n,position:i}=e;vue.onMounted(()=>{window.addEventListener("touchstart",y,{passive:!0}),window.addEventListener("touchmove",b,{passive:!1}),window.addEventListener("touchend",S,{passive:!0})}),vue.onBeforeUnmount(()=>{window.removeEventListener("touchstart",y),window.removeEventListener("touchmove",b),window.removeEventListener("touchend",S)});const s=vue.computed(()=>["left","right"].includes(i.value)),{addMovement:l,endTouch:u,getVelocity:c}=useVelocity();let d=!1;const p=vue.shallowRef(!1),h=vue.shallowRef(0),v=vue.shallowRef(0);let m;function f(e,t){return("left"===i.value?e:"right"===i.value?document.documentElement.clientWidth-e:"top"===i.value?e:"bottom"===i.value?document.documentElement.clientHeight-e:oops())-(t?o.value:0)}function g(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const a="left"===i.value?(e-v.value)/o.value:"right"===i.value?(document.documentElement.clientWidth-e-v.value)/o.value:"top"===i.value?(e-v.value)/o.value:"bottom"===i.value?(document.documentElement.clientHeight-e-v.value)/o.value:oops();return t?clamp(a):a}function y(e){if(n.value)return;const t=e.changedTouches[0].clientX,c=e.changedTouches[0].clientY,p="left"===i.value?t<25:"right"===i.value?t>document.documentElement.clientWidth-25:"top"===i.value?c<25:"bottom"===i.value?c>document.documentElement.clientHeight-25:oops(),y=a.value&&("left"===i.value?t<o.value:"right"===i.value?t>document.documentElement.clientWidth-o.value:"top"===i.value?c<o.value:"bottom"===i.value?c>document.documentElement.clientHeight-o.value:oops());(p||y||a.value&&r.value)&&(m=[t,c],v.value=f(s.value?t:c,a.value),h.value=g(s.value?t:c),d=v.value>-20&&v.value<80,u(e),l(e))}function b(e){const t=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY;if(d){if(!e.cancelable)return void(d=!1);const r=Math.abs(t-m[0]),o=Math.abs(a-m[1]);(s.value?r>o&&r>3:o>r&&o>3)?(p.value=!0,d=!1):(s.value?o:r)>3&&(d=!1)}if(!p.value)return;e.preventDefault(),l(e);const r=g(s.value?t:a,!1);h.value=Math.max(0,Math.min(1,r)),r>1?v.value=f(s.value?t:a,!0):r<0&&(v.value=f(s.value?t:a,!1))}function S(e){if(d=!1,!p.value)return;l(e),p.value=!1;const t=c(e.changedTouches[0].identifier),r=Math.abs(t.x),o=Math.abs(t.y),n=s.value?r>o&&r>400:o>r&&o>3;a.value=n?t.direction===({left:"right",right:"left",top:"down",bottom:"up"}[i.value]||oops()):h.value>.5}const k=vue.computed(()=>p.value?{transform:"left"===i.value?`translateX(calc(-100% + ${h.value*o.value}px))`:"right"===i.value?`translateX(calc(100% - ${h.value*o.value}px))`:"top"===i.value?`translateY(calc(-100% + ${h.value*o.value}px))`:"bottom"===i.value?`translateY(calc(100% - ${h.value*o.value}px))`:oops(),transition:"none"}:void 0);return useToggleScope(p,()=>{var e,a;const r=(null==(e=t.value)?void 0:e.style.transform)??null,o=(null==(a=t.value)?void 0:a.style.transition)??null;vue.watchEffect(()=>{var e,a,r,o;null==(a=t.value)||a.style.setProperty("transform",(null==(e=k.value)?void 0:e.transform)||"none"),null==(o=t.value)||o.style.setProperty("transition",(null==(r=k.value)?void 0:r.transition)||null)}),vue.onScopeDispose(()=>{var e,a;null==(e=t.value)||e.style.setProperty("transform",r),null==(a=t.value)||a.style.setProperty("transition",o)})}),{isDragging:p,dragProgress:h,dragStyles:k}}function oops(){throw new Error}const locations=["start","end","left","right","top","bottom"],makeVNavigationDrawerProps=propsFactory({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>locations.includes(e)},sticky:Boolean,...makeBorderProps(),...makeComponentProps(),...makeDelayProps(),...makeDisplayProps({mobile:null}),...makeElevationProps(),...makeLayoutItemProps(),...makeRoundedProps(),...makeTagProps({tag:"nav"}),...makeThemeProps()},"VNavigationDrawer"),VNavigationDrawer=genericComponent()({name:"VNavigationDrawer",props:makeVNavigationDrawerProps(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:a,emit:r,slots:o}=t;const{isRtl:n}=useRtl(),{themeClasses:i}=provideTheme(e),{borderClasses:s}=useBorder(e),{backgroundColorClasses:l,backgroundColorStyles:u}=useBackgroundColor(()=>e.color),{elevationClasses:c}=useElevation(e),{displayClasses:d,mobile:p}=useDisplay(e),{roundedClasses:h}=useRounded(e),v=useRouter(),m=useProxiedModel(e,"modelValue",null,e=>!!e),{ssrBootStyles:f}=useSsrBoot(),{scopeId:g}=useScopeId(),y=vue.ref(),b=vue.shallowRef(!1),{runOpenDelay:S,runCloseDelay:k}=useDelay(e,e=>{b.value=e}),C=vue.computed(()=>e.rail&&e.expandOnHover&&b.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),x=vue.computed(()=>toPhysical(e.location,n.value)),V=vue.toRef(()=>e.persistent),P=vue.computed(()=>!e.permanent&&(p.value||e.temporary)),w=vue.computed(()=>e.sticky&&!P.value&&"bottom"!==x.value);useToggleScope(()=>e.expandOnHover&&null!=e.rail,()=>{vue.watch(b,e=>r("update:rail",!e))}),useToggleScope(()=>!e.disableResizeWatcher,()=>{vue.watch(P,t=>!e.permanent&&vue.nextTick(()=>m.value=!t))}),useToggleScope(()=>!e.disableRouteWatcher&&!!v,()=>{vue.watch(v.currentRoute,()=>P.value&&(m.value=!1))}),vue.watch(()=>e.permanent,e=>{e&&(m.value=!0)}),null!=e.modelValue||P.value||(m.value=e.permanent||!p.value);const{isDragging:E,dragProgress:_}=useTouch({el:y,isActive:m,isTemporary:P,width:C,touchless:vue.toRef(()=>e.touchless),position:x}),T=vue.computed(()=>{const t=P.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):C.value;return E.value?t*_.value:t}),{layoutItemStyles:I,layoutItemScrimStyles:A}=useLayoutItem({id:e.name,order:vue.computed(()=>parseInt(e.order,10)),position:x,layoutSize:T,elementSize:C,active:vue.readonly(m),disableTransitions:vue.toRef(()=>E.value),absolute:vue.computed(()=>e.absolute||w.value&&"string"!=typeof B.value)}),{isStuck:B,stickyStyles:D}=useSticky({rootEl:y,isSticky:w,layoutItemStyles:I}),F=useBackgroundColor(()=>"string"==typeof e.scrim?e.scrim:null),M=vue.computed(()=>({...E.value?{opacity:.2*_.value,transition:"none"}:void 0,...A.value}));return provideDefaults({VList:{bgColor:"transparent"}}),useRender(()=>{const t=o.image||e.image;return vue.createElementVNode(vue.Fragment,null,[vue.createVNode(e.tag,vue.mergeProps({ref:y,onMouseenter:S,onMouseleave:k,class:["v-navigation-drawer",`v-navigation-drawer--${x.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":b.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":P.value,"v-navigation-drawer--persistent":V.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":w.value},i.value,l.value,s.value,d.value,c.value,h.value,e.class],style:[u.value,I.value,f.value,D.value,e.style]},g,a),{default:()=>{var a,r,n;return[t&&vue.createElementVNode("div",{key:"image",class:"v-navigation-drawer__img"},[o.image?vue.createVNode(VDefaultsProvider,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},o.image):vue.createVNode(VImg,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),o.prepend&&vue.createElementVNode("div",{class:"v-navigation-drawer__prepend"},[null==(a=o.prepend)?void 0:a.call(o)]),vue.createElementVNode("div",{class:"v-navigation-drawer__content"},[null==(r=o.default)?void 0:r.call(o)]),o.append&&vue.createElementVNode("div",{class:"v-navigation-drawer__append"},[null==(n=o.append)?void 0:n.call(o)])]}}),vue.createVNode(vue.Transition,{name:"fade-transition"},{default:()=>[P.value&&(E.value||m.value)&&!!e.scrim&&vue.createElementVNode("div",vue.mergeProps({class:["v-navigation-drawer__scrim",F.backgroundColorClasses.value],style:[M.value,F.backgroundColorStyles.value],onClick:()=>{V.value||(m.value=!1)}},g),null)]})])}),{isStuck:B}}}),_hoisted_1$2={key:0,class:"logo d-flex align-center pa-4"},_hoisted_2$1=["innerHTML"],_hoisted_3$1=["src"],_hoisted_4$1={key:3,class:"logo-text text-h6 ms-2"},_hoisted_5$1=["src"],_sfc_main$2=vue.defineComponent({__name:"AppSidebar",props:{menuItems:{default:()=>[]},logo:{},logoLight:{},logoSvg:{},logoText:{},miniSidebar:{type:Boolean,default:!1},permanent:{type:Boolean,default:!0},temporary:{type:Boolean,default:!1},rail:{type:Boolean,default:!1},location:{default:"left"},width:{default:265},railWidth:{default:75},containerClass:{default:""},hideDefaultLogo:{type:Boolean,default:!1}},setup(e){const t=e,a=useCustomizerStore(),r=vueRouter.useRoute(),o=vueRouter.useRouter(),n=vue.computed(()=>t.miniSidebar||a.mini_sidebar),i=vue.computed(()=>"string"==typeof t.logoSvg&&!!t.logoSvg),s=vue.computed(()=>"string"!=typeof t.logoSvg&&!!t.logoSvg),l=vue.computed({get:()=>a.Sidebar_drawer,set:e=>a.SET_SIDEBAR_DRAWER(e)}),u=vue.computed(()=>n.value?t.railWidth:t.width),c=e=>{e.disabled||(e.to?o.push(e.to):e.href&&window.open(e.href,"_blank"))},d=e=>!!e.to&&(r.path===e.to||r.path.startsWith(e.to+"/")),p=vue.computed(()=>n.value&&!l.value);return(t,r)=>(vue.openBlock(),vue.createBlock(VNavigationDrawer,{modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=e=>l.value=e),permanent:e.permanent&&!e.temporary,temporary:e.temporary,rail:e.rail||n.value&&!p.value,"expand-on-hover":p.value,location:e.location,width:u.value,class:vue.normalizeClass([["app-sidebar leftSidebar",{"mini-sidebar":n.value},e.containerClass],"border-0"])},{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"logo",{isMini:n.value,themeMode:vue.unref(a).themeMode},()=>[e.hideDefaultLogo?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[e.logoSvg||e.logo||e.logoText?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[s.value?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.logoSvg),{key:0,class:"logo-svg",style:{height:"40px",display:"flex","align-items":"center"}})):i.value?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"logo-svg",innerHTML:e.logoSvg,style:{height:"40px",display:"flex",alignItems:"center"}},null,8,_hoisted_2$1)):e.logo&&!n.value?(vue.openBlock(),vue.createElementBlock("img",{key:2,src:"dark"===vue.unref(a).themeMode&&e.logoLight?e.logoLight:e.logo,alt:"Logo",class:"logo-img",style:{"max-height":"40px","max-width":"100%"}},null,8,_hoisted_3$1)):vue.createCommentVNode("",!0),e.logoText&&!n.value?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$1,vue.toDisplayString(e.logoText),1)):vue.createCommentVNode("",!0),!e.logoSvg&&e.logo&&n.value?(vue.openBlock(),vue.createElementBlock("img",{key:4,src:"dark"===vue.unref(a).themeMode&&e.logoLight?e.logoLight:e.logo,alt:"Logo",class:"logo-img-mini",style:{height:"40px",width:"40px","object-fit":"contain"}},null,8,_hoisted_5$1)):vue.createCommentVNode("",!0)],64)):(vue.openBlock(),vue.createBlock(VSpacer,{key:1}))]))],!0),vue.createVNode(VDivider),vue.createVNode(vue.unref(C),{class:"scrollnavbar",options:{wheelSpeed:1,swipeEasing:!0,suppressScrollX:!0}},{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"menu",{items:e.menuItems,isActive:d,navigate:c},()=>[vue.createVNode(VList,{lines:!1,class:"pa-0"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.menuItems,(e,t)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:t},[e.divider?(vue.openBlock(),vue.createBlock(VDivider,{key:0,class:"my-2"})):e.items&&e.items.length>0?(vue.openBlock(),vue.createBlock(VListGroup,{key:1,value:e.items.some(e=>d(e))},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VListItem,vue.mergeProps({ref_for:!0},t,{disabled:e.disabled}),vue.createSlots({prepend:vue.withCtx(()=>["string"==typeof e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):e.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.icon),{key:1})):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024)]),_:2},[e.chip?{name:"append",fn:vue.withCtx(()=>[vue.createVNode(VChip,{color:e.chip.color||"primary",size:"small",class:"ms-2"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.chip.content),1)]),_:2},1032,["color"])]),key:"0"}:void 0]),1040,["disabled"])]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.items,(e,t)=>(vue.openBlock(),vue.createBlock(VListItem,{key:t,to:e.to,href:e.href,disabled:e.disabled,active:d(e),onClick:t=>c(e)},vue.createSlots({prepend:vue.withCtx(()=>["string"==typeof e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):e.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.icon),{key:1})):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024)]),_:2},[e.chip?{name:"append",fn:vue.withCtx(()=>[vue.createVNode(VChip,{color:e.chip.color||"primary",size:"small",class:"ms-2"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.chip.content),1)]),_:2},1032,["color"])]),key:"0"}:void 0]),1032,["to","href","disabled","active","onClick"]))),128))]),_:2},1032,["value"])):(vue.openBlock(),vue.createBlock(VListItem,{key:2,to:e.to,href:e.href,disabled:e.disabled,active:d(e),onClick:t=>c(e)},vue.createSlots({prepend:vue.withCtx(()=>["string"==typeof e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):e.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.icon),{key:1})):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024)]),_:2},[e.chip?{name:"append",fn:vue.withCtx(()=>[vue.createVNode(VChip,{color:e.chip.color||"primary",size:"small",class:"ms-2"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.chip.content),1)]),_:2},1032,["color"])]),key:"0"}:void 0]),1032,["to","href","disabled","active","onClick"]))],64))),128))]),_:1})],!0)]),_:3}),vue.renderSlot(t.$slots,"bottom",{},void 0,!0)]),_:3},8,["modelValue","permanent","temporary","rail","expand-on-hover","location","width","class"]))}}),AppSidebar=_export_sfc$1(_sfc_main$2,[["__scopeId","data-v-e32ab994"]]),makeVToolbarTitleProps=propsFactory({text:String,...makeComponentProps(),...makeTagProps()},"VToolbarTitle"),VToolbarTitle=genericComponent()({name:"VToolbarTitle",props:makeVToolbarTitleProps(),setup(e,t){let{slots:a}=t;return useRender(()=>{const t=!!(a.default||a.text||e.text);return vue.createVNode(e.tag,{class:vue.normalizeClass(["v-toolbar-title",e.class]),style:vue.normalizeStyle(e.style)},{default:()=>{var r;return[t&&vue.createElementVNode("div",{class:"v-toolbar-title__placeholder"},[a.text?a.text():e.text,null==(r=a.default)?void 0:r.call(a)])]}})}),{}}}),allowedDensities=[null,"prominent","default","comfortable","compact"],makeVToolbarProps=propsFactory({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>allowedDensities.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...makeBorderProps(),...makeComponentProps(),...makeElevationProps(),...makeRoundedProps(),...makeTagProps({tag:"header"}),...makeThemeProps()},"VToolbar"),VToolbar=genericComponent()({name:"VToolbar",props:makeVToolbarProps(),setup(e,t){var a;let{slots:r}=t;const{backgroundColorClasses:o,backgroundColorStyles:n}=useBackgroundColor(()=>e.color),{borderClasses:i}=useBorder(e),{elevationClasses:s}=useElevation(e),{roundedClasses:l}=useRounded(e),{themeClasses:u}=provideTheme(e),{rtlClasses:c}=useRtl(),d=vue.shallowRef(null===e.extended?!!(null==(a=r.extension)?void 0:a.call(r)):e.extended),p=vue.computed(()=>parseInt(Number(e.height)+("prominent"===e.density?Number(e.height):0)-("comfortable"===e.density?8:0)-("compact"===e.density?16:0),10)),h=vue.computed(()=>d.value?parseInt(Number(e.extensionHeight)+("prominent"===e.density?Number(e.extensionHeight):0)-("comfortable"===e.density?4:0)-("compact"===e.density?8:0),10):0);return provideDefaults({VBtn:{variant:"text"}}),useRender(()=>{var t;const a=!(!e.title&&!r.title),v=!(!r.image&&!e.image),m=null==(t=r.extension)?void 0:t.call(r);return d.value=null===e.extended?!!m:e.extended,vue.createVNode(e.tag,{class:vue.normalizeClass(["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},o.value,i.value,s.value,l.value,u.value,c.value,e.class]),style:vue.normalizeStyle([n.value,e.style])},{default:()=>[v&&vue.createElementVNode("div",{key:"image",class:"v-toolbar__image"},[r.image?vue.createVNode(VDefaultsProvider,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):vue.createVNode(VImg,{key:"image-img",cover:!0,src:e.image},null)]),vue.createVNode(VDefaultsProvider,{defaults:{VTabs:{height:convertToUnit(p.value)}}},{default:()=>{var t,o,n;return[vue.createElementVNode("div",{class:"v-toolbar__content",style:{height:convertToUnit(p.value)}},[r.prepend&&vue.createElementVNode("div",{class:"v-toolbar__prepend"},[null==(t=r.prepend)?void 0:t.call(r)]),a&&vue.createVNode(VToolbarTitle,{key:"title",text:e.title},{text:r.title}),null==(o=r.default)?void 0:o.call(r),r.append&&vue.createElementVNode("div",{class:"v-toolbar__append"},[null==(n=r.append)?void 0:n.call(r)])])]}}),vue.createVNode(VDefaultsProvider,{defaults:{VTabs:{height:convertToUnit(h.value)}}},{default:()=>[vue.createVNode(VExpandTransition,null,{default:()=>[d.value&&vue.createElementVNode("div",{class:"v-toolbar__extension",style:{height:convertToUnit(h.value)}},[m])]})]})]})}),{contentHeight:p,extensionHeight:h}}}),makeScrollProps=propsFactory({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function useScroll(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{canScroll:a}=t;let r=0,o=0;const n=vue.ref(null),i=vue.shallowRef(0),s=vue.shallowRef(0),l=vue.shallowRef(0),u=vue.shallowRef(!1),c=vue.shallowRef(!1),d=vue.computed(()=>Number(e.scrollThreshold)),p=vue.computed(()=>clamp((d.value-i.value)/d.value||0)),h=()=>{const e=n.value;if(!e||a&&!a.value)return;r=i.value,i.value="window"in e?e.pageYOffset:e.scrollTop;const t=e instanceof Window?document.documentElement.scrollHeight:e.scrollHeight;o===t?(c.value=i.value<r,l.value=Math.abs(i.value-d.value)):o=t};return vue.watch(c,()=>{s.value=s.value||i.value}),vue.watch(u,()=>{s.value=0}),vue.onMounted(()=>{vue.watch(()=>e.scrollTarget,e=>{var t;const a=e?document.querySelector(e):window;a?a!==n.value&&(null==(t=n.value)||t.removeEventListener("scroll",h),n.value=a,n.value.addEventListener("scroll",h,{passive:!0})):consoleWarn(`Unable to locate element with identifier ${e}`)},{immediate:!0})}),vue.onBeforeUnmount(()=>{var e;null==(e=n.value)||e.removeEventListener("scroll",h)}),a&&vue.watch(a,h,{immediate:!0}),{scrollThreshold:d,currentScroll:i,currentThreshold:l,isScrollActive:u,scrollRatio:p,isScrollingUp:c,savedScroll:s}}const makeVAppBarProps=propsFactory({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...makeVToolbarProps(),...makeLayoutItemProps(),...makeScrollProps(),height:{type:[Number,String],default:64}},"VAppBar"),VAppBar=genericComponent()({name:"VAppBar",props:makeVAppBarProps(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const r=vue.ref(),o=useProxiedModel(e,"modelValue"),n=vue.computed(()=>{var t;const a=new Set((null==(t=e.scrollBehavior)?void 0:t.split(" "))??[]);return{hide:a.has("hide"),fullyHide:a.has("fully-hide"),inverted:a.has("inverted"),collapse:a.has("collapse"),elevate:a.has("elevate"),fadeImage:a.has("fade-image")}}),i=vue.computed(()=>{const e=n.value;return e.hide||e.fullyHide||e.inverted||e.collapse||e.elevate||e.fadeImage||!o.value}),{currentScroll:s,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=useScroll(e,{canScroll:i}),d=vue.toRef(()=>n.value.hide||n.value.fullyHide),p=vue.computed(()=>e.collapse||n.value.collapse&&(n.value.inverted?c.value>0:0===c.value)),h=vue.computed(()=>e.flat||n.value.fullyHide&&!o.value||n.value.elevate&&(n.value.inverted?s.value>0:0===s.value)),v=vue.computed(()=>n.value.fadeImage?n.value.inverted?1-c.value:c.value:void 0),m=vue.computed(()=>{var e,t;if(n.value.hide&&n.value.inverted)return 0;const a=(null==(e=r.value)?void 0:e.contentHeight)??0,o=(null==(t=r.value)?void 0:t.extensionHeight)??0;return d.value?s.value<l.value||n.value.fullyHide?a+o:a:a+o});useToggleScope(()=>!!e.scrollBehavior,()=>{vue.watchEffect(()=>{d.value?n.value.inverted?o.value=s.value>l.value:o.value=u.value||s.value<l.value:o.value=!0})});const{ssrBootStyles:f}=useSsrBoot(),{layoutItemStyles:g}=useLayoutItem({id:e.name,order:vue.computed(()=>parseInt(e.order,10)),position:vue.toRef(()=>e.location),layoutSize:m,elementSize:vue.shallowRef(void 0),active:o,absolute:vue.toRef(()=>e.absolute)});return useRender(()=>{const t=VToolbar.filterProps(e);return vue.createVNode(VToolbar,vue.mergeProps({ref:r,class:["v-app-bar",{"v-app-bar--bottom":"bottom"===e.location},e.class],style:[{...g.value,"--v-toolbar-image-opacity":v.value,height:void 0,...f.value},e.style]},t,{collapse:p.value,flat:h.value}),a)}),{}}}),makeVAppBarNavIconProps=propsFactory({...omit(makeVBtnProps({icon:"$menu",variant:"text"}),["spaced"])},"VAppBarNavIcon"),VAppBarNavIcon=genericComponent()({name:"VAppBarNavIcon",props:makeVAppBarNavIconProps(),setup(e,t){let{slots:a}=t;return useRender(()=>vue.createVNode(VBtn,vue.mergeProps(e,{class:["v-app-bar-nav-icon"]}),a)),{}}}),VAppBarTitle=genericComponent()({name:"VAppBarTitle",props:makeVToolbarTitleProps(),setup(e,t){let{slots:a}=t;return useRender(()=>vue.createVNode(VToolbarTitle,vue.mergeProps(e,{class:"v-app-bar-title"}),a)),{}}}),makeVBadgeProps=propsFactory({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:IconValue,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...makeComponentProps(),...makeLocationProps({location:"top end"}),...makeRoundedProps(),...makeTagProps(),...makeThemeProps(),...makeTransitionProps$1({transition:"scale-rotate-transition"}),...makeDimensionProps()},"VBadge"),VBadge=genericComponent()({name:"VBadge",inheritAttrs:!1,props:makeVBadgeProps(),setup(e,t){const{backgroundColorClasses:a,backgroundColorStyles:r}=useBackgroundColor(()=>e.color),{roundedClasses:o}=useRounded(e),{t:n}=useLocale(),{textColorClasses:i,textColorStyles:s}=useTextColor(()=>e.textColor),{themeClasses:l}=useTheme(),{locationStyles:u}=useLocation(e,!0,t=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(t)?Number(e.offsetY??0):["left","right"].includes(t)?Number(e.offsetX??0):0)),{dimensionStyles:c}=useDimension(e);return useRender(()=>{const d=Number(e.content),p=!e.max||isNaN(d)?e.content:d<=Number(e.max)?d:`${e.max}+`,[h,v]=pickWithRest(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return vue.createVNode(e.tag,vue.mergeProps({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},v,{style:e.style}),{default:()=>{var v,m;return[vue.createElementVNode("div",{class:"v-badge__wrapper"},[null==(m=(v=t.slots).default)?void 0:m.call(v),vue.createVNode(MaybeTransition,{transition:e.transition},{default:()=>{var v,m;return[vue.withDirectives(vue.createElementVNode("span",vue.mergeProps({class:["v-badge__badge",l.value,a.value,o.value,i.value],style:[r.value,s.value,c.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":n(e.label,d),"aria-live":"polite",role:"status"},h),[e.dot?void 0:t.slots.badge?null==(m=(v=t.slots).badge)?void 0:m.call(v):e.icon?vue.createVNode(VIcon,{icon:e.icon},null):p]),[[vue.vShow,e.modelValue]])]}})])]}})}),{}}}),_hoisted_1$1={key:0,class:"text-h6"},_hoisted_2={key:1,class:"text-caption text-medium-emphasis"},_hoisted_3={key:2},_hoisted_4={key:2},_hoisted_5={key:2},_sfc_main$1=vue.defineComponent({__name:"AppHeader",props:{title:{},subtitle:{},class:{},ariaLabel:{default:"Application header"},showSidebarToggle:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!1},searchPlaceholder:{default:"جستجو..."},searchValue:{},showNotifications:{type:Boolean,default:!1},notificationCount:{default:0},showProfile:{type:Boolean,default:!1},profileAvatar:{},profileName:{},profileMenu:{default:()=>[]},actions:{default:()=>[]},color:{default:"surface"},elevation:{default:1},height:{default:70},hideDefaultTitle:{type:Boolean,default:!1}},emits:["update:searchValue","toggle-sidebar","search"],setup(e,{emit:t}){const a=e,r=t,o=useCustomizerStore(),n=vue.computed({get:()=>a.searchValue||"",set:e=>{r("update:searchValue",e),r("search",e)}}),i=()=>{o.SET_SIDEBAR_DRAWER(),r("toggle-sidebar")},s=vueRouter.useRouter(),l=vue.computed(()=>a.profileMenu.map(e=>({...e,prependIcon:e.icon,onClick:e.action||(()=>{e.to?s.push(e.to):e.href&&window.open(e.href,"_blank")})})));return(t,r)=>(vue.openBlock(),vue.createBlock(VAppBar,{color:e.color,elevation:e.elevation,height:e.height,class:vue.normalizeClass(["app-header topbar",a.class]),"aria-label":e.ariaLabel,fixed:""},{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"left",{},void 0,!0),e.showSidebarToggle?(vue.openBlock(),vue.createBlock(VAppBarNavIcon,{key:0,variant:"text",onClick:i})):vue.createCommentVNode("",!0),vue.renderSlot(t.$slots,"title",{},()=>[e.hideDefaultTitle||!e.title&&!e.subtitle?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(VAppBarTitle,{key:0,class:"d-flex flex-column"},{default:vue.withCtx(()=>[e.title?(vue.openBlock(),vue.createElementBlock("span",_hoisted_1$1,vue.toDisplayString(e.title),1)):vue.createCommentVNode("",!0),e.subtitle?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2,vue.toDisplayString(e.subtitle),1)):vue.createCommentVNode("",!0)]),_:1}))],!0),vue.createVNode(VSpacer),vue.renderSlot(t.$slots,"center",{},void 0,!0),e.showSearch?(vue.openBlock(),vue.createBlock(VTextField,{key:1,modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=e=>n.value=e),placeholder:e.searchPlaceholder,density:"compact",variant:"outlined","hide-details":"","prepend-inner-icon":"mdi-magnify",class:"search-bar",style:{"max-width":"400px"}},null,8,["modelValue","placeholder"])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.actions,(e,t)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:t},[e.tooltip?(vue.openBlock(),vue.createBlock(VTooltip,{key:0,text:e.tooltip,location:"bottom"},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VBtn,vue.mergeProps({ref_for:!0},t,{icon:e.icon,color:e.color||"primary",variant:e.variant||"text",size:e.size||"default",disabled:e.disabled,class:"ms-2",onClick:e.onClick}),{default:vue.withCtx(()=>[e.badge?(vue.openBlock(),vue.createBlock(VBadge,{key:0,content:e.badge,color:e.badgeColor||"error",overlap:""},{default:vue.withCtx(()=>[e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0)]),_:2},1032,["content","color"])):e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:1,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0),e.label&&!e.icon?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3,vue.toDisplayString(e.label),1)):vue.createCommentVNode("",!0)]),_:2},1040,["icon","color","variant","size","disabled","onClick"])]),_:2},1032,["text"])):(vue.openBlock(),vue.createBlock(VBtn,{key:1,icon:e.icon,color:e.color||"primary",variant:e.variant||"text",size:e.size||"default",disabled:e.disabled,class:"ms-2",onClick:e.onClick},{default:vue.withCtx(()=>[e.badge?(vue.openBlock(),vue.createBlock(VBadge,{key:0,content:e.badge,color:e.badgeColor||"error",overlap:""},{default:vue.withCtx(()=>[e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:0,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0)]),_:2},1032,["content","color"])):e.icon?(vue.openBlock(),vue.createBlock(VIcon,{key:1,icon:e.icon},null,8,["icon"])):vue.createCommentVNode("",!0),e.label&&!e.icon?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4,vue.toDisplayString(e.label),1)):vue.createCommentVNode("",!0)]),_:2},1032,["icon","color","variant","size","disabled","onClick"]))],64))),128)),vue.renderSlot(t.$slots,"right",{},void 0,!0),e.showNotifications?(vue.openBlock(),vue.createBlock(VMenu,{key:2,location:"bottom end","offset-y":""},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VBtn,vue.mergeProps(t,{icon:"",variant:"text",class:"profileBtn"}),{default:vue.withCtx(()=>[vue.createVNode(VBadge,{content:e.notificationCount>0?e.notificationCount:void 0,color:"error",overlap:""},{default:vue.withCtx(()=>[vue.createVNode(VIcon,{icon:"mdi-bell-outline"})]),_:1},8,["content"])]),_:1},16)]),default:vue.withCtx(()=>[vue.createVNode(VList,null,{default:vue.withCtx(()=>[vue.createVNode(VListItem,null,{default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[...r[1]||(r[1]=[vue.createTextVNode("اعلان‌ها",-1)])]),_:1})]),_:1}),vue.createVNode(VDivider),vue.createVNode(VListItem,null,{default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[...r[2]||(r[2]=[vue.createTextVNode("هیچ اعلان جدیدی وجود ندارد",-1)])]),_:1})]),_:1})]),_:1})]),_:1})):vue.createCommentVNode("",!0),e.showProfile?(vue.openBlock(),vue.createBlock(VMenu,{key:3,location:"bottom end","offset-y":""},{activator:vue.withCtx(({props:t})=>[vue.createVNode(VBtn,vue.mergeProps(t,{icon:!e.profileName&&!e.profileAvatar,variant:"text",class:"profileBtn"}),{default:vue.withCtx(()=>[e.profileAvatar?(vue.openBlock(),vue.createBlock(VAvatar,{key:0,size:"32"},{default:vue.withCtx(()=>[vue.createVNode(VImg,{src:e.profileAvatar,alt:e.profileName||"Profile"},null,8,["src","alt"])]),_:1})):e.profileName?(vue.openBlock(),vue.createElementBlock("span",_hoisted_5,vue.toDisplayString(e.profileName),1)):(vue.openBlock(),vue.createBlock(VIcon,{key:1,icon:"mdi-account-circle"}))]),_:1},16,["icon"])]),default:vue.withCtx(()=>[l.value.length>0?(vue.openBlock(),vue.createBlock(VList,{key:0},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(l.value,(e,t)=>(vue.openBlock(),vue.createBlock(VListItem,{key:t,"prepend-icon":e.icon,to:e.to,href:e.href,onClick:e.onClick},{default:vue.withCtx(()=>[vue.createVNode(VListItemTitle,null,{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.title),1)]),_:2},1024),e.divider?(vue.openBlock(),vue.createBlock(VDivider,{key:0})):vue.createCommentVNode("",!0)]),_:2},1032,["prepend-icon","to","href","onClick"]))),128))]),_:1})):vue.createCommentVNode("",!0)]),_:1})):vue.createCommentVNode("",!0)]),_:3},8,["color","elevation","height","class","aria-label"]))}}),AppHeader=_export_sfc$1(_sfc_main$1,[["__scopeId","data-v-b45b815e"]]),makeVAppProps=propsFactory({...makeComponentProps(),...omit(makeLayoutProps(),["fullHeight"]),...makeThemeProps()},"VApp"),VApp=genericComponent()({name:"VApp",props:makeVAppProps(),setup(e,t){let{slots:a}=t;const r=provideTheme(e),{layoutClasses:o,getLayoutItem:n,items:i,layoutRef:s}=createLayout({...e,fullHeight:!0}),{rtlClasses:l}=useRtl();return useRender(()=>{var t;return vue.createElementVNode("div",{ref:s,class:vue.normalizeClass(["v-application",r.themeClasses.value,o.value,l.value,e.class]),style:vue.normalizeStyle([e.style])},[vue.createElementVNode("div",{class:"v-application__wrap"},[null==(t=a.default)?void 0:t.call(a)])])}),{getLayoutItem:n,items:i,theme:r}}}),makeVMainProps=propsFactory({scrollable:Boolean,...makeComponentProps(),...makeDimensionProps(),...makeTagProps({tag:"main"})},"VMain"),VMain=genericComponent()({name:"VMain",props:makeVMainProps(),setup(e,t){let{slots:a}=t;const{dimensionStyles:r}=useDimension(e),{mainStyles:o}=useLayout(),{ssrBootStyles:n}=useSsrBoot();return useRender(()=>vue.createVNode(e.tag,{class:vue.normalizeClass(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:vue.normalizeStyle([o.value,n.value,r.value,e.style])},{default:()=>{var t,r;return[e.scrollable?vue.createElementVNode("div",{class:"v-main__scroller"},[null==(t=a.default)?void 0:t.call(a)]):null==(r=a.default)?void 0:r.call(a)]}})),{}}}),_hoisted_1={class:"page-wrapper"},_sfc_main=vue.defineComponent({__name:"AppLayout",props:{header:{default:()=>({title:"Dashboard",subtitle:"",showSidebarToggle:!0,showSearch:!1,searchPlaceholder:"جستجو...",showNotifications:!1,notificationCount:0,showProfile:!1,actions:[],color:"surface",elevation:1,height:70})},sidebar:{default:()=>({menuItems:[],logo:"",logoLight:"",logoText:"UI Kit",miniSidebar:!1,permanent:!0,temporary:!1,rail:!1,location:"left",width:265,railWidth:75})}},setup:e=>(useCustomizerStore(),(t,a)=>(vue.openBlock(),vue.createBlock(VApp,null,{default:vue.withCtx(()=>[vue.createVNode(AppHeader,vue.mergeProps(e.header,{class:"app-header"}),null,16),vue.createVNode(AppSidebar,vue.mergeProps(e.sidebar,{class:"app-sidebar"}),null,16),vue.createVNode(VMain,null,{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1,[vue.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3})]),_:3})))}),AppLayout=_export_sfc$1(_sfc_main,[["__scopeId","data-v-106317c7"]]);function useDataTable(e){const t=vue.ref([]),a=vue.ref(!1),r=vue.ref(null),o=vue.ref(!0),n=vue.ref(!1),i=vue.ref({currentPage:1,itemsPerPage:e.pageSize||10,totalItems:0,totalPages:1}),s=async(s={})=>{var l,u;if(!a.value){a.value=!0,r.value=null;try{const a=getAxiosInstance(),r=await a.get(e.apiResource,{params:{page:i.value.currentPage,per_page:i.value.itemsPerPage,...e.queryParams,...s}}),{data:n,meta:l}=r.data;return l?(t.value=n,i.value={currentPage:l.current_page||1,itemsPerPage:l.per_page||e.pageSize||10,totalItems:l.total||0,totalPages:l.last_page||1},o.value=l.current_page<l.last_page):(t.value=n,o.value=!1),n}catch(c){throw r.value=(null==(u=null==(l=c.response)?void 0:l.data)?void 0:u.message)||"Failed to fetch data",c}finally{a.value=!1,n.value=!1}}},l=core.useDebounceFn(s,300);return vue.watch(()=>e.queryParams,t=>{!1!==e.autoFetch&&l(t)},{deep:!0}),!1!==e.autoFetch&&s(),{items:t,loading:a,error:r,hasMore:o,isLoadingMore:n,pagination:i,fetchData:s,loadMore:async()=>{if(!a.value&&o.value){n.value=!0,i.value.currentPage+=1;try{const a=getAxiosInstance(),r=await a.get(e.apiResource,{params:{page:i.value.currentPage,per_page:i.value.itemsPerPage,...e.queryParams}}),{data:n,meta:s}=r.data;s?(t.value=[...t.value,...n],o.value=s.current_page<s.last_page):(t.value=[...t.value,...n],o.value=!1)}catch(r){throw i.value.currentPage-=1,r}finally{n.value=!1}}},setPage:e=>{e<1||e>i.value.totalPages||(i.value.currentPage=e,s())},setItemsPerPage:e=>{i.value.itemsPerPage=e,i.value.currentPage=1,s()}}}function useTableActions(e={}){const t=vue.ref(!1),a=vue.ref(!1),r=vue.ref(!1),o=vue.ref(!1),n=vue.ref(null),i=vue.ref({}),s=vue.ref(null),l=vue.ref(null),u=e=>{o.value=!!e,n.value=e?{...e}:{},i.value=e?{...e}:{},t.value=!0},c=e=>{s.value=e,a.value=!0},d=(e,t)=>{l.value=e,n.value=t?{...t}:{},i.value=t?{...t}:{},r.value=!0},p=(e,t)=>!e.condition||e.condition(t),h=vue.computed(()=>{const t=Array.isArray(e.actions)&&e.actions.length>0,a=!!e.routes&&Object.keys(e.routes).length>0,r=!!e.downloadLink&&Object.keys(e.downloadLink).length>0,o=Array.isArray(e.customActions)&&e.customActions.length>0,n=Array.isArray(e.customButtons)&&e.customButtons.length>0||!!e.customButtonsFn;return t||a||r||o||n});return{dialog:t,deleteDialog:a,actionDialog:r,isEditing:o,editedItem:n,formModel:i,itemToDelete:s,currentAction:l,hasAnyActions:h,openDialog:u,openDeleteDialog:c,openActionDialog:d,resetDialogs:()=>{t.value=!1,a.value=!1,r.value=!1,o.value=!1,n.value=null,s.value=null,l.value=null,i.value={}},getItemActions:t=>{const a=[];if(e.actions&&(e.actions.includes("view")&&a.push({label:"View",icon:icons.eye,color:"info",outlined:!0,onClick:()=>u(t)}),e.actions.includes("edit")&&a.push({label:"Edit",icon:icons.pencil,color:"primary",outlined:!0,onClick:()=>u(t)}),e.actions.includes("delete")&&a.push({label:"Delete",icon:icons.delete,color:"error",outlined:!0,onClick:()=>c(t)})),e.routes&&Object.entries(e.routes).forEach(([e,t])=>{a.push({label:e.charAt(0).toUpperCase()+e.slice(1),icon:icons.arrowRight,color:"secondary",outlined:!0,onClick:()=>{}})}),e.downloadLink&&Object.entries(e.downloadLink).forEach(([e,t])=>{a.push({label:`Download ${e}`,icon:icons.download,color:"success",outlined:!0,onClick:()=>{}})}),e.customActions&&e.customActions.forEach(e=>{p(e,t)&&a.push({label:e.title,icon:icons.cog,color:"primary",outlined:!0,onClick:()=>d(e,t)})}),e.customButtonsFn){const r=e.customButtonsFn(t);a.push(...r)}else e.customButtons&&a.push(...e.customButtons);return a},shouldShowAction:p}}function useTableHeaders(e,t={}){const{selectable:a=!1,hasActions:r=!1,actionsWidth:o="200px",showSelection:n=!0,showIndex:i=!1,indexLabel:s="#",indexMethod:l}=t,u=vue.computed(()=>a&&n?[{type:"selection",width:"50px",align:"center",fixed:"left",selectable:(e,t)=>!0},...e]:e),c=vue.computed(()=>i?[{type:"index",label:s,width:"60px",align:"center",fixed:"left",index:l||(e=>e+1)},...u.value]:u.value),d=vue.computed(()=>r?[...c.value,{label:"Actions",key:"actions",width:o,fixed:"right",align:"center",render:e=>null}]:c.value),p=vue.computed(()=>d.value.map(e=>({sortable:!1,resizable:!0,minWidth:80,align:"start",showOverflowTooltip:!0,...e,width:"number"==typeof e.width?`${e.width}px`:e.width}))),h=vue.computed(()=>p.value.filter(e=>!0!==e.hidden)),v=vue.computed(()=>p.value.filter(e=>!0===e.fixed||"left"===e.fixed||"right"===e.fixed)),m=vue.computed(()=>p.value.filter(e=>"left"===e.fixed)),f=vue.computed(()=>p.value.filter(e=>"right"===e.fixed)),g=vue.computed(()=>p.value.filter(e=>!e.fixed));return{headers:p,visibleColumns:h,fixedColumns:v,leftFixedColumns:m,rightFixedColumns:f,scrollableColumns:g,getColumnByKey:e=>p.value.find(t=>t.key===e),getColumnIndex:e=>p.value.findIndex(t=>t.key===e)}}const DigitLimit={mounted(e,t){const a=t.value;e.addEventListener("input",e=>{const t=e.target;t.value=t.value.replace(/\D/g,"").slice(0,a),t.dispatchEvent(new Event("input"))})}};class GreetingUtils{static getGreeting(e){const t=(e?new Date(e):new Date).getHours();return t>=5&&t<12?"صبح بخیر":t>=12&&t<17?"ظهر بخیر":t>=17&&t<20?"عصر بخیر":"شب بخیر"}static getGreetingWithName(e,t){return`${this.getGreeting(e)} ${t||"کاربر"}`}static getGreetingWithTime(e){const t=e?new Date(e):new Date,a=t.getHours(),r=t.getMinutes();return`${this.getGreeting(e)} - ساعت ${`${a.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}`}static getTimePeriod(e){const t=(e?new Date(e):new Date).getHours();return t>=5&&t<12?"صبح":t>=12&&t<17?"ظهر":t>=17&&t<20?"عصر":"شب"}static getFullGreeting(e,t){const a=e?new Date(e):new Date;return`${this.getGreeting(e)} ${t||"کاربر"} - ${a.toLocaleDateString("fa-IR",{weekday:"long",year:"numeric",month:"long",day:"numeric"})} - ساعت ${a.toLocaleTimeString("fa-IR",{hour:"2-digit",minute:"2-digit"})}`}}class NationalCodeValidator{static isValid(e,t){if("Real"===t&&!/^\d{10}$/.test(e))return!1;if("Legal"===t&&!/^\d{11}$/.test(e))return!1;if("Legal"===t){return!["00000000000","11111111111","22222222222","33333333333","44444444444","55555555555","66666666666","77777777777","88888888888","99999999999"].includes(e)}if(["0000000000","1111111111","2222222222","3333333333","4444444444","5555555555","6666666666","7777777777","8888888888","9999999999"].includes(e))return!1;const a=e.split("").map(Number),r=a[9],o=a.slice(0,9).reduce((e,t,a)=>e+t*(10-a),0)%11;return o<2&&r===o||o>=2&&r===11-o}}let authConfig=null;function configureAuth(e){authConfig=e}const fetchWrapper={get:request("GET"),post:request("POST"),put:request("PUT"),delete:request("DELETE")};function request(e){return(t,a)=>{const r={method:e,headers:authHeader(t)};return a&&(r.headers["Content-Type"]="application/json",r.body=JSON.stringify(a)),fetch(t,r).then(handleResponse)}}function authHeader(e){var t,a;if(!authConfig)return{};const r=null==(t=authConfig.getToken)?void 0:t.call(authConfig),o=null==(a=authConfig.getApiBaseUrl)?void 0:a.call(authConfig),n=!!r,i=!!o&&e.startsWith(o);return n&&i?{Authorization:`Bearer ${r}`}:{}}function handleResponse(e){return e.text().then(t=>{var a;const r=t&&JSON.parse(t);if(!e.ok){[401,403].includes(e.status)&&(null==(a=null==authConfig?void 0:authConfig.onUnauthorized)||a.call(authConfig));const t=r&&r.message||e.statusText;return Promise.reject(t)}return r})}function nationalCodeRule(e,t){return!NationalCodeValidator.isValid(e,t)&&"کد ملی نامعتبر است"}const BooleanEnum={TRUE:!0,FALSE:!1},BooleanEnumOptions=[{title:"✅",value:BooleanEnum.TRUE},{title:"❌",value:BooleanEnum.FALSE}];function install(e){e.directive("digit-limit",DigitLimit)}const index={install:install};exports.AppHeader=AppHeader,exports.AppLayout=AppLayout,exports.AppSidebar=AppSidebar,exports.AppStepper=AppStepper,exports.BaseBreadcrumb=_sfc_main$i,exports.BaseIcon=_sfc_main$h,exports.BooleanEnum=BooleanEnum,exports.BooleanEnumOptions=BooleanEnumOptions,exports.ConfirmDialog=_sfc_main$g,exports.CustomAutocomplete=CustomAutocomplete,exports.CustomDataTable=_sfc_main$c,exports.DateConverter=DateConverter,exports.DescriptionInput=DescriptionInput,exports.DigitLimit=DigitLimit,exports.DownloadButton=DownloadButton,exports.GreetingUtils=GreetingUtils,exports.Loading=Loading,exports.MoneyInput=_sfc_main$e,exports.NationalCodeValidator=NationalCodeValidator,exports.PdfViewer=PdfViewer,exports.ShamsiDatePicker=ShamsiDatePicker,exports.UiChildCard=_sfc_main$8,exports.UiParentCard=_sfc_main$7,exports.VPriceTextField=_sfc_main$6,exports.configureAuth=configureAuth,exports.configureAxiosInstance=configureAxiosInstance,exports.default=index,exports.fetchWrapper=fetchWrapper,exports.formatNumberWithCommas=formatNumberWithCommas,exports.formatPrice=formatPrice,exports.getAxiosInstance=getAxiosInstance,exports.install=install,exports.nationalCodeRule=nationalCodeRule,exports.useCustomizerStore=useCustomizerStore,exports.useDataTable=useDataTable,exports.useTableActions=useTableActions,exports.useTableHeaders=useTableHeaders,exports.useTableSelection=useTableSelection;
8
8
  //# sourceMappingURL=ui-kit.cjs.js.map