2249 lines
67 KiB
JavaScript
2249 lines
67 KiB
JavaScript
import {
|
|
Box,
|
|
IN_BROWSER,
|
|
SUPPORTS_INTERSECTION,
|
|
animate,
|
|
attachedRoot,
|
|
bindProps,
|
|
clamp,
|
|
consoleError,
|
|
convertToUnit,
|
|
deepEqual,
|
|
defer,
|
|
destructComputed,
|
|
flipAlign,
|
|
flipCorner,
|
|
flipSide,
|
|
genericComponent,
|
|
getAxis,
|
|
getCurrentInstance,
|
|
getForeground,
|
|
getOverflow,
|
|
getScrollParent,
|
|
getScrollParents,
|
|
getTargetBox,
|
|
getUid,
|
|
hasEvent,
|
|
hasScrollbar,
|
|
isCssColor,
|
|
isFixedPosition,
|
|
isObject,
|
|
isParsableColor,
|
|
keyCodes,
|
|
keys,
|
|
makeComponentProps,
|
|
makeThemeProps,
|
|
matchesSelector,
|
|
nullifyTransforms,
|
|
omit,
|
|
parseAnchor,
|
|
parseColor,
|
|
propsFactory,
|
|
provideTheme,
|
|
standardEasing,
|
|
templateRef,
|
|
unbindProps,
|
|
useDisplay,
|
|
useProxiedModel,
|
|
useRender,
|
|
useRtl,
|
|
useToggleScope
|
|
} from "./chunk-OGLFEP4I.js";
|
|
import {
|
|
Fragment,
|
|
Teleport,
|
|
Transition,
|
|
TransitionGroup,
|
|
computed,
|
|
createVNode,
|
|
effectScope,
|
|
h,
|
|
inject,
|
|
isRef,
|
|
mergeProps,
|
|
nextTick,
|
|
onBeforeUnmount,
|
|
onMounted,
|
|
onScopeDispose,
|
|
provide,
|
|
reactive,
|
|
readonly,
|
|
ref,
|
|
resolveDirective,
|
|
resolveDynamicComponent,
|
|
shallowRef,
|
|
toRaw,
|
|
toRef,
|
|
vShow,
|
|
warn,
|
|
watch,
|
|
watchEffect,
|
|
withDirectives
|
|
} from "./chunk-TF6X5W6F.js";
|
|
|
|
// node_modules/vuetify/lib/directives/intersect/index.mjs
|
|
function mounted(el, binding) {
|
|
if (!SUPPORTS_INTERSECTION) return;
|
|
const modifiers = binding.modifiers || {};
|
|
const value = binding.value;
|
|
const {
|
|
handler,
|
|
options
|
|
} = typeof value === "object" ? value : {
|
|
handler: value,
|
|
options: {}
|
|
};
|
|
const observer = new IntersectionObserver(function() {
|
|
var _a;
|
|
let entries = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
let observer2 = arguments.length > 1 ? arguments[1] : void 0;
|
|
const _observe = (_a = el._observe) == null ? void 0 : _a[binding.instance.$.uid];
|
|
if (!_observe) return;
|
|
const isIntersecting = entries.some((entry) => entry.isIntersecting);
|
|
if (handler && (!modifiers.quiet || _observe.init) && (!modifiers.once || isIntersecting || _observe.init)) {
|
|
handler(isIntersecting, entries, observer2);
|
|
}
|
|
if (isIntersecting && modifiers.once) unmounted(el, binding);
|
|
else _observe.init = true;
|
|
}, options);
|
|
el._observe = Object(el._observe);
|
|
el._observe[binding.instance.$.uid] = {
|
|
init: false,
|
|
observer
|
|
};
|
|
observer.observe(el);
|
|
}
|
|
function unmounted(el, binding) {
|
|
var _a;
|
|
const observe = (_a = el._observe) == null ? void 0 : _a[binding.instance.$.uid];
|
|
if (!observe) return;
|
|
observe.observer.unobserve(el);
|
|
delete el._observe[binding.instance.$.uid];
|
|
}
|
|
var Intersect = {
|
|
mounted,
|
|
unmounted
|
|
};
|
|
var intersect_default = Intersect;
|
|
|
|
// node_modules/vuetify/lib/directives/ripple/index.mjs
|
|
import "/home/thais/front_face_recognition/node_modules/vuetify/lib/directives/ripple/VRipple.css";
|
|
var stopSymbol = Symbol("rippleStop");
|
|
var DELAY_RIPPLE = 80;
|
|
function transform(el, value) {
|
|
el.style.transform = value;
|
|
el.style.webkitTransform = value;
|
|
}
|
|
function isTouchEvent(e) {
|
|
return e.constructor.name === "TouchEvent";
|
|
}
|
|
function isKeyboardEvent(e) {
|
|
return e.constructor.name === "KeyboardEvent";
|
|
}
|
|
var calculate = function(e, el) {
|
|
var _a;
|
|
let value = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
let localX = 0;
|
|
let localY = 0;
|
|
if (!isKeyboardEvent(e)) {
|
|
const offset = el.getBoundingClientRect();
|
|
const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;
|
|
localX = target.clientX - offset.left;
|
|
localY = target.clientY - offset.top;
|
|
}
|
|
let radius = 0;
|
|
let scale = 0.3;
|
|
if ((_a = el._ripple) == null ? void 0 : _a.circle) {
|
|
scale = 0.15;
|
|
radius = el.clientWidth / 2;
|
|
radius = value.center ? radius : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;
|
|
} else {
|
|
radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;
|
|
}
|
|
const centerX = `${(el.clientWidth - radius * 2) / 2}px`;
|
|
const centerY = `${(el.clientHeight - radius * 2) / 2}px`;
|
|
const x = value.center ? centerX : `${localX - radius}px`;
|
|
const y = value.center ? centerY : `${localY - radius}px`;
|
|
return {
|
|
radius,
|
|
scale,
|
|
x,
|
|
y,
|
|
centerX,
|
|
centerY
|
|
};
|
|
};
|
|
var ripples = {
|
|
/* eslint-disable max-statements */
|
|
show(e, el) {
|
|
var _a;
|
|
let value = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
if (!((_a = el == null ? void 0 : el._ripple) == null ? void 0 : _a.enabled)) {
|
|
return;
|
|
}
|
|
const container = document.createElement("span");
|
|
const animation = document.createElement("span");
|
|
container.appendChild(animation);
|
|
container.className = "v-ripple__container";
|
|
if (value.class) {
|
|
container.className += ` ${value.class}`;
|
|
}
|
|
const {
|
|
radius,
|
|
scale,
|
|
x,
|
|
y,
|
|
centerX,
|
|
centerY
|
|
} = calculate(e, el, value);
|
|
const size = `${radius * 2}px`;
|
|
animation.className = "v-ripple__animation";
|
|
animation.style.width = size;
|
|
animation.style.height = size;
|
|
el.appendChild(container);
|
|
const computed2 = window.getComputedStyle(el);
|
|
if (computed2 && computed2.position === "static") {
|
|
el.style.position = "relative";
|
|
el.dataset.previousPosition = "static";
|
|
}
|
|
animation.classList.add("v-ripple__animation--enter");
|
|
animation.classList.add("v-ripple__animation--visible");
|
|
transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
|
|
animation.dataset.activated = String(performance.now());
|
|
requestAnimationFrame(() => {
|
|
requestAnimationFrame(() => {
|
|
animation.classList.remove("v-ripple__animation--enter");
|
|
animation.classList.add("v-ripple__animation--in");
|
|
transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
|
|
});
|
|
});
|
|
},
|
|
hide(el) {
|
|
var _a;
|
|
if (!((_a = el == null ? void 0 : el._ripple) == null ? void 0 : _a.enabled)) return;
|
|
const ripples2 = el.getElementsByClassName("v-ripple__animation");
|
|
if (ripples2.length === 0) return;
|
|
const animation = ripples2[ripples2.length - 1];
|
|
if (animation.dataset.isHiding) return;
|
|
else animation.dataset.isHiding = "true";
|
|
const diff = performance.now() - Number(animation.dataset.activated);
|
|
const delay = Math.max(250 - diff, 0);
|
|
setTimeout(() => {
|
|
animation.classList.remove("v-ripple__animation--in");
|
|
animation.classList.add("v-ripple__animation--out");
|
|
setTimeout(() => {
|
|
var _a2;
|
|
const ripples3 = el.getElementsByClassName("v-ripple__animation");
|
|
if (ripples3.length === 1 && el.dataset.previousPosition) {
|
|
el.style.position = el.dataset.previousPosition;
|
|
delete el.dataset.previousPosition;
|
|
}
|
|
if (((_a2 = animation.parentNode) == null ? void 0 : _a2.parentNode) === el) el.removeChild(animation.parentNode);
|
|
}, 300);
|
|
}, delay);
|
|
}
|
|
};
|
|
function isRippleEnabled(value) {
|
|
return typeof value === "undefined" || !!value;
|
|
}
|
|
function rippleShow(e) {
|
|
const value = {};
|
|
const element = e.currentTarget;
|
|
if (!(element == null ? void 0 : element._ripple) || element._ripple.touched || e[stopSymbol]) return;
|
|
e[stopSymbol] = true;
|
|
if (isTouchEvent(e)) {
|
|
element._ripple.touched = true;
|
|
element._ripple.isTouch = true;
|
|
} else {
|
|
if (element._ripple.isTouch) return;
|
|
}
|
|
value.center = element._ripple.centered || isKeyboardEvent(e);
|
|
if (element._ripple.class) {
|
|
value.class = element._ripple.class;
|
|
}
|
|
if (isTouchEvent(e)) {
|
|
if (element._ripple.showTimerCommit) return;
|
|
element._ripple.showTimerCommit = () => {
|
|
ripples.show(e, element, value);
|
|
};
|
|
element._ripple.showTimer = window.setTimeout(() => {
|
|
var _a;
|
|
if ((_a = element == null ? void 0 : element._ripple) == null ? void 0 : _a.showTimerCommit) {
|
|
element._ripple.showTimerCommit();
|
|
element._ripple.showTimerCommit = null;
|
|
}
|
|
}, DELAY_RIPPLE);
|
|
} else {
|
|
ripples.show(e, element, value);
|
|
}
|
|
}
|
|
function rippleStop(e) {
|
|
e[stopSymbol] = true;
|
|
}
|
|
function rippleHide(e) {
|
|
const element = e.currentTarget;
|
|
if (!(element == null ? void 0 : element._ripple)) return;
|
|
window.clearTimeout(element._ripple.showTimer);
|
|
if (e.type === "touchend" && element._ripple.showTimerCommit) {
|
|
element._ripple.showTimerCommit();
|
|
element._ripple.showTimerCommit = null;
|
|
element._ripple.showTimer = window.setTimeout(() => {
|
|
rippleHide(e);
|
|
});
|
|
return;
|
|
}
|
|
window.setTimeout(() => {
|
|
if (element._ripple) {
|
|
element._ripple.touched = false;
|
|
}
|
|
});
|
|
ripples.hide(element);
|
|
}
|
|
function rippleCancelShow(e) {
|
|
const element = e.currentTarget;
|
|
if (!(element == null ? void 0 : element._ripple)) return;
|
|
if (element._ripple.showTimerCommit) {
|
|
element._ripple.showTimerCommit = null;
|
|
}
|
|
window.clearTimeout(element._ripple.showTimer);
|
|
}
|
|
var keyboardRipple = false;
|
|
function keyboardRippleShow(e) {
|
|
if (!keyboardRipple && (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)) {
|
|
keyboardRipple = true;
|
|
rippleShow(e);
|
|
}
|
|
}
|
|
function keyboardRippleHide(e) {
|
|
keyboardRipple = false;
|
|
rippleHide(e);
|
|
}
|
|
function focusRippleHide(e) {
|
|
if (keyboardRipple) {
|
|
keyboardRipple = false;
|
|
rippleHide(e);
|
|
}
|
|
}
|
|
function updateRipple(el, binding, wasEnabled) {
|
|
const {
|
|
value,
|
|
modifiers
|
|
} = binding;
|
|
const enabled = isRippleEnabled(value);
|
|
if (!enabled) {
|
|
ripples.hide(el);
|
|
}
|
|
el._ripple = el._ripple ?? {};
|
|
el._ripple.enabled = enabled;
|
|
el._ripple.centered = modifiers.center;
|
|
el._ripple.circle = modifiers.circle;
|
|
if (isObject(value) && value.class) {
|
|
el._ripple.class = value.class;
|
|
}
|
|
if (enabled && !wasEnabled) {
|
|
if (modifiers.stop) {
|
|
el.addEventListener("touchstart", rippleStop, {
|
|
passive: true
|
|
});
|
|
el.addEventListener("mousedown", rippleStop);
|
|
return;
|
|
}
|
|
el.addEventListener("touchstart", rippleShow, {
|
|
passive: true
|
|
});
|
|
el.addEventListener("touchend", rippleHide, {
|
|
passive: true
|
|
});
|
|
el.addEventListener("touchmove", rippleCancelShow, {
|
|
passive: true
|
|
});
|
|
el.addEventListener("touchcancel", rippleHide);
|
|
el.addEventListener("mousedown", rippleShow);
|
|
el.addEventListener("mouseup", rippleHide);
|
|
el.addEventListener("mouseleave", rippleHide);
|
|
el.addEventListener("keydown", keyboardRippleShow);
|
|
el.addEventListener("keyup", keyboardRippleHide);
|
|
el.addEventListener("blur", focusRippleHide);
|
|
el.addEventListener("dragstart", rippleHide, {
|
|
passive: true
|
|
});
|
|
} else if (!enabled && wasEnabled) {
|
|
removeListeners(el);
|
|
}
|
|
}
|
|
function removeListeners(el) {
|
|
el.removeEventListener("mousedown", rippleShow);
|
|
el.removeEventListener("touchstart", rippleShow);
|
|
el.removeEventListener("touchend", rippleHide);
|
|
el.removeEventListener("touchmove", rippleCancelShow);
|
|
el.removeEventListener("touchcancel", rippleHide);
|
|
el.removeEventListener("mouseup", rippleHide);
|
|
el.removeEventListener("mouseleave", rippleHide);
|
|
el.removeEventListener("keydown", keyboardRippleShow);
|
|
el.removeEventListener("keyup", keyboardRippleHide);
|
|
el.removeEventListener("dragstart", rippleHide);
|
|
el.removeEventListener("blur", focusRippleHide);
|
|
}
|
|
function mounted2(el, binding) {
|
|
updateRipple(el, binding, false);
|
|
}
|
|
function unmounted2(el) {
|
|
delete el._ripple;
|
|
removeListeners(el);
|
|
}
|
|
function updated(el, binding) {
|
|
if (binding.value === binding.oldValue) {
|
|
return;
|
|
}
|
|
const wasEnabled = isRippleEnabled(binding.oldValue);
|
|
updateRipple(el, binding, wasEnabled);
|
|
}
|
|
var Ripple = {
|
|
mounted: mounted2,
|
|
unmounted: unmounted2,
|
|
updated
|
|
};
|
|
var ripple_default = Ripple;
|
|
|
|
// node_modules/vuetify/lib/directives/click-outside/index.mjs
|
|
function defaultConditional() {
|
|
return true;
|
|
}
|
|
function checkEvent(e, el, binding) {
|
|
if (!e || checkIsActive(e, binding) === false) return false;
|
|
const root = attachedRoot(el);
|
|
if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot && root.host === e.target) return false;
|
|
const elements = (typeof binding.value === "object" && binding.value.include || (() => []))();
|
|
elements.push(el);
|
|
return !elements.some((el2) => el2 == null ? void 0 : el2.contains(e.target));
|
|
}
|
|
function checkIsActive(e, binding) {
|
|
const isActive = typeof binding.value === "object" && binding.value.closeConditional || defaultConditional;
|
|
return isActive(e);
|
|
}
|
|
function directive(e, el, binding) {
|
|
const handler = typeof binding.value === "function" ? binding.value : binding.value.handler;
|
|
e.shadowTarget = e.target;
|
|
el._clickOutside.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {
|
|
checkIsActive(e, binding) && handler && handler(e);
|
|
}, 0);
|
|
}
|
|
function handleShadow(el, callback) {
|
|
const root = attachedRoot(el);
|
|
callback(document);
|
|
if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot) {
|
|
callback(root);
|
|
}
|
|
}
|
|
var ClickOutside = {
|
|
// [data-app] may not be found
|
|
// if using bind, inserted makes
|
|
// sure that the root element is
|
|
// available, iOS does not support
|
|
// clicks on body
|
|
mounted(el, binding) {
|
|
const onClick = (e) => directive(e, el, binding);
|
|
const onMousedown = (e) => {
|
|
el._clickOutside.lastMousedownWasOutside = checkEvent(e, el, binding);
|
|
};
|
|
handleShadow(el, (app) => {
|
|
app.addEventListener("click", onClick, true);
|
|
app.addEventListener("mousedown", onMousedown, true);
|
|
});
|
|
if (!el._clickOutside) {
|
|
el._clickOutside = {
|
|
lastMousedownWasOutside: false
|
|
};
|
|
}
|
|
el._clickOutside[binding.instance.$.uid] = {
|
|
onClick,
|
|
onMousedown
|
|
};
|
|
},
|
|
beforeUnmount(el, binding) {
|
|
if (!el._clickOutside) return;
|
|
handleShadow(el, (app) => {
|
|
var _a;
|
|
if (!app || !((_a = el._clickOutside) == null ? void 0 : _a[binding.instance.$.uid])) return;
|
|
const {
|
|
onClick,
|
|
onMousedown
|
|
} = el._clickOutside[binding.instance.$.uid];
|
|
app.removeEventListener("click", onClick, true);
|
|
app.removeEventListener("mousedown", onMousedown, true);
|
|
});
|
|
delete el._clickOutside[binding.instance.$.uid];
|
|
}
|
|
};
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs
|
|
import "/home/thais/front_face_recognition/node_modules/vuetify/lib/components/VOverlay/VOverlay.css";
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/util/point.mjs
|
|
function elementToViewport(point, offset) {
|
|
return {
|
|
x: point.x + offset.x,
|
|
y: point.y + offset.y
|
|
};
|
|
}
|
|
function getOffset(a, b) {
|
|
return {
|
|
x: a.x - b.x,
|
|
y: a.y - b.y
|
|
};
|
|
}
|
|
function anchorToPoint(anchor, box) {
|
|
if (anchor.side === "top" || anchor.side === "bottom") {
|
|
const {
|
|
side,
|
|
align
|
|
} = anchor;
|
|
const x = align === "left" ? 0 : align === "center" ? box.width / 2 : align === "right" ? box.width : align;
|
|
const y = side === "top" ? 0 : side === "bottom" ? box.height : side;
|
|
return elementToViewport({
|
|
x,
|
|
y
|
|
}, box);
|
|
} else if (anchor.side === "left" || anchor.side === "right") {
|
|
const {
|
|
side,
|
|
align
|
|
} = anchor;
|
|
const x = side === "left" ? 0 : side === "right" ? box.width : side;
|
|
const y = align === "top" ? 0 : align === "center" ? box.height / 2 : align === "bottom" ? box.height : align;
|
|
return elementToViewport({
|
|
x,
|
|
y
|
|
}, box);
|
|
}
|
|
return elementToViewport({
|
|
x: box.width / 2,
|
|
y: box.height / 2
|
|
}, box);
|
|
}
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/locationStrategies.mjs
|
|
var locationStrategies = {
|
|
static: staticLocationStrategy,
|
|
// specific viewport position, usually centered
|
|
connected: connectedLocationStrategy
|
|
// connected to a certain element
|
|
};
|
|
var makeLocationStrategyProps = propsFactory({
|
|
locationStrategy: {
|
|
type: [String, Function],
|
|
default: "static",
|
|
validator: (val) => typeof val === "function" || val in locationStrategies
|
|
},
|
|
location: {
|
|
type: String,
|
|
default: "bottom"
|
|
},
|
|
origin: {
|
|
type: String,
|
|
default: "auto"
|
|
},
|
|
offset: [Number, String, Array]
|
|
}, "VOverlay-location-strategies");
|
|
function useLocationStrategies(props, data) {
|
|
const contentStyles = ref({});
|
|
const updateLocation = ref();
|
|
if (IN_BROWSER) {
|
|
useToggleScope(() => !!(data.isActive.value && props.locationStrategy), (reset) => {
|
|
var _a, _b;
|
|
watch(() => props.locationStrategy, reset);
|
|
onScopeDispose(() => {
|
|
window.removeEventListener("resize", onResize);
|
|
updateLocation.value = void 0;
|
|
});
|
|
window.addEventListener("resize", onResize, {
|
|
passive: true
|
|
});
|
|
if (typeof props.locationStrategy === "function") {
|
|
updateLocation.value = (_a = props.locationStrategy(data, props, contentStyles)) == null ? void 0 : _a.updateLocation;
|
|
} else {
|
|
updateLocation.value = (_b = locationStrategies[props.locationStrategy](data, props, contentStyles)) == null ? void 0 : _b.updateLocation;
|
|
}
|
|
});
|
|
}
|
|
function onResize(e) {
|
|
var _a;
|
|
(_a = updateLocation.value) == null ? void 0 : _a.call(updateLocation, e);
|
|
}
|
|
return {
|
|
contentStyles,
|
|
updateLocation
|
|
};
|
|
}
|
|
function staticLocationStrategy() {
|
|
}
|
|
function getIntrinsicSize(el, isRtl) {
|
|
const contentBox = nullifyTransforms(el);
|
|
if (isRtl) {
|
|
contentBox.x += parseFloat(el.style.right || 0);
|
|
} else {
|
|
contentBox.x -= parseFloat(el.style.left || 0);
|
|
}
|
|
contentBox.y -= parseFloat(el.style.top || 0);
|
|
return contentBox;
|
|
}
|
|
function connectedLocationStrategy(data, props, contentStyles) {
|
|
const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
|
|
if (activatorFixed) {
|
|
Object.assign(contentStyles.value, {
|
|
position: "fixed",
|
|
top: 0,
|
|
[data.isRtl.value ? "right" : "left"]: 0
|
|
});
|
|
}
|
|
const {
|
|
preferredAnchor,
|
|
preferredOrigin
|
|
} = destructComputed(() => {
|
|
const parsedAnchor = parseAnchor(props.location, data.isRtl.value);
|
|
const parsedOrigin = props.origin === "overlap" ? parsedAnchor : props.origin === "auto" ? flipSide(parsedAnchor) : parseAnchor(props.origin, data.isRtl.value);
|
|
if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {
|
|
return {
|
|
preferredAnchor: flipCorner(parsedAnchor),
|
|
preferredOrigin: flipCorner(parsedOrigin)
|
|
};
|
|
} else {
|
|
return {
|
|
preferredAnchor: parsedAnchor,
|
|
preferredOrigin: parsedOrigin
|
|
};
|
|
}
|
|
});
|
|
const [minWidth, minHeight, maxWidth, maxHeight] = ["minWidth", "minHeight", "maxWidth", "maxHeight"].map((key) => {
|
|
return computed(() => {
|
|
const val = parseFloat(props[key]);
|
|
return isNaN(val) ? Infinity : val;
|
|
});
|
|
});
|
|
const offset = computed(() => {
|
|
if (Array.isArray(props.offset)) {
|
|
return props.offset;
|
|
}
|
|
if (typeof props.offset === "string") {
|
|
const offset2 = props.offset.split(" ").map(parseFloat);
|
|
if (offset2.length < 2) offset2.push(0);
|
|
return offset2;
|
|
}
|
|
return typeof props.offset === "number" ? [props.offset, 0] : [0, 0];
|
|
});
|
|
let observe = false;
|
|
const observer = new ResizeObserver(() => {
|
|
if (observe) updateLocation();
|
|
});
|
|
watch([data.target, data.contentEl], (_ref, _ref2) => {
|
|
let [newTarget, newContentEl] = _ref;
|
|
let [oldTarget, oldContentEl] = _ref2;
|
|
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
|
if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
|
|
if (oldContentEl) observer.unobserve(oldContentEl);
|
|
if (newContentEl) observer.observe(newContentEl);
|
|
}, {
|
|
immediate: true
|
|
});
|
|
onScopeDispose(() => {
|
|
observer.disconnect();
|
|
});
|
|
function updateLocation() {
|
|
observe = false;
|
|
requestAnimationFrame(() => observe = true);
|
|
if (!data.target.value || !data.contentEl.value) return;
|
|
const targetBox = getTargetBox(data.target.value);
|
|
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
|
const scrollParents = getScrollParents(data.contentEl.value);
|
|
const viewportMargin = 12;
|
|
if (!scrollParents.length) {
|
|
scrollParents.push(document.documentElement);
|
|
if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {
|
|
contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x") || 0);
|
|
contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y") || 0);
|
|
}
|
|
}
|
|
const viewport = scrollParents.reduce((box, el) => {
|
|
const rect = el.getBoundingClientRect();
|
|
const scrollBox = new Box({
|
|
x: el === document.documentElement ? 0 : rect.x,
|
|
y: el === document.documentElement ? 0 : rect.y,
|
|
width: el.clientWidth,
|
|
height: el.clientHeight
|
|
});
|
|
if (box) {
|
|
return new Box({
|
|
x: Math.max(box.left, scrollBox.left),
|
|
y: Math.max(box.top, scrollBox.top),
|
|
width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),
|
|
height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top)
|
|
});
|
|
}
|
|
return scrollBox;
|
|
}, void 0);
|
|
viewport.x += viewportMargin;
|
|
viewport.y += viewportMargin;
|
|
viewport.width -= viewportMargin * 2;
|
|
viewport.height -= viewportMargin * 2;
|
|
let placement = {
|
|
anchor: preferredAnchor.value,
|
|
origin: preferredOrigin.value
|
|
};
|
|
function checkOverflow(_placement) {
|
|
const box = new Box(contentBox);
|
|
const targetPoint = anchorToPoint(_placement.anchor, targetBox);
|
|
const contentPoint = anchorToPoint(_placement.origin, box);
|
|
let {
|
|
x: x2,
|
|
y: y2
|
|
} = getOffset(targetPoint, contentPoint);
|
|
switch (_placement.anchor.side) {
|
|
case "top":
|
|
y2 -= offset.value[0];
|
|
break;
|
|
case "bottom":
|
|
y2 += offset.value[0];
|
|
break;
|
|
case "left":
|
|
x2 -= offset.value[0];
|
|
break;
|
|
case "right":
|
|
x2 += offset.value[0];
|
|
break;
|
|
}
|
|
switch (_placement.anchor.align) {
|
|
case "top":
|
|
y2 -= offset.value[1];
|
|
break;
|
|
case "bottom":
|
|
y2 += offset.value[1];
|
|
break;
|
|
case "left":
|
|
x2 -= offset.value[1];
|
|
break;
|
|
case "right":
|
|
x2 += offset.value[1];
|
|
break;
|
|
}
|
|
box.x += x2;
|
|
box.y += y2;
|
|
box.width = Math.min(box.width, maxWidth.value);
|
|
box.height = Math.min(box.height, maxHeight.value);
|
|
const overflows = getOverflow(box, viewport);
|
|
return {
|
|
overflows,
|
|
x: x2,
|
|
y: y2
|
|
};
|
|
}
|
|
let x = 0;
|
|
let y = 0;
|
|
const available = {
|
|
x: 0,
|
|
y: 0
|
|
};
|
|
const flipped = {
|
|
x: false,
|
|
y: false
|
|
};
|
|
let resets = -1;
|
|
while (true) {
|
|
if (resets++ > 10) {
|
|
consoleError("Infinite loop detected in connectedLocationStrategy");
|
|
break;
|
|
}
|
|
const {
|
|
x: _x,
|
|
y: _y,
|
|
overflows
|
|
} = checkOverflow(placement);
|
|
x += _x;
|
|
y += _y;
|
|
contentBox.x += _x;
|
|
contentBox.y += _y;
|
|
{
|
|
const axis2 = getAxis(placement.anchor);
|
|
const hasOverflowX = overflows.x.before || overflows.x.after;
|
|
const hasOverflowY = overflows.y.before || overflows.y.after;
|
|
let reset = false;
|
|
["x", "y"].forEach((key) => {
|
|
if (key === "x" && hasOverflowX && !flipped.x || key === "y" && hasOverflowY && !flipped.y) {
|
|
const newPlacement = {
|
|
anchor: {
|
|
...placement.anchor
|
|
},
|
|
origin: {
|
|
...placement.origin
|
|
}
|
|
};
|
|
const flip = key === "x" ? axis2 === "y" ? flipAlign : flipSide : axis2 === "y" ? flipSide : flipAlign;
|
|
newPlacement.anchor = flip(newPlacement.anchor);
|
|
newPlacement.origin = flip(newPlacement.origin);
|
|
const {
|
|
overflows: newOverflows
|
|
} = checkOverflow(newPlacement);
|
|
if (newOverflows[key].before <= overflows[key].before && newOverflows[key].after <= overflows[key].after || newOverflows[key].before + newOverflows[key].after < (overflows[key].before + overflows[key].after) / 2) {
|
|
placement = newPlacement;
|
|
reset = flipped[key] = true;
|
|
}
|
|
}
|
|
});
|
|
if (reset) continue;
|
|
}
|
|
if (overflows.x.before) {
|
|
x += overflows.x.before;
|
|
contentBox.x += overflows.x.before;
|
|
}
|
|
if (overflows.x.after) {
|
|
x -= overflows.x.after;
|
|
contentBox.x -= overflows.x.after;
|
|
}
|
|
if (overflows.y.before) {
|
|
y += overflows.y.before;
|
|
contentBox.y += overflows.y.before;
|
|
}
|
|
if (overflows.y.after) {
|
|
y -= overflows.y.after;
|
|
contentBox.y -= overflows.y.after;
|
|
}
|
|
{
|
|
const overflows2 = getOverflow(contentBox, viewport);
|
|
available.x = viewport.width - overflows2.x.before - overflows2.x.after;
|
|
available.y = viewport.height - overflows2.y.before - overflows2.y.after;
|
|
x += overflows2.x.before;
|
|
contentBox.x += overflows2.x.before;
|
|
y += overflows2.y.before;
|
|
contentBox.y += overflows2.y.before;
|
|
}
|
|
break;
|
|
}
|
|
const axis = getAxis(placement.anchor);
|
|
Object.assign(contentStyles.value, {
|
|
"--v-overlay-anchor-origin": `${placement.anchor.side} ${placement.anchor.align}`,
|
|
transformOrigin: `${placement.origin.side} ${placement.origin.align}`,
|
|
// transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,
|
|
top: convertToUnit(pixelRound(y)),
|
|
left: data.isRtl.value ? void 0 : convertToUnit(pixelRound(x)),
|
|
right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : void 0,
|
|
minWidth: convertToUnit(axis === "y" ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
|
|
maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
|
maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
|
});
|
|
return {
|
|
available,
|
|
contentBox
|
|
};
|
|
}
|
|
watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation());
|
|
nextTick(() => {
|
|
const result = updateLocation();
|
|
if (!result) return;
|
|
const {
|
|
available,
|
|
contentBox
|
|
} = result;
|
|
if (contentBox.height > available.y) {
|
|
requestAnimationFrame(() => {
|
|
updateLocation();
|
|
requestAnimationFrame(() => {
|
|
updateLocation();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
return {
|
|
updateLocation
|
|
};
|
|
}
|
|
function pixelRound(val) {
|
|
return Math.round(val * devicePixelRatio) / devicePixelRatio;
|
|
}
|
|
function pixelCeil(val) {
|
|
return Math.ceil(val * devicePixelRatio) / devicePixelRatio;
|
|
}
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/requestNewFrame.mjs
|
|
var clean = true;
|
|
var frames = [];
|
|
function requestNewFrame(cb) {
|
|
if (!clean || frames.length) {
|
|
frames.push(cb);
|
|
run();
|
|
} else {
|
|
clean = false;
|
|
cb();
|
|
run();
|
|
}
|
|
}
|
|
var raf = -1;
|
|
function run() {
|
|
cancelAnimationFrame(raf);
|
|
raf = requestAnimationFrame(() => {
|
|
const frame = frames.shift();
|
|
if (frame) frame();
|
|
if (frames.length) run();
|
|
else clean = true;
|
|
});
|
|
}
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/scrollStrategies.mjs
|
|
var scrollStrategies = {
|
|
none: null,
|
|
close: closeScrollStrategy,
|
|
block: blockScrollStrategy,
|
|
reposition: repositionScrollStrategy
|
|
};
|
|
var makeScrollStrategyProps = propsFactory({
|
|
scrollStrategy: {
|
|
type: [String, Function],
|
|
default: "block",
|
|
validator: (val) => typeof val === "function" || val in scrollStrategies
|
|
}
|
|
}, "VOverlay-scroll-strategies");
|
|
function useScrollStrategies(props, data) {
|
|
if (!IN_BROWSER) return;
|
|
let scope;
|
|
watchEffect(async () => {
|
|
scope == null ? void 0 : scope.stop();
|
|
if (!(data.isActive.value && props.scrollStrategy)) return;
|
|
scope = effectScope();
|
|
await new Promise((resolve) => setTimeout(resolve));
|
|
scope.active && scope.run(() => {
|
|
var _a;
|
|
if (typeof props.scrollStrategy === "function") {
|
|
props.scrollStrategy(data, props, scope);
|
|
} else {
|
|
(_a = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _a.call(scrollStrategies, data, props, scope);
|
|
}
|
|
});
|
|
});
|
|
onScopeDispose(() => {
|
|
scope == null ? void 0 : scope.stop();
|
|
});
|
|
}
|
|
function closeScrollStrategy(data) {
|
|
function onScroll(e) {
|
|
data.isActive.value = false;
|
|
}
|
|
bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
|
|
}
|
|
function blockScrollStrategy(data, props) {
|
|
var _a;
|
|
const offsetParent = (_a = data.root.value) == null ? void 0 : _a.offsetParent;
|
|
const scrollElements = [.../* @__PURE__ */ new Set([...getScrollParents(data.targetEl.value, props.contained ? offsetParent : void 0), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : void 0)])].filter((el) => !el.classList.contains("v-overlay-scroll-blocked"));
|
|
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
const scrollableParent = ((el) => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
|
if (scrollableParent) {
|
|
data.root.value.classList.add("v-overlay--scroll-blocked");
|
|
}
|
|
scrollElements.forEach((el, i) => {
|
|
el.style.setProperty("--v-body-scroll-x", convertToUnit(-el.scrollLeft));
|
|
el.style.setProperty("--v-body-scroll-y", convertToUnit(-el.scrollTop));
|
|
if (el !== document.documentElement) {
|
|
el.style.setProperty("--v-scrollbar-offset", convertToUnit(scrollbarWidth));
|
|
}
|
|
el.classList.add("v-overlay-scroll-blocked");
|
|
});
|
|
onScopeDispose(() => {
|
|
scrollElements.forEach((el, i) => {
|
|
const x = parseFloat(el.style.getPropertyValue("--v-body-scroll-x"));
|
|
const y = parseFloat(el.style.getPropertyValue("--v-body-scroll-y"));
|
|
const scrollBehavior = el.style.scrollBehavior;
|
|
el.style.scrollBehavior = "auto";
|
|
el.style.removeProperty("--v-body-scroll-x");
|
|
el.style.removeProperty("--v-body-scroll-y");
|
|
el.style.removeProperty("--v-scrollbar-offset");
|
|
el.classList.remove("v-overlay-scroll-blocked");
|
|
el.scrollLeft = -x;
|
|
el.scrollTop = -y;
|
|
el.style.scrollBehavior = scrollBehavior;
|
|
});
|
|
if (scrollableParent) {
|
|
data.root.value.classList.remove("v-overlay--scroll-blocked");
|
|
}
|
|
});
|
|
}
|
|
function repositionScrollStrategy(data, props, scope) {
|
|
let slow = false;
|
|
let raf2 = -1;
|
|
let ric = -1;
|
|
function update(e) {
|
|
requestNewFrame(() => {
|
|
var _a, _b;
|
|
const start = performance.now();
|
|
(_b = (_a = data.updateLocation).value) == null ? void 0 : _b.call(_a, e);
|
|
const time = performance.now() - start;
|
|
slow = time / (1e3 / 60) > 2;
|
|
});
|
|
}
|
|
ric = (typeof requestIdleCallback === "undefined" ? (cb) => cb() : requestIdleCallback)(() => {
|
|
scope.run(() => {
|
|
bindScroll(data.targetEl.value ?? data.contentEl.value, (e) => {
|
|
if (slow) {
|
|
cancelAnimationFrame(raf2);
|
|
raf2 = requestAnimationFrame(() => {
|
|
raf2 = requestAnimationFrame(() => {
|
|
update(e);
|
|
});
|
|
});
|
|
} else {
|
|
update(e);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
onScopeDispose(() => {
|
|
typeof cancelIdleCallback !== "undefined" && cancelIdleCallback(ric);
|
|
cancelAnimationFrame(raf2);
|
|
});
|
|
}
|
|
function bindScroll(el, onScroll) {
|
|
const scrollElements = [document, ...getScrollParents(el)];
|
|
scrollElements.forEach((el2) => {
|
|
el2.addEventListener("scroll", onScroll, {
|
|
passive: true
|
|
});
|
|
});
|
|
onScopeDispose(() => {
|
|
scrollElements.forEach((el2) => {
|
|
el2.removeEventListener("scroll", onScroll);
|
|
});
|
|
});
|
|
}
|
|
|
|
// node_modules/vuetify/lib/components/VMenu/shared.mjs
|
|
var VMenuSymbol = Symbol.for("vuetify:v-menu");
|
|
|
|
// node_modules/vuetify/lib/composables/delay.mjs
|
|
var makeDelayProps = propsFactory({
|
|
closeDelay: [Number, String],
|
|
openDelay: [Number, String]
|
|
}, "delay");
|
|
function useDelay(props, cb) {
|
|
let clearDelay = () => {
|
|
};
|
|
function runDelay(isOpening) {
|
|
clearDelay == null ? void 0 : clearDelay();
|
|
const delay = Number(isOpening ? props.openDelay : props.closeDelay);
|
|
return new Promise((resolve) => {
|
|
clearDelay = defer(delay, () => {
|
|
cb == null ? void 0 : cb(isOpening);
|
|
resolve(isOpening);
|
|
});
|
|
});
|
|
}
|
|
function runOpenDelay() {
|
|
return runDelay(true);
|
|
}
|
|
function runCloseDelay() {
|
|
return runDelay(false);
|
|
}
|
|
return {
|
|
clearDelay,
|
|
runOpenDelay,
|
|
runCloseDelay
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/useActivator.mjs
|
|
var makeActivatorProps = propsFactory({
|
|
target: [String, Object],
|
|
activator: [String, Object],
|
|
activatorProps: {
|
|
type: Object,
|
|
default: () => ({})
|
|
},
|
|
openOnClick: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
openOnHover: Boolean,
|
|
openOnFocus: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
closeOnContentClick: Boolean,
|
|
...makeDelayProps()
|
|
}, "VOverlay-activator");
|
|
function useActivator(props, _ref) {
|
|
let {
|
|
isActive,
|
|
isTop,
|
|
contentEl
|
|
} = _ref;
|
|
const vm = getCurrentInstance("useActivator");
|
|
const activatorEl = ref();
|
|
let isHovered = false;
|
|
let isFocused = false;
|
|
let firstEnter = true;
|
|
const openOnFocus = computed(() => props.openOnFocus || props.openOnFocus == null && props.openOnHover);
|
|
const openOnClick = computed(() => props.openOnClick || props.openOnClick == null && !props.openOnHover && !openOnFocus.value);
|
|
const {
|
|
runOpenDelay,
|
|
runCloseDelay
|
|
} = useDelay(props, (value) => {
|
|
if (value === (props.openOnHover && isHovered || openOnFocus.value && isFocused) && !(props.openOnHover && isActive.value && !isTop.value)) {
|
|
if (isActive.value !== value) {
|
|
firstEnter = true;
|
|
}
|
|
isActive.value = value;
|
|
}
|
|
});
|
|
const cursorTarget = ref();
|
|
const availableEvents = {
|
|
onClick: (e) => {
|
|
e.stopPropagation();
|
|
activatorEl.value = e.currentTarget || e.target;
|
|
if (!isActive.value) {
|
|
cursorTarget.value = [e.clientX, e.clientY];
|
|
}
|
|
isActive.value = !isActive.value;
|
|
},
|
|
onMouseenter: (e) => {
|
|
var _a;
|
|
if ((_a = e.sourceCapabilities) == null ? void 0 : _a.firesTouchEvents) return;
|
|
isHovered = true;
|
|
activatorEl.value = e.currentTarget || e.target;
|
|
runOpenDelay();
|
|
},
|
|
onMouseleave: (e) => {
|
|
isHovered = false;
|
|
runCloseDelay();
|
|
},
|
|
onFocus: (e) => {
|
|
if (matchesSelector(e.target, ":focus-visible") === false) return;
|
|
isFocused = true;
|
|
e.stopPropagation();
|
|
activatorEl.value = e.currentTarget || e.target;
|
|
runOpenDelay();
|
|
},
|
|
onBlur: (e) => {
|
|
isFocused = false;
|
|
e.stopPropagation();
|
|
runCloseDelay();
|
|
}
|
|
};
|
|
const activatorEvents = computed(() => {
|
|
const events = {};
|
|
if (openOnClick.value) {
|
|
events.onClick = availableEvents.onClick;
|
|
}
|
|
if (props.openOnHover) {
|
|
events.onMouseenter = availableEvents.onMouseenter;
|
|
events.onMouseleave = availableEvents.onMouseleave;
|
|
}
|
|
if (openOnFocus.value) {
|
|
events.onFocus = availableEvents.onFocus;
|
|
events.onBlur = availableEvents.onBlur;
|
|
}
|
|
return events;
|
|
});
|
|
const contentEvents = computed(() => {
|
|
const events = {};
|
|
if (props.openOnHover) {
|
|
events.onMouseenter = () => {
|
|
isHovered = true;
|
|
runOpenDelay();
|
|
};
|
|
events.onMouseleave = () => {
|
|
isHovered = false;
|
|
runCloseDelay();
|
|
};
|
|
}
|
|
if (openOnFocus.value) {
|
|
events.onFocusin = () => {
|
|
isFocused = true;
|
|
runOpenDelay();
|
|
};
|
|
events.onFocusout = () => {
|
|
isFocused = false;
|
|
runCloseDelay();
|
|
};
|
|
}
|
|
if (props.closeOnContentClick) {
|
|
const menu = inject(VMenuSymbol, null);
|
|
events.onClick = () => {
|
|
isActive.value = false;
|
|
menu == null ? void 0 : menu.closeParents();
|
|
};
|
|
}
|
|
return events;
|
|
});
|
|
const scrimEvents = computed(() => {
|
|
const events = {};
|
|
if (props.openOnHover) {
|
|
events.onMouseenter = () => {
|
|
if (firstEnter) {
|
|
isHovered = true;
|
|
firstEnter = false;
|
|
runOpenDelay();
|
|
}
|
|
};
|
|
events.onMouseleave = () => {
|
|
isHovered = false;
|
|
runCloseDelay();
|
|
};
|
|
}
|
|
return events;
|
|
});
|
|
watch(isTop, (val) => {
|
|
var _a;
|
|
if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered)) && !((_a = contentEl.value) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
isActive.value = false;
|
|
}
|
|
});
|
|
watch(isActive, (val) => {
|
|
if (!val) {
|
|
setTimeout(() => {
|
|
cursorTarget.value = void 0;
|
|
});
|
|
}
|
|
}, {
|
|
flush: "post"
|
|
});
|
|
const activatorRef = templateRef();
|
|
watchEffect(() => {
|
|
if (!activatorRef.value) return;
|
|
nextTick(() => {
|
|
activatorEl.value = activatorRef.el;
|
|
});
|
|
});
|
|
const targetRef = templateRef();
|
|
const target = computed(() => {
|
|
if (props.target === "cursor" && cursorTarget.value) return cursorTarget.value;
|
|
if (targetRef.value) return targetRef.el;
|
|
return getTarget(props.target, vm) || activatorEl.value;
|
|
});
|
|
const targetEl = computed(() => {
|
|
return Array.isArray(target.value) ? void 0 : target.value;
|
|
});
|
|
let scope;
|
|
watch(() => !!props.activator, (val) => {
|
|
if (val && IN_BROWSER) {
|
|
scope = effectScope();
|
|
scope.run(() => {
|
|
_useActivator(props, vm, {
|
|
activatorEl,
|
|
activatorEvents
|
|
});
|
|
});
|
|
} else if (scope) {
|
|
scope.stop();
|
|
}
|
|
}, {
|
|
flush: "post",
|
|
immediate: true
|
|
});
|
|
onScopeDispose(() => {
|
|
scope == null ? void 0 : scope.stop();
|
|
});
|
|
return {
|
|
activatorEl,
|
|
activatorRef,
|
|
target,
|
|
targetEl,
|
|
targetRef,
|
|
activatorEvents,
|
|
contentEvents,
|
|
scrimEvents
|
|
};
|
|
}
|
|
function _useActivator(props, vm, _ref2) {
|
|
let {
|
|
activatorEl,
|
|
activatorEvents
|
|
} = _ref2;
|
|
watch(() => props.activator, (val, oldVal) => {
|
|
if (oldVal && val !== oldVal) {
|
|
const activator = getActivator(oldVal);
|
|
activator && unbindActivatorProps(activator);
|
|
}
|
|
if (val) {
|
|
nextTick(() => bindActivatorProps());
|
|
}
|
|
}, {
|
|
immediate: true
|
|
});
|
|
watch(() => props.activatorProps, () => {
|
|
bindActivatorProps();
|
|
});
|
|
onScopeDispose(() => {
|
|
unbindActivatorProps();
|
|
});
|
|
function bindActivatorProps() {
|
|
let el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getActivator();
|
|
let _props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : props.activatorProps;
|
|
if (!el) return;
|
|
bindProps(el, mergeProps(activatorEvents.value, _props));
|
|
}
|
|
function unbindActivatorProps() {
|
|
let el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getActivator();
|
|
let _props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : props.activatorProps;
|
|
if (!el) return;
|
|
unbindProps(el, mergeProps(activatorEvents.value, _props));
|
|
}
|
|
function getActivator() {
|
|
let selector = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : props.activator;
|
|
const activator = getTarget(selector, vm);
|
|
activatorEl.value = (activator == null ? void 0 : activator.nodeType) === Node.ELEMENT_NODE ? activator : void 0;
|
|
return activatorEl.value;
|
|
}
|
|
}
|
|
function getTarget(selector, vm) {
|
|
var _a, _b;
|
|
if (!selector) return;
|
|
let target;
|
|
if (selector === "parent") {
|
|
let el = (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$el) == null ? void 0 : _b.parentNode;
|
|
while (el == null ? void 0 : el.hasAttribute("data-no-activator")) {
|
|
el = el.parentNode;
|
|
}
|
|
target = el;
|
|
} else if (typeof selector === "string") {
|
|
target = document.querySelector(selector);
|
|
} else if ("$el" in selector) {
|
|
target = selector.$el;
|
|
} else {
|
|
target = selector;
|
|
}
|
|
return target;
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/color.mjs
|
|
function useColor(colors) {
|
|
return destructComputed(() => {
|
|
const classes = [];
|
|
const styles = {};
|
|
if (colors.value.background) {
|
|
if (isCssColor(colors.value.background)) {
|
|
styles.backgroundColor = colors.value.background;
|
|
if (!colors.value.text && isParsableColor(colors.value.background)) {
|
|
const backgroundColor = parseColor(colors.value.background);
|
|
if (backgroundColor.a == null || backgroundColor.a === 1) {
|
|
const textColor = getForeground(backgroundColor);
|
|
styles.color = textColor;
|
|
styles.caretColor = textColor;
|
|
}
|
|
}
|
|
} else {
|
|
classes.push(`bg-${colors.value.background}`);
|
|
}
|
|
}
|
|
if (colors.value.text) {
|
|
if (isCssColor(colors.value.text)) {
|
|
styles.color = colors.value.text;
|
|
styles.caretColor = colors.value.text;
|
|
} else {
|
|
classes.push(`text-${colors.value.text}`);
|
|
}
|
|
}
|
|
return {
|
|
colorClasses: classes,
|
|
colorStyles: styles
|
|
};
|
|
});
|
|
}
|
|
function useTextColor(props, name) {
|
|
const colors = computed(() => ({
|
|
text: isRef(props) ? props.value : name ? props[name] : null
|
|
}));
|
|
const {
|
|
colorClasses: textColorClasses,
|
|
colorStyles: textColorStyles
|
|
} = useColor(colors);
|
|
return {
|
|
textColorClasses,
|
|
textColorStyles
|
|
};
|
|
}
|
|
function useBackgroundColor(props, name) {
|
|
const colors = computed(() => ({
|
|
background: isRef(props) ? props.value : name ? props[name] : null
|
|
}));
|
|
const {
|
|
colorClasses: backgroundColorClasses,
|
|
colorStyles: backgroundColorStyles
|
|
} = useColor(colors);
|
|
return {
|
|
backgroundColorClasses,
|
|
backgroundColorStyles
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/dimensions.mjs
|
|
var makeDimensionProps = propsFactory({
|
|
height: [Number, String],
|
|
maxHeight: [Number, String],
|
|
maxWidth: [Number, String],
|
|
minHeight: [Number, String],
|
|
minWidth: [Number, String],
|
|
width: [Number, String]
|
|
}, "dimension");
|
|
function useDimension(props) {
|
|
const dimensionStyles = computed(() => {
|
|
const styles = {};
|
|
const height = convertToUnit(props.height);
|
|
const maxHeight = convertToUnit(props.maxHeight);
|
|
const maxWidth = convertToUnit(props.maxWidth);
|
|
const minHeight = convertToUnit(props.minHeight);
|
|
const minWidth = convertToUnit(props.minWidth);
|
|
const width = convertToUnit(props.width);
|
|
if (height != null) styles.height = height;
|
|
if (maxHeight != null) styles.maxHeight = maxHeight;
|
|
if (maxWidth != null) styles.maxWidth = maxWidth;
|
|
if (minHeight != null) styles.minHeight = minHeight;
|
|
if (minWidth != null) styles.minWidth = minWidth;
|
|
if (width != null) styles.width = width;
|
|
return styles;
|
|
});
|
|
return {
|
|
dimensionStyles
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/hydration.mjs
|
|
function useHydration() {
|
|
if (!IN_BROWSER) return shallowRef(false);
|
|
const {
|
|
ssr
|
|
} = useDisplay();
|
|
if (ssr) {
|
|
const isMounted = shallowRef(false);
|
|
onMounted(() => {
|
|
isMounted.value = true;
|
|
});
|
|
return isMounted;
|
|
} else {
|
|
return shallowRef(true);
|
|
}
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/lazy.mjs
|
|
var makeLazyProps = propsFactory({
|
|
eager: Boolean
|
|
}, "lazy");
|
|
function useLazy(props, active) {
|
|
const isBooted = shallowRef(false);
|
|
const hasContent = computed(() => isBooted.value || props.eager || active.value);
|
|
watch(active, () => isBooted.value = true);
|
|
function onAfterLeave() {
|
|
if (!props.eager) isBooted.value = false;
|
|
}
|
|
return {
|
|
isBooted,
|
|
hasContent,
|
|
onAfterLeave
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/router.mjs
|
|
function useRoute() {
|
|
const vm = getCurrentInstance("useRoute");
|
|
return computed(() => {
|
|
var _a;
|
|
return (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$route;
|
|
});
|
|
}
|
|
function useRouter() {
|
|
var _a, _b;
|
|
return (_b = (_a = getCurrentInstance("useRouter")) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$router;
|
|
}
|
|
function useLink(props, attrs) {
|
|
var _a, _b;
|
|
const RouterLink = resolveDynamicComponent("RouterLink");
|
|
const isLink = computed(() => !!(props.href || props.to));
|
|
const isClickable = computed(() => {
|
|
return (isLink == null ? void 0 : isLink.value) || hasEvent(attrs, "click") || hasEvent(props, "click");
|
|
});
|
|
if (typeof RouterLink === "string" || !("useLink" in RouterLink)) {
|
|
const href2 = toRef(props, "href");
|
|
return {
|
|
isLink,
|
|
isClickable,
|
|
href: href2,
|
|
linkProps: reactive({
|
|
href: href2
|
|
})
|
|
};
|
|
}
|
|
const linkProps = computed(() => ({
|
|
...props,
|
|
to: toRef(() => props.to || "")
|
|
}));
|
|
const routerLink = RouterLink.useLink(linkProps.value);
|
|
const link = computed(() => props.to ? routerLink : void 0);
|
|
const route = useRoute();
|
|
const isActive = computed(() => {
|
|
var _a2, _b2, _c;
|
|
if (!link.value) return false;
|
|
if (!props.exact) return ((_a2 = link.value.isActive) == null ? void 0 : _a2.value) ?? false;
|
|
if (!route.value) return ((_b2 = link.value.isExactActive) == null ? void 0 : _b2.value) ?? false;
|
|
return ((_c = link.value.isExactActive) == null ? void 0 : _c.value) && deepEqual(link.value.route.value.query, route.value.query);
|
|
});
|
|
const href = computed(() => {
|
|
var _a2;
|
|
return props.to ? (_a2 = link.value) == null ? void 0 : _a2.route.value.href : props.href;
|
|
});
|
|
return {
|
|
isLink,
|
|
isClickable,
|
|
isActive,
|
|
route: (_a = link.value) == null ? void 0 : _a.route,
|
|
navigate: (_b = link.value) == null ? void 0 : _b.navigate,
|
|
href,
|
|
linkProps: reactive({
|
|
href,
|
|
"aria-current": computed(() => isActive.value ? "page" : void 0)
|
|
})
|
|
};
|
|
}
|
|
var makeRouterProps = propsFactory({
|
|
href: String,
|
|
replace: Boolean,
|
|
to: [String, Object],
|
|
exact: Boolean
|
|
}, "router");
|
|
var inTransition = false;
|
|
function useBackButton(router, cb) {
|
|
let popped = false;
|
|
let removeBefore;
|
|
let removeAfter;
|
|
if (IN_BROWSER && (router == null ? void 0 : router.beforeEach)) {
|
|
nextTick(() => {
|
|
window.addEventListener("popstate", onPopstate);
|
|
removeBefore = router.beforeEach((to, from, next) => {
|
|
if (!inTransition) {
|
|
setTimeout(() => popped ? cb(next) : next());
|
|
} else {
|
|
popped ? cb(next) : next();
|
|
}
|
|
inTransition = true;
|
|
});
|
|
removeAfter = router == null ? void 0 : router.afterEach(() => {
|
|
inTransition = false;
|
|
});
|
|
});
|
|
onScopeDispose(() => {
|
|
window.removeEventListener("popstate", onPopstate);
|
|
removeBefore == null ? void 0 : removeBefore();
|
|
removeAfter == null ? void 0 : removeAfter();
|
|
});
|
|
}
|
|
function onPopstate(e) {
|
|
var _a;
|
|
if ((_a = e.state) == null ? void 0 : _a.replaced) return;
|
|
popped = true;
|
|
setTimeout(() => popped = false);
|
|
}
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/scopeId.mjs
|
|
function useScopeId() {
|
|
const vm = getCurrentInstance("useScopeId");
|
|
const scopeId = vm.vnode.scopeId;
|
|
return {
|
|
scopeId: scopeId ? {
|
|
[scopeId]: ""
|
|
} : void 0
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/stack.mjs
|
|
var StackSymbol = Symbol.for("vuetify:stack");
|
|
var globalStack = reactive([]);
|
|
function useStack(isActive, zIndex, disableGlobalStack) {
|
|
const vm = getCurrentInstance("useStack");
|
|
const createStackEntry = !disableGlobalStack;
|
|
const parent = inject(StackSymbol, void 0);
|
|
const stack = reactive({
|
|
activeChildren: /* @__PURE__ */ new Set()
|
|
});
|
|
provide(StackSymbol, stack);
|
|
const _zIndex = shallowRef(+zIndex.value);
|
|
useToggleScope(isActive, () => {
|
|
var _a;
|
|
const lastZIndex = (_a = globalStack.at(-1)) == null ? void 0 : _a[1];
|
|
_zIndex.value = lastZIndex ? lastZIndex + 10 : +zIndex.value;
|
|
if (createStackEntry) {
|
|
globalStack.push([vm.uid, _zIndex.value]);
|
|
}
|
|
parent == null ? void 0 : parent.activeChildren.add(vm.uid);
|
|
onScopeDispose(() => {
|
|
if (createStackEntry) {
|
|
const idx = toRaw(globalStack).findIndex((v) => v[0] === vm.uid);
|
|
globalStack.splice(idx, 1);
|
|
}
|
|
parent == null ? void 0 : parent.activeChildren.delete(vm.uid);
|
|
});
|
|
});
|
|
const globalTop = shallowRef(true);
|
|
if (createStackEntry) {
|
|
watchEffect(() => {
|
|
var _a;
|
|
const _isTop = ((_a = globalStack.at(-1)) == null ? void 0 : _a[0]) === vm.uid;
|
|
setTimeout(() => globalTop.value = _isTop);
|
|
});
|
|
}
|
|
const localTop = computed(() => !stack.activeChildren.size);
|
|
return {
|
|
globalTop: readonly(globalTop),
|
|
localTop,
|
|
stackStyles: computed(() => ({
|
|
zIndex: _zIndex.value
|
|
}))
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/teleport.mjs
|
|
function useTeleport(target) {
|
|
const teleportTarget = computed(() => {
|
|
const _target = target();
|
|
if (_target === true || !IN_BROWSER) return void 0;
|
|
const targetElement = _target === false ? document.body : typeof _target === "string" ? document.querySelector(_target) : _target;
|
|
if (targetElement == null) {
|
|
warn(`Unable to locate target ${_target}`);
|
|
return void 0;
|
|
}
|
|
let container = [...targetElement.children].find((el) => el.matches(".v-overlay-container"));
|
|
if (!container) {
|
|
container = document.createElement("div");
|
|
container.className = "v-overlay-container";
|
|
targetElement.appendChild(container);
|
|
}
|
|
return container;
|
|
});
|
|
return {
|
|
teleportTarget
|
|
};
|
|
}
|
|
|
|
// node_modules/vuetify/lib/composables/transition.mjs
|
|
var makeTransitionProps = propsFactory({
|
|
transition: {
|
|
type: [Boolean, String, Object],
|
|
default: "fade-transition",
|
|
validator: (val) => val !== true
|
|
}
|
|
}, "transition");
|
|
var MaybeTransition = (props, _ref) => {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const {
|
|
transition,
|
|
disabled,
|
|
group,
|
|
...rest
|
|
} = props;
|
|
const {
|
|
component = group ? TransitionGroup : Transition,
|
|
...customProps
|
|
} = typeof transition === "object" ? transition : {};
|
|
return h(component, mergeProps(typeof transition === "string" ? {
|
|
name: disabled ? "" : transition
|
|
} : customProps, typeof transition === "string" ? {} : Object.fromEntries(Object.entries({
|
|
disabled,
|
|
group
|
|
}).filter((_ref2) => {
|
|
let [_, v] = _ref2;
|
|
return v !== void 0;
|
|
})), rest), slots);
|
|
};
|
|
|
|
// node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs
|
|
function Scrim(props) {
|
|
const {
|
|
modelValue,
|
|
color,
|
|
...rest
|
|
} = props;
|
|
return createVNode(Transition, {
|
|
"name": "fade-transition",
|
|
"appear": true
|
|
}, {
|
|
default: () => [props.modelValue && createVNode("div", mergeProps({
|
|
"class": ["v-overlay__scrim", props.color.backgroundColorClasses.value],
|
|
"style": props.color.backgroundColorStyles.value
|
|
}, rest), null)]
|
|
});
|
|
}
|
|
var makeVOverlayProps = propsFactory({
|
|
absolute: Boolean,
|
|
attach: [Boolean, String, Object],
|
|
closeOnBack: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
contained: Boolean,
|
|
contentClass: null,
|
|
contentProps: null,
|
|
disabled: Boolean,
|
|
opacity: [Number, String],
|
|
noClickAnimation: Boolean,
|
|
modelValue: Boolean,
|
|
persistent: Boolean,
|
|
scrim: {
|
|
type: [Boolean, String],
|
|
default: true
|
|
},
|
|
zIndex: {
|
|
type: [Number, String],
|
|
default: 2e3
|
|
},
|
|
...makeActivatorProps(),
|
|
...makeComponentProps(),
|
|
...makeDimensionProps(),
|
|
...makeLazyProps(),
|
|
...makeLocationStrategyProps(),
|
|
...makeScrollStrategyProps(),
|
|
...makeThemeProps(),
|
|
...makeTransitionProps()
|
|
}, "VOverlay");
|
|
var VOverlay = genericComponent()({
|
|
name: "VOverlay",
|
|
directives: {
|
|
ClickOutside
|
|
},
|
|
inheritAttrs: false,
|
|
props: {
|
|
_disableGlobalStack: Boolean,
|
|
...makeVOverlayProps()
|
|
},
|
|
emits: {
|
|
"click:outside": (e) => true,
|
|
"update:modelValue": (value) => true,
|
|
afterEnter: () => true,
|
|
afterLeave: () => true
|
|
},
|
|
setup(props, _ref) {
|
|
let {
|
|
slots,
|
|
attrs,
|
|
emit
|
|
} = _ref;
|
|
const vm = getCurrentInstance("VOverlay");
|
|
const root = ref();
|
|
const scrimEl = ref();
|
|
const contentEl = ref();
|
|
const model = useProxiedModel(props, "modelValue");
|
|
const isActive = computed({
|
|
get: () => model.value,
|
|
set: (v) => {
|
|
if (!(v && props.disabled)) model.value = v;
|
|
}
|
|
});
|
|
const {
|
|
themeClasses
|
|
} = provideTheme(props);
|
|
const {
|
|
rtlClasses,
|
|
isRtl
|
|
} = useRtl();
|
|
const {
|
|
hasContent,
|
|
onAfterLeave: _onAfterLeave
|
|
} = useLazy(props, isActive);
|
|
const scrimColor = useBackgroundColor(computed(() => {
|
|
return typeof props.scrim === "string" ? props.scrim : null;
|
|
}));
|
|
const {
|
|
globalTop,
|
|
localTop,
|
|
stackStyles
|
|
} = useStack(isActive, toRef(props, "zIndex"), props._disableGlobalStack);
|
|
const {
|
|
activatorEl,
|
|
activatorRef,
|
|
target,
|
|
targetEl,
|
|
targetRef,
|
|
activatorEvents,
|
|
contentEvents,
|
|
scrimEvents
|
|
} = useActivator(props, {
|
|
isActive,
|
|
isTop: localTop,
|
|
contentEl
|
|
});
|
|
const {
|
|
teleportTarget
|
|
} = useTeleport(() => {
|
|
var _a, _b, _c;
|
|
const target2 = props.attach || props.contained;
|
|
if (target2) return target2;
|
|
const rootNode = ((_a = activatorEl == null ? void 0 : activatorEl.value) == null ? void 0 : _a.getRootNode()) || ((_c = (_b = vm.proxy) == null ? void 0 : _b.$el) == null ? void 0 : _c.getRootNode());
|
|
if (rootNode instanceof ShadowRoot) return rootNode;
|
|
return false;
|
|
});
|
|
const {
|
|
dimensionStyles
|
|
} = useDimension(props);
|
|
const isMounted = useHydration();
|
|
const {
|
|
scopeId
|
|
} = useScopeId();
|
|
watch(() => props.disabled, (v) => {
|
|
if (v) isActive.value = false;
|
|
});
|
|
const {
|
|
contentStyles,
|
|
updateLocation
|
|
} = useLocationStrategies(props, {
|
|
isRtl,
|
|
contentEl,
|
|
target,
|
|
isActive
|
|
});
|
|
useScrollStrategies(props, {
|
|
root,
|
|
contentEl,
|
|
targetEl,
|
|
isActive,
|
|
updateLocation
|
|
});
|
|
function onClickOutside(e) {
|
|
emit("click:outside", e);
|
|
if (!props.persistent) isActive.value = false;
|
|
else animateClick();
|
|
}
|
|
function closeConditional(e) {
|
|
return isActive.value && globalTop.value && // If using scrim, only close if clicking on it rather than anything opened on top
|
|
(!props.scrim || e.target === scrimEl.value || e instanceof MouseEvent && e.shadowTarget === scrimEl.value);
|
|
}
|
|
IN_BROWSER && watch(isActive, (val) => {
|
|
if (val) {
|
|
window.addEventListener("keydown", onKeydown);
|
|
} else {
|
|
window.removeEventListener("keydown", onKeydown);
|
|
}
|
|
}, {
|
|
immediate: true
|
|
});
|
|
onBeforeUnmount(() => {
|
|
if (!IN_BROWSER) return;
|
|
window.removeEventListener("keydown", onKeydown);
|
|
});
|
|
function onKeydown(e) {
|
|
var _a, _b;
|
|
if (e.key === "Escape" && globalTop.value) {
|
|
if (!props.persistent) {
|
|
isActive.value = false;
|
|
if ((_a = contentEl.value) == null ? void 0 : _a.contains(document.activeElement)) {
|
|
(_b = activatorEl.value) == null ? void 0 : _b.focus();
|
|
}
|
|
} else animateClick();
|
|
}
|
|
}
|
|
const router = useRouter();
|
|
useToggleScope(() => props.closeOnBack, () => {
|
|
useBackButton(router, (next) => {
|
|
if (globalTop.value && isActive.value) {
|
|
next(false);
|
|
if (!props.persistent) isActive.value = false;
|
|
else animateClick();
|
|
} else {
|
|
next();
|
|
}
|
|
});
|
|
});
|
|
const top = ref();
|
|
watch(() => isActive.value && (props.absolute || props.contained) && teleportTarget.value == null, (val) => {
|
|
if (val) {
|
|
const scrollParent = getScrollParent(root.value);
|
|
if (scrollParent && scrollParent !== document.scrollingElement) {
|
|
top.value = scrollParent.scrollTop;
|
|
}
|
|
}
|
|
});
|
|
function animateClick() {
|
|
if (props.noClickAnimation) return;
|
|
contentEl.value && animate(contentEl.value, [{
|
|
transformOrigin: "center"
|
|
}, {
|
|
transform: "scale(1.03)"
|
|
}, {
|
|
transformOrigin: "center"
|
|
}], {
|
|
duration: 150,
|
|
easing: standardEasing
|
|
});
|
|
}
|
|
function onAfterEnter() {
|
|
emit("afterEnter");
|
|
}
|
|
function onAfterLeave() {
|
|
_onAfterLeave();
|
|
emit("afterLeave");
|
|
}
|
|
useRender(() => {
|
|
var _a;
|
|
return createVNode(Fragment, null, [(_a = slots.activator) == null ? void 0 : _a.call(slots, {
|
|
isActive: isActive.value,
|
|
targetRef,
|
|
props: mergeProps({
|
|
ref: activatorRef
|
|
}, activatorEvents.value, props.activatorProps)
|
|
}), isMounted.value && hasContent.value && createVNode(Teleport, {
|
|
"disabled": !teleportTarget.value,
|
|
"to": teleportTarget.value
|
|
}, {
|
|
default: () => [createVNode("div", mergeProps({
|
|
"class": ["v-overlay", {
|
|
"v-overlay--absolute": props.absolute || props.contained,
|
|
"v-overlay--active": isActive.value,
|
|
"v-overlay--contained": props.contained
|
|
}, themeClasses.value, rtlClasses.value, props.class],
|
|
"style": [stackStyles.value, {
|
|
"--v-overlay-opacity": props.opacity,
|
|
top: convertToUnit(top.value)
|
|
}, props.style],
|
|
"ref": root
|
|
}, scopeId, attrs), [createVNode(Scrim, mergeProps({
|
|
"color": scrimColor,
|
|
"modelValue": isActive.value && !!props.scrim,
|
|
"ref": scrimEl
|
|
}, scrimEvents.value), null), createVNode(MaybeTransition, {
|
|
"appear": true,
|
|
"persisted": true,
|
|
"transition": props.transition,
|
|
"target": target.value,
|
|
"onAfterEnter": onAfterEnter,
|
|
"onAfterLeave": onAfterLeave
|
|
}, {
|
|
default: () => {
|
|
var _a2;
|
|
return [withDirectives(createVNode("div", mergeProps({
|
|
"ref": contentEl,
|
|
"class": ["v-overlay__content", props.contentClass],
|
|
"style": [dimensionStyles.value, contentStyles.value]
|
|
}, contentEvents.value, props.contentProps), [(_a2 = slots.default) == null ? void 0 : _a2.call(slots, {
|
|
isActive
|
|
})]), [[vShow, isActive.value], [resolveDirective("click-outside"), {
|
|
handler: onClickOutside,
|
|
closeConditional,
|
|
include: () => [activatorEl.value]
|
|
}]])];
|
|
}
|
|
})])]
|
|
})]);
|
|
});
|
|
return {
|
|
activatorEl,
|
|
scrimEl,
|
|
target,
|
|
animateClick,
|
|
contentEl,
|
|
globalTop,
|
|
localTop,
|
|
updateLocation
|
|
};
|
|
}
|
|
});
|
|
|
|
// node_modules/vuetify/lib/directives/touch/index.mjs
|
|
var handleGesture = (wrapper) => {
|
|
const {
|
|
touchstartX,
|
|
touchendX,
|
|
touchstartY,
|
|
touchendY
|
|
} = wrapper;
|
|
const dirRatio = 0.5;
|
|
const minDistance = 16;
|
|
wrapper.offsetX = touchendX - touchstartX;
|
|
wrapper.offsetY = touchendY - touchstartY;
|
|
if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {
|
|
wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper);
|
|
wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper);
|
|
}
|
|
if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {
|
|
wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper);
|
|
wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper);
|
|
}
|
|
};
|
|
function touchstart(event, wrapper) {
|
|
var _a;
|
|
const touch = event.changedTouches[0];
|
|
wrapper.touchstartX = touch.clientX;
|
|
wrapper.touchstartY = touch.clientY;
|
|
(_a = wrapper.start) == null ? void 0 : _a.call(wrapper, {
|
|
originalEvent: event,
|
|
...wrapper
|
|
});
|
|
}
|
|
function touchend(event, wrapper) {
|
|
var _a;
|
|
const touch = event.changedTouches[0];
|
|
wrapper.touchendX = touch.clientX;
|
|
wrapper.touchendY = touch.clientY;
|
|
(_a = wrapper.end) == null ? void 0 : _a.call(wrapper, {
|
|
originalEvent: event,
|
|
...wrapper
|
|
});
|
|
handleGesture(wrapper);
|
|
}
|
|
function touchmove(event, wrapper) {
|
|
var _a;
|
|
const touch = event.changedTouches[0];
|
|
wrapper.touchmoveX = touch.clientX;
|
|
wrapper.touchmoveY = touch.clientY;
|
|
(_a = wrapper.move) == null ? void 0 : _a.call(wrapper, {
|
|
originalEvent: event,
|
|
...wrapper
|
|
});
|
|
}
|
|
function createHandlers() {
|
|
let value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
const wrapper = {
|
|
touchstartX: 0,
|
|
touchstartY: 0,
|
|
touchendX: 0,
|
|
touchendY: 0,
|
|
touchmoveX: 0,
|
|
touchmoveY: 0,
|
|
offsetX: 0,
|
|
offsetY: 0,
|
|
left: value.left,
|
|
right: value.right,
|
|
up: value.up,
|
|
down: value.down,
|
|
start: value.start,
|
|
move: value.move,
|
|
end: value.end
|
|
};
|
|
return {
|
|
touchstart: (e) => touchstart(e, wrapper),
|
|
touchend: (e) => touchend(e, wrapper),
|
|
touchmove: (e) => touchmove(e, wrapper)
|
|
};
|
|
}
|
|
function mounted3(el, binding) {
|
|
var _a;
|
|
const value = binding.value;
|
|
const target = (value == null ? void 0 : value.parent) ? el.parentElement : el;
|
|
const options = (value == null ? void 0 : value.options) ?? {
|
|
passive: true
|
|
};
|
|
const uid = (_a = binding.instance) == null ? void 0 : _a.$.uid;
|
|
if (!target || !uid) return;
|
|
const handlers = createHandlers(binding.value);
|
|
target._touchHandlers = target._touchHandlers ?? /* @__PURE__ */ Object.create(null);
|
|
target._touchHandlers[uid] = handlers;
|
|
keys(handlers).forEach((eventName) => {
|
|
target.addEventListener(eventName, handlers[eventName], options);
|
|
});
|
|
}
|
|
function unmounted3(el, binding) {
|
|
var _a, _b;
|
|
const target = ((_a = binding.value) == null ? void 0 : _a.parent) ? el.parentElement : el;
|
|
const uid = (_b = binding.instance) == null ? void 0 : _b.$.uid;
|
|
if (!(target == null ? void 0 : target._touchHandlers) || !uid) return;
|
|
const handlers = target._touchHandlers[uid];
|
|
keys(handlers).forEach((eventName) => {
|
|
target.removeEventListener(eventName, handlers[eventName]);
|
|
});
|
|
delete target._touchHandlers[uid];
|
|
}
|
|
var Touch = {
|
|
mounted: mounted3,
|
|
unmounted: unmounted3
|
|
};
|
|
var touch_default = Touch;
|
|
|
|
// node_modules/vuetify/lib/components/VTooltip/VTooltip.mjs
|
|
import "/home/thais/front_face_recognition/node_modules/vuetify/lib/components/VTooltip/VTooltip.css";
|
|
|
|
// node_modules/vuetify/lib/composables/forwardRefs.mjs
|
|
var Refs = Symbol("Forwarded refs");
|
|
function getDescriptor(obj, key) {
|
|
let currentObj = obj;
|
|
while (currentObj) {
|
|
const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);
|
|
if (descriptor) return descriptor;
|
|
currentObj = Object.getPrototypeOf(currentObj);
|
|
}
|
|
return void 0;
|
|
}
|
|
function forwardRefs(target) {
|
|
for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
refs[_key - 1] = arguments[_key];
|
|
}
|
|
target[Refs] = refs;
|
|
return new Proxy(target, {
|
|
get(target2, key) {
|
|
if (Reflect.has(target2, key)) {
|
|
return Reflect.get(target2, key);
|
|
}
|
|
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return;
|
|
for (const ref2 of refs) {
|
|
if (ref2.value && Reflect.has(ref2.value, key)) {
|
|
const val = Reflect.get(ref2.value, key);
|
|
return typeof val === "function" ? val.bind(ref2.value) : val;
|
|
}
|
|
}
|
|
},
|
|
has(target2, key) {
|
|
if (Reflect.has(target2, key)) {
|
|
return true;
|
|
}
|
|
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return false;
|
|
for (const ref2 of refs) {
|
|
if (ref2.value && Reflect.has(ref2.value, key)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
},
|
|
set(target2, key, value) {
|
|
if (Reflect.has(target2, key)) {
|
|
return Reflect.set(target2, key, value);
|
|
}
|
|
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return false;
|
|
for (const ref2 of refs) {
|
|
if (ref2.value && Reflect.has(ref2.value, key)) {
|
|
return Reflect.set(ref2.value, key, value);
|
|
}
|
|
}
|
|
return false;
|
|
},
|
|
getOwnPropertyDescriptor(target2, key) {
|
|
var _a;
|
|
const descriptor = Reflect.getOwnPropertyDescriptor(target2, key);
|
|
if (descriptor) return descriptor;
|
|
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return;
|
|
for (const ref2 of refs) {
|
|
if (!ref2.value) continue;
|
|
const descriptor2 = getDescriptor(ref2.value, key) ?? ("_" in ref2.value ? getDescriptor((_a = ref2.value._) == null ? void 0 : _a.setupState, key) : void 0);
|
|
if (descriptor2) return descriptor2;
|
|
}
|
|
for (const ref2 of refs) {
|
|
const childRefs = ref2.value && ref2.value[Refs];
|
|
if (!childRefs) continue;
|
|
const queue = childRefs.slice();
|
|
while (queue.length) {
|
|
const ref3 = queue.shift();
|
|
const descriptor2 = getDescriptor(ref3.value, key);
|
|
if (descriptor2) return descriptor2;
|
|
const childRefs2 = ref3.value && ref3.value[Refs];
|
|
if (childRefs2) queue.push(...childRefs2);
|
|
}
|
|
}
|
|
return void 0;
|
|
}
|
|
});
|
|
}
|
|
|
|
// node_modules/vuetify/lib/components/VTooltip/VTooltip.mjs
|
|
var makeVTooltipProps = propsFactory({
|
|
id: String,
|
|
text: String,
|
|
...omit(makeVOverlayProps({
|
|
closeOnBack: false,
|
|
location: "end",
|
|
locationStrategy: "connected",
|
|
eager: true,
|
|
minWidth: 0,
|
|
offset: 10,
|
|
openOnClick: false,
|
|
openOnHover: true,
|
|
origin: "auto",
|
|
scrim: false,
|
|
scrollStrategy: "reposition",
|
|
transition: false
|
|
}), ["absolute", "persistent"])
|
|
}, "VTooltip");
|
|
var VTooltip = genericComponent()({
|
|
name: "VTooltip",
|
|
props: makeVTooltipProps(),
|
|
emits: {
|
|
"update:modelValue": (value) => true
|
|
},
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const isActive = useProxiedModel(props, "modelValue");
|
|
const {
|
|
scopeId
|
|
} = useScopeId();
|
|
const uid = getUid();
|
|
const id = computed(() => props.id || `v-tooltip-${uid}`);
|
|
const overlay = ref();
|
|
const location = computed(() => {
|
|
return props.location.split(" ").length > 1 ? props.location : props.location + " center";
|
|
});
|
|
const origin = computed(() => {
|
|
return props.origin === "auto" || props.origin === "overlap" || props.origin.split(" ").length > 1 || props.location.split(" ").length > 1 ? props.origin : props.origin + " center";
|
|
});
|
|
const transition = computed(() => {
|
|
if (props.transition) return props.transition;
|
|
return isActive.value ? "scale-transition" : "fade-transition";
|
|
});
|
|
const activatorProps = computed(() => mergeProps({
|
|
"aria-describedby": id.value
|
|
}, props.activatorProps));
|
|
useRender(() => {
|
|
const overlayProps = VOverlay.filterProps(props);
|
|
return createVNode(VOverlay, mergeProps({
|
|
"ref": overlay,
|
|
"class": ["v-tooltip", props.class],
|
|
"style": props.style,
|
|
"id": id.value
|
|
}, overlayProps, {
|
|
"modelValue": isActive.value,
|
|
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
|
"transition": transition.value,
|
|
"absolute": true,
|
|
"location": location.value,
|
|
"origin": origin.value,
|
|
"persistent": true,
|
|
"role": "tooltip",
|
|
"activatorProps": activatorProps.value,
|
|
"_disableGlobalStack": true
|
|
}, scopeId), {
|
|
activator: slots.activator,
|
|
default: function() {
|
|
var _a;
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
return ((_a = slots.default) == null ? void 0 : _a.call(slots, ...args)) ?? props.text;
|
|
}
|
|
});
|
|
});
|
|
return forwardRefs({}, overlay);
|
|
}
|
|
});
|
|
|
|
export {
|
|
makeDimensionProps,
|
|
useDimension,
|
|
useColor,
|
|
useTextColor,
|
|
useBackgroundColor,
|
|
makeTransitionProps,
|
|
MaybeTransition,
|
|
Intersect,
|
|
intersect_default,
|
|
useRouter,
|
|
useLink,
|
|
makeRouterProps,
|
|
Ripple,
|
|
ripple_default,
|
|
VMenuSymbol,
|
|
makeDelayProps,
|
|
useDelay,
|
|
useHydration,
|
|
makeLazyProps,
|
|
useLazy,
|
|
useScopeId,
|
|
ClickOutside,
|
|
makeVOverlayProps,
|
|
VOverlay,
|
|
forwardRefs,
|
|
Touch,
|
|
touch_default,
|
|
VTooltip
|
|
};
|
|
//# sourceMappingURL=chunk-NBH3NANH.js.map
|