@amirjalili1374/ui-kit 1.2.2 → 1.3.0
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.
- package/README.md +134 -1
- package/dist/components/layout/AppHeader.vue.d.ts +71 -0
- package/dist/components/layout/AppHeader.vue.d.ts.map +1 -0
- package/dist/components/layout/AppSidebar.vue.d.ts +41 -0
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -0
- package/dist/components/shared/CustomDataTable.vue.d.ts.map +1 -1
- package/dist/composables/useDataTable.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/services/apiService.d.ts +1 -1
- package/dist/services/apiService.d.ts.map +1 -1
- package/dist/services/axiosInstance.d.ts +13 -6
- package/dist/services/axiosInstance.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/componentTypes/DataTableTypes.d.ts +2 -0
- package/dist/types/componentTypes/DataTableTypes.d.ts.map +1 -1
- package/dist/ui-kit.cjs.js +7 -1
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +2898 -175
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +1 -1
package/dist/ui-kit.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { capitalize, reactive, watchEffect, toRef, shallowRef, Fragment, camelize, isVNode, Comment, unref, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject, defineComponent as defineComponent$1, h, createElementVNode, normalizeStyle, normalizeClass, toValue, resolveDynamicComponent, nextTick, onScopeDispose, createVNode, mergeProps, toRefs, Text, isRef, TransitionGroup, Transition, watch, onBeforeMount, onBeforeUnmount, withDirectives, vShow, toDisplayString, effectScope, toRaw, readonly, createBlock, openBlock, withCtx, createCommentVNode, useId, onMounted, onUpdated, Teleport, createTextVNode, createElementBlock, renderSlot, onDeactivated, cloneVNode, renderList, createSlots, normalizeProps, guardReactiveProps, resolveComponent, onBeforeUpdate, withModifiers, withKeys, vModelText, onUnmounted } from "vue";
|
|
1
|
+
import { capitalize, reactive, watchEffect, toRef, shallowRef, Fragment, camelize, isVNode, Comment, unref, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject, defineComponent as defineComponent$1, h, createElementVNode, normalizeStyle, normalizeClass, toValue, resolveDynamicComponent, nextTick, onScopeDispose, createVNode, mergeProps, toRefs, Text, isRef, TransitionGroup, Transition, watch, onBeforeMount, onBeforeUnmount, withDirectives, vShow, toDisplayString, effectScope, toRaw, readonly, createBlock, openBlock, withCtx, createCommentVNode, useId, onMounted, onUpdated, Teleport, createTextVNode, createElementBlock, renderSlot, onDeactivated, cloneVNode, renderList, createSlots, normalizeProps, guardReactiveProps, resolveComponent, onActivated, onBeforeUpdate, withModifiers, withKeys, vModelText, onUnmounted } from "vue";
|
|
2
2
|
import { IconHome, IconArrowBadgeLeft, IconChevronDown, IconChevronRight, IconMinus, IconPlus, IconRefresh, IconChevronLeft, IconDownload, IconPrinter, IconMaximize, IconMinimize, IconX, IconFileText, IconCheck, IconPencil, IconClock } from "@tabler/icons-vue";
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
import jalaali from "jalaali-js";
|
|
5
5
|
import { useDebounceFn } from "@vueuse/core";
|
|
6
|
-
import { useRouter as useRouter$1 } from "vue-router";
|
|
6
|
+
import { useRouter as useRouter$1, useRoute as useRoute$1 } from "vue-router";
|
|
7
7
|
import { defineStore } from "pinia";
|
|
8
8
|
function propsFactory(props, source) {
|
|
9
9
|
return (defaults) => {
|
|
@@ -656,13 +656,13 @@ function animate(el, keyframes, options) {
|
|
|
656
656
|
}
|
|
657
657
|
return animation;
|
|
658
658
|
}
|
|
659
|
-
const handlers = /* @__PURE__ */ new WeakMap();
|
|
659
|
+
const handlers$1 = /* @__PURE__ */ new WeakMap();
|
|
660
660
|
function bindProps(el, props) {
|
|
661
661
|
Object.keys(props).forEach((k) => {
|
|
662
662
|
var _a;
|
|
663
663
|
if (isOn(k)) {
|
|
664
664
|
const name2 = eventName(k);
|
|
665
|
-
const handler = handlers.get(el);
|
|
665
|
+
const handler = handlers$1.get(el);
|
|
666
666
|
if (props[k] == null) {
|
|
667
667
|
handler == null ? void 0 : handler.forEach((v) => {
|
|
668
668
|
const [n, fn] = v;
|
|
@@ -675,7 +675,7 @@ function bindProps(el, props) {
|
|
|
675
675
|
el.addEventListener(name2, props[k]);
|
|
676
676
|
const _handler = handler || /* @__PURE__ */ new Set();
|
|
677
677
|
_handler.add([name2, props[k]]);
|
|
678
|
-
if (!handlers.has(el)) handlers.set(el, _handler);
|
|
678
|
+
if (!handlers$1.has(el)) handlers$1.set(el, _handler);
|
|
679
679
|
}
|
|
680
680
|
} else {
|
|
681
681
|
if (props[k] == null) {
|
|
@@ -690,7 +690,7 @@ function unbindProps(el, props) {
|
|
|
690
690
|
Object.keys(props).forEach((k) => {
|
|
691
691
|
if (isOn(k)) {
|
|
692
692
|
const name2 = eventName(k);
|
|
693
|
-
const handler = handlers.get(el);
|
|
693
|
+
const handler = handlers$1.get(el);
|
|
694
694
|
handler == null ? void 0 : handler.forEach((v) => {
|
|
695
695
|
const [n, fn] = v;
|
|
696
696
|
if (n === name2) {
|
|
@@ -1700,12 +1700,12 @@ const VIcon = genericComponent()({
|
|
|
1700
1700
|
return {};
|
|
1701
1701
|
}
|
|
1702
1702
|
});
|
|
1703
|
-
const allowedDensities = [null, "default", "comfortable", "compact"];
|
|
1703
|
+
const allowedDensities$1 = [null, "default", "comfortable", "compact"];
|
|
1704
1704
|
const makeDensityProps = propsFactory({
|
|
1705
1705
|
density: {
|
|
1706
1706
|
type: String,
|
|
1707
1707
|
default: "default",
|
|
1708
|
-
validator: (v) => allowedDensities.includes(v)
|
|
1708
|
+
validator: (v) => allowedDensities$1.includes(v)
|
|
1709
1709
|
}
|
|
1710
1710
|
}, "density");
|
|
1711
1711
|
function useDensity(props) {
|
|
@@ -3886,10 +3886,10 @@ const VRow = genericComponent()({
|
|
|
3886
3886
|
}
|
|
3887
3887
|
});
|
|
3888
3888
|
const VSpacer = createSimpleFunctional("v-spacer", "div", "VSpacer");
|
|
3889
|
-
const _hoisted_1$
|
|
3890
|
-
const _hoisted_2$
|
|
3891
|
-
const _hoisted_3$
|
|
3892
|
-
const _sfc_main$
|
|
3889
|
+
const _hoisted_1$c = { class: "text-h3" };
|
|
3890
|
+
const _hoisted_2$7 = { class: "d-flex align-center gap-2" };
|
|
3891
|
+
const _hoisted_3$7 = { class: "d-flex align-center gap-2" };
|
|
3892
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
|
|
3893
3893
|
__name: "BaseBreadcrumb",
|
|
3894
3894
|
props: {
|
|
3895
3895
|
title: String,
|
|
@@ -3918,7 +3918,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
3918
3918
|
default: withCtx(() => [
|
|
3919
3919
|
createVNode(VCol, { md: "5" }, {
|
|
3920
3920
|
default: withCtx(() => [
|
|
3921
|
-
createElementVNode("h3", _hoisted_1$
|
|
3921
|
+
createElementVNode("h3", _hoisted_1$c, toDisplayString(props.title), 1)
|
|
3922
3922
|
]),
|
|
3923
3923
|
_: 1
|
|
3924
3924
|
}),
|
|
@@ -3933,7 +3933,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
3933
3933
|
class: "text-h5 justify-md-end pa-1"
|
|
3934
3934
|
}, {
|
|
3935
3935
|
divider: withCtx(() => [
|
|
3936
|
-
createElementVNode("div", _hoisted_2$
|
|
3936
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
3937
3937
|
createVNode(unref(IconArrowBadgeLeft), { stroke: "{2}" })
|
|
3938
3938
|
])
|
|
3939
3939
|
]),
|
|
@@ -3942,7 +3942,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
3942
3942
|
size: "16",
|
|
3943
3943
|
class: "text-secondary ml-2"
|
|
3944
3944
|
}),
|
|
3945
|
-
createElementVNode("div", _hoisted_3$
|
|
3945
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
3946
3946
|
createVNode(unref(IconArrowBadgeLeft), { stroke: "{2}" })
|
|
3947
3947
|
])
|
|
3948
3948
|
]),
|
|
@@ -3966,7 +3966,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
3966
3966
|
};
|
|
3967
3967
|
}
|
|
3968
3968
|
});
|
|
3969
|
-
const _sfc_main$
|
|
3969
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
3970
3970
|
__name: "BaseIcon",
|
|
3971
3971
|
props: {
|
|
3972
3972
|
icon: {
|
|
@@ -5496,10 +5496,10 @@ function useScrollStrategies(props, data2) {
|
|
|
5496
5496
|
});
|
|
5497
5497
|
}
|
|
5498
5498
|
function closeScrollStrategy(data2) {
|
|
5499
|
-
function
|
|
5499
|
+
function onScroll2(e) {
|
|
5500
5500
|
data2.isActive.value = false;
|
|
5501
5501
|
}
|
|
5502
|
-
bindScroll(getTargetEl(data2.target.value, data2.contentEl.value),
|
|
5502
|
+
bindScroll(getTargetEl(data2.target.value, data2.contentEl.value), onScroll2);
|
|
5503
5503
|
}
|
|
5504
5504
|
function blockScrollStrategy(data2, props) {
|
|
5505
5505
|
var _a;
|
|
@@ -5542,7 +5542,7 @@ function repositionScrollStrategy(data2, props, scope) {
|
|
|
5542
5542
|
let slow = false;
|
|
5543
5543
|
let raf2 = -1;
|
|
5544
5544
|
let ric = -1;
|
|
5545
|
-
function
|
|
5545
|
+
function update2(e) {
|
|
5546
5546
|
requestNewFrame(() => {
|
|
5547
5547
|
var _a, _b;
|
|
5548
5548
|
const start = performance.now();
|
|
@@ -5558,11 +5558,11 @@ function repositionScrollStrategy(data2, props, scope) {
|
|
|
5558
5558
|
cancelAnimationFrame(raf2);
|
|
5559
5559
|
raf2 = requestAnimationFrame(() => {
|
|
5560
5560
|
raf2 = requestAnimationFrame(() => {
|
|
5561
|
-
|
|
5561
|
+
update2(e);
|
|
5562
5562
|
});
|
|
5563
5563
|
});
|
|
5564
5564
|
} else {
|
|
5565
|
-
|
|
5565
|
+
update2(e);
|
|
5566
5566
|
}
|
|
5567
5567
|
});
|
|
5568
5568
|
});
|
|
@@ -5575,16 +5575,16 @@ function repositionScrollStrategy(data2, props, scope) {
|
|
|
5575
5575
|
function getTargetEl(target, contentEl) {
|
|
5576
5576
|
return Array.isArray(target) ? document.elementsFromPoint(...target).find((el) => !(contentEl == null ? void 0 : contentEl.contains(el))) : target ?? contentEl;
|
|
5577
5577
|
}
|
|
5578
|
-
function bindScroll(el,
|
|
5578
|
+
function bindScroll(el, onScroll2) {
|
|
5579
5579
|
const scrollElements = [document, ...getScrollParents(el)];
|
|
5580
5580
|
scrollElements.forEach((el2) => {
|
|
5581
|
-
el2.addEventListener("scroll",
|
|
5581
|
+
el2.addEventListener("scroll", onScroll2, {
|
|
5582
5582
|
passive: true
|
|
5583
5583
|
});
|
|
5584
5584
|
});
|
|
5585
5585
|
onScopeDispose(() => {
|
|
5586
5586
|
scrollElements.forEach((el2) => {
|
|
5587
|
-
el2.removeEventListener("scroll",
|
|
5587
|
+
el2.removeEventListener("scroll", onScroll2);
|
|
5588
5588
|
});
|
|
5589
5589
|
});
|
|
5590
5590
|
}
|
|
@@ -6581,11 +6581,11 @@ const VDialog = genericComponent()({
|
|
|
6581
6581
|
return forwardRefs({}, overlay);
|
|
6582
6582
|
}
|
|
6583
6583
|
});
|
|
6584
|
-
const _hoisted_1$
|
|
6584
|
+
const _hoisted_1$b = {
|
|
6585
6585
|
key: 0,
|
|
6586
6586
|
class: "mb-2"
|
|
6587
6587
|
};
|
|
6588
|
-
const _sfc_main$
|
|
6588
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
6589
6589
|
__name: "ConfirmDialog",
|
|
6590
6590
|
props: {
|
|
6591
6591
|
modelValue: { type: Boolean },
|
|
@@ -6631,7 +6631,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent$1({
|
|
|
6631
6631
|
}),
|
|
6632
6632
|
createVNode(VCardText, null, {
|
|
6633
6633
|
default: withCtx(() => [
|
|
6634
|
-
__props.message ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6634
|
+
__props.message ? (openBlock(), createElementBlock("div", _hoisted_1$b, toDisplayString(__props.message), 1)) : createCommentVNode("", true),
|
|
6635
6635
|
renderSlot(_ctx.$slots, "default")
|
|
6636
6636
|
]),
|
|
6637
6637
|
_: 3
|
|
@@ -7223,13 +7223,13 @@ function useValidation(props) {
|
|
|
7223
7223
|
let value2 = (props.validateOn ?? ((_a = form.validateOn) == null ? void 0 : _a.value)) || "input";
|
|
7224
7224
|
if (value2 === "lazy") value2 = "input lazy";
|
|
7225
7225
|
if (value2 === "eager") value2 = "input eager";
|
|
7226
|
-
const
|
|
7226
|
+
const set2 = new Set((value2 == null ? void 0 : value2.split(" ")) ?? []);
|
|
7227
7227
|
return {
|
|
7228
|
-
input:
|
|
7229
|
-
blur:
|
|
7230
|
-
invalidInput:
|
|
7231
|
-
lazy:
|
|
7232
|
-
eager:
|
|
7228
|
+
input: set2.has("input"),
|
|
7229
|
+
blur: set2.has("blur") || set2.has("input") || set2.has("invalid-input"),
|
|
7230
|
+
invalidInput: set2.has("invalid-input"),
|
|
7231
|
+
lazy: set2.has("lazy"),
|
|
7232
|
+
eager: set2.has("eager")
|
|
7233
7233
|
};
|
|
7234
7234
|
});
|
|
7235
7235
|
const isValid = computed(() => {
|
|
@@ -7874,7 +7874,7 @@ const VSlideGroup = genericComponent()({
|
|
|
7874
7874
|
goTo(newPosition, goToOptions.value);
|
|
7875
7875
|
}
|
|
7876
7876
|
}
|
|
7877
|
-
function
|
|
7877
|
+
function onScroll2(e) {
|
|
7878
7878
|
const {
|
|
7879
7879
|
scrollTop,
|
|
7880
7880
|
scrollLeft
|
|
@@ -8034,7 +8034,7 @@ const VSlideGroup = genericComponent()({
|
|
|
8034
8034
|
"key": "container",
|
|
8035
8035
|
"ref": containerRef,
|
|
8036
8036
|
"class": normalizeClass(["v-slide-group__container", props.contentClass]),
|
|
8037
|
-
"onScroll":
|
|
8037
|
+
"onScroll": onScroll2
|
|
8038
8038
|
}, [createElementVNode("div", {
|
|
8039
8039
|
"ref": contentRef,
|
|
8040
8040
|
"class": "v-slide-group__content",
|
|
@@ -8512,19 +8512,19 @@ const independentActiveStrategy = (mandatory) => {
|
|
|
8512
8512
|
return activated;
|
|
8513
8513
|
},
|
|
8514
8514
|
in: (v, children, parents) => {
|
|
8515
|
-
let
|
|
8515
|
+
let set2 = /* @__PURE__ */ new Set();
|
|
8516
8516
|
if (v != null) {
|
|
8517
8517
|
for (const id of wrapInArray(v)) {
|
|
8518
|
-
|
|
8518
|
+
set2 = strategy.activate({
|
|
8519
8519
|
id,
|
|
8520
8520
|
value: true,
|
|
8521
|
-
activated: new Set(
|
|
8521
|
+
activated: new Set(set2),
|
|
8522
8522
|
children,
|
|
8523
8523
|
parents
|
|
8524
8524
|
});
|
|
8525
8525
|
}
|
|
8526
8526
|
}
|
|
8527
|
-
return
|
|
8527
|
+
return set2;
|
|
8528
8528
|
},
|
|
8529
8529
|
out: (v) => {
|
|
8530
8530
|
return Array.from(v);
|
|
@@ -8550,14 +8550,14 @@ const independentSingleActiveStrategy = (mandatory) => {
|
|
|
8550
8550
|
});
|
|
8551
8551
|
},
|
|
8552
8552
|
in: (v, children, parents) => {
|
|
8553
|
-
let
|
|
8553
|
+
let set2 = /* @__PURE__ */ new Set();
|
|
8554
8554
|
if (v != null) {
|
|
8555
8555
|
const arr = wrapInArray(v);
|
|
8556
8556
|
if (arr.length) {
|
|
8557
|
-
|
|
8557
|
+
set2 = parentStrategy.in(arr.slice(0, 1), children, parents);
|
|
8558
8558
|
}
|
|
8559
8559
|
}
|
|
8560
|
-
return
|
|
8560
|
+
return set2;
|
|
8561
8561
|
},
|
|
8562
8562
|
out: (v, children, parents) => {
|
|
8563
8563
|
return parentStrategy.out(v, children, parents);
|
|
@@ -11583,11 +11583,11 @@ const VSelect = genericComponent()({
|
|
|
11583
11583
|
}
|
|
11584
11584
|
}
|
|
11585
11585
|
function select(item) {
|
|
11586
|
-
let
|
|
11586
|
+
let set2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
11587
11587
|
if (item.props.disabled) return;
|
|
11588
11588
|
if (props.multiple) {
|
|
11589
11589
|
const index2 = model.value.findIndex((selection) => (props.valueComparator || deepEqual)(selection.value, item.value));
|
|
11590
|
-
const add2 =
|
|
11590
|
+
const add2 = set2 == null ? !~index2 : set2;
|
|
11591
11591
|
if (~index2) {
|
|
11592
11592
|
const value2 = add2 ? [...model.value, item] : [...model.value];
|
|
11593
11593
|
value2.splice(index2, 1);
|
|
@@ -11596,7 +11596,7 @@ const VSelect = genericComponent()({
|
|
|
11596
11596
|
model.value = [...model.value, item];
|
|
11597
11597
|
}
|
|
11598
11598
|
} else {
|
|
11599
|
-
const add2 =
|
|
11599
|
+
const add2 = set2 !== false;
|
|
11600
11600
|
model.value = add2 ? [item] : [];
|
|
11601
11601
|
nextTick(() => {
|
|
11602
11602
|
menu.value = false;
|
|
@@ -11977,11 +11977,11 @@ function useFilter(props, items, query, options) {
|
|
|
11977
11977
|
results.forEach((_ref) => {
|
|
11978
11978
|
let {
|
|
11979
11979
|
index: index2,
|
|
11980
|
-
matches
|
|
11980
|
+
matches: matches2
|
|
11981
11981
|
} = _ref;
|
|
11982
11982
|
const item = originalItems[index2];
|
|
11983
11983
|
_filteredItems.push(item);
|
|
11984
|
-
_filteredMatches.set(item.value,
|
|
11984
|
+
_filteredMatches.set(item.value, matches2);
|
|
11985
11985
|
});
|
|
11986
11986
|
filteredItems.value = _filteredItems;
|
|
11987
11987
|
filteredMatches.value = _filteredMatches;
|
|
@@ -11995,16 +11995,16 @@ function useFilter(props, items, query, options) {
|
|
|
11995
11995
|
getMatches
|
|
11996
11996
|
};
|
|
11997
11997
|
}
|
|
11998
|
-
function highlightResult(name2, text2,
|
|
11999
|
-
if (
|
|
12000
|
-
return
|
|
12001
|
-
const start = i === 0 ? 0 :
|
|
11998
|
+
function highlightResult(name2, text2, matches2) {
|
|
11999
|
+
if (matches2 == null || !matches2.length) return text2;
|
|
12000
|
+
return matches2.map((match, i) => {
|
|
12001
|
+
const start = i === 0 ? 0 : matches2[i - 1][1];
|
|
12002
12002
|
const result = [createElementVNode("span", {
|
|
12003
12003
|
"class": normalizeClass(`${name2}__unmask`)
|
|
12004
12004
|
}, [text2.slice(start, match[0])]), createElementVNode("span", {
|
|
12005
12005
|
"class": normalizeClass(`${name2}__mask`)
|
|
12006
12006
|
}, [text2.slice(match[0], match[1])])];
|
|
12007
|
-
if (i ===
|
|
12007
|
+
if (i === matches2.length - 1) {
|
|
12008
12008
|
result.push(createElementVNode("span", {
|
|
12009
12009
|
"class": normalizeClass(`${name2}__unmask`)
|
|
12010
12010
|
}, [text2.slice(match[1])]));
|
|
@@ -12231,11 +12231,11 @@ const VAutocomplete = genericComponent()({
|
|
|
12231
12231
|
}
|
|
12232
12232
|
const isSelecting = shallowRef(false);
|
|
12233
12233
|
function select(item) {
|
|
12234
|
-
let
|
|
12234
|
+
let set2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
12235
12235
|
if (!item || item.props.disabled) return;
|
|
12236
12236
|
if (props.multiple) {
|
|
12237
12237
|
const index2 = model.value.findIndex((selection) => (props.valueComparator || deepEqual)(selection.value, item.value));
|
|
12238
|
-
const add2 =
|
|
12238
|
+
const add2 = set2 == null ? !~index2 : set2;
|
|
12239
12239
|
if (~index2) {
|
|
12240
12240
|
const value2 = add2 ? [...model.value, item] : [...model.value];
|
|
12241
12241
|
value2.splice(index2, 1);
|
|
@@ -12247,7 +12247,7 @@ const VAutocomplete = genericComponent()({
|
|
|
12247
12247
|
search.value = "";
|
|
12248
12248
|
}
|
|
12249
12249
|
} else {
|
|
12250
|
-
const add2 =
|
|
12250
|
+
const add2 = set2 !== false;
|
|
12251
12251
|
model.value = add2 ? [item] : [];
|
|
12252
12252
|
search.value = add2 && !hasSelectionSlot.value ? item.title : "";
|
|
12253
12253
|
nextTick(() => {
|
|
@@ -12592,17 +12592,17 @@ const VTooltip = genericComponent()({
|
|
|
12592
12592
|
return forwardRefs({}, overlay);
|
|
12593
12593
|
}
|
|
12594
12594
|
});
|
|
12595
|
-
const _hoisted_1$
|
|
12596
|
-
const _hoisted_2$
|
|
12597
|
-
const _hoisted_3$
|
|
12598
|
-
const _hoisted_4$
|
|
12599
|
-
const _hoisted_5$
|
|
12595
|
+
const _hoisted_1$a = { class: "ca-item-title" };
|
|
12596
|
+
const _hoisted_2$6 = { class: "ca-item-subtitle" };
|
|
12597
|
+
const _hoisted_3$6 = { class: "ca-group-tooltip" };
|
|
12598
|
+
const _hoisted_4$4 = { class: "ca-group-tooltip-header" };
|
|
12599
|
+
const _hoisted_5$3 = { class: "ca-group-count" };
|
|
12600
12600
|
const _hoisted_6$2 = { class: "ca-group-members" };
|
|
12601
12601
|
const _hoisted_7$2 = { class: "ca-item-title" };
|
|
12602
12602
|
const _hoisted_8$2 = { class: "ca-item-subtitle" };
|
|
12603
12603
|
const _hoisted_9$2 = { class: "ca-chip-title" };
|
|
12604
12604
|
const _hoisted_10$2 = { class: "ca-chip-subtitle" };
|
|
12605
|
-
const _sfc_main$
|
|
12605
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent$1({
|
|
12606
12606
|
__name: "CustomAutocomplete",
|
|
12607
12607
|
props: {
|
|
12608
12608
|
fields: {},
|
|
@@ -12711,7 +12711,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent$1({
|
|
|
12711
12711
|
class: { "ca-main-group": true }
|
|
12712
12712
|
}), createSlots({
|
|
12713
12713
|
title: withCtx(() => [
|
|
12714
|
-
createElementVNode("div", _hoisted_1$
|
|
12714
|
+
createElementVNode("div", _hoisted_1$a, [
|
|
12715
12715
|
createTextVNode(toDisplayString(resolveTitle(item.raw ?? item)) + " ", 1),
|
|
12716
12716
|
createVNode(VChip, {
|
|
12717
12717
|
size: "small",
|
|
@@ -12736,7 +12736,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent$1({
|
|
|
12736
12736
|
__props.displayStyle === "detailed" && resolveSubtitle(item.raw ?? item) ? {
|
|
12737
12737
|
name: "subtitle",
|
|
12738
12738
|
fn: withCtx(() => [
|
|
12739
|
-
createElementVNode("div", _hoisted_2$
|
|
12739
|
+
createElementVNode("div", _hoisted_2$6, toDisplayString(resolveSubtitle(item.raw ?? item)), 1)
|
|
12740
12740
|
]),
|
|
12741
12741
|
key: "0"
|
|
12742
12742
|
} : void 0
|
|
@@ -12747,10 +12747,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent$1({
|
|
|
12747
12747
|
item: item.raw ?? item,
|
|
12748
12748
|
groupMembers: getGroupMembers(item.raw ?? item)
|
|
12749
12749
|
}, () => [
|
|
12750
|
-
createElementVNode("div", _hoisted_3$
|
|
12751
|
-
createElementVNode("div", _hoisted_4$
|
|
12750
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
12751
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
12752
12752
|
createElementVNode("strong", null, toDisplayString(resolveTitle(item.raw ?? item)), 1),
|
|
12753
|
-
createElementVNode("span", _hoisted_5$
|
|
12753
|
+
createElementVNode("span", _hoisted_5$3, toDisplayString(getGroupMembers(item.raw ?? item).length) + " آیتم", 1)
|
|
12754
12754
|
]),
|
|
12755
12755
|
createElementVNode("div", _hoisted_6$2, [
|
|
12756
12756
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getGroupMembers(item.raw ?? item), (member, idx) => {
|
|
@@ -12813,8 +12813,8 @@ const _export_sfc$1 = (sfc, props) => {
|
|
|
12813
12813
|
}
|
|
12814
12814
|
return target;
|
|
12815
12815
|
};
|
|
12816
|
-
const CustomAutocomplete = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
12817
|
-
const _sfc_main$
|
|
12816
|
+
const CustomAutocomplete = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-4c17f7bd"]]);
|
|
12817
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent$1({
|
|
12818
12818
|
__name: "MoneyInput",
|
|
12819
12819
|
props: {
|
|
12820
12820
|
modelValue: {
|
|
@@ -12920,8 +12920,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent$1({
|
|
|
12920
12920
|
};
|
|
12921
12921
|
}
|
|
12922
12922
|
});
|
|
12923
|
-
const _hoisted_1$
|
|
12924
|
-
const _sfc_main$
|
|
12923
|
+
const _hoisted_1$9 = { class: "shamsi-date-picker" };
|
|
12924
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent$1({
|
|
12925
12925
|
__name: "ShamsiDatePicker",
|
|
12926
12926
|
props: {
|
|
12927
12927
|
modelValue: { default: "" },
|
|
@@ -13009,7 +13009,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent$1({
|
|
|
13009
13009
|
const isRangeMode = computed(() => props.mode === "range");
|
|
13010
13010
|
return (_ctx, _cache) => {
|
|
13011
13011
|
const _component_Vue3PersianDatetimePicker = resolveComponent("Vue3PersianDatetimePicker");
|
|
13012
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13012
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
13013
13013
|
createVNode(_component_Vue3PersianDatetimePicker, {
|
|
13014
13014
|
label: __props.label,
|
|
13015
13015
|
modelValue: selectedDate.value,
|
|
@@ -13032,7 +13032,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent$1({
|
|
|
13032
13032
|
};
|
|
13033
13033
|
}
|
|
13034
13034
|
});
|
|
13035
|
-
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
13035
|
+
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-d56f50fe"]]);
|
|
13036
13036
|
function useTableSelection(items, options = {}) {
|
|
13037
13037
|
const selectedItems = ref([]);
|
|
13038
13038
|
const expandedGroups = ref(/* @__PURE__ */ new Set());
|
|
@@ -13167,7 +13167,7 @@ function useTableSelection(items, options = {}) {
|
|
|
13167
13167
|
getUniqueValue
|
|
13168
13168
|
};
|
|
13169
13169
|
}
|
|
13170
|
-
function apiService(axiosInst
|
|
13170
|
+
function apiService(axiosInst, resource) {
|
|
13171
13171
|
const baseUrl = resource.startsWith("/") ? resource : `/${resource}`;
|
|
13172
13172
|
return {
|
|
13173
13173
|
async fetch(params = {}) {
|
|
@@ -13195,6 +13195,13 @@ function apiService(axiosInst = axios, resource) {
|
|
|
13195
13195
|
}
|
|
13196
13196
|
};
|
|
13197
13197
|
}
|
|
13198
|
+
let configuredInstance = null;
|
|
13199
|
+
function configureAxiosInstance(instance) {
|
|
13200
|
+
configuredInstance = instance;
|
|
13201
|
+
}
|
|
13202
|
+
function getAxiosInstance() {
|
|
13203
|
+
return configuredInstance || axios;
|
|
13204
|
+
}
|
|
13198
13205
|
class DateConverter {
|
|
13199
13206
|
// Convert Gregorian to Shamsi
|
|
13200
13207
|
static toShamsi(dateStr) {
|
|
@@ -13449,6 +13456,17 @@ const VAlert = genericComponent()({
|
|
|
13449
13456
|
}
|
|
13450
13457
|
});
|
|
13451
13458
|
const VuetifyLayoutKey = Symbol.for("vuetify:layout");
|
|
13459
|
+
const VuetifyLayoutItemKey = Symbol.for("vuetify:layout-item");
|
|
13460
|
+
const makeLayoutItemProps = propsFactory({
|
|
13461
|
+
name: {
|
|
13462
|
+
type: String
|
|
13463
|
+
},
|
|
13464
|
+
order: {
|
|
13465
|
+
type: [Number, String],
|
|
13466
|
+
default: 0
|
|
13467
|
+
},
|
|
13468
|
+
absolute: Boolean
|
|
13469
|
+
}, "layout-item");
|
|
13452
13470
|
function useLayout() {
|
|
13453
13471
|
const layout = inject(VuetifyLayoutKey);
|
|
13454
13472
|
if (!layout) throw new Error("[Vuetify] Could not find injected layout");
|
|
@@ -13458,6 +13476,32 @@ function useLayout() {
|
|
|
13458
13476
|
mainStyles: layout.mainStyles
|
|
13459
13477
|
};
|
|
13460
13478
|
}
|
|
13479
|
+
function useLayoutItem(options) {
|
|
13480
|
+
const layout = inject(VuetifyLayoutKey);
|
|
13481
|
+
if (!layout) throw new Error("[Vuetify] Could not find injected layout");
|
|
13482
|
+
const id = options.id ?? `layout-item-${useId()}`;
|
|
13483
|
+
const vm = getCurrentInstance("useLayoutItem");
|
|
13484
|
+
provide(VuetifyLayoutItemKey, {
|
|
13485
|
+
id
|
|
13486
|
+
});
|
|
13487
|
+
const isKeptAlive = shallowRef(false);
|
|
13488
|
+
onDeactivated(() => isKeptAlive.value = true);
|
|
13489
|
+
onActivated(() => isKeptAlive.value = false);
|
|
13490
|
+
const {
|
|
13491
|
+
layoutItemStyles,
|
|
13492
|
+
layoutItemScrimStyles
|
|
13493
|
+
} = layout.register(vm, {
|
|
13494
|
+
...options,
|
|
13495
|
+
active: computed(() => isKeptAlive.value ? false : options.active.value),
|
|
13496
|
+
id
|
|
13497
|
+
});
|
|
13498
|
+
onBeforeUnmount(() => layout.unregister(id));
|
|
13499
|
+
return {
|
|
13500
|
+
layoutItemStyles,
|
|
13501
|
+
layoutRect: layout.layoutRect,
|
|
13502
|
+
layoutItemScrimStyles
|
|
13503
|
+
};
|
|
13504
|
+
}
|
|
13461
13505
|
function useRefs() {
|
|
13462
13506
|
const refs = ref([]);
|
|
13463
13507
|
onBeforeUpdate(() => refs.value = []);
|
|
@@ -16196,17 +16240,17 @@ const VSnackbar = genericComponent()({
|
|
|
16196
16240
|
return forwardRefs({}, overlay);
|
|
16197
16241
|
}
|
|
16198
16242
|
});
|
|
16199
|
-
const _hoisted_1$
|
|
16243
|
+
const _hoisted_1$8 = {
|
|
16200
16244
|
key: 0,
|
|
16201
16245
|
class: "page-title"
|
|
16202
16246
|
};
|
|
16203
|
-
const _hoisted_2$
|
|
16204
|
-
const _hoisted_3$
|
|
16205
|
-
const _hoisted_4$
|
|
16247
|
+
const _hoisted_2$5 = { class: "title-text" };
|
|
16248
|
+
const _hoisted_3$5 = { class: "action-buttons" };
|
|
16249
|
+
const _hoisted_4$3 = {
|
|
16206
16250
|
key: 3,
|
|
16207
16251
|
class: "selection-actions"
|
|
16208
16252
|
};
|
|
16209
|
-
const _hoisted_5$
|
|
16253
|
+
const _hoisted_5$2 = {
|
|
16210
16254
|
key: 0,
|
|
16211
16255
|
class: "selected-actions"
|
|
16212
16256
|
};
|
|
@@ -16240,7 +16284,7 @@ const _hoisted_18 = {
|
|
|
16240
16284
|
};
|
|
16241
16285
|
const _hoisted_19 = { class: "d-flex justify-space-between align-center pa-4" };
|
|
16242
16286
|
const _hoisted_20 = { class: "text-subtitle-2" };
|
|
16243
|
-
const _sfc_main$
|
|
16287
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent$1({
|
|
16244
16288
|
...{ inheritAttrs: false },
|
|
16245
16289
|
__name: "CustomDataTable",
|
|
16246
16290
|
props: {
|
|
@@ -16272,7 +16316,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
16272
16316
|
defaultExpanded: { type: Boolean, default: false },
|
|
16273
16317
|
defaultSelected: {},
|
|
16274
16318
|
dateWithTimezone: { type: Boolean, default: false },
|
|
16275
|
-
bulkMode: { type: Boolean, default: false }
|
|
16319
|
+
bulkMode: { type: Boolean, default: false },
|
|
16320
|
+
axiosInstance: {}
|
|
16276
16321
|
},
|
|
16277
16322
|
emits: ["update:selectedItems", "selection-change"],
|
|
16278
16323
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -16709,7 +16754,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
16709
16754
|
);
|
|
16710
16755
|
onBeforeUnmount(() => {
|
|
16711
16756
|
});
|
|
16712
|
-
const
|
|
16757
|
+
const componentAxiosInstance = props.axiosInstance || getAxiosInstance();
|
|
16758
|
+
const api = apiService(componentAxiosInstance, props.apiResource);
|
|
16713
16759
|
const customActionDialog = ref(false);
|
|
16714
16760
|
const customActionComponent = shallowRef(null);
|
|
16715
16761
|
const customActionItem = ref(null);
|
|
@@ -16947,7 +16993,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
16947
16993
|
} catch (error2) {
|
|
16948
16994
|
console.error("Download error:", error2);
|
|
16949
16995
|
try {
|
|
16950
|
-
const axiosResponse = await
|
|
16996
|
+
const axiosResponse = await componentAxiosInstance.get(fileUrlString, {
|
|
16951
16997
|
responseType: "blob",
|
|
16952
16998
|
headers: {
|
|
16953
16999
|
Accept: "application/octet-stream,application/pdf,image/*,*/*"
|
|
@@ -16961,7 +17007,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
16961
17007
|
url: fileUrlString
|
|
16962
17008
|
});
|
|
16963
17009
|
if (contentType && contentType.includes("xml")) {
|
|
16964
|
-
const textResponse = await
|
|
17010
|
+
const textResponse = await componentAxiosInstance.get(fileUrlString, {
|
|
16965
17011
|
responseType: "text"
|
|
16966
17012
|
});
|
|
16967
17013
|
console.error("Server returned XML error:", textResponse.data);
|
|
@@ -16985,7 +17031,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
16985
17031
|
console.error("Axios download error:", axiosError);
|
|
16986
17032
|
if (axiosError.response) {
|
|
16987
17033
|
try {
|
|
16988
|
-
const errorText = await
|
|
17034
|
+
const errorText = await componentAxiosInstance.get(fileUrlString, {
|
|
16989
17035
|
responseType: "text"
|
|
16990
17036
|
});
|
|
16991
17037
|
console.error("Server error response:", errorText.data);
|
|
@@ -17076,10 +17122,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
17076
17122
|
return (_ctx, _cache) => {
|
|
17077
17123
|
var _a;
|
|
17078
17124
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
17079
|
-
props.title ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
17080
|
-
createElementVNode("h3", _hoisted_2$
|
|
17125
|
+
props.title ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
17126
|
+
createElementVNode("h3", _hoisted_2$5, toDisplayString(props.title), 1)
|
|
17081
17127
|
])) : createCommentVNode("", true),
|
|
17082
|
-
createElementVNode("div", _hoisted_3$
|
|
17128
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
17083
17129
|
((_a = props.actions) == null ? void 0 : _a.includes("create")) ? (openBlock(), createBlock(VBtn, {
|
|
17084
17130
|
key: 0,
|
|
17085
17131
|
color: "green",
|
|
@@ -17112,7 +17158,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
17112
17158
|
])]),
|
|
17113
17159
|
_: 1
|
|
17114
17160
|
}, 8, ["onClick", "loading"])) : createCommentVNode("", true),
|
|
17115
|
-
props.selectable && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
17161
|
+
props.selectable && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
17116
17162
|
createVNode(VChip, {
|
|
17117
17163
|
color: "primary",
|
|
17118
17164
|
class: "me-2"
|
|
@@ -17139,7 +17185,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
17139
17185
|
appear: ""
|
|
17140
17186
|
}, {
|
|
17141
17187
|
default: withCtx(() => [
|
|
17142
|
-
props.bulkMode && hasValidSelection.value || props.enableGroupDelete && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
17188
|
+
props.bulkMode && hasValidSelection.value || props.enableGroupDelete && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
17143
17189
|
props.enableGroupDelete ? (openBlock(), createBlock(VBtn, {
|
|
17144
17190
|
key: 0,
|
|
17145
17191
|
color: "red",
|
|
@@ -17820,7 +17866,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
|
17820
17866
|
disabled: isHeaderDisabled(header),
|
|
17821
17867
|
clearable: "",
|
|
17822
17868
|
variant: "outlined"
|
|
17823
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$
|
|
17869
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$d, {
|
|
17824
17870
|
key: 2,
|
|
17825
17871
|
modelValue: formModel.value[resolveHeaderKey(header)],
|
|
17826
17872
|
"onUpdate:modelValue": ($event) => formModel.value[resolveHeaderKey(header)] = $event,
|
|
@@ -18362,8 +18408,8 @@ const VTextarea = genericComponent()({
|
|
|
18362
18408
|
return forwardRefs({}, vInputRef, vFieldRef, textareaRef);
|
|
18363
18409
|
}
|
|
18364
18410
|
});
|
|
18365
|
-
const _hoisted_1$
|
|
18366
|
-
const _sfc_main$
|
|
18411
|
+
const _hoisted_1$7 = { class: "description-input" };
|
|
18412
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent$1({
|
|
18367
18413
|
__name: "DescriptionInput",
|
|
18368
18414
|
props: {
|
|
18369
18415
|
modelValue: { default: "" },
|
|
@@ -18462,7 +18508,7 @@ ${newLineNumber} - `;
|
|
|
18462
18508
|
emit("change", internalValue.value);
|
|
18463
18509
|
};
|
|
18464
18510
|
return (_ctx, _cache) => {
|
|
18465
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
18511
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
18466
18512
|
createVNode(VTextarea, {
|
|
18467
18513
|
modelValue: internalValue.value,
|
|
18468
18514
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event),
|
|
@@ -18485,7 +18531,7 @@ ${newLineNumber} - `;
|
|
|
18485
18531
|
};
|
|
18486
18532
|
}
|
|
18487
18533
|
});
|
|
18488
|
-
const DescriptionInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
18534
|
+
const DescriptionInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__scopeId", "data-v-e8b64ecb"]]);
|
|
18489
18535
|
var mdiAlertCircle = "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
|
|
18490
18536
|
var mdiArrowRight = "M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";
|
|
18491
18537
|
var mdiCheckCircle = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z";
|
|
@@ -18514,8 +18560,8 @@ const icons = {
|
|
|
18514
18560
|
arrowRight: mdiArrowRight,
|
|
18515
18561
|
cog: mdiCog
|
|
18516
18562
|
};
|
|
18517
|
-
const _hoisted_1$
|
|
18518
|
-
const _sfc_main$
|
|
18563
|
+
const _hoisted_1$6 = { class: "download-title" };
|
|
18564
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
18519
18565
|
...{
|
|
18520
18566
|
inheritAttrs: false
|
|
18521
18567
|
},
|
|
@@ -18620,7 +18666,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent$1({
|
|
|
18620
18666
|
]),
|
|
18621
18667
|
_: 1
|
|
18622
18668
|
}, 8, ["start", "end", "class"])) : createCommentVNode("", true),
|
|
18623
|
-
createElementVNode("span", _hoisted_1$
|
|
18669
|
+
createElementVNode("span", _hoisted_1$6, toDisplayString(__props.title), 1),
|
|
18624
18670
|
!__props.icon ? (openBlock(), createBlock(VIcon, {
|
|
18625
18671
|
key: 1,
|
|
18626
18672
|
start: "",
|
|
@@ -18633,18 +18679,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent$1({
|
|
|
18633
18679
|
};
|
|
18634
18680
|
}
|
|
18635
18681
|
});
|
|
18636
|
-
const DownloadButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
18637
|
-
const _hoisted_1$
|
|
18682
|
+
const DownloadButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-0a911831"]]);
|
|
18683
|
+
const _hoisted_1$5 = {
|
|
18638
18684
|
key: 0,
|
|
18639
18685
|
class: "pdf-viewer-header"
|
|
18640
18686
|
};
|
|
18641
|
-
const _hoisted_2$
|
|
18642
|
-
const _hoisted_3$
|
|
18643
|
-
const _hoisted_4 = {
|
|
18687
|
+
const _hoisted_2$4 = { class: "pdf-viewer-title" };
|
|
18688
|
+
const _hoisted_3$4 = { class: "pdf-viewer-controls" };
|
|
18689
|
+
const _hoisted_4$2 = {
|
|
18644
18690
|
key: 0,
|
|
18645
18691
|
class: "zoom-controls"
|
|
18646
18692
|
};
|
|
18647
|
-
const _hoisted_5 = { class: "zoom-level" };
|
|
18693
|
+
const _hoisted_5$1 = { class: "zoom-level" };
|
|
18648
18694
|
const _hoisted_6 = {
|
|
18649
18695
|
key: 1,
|
|
18650
18696
|
class: "navigation-controls"
|
|
@@ -18677,7 +18723,7 @@ const _hoisted_16 = {
|
|
|
18677
18723
|
key: 0,
|
|
18678
18724
|
class: "file-info"
|
|
18679
18725
|
};
|
|
18680
|
-
const _sfc_main$
|
|
18726
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent$1({
|
|
18681
18727
|
__name: "PdfViewer",
|
|
18682
18728
|
props: {
|
|
18683
18729
|
src: {},
|
|
@@ -18885,12 +18931,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent$1({
|
|
|
18885
18931
|
return openBlock(), createElementBlock("div", {
|
|
18886
18932
|
class: normalizeClass(["pdf-viewer-container", { "fullscreen": isFullscreen.value }])
|
|
18887
18933
|
}, [
|
|
18888
|
-
__props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
18889
|
-
createElementVNode("div", _hoisted_2$
|
|
18934
|
+
__props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
18935
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
18890
18936
|
createElementVNode("h3", null, toDisplayString(__props.title || "PDF Viewer"), 1)
|
|
18891
18937
|
]),
|
|
18892
|
-
createElementVNode("div", _hoisted_3$
|
|
18893
|
-
__props.showZoomControls ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
18938
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
18939
|
+
__props.showZoomControls ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
18894
18940
|
createVNode(VBtn, {
|
|
18895
18941
|
size: "small",
|
|
18896
18942
|
variant: "text",
|
|
@@ -18906,7 +18952,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent$1({
|
|
|
18906
18952
|
]),
|
|
18907
18953
|
_: 1
|
|
18908
18954
|
}, 8, ["disabled"]),
|
|
18909
|
-
createElementVNode("span", _hoisted_5, toDisplayString(Math.round(zoom.value * 100)) + "%", 1),
|
|
18955
|
+
createElementVNode("span", _hoisted_5$1, toDisplayString(Math.round(zoom.value * 100)) + "%", 1),
|
|
18910
18956
|
createVNode(VBtn, {
|
|
18911
18957
|
size: "small",
|
|
18912
18958
|
variant: "text",
|
|
@@ -19104,8 +19150,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent$1({
|
|
|
19104
19150
|
};
|
|
19105
19151
|
}
|
|
19106
19152
|
});
|
|
19107
|
-
const PdfViewer = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
19108
|
-
const _sfc_main$
|
|
19153
|
+
const PdfViewer = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__scopeId", "data-v-f3e9c767"]]);
|
|
19154
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent$1({
|
|
19109
19155
|
__name: "UiChildCard",
|
|
19110
19156
|
props: {
|
|
19111
19157
|
title: String
|
|
@@ -19139,8 +19185,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent$1({
|
|
|
19139
19185
|
};
|
|
19140
19186
|
}
|
|
19141
19187
|
});
|
|
19142
|
-
const _hoisted_1$
|
|
19143
|
-
const _sfc_main$
|
|
19188
|
+
const _hoisted_1$4 = { class: "d-sm-flex align-center justify-space-between" };
|
|
19189
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent$1({
|
|
19144
19190
|
__name: "UiParentCard",
|
|
19145
19191
|
props: {
|
|
19146
19192
|
title: String
|
|
@@ -19152,7 +19198,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
|
|
|
19152
19198
|
default: withCtx(() => [
|
|
19153
19199
|
createVNode(VCardItem, null, {
|
|
19154
19200
|
default: withCtx(() => [
|
|
19155
|
-
createElementVNode("div", _hoisted_1$
|
|
19201
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
19156
19202
|
createVNode(VCardTitle, null, {
|
|
19157
19203
|
default: withCtx(() => [
|
|
19158
19204
|
createTextVNode(toDisplayString(props.title), 1)
|
|
@@ -19177,7 +19223,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
|
|
|
19177
19223
|
};
|
|
19178
19224
|
}
|
|
19179
19225
|
});
|
|
19180
|
-
const _sfc_main$
|
|
19226
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent$1({
|
|
19181
19227
|
__name: "VPriceTextField",
|
|
19182
19228
|
props: {
|
|
19183
19229
|
modelValue: {},
|
|
@@ -19278,13 +19324,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent$1({
|
|
|
19278
19324
|
};
|
|
19279
19325
|
}
|
|
19280
19326
|
});
|
|
19281
|
-
const _hoisted_1$
|
|
19327
|
+
const _hoisted_1$3 = {
|
|
19282
19328
|
class: "app-stepper-root",
|
|
19283
19329
|
dir: "rtl"
|
|
19284
19330
|
};
|
|
19285
|
-
const _hoisted_2$
|
|
19286
|
-
const _hoisted_3$
|
|
19287
|
-
const _sfc_main$
|
|
19331
|
+
const _hoisted_2$3 = { class: "app-stepper-header-card" };
|
|
19332
|
+
const _hoisted_3$3 = { class: "app-stepper-title" };
|
|
19333
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
|
|
19288
19334
|
__name: "AppStepper",
|
|
19289
19335
|
props: {
|
|
19290
19336
|
steps: {
|
|
@@ -19336,8 +19382,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent$1({
|
|
|
19336
19382
|
});
|
|
19337
19383
|
__expose({ currentStepComponentRef });
|
|
19338
19384
|
return (_ctx, _cache) => {
|
|
19339
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
19340
|
-
createElementVNode("div", _hoisted_2$
|
|
19385
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
19386
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
19341
19387
|
createElementVNode("div", {
|
|
19342
19388
|
ref_key: "stepperHeaderRef",
|
|
19343
19389
|
ref: stepperHeaderRef,
|
|
@@ -19378,7 +19424,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent$1({
|
|
|
19378
19424
|
}))
|
|
19379
19425
|
], true)
|
|
19380
19426
|
], 2),
|
|
19381
|
-
createElementVNode("span", _hoisted_3$
|
|
19427
|
+
createElementVNode("span", _hoisted_3$3, toDisplayString(step.title), 1),
|
|
19382
19428
|
index2 < __props.steps.length - 1 ? (openBlock(), createElementBlock("span", {
|
|
19383
19429
|
key: 0,
|
|
19384
19430
|
class: normalizeClass([
|
|
@@ -19403,7 +19449,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent$1({
|
|
|
19403
19449
|
};
|
|
19404
19450
|
}
|
|
19405
19451
|
});
|
|
19406
|
-
const AppStepper = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
19452
|
+
const AppStepper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-d5178633"]]);
|
|
19407
19453
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
19408
19454
|
function getDefaultExportFromCjs(x) {
|
|
19409
19455
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -20632,7 +20678,7 @@ var lottie = { exports: {} };
|
|
|
20632
20678
|
}
|
|
20633
20679
|
return null;
|
|
20634
20680
|
}
|
|
20635
|
-
function
|
|
20681
|
+
function destroy2() {
|
|
20636
20682
|
this.imagesLoadedCb = null;
|
|
20637
20683
|
this.images.length = 0;
|
|
20638
20684
|
}
|
|
@@ -20670,7 +20716,7 @@ var lottie = { exports: {} };
|
|
|
20670
20716
|
setPath,
|
|
20671
20717
|
loadedImages,
|
|
20672
20718
|
loadedFootages,
|
|
20673
|
-
destroy,
|
|
20719
|
+
destroy: destroy2,
|
|
20674
20720
|
getAsset,
|
|
20675
20721
|
createImgData,
|
|
20676
20722
|
createImageData,
|
|
@@ -21612,7 +21658,7 @@ var lottie = { exports: {} };
|
|
|
21612
21658
|
registeredAnimations[i].animation.togglePause(animation);
|
|
21613
21659
|
}
|
|
21614
21660
|
}
|
|
21615
|
-
function
|
|
21661
|
+
function destroy2(animation) {
|
|
21616
21662
|
var i;
|
|
21617
21663
|
for (i = len - 1; i >= 0; i -= 1) {
|
|
21618
21664
|
registeredAnimations[i].animation.destroy(animation);
|
|
@@ -21692,7 +21738,7 @@ var lottie = { exports: {} };
|
|
|
21692
21738
|
moduleOb.searchAnimations = searchAnimations2;
|
|
21693
21739
|
moduleOb.resize = resize;
|
|
21694
21740
|
moduleOb.goToAndStop = goToAndStop;
|
|
21695
|
-
moduleOb.destroy =
|
|
21741
|
+
moduleOb.destroy = destroy2;
|
|
21696
21742
|
moduleOb.freeze = freeze;
|
|
21697
21743
|
moduleOb.unfreeze = unfreeze;
|
|
21698
21744
|
moduleOb.setVolume = setVolume;
|
|
@@ -21727,14 +21773,14 @@ var lottie = { exports: {} };
|
|
|
21727
21773
|
function B(aA1, aA2) {
|
|
21728
21774
|
return 3 * aA2 - 6 * aA1;
|
|
21729
21775
|
}
|
|
21730
|
-
function
|
|
21776
|
+
function C2(aA1) {
|
|
21731
21777
|
return 3 * aA1;
|
|
21732
21778
|
}
|
|
21733
21779
|
function calcBezier(aT, aA1, aA2) {
|
|
21734
|
-
return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT +
|
|
21780
|
+
return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C2(aA1)) * aT;
|
|
21735
21781
|
}
|
|
21736
21782
|
function getSlope(aT, aA1, aA2) {
|
|
21737
|
-
return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT +
|
|
21783
|
+
return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C2(aA1);
|
|
21738
21784
|
}
|
|
21739
21785
|
function binarySubdivide(aX, aA, aB, mX1, mX2) {
|
|
21740
21786
|
var currentX, currentT, i = 0;
|
|
@@ -21765,7 +21811,7 @@ var lottie = { exports: {} };
|
|
|
21765
21811
|
this.get = this.get.bind(this);
|
|
21766
21812
|
}
|
|
21767
21813
|
BezierEasing.prototype = {
|
|
21768
|
-
get: function
|
|
21814
|
+
get: function get2(x) {
|
|
21769
21815
|
var mX1 = this._p[0], mY1 = this._p[1], mX2 = this._p[2], mY2 = this._p[3];
|
|
21770
21816
|
if (!this._precomputed) this._precompute();
|
|
21771
21817
|
if (mX1 === mY1 && mX2 === mY2) return x;
|
|
@@ -26912,7 +26958,7 @@ var lottie = { exports: {} };
|
|
|
26912
26958
|
this.prepareProperties(num, this.isInRange);
|
|
26913
26959
|
this.checkTransparency();
|
|
26914
26960
|
},
|
|
26915
|
-
destroy: function
|
|
26961
|
+
destroy: function destroy2() {
|
|
26916
26962
|
this.innerElem = null;
|
|
26917
26963
|
this.destroyBaseElement();
|
|
26918
26964
|
}
|
|
@@ -30177,7 +30223,7 @@ var lottie = { exports: {} };
|
|
|
30177
30223
|
this._isFirstFrame = false;
|
|
30178
30224
|
}
|
|
30179
30225
|
},
|
|
30180
|
-
destroy: function
|
|
30226
|
+
destroy: function destroy2() {
|
|
30181
30227
|
this.canvasContext = null;
|
|
30182
30228
|
this.data = null;
|
|
30183
30229
|
this.globalData = null;
|
|
@@ -31523,7 +31569,7 @@ var lottie = { exports: {} };
|
|
|
31523
31569
|
this._isFirstFrame = false;
|
|
31524
31570
|
}
|
|
31525
31571
|
},
|
|
31526
|
-
destroy: function
|
|
31572
|
+
destroy: function destroy2() {
|
|
31527
31573
|
this.layerElement = null;
|
|
31528
31574
|
this.transformedElement = null;
|
|
31529
31575
|
if (this.matteElement) {
|
|
@@ -33099,7 +33145,7 @@ var lottie = { exports: {} };
|
|
|
33099
33145
|
var thisProperty = property;
|
|
33100
33146
|
thisProperty.valueAtTime = thisProperty.getValueAtTime;
|
|
33101
33147
|
Object.defineProperty(thisProperty, "value", {
|
|
33102
|
-
get: function
|
|
33148
|
+
get: function get2() {
|
|
33103
33149
|
return thisProperty.v;
|
|
33104
33150
|
}
|
|
33105
33151
|
});
|
|
@@ -33440,7 +33486,7 @@ var lottie = { exports: {} };
|
|
|
33440
33486
|
this._data = data2;
|
|
33441
33487
|
}
|
|
33442
33488
|
Object.defineProperty(MaskInterface.prototype, "maskPath", {
|
|
33443
|
-
get: function
|
|
33489
|
+
get: function get2() {
|
|
33444
33490
|
if (this._mask.prop.k) {
|
|
33445
33491
|
this._mask.prop.getValue();
|
|
33446
33492
|
}
|
|
@@ -33448,7 +33494,7 @@ var lottie = { exports: {} };
|
|
|
33448
33494
|
}
|
|
33449
33495
|
});
|
|
33450
33496
|
Object.defineProperty(MaskInterface.prototype, "maskOpacity", {
|
|
33451
|
-
get: function
|
|
33497
|
+
get: function get2() {
|
|
33452
33498
|
if (this._mask.op.k) {
|
|
33453
33499
|
this._mask.op.getValue();
|
|
33454
33500
|
}
|
|
@@ -33489,7 +33535,7 @@ var lottie = { exports: {} };
|
|
|
33489
33535
|
};
|
|
33490
33536
|
function completeProperty(expressionValue, property2, type) {
|
|
33491
33537
|
Object.defineProperty(expressionValue, "velocity", {
|
|
33492
|
-
get: function
|
|
33538
|
+
get: function get2() {
|
|
33493
33539
|
return property2.getVelocityAtTime(property2.comp.currentFrame);
|
|
33494
33540
|
}
|
|
33495
33541
|
});
|
|
@@ -33645,7 +33691,7 @@ var lottie = { exports: {} };
|
|
|
33645
33691
|
}
|
|
33646
33692
|
}
|
|
33647
33693
|
Object.defineProperty(_thisFunction, "position", {
|
|
33648
|
-
get: function
|
|
33694
|
+
get: function get2() {
|
|
33649
33695
|
if (transform2.p) {
|
|
33650
33696
|
return _transformFactory();
|
|
33651
33697
|
}
|
|
@@ -33797,12 +33843,12 @@ var lottie = { exports: {} };
|
|
|
33797
33843
|
var anchorPointDescriptor = getDescriptor(transformInterface, "anchorPoint");
|
|
33798
33844
|
Object.defineProperties(_thisLayerFunction, {
|
|
33799
33845
|
hasParent: {
|
|
33800
|
-
get: function
|
|
33846
|
+
get: function get2() {
|
|
33801
33847
|
return elem2.hierarchy.length;
|
|
33802
33848
|
}
|
|
33803
33849
|
},
|
|
33804
33850
|
parent: {
|
|
33805
|
-
get: function
|
|
33851
|
+
get: function get2() {
|
|
33806
33852
|
return elem2.hierarchy[0].layerInterface;
|
|
33807
33853
|
}
|
|
33808
33854
|
},
|
|
@@ -33813,12 +33859,12 @@ var lottie = { exports: {} };
|
|
|
33813
33859
|
anchorPoint: anchorPointDescriptor,
|
|
33814
33860
|
anchor_point: anchorPointDescriptor,
|
|
33815
33861
|
transform: {
|
|
33816
|
-
get: function
|
|
33862
|
+
get: function get2() {
|
|
33817
33863
|
return transformInterface;
|
|
33818
33864
|
}
|
|
33819
33865
|
},
|
|
33820
33866
|
active: {
|
|
33821
|
-
get: function
|
|
33867
|
+
get: function get2() {
|
|
33822
33868
|
return elem2.isInRange;
|
|
33823
33869
|
}
|
|
33824
33870
|
}
|
|
@@ -33888,7 +33934,7 @@ var lottie = { exports: {} };
|
|
|
33888
33934
|
return null;
|
|
33889
33935
|
};
|
|
33890
33936
|
Object.defineProperty(groupInterface, "numProperties", {
|
|
33891
|
-
get: function
|
|
33937
|
+
get: function get2() {
|
|
33892
33938
|
return effects.length;
|
|
33893
33939
|
}
|
|
33894
33940
|
});
|
|
@@ -33925,14 +33971,14 @@ var lottie = { exports: {} };
|
|
|
33925
33971
|
}
|
|
33926
33972
|
if (data2.mn === "ADBE Color Control") {
|
|
33927
33973
|
Object.defineProperty(groupInterface, "color", {
|
|
33928
|
-
get: function
|
|
33974
|
+
get: function get2() {
|
|
33929
33975
|
return effectElements[0]();
|
|
33930
33976
|
}
|
|
33931
33977
|
});
|
|
33932
33978
|
}
|
|
33933
33979
|
Object.defineProperties(groupInterface, {
|
|
33934
33980
|
numProperties: {
|
|
33935
|
-
get: function
|
|
33981
|
+
get: function get2() {
|
|
33936
33982
|
return data2.np;
|
|
33937
33983
|
}
|
|
33938
33984
|
},
|
|
@@ -33975,7 +34021,7 @@ var lottie = { exports: {} };
|
|
|
33975
34021
|
prop.setGroupProperty(PropertyInterface("Path", _propertyGroup));
|
|
33976
34022
|
Object.defineProperties(interfaceFunction, {
|
|
33977
34023
|
path: {
|
|
33978
|
-
get: function
|
|
34024
|
+
get: function get2() {
|
|
33979
34025
|
if (prop.k) {
|
|
33980
34026
|
prop.getValue();
|
|
33981
34027
|
}
|
|
@@ -33983,7 +34029,7 @@ var lottie = { exports: {} };
|
|
|
33983
34029
|
}
|
|
33984
34030
|
},
|
|
33985
34031
|
shape: {
|
|
33986
|
-
get: function
|
|
34032
|
+
get: function get2() {
|
|
33987
34033
|
if (prop.k) {
|
|
33988
34034
|
prop.getValue();
|
|
33989
34035
|
}
|
|
@@ -34086,7 +34132,7 @@ var lottie = { exports: {} };
|
|
|
34086
34132
|
interfaceFunction.content = content2;
|
|
34087
34133
|
interfaceFunction.transform = transformInterface;
|
|
34088
34134
|
Object.defineProperty(interfaceFunction, "_name", {
|
|
34089
|
-
get: function
|
|
34135
|
+
get: function get2() {
|
|
34090
34136
|
return shape.nm;
|
|
34091
34137
|
}
|
|
34092
34138
|
});
|
|
@@ -34148,7 +34194,7 @@ var lottie = { exports: {} };
|
|
|
34148
34194
|
get: ExpressionPropertyInterface(view.o)
|
|
34149
34195
|
},
|
|
34150
34196
|
type: {
|
|
34151
|
-
get: function
|
|
34197
|
+
get: function get2() {
|
|
34152
34198
|
return "a";
|
|
34153
34199
|
}
|
|
34154
34200
|
},
|
|
@@ -34208,7 +34254,7 @@ var lottie = { exports: {} };
|
|
|
34208
34254
|
get: ExpressionPropertyInterface(view.w)
|
|
34209
34255
|
},
|
|
34210
34256
|
dash: {
|
|
34211
|
-
get: function
|
|
34257
|
+
get: function get2() {
|
|
34212
34258
|
return dashOb;
|
|
34213
34259
|
}
|
|
34214
34260
|
},
|
|
@@ -34552,14 +34598,14 @@ var lottie = { exports: {} };
|
|
|
34552
34598
|
}
|
|
34553
34599
|
}
|
|
34554
34600
|
Object.defineProperty(_thisLayerFunction, "sourceText", {
|
|
34555
|
-
get: function
|
|
34601
|
+
get: function get2() {
|
|
34556
34602
|
elem2.textProperty.getValue();
|
|
34557
34603
|
var stringValue = elem2.textProperty.currentData.t;
|
|
34558
34604
|
if (!_sourceText || stringValue !== _sourceText.value) {
|
|
34559
34605
|
_sourceText = new String(stringValue);
|
|
34560
34606
|
_sourceText.value = stringValue || new String(stringValue);
|
|
34561
34607
|
Object.defineProperty(_sourceText, "style", {
|
|
34562
|
-
get: function
|
|
34608
|
+
get: function get3() {
|
|
34563
34609
|
return {
|
|
34564
34610
|
fillColor: elem2.textProperty.currentData.fc
|
|
34565
34611
|
};
|
|
@@ -35823,7 +35869,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
35823
35869
|
}
|
|
35824
35870
|
return target;
|
|
35825
35871
|
};
|
|
35826
|
-
const _sfc_main$
|
|
35872
|
+
const _sfc_main$3 = defineComponent$1({
|
|
35827
35873
|
props: {
|
|
35828
35874
|
animationData: {
|
|
35829
35875
|
type: Object,
|
|
@@ -36074,7 +36120,7 @@ const _sfc_main$1 = defineComponent$1({
|
|
|
36074
36120
|
lottieAnimation.stop();
|
|
36075
36121
|
}
|
|
36076
36122
|
};
|
|
36077
|
-
const
|
|
36123
|
+
const destroy2 = () => {
|
|
36078
36124
|
if (lottieAnimation) {
|
|
36079
36125
|
lottieAnimation.destroy();
|
|
36080
36126
|
}
|
|
@@ -36134,7 +36180,7 @@ const _sfc_main$1 = defineComponent$1({
|
|
|
36134
36180
|
play,
|
|
36135
36181
|
pause,
|
|
36136
36182
|
stop,
|
|
36137
|
-
destroy,
|
|
36183
|
+
destroy: destroy2,
|
|
36138
36184
|
setSpeed,
|
|
36139
36185
|
setDirection,
|
|
36140
36186
|
goToAndStop,
|
|
@@ -36155,7 +36201,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36155
36201
|
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.hoverEnded && _ctx.hoverEnded(...args))
|
|
36156
36202
|
}, null, 36);
|
|
36157
36203
|
}
|
|
36158
|
-
var Vue3Lottie = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
36204
|
+
var Vue3Lottie = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render]]);
|
|
36159
36205
|
const useCustomizerStore = defineStore({
|
|
36160
36206
|
id: "customizer",
|
|
36161
36207
|
state: () => ({
|
|
@@ -36209,21 +36255,21 @@ const useCustomizerStore = defineStore({
|
|
|
36209
36255
|
}
|
|
36210
36256
|
}
|
|
36211
36257
|
});
|
|
36212
|
-
const _hoisted_1 = {
|
|
36258
|
+
const _hoisted_1$2 = {
|
|
36213
36259
|
key: 0,
|
|
36214
36260
|
class: "loading-overlay"
|
|
36215
36261
|
};
|
|
36216
|
-
const _hoisted_2 = { class: "loading-wrapper" };
|
|
36217
|
-
const _hoisted_3 = { key: 0 };
|
|
36218
|
-
const _sfc_main = /* @__PURE__ */ defineComponent$1({
|
|
36262
|
+
const _hoisted_2$2 = { class: "loading-wrapper" };
|
|
36263
|
+
const _hoisted_3$2 = { key: 0 };
|
|
36264
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent$1({
|
|
36219
36265
|
__name: "Loading",
|
|
36220
36266
|
setup(__props) {
|
|
36221
36267
|
const customizer = useCustomizerStore();
|
|
36222
36268
|
return (_ctx, _cache) => {
|
|
36223
36269
|
return openBlock(), createBlock(Transition, { name: "fade" }, {
|
|
36224
36270
|
default: withCtx(() => [
|
|
36225
|
-
unref(customizer).loading ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
36226
|
-
createElementVNode("div", _hoisted_2, [
|
|
36271
|
+
unref(customizer).loading ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
36272
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
36227
36273
|
createVNode(unref(Vue3Lottie), {
|
|
36228
36274
|
"animation-link": "/persian.json",
|
|
36229
36275
|
loop: true,
|
|
@@ -36232,7 +36278,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent$1({
|
|
|
36232
36278
|
}),
|
|
36233
36279
|
createVNode(Transition, { name: "fade-slide" }, {
|
|
36234
36280
|
default: withCtx(() => [
|
|
36235
|
-
unref(customizer).loading ? (openBlock(), createElementBlock("span", _hoisted_3, "لطفا منتظر بمانید")) : createCommentVNode("", true)
|
|
36281
|
+
unref(customizer).loading ? (openBlock(), createElementBlock("span", _hoisted_3$2, "لطفا منتظر بمانید")) : createCommentVNode("", true)
|
|
36236
36282
|
]),
|
|
36237
36283
|
_: 1
|
|
36238
36284
|
})
|
|
@@ -36244,7 +36290,2678 @@ const _sfc_main = /* @__PURE__ */ defineComponent$1({
|
|
|
36244
36290
|
};
|
|
36245
36291
|
}
|
|
36246
36292
|
});
|
|
36247
|
-
const Loading = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-9b533ee4"]]);
|
|
36293
|
+
const Loading = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__scopeId", "data-v-9b533ee4"]]);
|
|
36294
|
+
/*!
|
|
36295
|
+
* perfect-scrollbar v1.5.6
|
|
36296
|
+
* Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
|
|
36297
|
+
* Licensed under MIT
|
|
36298
|
+
*/
|
|
36299
|
+
function get(element) {
|
|
36300
|
+
return getComputedStyle(element);
|
|
36301
|
+
}
|
|
36302
|
+
function set(element, obj) {
|
|
36303
|
+
for (var key2 in obj) {
|
|
36304
|
+
var val2 = obj[key2];
|
|
36305
|
+
if (typeof val2 === "number") {
|
|
36306
|
+
val2 = val2 + "px";
|
|
36307
|
+
}
|
|
36308
|
+
element.style[key2] = val2;
|
|
36309
|
+
}
|
|
36310
|
+
return element;
|
|
36311
|
+
}
|
|
36312
|
+
function div(className) {
|
|
36313
|
+
var div2 = document.createElement("div");
|
|
36314
|
+
div2.className = className;
|
|
36315
|
+
return div2;
|
|
36316
|
+
}
|
|
36317
|
+
var elMatches = typeof Element !== "undefined" && (Element.prototype.matches || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector);
|
|
36318
|
+
function matches(element, query) {
|
|
36319
|
+
if (!elMatches) {
|
|
36320
|
+
throw new Error("No element matching method supported");
|
|
36321
|
+
}
|
|
36322
|
+
return elMatches.call(element, query);
|
|
36323
|
+
}
|
|
36324
|
+
function remove(element) {
|
|
36325
|
+
if (element.remove) {
|
|
36326
|
+
element.remove();
|
|
36327
|
+
} else {
|
|
36328
|
+
if (element.parentNode) {
|
|
36329
|
+
element.parentNode.removeChild(element);
|
|
36330
|
+
}
|
|
36331
|
+
}
|
|
36332
|
+
}
|
|
36333
|
+
function queryChildren(element, selector) {
|
|
36334
|
+
return Array.prototype.filter.call(
|
|
36335
|
+
element.children,
|
|
36336
|
+
function(child) {
|
|
36337
|
+
return matches(child, selector);
|
|
36338
|
+
}
|
|
36339
|
+
);
|
|
36340
|
+
}
|
|
36341
|
+
var cls = {
|
|
36342
|
+
main: "ps",
|
|
36343
|
+
rtl: "ps__rtl",
|
|
36344
|
+
element: {
|
|
36345
|
+
thumb: function(x) {
|
|
36346
|
+
return "ps__thumb-" + x;
|
|
36347
|
+
},
|
|
36348
|
+
rail: function(x) {
|
|
36349
|
+
return "ps__rail-" + x;
|
|
36350
|
+
},
|
|
36351
|
+
consuming: "ps__child--consume"
|
|
36352
|
+
},
|
|
36353
|
+
state: {
|
|
36354
|
+
focus: "ps--focus",
|
|
36355
|
+
clicking: "ps--clicking",
|
|
36356
|
+
active: function(x) {
|
|
36357
|
+
return "ps--active-" + x;
|
|
36358
|
+
},
|
|
36359
|
+
scrolling: function(x) {
|
|
36360
|
+
return "ps--scrolling-" + x;
|
|
36361
|
+
}
|
|
36362
|
+
}
|
|
36363
|
+
};
|
|
36364
|
+
var scrollingClassTimeout = { x: null, y: null };
|
|
36365
|
+
function addScrollingClass(i, x) {
|
|
36366
|
+
var classList = i.element.classList;
|
|
36367
|
+
var className = cls.state.scrolling(x);
|
|
36368
|
+
if (classList.contains(className)) {
|
|
36369
|
+
clearTimeout(scrollingClassTimeout[x]);
|
|
36370
|
+
} else {
|
|
36371
|
+
classList.add(className);
|
|
36372
|
+
}
|
|
36373
|
+
}
|
|
36374
|
+
function removeScrollingClass(i, x) {
|
|
36375
|
+
scrollingClassTimeout[x] = setTimeout(
|
|
36376
|
+
function() {
|
|
36377
|
+
return i.isAlive && i.element.classList.remove(cls.state.scrolling(x));
|
|
36378
|
+
},
|
|
36379
|
+
i.settings.scrollingThreshold
|
|
36380
|
+
);
|
|
36381
|
+
}
|
|
36382
|
+
function setScrollingClassInstantly(i, x) {
|
|
36383
|
+
addScrollingClass(i, x);
|
|
36384
|
+
removeScrollingClass(i, x);
|
|
36385
|
+
}
|
|
36386
|
+
var EventElement = function EventElement2(element) {
|
|
36387
|
+
this.element = element;
|
|
36388
|
+
this.handlers = {};
|
|
36389
|
+
};
|
|
36390
|
+
var prototypeAccessors = { isEmpty: { configurable: true } };
|
|
36391
|
+
EventElement.prototype.bind = function bind(eventName2, handler) {
|
|
36392
|
+
if (typeof this.handlers[eventName2] === "undefined") {
|
|
36393
|
+
this.handlers[eventName2] = [];
|
|
36394
|
+
}
|
|
36395
|
+
this.handlers[eventName2].push(handler);
|
|
36396
|
+
this.element.addEventListener(eventName2, handler, false);
|
|
36397
|
+
};
|
|
36398
|
+
EventElement.prototype.unbind = function unbind(eventName2, target) {
|
|
36399
|
+
var this$1$1 = this;
|
|
36400
|
+
this.handlers[eventName2] = this.handlers[eventName2].filter(function(handler) {
|
|
36401
|
+
if (target && handler !== target) {
|
|
36402
|
+
return true;
|
|
36403
|
+
}
|
|
36404
|
+
this$1$1.element.removeEventListener(eventName2, handler, false);
|
|
36405
|
+
return false;
|
|
36406
|
+
});
|
|
36407
|
+
};
|
|
36408
|
+
EventElement.prototype.unbindAll = function unbindAll() {
|
|
36409
|
+
for (var name2 in this.handlers) {
|
|
36410
|
+
this.unbind(name2);
|
|
36411
|
+
}
|
|
36412
|
+
};
|
|
36413
|
+
prototypeAccessors.isEmpty.get = function() {
|
|
36414
|
+
var this$1$1 = this;
|
|
36415
|
+
return Object.keys(this.handlers).every(
|
|
36416
|
+
function(key2) {
|
|
36417
|
+
return this$1$1.handlers[key2].length === 0;
|
|
36418
|
+
}
|
|
36419
|
+
);
|
|
36420
|
+
};
|
|
36421
|
+
Object.defineProperties(EventElement.prototype, prototypeAccessors);
|
|
36422
|
+
var EventManager = function EventManager2() {
|
|
36423
|
+
this.eventElements = [];
|
|
36424
|
+
};
|
|
36425
|
+
EventManager.prototype.eventElement = function eventElement(element) {
|
|
36426
|
+
var ee = this.eventElements.filter(function(ee2) {
|
|
36427
|
+
return ee2.element === element;
|
|
36428
|
+
})[0];
|
|
36429
|
+
if (!ee) {
|
|
36430
|
+
ee = new EventElement(element);
|
|
36431
|
+
this.eventElements.push(ee);
|
|
36432
|
+
}
|
|
36433
|
+
return ee;
|
|
36434
|
+
};
|
|
36435
|
+
EventManager.prototype.bind = function bind2(element, eventName2, handler) {
|
|
36436
|
+
this.eventElement(element).bind(eventName2, handler);
|
|
36437
|
+
};
|
|
36438
|
+
EventManager.prototype.unbind = function unbind2(element, eventName2, handler) {
|
|
36439
|
+
var ee = this.eventElement(element);
|
|
36440
|
+
ee.unbind(eventName2, handler);
|
|
36441
|
+
if (ee.isEmpty) {
|
|
36442
|
+
this.eventElements.splice(this.eventElements.indexOf(ee), 1);
|
|
36443
|
+
}
|
|
36444
|
+
};
|
|
36445
|
+
EventManager.prototype.unbindAll = function unbindAll2() {
|
|
36446
|
+
this.eventElements.forEach(function(e) {
|
|
36447
|
+
return e.unbindAll();
|
|
36448
|
+
});
|
|
36449
|
+
this.eventElements = [];
|
|
36450
|
+
};
|
|
36451
|
+
EventManager.prototype.once = function once(element, eventName2, handler) {
|
|
36452
|
+
var ee = this.eventElement(element);
|
|
36453
|
+
var onceHandler = function(evt) {
|
|
36454
|
+
ee.unbind(eventName2, onceHandler);
|
|
36455
|
+
handler(evt);
|
|
36456
|
+
};
|
|
36457
|
+
ee.bind(eventName2, onceHandler);
|
|
36458
|
+
};
|
|
36459
|
+
function createEvent(name2) {
|
|
36460
|
+
if (typeof window.CustomEvent === "function") {
|
|
36461
|
+
return new CustomEvent(name2);
|
|
36462
|
+
}
|
|
36463
|
+
var evt = document.createEvent("CustomEvent");
|
|
36464
|
+
evt.initCustomEvent(name2, false, false, void 0);
|
|
36465
|
+
return evt;
|
|
36466
|
+
}
|
|
36467
|
+
function processScrollDiff(i, axis, diff, useScrollingClass, forceFireReachEvent) {
|
|
36468
|
+
if (useScrollingClass === void 0) useScrollingClass = true;
|
|
36469
|
+
if (forceFireReachEvent === void 0) forceFireReachEvent = false;
|
|
36470
|
+
var fields;
|
|
36471
|
+
if (axis === "top") {
|
|
36472
|
+
fields = ["contentHeight", "containerHeight", "scrollTop", "y", "up", "down"];
|
|
36473
|
+
} else if (axis === "left") {
|
|
36474
|
+
fields = ["contentWidth", "containerWidth", "scrollLeft", "x", "left", "right"];
|
|
36475
|
+
} else {
|
|
36476
|
+
throw new Error("A proper axis should be provided");
|
|
36477
|
+
}
|
|
36478
|
+
processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);
|
|
36479
|
+
}
|
|
36480
|
+
function processScrollDiff$1(i, diff, ref2, useScrollingClass, forceFireReachEvent) {
|
|
36481
|
+
var contentHeight = ref2[0];
|
|
36482
|
+
var containerHeight = ref2[1];
|
|
36483
|
+
var scrollTop = ref2[2];
|
|
36484
|
+
var y = ref2[3];
|
|
36485
|
+
var up = ref2[4];
|
|
36486
|
+
var down = ref2[5];
|
|
36487
|
+
if (useScrollingClass === void 0) useScrollingClass = true;
|
|
36488
|
+
if (forceFireReachEvent === void 0) forceFireReachEvent = false;
|
|
36489
|
+
var element = i.element;
|
|
36490
|
+
i.reach[y] = null;
|
|
36491
|
+
if (element[scrollTop] < 1) {
|
|
36492
|
+
i.reach[y] = "start";
|
|
36493
|
+
}
|
|
36494
|
+
if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {
|
|
36495
|
+
i.reach[y] = "end";
|
|
36496
|
+
}
|
|
36497
|
+
if (diff) {
|
|
36498
|
+
element.dispatchEvent(createEvent("ps-scroll-" + y));
|
|
36499
|
+
if (diff < 0) {
|
|
36500
|
+
element.dispatchEvent(createEvent("ps-scroll-" + up));
|
|
36501
|
+
} else if (diff > 0) {
|
|
36502
|
+
element.dispatchEvent(createEvent("ps-scroll-" + down));
|
|
36503
|
+
}
|
|
36504
|
+
if (useScrollingClass) {
|
|
36505
|
+
setScrollingClassInstantly(i, y);
|
|
36506
|
+
}
|
|
36507
|
+
}
|
|
36508
|
+
if (i.reach[y] && (diff || forceFireReachEvent)) {
|
|
36509
|
+
element.dispatchEvent(createEvent("ps-" + y + "-reach-" + i.reach[y]));
|
|
36510
|
+
}
|
|
36511
|
+
}
|
|
36512
|
+
function toInt(x) {
|
|
36513
|
+
return parseInt(x, 10) || 0;
|
|
36514
|
+
}
|
|
36515
|
+
function isEditable(el) {
|
|
36516
|
+
return matches(el, "input,[contenteditable]") || matches(el, "select,[contenteditable]") || matches(el, "textarea,[contenteditable]") || matches(el, "button,[contenteditable]");
|
|
36517
|
+
}
|
|
36518
|
+
function outerWidth(element) {
|
|
36519
|
+
var styles = get(element);
|
|
36520
|
+
return toInt(styles.width) + toInt(styles.paddingLeft) + toInt(styles.paddingRight) + toInt(styles.borderLeftWidth) + toInt(styles.borderRightWidth);
|
|
36521
|
+
}
|
|
36522
|
+
var env = {
|
|
36523
|
+
isWebKit: typeof document !== "undefined" && "WebkitAppearance" in document.documentElement.style,
|
|
36524
|
+
supportsTouch: typeof window !== "undefined" && ("ontouchstart" in window || "maxTouchPoints" in window.navigator && window.navigator.maxTouchPoints > 0 || window.DocumentTouch && document instanceof window.DocumentTouch),
|
|
36525
|
+
supportsIePointer: typeof navigator !== "undefined" && navigator.msMaxTouchPoints,
|
|
36526
|
+
isChrome: typeof navigator !== "undefined" && /Chrome/i.test(navigator && navigator.userAgent)
|
|
36527
|
+
};
|
|
36528
|
+
function updateGeometry(i) {
|
|
36529
|
+
var element = i.element;
|
|
36530
|
+
var roundedScrollTop = Math.floor(element.scrollTop);
|
|
36531
|
+
var rect = element.getBoundingClientRect();
|
|
36532
|
+
i.containerWidth = Math.floor(rect.width);
|
|
36533
|
+
i.containerHeight = Math.floor(rect.height);
|
|
36534
|
+
i.contentWidth = element.scrollWidth;
|
|
36535
|
+
i.contentHeight = element.scrollHeight;
|
|
36536
|
+
if (!element.contains(i.scrollbarXRail)) {
|
|
36537
|
+
queryChildren(element, cls.element.rail("x")).forEach(function(el) {
|
|
36538
|
+
return remove(el);
|
|
36539
|
+
});
|
|
36540
|
+
element.appendChild(i.scrollbarXRail);
|
|
36541
|
+
}
|
|
36542
|
+
if (!element.contains(i.scrollbarYRail)) {
|
|
36543
|
+
queryChildren(element, cls.element.rail("y")).forEach(function(el) {
|
|
36544
|
+
return remove(el);
|
|
36545
|
+
});
|
|
36546
|
+
element.appendChild(i.scrollbarYRail);
|
|
36547
|
+
}
|
|
36548
|
+
if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {
|
|
36549
|
+
i.scrollbarXActive = true;
|
|
36550
|
+
i.railXWidth = i.containerWidth - i.railXMarginWidth;
|
|
36551
|
+
i.railXRatio = i.containerWidth / i.railXWidth;
|
|
36552
|
+
i.scrollbarXWidth = getThumbSize(i, toInt(i.railXWidth * i.containerWidth / i.contentWidth));
|
|
36553
|
+
i.scrollbarXLeft = toInt(
|
|
36554
|
+
(i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth)
|
|
36555
|
+
);
|
|
36556
|
+
} else {
|
|
36557
|
+
i.scrollbarXActive = false;
|
|
36558
|
+
}
|
|
36559
|
+
if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) {
|
|
36560
|
+
i.scrollbarYActive = true;
|
|
36561
|
+
i.railYHeight = i.containerHeight - i.railYMarginHeight;
|
|
36562
|
+
i.railYRatio = i.containerHeight / i.railYHeight;
|
|
36563
|
+
i.scrollbarYHeight = getThumbSize(
|
|
36564
|
+
i,
|
|
36565
|
+
toInt(i.railYHeight * i.containerHeight / i.contentHeight)
|
|
36566
|
+
);
|
|
36567
|
+
i.scrollbarYTop = toInt(
|
|
36568
|
+
roundedScrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight)
|
|
36569
|
+
);
|
|
36570
|
+
} else {
|
|
36571
|
+
i.scrollbarYActive = false;
|
|
36572
|
+
}
|
|
36573
|
+
if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
|
|
36574
|
+
i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
|
|
36575
|
+
}
|
|
36576
|
+
if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
|
|
36577
|
+
i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
|
|
36578
|
+
}
|
|
36579
|
+
updateCss(element, i);
|
|
36580
|
+
if (i.scrollbarXActive) {
|
|
36581
|
+
element.classList.add(cls.state.active("x"));
|
|
36582
|
+
} else {
|
|
36583
|
+
element.classList.remove(cls.state.active("x"));
|
|
36584
|
+
i.scrollbarXWidth = 0;
|
|
36585
|
+
i.scrollbarXLeft = 0;
|
|
36586
|
+
element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;
|
|
36587
|
+
}
|
|
36588
|
+
if (i.scrollbarYActive) {
|
|
36589
|
+
element.classList.add(cls.state.active("y"));
|
|
36590
|
+
} else {
|
|
36591
|
+
element.classList.remove(cls.state.active("y"));
|
|
36592
|
+
i.scrollbarYHeight = 0;
|
|
36593
|
+
i.scrollbarYTop = 0;
|
|
36594
|
+
element.scrollTop = 0;
|
|
36595
|
+
}
|
|
36596
|
+
}
|
|
36597
|
+
function getThumbSize(i, thumbSize) {
|
|
36598
|
+
if (i.settings.minScrollbarLength) {
|
|
36599
|
+
thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);
|
|
36600
|
+
}
|
|
36601
|
+
if (i.settings.maxScrollbarLength) {
|
|
36602
|
+
thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);
|
|
36603
|
+
}
|
|
36604
|
+
return thumbSize;
|
|
36605
|
+
}
|
|
36606
|
+
function updateCss(element, i) {
|
|
36607
|
+
var xRailOffset = { width: i.railXWidth };
|
|
36608
|
+
var roundedScrollTop = Math.floor(element.scrollTop);
|
|
36609
|
+
if (i.isRtl) {
|
|
36610
|
+
xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;
|
|
36611
|
+
} else {
|
|
36612
|
+
xRailOffset.left = element.scrollLeft;
|
|
36613
|
+
}
|
|
36614
|
+
if (i.isScrollbarXUsingBottom) {
|
|
36615
|
+
xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;
|
|
36616
|
+
} else {
|
|
36617
|
+
xRailOffset.top = i.scrollbarXTop + roundedScrollTop;
|
|
36618
|
+
}
|
|
36619
|
+
set(i.scrollbarXRail, xRailOffset);
|
|
36620
|
+
var yRailOffset = { top: roundedScrollTop, height: i.railYHeight };
|
|
36621
|
+
if (i.isScrollbarYUsingRight) {
|
|
36622
|
+
if (i.isRtl) {
|
|
36623
|
+
yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth - 9;
|
|
36624
|
+
} else {
|
|
36625
|
+
yRailOffset.right = i.scrollbarYRight - element.scrollLeft;
|
|
36626
|
+
}
|
|
36627
|
+
} else {
|
|
36628
|
+
if (i.isRtl) {
|
|
36629
|
+
yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth;
|
|
36630
|
+
} else {
|
|
36631
|
+
yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
|
|
36632
|
+
}
|
|
36633
|
+
}
|
|
36634
|
+
set(i.scrollbarYRail, yRailOffset);
|
|
36635
|
+
set(i.scrollbarX, {
|
|
36636
|
+
left: i.scrollbarXLeft,
|
|
36637
|
+
width: i.scrollbarXWidth - i.railBorderXWidth
|
|
36638
|
+
});
|
|
36639
|
+
set(i.scrollbarY, {
|
|
36640
|
+
top: i.scrollbarYTop,
|
|
36641
|
+
height: i.scrollbarYHeight - i.railBorderYWidth
|
|
36642
|
+
});
|
|
36643
|
+
}
|
|
36644
|
+
function clickRail(i) {
|
|
36645
|
+
i.event.bind(i.scrollbarY, "mousedown", function(e) {
|
|
36646
|
+
return e.stopPropagation();
|
|
36647
|
+
});
|
|
36648
|
+
i.event.bind(i.scrollbarYRail, "mousedown", function(e) {
|
|
36649
|
+
var positionTop = e.pageY - window.pageYOffset - i.scrollbarYRail.getBoundingClientRect().top;
|
|
36650
|
+
var direction = positionTop > i.scrollbarYTop ? 1 : -1;
|
|
36651
|
+
i.element.scrollTop += direction * i.containerHeight;
|
|
36652
|
+
updateGeometry(i);
|
|
36653
|
+
e.stopPropagation();
|
|
36654
|
+
});
|
|
36655
|
+
i.event.bind(i.scrollbarX, "mousedown", function(e) {
|
|
36656
|
+
return e.stopPropagation();
|
|
36657
|
+
});
|
|
36658
|
+
i.event.bind(i.scrollbarXRail, "mousedown", function(e) {
|
|
36659
|
+
var positionLeft = e.pageX - window.pageXOffset - i.scrollbarXRail.getBoundingClientRect().left;
|
|
36660
|
+
var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
|
|
36661
|
+
i.element.scrollLeft += direction * i.containerWidth;
|
|
36662
|
+
updateGeometry(i);
|
|
36663
|
+
e.stopPropagation();
|
|
36664
|
+
});
|
|
36665
|
+
}
|
|
36666
|
+
var activeSlider = null;
|
|
36667
|
+
function setupScrollHandlers(i) {
|
|
36668
|
+
bindMouseScrollHandler(i, [
|
|
36669
|
+
"containerHeight",
|
|
36670
|
+
"contentHeight",
|
|
36671
|
+
"pageY",
|
|
36672
|
+
"railYHeight",
|
|
36673
|
+
"scrollbarY",
|
|
36674
|
+
"scrollbarYHeight",
|
|
36675
|
+
"scrollTop",
|
|
36676
|
+
"y",
|
|
36677
|
+
"scrollbarYRail"
|
|
36678
|
+
]);
|
|
36679
|
+
bindMouseScrollHandler(i, [
|
|
36680
|
+
"containerWidth",
|
|
36681
|
+
"contentWidth",
|
|
36682
|
+
"pageX",
|
|
36683
|
+
"railXWidth",
|
|
36684
|
+
"scrollbarX",
|
|
36685
|
+
"scrollbarXWidth",
|
|
36686
|
+
"scrollLeft",
|
|
36687
|
+
"x",
|
|
36688
|
+
"scrollbarXRail"
|
|
36689
|
+
]);
|
|
36690
|
+
}
|
|
36691
|
+
function bindMouseScrollHandler(i, ref2) {
|
|
36692
|
+
var containerDimension = ref2[0];
|
|
36693
|
+
var contentDimension = ref2[1];
|
|
36694
|
+
var pageAxis = ref2[2];
|
|
36695
|
+
var railDimension = ref2[3];
|
|
36696
|
+
var scrollbarAxis = ref2[4];
|
|
36697
|
+
var scrollbarDimension = ref2[5];
|
|
36698
|
+
var scrollAxis = ref2[6];
|
|
36699
|
+
var axis = ref2[7];
|
|
36700
|
+
var scrollbarRail = ref2[8];
|
|
36701
|
+
var element = i.element;
|
|
36702
|
+
var startingScrollPosition = null;
|
|
36703
|
+
var startingMousePagePosition = null;
|
|
36704
|
+
var scrollBy = null;
|
|
36705
|
+
function moveHandler(e) {
|
|
36706
|
+
if (e.touches && e.touches[0]) {
|
|
36707
|
+
e[pageAxis] = e.touches[0]["page" + axis.toUpperCase()];
|
|
36708
|
+
}
|
|
36709
|
+
if (activeSlider === scrollbarAxis) {
|
|
36710
|
+
element[scrollAxis] = startingScrollPosition + scrollBy * (e[pageAxis] - startingMousePagePosition);
|
|
36711
|
+
addScrollingClass(i, axis);
|
|
36712
|
+
updateGeometry(i);
|
|
36713
|
+
e.stopPropagation();
|
|
36714
|
+
e.preventDefault();
|
|
36715
|
+
}
|
|
36716
|
+
}
|
|
36717
|
+
function endHandler() {
|
|
36718
|
+
removeScrollingClass(i, axis);
|
|
36719
|
+
i[scrollbarRail].classList.remove(cls.state.clicking);
|
|
36720
|
+
document.removeEventListener("mousemove", moveHandler);
|
|
36721
|
+
document.removeEventListener("mouseup", endHandler);
|
|
36722
|
+
document.removeEventListener("touchmove", moveHandler);
|
|
36723
|
+
document.removeEventListener("touchend", endHandler);
|
|
36724
|
+
activeSlider = null;
|
|
36725
|
+
}
|
|
36726
|
+
function bindMoves(e) {
|
|
36727
|
+
if (activeSlider === null) {
|
|
36728
|
+
activeSlider = scrollbarAxis;
|
|
36729
|
+
startingScrollPosition = element[scrollAxis];
|
|
36730
|
+
if (e.touches) {
|
|
36731
|
+
e[pageAxis] = e.touches[0]["page" + axis.toUpperCase()];
|
|
36732
|
+
}
|
|
36733
|
+
startingMousePagePosition = e[pageAxis];
|
|
36734
|
+
scrollBy = (i[contentDimension] - i[containerDimension]) / (i[railDimension] - i[scrollbarDimension]);
|
|
36735
|
+
if (!e.touches) {
|
|
36736
|
+
document.addEventListener("mousemove", moveHandler);
|
|
36737
|
+
document.addEventListener("mouseup", endHandler);
|
|
36738
|
+
} else {
|
|
36739
|
+
document.addEventListener("touchmove", moveHandler, { passive: false });
|
|
36740
|
+
document.addEventListener("touchend", endHandler);
|
|
36741
|
+
}
|
|
36742
|
+
i[scrollbarRail].classList.add(cls.state.clicking);
|
|
36743
|
+
}
|
|
36744
|
+
e.stopPropagation();
|
|
36745
|
+
if (e.cancelable) {
|
|
36746
|
+
e.preventDefault();
|
|
36747
|
+
}
|
|
36748
|
+
}
|
|
36749
|
+
i[scrollbarAxis].addEventListener("mousedown", bindMoves);
|
|
36750
|
+
i[scrollbarAxis].addEventListener("touchstart", bindMoves);
|
|
36751
|
+
}
|
|
36752
|
+
function keyboard(i) {
|
|
36753
|
+
var element = i.element;
|
|
36754
|
+
var elementHovered = function() {
|
|
36755
|
+
return matches(element, ":hover");
|
|
36756
|
+
};
|
|
36757
|
+
var scrollbarFocused = function() {
|
|
36758
|
+
return matches(i.scrollbarX, ":focus") || matches(i.scrollbarY, ":focus");
|
|
36759
|
+
};
|
|
36760
|
+
function shouldPreventDefault(deltaX, deltaY) {
|
|
36761
|
+
var scrollTop = Math.floor(element.scrollTop);
|
|
36762
|
+
if (deltaX === 0) {
|
|
36763
|
+
if (!i.scrollbarYActive) {
|
|
36764
|
+
return false;
|
|
36765
|
+
}
|
|
36766
|
+
if (scrollTop === 0 && deltaY > 0 || scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0) {
|
|
36767
|
+
return !i.settings.wheelPropagation;
|
|
36768
|
+
}
|
|
36769
|
+
}
|
|
36770
|
+
var scrollLeft = element.scrollLeft;
|
|
36771
|
+
if (deltaY === 0) {
|
|
36772
|
+
if (!i.scrollbarXActive) {
|
|
36773
|
+
return false;
|
|
36774
|
+
}
|
|
36775
|
+
if (scrollLeft === 0 && deltaX < 0 || scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0) {
|
|
36776
|
+
return !i.settings.wheelPropagation;
|
|
36777
|
+
}
|
|
36778
|
+
}
|
|
36779
|
+
return true;
|
|
36780
|
+
}
|
|
36781
|
+
i.event.bind(i.ownerDocument, "keydown", function(e) {
|
|
36782
|
+
if (e.isDefaultPrevented && e.isDefaultPrevented() || e.defaultPrevented) {
|
|
36783
|
+
return;
|
|
36784
|
+
}
|
|
36785
|
+
if (!elementHovered() && !scrollbarFocused()) {
|
|
36786
|
+
return;
|
|
36787
|
+
}
|
|
36788
|
+
var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;
|
|
36789
|
+
if (activeElement) {
|
|
36790
|
+
if (activeElement.tagName === "IFRAME") {
|
|
36791
|
+
activeElement = activeElement.contentDocument.activeElement;
|
|
36792
|
+
} else {
|
|
36793
|
+
while (activeElement.shadowRoot) {
|
|
36794
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
36795
|
+
}
|
|
36796
|
+
}
|
|
36797
|
+
if (isEditable(activeElement)) {
|
|
36798
|
+
return;
|
|
36799
|
+
}
|
|
36800
|
+
}
|
|
36801
|
+
var deltaX = 0;
|
|
36802
|
+
var deltaY = 0;
|
|
36803
|
+
switch (e.which) {
|
|
36804
|
+
case 37:
|
|
36805
|
+
if (e.metaKey) {
|
|
36806
|
+
deltaX = -i.contentWidth;
|
|
36807
|
+
} else if (e.altKey) {
|
|
36808
|
+
deltaX = -i.containerWidth;
|
|
36809
|
+
} else {
|
|
36810
|
+
deltaX = -30;
|
|
36811
|
+
}
|
|
36812
|
+
break;
|
|
36813
|
+
case 38:
|
|
36814
|
+
if (e.metaKey) {
|
|
36815
|
+
deltaY = i.contentHeight;
|
|
36816
|
+
} else if (e.altKey) {
|
|
36817
|
+
deltaY = i.containerHeight;
|
|
36818
|
+
} else {
|
|
36819
|
+
deltaY = 30;
|
|
36820
|
+
}
|
|
36821
|
+
break;
|
|
36822
|
+
case 39:
|
|
36823
|
+
if (e.metaKey) {
|
|
36824
|
+
deltaX = i.contentWidth;
|
|
36825
|
+
} else if (e.altKey) {
|
|
36826
|
+
deltaX = i.containerWidth;
|
|
36827
|
+
} else {
|
|
36828
|
+
deltaX = 30;
|
|
36829
|
+
}
|
|
36830
|
+
break;
|
|
36831
|
+
case 40:
|
|
36832
|
+
if (e.metaKey) {
|
|
36833
|
+
deltaY = -i.contentHeight;
|
|
36834
|
+
} else if (e.altKey) {
|
|
36835
|
+
deltaY = -i.containerHeight;
|
|
36836
|
+
} else {
|
|
36837
|
+
deltaY = -30;
|
|
36838
|
+
}
|
|
36839
|
+
break;
|
|
36840
|
+
case 32:
|
|
36841
|
+
if (e.shiftKey) {
|
|
36842
|
+
deltaY = i.containerHeight;
|
|
36843
|
+
} else {
|
|
36844
|
+
deltaY = -i.containerHeight;
|
|
36845
|
+
}
|
|
36846
|
+
break;
|
|
36847
|
+
case 33:
|
|
36848
|
+
deltaY = i.containerHeight;
|
|
36849
|
+
break;
|
|
36850
|
+
case 34:
|
|
36851
|
+
deltaY = -i.containerHeight;
|
|
36852
|
+
break;
|
|
36853
|
+
case 36:
|
|
36854
|
+
deltaY = i.contentHeight;
|
|
36855
|
+
break;
|
|
36856
|
+
case 35:
|
|
36857
|
+
deltaY = -i.contentHeight;
|
|
36858
|
+
break;
|
|
36859
|
+
default:
|
|
36860
|
+
return;
|
|
36861
|
+
}
|
|
36862
|
+
if (i.settings.suppressScrollX && deltaX !== 0) {
|
|
36863
|
+
return;
|
|
36864
|
+
}
|
|
36865
|
+
if (i.settings.suppressScrollY && deltaY !== 0) {
|
|
36866
|
+
return;
|
|
36867
|
+
}
|
|
36868
|
+
element.scrollTop -= deltaY;
|
|
36869
|
+
element.scrollLeft += deltaX;
|
|
36870
|
+
updateGeometry(i);
|
|
36871
|
+
if (shouldPreventDefault(deltaX, deltaY)) {
|
|
36872
|
+
e.preventDefault();
|
|
36873
|
+
}
|
|
36874
|
+
});
|
|
36875
|
+
}
|
|
36876
|
+
function wheel(i) {
|
|
36877
|
+
var element = i.element;
|
|
36878
|
+
function shouldPreventDefault(deltaX, deltaY) {
|
|
36879
|
+
var roundedScrollTop = Math.floor(element.scrollTop);
|
|
36880
|
+
var isTop = element.scrollTop === 0;
|
|
36881
|
+
var isBottom = roundedScrollTop + element.offsetHeight === element.scrollHeight;
|
|
36882
|
+
var isLeft = element.scrollLeft === 0;
|
|
36883
|
+
var isRight = element.scrollLeft + element.offsetWidth === element.scrollWidth;
|
|
36884
|
+
var hitsBound;
|
|
36885
|
+
if (Math.abs(deltaY) > Math.abs(deltaX)) {
|
|
36886
|
+
hitsBound = isTop || isBottom;
|
|
36887
|
+
} else {
|
|
36888
|
+
hitsBound = isLeft || isRight;
|
|
36889
|
+
}
|
|
36890
|
+
return hitsBound ? !i.settings.wheelPropagation : true;
|
|
36891
|
+
}
|
|
36892
|
+
function getDeltaFromEvent(e) {
|
|
36893
|
+
var deltaX = e.deltaX;
|
|
36894
|
+
var deltaY = -1 * e.deltaY;
|
|
36895
|
+
if (typeof deltaX === "undefined" || typeof deltaY === "undefined") {
|
|
36896
|
+
deltaX = -1 * e.wheelDeltaX / 6;
|
|
36897
|
+
deltaY = e.wheelDeltaY / 6;
|
|
36898
|
+
}
|
|
36899
|
+
if (e.deltaMode && e.deltaMode === 1) {
|
|
36900
|
+
deltaX *= 10;
|
|
36901
|
+
deltaY *= 10;
|
|
36902
|
+
}
|
|
36903
|
+
if (deltaX !== deltaX && deltaY !== deltaY) {
|
|
36904
|
+
deltaX = 0;
|
|
36905
|
+
deltaY = e.wheelDelta;
|
|
36906
|
+
}
|
|
36907
|
+
if (e.shiftKey) {
|
|
36908
|
+
return [-deltaY, -deltaX];
|
|
36909
|
+
}
|
|
36910
|
+
return [deltaX, deltaY];
|
|
36911
|
+
}
|
|
36912
|
+
function shouldBeConsumedByChild(target, deltaX, deltaY) {
|
|
36913
|
+
if (!env.isWebKit && element.querySelector("select:focus")) {
|
|
36914
|
+
return true;
|
|
36915
|
+
}
|
|
36916
|
+
if (!element.contains(target)) {
|
|
36917
|
+
return false;
|
|
36918
|
+
}
|
|
36919
|
+
var cursor = target;
|
|
36920
|
+
while (cursor && cursor !== element) {
|
|
36921
|
+
if (cursor.classList.contains(cls.element.consuming)) {
|
|
36922
|
+
return true;
|
|
36923
|
+
}
|
|
36924
|
+
var style = get(cursor);
|
|
36925
|
+
if (deltaY && style.overflowY.match(/(scroll|auto)/)) {
|
|
36926
|
+
var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
|
|
36927
|
+
if (maxScrollTop > 0) {
|
|
36928
|
+
if (cursor.scrollTop > 0 && deltaY < 0 || cursor.scrollTop < maxScrollTop && deltaY > 0) {
|
|
36929
|
+
return true;
|
|
36930
|
+
}
|
|
36931
|
+
}
|
|
36932
|
+
}
|
|
36933
|
+
if (deltaX && style.overflowX.match(/(scroll|auto)/)) {
|
|
36934
|
+
var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;
|
|
36935
|
+
if (maxScrollLeft > 0) {
|
|
36936
|
+
if (cursor.scrollLeft > 0 && deltaX < 0 || cursor.scrollLeft < maxScrollLeft && deltaX > 0) {
|
|
36937
|
+
return true;
|
|
36938
|
+
}
|
|
36939
|
+
}
|
|
36940
|
+
}
|
|
36941
|
+
cursor = cursor.parentNode;
|
|
36942
|
+
}
|
|
36943
|
+
return false;
|
|
36944
|
+
}
|
|
36945
|
+
function mousewheelHandler(e) {
|
|
36946
|
+
var ref2 = getDeltaFromEvent(e);
|
|
36947
|
+
var deltaX = ref2[0];
|
|
36948
|
+
var deltaY = ref2[1];
|
|
36949
|
+
if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {
|
|
36950
|
+
return;
|
|
36951
|
+
}
|
|
36952
|
+
var shouldPrevent = false;
|
|
36953
|
+
if (!i.settings.useBothWheelAxes) {
|
|
36954
|
+
element.scrollTop -= deltaY * i.settings.wheelSpeed;
|
|
36955
|
+
element.scrollLeft += deltaX * i.settings.wheelSpeed;
|
|
36956
|
+
} else if (i.scrollbarYActive && !i.scrollbarXActive) {
|
|
36957
|
+
if (deltaY) {
|
|
36958
|
+
element.scrollTop -= deltaY * i.settings.wheelSpeed;
|
|
36959
|
+
} else {
|
|
36960
|
+
element.scrollTop += deltaX * i.settings.wheelSpeed;
|
|
36961
|
+
}
|
|
36962
|
+
shouldPrevent = true;
|
|
36963
|
+
} else if (i.scrollbarXActive && !i.scrollbarYActive) {
|
|
36964
|
+
if (deltaX) {
|
|
36965
|
+
element.scrollLeft += deltaX * i.settings.wheelSpeed;
|
|
36966
|
+
} else {
|
|
36967
|
+
element.scrollLeft -= deltaY * i.settings.wheelSpeed;
|
|
36968
|
+
}
|
|
36969
|
+
shouldPrevent = true;
|
|
36970
|
+
}
|
|
36971
|
+
updateGeometry(i);
|
|
36972
|
+
shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);
|
|
36973
|
+
if (shouldPrevent && !e.ctrlKey) {
|
|
36974
|
+
e.stopPropagation();
|
|
36975
|
+
e.preventDefault();
|
|
36976
|
+
}
|
|
36977
|
+
}
|
|
36978
|
+
if (typeof window.onwheel !== "undefined") {
|
|
36979
|
+
i.event.bind(element, "wheel", mousewheelHandler);
|
|
36980
|
+
} else if (typeof window.onmousewheel !== "undefined") {
|
|
36981
|
+
i.event.bind(element, "mousewheel", mousewheelHandler);
|
|
36982
|
+
}
|
|
36983
|
+
}
|
|
36984
|
+
function touch(i) {
|
|
36985
|
+
if (!env.supportsTouch && !env.supportsIePointer) {
|
|
36986
|
+
return;
|
|
36987
|
+
}
|
|
36988
|
+
var element = i.element;
|
|
36989
|
+
var state = {
|
|
36990
|
+
startOffset: {},
|
|
36991
|
+
startTime: 0,
|
|
36992
|
+
speed: {},
|
|
36993
|
+
easingLoop: null
|
|
36994
|
+
};
|
|
36995
|
+
function shouldPrevent(deltaX, deltaY) {
|
|
36996
|
+
var scrollTop = Math.floor(element.scrollTop);
|
|
36997
|
+
var scrollLeft = element.scrollLeft;
|
|
36998
|
+
var magnitudeX = Math.abs(deltaX);
|
|
36999
|
+
var magnitudeY = Math.abs(deltaY);
|
|
37000
|
+
if (magnitudeY > magnitudeX) {
|
|
37001
|
+
if (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight || deltaY > 0 && scrollTop === 0) {
|
|
37002
|
+
return window.scrollY === 0 && deltaY > 0 && env.isChrome;
|
|
37003
|
+
}
|
|
37004
|
+
} else if (magnitudeX > magnitudeY) {
|
|
37005
|
+
if (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth || deltaX > 0 && scrollLeft === 0) {
|
|
37006
|
+
return true;
|
|
37007
|
+
}
|
|
37008
|
+
}
|
|
37009
|
+
return true;
|
|
37010
|
+
}
|
|
37011
|
+
function applyTouchMove(differenceX, differenceY) {
|
|
37012
|
+
element.scrollTop -= differenceY;
|
|
37013
|
+
element.scrollLeft -= differenceX;
|
|
37014
|
+
updateGeometry(i);
|
|
37015
|
+
}
|
|
37016
|
+
function getTouch(e) {
|
|
37017
|
+
if (e.targetTouches) {
|
|
37018
|
+
return e.targetTouches[0];
|
|
37019
|
+
}
|
|
37020
|
+
return e;
|
|
37021
|
+
}
|
|
37022
|
+
function shouldHandle(e) {
|
|
37023
|
+
if (e.target === i.scrollbarX || e.target === i.scrollbarY) {
|
|
37024
|
+
return false;
|
|
37025
|
+
}
|
|
37026
|
+
if (e.pointerType && e.pointerType === "pen" && e.buttons === 0) {
|
|
37027
|
+
return false;
|
|
37028
|
+
}
|
|
37029
|
+
if (e.targetTouches && e.targetTouches.length === 1) {
|
|
37030
|
+
return true;
|
|
37031
|
+
}
|
|
37032
|
+
if (e.pointerType && e.pointerType !== "mouse" && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {
|
|
37033
|
+
return true;
|
|
37034
|
+
}
|
|
37035
|
+
return false;
|
|
37036
|
+
}
|
|
37037
|
+
function touchStart(e) {
|
|
37038
|
+
if (!shouldHandle(e)) {
|
|
37039
|
+
return;
|
|
37040
|
+
}
|
|
37041
|
+
var touch2 = getTouch(e);
|
|
37042
|
+
state.startOffset.pageX = touch2.pageX;
|
|
37043
|
+
state.startOffset.pageY = touch2.pageY;
|
|
37044
|
+
state.startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
37045
|
+
if (state.easingLoop !== null) {
|
|
37046
|
+
clearInterval(state.easingLoop);
|
|
37047
|
+
}
|
|
37048
|
+
}
|
|
37049
|
+
function shouldBeConsumedByChild(target, deltaX, deltaY) {
|
|
37050
|
+
if (!element.contains(target)) {
|
|
37051
|
+
return false;
|
|
37052
|
+
}
|
|
37053
|
+
var cursor = target;
|
|
37054
|
+
while (cursor && cursor !== element) {
|
|
37055
|
+
if (cursor.classList.contains(cls.element.consuming)) {
|
|
37056
|
+
return true;
|
|
37057
|
+
}
|
|
37058
|
+
var style = get(cursor);
|
|
37059
|
+
if (deltaY && style.overflowY.match(/(scroll|auto)/)) {
|
|
37060
|
+
var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
|
|
37061
|
+
if (maxScrollTop > 0) {
|
|
37062
|
+
if (cursor.scrollTop > 0 && deltaY < 0 || cursor.scrollTop < maxScrollTop && deltaY > 0) {
|
|
37063
|
+
return true;
|
|
37064
|
+
}
|
|
37065
|
+
}
|
|
37066
|
+
}
|
|
37067
|
+
if (deltaX && style.overflowX.match(/(scroll|auto)/)) {
|
|
37068
|
+
var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;
|
|
37069
|
+
if (maxScrollLeft > 0) {
|
|
37070
|
+
if (cursor.scrollLeft > 0 && deltaX < 0 || cursor.scrollLeft < maxScrollLeft && deltaX > 0) {
|
|
37071
|
+
return true;
|
|
37072
|
+
}
|
|
37073
|
+
}
|
|
37074
|
+
}
|
|
37075
|
+
cursor = cursor.parentNode;
|
|
37076
|
+
}
|
|
37077
|
+
return false;
|
|
37078
|
+
}
|
|
37079
|
+
function touchMove(e) {
|
|
37080
|
+
if (shouldHandle(e)) {
|
|
37081
|
+
var touch2 = getTouch(e);
|
|
37082
|
+
var currentOffset = { pageX: touch2.pageX, pageY: touch2.pageY };
|
|
37083
|
+
var differenceX = currentOffset.pageX - state.startOffset.pageX;
|
|
37084
|
+
var differenceY = currentOffset.pageY - state.startOffset.pageY;
|
|
37085
|
+
if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {
|
|
37086
|
+
return;
|
|
37087
|
+
}
|
|
37088
|
+
applyTouchMove(differenceX, differenceY);
|
|
37089
|
+
state.startOffset = currentOffset;
|
|
37090
|
+
var currentTime = (/* @__PURE__ */ new Date()).getTime();
|
|
37091
|
+
var timeGap = currentTime - state.startTime;
|
|
37092
|
+
if (timeGap > 0) {
|
|
37093
|
+
state.speed.x = differenceX / timeGap;
|
|
37094
|
+
state.speed.y = differenceY / timeGap;
|
|
37095
|
+
state.startTime = currentTime;
|
|
37096
|
+
}
|
|
37097
|
+
if (shouldPrevent(differenceX, differenceY)) {
|
|
37098
|
+
if (e.cancelable) {
|
|
37099
|
+
e.preventDefault();
|
|
37100
|
+
}
|
|
37101
|
+
}
|
|
37102
|
+
}
|
|
37103
|
+
}
|
|
37104
|
+
function touchEnd() {
|
|
37105
|
+
if (i.settings.swipeEasing) {
|
|
37106
|
+
clearInterval(state.easingLoop);
|
|
37107
|
+
state.easingLoop = setInterval(function() {
|
|
37108
|
+
if (i.isInitialized) {
|
|
37109
|
+
clearInterval(state.easingLoop);
|
|
37110
|
+
return;
|
|
37111
|
+
}
|
|
37112
|
+
if (!state.speed.x && !state.speed.y) {
|
|
37113
|
+
clearInterval(state.easingLoop);
|
|
37114
|
+
return;
|
|
37115
|
+
}
|
|
37116
|
+
if (Math.abs(state.speed.x) < 0.01 && Math.abs(state.speed.y) < 0.01) {
|
|
37117
|
+
clearInterval(state.easingLoop);
|
|
37118
|
+
return;
|
|
37119
|
+
}
|
|
37120
|
+
applyTouchMove(state.speed.x * 30, state.speed.y * 30);
|
|
37121
|
+
state.speed.x *= 0.8;
|
|
37122
|
+
state.speed.y *= 0.8;
|
|
37123
|
+
}, 10);
|
|
37124
|
+
}
|
|
37125
|
+
}
|
|
37126
|
+
if (env.supportsTouch) {
|
|
37127
|
+
i.event.bind(element, "touchstart", touchStart);
|
|
37128
|
+
i.event.bind(element, "touchmove", touchMove);
|
|
37129
|
+
i.event.bind(element, "touchend", touchEnd);
|
|
37130
|
+
} else if (env.supportsIePointer) {
|
|
37131
|
+
if (window.PointerEvent) {
|
|
37132
|
+
i.event.bind(element, "pointerdown", touchStart);
|
|
37133
|
+
i.event.bind(element, "pointermove", touchMove);
|
|
37134
|
+
i.event.bind(element, "pointerup", touchEnd);
|
|
37135
|
+
} else if (window.MSPointerEvent) {
|
|
37136
|
+
i.event.bind(element, "MSPointerDown", touchStart);
|
|
37137
|
+
i.event.bind(element, "MSPointerMove", touchMove);
|
|
37138
|
+
i.event.bind(element, "MSPointerUp", touchEnd);
|
|
37139
|
+
}
|
|
37140
|
+
}
|
|
37141
|
+
}
|
|
37142
|
+
var defaultSettings = function() {
|
|
37143
|
+
return {
|
|
37144
|
+
handlers: ["click-rail", "drag-thumb", "keyboard", "wheel", "touch"],
|
|
37145
|
+
maxScrollbarLength: null,
|
|
37146
|
+
minScrollbarLength: null,
|
|
37147
|
+
scrollingThreshold: 1e3,
|
|
37148
|
+
scrollXMarginOffset: 0,
|
|
37149
|
+
scrollYMarginOffset: 0,
|
|
37150
|
+
suppressScrollX: false,
|
|
37151
|
+
suppressScrollY: false,
|
|
37152
|
+
swipeEasing: true,
|
|
37153
|
+
useBothWheelAxes: false,
|
|
37154
|
+
wheelPropagation: true,
|
|
37155
|
+
wheelSpeed: 1
|
|
37156
|
+
};
|
|
37157
|
+
};
|
|
37158
|
+
var handlers = {
|
|
37159
|
+
"click-rail": clickRail,
|
|
37160
|
+
"drag-thumb": setupScrollHandlers,
|
|
37161
|
+
keyboard,
|
|
37162
|
+
wheel,
|
|
37163
|
+
touch
|
|
37164
|
+
};
|
|
37165
|
+
var PerfectScrollbar = function PerfectScrollbar2(element, userSettings) {
|
|
37166
|
+
var this$1$1 = this;
|
|
37167
|
+
if (userSettings === void 0) userSettings = {};
|
|
37168
|
+
if (typeof element === "string") {
|
|
37169
|
+
element = document.querySelector(element);
|
|
37170
|
+
}
|
|
37171
|
+
if (!element || !element.nodeName) {
|
|
37172
|
+
throw new Error("no element is specified to initialize PerfectScrollbar");
|
|
37173
|
+
}
|
|
37174
|
+
this.element = element;
|
|
37175
|
+
element.classList.add(cls.main);
|
|
37176
|
+
this.settings = defaultSettings();
|
|
37177
|
+
for (var key2 in userSettings) {
|
|
37178
|
+
this.settings[key2] = userSettings[key2];
|
|
37179
|
+
}
|
|
37180
|
+
this.containerWidth = null;
|
|
37181
|
+
this.containerHeight = null;
|
|
37182
|
+
this.contentWidth = null;
|
|
37183
|
+
this.contentHeight = null;
|
|
37184
|
+
var focus = function() {
|
|
37185
|
+
return element.classList.add(cls.state.focus);
|
|
37186
|
+
};
|
|
37187
|
+
var blur = function() {
|
|
37188
|
+
return element.classList.remove(cls.state.focus);
|
|
37189
|
+
};
|
|
37190
|
+
this.isRtl = get(element).direction === "rtl";
|
|
37191
|
+
if (this.isRtl === true) {
|
|
37192
|
+
element.classList.add(cls.rtl);
|
|
37193
|
+
}
|
|
37194
|
+
this.isNegativeScroll = function() {
|
|
37195
|
+
var originalScrollLeft = element.scrollLeft;
|
|
37196
|
+
var result = null;
|
|
37197
|
+
element.scrollLeft = -1;
|
|
37198
|
+
result = element.scrollLeft < 0;
|
|
37199
|
+
element.scrollLeft = originalScrollLeft;
|
|
37200
|
+
return result;
|
|
37201
|
+
}();
|
|
37202
|
+
this.negativeScrollAdjustment = this.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
|
|
37203
|
+
this.event = new EventManager();
|
|
37204
|
+
this.ownerDocument = element.ownerDocument || document;
|
|
37205
|
+
this.scrollbarXRail = div(cls.element.rail("x"));
|
|
37206
|
+
element.appendChild(this.scrollbarXRail);
|
|
37207
|
+
this.scrollbarX = div(cls.element.thumb("x"));
|
|
37208
|
+
this.scrollbarXRail.appendChild(this.scrollbarX);
|
|
37209
|
+
this.scrollbarX.setAttribute("tabindex", 0);
|
|
37210
|
+
this.event.bind(this.scrollbarX, "focus", focus);
|
|
37211
|
+
this.event.bind(this.scrollbarX, "blur", blur);
|
|
37212
|
+
this.scrollbarXActive = null;
|
|
37213
|
+
this.scrollbarXWidth = null;
|
|
37214
|
+
this.scrollbarXLeft = null;
|
|
37215
|
+
var railXStyle = get(this.scrollbarXRail);
|
|
37216
|
+
this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);
|
|
37217
|
+
if (isNaN(this.scrollbarXBottom)) {
|
|
37218
|
+
this.isScrollbarXUsingBottom = false;
|
|
37219
|
+
this.scrollbarXTop = toInt(railXStyle.top);
|
|
37220
|
+
} else {
|
|
37221
|
+
this.isScrollbarXUsingBottom = true;
|
|
37222
|
+
}
|
|
37223
|
+
this.railBorderXWidth = toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);
|
|
37224
|
+
set(this.scrollbarXRail, { display: "block" });
|
|
37225
|
+
this.railXMarginWidth = toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);
|
|
37226
|
+
set(this.scrollbarXRail, { display: "" });
|
|
37227
|
+
this.railXWidth = null;
|
|
37228
|
+
this.railXRatio = null;
|
|
37229
|
+
this.scrollbarYRail = div(cls.element.rail("y"));
|
|
37230
|
+
element.appendChild(this.scrollbarYRail);
|
|
37231
|
+
this.scrollbarY = div(cls.element.thumb("y"));
|
|
37232
|
+
this.scrollbarYRail.appendChild(this.scrollbarY);
|
|
37233
|
+
this.scrollbarY.setAttribute("tabindex", 0);
|
|
37234
|
+
this.event.bind(this.scrollbarY, "focus", focus);
|
|
37235
|
+
this.event.bind(this.scrollbarY, "blur", blur);
|
|
37236
|
+
this.scrollbarYActive = null;
|
|
37237
|
+
this.scrollbarYHeight = null;
|
|
37238
|
+
this.scrollbarYTop = null;
|
|
37239
|
+
var railYStyle = get(this.scrollbarYRail);
|
|
37240
|
+
this.scrollbarYRight = parseInt(railYStyle.right, 10);
|
|
37241
|
+
if (isNaN(this.scrollbarYRight)) {
|
|
37242
|
+
this.isScrollbarYUsingRight = false;
|
|
37243
|
+
this.scrollbarYLeft = toInt(railYStyle.left);
|
|
37244
|
+
} else {
|
|
37245
|
+
this.isScrollbarYUsingRight = true;
|
|
37246
|
+
}
|
|
37247
|
+
this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;
|
|
37248
|
+
this.railBorderYWidth = toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);
|
|
37249
|
+
set(this.scrollbarYRail, { display: "block" });
|
|
37250
|
+
this.railYMarginHeight = toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);
|
|
37251
|
+
set(this.scrollbarYRail, { display: "" });
|
|
37252
|
+
this.railYHeight = null;
|
|
37253
|
+
this.railYRatio = null;
|
|
37254
|
+
this.reach = {
|
|
37255
|
+
x: element.scrollLeft <= 0 ? "start" : element.scrollLeft >= this.contentWidth - this.containerWidth ? "end" : null,
|
|
37256
|
+
y: element.scrollTop <= 0 ? "start" : element.scrollTop >= this.contentHeight - this.containerHeight ? "end" : null
|
|
37257
|
+
};
|
|
37258
|
+
this.isAlive = true;
|
|
37259
|
+
this.settings.handlers.forEach(function(handlerName) {
|
|
37260
|
+
return handlers[handlerName](this$1$1);
|
|
37261
|
+
});
|
|
37262
|
+
this.lastScrollTop = Math.floor(element.scrollTop);
|
|
37263
|
+
this.lastScrollLeft = element.scrollLeft;
|
|
37264
|
+
this.event.bind(this.element, "scroll", function(e) {
|
|
37265
|
+
return this$1$1.onScroll(e);
|
|
37266
|
+
});
|
|
37267
|
+
updateGeometry(this);
|
|
37268
|
+
};
|
|
37269
|
+
PerfectScrollbar.prototype.update = function update() {
|
|
37270
|
+
if (!this.isAlive) {
|
|
37271
|
+
return;
|
|
37272
|
+
}
|
|
37273
|
+
this.negativeScrollAdjustment = this.isNegativeScroll ? this.element.scrollWidth - this.element.clientWidth : 0;
|
|
37274
|
+
set(this.scrollbarXRail, { display: "block" });
|
|
37275
|
+
set(this.scrollbarYRail, { display: "block" });
|
|
37276
|
+
this.railXMarginWidth = toInt(get(this.scrollbarXRail).marginLeft) + toInt(get(this.scrollbarXRail).marginRight);
|
|
37277
|
+
this.railYMarginHeight = toInt(get(this.scrollbarYRail).marginTop) + toInt(get(this.scrollbarYRail).marginBottom);
|
|
37278
|
+
set(this.scrollbarXRail, { display: "none" });
|
|
37279
|
+
set(this.scrollbarYRail, { display: "none" });
|
|
37280
|
+
updateGeometry(this);
|
|
37281
|
+
processScrollDiff(this, "top", 0, false, true);
|
|
37282
|
+
processScrollDiff(this, "left", 0, false, true);
|
|
37283
|
+
set(this.scrollbarXRail, { display: "" });
|
|
37284
|
+
set(this.scrollbarYRail, { display: "" });
|
|
37285
|
+
};
|
|
37286
|
+
PerfectScrollbar.prototype.onScroll = function onScroll(e) {
|
|
37287
|
+
if (!this.isAlive) {
|
|
37288
|
+
return;
|
|
37289
|
+
}
|
|
37290
|
+
updateGeometry(this);
|
|
37291
|
+
processScrollDiff(this, "top", this.element.scrollTop - this.lastScrollTop);
|
|
37292
|
+
processScrollDiff(this, "left", this.element.scrollLeft - this.lastScrollLeft);
|
|
37293
|
+
this.lastScrollTop = Math.floor(this.element.scrollTop);
|
|
37294
|
+
this.lastScrollLeft = this.element.scrollLeft;
|
|
37295
|
+
};
|
|
37296
|
+
PerfectScrollbar.prototype.destroy = function destroy() {
|
|
37297
|
+
if (!this.isAlive) {
|
|
37298
|
+
return;
|
|
37299
|
+
}
|
|
37300
|
+
this.event.unbindAll();
|
|
37301
|
+
remove(this.scrollbarX);
|
|
37302
|
+
remove(this.scrollbarY);
|
|
37303
|
+
remove(this.scrollbarXRail);
|
|
37304
|
+
remove(this.scrollbarYRail);
|
|
37305
|
+
this.removePsClasses();
|
|
37306
|
+
this.element = null;
|
|
37307
|
+
this.scrollbarX = null;
|
|
37308
|
+
this.scrollbarY = null;
|
|
37309
|
+
this.scrollbarXRail = null;
|
|
37310
|
+
this.scrollbarYRail = null;
|
|
37311
|
+
this.isAlive = false;
|
|
37312
|
+
};
|
|
37313
|
+
PerfectScrollbar.prototype.removePsClasses = function removePsClasses() {
|
|
37314
|
+
this.element.className = this.element.className.split(" ").filter(function(name2) {
|
|
37315
|
+
return !name2.match(/^ps([-_].+|)$/);
|
|
37316
|
+
}).join(" ");
|
|
37317
|
+
};
|
|
37318
|
+
const C = /* @__PURE__ */ defineComponent$1({
|
|
37319
|
+
__name: "PerfectScrollbar",
|
|
37320
|
+
props: {
|
|
37321
|
+
tag: { default: "div" },
|
|
37322
|
+
options: { default: () => ({}) }
|
|
37323
|
+
},
|
|
37324
|
+
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"],
|
|
37325
|
+
setup(o, { expose: n, emit: c }) {
|
|
37326
|
+
const a = o, y = c, l = ref(null), s = ref(null);
|
|
37327
|
+
watch(
|
|
37328
|
+
() => a.options,
|
|
37329
|
+
() => {
|
|
37330
|
+
i(), p();
|
|
37331
|
+
},
|
|
37332
|
+
{ deep: true }
|
|
37333
|
+
), onMounted(() => {
|
|
37334
|
+
l.value && p();
|
|
37335
|
+
}), onBeforeUnmount(() => {
|
|
37336
|
+
i();
|
|
37337
|
+
});
|
|
37338
|
+
function p() {
|
|
37339
|
+
l.value && (s.value = new PerfectScrollbar(l.value, a.options), u());
|
|
37340
|
+
}
|
|
37341
|
+
function i() {
|
|
37342
|
+
s.value && (u(false), s.value.destroy(), s.value = null);
|
|
37343
|
+
}
|
|
37344
|
+
const x = {
|
|
37345
|
+
scroll: e("scroll"),
|
|
37346
|
+
"ps-scroll-y": e("ps-scroll-y"),
|
|
37347
|
+
"ps-scroll-x": e("ps-scroll-x"),
|
|
37348
|
+
"ps-scroll-up": e("ps-scroll-up"),
|
|
37349
|
+
"ps-scroll-down": e("ps-scroll-down"),
|
|
37350
|
+
"ps-scroll-left": e("ps-scroll-left"),
|
|
37351
|
+
"ps-scroll-right": e("ps-scroll-right"),
|
|
37352
|
+
"ps-y-reach-start": e("ps-y-reach-start"),
|
|
37353
|
+
"ps-y-reach-end": e("ps-y-reach-end"),
|
|
37354
|
+
"ps-x-reach-start": e("ps-x-reach-start"),
|
|
37355
|
+
"ps-x-reach-end": e("ps-x-reach-end")
|
|
37356
|
+
};
|
|
37357
|
+
function e(r) {
|
|
37358
|
+
return function(t) {
|
|
37359
|
+
y(r, t);
|
|
37360
|
+
};
|
|
37361
|
+
}
|
|
37362
|
+
function u(r = true) {
|
|
37363
|
+
var t;
|
|
37364
|
+
(t = s.value) != null && t.element && Object.entries(x).forEach(([f, d]) => {
|
|
37365
|
+
var m, h2;
|
|
37366
|
+
r ? (m = s.value) == null || m.element.addEventListener(f, d) : (h2 = s.value) == null || h2.element.removeEventListener(f, d);
|
|
37367
|
+
});
|
|
37368
|
+
}
|
|
37369
|
+
return n({
|
|
37370
|
+
ps: s
|
|
37371
|
+
}), (r, t) => (openBlock(), createBlock(resolveDynamicComponent(r.tag), {
|
|
37372
|
+
ref_key: "scrollbar",
|
|
37373
|
+
ref: l,
|
|
37374
|
+
class: "ps"
|
|
37375
|
+
}, {
|
|
37376
|
+
default: withCtx(() => [
|
|
37377
|
+
renderSlot(r.$slots, "default")
|
|
37378
|
+
]),
|
|
37379
|
+
_: 3
|
|
37380
|
+
}, 512));
|
|
37381
|
+
}
|
|
37382
|
+
});
|
|
37383
|
+
function useSticky(_ref) {
|
|
37384
|
+
let {
|
|
37385
|
+
rootEl,
|
|
37386
|
+
isSticky,
|
|
37387
|
+
layoutItemStyles
|
|
37388
|
+
} = _ref;
|
|
37389
|
+
const isStuck = shallowRef(false);
|
|
37390
|
+
const stuckPosition = shallowRef(0);
|
|
37391
|
+
const stickyStyles = computed(() => {
|
|
37392
|
+
const side = typeof isStuck.value === "boolean" ? "top" : isStuck.value;
|
|
37393
|
+
return [isSticky.value ? {
|
|
37394
|
+
top: "auto",
|
|
37395
|
+
bottom: "auto",
|
|
37396
|
+
height: void 0
|
|
37397
|
+
} : void 0, isStuck.value ? {
|
|
37398
|
+
[side]: convertToUnit(stuckPosition.value)
|
|
37399
|
+
} : {
|
|
37400
|
+
top: layoutItemStyles.value.top
|
|
37401
|
+
}];
|
|
37402
|
+
});
|
|
37403
|
+
onMounted(() => {
|
|
37404
|
+
watch(isSticky, (val2) => {
|
|
37405
|
+
if (val2) {
|
|
37406
|
+
window.addEventListener("scroll", onScroll2, {
|
|
37407
|
+
passive: true
|
|
37408
|
+
});
|
|
37409
|
+
} else {
|
|
37410
|
+
window.removeEventListener("scroll", onScroll2);
|
|
37411
|
+
}
|
|
37412
|
+
}, {
|
|
37413
|
+
immediate: true
|
|
37414
|
+
});
|
|
37415
|
+
});
|
|
37416
|
+
onBeforeUnmount(() => {
|
|
37417
|
+
window.removeEventListener("scroll", onScroll2);
|
|
37418
|
+
});
|
|
37419
|
+
let lastScrollTop = 0;
|
|
37420
|
+
function onScroll2() {
|
|
37421
|
+
const direction = lastScrollTop > window.scrollY ? "up" : "down";
|
|
37422
|
+
const rect = rootEl.value.getBoundingClientRect();
|
|
37423
|
+
const layoutTop = parseFloat(layoutItemStyles.value.top ?? 0);
|
|
37424
|
+
const top = window.scrollY - Math.max(0, stuckPosition.value - layoutTop);
|
|
37425
|
+
const bottom = rect.height + Math.max(stuckPosition.value, layoutTop) - window.scrollY - window.innerHeight;
|
|
37426
|
+
const bodyScroll = parseFloat(getComputedStyle(rootEl.value).getPropertyValue("--v-body-scroll-y")) || 0;
|
|
37427
|
+
if (rect.height < window.innerHeight - layoutTop) {
|
|
37428
|
+
isStuck.value = "top";
|
|
37429
|
+
stuckPosition.value = layoutTop;
|
|
37430
|
+
} else if (direction === "up" && isStuck.value === "bottom" || direction === "down" && isStuck.value === "top") {
|
|
37431
|
+
stuckPosition.value = window.scrollY + rect.top - bodyScroll;
|
|
37432
|
+
isStuck.value = true;
|
|
37433
|
+
} else if (direction === "down" && bottom <= 0) {
|
|
37434
|
+
stuckPosition.value = 0;
|
|
37435
|
+
isStuck.value = "bottom";
|
|
37436
|
+
} else if (direction === "up" && top <= 0) {
|
|
37437
|
+
if (!bodyScroll) {
|
|
37438
|
+
stuckPosition.value = rect.top + top;
|
|
37439
|
+
isStuck.value = "top";
|
|
37440
|
+
} else if (isStuck.value !== "top") {
|
|
37441
|
+
stuckPosition.value = -top + bodyScroll + layoutTop;
|
|
37442
|
+
isStuck.value = "top";
|
|
37443
|
+
}
|
|
37444
|
+
}
|
|
37445
|
+
lastScrollTop = window.scrollY;
|
|
37446
|
+
}
|
|
37447
|
+
return {
|
|
37448
|
+
isStuck,
|
|
37449
|
+
stickyStyles
|
|
37450
|
+
};
|
|
37451
|
+
}
|
|
37452
|
+
const HORIZON = 100;
|
|
37453
|
+
const HISTORY = 20;
|
|
37454
|
+
function kineticEnergyToVelocity(work) {
|
|
37455
|
+
const sqrt2 = 1.41421356237;
|
|
37456
|
+
return (work < 0 ? -1 : 1) * Math.sqrt(Math.abs(work)) * sqrt2;
|
|
37457
|
+
}
|
|
37458
|
+
function calculateImpulseVelocity(samples) {
|
|
37459
|
+
if (samples.length < 2) {
|
|
37460
|
+
return 0;
|
|
37461
|
+
}
|
|
37462
|
+
if (samples.length === 2) {
|
|
37463
|
+
if (samples[1].t === samples[0].t) {
|
|
37464
|
+
return 0;
|
|
37465
|
+
}
|
|
37466
|
+
return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t);
|
|
37467
|
+
}
|
|
37468
|
+
let work = 0;
|
|
37469
|
+
for (let i = samples.length - 1; i > 0; i--) {
|
|
37470
|
+
if (samples[i].t === samples[i - 1].t) {
|
|
37471
|
+
continue;
|
|
37472
|
+
}
|
|
37473
|
+
const vprev = kineticEnergyToVelocity(work);
|
|
37474
|
+
const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t);
|
|
37475
|
+
work += (vcurr - vprev) * Math.abs(vcurr);
|
|
37476
|
+
if (i === samples.length - 1) {
|
|
37477
|
+
work *= 0.5;
|
|
37478
|
+
}
|
|
37479
|
+
}
|
|
37480
|
+
return kineticEnergyToVelocity(work) * 1e3;
|
|
37481
|
+
}
|
|
37482
|
+
function useVelocity() {
|
|
37483
|
+
const touches = {};
|
|
37484
|
+
function addMovement(e) {
|
|
37485
|
+
Array.from(e.changedTouches).forEach((touch2) => {
|
|
37486
|
+
const samples = touches[touch2.identifier] ?? (touches[touch2.identifier] = new CircularBuffer(HISTORY));
|
|
37487
|
+
samples.push([e.timeStamp, touch2]);
|
|
37488
|
+
});
|
|
37489
|
+
}
|
|
37490
|
+
function endTouch(e) {
|
|
37491
|
+
Array.from(e.changedTouches).forEach((touch2) => {
|
|
37492
|
+
delete touches[touch2.identifier];
|
|
37493
|
+
});
|
|
37494
|
+
}
|
|
37495
|
+
function getVelocity(id) {
|
|
37496
|
+
var _a;
|
|
37497
|
+
const samples = (_a = touches[id]) == null ? void 0 : _a.values().reverse();
|
|
37498
|
+
if (!samples) {
|
|
37499
|
+
throw new Error(`No samples for touch id ${id}`);
|
|
37500
|
+
}
|
|
37501
|
+
const newest = samples[0];
|
|
37502
|
+
const x = [];
|
|
37503
|
+
const y = [];
|
|
37504
|
+
for (const val2 of samples) {
|
|
37505
|
+
if (newest[0] - val2[0] > HORIZON) break;
|
|
37506
|
+
x.push({
|
|
37507
|
+
t: val2[0],
|
|
37508
|
+
d: val2[1].clientX
|
|
37509
|
+
});
|
|
37510
|
+
y.push({
|
|
37511
|
+
t: val2[0],
|
|
37512
|
+
d: val2[1].clientY
|
|
37513
|
+
});
|
|
37514
|
+
}
|
|
37515
|
+
return {
|
|
37516
|
+
x: calculateImpulseVelocity(x),
|
|
37517
|
+
y: calculateImpulseVelocity(y),
|
|
37518
|
+
get direction() {
|
|
37519
|
+
const {
|
|
37520
|
+
x: x2,
|
|
37521
|
+
y: y2
|
|
37522
|
+
} = this;
|
|
37523
|
+
const [absX, absY] = [Math.abs(x2), Math.abs(y2)];
|
|
37524
|
+
return absX > absY && x2 >= 0 ? "right" : absX > absY && x2 <= 0 ? "left" : absY > absX && y2 >= 0 ? "down" : absY > absX && y2 <= 0 ? "up" : oops$1();
|
|
37525
|
+
}
|
|
37526
|
+
};
|
|
37527
|
+
}
|
|
37528
|
+
return {
|
|
37529
|
+
addMovement,
|
|
37530
|
+
endTouch,
|
|
37531
|
+
getVelocity
|
|
37532
|
+
};
|
|
37533
|
+
}
|
|
37534
|
+
function oops$1() {
|
|
37535
|
+
throw new Error();
|
|
37536
|
+
}
|
|
37537
|
+
function useTouch(_ref) {
|
|
37538
|
+
let {
|
|
37539
|
+
el,
|
|
37540
|
+
isActive,
|
|
37541
|
+
isTemporary,
|
|
37542
|
+
width: width2,
|
|
37543
|
+
touchless,
|
|
37544
|
+
position: position2
|
|
37545
|
+
} = _ref;
|
|
37546
|
+
onMounted(() => {
|
|
37547
|
+
window.addEventListener("touchstart", onTouchstart, {
|
|
37548
|
+
passive: true
|
|
37549
|
+
});
|
|
37550
|
+
window.addEventListener("touchmove", onTouchmove, {
|
|
37551
|
+
passive: false
|
|
37552
|
+
});
|
|
37553
|
+
window.addEventListener("touchend", onTouchend, {
|
|
37554
|
+
passive: true
|
|
37555
|
+
});
|
|
37556
|
+
});
|
|
37557
|
+
onBeforeUnmount(() => {
|
|
37558
|
+
window.removeEventListener("touchstart", onTouchstart);
|
|
37559
|
+
window.removeEventListener("touchmove", onTouchmove);
|
|
37560
|
+
window.removeEventListener("touchend", onTouchend);
|
|
37561
|
+
});
|
|
37562
|
+
const isHorizontal = computed(() => ["left", "right"].includes(position2.value));
|
|
37563
|
+
const {
|
|
37564
|
+
addMovement,
|
|
37565
|
+
endTouch,
|
|
37566
|
+
getVelocity
|
|
37567
|
+
} = useVelocity();
|
|
37568
|
+
let maybeDragging = false;
|
|
37569
|
+
const isDragging = shallowRef(false);
|
|
37570
|
+
const dragProgress = shallowRef(0);
|
|
37571
|
+
const offset = shallowRef(0);
|
|
37572
|
+
let start;
|
|
37573
|
+
function getOffset2(pos, active2) {
|
|
37574
|
+
return (position2.value === "left" ? pos : position2.value === "right" ? document.documentElement.clientWidth - pos : position2.value === "top" ? pos : position2.value === "bottom" ? document.documentElement.clientHeight - pos : oops()) - (active2 ? width2.value : 0);
|
|
37575
|
+
}
|
|
37576
|
+
function getProgress(pos) {
|
|
37577
|
+
let limit = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
37578
|
+
const progress = position2.value === "left" ? (pos - offset.value) / width2.value : position2.value === "right" ? (document.documentElement.clientWidth - pos - offset.value) / width2.value : position2.value === "top" ? (pos - offset.value) / width2.value : position2.value === "bottom" ? (document.documentElement.clientHeight - pos - offset.value) / width2.value : oops();
|
|
37579
|
+
return limit ? clamp(progress) : progress;
|
|
37580
|
+
}
|
|
37581
|
+
function onTouchstart(e) {
|
|
37582
|
+
if (touchless.value) return;
|
|
37583
|
+
const touchX = e.changedTouches[0].clientX;
|
|
37584
|
+
const touchY = e.changedTouches[0].clientY;
|
|
37585
|
+
const touchZone = 25;
|
|
37586
|
+
const inTouchZone = position2.value === "left" ? touchX < touchZone : position2.value === "right" ? touchX > document.documentElement.clientWidth - touchZone : position2.value === "top" ? touchY < touchZone : position2.value === "bottom" ? touchY > document.documentElement.clientHeight - touchZone : oops();
|
|
37587
|
+
const inElement = isActive.value && (position2.value === "left" ? touchX < width2.value : position2.value === "right" ? touchX > document.documentElement.clientWidth - width2.value : position2.value === "top" ? touchY < width2.value : position2.value === "bottom" ? touchY > document.documentElement.clientHeight - width2.value : oops());
|
|
37588
|
+
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
|
37589
|
+
start = [touchX, touchY];
|
|
37590
|
+
offset.value = getOffset2(isHorizontal.value ? touchX : touchY, isActive.value);
|
|
37591
|
+
dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);
|
|
37592
|
+
maybeDragging = offset.value > -20 && offset.value < 80;
|
|
37593
|
+
endTouch(e);
|
|
37594
|
+
addMovement(e);
|
|
37595
|
+
}
|
|
37596
|
+
}
|
|
37597
|
+
function onTouchmove(e) {
|
|
37598
|
+
const touchX = e.changedTouches[0].clientX;
|
|
37599
|
+
const touchY = e.changedTouches[0].clientY;
|
|
37600
|
+
if (maybeDragging) {
|
|
37601
|
+
if (!e.cancelable) {
|
|
37602
|
+
maybeDragging = false;
|
|
37603
|
+
return;
|
|
37604
|
+
}
|
|
37605
|
+
const dx = Math.abs(touchX - start[0]);
|
|
37606
|
+
const dy = Math.abs(touchY - start[1]);
|
|
37607
|
+
const thresholdMet = isHorizontal.value ? dx > dy && dx > 3 : dy > dx && dy > 3;
|
|
37608
|
+
if (thresholdMet) {
|
|
37609
|
+
isDragging.value = true;
|
|
37610
|
+
maybeDragging = false;
|
|
37611
|
+
} else if ((isHorizontal.value ? dy : dx) > 3) {
|
|
37612
|
+
maybeDragging = false;
|
|
37613
|
+
}
|
|
37614
|
+
}
|
|
37615
|
+
if (!isDragging.value) return;
|
|
37616
|
+
e.preventDefault();
|
|
37617
|
+
addMovement(e);
|
|
37618
|
+
const progress = getProgress(isHorizontal.value ? touchX : touchY, false);
|
|
37619
|
+
dragProgress.value = Math.max(0, Math.min(1, progress));
|
|
37620
|
+
if (progress > 1) {
|
|
37621
|
+
offset.value = getOffset2(isHorizontal.value ? touchX : touchY, true);
|
|
37622
|
+
} else if (progress < 0) {
|
|
37623
|
+
offset.value = getOffset2(isHorizontal.value ? touchX : touchY, false);
|
|
37624
|
+
}
|
|
37625
|
+
}
|
|
37626
|
+
function onTouchend(e) {
|
|
37627
|
+
maybeDragging = false;
|
|
37628
|
+
if (!isDragging.value) return;
|
|
37629
|
+
addMovement(e);
|
|
37630
|
+
isDragging.value = false;
|
|
37631
|
+
const velocity2 = getVelocity(e.changedTouches[0].identifier);
|
|
37632
|
+
const vx = Math.abs(velocity2.x);
|
|
37633
|
+
const vy = Math.abs(velocity2.y);
|
|
37634
|
+
const thresholdMet = isHorizontal.value ? vx > vy && vx > 400 : vy > vx && vy > 3;
|
|
37635
|
+
if (thresholdMet) {
|
|
37636
|
+
isActive.value = velocity2.direction === ({
|
|
37637
|
+
left: "right",
|
|
37638
|
+
right: "left",
|
|
37639
|
+
top: "down",
|
|
37640
|
+
bottom: "up"
|
|
37641
|
+
}[position2.value] || oops());
|
|
37642
|
+
} else {
|
|
37643
|
+
isActive.value = dragProgress.value > 0.5;
|
|
37644
|
+
}
|
|
37645
|
+
}
|
|
37646
|
+
const dragStyles = computed(() => {
|
|
37647
|
+
return isDragging.value ? {
|
|
37648
|
+
transform: position2.value === "left" ? `translateX(calc(-100% + ${dragProgress.value * width2.value}px))` : position2.value === "right" ? `translateX(calc(100% - ${dragProgress.value * width2.value}px))` : position2.value === "top" ? `translateY(calc(-100% + ${dragProgress.value * width2.value}px))` : position2.value === "bottom" ? `translateY(calc(100% - ${dragProgress.value * width2.value}px))` : oops(),
|
|
37649
|
+
transition: "none"
|
|
37650
|
+
} : void 0;
|
|
37651
|
+
});
|
|
37652
|
+
useToggleScope(isDragging, () => {
|
|
37653
|
+
var _a, _b;
|
|
37654
|
+
const transform2 = ((_a = el.value) == null ? void 0 : _a.style.transform) ?? null;
|
|
37655
|
+
const transition = ((_b = el.value) == null ? void 0 : _b.style.transition) ?? null;
|
|
37656
|
+
watchEffect(() => {
|
|
37657
|
+
var _a2, _b2, _c, _d;
|
|
37658
|
+
(_b2 = el.value) == null ? void 0 : _b2.style.setProperty("transform", ((_a2 = dragStyles.value) == null ? void 0 : _a2.transform) || "none");
|
|
37659
|
+
(_d = el.value) == null ? void 0 : _d.style.setProperty("transition", ((_c = dragStyles.value) == null ? void 0 : _c.transition) || null);
|
|
37660
|
+
});
|
|
37661
|
+
onScopeDispose(() => {
|
|
37662
|
+
var _a2, _b2;
|
|
37663
|
+
(_a2 = el.value) == null ? void 0 : _a2.style.setProperty("transform", transform2);
|
|
37664
|
+
(_b2 = el.value) == null ? void 0 : _b2.style.setProperty("transition", transition);
|
|
37665
|
+
});
|
|
37666
|
+
});
|
|
37667
|
+
return {
|
|
37668
|
+
isDragging,
|
|
37669
|
+
dragProgress,
|
|
37670
|
+
dragStyles
|
|
37671
|
+
};
|
|
37672
|
+
}
|
|
37673
|
+
function oops() {
|
|
37674
|
+
throw new Error();
|
|
37675
|
+
}
|
|
37676
|
+
const locations = ["start", "end", "left", "right", "top", "bottom"];
|
|
37677
|
+
const makeVNavigationDrawerProps = propsFactory({
|
|
37678
|
+
color: String,
|
|
37679
|
+
disableResizeWatcher: Boolean,
|
|
37680
|
+
disableRouteWatcher: Boolean,
|
|
37681
|
+
expandOnHover: Boolean,
|
|
37682
|
+
floating: Boolean,
|
|
37683
|
+
modelValue: {
|
|
37684
|
+
type: Boolean,
|
|
37685
|
+
default: null
|
|
37686
|
+
},
|
|
37687
|
+
permanent: Boolean,
|
|
37688
|
+
rail: {
|
|
37689
|
+
type: Boolean,
|
|
37690
|
+
default: null
|
|
37691
|
+
},
|
|
37692
|
+
railWidth: {
|
|
37693
|
+
type: [Number, String],
|
|
37694
|
+
default: 56
|
|
37695
|
+
},
|
|
37696
|
+
scrim: {
|
|
37697
|
+
type: [Boolean, String],
|
|
37698
|
+
default: true
|
|
37699
|
+
},
|
|
37700
|
+
image: String,
|
|
37701
|
+
temporary: Boolean,
|
|
37702
|
+
persistent: Boolean,
|
|
37703
|
+
touchless: Boolean,
|
|
37704
|
+
width: {
|
|
37705
|
+
type: [Number, String],
|
|
37706
|
+
default: 256
|
|
37707
|
+
},
|
|
37708
|
+
location: {
|
|
37709
|
+
type: String,
|
|
37710
|
+
default: "start",
|
|
37711
|
+
validator: (value2) => locations.includes(value2)
|
|
37712
|
+
},
|
|
37713
|
+
sticky: Boolean,
|
|
37714
|
+
...makeBorderProps(),
|
|
37715
|
+
...makeComponentProps(),
|
|
37716
|
+
...makeDelayProps(),
|
|
37717
|
+
...makeDisplayProps({
|
|
37718
|
+
mobile: null
|
|
37719
|
+
}),
|
|
37720
|
+
...makeElevationProps(),
|
|
37721
|
+
...makeLayoutItemProps(),
|
|
37722
|
+
...makeRoundedProps(),
|
|
37723
|
+
...makeTagProps({
|
|
37724
|
+
tag: "nav"
|
|
37725
|
+
}),
|
|
37726
|
+
...makeThemeProps()
|
|
37727
|
+
}, "VNavigationDrawer");
|
|
37728
|
+
const VNavigationDrawer = genericComponent()({
|
|
37729
|
+
name: "VNavigationDrawer",
|
|
37730
|
+
props: makeVNavigationDrawerProps(),
|
|
37731
|
+
emits: {
|
|
37732
|
+
"update:modelValue": (val2) => true,
|
|
37733
|
+
"update:rail": (val2) => true
|
|
37734
|
+
},
|
|
37735
|
+
setup(props, _ref) {
|
|
37736
|
+
let {
|
|
37737
|
+
attrs,
|
|
37738
|
+
emit,
|
|
37739
|
+
slots
|
|
37740
|
+
} = _ref;
|
|
37741
|
+
const {
|
|
37742
|
+
isRtl
|
|
37743
|
+
} = useRtl();
|
|
37744
|
+
const {
|
|
37745
|
+
themeClasses
|
|
37746
|
+
} = provideTheme(props);
|
|
37747
|
+
const {
|
|
37748
|
+
borderClasses
|
|
37749
|
+
} = useBorder(props);
|
|
37750
|
+
const {
|
|
37751
|
+
backgroundColorClasses,
|
|
37752
|
+
backgroundColorStyles
|
|
37753
|
+
} = useBackgroundColor(() => props.color);
|
|
37754
|
+
const {
|
|
37755
|
+
elevationClasses
|
|
37756
|
+
} = useElevation(props);
|
|
37757
|
+
const {
|
|
37758
|
+
displayClasses,
|
|
37759
|
+
mobile
|
|
37760
|
+
} = useDisplay(props);
|
|
37761
|
+
const {
|
|
37762
|
+
roundedClasses
|
|
37763
|
+
} = useRounded(props);
|
|
37764
|
+
const router = useRouter();
|
|
37765
|
+
const isActive = useProxiedModel(props, "modelValue", null, (v) => !!v);
|
|
37766
|
+
const {
|
|
37767
|
+
ssrBootStyles
|
|
37768
|
+
} = useSsrBoot();
|
|
37769
|
+
const {
|
|
37770
|
+
scopeId
|
|
37771
|
+
} = useScopeId();
|
|
37772
|
+
const rootEl = ref();
|
|
37773
|
+
const isHovering = shallowRef(false);
|
|
37774
|
+
const {
|
|
37775
|
+
runOpenDelay,
|
|
37776
|
+
runCloseDelay
|
|
37777
|
+
} = useDelay(props, (value2) => {
|
|
37778
|
+
isHovering.value = value2;
|
|
37779
|
+
});
|
|
37780
|
+
const width2 = computed(() => {
|
|
37781
|
+
return props.rail && props.expandOnHover && isHovering.value ? Number(props.width) : Number(props.rail ? props.railWidth : props.width);
|
|
37782
|
+
});
|
|
37783
|
+
const location = computed(() => {
|
|
37784
|
+
return toPhysical(props.location, isRtl.value);
|
|
37785
|
+
});
|
|
37786
|
+
const isPersistent = toRef(() => props.persistent);
|
|
37787
|
+
const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary));
|
|
37788
|
+
const isSticky = computed(() => props.sticky && !isTemporary.value && location.value !== "bottom");
|
|
37789
|
+
useToggleScope(() => props.expandOnHover && props.rail != null, () => {
|
|
37790
|
+
watch(isHovering, (val2) => emit("update:rail", !val2));
|
|
37791
|
+
});
|
|
37792
|
+
useToggleScope(() => !props.disableResizeWatcher, () => {
|
|
37793
|
+
watch(isTemporary, (val2) => !props.permanent && nextTick(() => isActive.value = !val2));
|
|
37794
|
+
});
|
|
37795
|
+
useToggleScope(() => !props.disableRouteWatcher && !!router, () => {
|
|
37796
|
+
watch(router.currentRoute, () => isTemporary.value && (isActive.value = false));
|
|
37797
|
+
});
|
|
37798
|
+
watch(() => props.permanent, (val2) => {
|
|
37799
|
+
if (val2) isActive.value = true;
|
|
37800
|
+
});
|
|
37801
|
+
if (props.modelValue == null && !isTemporary.value) {
|
|
37802
|
+
isActive.value = props.permanent || !mobile.value;
|
|
37803
|
+
}
|
|
37804
|
+
const {
|
|
37805
|
+
isDragging,
|
|
37806
|
+
dragProgress
|
|
37807
|
+
} = useTouch({
|
|
37808
|
+
el: rootEl,
|
|
37809
|
+
isActive,
|
|
37810
|
+
isTemporary,
|
|
37811
|
+
width: width2,
|
|
37812
|
+
touchless: toRef(() => props.touchless),
|
|
37813
|
+
position: location
|
|
37814
|
+
});
|
|
37815
|
+
const layoutSize = computed(() => {
|
|
37816
|
+
const size = isTemporary.value ? 0 : props.rail && props.expandOnHover ? Number(props.railWidth) : width2.value;
|
|
37817
|
+
return isDragging.value ? size * dragProgress.value : size;
|
|
37818
|
+
});
|
|
37819
|
+
const {
|
|
37820
|
+
layoutItemStyles,
|
|
37821
|
+
layoutItemScrimStyles
|
|
37822
|
+
} = useLayoutItem({
|
|
37823
|
+
id: props.name,
|
|
37824
|
+
order: computed(() => parseInt(props.order, 10)),
|
|
37825
|
+
position: location,
|
|
37826
|
+
layoutSize,
|
|
37827
|
+
elementSize: width2,
|
|
37828
|
+
active: readonly(isActive),
|
|
37829
|
+
disableTransitions: toRef(() => isDragging.value),
|
|
37830
|
+
absolute: computed(() => (
|
|
37831
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
37832
|
+
props.absolute || isSticky.value && typeof isStuck.value !== "string"
|
|
37833
|
+
))
|
|
37834
|
+
});
|
|
37835
|
+
const {
|
|
37836
|
+
isStuck,
|
|
37837
|
+
stickyStyles
|
|
37838
|
+
} = useSticky({
|
|
37839
|
+
rootEl,
|
|
37840
|
+
isSticky,
|
|
37841
|
+
layoutItemStyles
|
|
37842
|
+
});
|
|
37843
|
+
const scrimColor = useBackgroundColor(() => {
|
|
37844
|
+
return typeof props.scrim === "string" ? props.scrim : null;
|
|
37845
|
+
});
|
|
37846
|
+
const scrimStyles = computed(() => ({
|
|
37847
|
+
...isDragging.value ? {
|
|
37848
|
+
opacity: dragProgress.value * 0.2,
|
|
37849
|
+
transition: "none"
|
|
37850
|
+
} : void 0,
|
|
37851
|
+
...layoutItemScrimStyles.value
|
|
37852
|
+
}));
|
|
37853
|
+
provideDefaults({
|
|
37854
|
+
VList: {
|
|
37855
|
+
bgColor: "transparent"
|
|
37856
|
+
}
|
|
37857
|
+
});
|
|
37858
|
+
useRender(() => {
|
|
37859
|
+
const hasImage = slots.image || props.image;
|
|
37860
|
+
return createElementVNode(Fragment, null, [createVNode(props.tag, mergeProps({
|
|
37861
|
+
"ref": rootEl,
|
|
37862
|
+
"onMouseenter": runOpenDelay,
|
|
37863
|
+
"onMouseleave": runCloseDelay,
|
|
37864
|
+
"class": ["v-navigation-drawer", `v-navigation-drawer--${location.value}`, {
|
|
37865
|
+
"v-navigation-drawer--expand-on-hover": props.expandOnHover,
|
|
37866
|
+
"v-navigation-drawer--floating": props.floating,
|
|
37867
|
+
"v-navigation-drawer--is-hovering": isHovering.value,
|
|
37868
|
+
"v-navigation-drawer--rail": props.rail,
|
|
37869
|
+
"v-navigation-drawer--temporary": isTemporary.value,
|
|
37870
|
+
"v-navigation-drawer--persistent": isPersistent.value,
|
|
37871
|
+
"v-navigation-drawer--active": isActive.value,
|
|
37872
|
+
"v-navigation-drawer--sticky": isSticky.value
|
|
37873
|
+
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
37874
|
+
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]
|
|
37875
|
+
}, scopeId, attrs), {
|
|
37876
|
+
default: () => {
|
|
37877
|
+
var _a, _b, _c;
|
|
37878
|
+
return [hasImage && createElementVNode("div", {
|
|
37879
|
+
"key": "image",
|
|
37880
|
+
"class": "v-navigation-drawer__img"
|
|
37881
|
+
}, [!slots.image ? createVNode(VImg, {
|
|
37882
|
+
"key": "image-img",
|
|
37883
|
+
"alt": "",
|
|
37884
|
+
"cover": true,
|
|
37885
|
+
"height": "inherit",
|
|
37886
|
+
"src": props.image
|
|
37887
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
37888
|
+
"key": "image-defaults",
|
|
37889
|
+
"disabled": !props.image,
|
|
37890
|
+
"defaults": {
|
|
37891
|
+
VImg: {
|
|
37892
|
+
alt: "",
|
|
37893
|
+
cover: true,
|
|
37894
|
+
height: "inherit",
|
|
37895
|
+
src: props.image
|
|
37896
|
+
}
|
|
37897
|
+
}
|
|
37898
|
+
}, slots.image)]), slots.prepend && createElementVNode("div", {
|
|
37899
|
+
"class": "v-navigation-drawer__prepend"
|
|
37900
|
+
}, [(_a = slots.prepend) == null ? void 0 : _a.call(slots)]), createElementVNode("div", {
|
|
37901
|
+
"class": "v-navigation-drawer__content"
|
|
37902
|
+
}, [(_b = slots.default) == null ? void 0 : _b.call(slots)]), slots.append && createElementVNode("div", {
|
|
37903
|
+
"class": "v-navigation-drawer__append"
|
|
37904
|
+
}, [(_c = slots.append) == null ? void 0 : _c.call(slots)])];
|
|
37905
|
+
}
|
|
37906
|
+
}), createVNode(Transition, {
|
|
37907
|
+
"name": "fade-transition"
|
|
37908
|
+
}, {
|
|
37909
|
+
default: () => [isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && createElementVNode("div", mergeProps({
|
|
37910
|
+
"class": ["v-navigation-drawer__scrim", scrimColor.backgroundColorClasses.value],
|
|
37911
|
+
"style": [scrimStyles.value, scrimColor.backgroundColorStyles.value],
|
|
37912
|
+
"onClick": () => {
|
|
37913
|
+
if (isPersistent.value) return;
|
|
37914
|
+
isActive.value = false;
|
|
37915
|
+
}
|
|
37916
|
+
}, scopeId), null)]
|
|
37917
|
+
})]);
|
|
37918
|
+
});
|
|
37919
|
+
return {
|
|
37920
|
+
isStuck
|
|
37921
|
+
};
|
|
37922
|
+
}
|
|
37923
|
+
});
|
|
37924
|
+
const _hoisted_1$1 = { class: "logo d-flex align-center pa-4" };
|
|
37925
|
+
const _hoisted_2$1 = ["src"];
|
|
37926
|
+
const _hoisted_3$1 = {
|
|
37927
|
+
key: 1,
|
|
37928
|
+
class: "logo-text text-h6 ms-2"
|
|
37929
|
+
};
|
|
37930
|
+
const _hoisted_4$1 = ["src"];
|
|
37931
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent$1({
|
|
37932
|
+
__name: "AppSidebar",
|
|
37933
|
+
props: {
|
|
37934
|
+
menuItems: { default: () => [] },
|
|
37935
|
+
logo: {},
|
|
37936
|
+
logoLight: {},
|
|
37937
|
+
logoText: {},
|
|
37938
|
+
miniSidebar: { type: Boolean, default: false },
|
|
37939
|
+
permanent: { type: Boolean, default: true },
|
|
37940
|
+
temporary: { type: Boolean, default: false },
|
|
37941
|
+
rail: { type: Boolean, default: false },
|
|
37942
|
+
location: { default: "left" },
|
|
37943
|
+
width: { default: 265 },
|
|
37944
|
+
railWidth: { default: 75 }
|
|
37945
|
+
},
|
|
37946
|
+
setup(__props) {
|
|
37947
|
+
const props = __props;
|
|
37948
|
+
const customizer = useCustomizerStore();
|
|
37949
|
+
const route = useRoute$1();
|
|
37950
|
+
const router = useRouter$1();
|
|
37951
|
+
const isMini = computed(() => props.miniSidebar || customizer.mini_sidebar);
|
|
37952
|
+
const drawer = computed({
|
|
37953
|
+
get: () => customizer.Sidebar_drawer,
|
|
37954
|
+
set: (val2) => customizer.SET_SIDEBAR_DRAWER(val2)
|
|
37955
|
+
});
|
|
37956
|
+
const navigationDrawerWidth = computed(
|
|
37957
|
+
() => isMini.value ? props.railWidth : props.width
|
|
37958
|
+
);
|
|
37959
|
+
const handleClick = (item) => {
|
|
37960
|
+
if (item.disabled) return;
|
|
37961
|
+
if (item.to) {
|
|
37962
|
+
router.push(item.to);
|
|
37963
|
+
} else if (item.href) {
|
|
37964
|
+
window.open(item.href, "_blank");
|
|
37965
|
+
}
|
|
37966
|
+
};
|
|
37967
|
+
const isActive = (item) => {
|
|
37968
|
+
if (!item.to) return false;
|
|
37969
|
+
return route.path === item.to || route.path.startsWith(item.to + "/");
|
|
37970
|
+
};
|
|
37971
|
+
const expandOnHover = computed(() => isMini.value && !drawer.value);
|
|
37972
|
+
return (_ctx, _cache) => {
|
|
37973
|
+
return openBlock(), createBlock(VNavigationDrawer, {
|
|
37974
|
+
modelValue: drawer.value,
|
|
37975
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => drawer.value = $event),
|
|
37976
|
+
permanent: __props.permanent && !__props.temporary,
|
|
37977
|
+
temporary: __props.temporary,
|
|
37978
|
+
rail: __props.rail || isMini.value && !expandOnHover.value,
|
|
37979
|
+
"expand-on-hover": expandOnHover.value,
|
|
37980
|
+
location: __props.location,
|
|
37981
|
+
width: navigationDrawerWidth.value,
|
|
37982
|
+
class: normalizeClass([["leftSidebar", { "mini-sidebar": isMini.value }], "border-0"])
|
|
37983
|
+
}, {
|
|
37984
|
+
default: withCtx(() => [
|
|
37985
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
37986
|
+
__props.logo || __props.logoText ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
37987
|
+
__props.logo && !isMini.value ? (openBlock(), createElementBlock("img", {
|
|
37988
|
+
key: 0,
|
|
37989
|
+
src: unref(customizer).themeMode === "dark" && __props.logoLight ? __props.logoLight : __props.logo,
|
|
37990
|
+
alt: "Logo",
|
|
37991
|
+
class: "logo-img",
|
|
37992
|
+
style: { "max-height": "40px", "max-width": "100%" }
|
|
37993
|
+
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
37994
|
+
__props.logoText && !isMini.value ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(__props.logoText), 1)) : createCommentVNode("", true),
|
|
37995
|
+
__props.logo && isMini.value ? (openBlock(), createElementBlock("img", {
|
|
37996
|
+
key: 2,
|
|
37997
|
+
src: unref(customizer).themeMode === "dark" && __props.logoLight ? __props.logoLight : __props.logo,
|
|
37998
|
+
alt: "Logo",
|
|
37999
|
+
class: "logo-img-mini",
|
|
38000
|
+
style: { "height": "40px", "width": "40px", "object-fit": "contain" }
|
|
38001
|
+
}, null, 8, _hoisted_4$1)) : createCommentVNode("", true)
|
|
38002
|
+
], 64)) : (openBlock(), createBlock(VSpacer, { key: 1 }))
|
|
38003
|
+
]),
|
|
38004
|
+
createVNode(VDivider),
|
|
38005
|
+
createVNode(unref(C), {
|
|
38006
|
+
class: "scrollnavbar",
|
|
38007
|
+
options: { wheelSpeed: 1, swipeEasing: true, suppressScrollX: true }
|
|
38008
|
+
}, {
|
|
38009
|
+
default: withCtx(() => [
|
|
38010
|
+
createVNode(VList, {
|
|
38011
|
+
lines: false,
|
|
38012
|
+
class: "pa-0"
|
|
38013
|
+
}, {
|
|
38014
|
+
default: withCtx(() => [
|
|
38015
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.menuItems, (item, index2) => {
|
|
38016
|
+
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
38017
|
+
item.divider ? (openBlock(), createBlock(VDivider, {
|
|
38018
|
+
key: 0,
|
|
38019
|
+
class: "my-2"
|
|
38020
|
+
})) : item.items && item.items.length > 0 ? (openBlock(), createBlock(VListGroup, {
|
|
38021
|
+
key: 1,
|
|
38022
|
+
value: item.items.some((child) => isActive(child))
|
|
38023
|
+
}, {
|
|
38024
|
+
activator: withCtx(({ props: groupProps }) => [
|
|
38025
|
+
createVNode(VListItem, mergeProps({ ref_for: true }, groupProps, {
|
|
38026
|
+
disabled: item.disabled,
|
|
38027
|
+
"prepend-icon": item.icon
|
|
38028
|
+
}), createSlots({
|
|
38029
|
+
default: withCtx(() => [
|
|
38030
|
+
createVNode(VListItemTitle, null, {
|
|
38031
|
+
default: withCtx(() => [
|
|
38032
|
+
createTextVNode(toDisplayString(item.title), 1)
|
|
38033
|
+
]),
|
|
38034
|
+
_: 2
|
|
38035
|
+
}, 1024)
|
|
38036
|
+
]),
|
|
38037
|
+
_: 2
|
|
38038
|
+
}, [
|
|
38039
|
+
item.chip ? {
|
|
38040
|
+
name: "append",
|
|
38041
|
+
fn: withCtx(() => [
|
|
38042
|
+
createVNode(VChip, {
|
|
38043
|
+
color: item.chip.color || "primary",
|
|
38044
|
+
size: "small",
|
|
38045
|
+
class: "ms-2"
|
|
38046
|
+
}, {
|
|
38047
|
+
default: withCtx(() => [
|
|
38048
|
+
createTextVNode(toDisplayString(item.chip.content), 1)
|
|
38049
|
+
]),
|
|
38050
|
+
_: 2
|
|
38051
|
+
}, 1032, ["color"])
|
|
38052
|
+
]),
|
|
38053
|
+
key: "0"
|
|
38054
|
+
} : void 0
|
|
38055
|
+
]), 1040, ["disabled", "prepend-icon"])
|
|
38056
|
+
]),
|
|
38057
|
+
default: withCtx(() => [
|
|
38058
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (child, childIndex) => {
|
|
38059
|
+
return openBlock(), createBlock(VListItem, {
|
|
38060
|
+
key: childIndex,
|
|
38061
|
+
to: child.to,
|
|
38062
|
+
href: child.href,
|
|
38063
|
+
disabled: child.disabled,
|
|
38064
|
+
active: isActive(child),
|
|
38065
|
+
"prepend-icon": child.icon,
|
|
38066
|
+
onClick: ($event) => handleClick(child)
|
|
38067
|
+
}, createSlots({
|
|
38068
|
+
default: withCtx(() => [
|
|
38069
|
+
createVNode(VListItemTitle, null, {
|
|
38070
|
+
default: withCtx(() => [
|
|
38071
|
+
createTextVNode(toDisplayString(child.title), 1)
|
|
38072
|
+
]),
|
|
38073
|
+
_: 2
|
|
38074
|
+
}, 1024)
|
|
38075
|
+
]),
|
|
38076
|
+
_: 2
|
|
38077
|
+
}, [
|
|
38078
|
+
child.chip ? {
|
|
38079
|
+
name: "append",
|
|
38080
|
+
fn: withCtx(() => [
|
|
38081
|
+
createVNode(VChip, {
|
|
38082
|
+
color: child.chip.color || "primary",
|
|
38083
|
+
size: "small",
|
|
38084
|
+
class: "ms-2"
|
|
38085
|
+
}, {
|
|
38086
|
+
default: withCtx(() => [
|
|
38087
|
+
createTextVNode(toDisplayString(child.chip.content), 1)
|
|
38088
|
+
]),
|
|
38089
|
+
_: 2
|
|
38090
|
+
}, 1032, ["color"])
|
|
38091
|
+
]),
|
|
38092
|
+
key: "0"
|
|
38093
|
+
} : void 0
|
|
38094
|
+
]), 1032, ["to", "href", "disabled", "active", "prepend-icon", "onClick"]);
|
|
38095
|
+
}), 128))
|
|
38096
|
+
]),
|
|
38097
|
+
_: 2
|
|
38098
|
+
}, 1032, ["value"])) : (openBlock(), createBlock(VListItem, {
|
|
38099
|
+
key: 2,
|
|
38100
|
+
to: item.to,
|
|
38101
|
+
href: item.href,
|
|
38102
|
+
disabled: item.disabled,
|
|
38103
|
+
active: isActive(item),
|
|
38104
|
+
"prepend-icon": item.icon,
|
|
38105
|
+
onClick: ($event) => handleClick(item)
|
|
38106
|
+
}, createSlots({
|
|
38107
|
+
default: withCtx(() => [
|
|
38108
|
+
createVNode(VListItemTitle, null, {
|
|
38109
|
+
default: withCtx(() => [
|
|
38110
|
+
createTextVNode(toDisplayString(item.title), 1)
|
|
38111
|
+
]),
|
|
38112
|
+
_: 2
|
|
38113
|
+
}, 1024)
|
|
38114
|
+
]),
|
|
38115
|
+
_: 2
|
|
38116
|
+
}, [
|
|
38117
|
+
item.chip ? {
|
|
38118
|
+
name: "append",
|
|
38119
|
+
fn: withCtx(() => [
|
|
38120
|
+
createVNode(VChip, {
|
|
38121
|
+
color: item.chip.color || "primary",
|
|
38122
|
+
size: "small",
|
|
38123
|
+
class: "ms-2"
|
|
38124
|
+
}, {
|
|
38125
|
+
default: withCtx(() => [
|
|
38126
|
+
createTextVNode(toDisplayString(item.chip.content), 1)
|
|
38127
|
+
]),
|
|
38128
|
+
_: 2
|
|
38129
|
+
}, 1032, ["color"])
|
|
38130
|
+
]),
|
|
38131
|
+
key: "0"
|
|
38132
|
+
} : void 0
|
|
38133
|
+
]), 1032, ["to", "href", "disabled", "active", "prepend-icon", "onClick"]))
|
|
38134
|
+
], 64);
|
|
38135
|
+
}), 128))
|
|
38136
|
+
]),
|
|
38137
|
+
_: 1
|
|
38138
|
+
})
|
|
38139
|
+
]),
|
|
38140
|
+
_: 1
|
|
38141
|
+
})
|
|
38142
|
+
]),
|
|
38143
|
+
_: 1
|
|
38144
|
+
}, 8, ["modelValue", "permanent", "temporary", "rail", "expand-on-hover", "location", "width", "class"]);
|
|
38145
|
+
};
|
|
38146
|
+
}
|
|
38147
|
+
});
|
|
38148
|
+
const AppSidebar = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__scopeId", "data-v-b3040226"]]);
|
|
38149
|
+
const makeVToolbarTitleProps = propsFactory({
|
|
38150
|
+
text: String,
|
|
38151
|
+
...makeComponentProps(),
|
|
38152
|
+
...makeTagProps()
|
|
38153
|
+
}, "VToolbarTitle");
|
|
38154
|
+
const VToolbarTitle = genericComponent()({
|
|
38155
|
+
name: "VToolbarTitle",
|
|
38156
|
+
props: makeVToolbarTitleProps(),
|
|
38157
|
+
setup(props, _ref) {
|
|
38158
|
+
let {
|
|
38159
|
+
slots
|
|
38160
|
+
} = _ref;
|
|
38161
|
+
useRender(() => {
|
|
38162
|
+
const hasText = !!(slots.default || slots.text || props.text);
|
|
38163
|
+
return createVNode(props.tag, {
|
|
38164
|
+
"class": normalizeClass(["v-toolbar-title", props.class]),
|
|
38165
|
+
"style": normalizeStyle(props.style)
|
|
38166
|
+
}, {
|
|
38167
|
+
default: () => {
|
|
38168
|
+
var _a;
|
|
38169
|
+
return [hasText && createElementVNode("div", {
|
|
38170
|
+
"class": "v-toolbar-title__placeholder"
|
|
38171
|
+
}, [slots.text ? slots.text() : props.text, (_a = slots.default) == null ? void 0 : _a.call(slots)])];
|
|
38172
|
+
}
|
|
38173
|
+
});
|
|
38174
|
+
});
|
|
38175
|
+
return {};
|
|
38176
|
+
}
|
|
38177
|
+
});
|
|
38178
|
+
const allowedDensities = [null, "prominent", "default", "comfortable", "compact"];
|
|
38179
|
+
const makeVToolbarProps = propsFactory({
|
|
38180
|
+
absolute: Boolean,
|
|
38181
|
+
collapse: Boolean,
|
|
38182
|
+
color: String,
|
|
38183
|
+
density: {
|
|
38184
|
+
type: String,
|
|
38185
|
+
default: "default",
|
|
38186
|
+
validator: (v) => allowedDensities.includes(v)
|
|
38187
|
+
},
|
|
38188
|
+
extended: {
|
|
38189
|
+
type: Boolean,
|
|
38190
|
+
default: null
|
|
38191
|
+
},
|
|
38192
|
+
extensionHeight: {
|
|
38193
|
+
type: [Number, String],
|
|
38194
|
+
default: 48
|
|
38195
|
+
},
|
|
38196
|
+
flat: Boolean,
|
|
38197
|
+
floating: Boolean,
|
|
38198
|
+
height: {
|
|
38199
|
+
type: [Number, String],
|
|
38200
|
+
default: 64
|
|
38201
|
+
},
|
|
38202
|
+
image: String,
|
|
38203
|
+
title: String,
|
|
38204
|
+
...makeBorderProps(),
|
|
38205
|
+
...makeComponentProps(),
|
|
38206
|
+
...makeElevationProps(),
|
|
38207
|
+
...makeRoundedProps(),
|
|
38208
|
+
...makeTagProps({
|
|
38209
|
+
tag: "header"
|
|
38210
|
+
}),
|
|
38211
|
+
...makeThemeProps()
|
|
38212
|
+
}, "VToolbar");
|
|
38213
|
+
const VToolbar = genericComponent()({
|
|
38214
|
+
name: "VToolbar",
|
|
38215
|
+
props: makeVToolbarProps(),
|
|
38216
|
+
setup(props, _ref) {
|
|
38217
|
+
var _a;
|
|
38218
|
+
let {
|
|
38219
|
+
slots
|
|
38220
|
+
} = _ref;
|
|
38221
|
+
const {
|
|
38222
|
+
backgroundColorClasses,
|
|
38223
|
+
backgroundColorStyles
|
|
38224
|
+
} = useBackgroundColor(() => props.color);
|
|
38225
|
+
const {
|
|
38226
|
+
borderClasses
|
|
38227
|
+
} = useBorder(props);
|
|
38228
|
+
const {
|
|
38229
|
+
elevationClasses
|
|
38230
|
+
} = useElevation(props);
|
|
38231
|
+
const {
|
|
38232
|
+
roundedClasses
|
|
38233
|
+
} = useRounded(props);
|
|
38234
|
+
const {
|
|
38235
|
+
themeClasses
|
|
38236
|
+
} = provideTheme(props);
|
|
38237
|
+
const {
|
|
38238
|
+
rtlClasses
|
|
38239
|
+
} = useRtl();
|
|
38240
|
+
const isExtended = shallowRef(props.extended === null ? !!((_a = slots.extension) == null ? void 0 : _a.call(slots)) : props.extended);
|
|
38241
|
+
const contentHeight = computed(() => parseInt(Number(props.height) + (props.density === "prominent" ? Number(props.height) : 0) - (props.density === "comfortable" ? 8 : 0) - (props.density === "compact" ? 16 : 0), 10));
|
|
38242
|
+
const extensionHeight = computed(() => isExtended.value ? parseInt(Number(props.extensionHeight) + (props.density === "prominent" ? Number(props.extensionHeight) : 0) - (props.density === "comfortable" ? 4 : 0) - (props.density === "compact" ? 8 : 0), 10) : 0);
|
|
38243
|
+
provideDefaults({
|
|
38244
|
+
VBtn: {
|
|
38245
|
+
variant: "text"
|
|
38246
|
+
}
|
|
38247
|
+
});
|
|
38248
|
+
useRender(() => {
|
|
38249
|
+
var _a2;
|
|
38250
|
+
const hasTitle = !!(props.title || slots.title);
|
|
38251
|
+
const hasImage = !!(slots.image || props.image);
|
|
38252
|
+
const extension = (_a2 = slots.extension) == null ? void 0 : _a2.call(slots);
|
|
38253
|
+
isExtended.value = props.extended === null ? !!extension : props.extended;
|
|
38254
|
+
return createVNode(props.tag, {
|
|
38255
|
+
"class": normalizeClass(["v-toolbar", {
|
|
38256
|
+
"v-toolbar--absolute": props.absolute,
|
|
38257
|
+
"v-toolbar--collapse": props.collapse,
|
|
38258
|
+
"v-toolbar--flat": props.flat,
|
|
38259
|
+
"v-toolbar--floating": props.floating,
|
|
38260
|
+
[`v-toolbar--density-${props.density}`]: true
|
|
38261
|
+
}, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class]),
|
|
38262
|
+
"style": normalizeStyle([backgroundColorStyles.value, props.style])
|
|
38263
|
+
}, {
|
|
38264
|
+
default: () => [hasImage && createElementVNode("div", {
|
|
38265
|
+
"key": "image",
|
|
38266
|
+
"class": "v-toolbar__image"
|
|
38267
|
+
}, [!slots.image ? createVNode(VImg, {
|
|
38268
|
+
"key": "image-img",
|
|
38269
|
+
"cover": true,
|
|
38270
|
+
"src": props.image
|
|
38271
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
38272
|
+
"key": "image-defaults",
|
|
38273
|
+
"disabled": !props.image,
|
|
38274
|
+
"defaults": {
|
|
38275
|
+
VImg: {
|
|
38276
|
+
cover: true,
|
|
38277
|
+
src: props.image
|
|
38278
|
+
}
|
|
38279
|
+
}
|
|
38280
|
+
}, slots.image)]), createVNode(VDefaultsProvider, {
|
|
38281
|
+
"defaults": {
|
|
38282
|
+
VTabs: {
|
|
38283
|
+
height: convertToUnit(contentHeight.value)
|
|
38284
|
+
}
|
|
38285
|
+
}
|
|
38286
|
+
}, {
|
|
38287
|
+
default: () => {
|
|
38288
|
+
var _a3, _b, _c;
|
|
38289
|
+
return [createElementVNode("div", {
|
|
38290
|
+
"class": "v-toolbar__content",
|
|
38291
|
+
"style": {
|
|
38292
|
+
height: convertToUnit(contentHeight.value)
|
|
38293
|
+
}
|
|
38294
|
+
}, [slots.prepend && createElementVNode("div", {
|
|
38295
|
+
"class": "v-toolbar__prepend"
|
|
38296
|
+
}, [(_a3 = slots.prepend) == null ? void 0 : _a3.call(slots)]), hasTitle && createVNode(VToolbarTitle, {
|
|
38297
|
+
"key": "title",
|
|
38298
|
+
"text": props.title
|
|
38299
|
+
}, {
|
|
38300
|
+
text: slots.title
|
|
38301
|
+
}), (_b = slots.default) == null ? void 0 : _b.call(slots), slots.append && createElementVNode("div", {
|
|
38302
|
+
"class": "v-toolbar__append"
|
|
38303
|
+
}, [(_c = slots.append) == null ? void 0 : _c.call(slots)])])];
|
|
38304
|
+
}
|
|
38305
|
+
}), createVNode(VDefaultsProvider, {
|
|
38306
|
+
"defaults": {
|
|
38307
|
+
VTabs: {
|
|
38308
|
+
height: convertToUnit(extensionHeight.value)
|
|
38309
|
+
}
|
|
38310
|
+
}
|
|
38311
|
+
}, {
|
|
38312
|
+
default: () => [createVNode(VExpandTransition, null, {
|
|
38313
|
+
default: () => [isExtended.value && createElementVNode("div", {
|
|
38314
|
+
"class": "v-toolbar__extension",
|
|
38315
|
+
"style": {
|
|
38316
|
+
height: convertToUnit(extensionHeight.value)
|
|
38317
|
+
}
|
|
38318
|
+
}, [extension])]
|
|
38319
|
+
})]
|
|
38320
|
+
})]
|
|
38321
|
+
});
|
|
38322
|
+
});
|
|
38323
|
+
return {
|
|
38324
|
+
contentHeight,
|
|
38325
|
+
extensionHeight
|
|
38326
|
+
};
|
|
38327
|
+
}
|
|
38328
|
+
});
|
|
38329
|
+
const makeScrollProps = propsFactory({
|
|
38330
|
+
scrollTarget: {
|
|
38331
|
+
type: String
|
|
38332
|
+
},
|
|
38333
|
+
scrollThreshold: {
|
|
38334
|
+
type: [String, Number],
|
|
38335
|
+
default: 300
|
|
38336
|
+
}
|
|
38337
|
+
}, "scroll");
|
|
38338
|
+
function useScroll(props) {
|
|
38339
|
+
let args = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
38340
|
+
const {
|
|
38341
|
+
canScroll
|
|
38342
|
+
} = args;
|
|
38343
|
+
let previousScroll = 0;
|
|
38344
|
+
let previousScrollHeight = 0;
|
|
38345
|
+
const target = ref(null);
|
|
38346
|
+
const currentScroll = shallowRef(0);
|
|
38347
|
+
const savedScroll = shallowRef(0);
|
|
38348
|
+
const currentThreshold = shallowRef(0);
|
|
38349
|
+
const isScrollActive = shallowRef(false);
|
|
38350
|
+
const isScrollingUp = shallowRef(false);
|
|
38351
|
+
const scrollThreshold = computed(() => {
|
|
38352
|
+
return Number(props.scrollThreshold);
|
|
38353
|
+
});
|
|
38354
|
+
const scrollRatio = computed(() => {
|
|
38355
|
+
return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);
|
|
38356
|
+
});
|
|
38357
|
+
const onScroll2 = () => {
|
|
38358
|
+
const targetEl = target.value;
|
|
38359
|
+
if (!targetEl || canScroll && !canScroll.value) return;
|
|
38360
|
+
previousScroll = currentScroll.value;
|
|
38361
|
+
currentScroll.value = "window" in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
|
38362
|
+
const currentScrollHeight = targetEl instanceof Window ? document.documentElement.scrollHeight : targetEl.scrollHeight;
|
|
38363
|
+
if (previousScrollHeight !== currentScrollHeight) {
|
|
38364
|
+
previousScrollHeight = currentScrollHeight;
|
|
38365
|
+
return;
|
|
38366
|
+
}
|
|
38367
|
+
isScrollingUp.value = currentScroll.value < previousScroll;
|
|
38368
|
+
currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);
|
|
38369
|
+
};
|
|
38370
|
+
watch(isScrollingUp, () => {
|
|
38371
|
+
savedScroll.value = savedScroll.value || currentScroll.value;
|
|
38372
|
+
});
|
|
38373
|
+
watch(isScrollActive, () => {
|
|
38374
|
+
savedScroll.value = 0;
|
|
38375
|
+
});
|
|
38376
|
+
onMounted(() => {
|
|
38377
|
+
watch(() => props.scrollTarget, (scrollTarget) => {
|
|
38378
|
+
var _a;
|
|
38379
|
+
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
|
38380
|
+
if (!newTarget) {
|
|
38381
|
+
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);
|
|
38382
|
+
return;
|
|
38383
|
+
}
|
|
38384
|
+
if (newTarget === target.value) return;
|
|
38385
|
+
(_a = target.value) == null ? void 0 : _a.removeEventListener("scroll", onScroll2);
|
|
38386
|
+
target.value = newTarget;
|
|
38387
|
+
target.value.addEventListener("scroll", onScroll2, {
|
|
38388
|
+
passive: true
|
|
38389
|
+
});
|
|
38390
|
+
}, {
|
|
38391
|
+
immediate: true
|
|
38392
|
+
});
|
|
38393
|
+
});
|
|
38394
|
+
onBeforeUnmount(() => {
|
|
38395
|
+
var _a;
|
|
38396
|
+
(_a = target.value) == null ? void 0 : _a.removeEventListener("scroll", onScroll2);
|
|
38397
|
+
});
|
|
38398
|
+
canScroll && watch(canScroll, onScroll2, {
|
|
38399
|
+
immediate: true
|
|
38400
|
+
});
|
|
38401
|
+
return {
|
|
38402
|
+
scrollThreshold,
|
|
38403
|
+
currentScroll,
|
|
38404
|
+
currentThreshold,
|
|
38405
|
+
isScrollActive,
|
|
38406
|
+
scrollRatio,
|
|
38407
|
+
// required only for testing
|
|
38408
|
+
// probably can be removed
|
|
38409
|
+
// later (2 chars chlng)
|
|
38410
|
+
isScrollingUp,
|
|
38411
|
+
savedScroll
|
|
38412
|
+
};
|
|
38413
|
+
}
|
|
38414
|
+
const makeVAppBarProps = propsFactory({
|
|
38415
|
+
scrollBehavior: String,
|
|
38416
|
+
modelValue: {
|
|
38417
|
+
type: Boolean,
|
|
38418
|
+
default: true
|
|
38419
|
+
},
|
|
38420
|
+
location: {
|
|
38421
|
+
type: String,
|
|
38422
|
+
default: "top",
|
|
38423
|
+
validator: (value2) => ["top", "bottom"].includes(value2)
|
|
38424
|
+
},
|
|
38425
|
+
...makeVToolbarProps(),
|
|
38426
|
+
...makeLayoutItemProps(),
|
|
38427
|
+
...makeScrollProps(),
|
|
38428
|
+
height: {
|
|
38429
|
+
type: [Number, String],
|
|
38430
|
+
default: 64
|
|
38431
|
+
}
|
|
38432
|
+
}, "VAppBar");
|
|
38433
|
+
const VAppBar = genericComponent()({
|
|
38434
|
+
name: "VAppBar",
|
|
38435
|
+
props: makeVAppBarProps(),
|
|
38436
|
+
emits: {
|
|
38437
|
+
"update:modelValue": (value2) => true
|
|
38438
|
+
},
|
|
38439
|
+
setup(props, _ref) {
|
|
38440
|
+
let {
|
|
38441
|
+
slots
|
|
38442
|
+
} = _ref;
|
|
38443
|
+
const vToolbarRef = ref();
|
|
38444
|
+
const isActive = useProxiedModel(props, "modelValue");
|
|
38445
|
+
const scrollBehavior = computed(() => {
|
|
38446
|
+
var _a;
|
|
38447
|
+
const behavior = new Set(((_a = props.scrollBehavior) == null ? void 0 : _a.split(" ")) ?? []);
|
|
38448
|
+
return {
|
|
38449
|
+
hide: behavior.has("hide"),
|
|
38450
|
+
fullyHide: behavior.has("fully-hide"),
|
|
38451
|
+
inverted: behavior.has("inverted"),
|
|
38452
|
+
collapse: behavior.has("collapse"),
|
|
38453
|
+
elevate: behavior.has("elevate"),
|
|
38454
|
+
fadeImage: behavior.has("fade-image")
|
|
38455
|
+
// shrink: behavior.has('shrink'),
|
|
38456
|
+
};
|
|
38457
|
+
});
|
|
38458
|
+
const canScroll = computed(() => {
|
|
38459
|
+
const behavior = scrollBehavior.value;
|
|
38460
|
+
return behavior.hide || behavior.fullyHide || behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage || // behavior.shrink ||
|
|
38461
|
+
!isActive.value;
|
|
38462
|
+
});
|
|
38463
|
+
const {
|
|
38464
|
+
currentScroll,
|
|
38465
|
+
scrollThreshold,
|
|
38466
|
+
isScrollingUp,
|
|
38467
|
+
scrollRatio
|
|
38468
|
+
} = useScroll(props, {
|
|
38469
|
+
canScroll
|
|
38470
|
+
});
|
|
38471
|
+
const canHide = toRef(() => scrollBehavior.value.hide || scrollBehavior.value.fullyHide);
|
|
38472
|
+
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
|
|
38473
|
+
const isFlat = computed(() => props.flat || scrollBehavior.value.fullyHide && !isActive.value || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
|
38474
|
+
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : void 0);
|
|
38475
|
+
const height2 = computed(() => {
|
|
38476
|
+
var _a, _b;
|
|
38477
|
+
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
|
38478
|
+
const height3 = ((_a = vToolbarRef.value) == null ? void 0 : _a.contentHeight) ?? 0;
|
|
38479
|
+
const extensionHeight = ((_b = vToolbarRef.value) == null ? void 0 : _b.extensionHeight) ?? 0;
|
|
38480
|
+
if (!canHide.value) return height3 + extensionHeight;
|
|
38481
|
+
return currentScroll.value < scrollThreshold.value || scrollBehavior.value.fullyHide ? height3 + extensionHeight : height3;
|
|
38482
|
+
});
|
|
38483
|
+
useToggleScope(() => !!props.scrollBehavior, () => {
|
|
38484
|
+
watchEffect(() => {
|
|
38485
|
+
if (canHide.value) {
|
|
38486
|
+
if (scrollBehavior.value.inverted) {
|
|
38487
|
+
isActive.value = currentScroll.value > scrollThreshold.value;
|
|
38488
|
+
} else {
|
|
38489
|
+
isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;
|
|
38490
|
+
}
|
|
38491
|
+
} else {
|
|
38492
|
+
isActive.value = true;
|
|
38493
|
+
}
|
|
38494
|
+
});
|
|
38495
|
+
});
|
|
38496
|
+
const {
|
|
38497
|
+
ssrBootStyles
|
|
38498
|
+
} = useSsrBoot();
|
|
38499
|
+
const {
|
|
38500
|
+
layoutItemStyles
|
|
38501
|
+
} = useLayoutItem({
|
|
38502
|
+
id: props.name,
|
|
38503
|
+
order: computed(() => parseInt(props.order, 10)),
|
|
38504
|
+
position: toRef(() => props.location),
|
|
38505
|
+
layoutSize: height2,
|
|
38506
|
+
elementSize: shallowRef(void 0),
|
|
38507
|
+
active: isActive,
|
|
38508
|
+
absolute: toRef(() => props.absolute)
|
|
38509
|
+
});
|
|
38510
|
+
useRender(() => {
|
|
38511
|
+
const toolbarProps = VToolbar.filterProps(props);
|
|
38512
|
+
return createVNode(VToolbar, mergeProps({
|
|
38513
|
+
"ref": vToolbarRef,
|
|
38514
|
+
"class": ["v-app-bar", {
|
|
38515
|
+
"v-app-bar--bottom": props.location === "bottom"
|
|
38516
|
+
}, props.class],
|
|
38517
|
+
"style": [{
|
|
38518
|
+
...layoutItemStyles.value,
|
|
38519
|
+
"--v-toolbar-image-opacity": opacity.value,
|
|
38520
|
+
height: void 0,
|
|
38521
|
+
...ssrBootStyles.value
|
|
38522
|
+
}, props.style]
|
|
38523
|
+
}, toolbarProps, {
|
|
38524
|
+
"collapse": isCollapsed.value,
|
|
38525
|
+
"flat": isFlat.value
|
|
38526
|
+
}), slots);
|
|
38527
|
+
});
|
|
38528
|
+
return {};
|
|
38529
|
+
}
|
|
38530
|
+
});
|
|
38531
|
+
const makeVAppBarNavIconProps = propsFactory({
|
|
38532
|
+
...omit(makeVBtnProps({
|
|
38533
|
+
icon: "$menu",
|
|
38534
|
+
variant: "text"
|
|
38535
|
+
}), ["spaced"])
|
|
38536
|
+
}, "VAppBarNavIcon");
|
|
38537
|
+
const VAppBarNavIcon = genericComponent()({
|
|
38538
|
+
name: "VAppBarNavIcon",
|
|
38539
|
+
props: makeVAppBarNavIconProps(),
|
|
38540
|
+
setup(props, _ref) {
|
|
38541
|
+
let {
|
|
38542
|
+
slots
|
|
38543
|
+
} = _ref;
|
|
38544
|
+
useRender(() => createVNode(VBtn, mergeProps(props, {
|
|
38545
|
+
"class": ["v-app-bar-nav-icon"]
|
|
38546
|
+
}), slots));
|
|
38547
|
+
return {};
|
|
38548
|
+
}
|
|
38549
|
+
});
|
|
38550
|
+
const VAppBarTitle = genericComponent()({
|
|
38551
|
+
name: "VAppBarTitle",
|
|
38552
|
+
props: makeVToolbarTitleProps(),
|
|
38553
|
+
setup(props, _ref) {
|
|
38554
|
+
let {
|
|
38555
|
+
slots
|
|
38556
|
+
} = _ref;
|
|
38557
|
+
useRender(() => createVNode(VToolbarTitle, mergeProps(props, {
|
|
38558
|
+
"class": "v-app-bar-title"
|
|
38559
|
+
}), slots));
|
|
38560
|
+
return {};
|
|
38561
|
+
}
|
|
38562
|
+
});
|
|
38563
|
+
const makeVBadgeProps = propsFactory({
|
|
38564
|
+
bordered: Boolean,
|
|
38565
|
+
color: String,
|
|
38566
|
+
content: [Number, String],
|
|
38567
|
+
dot: Boolean,
|
|
38568
|
+
floating: Boolean,
|
|
38569
|
+
icon: IconValue,
|
|
38570
|
+
inline: Boolean,
|
|
38571
|
+
label: {
|
|
38572
|
+
type: String,
|
|
38573
|
+
default: "$vuetify.badge"
|
|
38574
|
+
},
|
|
38575
|
+
max: [Number, String],
|
|
38576
|
+
modelValue: {
|
|
38577
|
+
type: Boolean,
|
|
38578
|
+
default: true
|
|
38579
|
+
},
|
|
38580
|
+
offsetX: [Number, String],
|
|
38581
|
+
offsetY: [Number, String],
|
|
38582
|
+
textColor: String,
|
|
38583
|
+
...makeComponentProps(),
|
|
38584
|
+
...makeLocationProps({
|
|
38585
|
+
location: "top end"
|
|
38586
|
+
}),
|
|
38587
|
+
...makeRoundedProps(),
|
|
38588
|
+
...makeTagProps(),
|
|
38589
|
+
...makeThemeProps(),
|
|
38590
|
+
...makeTransitionProps$1({
|
|
38591
|
+
transition: "scale-rotate-transition"
|
|
38592
|
+
}),
|
|
38593
|
+
...makeDimensionProps()
|
|
38594
|
+
}, "VBadge");
|
|
38595
|
+
const VBadge = genericComponent()({
|
|
38596
|
+
name: "VBadge",
|
|
38597
|
+
inheritAttrs: false,
|
|
38598
|
+
props: makeVBadgeProps(),
|
|
38599
|
+
setup(props, ctx) {
|
|
38600
|
+
const {
|
|
38601
|
+
backgroundColorClasses,
|
|
38602
|
+
backgroundColorStyles
|
|
38603
|
+
} = useBackgroundColor(() => props.color);
|
|
38604
|
+
const {
|
|
38605
|
+
roundedClasses
|
|
38606
|
+
} = useRounded(props);
|
|
38607
|
+
const {
|
|
38608
|
+
t
|
|
38609
|
+
} = useLocale();
|
|
38610
|
+
const {
|
|
38611
|
+
textColorClasses,
|
|
38612
|
+
textColorStyles
|
|
38613
|
+
} = useTextColor(() => props.textColor);
|
|
38614
|
+
const {
|
|
38615
|
+
themeClasses
|
|
38616
|
+
} = useTheme();
|
|
38617
|
+
const {
|
|
38618
|
+
locationStyles
|
|
38619
|
+
} = useLocation(props, true, (side) => {
|
|
38620
|
+
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
|
38621
|
+
return base + (["top", "bottom"].includes(side) ? Number(props.offsetY ?? 0) : ["left", "right"].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
|
38622
|
+
});
|
|
38623
|
+
const {
|
|
38624
|
+
dimensionStyles
|
|
38625
|
+
} = useDimension(props);
|
|
38626
|
+
useRender(() => {
|
|
38627
|
+
const value2 = Number(props.content);
|
|
38628
|
+
const content2 = !props.max || isNaN(value2) ? props.content : value2 <= Number(props.max) ? value2 : `${props.max}+`;
|
|
38629
|
+
const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, ["aria-atomic", "aria-label", "aria-live", "role", "title"]);
|
|
38630
|
+
return createVNode(props.tag, mergeProps({
|
|
38631
|
+
"class": ["v-badge", {
|
|
38632
|
+
"v-badge--bordered": props.bordered,
|
|
38633
|
+
"v-badge--dot": props.dot,
|
|
38634
|
+
"v-badge--floating": props.floating,
|
|
38635
|
+
"v-badge--inline": props.inline
|
|
38636
|
+
}, props.class]
|
|
38637
|
+
}, attrs, {
|
|
38638
|
+
"style": props.style
|
|
38639
|
+
}), {
|
|
38640
|
+
default: () => {
|
|
38641
|
+
var _a, _b;
|
|
38642
|
+
return [createElementVNode("div", {
|
|
38643
|
+
"class": "v-badge__wrapper"
|
|
38644
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a), createVNode(MaybeTransition, {
|
|
38645
|
+
"transition": props.transition
|
|
38646
|
+
}, {
|
|
38647
|
+
default: () => {
|
|
38648
|
+
var _a2, _b2;
|
|
38649
|
+
return [withDirectives(createElementVNode("span", mergeProps({
|
|
38650
|
+
"class": ["v-badge__badge", themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],
|
|
38651
|
+
"style": [backgroundColorStyles.value, textColorStyles.value, dimensionStyles.value, props.inline ? {} : locationStyles.value],
|
|
38652
|
+
"aria-atomic": "true",
|
|
38653
|
+
"aria-label": t(props.label, value2),
|
|
38654
|
+
"aria-live": "polite",
|
|
38655
|
+
"role": "status"
|
|
38656
|
+
}, badgeAttrs), [props.dot ? void 0 : ctx.slots.badge ? (_b2 = (_a2 = ctx.slots).badge) == null ? void 0 : _b2.call(_a2) : props.icon ? createVNode(VIcon, {
|
|
38657
|
+
"icon": props.icon
|
|
38658
|
+
}, null) : content2]), [[vShow, props.modelValue]])];
|
|
38659
|
+
}
|
|
38660
|
+
})])];
|
|
38661
|
+
}
|
|
38662
|
+
});
|
|
38663
|
+
});
|
|
38664
|
+
return {};
|
|
38665
|
+
}
|
|
38666
|
+
});
|
|
38667
|
+
const _hoisted_1 = {
|
|
38668
|
+
key: 0,
|
|
38669
|
+
class: "text-h6"
|
|
38670
|
+
};
|
|
38671
|
+
const _hoisted_2 = {
|
|
38672
|
+
key: 1,
|
|
38673
|
+
class: "text-caption text-medium-emphasis"
|
|
38674
|
+
};
|
|
38675
|
+
const _hoisted_3 = { key: 2 };
|
|
38676
|
+
const _hoisted_4 = { key: 2 };
|
|
38677
|
+
const _hoisted_5 = { key: 2 };
|
|
38678
|
+
const _sfc_main = /* @__PURE__ */ defineComponent$1({
|
|
38679
|
+
__name: "AppHeader",
|
|
38680
|
+
props: {
|
|
38681
|
+
title: {},
|
|
38682
|
+
subtitle: {},
|
|
38683
|
+
showSidebarToggle: { type: Boolean, default: true },
|
|
38684
|
+
showSearch: { type: Boolean, default: false },
|
|
38685
|
+
searchPlaceholder: { default: "جستجو..." },
|
|
38686
|
+
searchValue: {},
|
|
38687
|
+
showNotifications: { type: Boolean, default: false },
|
|
38688
|
+
notificationCount: { default: 0 },
|
|
38689
|
+
showProfile: { type: Boolean, default: false },
|
|
38690
|
+
profileAvatar: {},
|
|
38691
|
+
profileName: {},
|
|
38692
|
+
profileMenu: { default: () => [] },
|
|
38693
|
+
actions: { default: () => [] },
|
|
38694
|
+
color: { default: "surface" },
|
|
38695
|
+
elevation: { default: 1 },
|
|
38696
|
+
height: { default: 70 },
|
|
38697
|
+
class: {}
|
|
38698
|
+
},
|
|
38699
|
+
emits: ["update:searchValue", "toggle-sidebar", "search"],
|
|
38700
|
+
setup(__props, { emit: __emit }) {
|
|
38701
|
+
const props = __props;
|
|
38702
|
+
const emit = __emit;
|
|
38703
|
+
const customizer = useCustomizerStore();
|
|
38704
|
+
const searchInput = computed({
|
|
38705
|
+
get: () => props.searchValue || "",
|
|
38706
|
+
set: (val2) => {
|
|
38707
|
+
emit("update:searchValue", val2);
|
|
38708
|
+
emit("search", val2);
|
|
38709
|
+
}
|
|
38710
|
+
});
|
|
38711
|
+
const toggleSidebar = () => {
|
|
38712
|
+
customizer.SET_SIDEBAR_DRAWER();
|
|
38713
|
+
emit("toggle-sidebar");
|
|
38714
|
+
};
|
|
38715
|
+
const profileMenuItems = computed(
|
|
38716
|
+
() => props.profileMenu.map((item) => ({
|
|
38717
|
+
...item,
|
|
38718
|
+
prependIcon: item.icon,
|
|
38719
|
+
onClick: item.action || (() => {
|
|
38720
|
+
if (item.to) {
|
|
38721
|
+
console.log("Navigate to:", item.to);
|
|
38722
|
+
} else if (item.href) {
|
|
38723
|
+
window.open(item.href, "_blank");
|
|
38724
|
+
}
|
|
38725
|
+
})
|
|
38726
|
+
}))
|
|
38727
|
+
);
|
|
38728
|
+
return (_ctx, _cache) => {
|
|
38729
|
+
return openBlock(), createBlock(VAppBar, {
|
|
38730
|
+
color: __props.color,
|
|
38731
|
+
elevation: __props.elevation,
|
|
38732
|
+
height: __props.height,
|
|
38733
|
+
class: normalizeClass([props.class, "topbar"]),
|
|
38734
|
+
fixed: ""
|
|
38735
|
+
}, {
|
|
38736
|
+
default: withCtx(() => [
|
|
38737
|
+
__props.showSidebarToggle ? (openBlock(), createBlock(VAppBarNavIcon, {
|
|
38738
|
+
key: 0,
|
|
38739
|
+
variant: "text",
|
|
38740
|
+
onClick: toggleSidebar
|
|
38741
|
+
})) : createCommentVNode("", true),
|
|
38742
|
+
__props.title || __props.subtitle ? (openBlock(), createBlock(VAppBarTitle, {
|
|
38743
|
+
key: 1,
|
|
38744
|
+
class: "d-flex flex-column"
|
|
38745
|
+
}, {
|
|
38746
|
+
default: withCtx(() => [
|
|
38747
|
+
__props.title ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
38748
|
+
__props.subtitle ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)
|
|
38749
|
+
]),
|
|
38750
|
+
_: 1
|
|
38751
|
+
})) : createCommentVNode("", true),
|
|
38752
|
+
createVNode(VSpacer),
|
|
38753
|
+
__props.showSearch ? (openBlock(), createBlock(VTextField, {
|
|
38754
|
+
key: 2,
|
|
38755
|
+
modelValue: searchInput.value,
|
|
38756
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchInput.value = $event),
|
|
38757
|
+
placeholder: __props.searchPlaceholder,
|
|
38758
|
+
density: "compact",
|
|
38759
|
+
variant: "outlined",
|
|
38760
|
+
"hide-details": "",
|
|
38761
|
+
"prepend-inner-icon": "mdi-magnify",
|
|
38762
|
+
class: "search-bar",
|
|
38763
|
+
style: { "max-width": "400px" }
|
|
38764
|
+
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", true),
|
|
38765
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action, index2) => {
|
|
38766
|
+
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
38767
|
+
action.tooltip ? (openBlock(), createBlock(VTooltip, {
|
|
38768
|
+
key: 0,
|
|
38769
|
+
text: action.tooltip,
|
|
38770
|
+
location: "bottom"
|
|
38771
|
+
}, {
|
|
38772
|
+
activator: withCtx(({ props: tooltipProps }) => [
|
|
38773
|
+
createVNode(VBtn, mergeProps({ ref_for: true }, tooltipProps, {
|
|
38774
|
+
icon: action.icon,
|
|
38775
|
+
color: action.color || "primary",
|
|
38776
|
+
variant: action.variant || "text",
|
|
38777
|
+
size: action.size || "default",
|
|
38778
|
+
disabled: action.disabled,
|
|
38779
|
+
class: "ms-2",
|
|
38780
|
+
onClick: action.onClick
|
|
38781
|
+
}), {
|
|
38782
|
+
default: withCtx(() => [
|
|
38783
|
+
action.badge ? (openBlock(), createBlock(VBadge, {
|
|
38784
|
+
key: 0,
|
|
38785
|
+
content: action.badge,
|
|
38786
|
+
color: action.badgeColor || "error",
|
|
38787
|
+
overlap: ""
|
|
38788
|
+
}, {
|
|
38789
|
+
default: withCtx(() => [
|
|
38790
|
+
action.icon ? (openBlock(), createBlock(VIcon, {
|
|
38791
|
+
key: 0,
|
|
38792
|
+
icon: action.icon
|
|
38793
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
38794
|
+
]),
|
|
38795
|
+
_: 2
|
|
38796
|
+
}, 1032, ["content", "color"])) : action.icon ? (openBlock(), createBlock(VIcon, {
|
|
38797
|
+
key: 1,
|
|
38798
|
+
icon: action.icon
|
|
38799
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
38800
|
+
action.label && !action.icon ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(action.label), 1)) : createCommentVNode("", true)
|
|
38801
|
+
]),
|
|
38802
|
+
_: 2
|
|
38803
|
+
}, 1040, ["icon", "color", "variant", "size", "disabled", "onClick"])
|
|
38804
|
+
]),
|
|
38805
|
+
_: 2
|
|
38806
|
+
}, 1032, ["text"])) : (openBlock(), createBlock(VBtn, {
|
|
38807
|
+
key: 1,
|
|
38808
|
+
icon: action.icon,
|
|
38809
|
+
color: action.color || "primary",
|
|
38810
|
+
variant: action.variant || "text",
|
|
38811
|
+
size: action.size || "default",
|
|
38812
|
+
disabled: action.disabled,
|
|
38813
|
+
class: "ms-2",
|
|
38814
|
+
onClick: action.onClick
|
|
38815
|
+
}, {
|
|
38816
|
+
default: withCtx(() => [
|
|
38817
|
+
action.badge ? (openBlock(), createBlock(VBadge, {
|
|
38818
|
+
key: 0,
|
|
38819
|
+
content: action.badge,
|
|
38820
|
+
color: action.badgeColor || "error",
|
|
38821
|
+
overlap: ""
|
|
38822
|
+
}, {
|
|
38823
|
+
default: withCtx(() => [
|
|
38824
|
+
action.icon ? (openBlock(), createBlock(VIcon, {
|
|
38825
|
+
key: 0,
|
|
38826
|
+
icon: action.icon
|
|
38827
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
38828
|
+
]),
|
|
38829
|
+
_: 2
|
|
38830
|
+
}, 1032, ["content", "color"])) : action.icon ? (openBlock(), createBlock(VIcon, {
|
|
38831
|
+
key: 1,
|
|
38832
|
+
icon: action.icon
|
|
38833
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
38834
|
+
action.label && !action.icon ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(action.label), 1)) : createCommentVNode("", true)
|
|
38835
|
+
]),
|
|
38836
|
+
_: 2
|
|
38837
|
+
}, 1032, ["icon", "color", "variant", "size", "disabled", "onClick"]))
|
|
38838
|
+
], 64);
|
|
38839
|
+
}), 128)),
|
|
38840
|
+
__props.showNotifications ? (openBlock(), createBlock(VMenu, {
|
|
38841
|
+
key: 3,
|
|
38842
|
+
location: "bottom end",
|
|
38843
|
+
"offset-y": ""
|
|
38844
|
+
}, {
|
|
38845
|
+
activator: withCtx(({ props: menuProps }) => [
|
|
38846
|
+
createVNode(VBtn, mergeProps(menuProps, {
|
|
38847
|
+
icon: "",
|
|
38848
|
+
variant: "text",
|
|
38849
|
+
class: "profileBtn"
|
|
38850
|
+
}), {
|
|
38851
|
+
default: withCtx(() => [
|
|
38852
|
+
createVNode(VBadge, {
|
|
38853
|
+
content: __props.notificationCount > 0 ? __props.notificationCount : void 0,
|
|
38854
|
+
color: "error",
|
|
38855
|
+
overlap: ""
|
|
38856
|
+
}, {
|
|
38857
|
+
default: withCtx(() => [
|
|
38858
|
+
createVNode(VIcon, { icon: "mdi-bell-outline" })
|
|
38859
|
+
]),
|
|
38860
|
+
_: 1
|
|
38861
|
+
}, 8, ["content"])
|
|
38862
|
+
]),
|
|
38863
|
+
_: 1
|
|
38864
|
+
}, 16)
|
|
38865
|
+
]),
|
|
38866
|
+
default: withCtx(() => [
|
|
38867
|
+
createVNode(VList, null, {
|
|
38868
|
+
default: withCtx(() => [
|
|
38869
|
+
createVNode(VListItem, null, {
|
|
38870
|
+
default: withCtx(() => [
|
|
38871
|
+
createVNode(VListItemTitle, null, {
|
|
38872
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
38873
|
+
createTextVNode("اعلانها", -1)
|
|
38874
|
+
])]),
|
|
38875
|
+
_: 1
|
|
38876
|
+
})
|
|
38877
|
+
]),
|
|
38878
|
+
_: 1
|
|
38879
|
+
}),
|
|
38880
|
+
createVNode(VDivider),
|
|
38881
|
+
createVNode(VListItem, null, {
|
|
38882
|
+
default: withCtx(() => [
|
|
38883
|
+
createVNode(VListItemTitle, null, {
|
|
38884
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
38885
|
+
createTextVNode("هیچ اعلان جدیدی وجود ندارد", -1)
|
|
38886
|
+
])]),
|
|
38887
|
+
_: 1
|
|
38888
|
+
})
|
|
38889
|
+
]),
|
|
38890
|
+
_: 1
|
|
38891
|
+
})
|
|
38892
|
+
]),
|
|
38893
|
+
_: 1
|
|
38894
|
+
})
|
|
38895
|
+
]),
|
|
38896
|
+
_: 1
|
|
38897
|
+
})) : createCommentVNode("", true),
|
|
38898
|
+
__props.showProfile ? (openBlock(), createBlock(VMenu, {
|
|
38899
|
+
key: 4,
|
|
38900
|
+
location: "bottom end",
|
|
38901
|
+
"offset-y": ""
|
|
38902
|
+
}, {
|
|
38903
|
+
activator: withCtx(({ props: menuProps }) => [
|
|
38904
|
+
createVNode(VBtn, mergeProps(menuProps, {
|
|
38905
|
+
icon: !__props.profileName && !__props.profileAvatar,
|
|
38906
|
+
variant: "text",
|
|
38907
|
+
class: "profileBtn"
|
|
38908
|
+
}), {
|
|
38909
|
+
default: withCtx(() => [
|
|
38910
|
+
__props.profileAvatar ? (openBlock(), createBlock(VAvatar, {
|
|
38911
|
+
key: 0,
|
|
38912
|
+
size: "32"
|
|
38913
|
+
}, {
|
|
38914
|
+
default: withCtx(() => [
|
|
38915
|
+
createVNode(VImg, {
|
|
38916
|
+
src: __props.profileAvatar,
|
|
38917
|
+
alt: __props.profileName || "Profile"
|
|
38918
|
+
}, null, 8, ["src", "alt"])
|
|
38919
|
+
]),
|
|
38920
|
+
_: 1
|
|
38921
|
+
})) : !__props.profileName ? (openBlock(), createBlock(VIcon, {
|
|
38922
|
+
key: 1,
|
|
38923
|
+
icon: "mdi-account-circle"
|
|
38924
|
+
})) : (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(__props.profileName), 1))
|
|
38925
|
+
]),
|
|
38926
|
+
_: 1
|
|
38927
|
+
}, 16, ["icon"])
|
|
38928
|
+
]),
|
|
38929
|
+
default: withCtx(() => [
|
|
38930
|
+
profileMenuItems.value.length > 0 ? (openBlock(), createBlock(VList, { key: 0 }, {
|
|
38931
|
+
default: withCtx(() => [
|
|
38932
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(profileMenuItems.value, (item, index2) => {
|
|
38933
|
+
return openBlock(), createBlock(VListItem, {
|
|
38934
|
+
key: index2,
|
|
38935
|
+
"prepend-icon": item.icon,
|
|
38936
|
+
to: item.to,
|
|
38937
|
+
href: item.href,
|
|
38938
|
+
onClick: item.onClick
|
|
38939
|
+
}, {
|
|
38940
|
+
default: withCtx(() => [
|
|
38941
|
+
createVNode(VListItemTitle, null, {
|
|
38942
|
+
default: withCtx(() => [
|
|
38943
|
+
createTextVNode(toDisplayString(item.title), 1)
|
|
38944
|
+
]),
|
|
38945
|
+
_: 2
|
|
38946
|
+
}, 1024),
|
|
38947
|
+
item.divider ? (openBlock(), createBlock(VDivider, { key: 0 })) : createCommentVNode("", true)
|
|
38948
|
+
]),
|
|
38949
|
+
_: 2
|
|
38950
|
+
}, 1032, ["prepend-icon", "to", "href", "onClick"]);
|
|
38951
|
+
}), 128))
|
|
38952
|
+
]),
|
|
38953
|
+
_: 1
|
|
38954
|
+
})) : createCommentVNode("", true)
|
|
38955
|
+
]),
|
|
38956
|
+
_: 1
|
|
38957
|
+
})) : createCommentVNode("", true)
|
|
38958
|
+
]),
|
|
38959
|
+
_: 1
|
|
38960
|
+
}, 8, ["color", "elevation", "height", "class"]);
|
|
38961
|
+
};
|
|
38962
|
+
}
|
|
38963
|
+
});
|
|
38964
|
+
const AppHeader = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-b7912421"]]);
|
|
36248
38965
|
function useDataTable(options) {
|
|
36249
38966
|
const items = ref([]);
|
|
36250
38967
|
const loading = ref(false);
|
|
@@ -36263,7 +38980,8 @@ function useDataTable(options) {
|
|
|
36263
38980
|
loading.value = true;
|
|
36264
38981
|
error.value = null;
|
|
36265
38982
|
try {
|
|
36266
|
-
const
|
|
38983
|
+
const axiosInstance = getAxiosInstance();
|
|
38984
|
+
const response = await axiosInstance.get(options.apiResource, {
|
|
36267
38985
|
params: {
|
|
36268
38986
|
page: pagination.value.currentPage,
|
|
36269
38987
|
per_page: pagination.value.itemsPerPage,
|
|
@@ -36301,7 +39019,8 @@ function useDataTable(options) {
|
|
|
36301
39019
|
isLoadingMore.value = true;
|
|
36302
39020
|
pagination.value.currentPage += 1;
|
|
36303
39021
|
try {
|
|
36304
|
-
const
|
|
39022
|
+
const axiosInstance = getAxiosInstance();
|
|
39023
|
+
const response = await axiosInstance.get(options.apiResource, {
|
|
36305
39024
|
params: {
|
|
36306
39025
|
page: pagination.value.currentPage,
|
|
36307
39026
|
per_page: pagination.value.itemsPerPage,
|
|
@@ -36803,32 +39522,36 @@ const index = {
|
|
|
36803
39522
|
install
|
|
36804
39523
|
};
|
|
36805
39524
|
export {
|
|
39525
|
+
AppHeader,
|
|
39526
|
+
AppSidebar,
|
|
36806
39527
|
AppStepper,
|
|
36807
|
-
_sfc_main$
|
|
36808
|
-
_sfc_main$
|
|
39528
|
+
_sfc_main$h as BaseBreadcrumb,
|
|
39529
|
+
_sfc_main$g as BaseIcon,
|
|
36809
39530
|
BooleanEnum,
|
|
36810
39531
|
BooleanEnumOptions,
|
|
36811
|
-
_sfc_main$
|
|
39532
|
+
_sfc_main$f as ConfirmDialog,
|
|
36812
39533
|
CustomAutocomplete,
|
|
36813
|
-
_sfc_main$
|
|
39534
|
+
_sfc_main$b as CustomDataTable,
|
|
36814
39535
|
DateConverter,
|
|
36815
39536
|
DescriptionInput,
|
|
36816
39537
|
DigitLimit,
|
|
36817
39538
|
DownloadButton,
|
|
36818
39539
|
GreetingUtils,
|
|
36819
39540
|
Loading,
|
|
36820
|
-
_sfc_main$
|
|
39541
|
+
_sfc_main$d as MoneyInput,
|
|
36821
39542
|
NationalCodeValidator,
|
|
36822
39543
|
PdfViewer,
|
|
36823
39544
|
ShamsiDatePicker,
|
|
36824
|
-
_sfc_main$
|
|
36825
|
-
_sfc_main$
|
|
36826
|
-
_sfc_main$
|
|
39545
|
+
_sfc_main$7 as UiChildCard,
|
|
39546
|
+
_sfc_main$6 as UiParentCard,
|
|
39547
|
+
_sfc_main$5 as VPriceTextField,
|
|
36827
39548
|
configureAuth,
|
|
39549
|
+
configureAxiosInstance,
|
|
36828
39550
|
index as default,
|
|
36829
39551
|
fetchWrapper,
|
|
36830
39552
|
formatNumberWithCommas,
|
|
36831
39553
|
formatPrice,
|
|
39554
|
+
getAxiosInstance,
|
|
36832
39555
|
install,
|
|
36833
39556
|
nationalCodeRule,
|
|
36834
39557
|
useCustomizerStore,
|