!(function () {
	const e = 'ir',
		t = 'light',
		i = 'vertical',
		a = 'full',
		l = 'rtl',
		s = '',
		o = 'navbar-sticky',
		n = !1;
	window.addEventListener('load', function () {
		const e = document.getElementsByClassName('screen_loader');
		e?.length &&
			(e[0].classList.add('animate__fadeOut'),
			setTimeout(() => {
				document.body.removeChild(e[0]);
			}, 200)),
			Alpine.store('app').setRTLLayout();
	});
	const r = document.querySelector('#footer-year');
	r && (r.innerHTML = new Date().getFullYear());
	(() => {
		const e = document.querySelectorAll('.perfect-scrollbar');
		for (let t = 0; t < e.length; t++) new PerfectScrollbar(e[t], {wheelPropagation: !0});
	})(),
		document.addEventListener('alpine:init', () => {
			Alpine.data('collapse', () => ({
				collapse: !1,
				collapseSidebar() {
					this.collapse = !this.collapse;
				},
			})),
				Alpine.data('dropdown', (e = !1) => ({
					open: e,
					toggle() {
						this.open = !this.open;
					},
				})),
				Alpine.data('modal', (e = !1) => ({
					open: e,
					toggle() {
						this.open = !this.open;
					},
				})),
				Alpine.magic('tooltip', (e) => (t, i) => {
					tippy(e, {content: t, trigger: 'manual', placement: i || void 0, allowHTML: !0}).show();
				}),
				Alpine.directive('dynamictooltip', (e, {expression: t}, {evaluate: i}) => {
					let a = i(t);
					tippy(e, {content: a.charAt(0).toUpperCase() + a.slice(1)});
				}),
				Alpine.directive('tooltip', (e, {expression: t}) => {
					tippy(e, {content: t, placement: e.getAttribute('data-placement') || void 0, allowHTML: !0, delay: e.getAttribute('data-delay') || 0, animation: e.getAttribute('data-animation') || 'fade', theme: e.getAttribute('data-theme') || ''});
				}),
				Alpine.magic('popovers', (e) => (t, i) => {
					tippy(e, {content: t, placement: i || void 0, interactive: !0, allowHTML: !0, delay: e.getAttribute('data-delay') || 0, animation: e.getAttribute('data-animation') || 'fade', theme: e.getAttribute('data-theme') || '', trigger: e.getAttribute('data-trigger') || 'click'}).show();
				}),
				Alpine.data('main', (e) => ({})),
				Alpine.store('app', {
					theme: Alpine.$persist(t),
					isDarkMode: Alpine.$persist(!1),
					toggleTheme(e) {
						e || (e = this.theme || t), (this.theme = e), 'light' == this.theme ? (this.isDarkMode = !1) : 'dark' == this.theme ? (this.isDarkMode = !0) : 'system' == this.theme && (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? (this.isDarkMode = !0) : (this.isDarkMode = !1));
					},
					menu: Alpine.$persist(i),
					toggleMenu(e) {
						e || (e = this.menu || i), (this.sidebar = !1), (this.menu = e);
					},
					layout: Alpine.$persist(a),
					toggleLayout(e) {
						e || (e = this.layout || a), (this.layout = e);
					},
					rtlClass: Alpine.$persist(l),
					toggleRTL(e) {
						e || (e = this.rtlClass || l), (this.rtlClass = e), this.setRTLLayout();
					},
					setRTLLayout() {
						document.querySelector('html').setAttribute('dir', this.rtlClass || l);
					},
					animation: Alpine.$persist(s),
					toggleAnimation(e) {
						e || (e = this.animation || s), (e = e?.trim()), (this.animation = e);
					},
					navbar: Alpine.$persist(o),
					toggleNavbar(e) {
						e || (e = this.navbar || o), (this.navbar = e);
					},
					semidark: Alpine.$persist(n),
					toggleSemidark(e) {
						e || (e = this.semidark || n), (this.semidark = e);
					},
					locale: Alpine.$persist(e),
					toggleLocale(t) {
						t || (t = this.locale || e), (this.locale = t), 'ae' === this.locale?.toLowerCase() || 'ir' === this.locale?.toLowerCase() ? this.toggleRTL('rtl') : this.toggleRTL('ltr');
					},
					sidebar: !1,
					toggleSidebar() {
						this.sidebar = !this.sidebar;
					},
				});
		});
})();
jalaliDatepicker.startWatch({
	zIndex: 9999999999,
});