🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@react-pdf-kit/viewer

Package Overview
Dependencies
Maintainers
3
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf-kit/viewer - npm Package Compare versions

Comparing version
2.8.0-beta.3
to
2.8.0-beta.4
+21
dist/Button-DBu3SaMk.js
import { t as e } from "./clsx-DSGuh5YW.js";
import { withRef as t } from "./utils/withRef.js";
import { jsx as n } from "react/jsx-runtime";
import './assets/Button.css';//#region lib/components/ui/Button.module.css
var r = {
"rp-button": "_rp-button_xxds9_1",
"rp-button-active": "_rp-button-active_xxds9_20"
}, i = t((t, i) => {
let { children: a, active: o, className: s, role: c, ...l } = t;
return /* @__PURE__ */ n("button", {
tabIndex: 0,
ref: i,
role: c,
"aria-pressed": o === void 0 ? void 0 : o,
...l,
className: e(r["rp-button"], s, o ? r["rp-button-active"] : ""),
children: a
});
});
//#endregion
export { i as t };
import { d as e, f as t, i as n, l as r, n as i, t as a } from "./dist-CgoP608h.js";
import { t as o } from "./dist-CNbFpoT1.js";
import { CheckIcon as s } from "./components/icons/CheckIcon.js";
import * as c from "react";
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
import './assets/Checkbox.css';//#region node_modules/@radix-ui/react-use-previous/dist/index.mjs
function f(e) {
let t = c.useRef({
value: e,
previous: e
});
return c.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
}
//#endregion
//#region node_modules/@radix-ui/react-checkbox/dist/index.mjs
var p = "Checkbox", [m, h] = r(p), [g, _] = m(p);
function v(e) {
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: o, form: s, name: l, onCheckedChange: d, required: f, value: m = "on", internal_do_not_use_render: h } = e, [_, v] = a({
prop: n,
defaultProp: i ?? !1,
onChange: d,
caller: p
}), [y, b] = c.useState(null), [x, S] = c.useState(null), C = c.useRef(!1), w = y ? !!s || !!y.closest("form") : !0, T = {
checked: _,
disabled: o,
setChecked: v,
control: y,
setControl: b,
name: l,
form: s,
value: m,
hasConsumerStoppedPropagationRef: C,
required: f,
defaultChecked: D(i) ? !1 : i,
isFormControl: w,
bubbleInput: x,
setBubbleInput: S
};
return /* @__PURE__ */ u(g, {
scope: t,
...T,
children: E(h) ? h(T) : r
});
}
var y = "CheckboxTrigger", b = c.forwardRef(({ __scopeCheckbox: r, onKeyDown: i, onClick: a, ...o }, s) => {
let { control: l, value: d, disabled: f, checked: p, required: m, setControl: h, setChecked: g, hasConsumerStoppedPropagationRef: v, isFormControl: b, bubbleInput: x } = _(y, r), S = e(s, h), C = c.useRef(p);
return c.useEffect(() => {
let e = l?.form;
if (e) {
let t = () => g(C.current);
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
}
}, [l, g]), /* @__PURE__ */ u(n.button, {
type: "button",
role: "checkbox",
"aria-checked": D(p) ? "mixed" : p,
"aria-required": m,
"data-state": O(p),
"data-disabled": f ? "" : void 0,
disabled: f,
value: d,
...o,
ref: S,
onKeyDown: t(i, (e) => {
e.key === "Enter" && e.preventDefault();
}),
onClick: t(a, (e) => {
g((e) => D(e) ? !0 : !e), x && b && (v.current = e.isPropagationStopped(), v.current || e.stopPropagation());
})
});
});
b.displayName = y;
var x = c.forwardRef((e, t) => {
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: f, form: p, ...m } = e;
return /* @__PURE__ */ u(v, {
__scopeCheckbox: n,
checked: i,
defaultChecked: a,
disabled: s,
required: o,
onCheckedChange: f,
name: r,
form: p,
value: c,
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(b, {
...m,
ref: t,
__scopeCheckbox: n
}), e && /* @__PURE__ */ u(T, { __scopeCheckbox: n })] })
});
});
x.displayName = p;
var S = "CheckboxIndicator", C = c.forwardRef((e, t) => {
let { __scopeCheckbox: r, forceMount: a, ...o } = e, s = _(S, r);
return /* @__PURE__ */ u(i, {
present: a || D(s.checked) || s.checked === !0,
children: /* @__PURE__ */ u(n.span, {
"data-state": O(s.checked),
"data-disabled": s.disabled ? "" : void 0,
...o,
ref: t,
style: {
pointerEvents: "none",
...e.style
}
})
});
});
C.displayName = S;
var w = "CheckboxBubbleInput", T = c.forwardRef(({ __scopeCheckbox: t, ...r }, i) => {
let { control: a, hasConsumerStoppedPropagationRef: s, checked: l, defaultChecked: d, required: p, disabled: m, name: h, value: g, form: v, bubbleInput: y, setBubbleInput: b } = _(w, t), x = e(i, b), S = f(l), C = o(a);
c.useEffect(() => {
let e = y;
if (!e) return;
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !s.current;
if (S !== l && n) {
let t = new Event("click", { bubbles: r });
e.indeterminate = D(l), n.call(e, D(l) ? !1 : l), e.dispatchEvent(t);
}
}, [
y,
S,
l,
s
]);
let T = c.useRef(D(l) ? !1 : l);
return /* @__PURE__ */ u(n.input, {
type: "checkbox",
"aria-hidden": !0,
defaultChecked: d ?? T.current,
required: p,
disabled: m,
name: h,
value: g,
form: v,
...r,
tabIndex: -1,
ref: x,
style: {
...r.style,
...C,
position: "absolute",
pointerEvents: "none",
opacity: 0,
margin: 0,
transform: "translateX(-100%)"
}
});
});
T.displayName = w;
function E(e) {
return typeof e == "function";
}
function D(e) {
return e === "indeterminate";
}
function O(e) {
return D(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
//#endregion
//#region lib/components/ui/Checkbox.module.css
var k = {
"rp-checkbox": "_rp-checkbox_1vwg8_1",
"rp-checkbox-indicator": "_rp-checkbox-indicator_1vwg8_25"
}, A = ({ children: e, value: t, name: n, onChange: r, tabIndex: i, "aria-label": a }) => {
let o = a ? { "aria-label": a } : {};
return /* @__PURE__ */ d("div", {
style: {
display: "flex",
alignItems: "center",
position: "relative"
},
children: [/* @__PURE__ */ u(x, {
tabIndex: i,
className: k["rp-checkbox"],
checked: t,
id: n,
onCheckedChange: r,
role: "checkbox",
"aria-checked": t,
...o,
children: /* @__PURE__ */ u(C, {
className: k["rp-checkbox-indicator"],
"aria-hidden": "true",
children: /* @__PURE__ */ u(s, {})
})
}), /* @__PURE__ */ u("label", {
className: k["rp-checkbox-label"],
htmlFor: n,
children: e
})]
});
};
//#endregion
export { A as t };
//#region node_modules/clsx/dist/clsx.mjs
function e(t) {
var n, r, i = "";
if (typeof t == "string" || typeof t == "number") i += t;
else if (typeof t == "object") if (Array.isArray(t)) {
var a = t.length;
for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
} else for (r in t) t[r] && (i && (i += " "), i += r);
return i;
}
function t() {
for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
return i;
}
//#endregion
export { t };
import { d as e, i as t } from "./dist-CgoP608h.js";
import { i as n } from "./dist-BfuBBQ14.js";
import * as r from "react";
import { useState as i } from "react";
import { jsx as a } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-focus-guards/dist/index.mjs
var o = 0;
function s() {
r.useEffect(() => {
let e = document.querySelectorAll("[data-radix-focus-guard]");
return document.body.insertAdjacentElement("afterbegin", e[0] ?? c()), document.body.insertAdjacentElement("beforeend", e[1] ?? c()), o++, () => {
o === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((e) => e.remove()), o--;
};
}, []);
}
function c() {
let e = document.createElement("span");
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
}
//#endregion
//#region node_modules/@radix-ui/react-focus-scope/dist/index.mjs
var l = "focusScope.autoFocusOnMount", u = "focusScope.autoFocusOnUnmount", d = {
bubbles: !1,
cancelable: !0
}, f = "FocusScope", p = r.forwardRef((i, o) => {
let { loop: s = !1, trapped: c = !1, onMountAutoFocus: f, onUnmountAutoFocus: p, ..._ } = i, [v, y] = r.useState(null), S = n(f), C = n(p), T = r.useRef(null), E = e(o, (e) => y(e)), D = r.useRef({
paused: !1,
pause() {
this.paused = !0;
},
resume() {
this.paused = !1;
}
}).current;
r.useEffect(() => {
if (c) {
let e = function(e) {
if (D.paused || !v) return;
let t = e.target;
v.contains(t) ? T.current = t : b(T.current, { select: !0 });
}, t = function(e) {
if (D.paused || !v) return;
let t = e.relatedTarget;
t !== null && (v.contains(t) || b(T.current, { select: !0 }));
}, n = function(e) {
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && b(v);
};
document.addEventListener("focusin", e), document.addEventListener("focusout", t);
let r = new MutationObserver(n);
return v && r.observe(v, {
childList: !0,
subtree: !0
}), () => {
document.removeEventListener("focusin", e), document.removeEventListener("focusout", t), r.disconnect();
};
}
}, [
c,
v,
D.paused
]), r.useEffect(() => {
if (v) {
x.add(D);
let e = document.activeElement;
if (!v.contains(e)) {
let t = new CustomEvent(l, d);
v.addEventListener(l, S), v.dispatchEvent(t), t.defaultPrevented || (m(w(g(v)), { select: !0 }), document.activeElement === e && b(v));
}
return () => {
v.removeEventListener(l, S), setTimeout(() => {
let t = new CustomEvent(u, d);
v.addEventListener(u, C), v.dispatchEvent(t), t.defaultPrevented || b(e ?? document.body, { select: !0 }), v.removeEventListener(u, C), x.remove(D);
}, 0);
};
}
}, [
v,
S,
C,
D
]);
let O = r.useCallback((e) => {
if (!s && !c || D.paused) return;
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, n = document.activeElement;
if (t && n) {
let t = e.currentTarget, [r, i] = h(t);
r && i ? !e.shiftKey && n === i ? (e.preventDefault(), s && b(r, { select: !0 })) : e.shiftKey && n === r && (e.preventDefault(), s && b(i, { select: !0 })) : n === t && e.preventDefault();
}
}, [
s,
c,
D.paused
]);
return /* @__PURE__ */ a(t.div, {
tabIndex: -1,
..._,
ref: E,
onKeyDown: O
});
});
p.displayName = f;
function m(e, { select: t = !1 } = {}) {
let n = document.activeElement;
for (let r of e) if (b(r, { select: t }), document.activeElement !== n) return;
}
function h(e) {
let t = g(e);
return [_(t, e), _(t.reverse(), e)];
}
function g(e) {
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
let t = e.tagName === "INPUT" && e.type === "hidden";
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
} });
for (; n.nextNode();) t.push(n.currentNode);
return t;
}
function _(e, t) {
for (let n of e) if (!v(n, { upTo: t })) return n;
}
function v(e, { upTo: t }) {
if (getComputedStyle(e).visibility === "hidden") return !0;
for (; e;) {
if (t !== void 0 && e === t) return !1;
if (getComputedStyle(e).display === "none") return !0;
e = e.parentElement;
}
return !1;
}
function y(e) {
return e instanceof HTMLInputElement && "select" in e;
}
function b(e, { select: t = !1 } = {}) {
if (e && e.focus) {
let n = document.activeElement;
e.focus({ preventScroll: !0 }), e !== n && y(e) && t && e.select();
}
}
var x = S();
function S() {
let e = [];
return {
add(t) {
let n = e[0];
t !== n && n?.pause(), e = C(e, t), e.unshift(t);
},
remove(t) {
e = C(e, t), e[0]?.resume();
}
};
}
function C(e, t) {
let n = [...e], r = n.indexOf(t);
return r !== -1 && n.splice(r, 1), n;
}
function w(e) {
return e.filter((e) => e.tagName !== "A");
}
//#endregion
//#region node_modules/aria-hidden/dist/es2015/index.js
var T = function(e) {
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
}, E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = {}, k = 0, A = function(e) {
return e && (e.host || A(e.parentNode));
}, ee = function(e, t) {
return t.map(function(t) {
if (e.contains(t)) return t;
var n = A(t);
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
}).filter(function(e) {
return !!e;
});
}, te = function(e, t, n, r) {
var i = ee(t, Array.isArray(e) ? e : [e]);
O[n] || (O[n] = /* @__PURE__ */ new WeakMap());
var a = O[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
!e || s.has(e) || (s.add(e), l(e.parentNode));
};
i.forEach(l);
var u = function(e) {
!e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
if (s.has(e)) u(e);
else try {
var t = e.getAttribute(r), i = t !== null && t !== "false", c = (E.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
E.set(e, c), a.set(e, l), o.push(e), c === 1 && i && D.set(e, !0), l === 1 && e.setAttribute(n, "true"), i || e.setAttribute(r, "true");
} catch (t) {
console.error("aria-hidden: cannot operate on ", e, t);
}
});
};
return u(t), s.clear(), k++, function() {
o.forEach(function(e) {
var t = E.get(e) - 1, i = a.get(e) - 1;
E.set(e, t), a.set(e, i), t || (D.has(e) || e.removeAttribute(r), D.delete(e)), i || e.removeAttribute(n);
}), k--, k || (E = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = {});
};
}, ne = function(e, t, n) {
n === void 0 && (n = "data-aria-hidden");
var r = Array.from(Array.isArray(e) ? e : [e]), i = t || T(e);
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), te(r, i, n, "aria-hidden")) : function() {
return null;
};
}, j = function() {
return j = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e;
}, j.apply(this, arguments);
};
function M(e, t) {
var n = {};
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
return n;
}
function re(e, t, n) {
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
return e.concat(a || Array.prototype.slice.call(t));
}
//#endregion
//#region node_modules/react-remove-scroll-bar/dist/es2015/constants.js
var N = "right-scroll-bar-position", P = "width-before-scroll-bar", ie = "with-scroll-bars-hidden", ae = "--removed-body-scroll-bar-size";
//#endregion
//#region node_modules/use-callback-ref/dist/es2015/assignRef.js
function F(e, t) {
return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
//#endregion
//#region node_modules/use-callback-ref/dist/es2015/useRef.js
function oe(e, t) {
var n = i(function() {
return {
value: e,
callback: t,
facade: {
get current() {
return n.value;
},
set current(e) {
var t = n.value;
t !== e && (n.value = e, n.callback(e, t));
}
}
};
})[0];
return n.callback = t, n.facade;
}
//#endregion
//#region node_modules/use-callback-ref/dist/es2015/useMergeRef.js
var se = typeof window < "u" ? r.useLayoutEffect : r.useEffect, ce = /* @__PURE__ */ new WeakMap();
function le(e, t) {
var n = oe(t || null, function(t) {
return e.forEach(function(e) {
return F(e, t);
});
});
return se(function() {
var t = ce.get(n);
if (t) {
var r = new Set(t), i = new Set(e), a = n.current;
r.forEach(function(e) {
i.has(e) || F(e, null);
}), i.forEach(function(e) {
r.has(e) || F(e, a);
});
}
ce.set(n, e);
}, [e]), n;
}
//#endregion
//#region node_modules/use-sidecar/dist/es2015/medium.js
function ue(e) {
return e;
}
function de(e, t) {
t === void 0 && (t = ue);
var n = [], r = !1;
return {
read: function() {
if (r) throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
return n.length ? n[n.length - 1] : e;
},
useMedium: function(e) {
var i = t(e, r);
return n.push(i), function() {
n = n.filter(function(e) {
return e !== i;
});
};
},
assignSyncMedium: function(e) {
for (r = !0; n.length;) {
var t = n;
n = [], t.forEach(e);
}
n = {
push: function(t) {
return e(t);
},
filter: function() {
return n;
}
};
},
assignMedium: function(e) {
r = !0;
var t = [];
if (n.length) {
var i = n;
n = [], i.forEach(e), t = n;
}
var a = function() {
var n = t;
t = [], n.forEach(e);
}, o = function() {
return Promise.resolve().then(a);
};
o(), n = {
push: function(e) {
t.push(e), o();
},
filter: function(e) {
return t = t.filter(e), n;
}
};
}
};
}
function fe(e) {
e === void 0 && (e = {});
var t = de(null);
return t.options = j({
async: !0,
ssr: !1
}, e), t;
}
//#endregion
//#region node_modules/use-sidecar/dist/es2015/exports.js
var I = function(e) {
var t = e.sideCar, n = M(e, ["sideCar"]);
if (!t) throw Error("Sidecar: please provide `sideCar` property to import the right car");
var i = t.read();
if (!i) throw Error("Sidecar medium not found");
return r.createElement(i, j({}, n));
};
I.isSideCarExport = !0;
function pe(e, t) {
return e.useMedium(t), I;
}
//#endregion
//#region node_modules/react-remove-scroll/dist/es2015/medium.js
var L = fe(), R = function() {}, z = r.forwardRef(function(e, t) {
var n = r.useRef(null), i = r.useState({
onScrollCapture: R,
onWheelCapture: R,
onTouchMoveCapture: R
}), a = i[0], o = i[1], s = e.forwardProps, c = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, p = e.sideCar, m = e.noRelative, h = e.noIsolation, g = e.inert, _ = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, b = e.gapMode, x = M(e, [
"forwardProps",
"children",
"className",
"removeScrollBar",
"enabled",
"shards",
"sideCar",
"noRelative",
"noIsolation",
"inert",
"allowPinchZoom",
"as",
"gapMode"
]), S = p, C = le([n, t]), w = j(j({}, x), a);
return r.createElement(r.Fragment, null, d && r.createElement(S, {
sideCar: L,
removeScrollBar: u,
shards: f,
noRelative: m,
noIsolation: h,
inert: g,
setCallbacks: o,
allowPinchZoom: !!_,
lockRef: n,
gapMode: b
}), s ? r.cloneElement(r.Children.only(c), j(j({}, w), { ref: C })) : r.createElement(y, j({}, w, {
className: l,
ref: C
}), c));
});
z.defaultProps = {
enabled: !0,
removeScrollBar: !0,
inert: !1
}, z.classNames = {
fullWidth: P,
zeroRight: N
};
//#endregion
//#region node_modules/get-nonce/dist/es2015/index.js
var B, me = function() {
if (B) return B;
if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
};
//#endregion
//#region node_modules/react-style-singleton/dist/es2015/singleton.js
function he() {
if (!document) return null;
var e = document.createElement("style");
e.type = "text/css";
var t = me();
return t && e.setAttribute("nonce", t), e;
}
function ge(e, t) {
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function _e(e) {
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
}
var ve = function() {
var e = 0, t = null;
return {
add: function(n) {
e == 0 && (t = he()) && (ge(t, n), _e(t)), e++;
},
remove: function() {
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
}
};
}, ye = function() {
var e = ve();
return function(t, n) {
r.useEffect(function() {
return e.add(t), function() {
e.remove();
};
}, [t && n]);
};
}, V = function() {
var e = ye();
return function(t) {
var n = t.styles, r = t.dynamic;
return e(n, r), null;
};
}, be = {
left: 0,
top: 0,
right: 0,
gap: 0
}, H = function(e) {
return parseInt(e || "", 10) || 0;
}, xe = function(e) {
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], i = t[e === "padding" ? "paddingRight" : "marginRight"];
return [
H(n),
H(r),
H(i)
];
}, Se = function(e) {
if (e === void 0 && (e = "margin"), typeof window > "u") return be;
var t = xe(e), n = document.documentElement.clientWidth, r = window.innerWidth;
return {
left: t[0],
top: t[1],
right: t[2],
gap: Math.max(0, r - n + t[2] - t[0])
};
}, Ce = V(), U = "data-scroll-locked", we = function(e, t, n, r) {
var i = e.left, a = e.top, o = e.right, s = e.gap;
return n === void 0 && (n = "margin"), `
.${ie} {
overflow: hidden ${r};
padding-right: ${s}px ${r};
}
body[${U}] {
overflow: hidden ${r};
overscroll-behavior: contain;
${[
t && `position: relative ${r};`,
n === "margin" && `
padding-left: ${i}px;
padding-top: ${a}px;
padding-right: ${o}px;
margin-left:0;
margin-top:0;
margin-right: ${s}px ${r};
`,
n === "padding" && `padding-right: ${s}px ${r};`
].filter(Boolean).join("")}
}
.${N} {
right: ${s}px ${r};
}
.${P} {
margin-right: ${s}px ${r};
}
.${N} .${N} {
right: 0 ${r};
}
.${P} .${P} {
margin-right: 0 ${r};
}
body[${U}] {
${ae}: ${s}px;
}
`;
}, W = function() {
var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
return isFinite(e) ? e : 0;
}, Te = function() {
r.useEffect(function() {
return document.body.setAttribute(U, (W() + 1).toString()), function() {
var e = W() - 1;
e <= 0 ? document.body.removeAttribute(U) : document.body.setAttribute(U, e.toString());
};
}, []);
}, Ee = function(e) {
var t = e.noRelative, n = e.noImportant, i = e.gapMode, a = i === void 0 ? "margin" : i;
Te();
var o = r.useMemo(function() {
return Se(a);
}, [a]);
return r.createElement(Ce, { styles: we(o, !t, a, n ? "" : "!important") });
}, G = !1;
if (typeof window < "u") try {
var K = Object.defineProperty({}, "passive", { get: function() {
return G = !0, !0;
} });
window.addEventListener("test", K, K), window.removeEventListener("test", K, K);
} catch {
G = !1;
}
var q = G ? { passive: !1 } : !1, De = function(e) {
return e.tagName === "TEXTAREA";
}, J = function(e, t) {
if (!(e instanceof Element)) return !1;
var n = window.getComputedStyle(e);
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !De(e) && n[t] === "visible");
}, Oe = function(e) {
return J(e, "overflowY");
}, ke = function(e) {
return J(e, "overflowX");
}, Y = function(e, t) {
var n = t.ownerDocument, r = t;
do {
if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host), X(e, r)) {
var i = Z(e, r);
if (i[1] > i[2]) return !0;
}
r = r.parentNode;
} while (r && r !== n.body);
return !1;
}, Ae = function(e) {
return [
e.scrollTop,
e.scrollHeight,
e.clientHeight
];
}, je = function(e) {
return [
e.scrollLeft,
e.scrollWidth,
e.clientWidth
];
}, X = function(e, t) {
return e === "v" ? Oe(t) : ke(t);
}, Z = function(e, t) {
return e === "v" ? Ae(t) : je(t);
}, Me = function(e, t) {
return e === "h" && t === "rtl" ? -1 : 1;
}, Ne = function(e, t, n, r, i) {
var a = Me(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
do {
if (!s) break;
var p = Z(e, s), m = p[0], h = p[1] - p[2] - a * m;
(m || h) && X(e, s) && (d += h, f += m);
var g = s.parentNode;
s = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
} while (!c && s !== document.body || c && (t.contains(s) || t === s));
return (u && (i && Math.abs(d) < 1 || !i && o > d) || !u && (i && Math.abs(f) < 1 || !i && -o > f)) && (l = !0), l;
}, Q = function(e) {
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Pe = function(e) {
return [e.deltaX, e.deltaY];
}, Fe = function(e) {
return e && "current" in e ? e.current : e;
}, Ie = function(e, t) {
return e[0] === t[0] && e[1] === t[1];
}, Le = function(e) {
return `
.block-interactivity-${e} {pointer-events: none;}
.allow-interactivity-${e} {pointer-events: all;}
`;
}, Re = 0, $ = [];
function ze(e) {
var t = r.useRef([]), n = r.useRef([0, 0]), i = r.useRef(), a = r.useState(Re++)[0], o = r.useState(V)[0], s = r.useRef(e);
r.useEffect(function() {
s.current = e;
}, [e]), r.useEffect(function() {
if (e.inert) {
document.body.classList.add(`block-interactivity-${a}`);
var t = re([e.lockRef.current], (e.shards || []).map(Fe), !0).filter(Boolean);
return t.forEach(function(e) {
return e.classList.add(`allow-interactivity-${a}`);
}), function() {
document.body.classList.remove(`block-interactivity-${a}`), t.forEach(function(e) {
return e.classList.remove(`allow-interactivity-${a}`);
});
};
}
}, [
e.inert,
e.lockRef.current,
e.shards
]);
var c = r.useCallback(function(e, t) {
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey) return !s.current.allowPinchZoom;
var r = Q(e), a = n.current, o = "deltaX" in e ? e.deltaX : a[0] - r[0], c = "deltaY" in e ? e.deltaY : a[1] - r[1], l, u = e.target, d = Math.abs(o) > Math.abs(c) ? "h" : "v";
if ("touches" in e && d === "h" && u.type === "range") return !1;
var f = Y(d, u);
if (!f) return !0;
if (f ? l = d : (l = d === "v" ? "h" : "v", f = Y(d, u)), !f) return !1;
if (!i.current && "changedTouches" in e && (o || c) && (i.current = l), !l) return !0;
var p = i.current || l;
return Ne(p, t, e, p === "h" ? o : c, !0);
}, []), l = r.useCallback(function(e) {
var n = e;
if (!(!$.length || $[$.length - 1] !== o)) {
var r = "deltaY" in n ? Pe(n) : Q(n), i = t.current.filter(function(e) {
return e.name === n.type && (e.target === n.target || n.target === e.shadowParent) && Ie(e.delta, r);
})[0];
if (i && i.should) {
n.cancelable && n.preventDefault();
return;
}
if (!i) {
var a = (s.current.shards || []).map(Fe).filter(Boolean).filter(function(e) {
return e.contains(n.target);
});
(a.length > 0 ? c(n, a[0]) : !s.current.noIsolation) && n.cancelable && n.preventDefault();
}
}
}, []), u = r.useCallback(function(e, n, r, i) {
var a = {
name: e,
delta: n,
target: r,
should: i,
shadowParent: Be(r)
};
t.current.push(a), setTimeout(function() {
t.current = t.current.filter(function(e) {
return e !== a;
});
}, 1);
}, []), d = r.useCallback(function(e) {
n.current = Q(e), i.current = void 0;
}, []), f = r.useCallback(function(t) {
u(t.type, Pe(t), t.target, c(t, e.lockRef.current));
}, []), p = r.useCallback(function(t) {
u(t.type, Q(t), t.target, c(t, e.lockRef.current));
}, []);
r.useEffect(function() {
return $.push(o), e.setCallbacks({
onScrollCapture: f,
onWheelCapture: f,
onTouchMoveCapture: p
}), document.addEventListener("wheel", l, q), document.addEventListener("touchmove", l, q), document.addEventListener("touchstart", d, q), function() {
$ = $.filter(function(e) {
return e !== o;
}), document.removeEventListener("wheel", l, q), document.removeEventListener("touchmove", l, q), document.removeEventListener("touchstart", d, q);
};
}, []);
var m = e.removeScrollBar, h = e.inert;
return r.createElement(r.Fragment, null, h ? r.createElement(o, { styles: Le(a) }) : null, m ? r.createElement(Ee, {
noRelative: e.noRelative,
gapMode: e.gapMode
}) : null);
}
function Be(e) {
for (var t = null; e !== null;) e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
return t;
}
//#endregion
//#region node_modules/react-remove-scroll/dist/es2015/sidecar.js
var Ve = pe(L, ze), He = r.forwardRef(function(e, t) {
return r.createElement(z, j({}, e, {
ref: t,
sideCar: Ve
}));
});
He.classNames = z.classNames;
//#endregion
export { s as i, ne as n, p as r, He as t };
import { useLocalizationContext as e } from "./contexts/LocalizationContext.js";
import { t } from "./clsx-DSGuh5YW.js";
import { jsx as n } from "react/jsx-runtime";
import './assets/Container.css';//#region lib/components/layout/Container.module.css
var r = { "rp-container": "_rp-container_f63gc_1" }, i = (e) => e.replace(/_/g, "-"), a = (a) => {
let { children: o, getContainerRef: s, style: c, className: l } = a, { locale: u } = e();
return /* @__PURE__ */ n("div", {
tabIndex: 0,
ref: s,
"data-rp": "container",
lang: u ? i(u) : void 0,
className: t(r["rp-container"], l),
style: c,
children: o
});
};
//#endregion
export { a as t };
var e = {
searchButtonTooltip: "Search in Document",
searchInputPlaceholder: "Enter to search",
searchInputTooltip: "Search",
searchPrevTooltip: "Previous match",
searchNextTooltip: "Next match",
searchCloseButtonTooltip: "Close",
searchMatchCaseLabel: "Match Case",
searchMatchCaseTooltip: "Search case sensitive text",
searchWholeWordsLabel: "Whole Words",
searchWholeWordsTooltip: "Search exact and case insensitive word(s)",
previousPageTooltip: "Previous page",
currentPageTooltip: "Current page",
nextPageTooltip: "Next page",
zoomOutTooltip: "Zoom out",
zoomInTooltip: "Zoom in",
zoomSelectTooltip: "Select zoom level",
zoomActualSize: "Actual Size",
zoomPageFit: "Page Fit",
zoomPageWidth: "Page Width",
themeEnableDarkTooltip: "Enable dark theme",
themeEnableLightTooltip: "Enable light theme",
openLocalFileLabel: "Open local file",
openLocalFileTooltip: "Open local file",
downloadFileLabel: "Download file",
downloadFileTooltip: "Download file",
printLabel: "Print",
printTooltip: "Print",
printLoadingMessage: "Preparing Document",
printCancelLabel: "Cancel",
fullScreenLabel: "Full screen",
fullScreenTooltip: "Full screen",
moreOptionTooltip: "More options",
firstPageLabel: "First page",
firstPageTooltip: "Go to first page",
lastPageLabel: "Last page",
lastPageTooltip: "Go to last page",
rotateClockwiseLabel: "Rotate clockwise",
rotateClockwiseTooltip: "Rotate clockwise",
rotateCounterclockwiseLabel: "Rotate counterclockwise",
rotateCounterclockwiseTooltip: "Rotate counterclockwise",
textSelectionLabel: "Text selection tool",
textSelectionTooltip: "Enable text selection tool",
handToolLabel: "Hand tool",
handToolTooltip: "Enable hand tool",
documentPropertiesLabel: "Document properties",
documentPropertiesTooltip: "View document properties",
pageScrollingLabel: "Page scrolling",
pageScrollingTooltip: "Enable page scrolling",
verticalScrollingLabel: "Vertical scrolling",
verticalScrollingTooltip: "Enable vertical scrolling",
horizontalLabel: "Horizontal scrolling",
horizontalTooltip: "Enable horizontal scrolling",
wrappedScrollingLabel: "Wrapped scrolling",
wrappedScrollingTooltip: "Enable wrapped scrolling",
singlePageLabel: "Single page",
singlePageTooltip: "Enable single page view",
dualPageLabel: "Dual page",
dualPageTooltip: "Enable dual page view",
dualPageWithCoverLabel: "Dual page with cover",
dualPageWithCoverTooltip: "Enable dual page view with cover",
propertiesFilenameLabel: "File name",
propertiesFileSizeLabel: "File size",
propertiesTitleLabel: "Title",
propertiesAuthorLabel: "Author",
propertiesSubjectLabel: "Subject",
propertiesKeywordLabel: "Keywords",
propertiesCreatorLabel: "Creator",
propertiesCreateOnLabel: "Created on",
propertiesModifiedOnLabel: "Modified on",
propertiesPDFProducerLabel: "PDF producer",
propertiesPDFVersionLabel: "PDF version",
propertiesPageCountLabel: "Page count",
thumbnailTooltip: "Thumbnail",
passwordModalTitle: "Password Required",
passwordModalMessage: "This document is password protected. Please enter a password to open the file.",
passwordPlaceholder: "Enter password",
passwordConfirmLabel: "Submit",
passwordError: "Incorrect password",
dragDropFileMessage: "Drag and drop the PDF file here",
ofTotalPagesLabel: "of"
}, t = {
searchButtonTooltip: "搜索文件",
searchInputPlaceholder: "输入搜索词",
searchInputTooltip: "搜索",
searchPrevTooltip: "上一条",
searchNextTooltip: "下一条",
searchCloseButtonTooltip: "关闭",
searchMatchCaseLabel: "区分大小写",
searchMatchCaseTooltip: "搜索区分大小写",
searchWholeWordsLabel: "全字匹配",
searchWholeWordsTooltip: "搜索完全匹配",
previousPageTooltip: "上一页",
currentPageTooltip: "当前页",
nextPageTooltip: "下一页",
zoomOutTooltip: "缩小",
zoomInTooltip: "放大",
zoomSelectTooltip: "选择缩放级别",
zoomActualSize: "实际大小",
zoomPageFit: "适合页面",
zoomPageWidth: "页面宽度",
themeEnableDarkTooltip: "切换到深色模式",
themeEnableLightTooltip: "切换到浅色模式",
openLocalFileLabel: "打开文件",
openLocalFileTooltip: "打开文件",
downloadFileLabel: "下载文件",
downloadFileTooltip: "下载文件",
printLabel: "打印",
printTooltip: "打印",
printLoadingMessage: "准备文件",
printCancelLabel: "取消",
fullScreenLabel: "全屏",
fullScreenTooltip: "全屏",
moreOptionTooltip: "更多选项",
firstPageLabel: "第一页",
firstPageTooltip: "跳转到第一页",
lastPageLabel: "最后一页",
lastPageTooltip: "跳转到最后一页",
rotateClockwiseLabel: "顺时针旋转",
rotateClockwiseTooltip: "顺时针旋转",
rotateCounterclockwiseLabel: "逆时针旋转",
rotateCounterclockwiseTooltip: "逆时针旋转",
textSelectionLabel: "文本选择工具",
textSelectionTooltip: "启用文本选择工具",
handToolLabel: "手型工具",
handToolTooltip: "启用手型工具",
documentPropertiesLabel: "文件属性",
documentPropertiesTooltip: "查看文件属性",
pageScrollingLabel: "页面滚动",
pageScrollingTooltip: "启用页面滚动",
verticalScrollingLabel: "垂直滚动",
verticalScrollingTooltip: "启用垂直滚动",
horizontalLabel: "水平滚动",
horizontalTooltip: "启用水平滚动",
wrappedScrollingLabel: "环绕滚动",
wrappedScrollingTooltip: "启用环绕滚动",
singlePageLabel: "单页面视图",
singlePageTooltip: "启用单页视图",
dualPageLabel: "双页面视图",
dualPageTooltip: "启用双页视图",
dualPageWithCoverLabel: "封面双页面视图",
dualPageWithCoverTooltip: "启用封面双页视图",
propertiesFilenameLabel: "文件名称",
propertiesFileSizeLabel: "文件大小",
propertiesTitleLabel: "标题",
propertiesAuthorLabel: "作者",
propertiesSubjectLabel: "主题",
propertiesKeywordLabel: "关键字",
propertiesCreatorLabel: "创建者",
propertiesCreateOnLabel: "创建于",
propertiesModifiedOnLabel: "修改于",
propertiesPDFProducerLabel: "PDF 制作程序 ",
propertiesPDFVersionLabel: "PDF版本",
propertiesPageCountLabel: "页数",
thumbnailTooltip: "缩略图",
passwordModalTitle: "需要密码",
passwordModalMessage: "此文件受密码保护。请输入密码以打开文件。",
passwordPlaceholder: "输入密码",
passwordConfirmLabel: "提交",
passwordError: "密码错误",
dragDropFileMessage: "将PDF文件拖放到这里",
ofTotalPagesLabel: "共"
}, n = {
searchButtonTooltip: "Cerca nel documento",
searchInputPlaceholder: "Premi Invio per cercare",
searchInputTooltip: "Cerca",
searchPrevTooltip: "Corrispondenza precedente",
searchNextTooltip: "Corrispondenza successiva",
searchCloseButtonTooltip: "Chiudi",
searchMatchCaseLabel: "Maiuscole/minuscole",
searchMatchCaseTooltip: "Cerca testo con distinzione maiuscole/minuscole",
searchWholeWordsLabel: "Parola intera",
searchWholeWordsTooltip: "Cerca esatte parole senza distinzione maiuscole/minuscole",
previousPageTooltip: "Pagina precedente",
currentPageTooltip: "Pagina corrente",
nextPageTooltip: "Pagina successiva",
zoomOutTooltip: "Ridurre",
zoomInTooltip: "Ingrandire",
zoomSelectTooltip: "Seleziona un livello di zoom",
zoomActualSize: "Dimensioni effettive",
zoomPageFit: "Adatta pagina",
zoomPageWidth: "Larghezza pagina",
themeEnableDarkTooltip: "Abilita tema scuro",
themeEnableLightTooltip: "Abilita tema chiaro",
openLocalFileLabel: "Aprire file",
openLocalFileTooltip: "Aprire file",
downloadFileLabel: "Scaricare file",
downloadFileTooltip: "Scaricare file",
printLabel: "Stampa",
printTooltip: "Stampa",
printLoadingMessage: "Preparazione del documento",
printCancelLabel: "Annulla",
fullScreenLabel: "Schermo intero",
fullScreenTooltip: "Schermo intero",
moreOptionTooltip: "Altre opzioni",
firstPageLabel: "Prima pagina",
firstPageTooltip: "Vai alla prima pagina",
lastPageLabel: "Ultima pagina",
lastPageTooltip: "Vai all’ultima pagina",
rotateClockwiseLabel: "Ruota in senso orario",
rotateClockwiseTooltip: "Ruota in senso orario",
rotateCounterclockwiseLabel: "Ruota in senso antiorario",
rotateCounterclockwiseTooltip: "Ruota in senso antiorario",
textSelectionLabel: "Strumento di selezione testo",
textSelectionTooltip: "Abilita strumento di selezione testo",
handToolLabel: "Strumento mano",
handToolTooltip: "Abilita strumento mano",
documentPropertiesLabel: "Proprietà documento",
documentPropertiesTooltip: "Visualizza proprietà documento",
pageScrollingLabel: "Scorrimento pagina",
pageScrollingTooltip: "Abilita lo scorrimento delle pagine",
verticalScrollingLabel: "Scorrimento verticale",
verticalScrollingTooltip: "Abilita lo scorrimento verticale",
horizontalLabel: "Scorrimento orizzontale",
horizontalTooltip: "Abilita lo scorrimento orizzontale",
wrappedScrollingLabel: "Scorrimento avvolto",
wrappedScrollingTooltip: "Abilita lo scorrimento avvolto",
singlePageLabel: "Singolo",
singlePageTooltip: "Visualizzazione singola",
dualPageLabel: "Doppio",
dualPageTooltip: "Visualizzazione doppio",
dualPageWithCoverLabel: "Doppio con copertina",
dualPageWithCoverTooltip: "Visualizzazione doppio con copertina",
propertiesFilenameLabel: "Nome file",
propertiesFileSizeLabel: "Dimensione file",
propertiesTitleLabel: "Titolo",
propertiesAuthorLabel: "Autore",
propertiesSubjectLabel: "Oggetto",
propertiesKeywordLabel: "Parole chiave",
propertiesCreatorLabel: "Creatore",
propertiesCreateOnLabel: "Creato il",
propertiesModifiedOnLabel: "Modificato il",
propertiesPDFProducerLabel: "Produttore PDF",
propertiesPDFVersionLabel: "Versione PDF",
propertiesPageCountLabel: "Numero di pagine",
thumbnailTooltip: "Miniature",
passwordModalTitle: "Password richiesta",
passwordModalMessage: "Questo documento è protetto da password. Si prega di inserire una password per aprire il file.",
passwordPlaceholder: "Inserisci la password",
passwordConfirmLabel: "Invia",
passwordError: "Password errata",
dragDropFileMessage: "Trascina e rilascia il file PDF qui",
ofTotalPagesLabel: "di"
}, r = {
searchButtonTooltip: "Pesquisar no documento",
searchInputPlaceholder: "Pressione Enter para pesquisar",
searchInputTooltip: "Pesquisar",
searchPrevTooltip: "Correspondência anterior",
searchNextTooltip: "Correspondência seguinte",
searchCloseButtonTooltip: "Fechar",
searchMatchCaseLabel: "Diferenciar maiúsculas/minúsculas",
searchMatchCaseTooltip: "Pesquisar texto com distinção de maiúsculas/minúsculas",
searchWholeWordsLabel: "Palavra inteira",
searchWholeWordsTooltip: "Pesquisar palavras exatas sem distinção de maiúsculas/minúsculas",
previousPageTooltip: "Página anterior",
currentPageTooltip: "Página atual",
nextPageTooltip: "Próxima página",
zoomOutTooltip: "Reduzir",
zoomInTooltip: "Ampliar",
zoomSelectTooltip: "Selecionar nível de zoom",
zoomActualSize: "Tamanho real",
zoomPageFit: "Ajustar à página",
zoomPageWidth: "Largura da página",
themeEnableDarkTooltip: "Ativar tema escuro",
themeEnableLightTooltip: "Ativar tema claro",
openLocalFileLabel: "Abrir arquivo",
openLocalFileTooltip: "Abrir arquivo",
downloadFileLabel: "Baixar arquivo",
downloadFileTooltip: "Baixar arquivo",
printLabel: "Imprimir",
printTooltip: "Imprimir",
printLoadingMessage: "Preparando documento",
printCancelLabel: "Cancelar",
fullScreenLabel: "Tela inteira",
fullScreenTooltip: "Tela inteira",
moreOptionTooltip: "Mais opções",
firstPageLabel: "Primeira página",
firstPageTooltip: "Ir para a primeira página",
lastPageLabel: "Última página",
lastPageTooltip: "Ir para a última página",
rotateClockwiseLabel: "Girar no sentido horário",
rotateClockwiseTooltip: "Girar no sentido horário",
rotateCounterclockwiseLabel: "Girar no sentido anti-horário",
rotateCounterclockwiseTooltip: "Girar no sentido anti-horário",
textSelectionLabel: "Ferramenta de seleção de texto",
textSelectionTooltip: "Ativar ferramenta de seleção de texto",
handToolLabel: "Ferramenta de mão",
handToolTooltip: "Ativar ferramenta de mão",
documentPropertiesLabel: "Propriedades do documento",
documentPropertiesTooltip: "Ver propriedades do documento",
pageScrollingLabel: "Rolagem página",
pageScrollingTooltip: "Ativar rolagem de página",
verticalScrollingLabel: "Rolagem vertical",
verticalScrollingTooltip: "Ativar rolagem vertical",
horizontalLabel: "Rolagem horizontal",
horizontalTooltip: "Ativar rolagem horizontal",
wrappedScrollingLabel: "Rolagem envolvida",
wrappedScrollingTooltip: "Ativar rolagem envolvente",
singlePageLabel: "Página única",
singlePageTooltip: "Ativar página única",
dualPageLabel: "Página dupla",
dualPageTooltip: "Ativar página dupla",
dualPageWithCoverLabel: "Página dupla com capa",
dualPageWithCoverTooltip: "Ativar página dupla com capa",
propertiesFilenameLabel: "Nome do arquivo",
propertiesFileSizeLabel: "Tamanho do arquivo",
propertiesTitleLabel: "Título",
propertiesAuthorLabel: "Autor",
propertiesSubjectLabel: "Assunto",
propertiesKeywordLabel: "Palavras-chave",
propertiesCreatorLabel: "Criador",
propertiesCreateOnLabel: "Criado em",
propertiesModifiedOnLabel: "Modificado em",
propertiesPDFProducerLabel: "Produtor do PDF",
propertiesPDFVersionLabel: "Versão do PDF",
propertiesPageCountLabel: "Número de páginas",
thumbnailTooltip: "Miniatura",
passwordModalTitle: "Senha necessária",
passwordModalMessage: "Este documento é protegido por senha. Por favor, insira uma senha para abrir o arquivo.",
passwordPlaceholder: "Insira a senha",
passwordConfirmLabel: "Enviar",
passwordError: "Senha incorreta",
dragDropFileMessage: "Arraste e solte o arquivo PDF aqui",
ofTotalPagesLabel: "de"
}, i = {
searchButtonTooltip: "ค้นหาในเอกสาร",
searchInputPlaceholder: "กรอกคำค้นหา",
searchInputTooltip: "ค้นหา",
searchPrevTooltip: "ผลการค้นหาก่อนหน้า",
searchNextTooltip: "ผลการค้นหาถัดไป",
searchCloseButtonTooltip: "ปิด",
searchMatchCaseLabel: "ข้อความที่มีคำ",
searchMatchCaseTooltip: "ค้นหาข้อความที่มีการแยกตัวพิมพ์ใหญ่/พิมพ์เล็ก",
searchWholeWordsLabel: "ทั้งคำ",
searchWholeWordsTooltip: "ค้นหาคำที่ตรงตัวไม่มีการแยกตัวพิมพ์ใหญ่/พิมพ์เล็ก",
previousPageTooltip: "หน้าก่อนหน้า",
currentPageTooltip: "หน้าปัจจุบัน",
nextPageTooltip: "หน้าถัดไป",
zoomOutTooltip: "ย่อ",
zoomInTooltip: "ขยาย",
zoomSelectTooltip: "เลือกระดับซูม",
zoomActualSize: "ขนาดจริง",
zoomPageFit: "พอดีหน้า",
zoomPageWidth: "พอดีความกว้าง",
themeEnableDarkTooltip: "เปิดโหมดมืด",
themeEnableLightTooltip: "เปิดโหมดสว่าง",
openLocalFileLabel: "เปิดไฟล์",
openLocalFileTooltip: "เปิดไฟล์",
downloadFileLabel: "ดาวน์โหลดเอกสาร",
downloadFileTooltip: "ดาวน์โหลดเอกสาร",
printLabel: "พิมพ์",
printTooltip: "พิมพ์",
printLoadingMessage: "เตรียมเอกสาร",
printCancelLabel: "ยกเลิก",
fullScreenLabel: "เต็มจอ",
fullScreenTooltip: "เต็มจอ",
moreOptionTooltip: "ตัวเลือกเพิ่มเติม",
firstPageLabel: "หน้าแรก",
firstPageTooltip: "ไปที่หน้าแรก",
lastPageLabel: "หน้าสุดท้าย",
lastPageTooltip: "ไปที่หน้าสุดท้าย",
rotateClockwiseLabel: "หมุนตามเข็มนาฬิกา",
rotateClockwiseTooltip: "หมุนตามเข็มนาฬิกา",
rotateCounterclockwiseLabel: "หมุนทวนเข็มนาฬิกา",
rotateCounterclockwiseTooltip: "หมุนทวนเข็มนาฬิกา",
textSelectionLabel: "เครื่องมือเลือกข้อความ",
textSelectionTooltip: "เปิดใช้การเลือกข้อความ",
handToolLabel: "เครื่องมือแฮนด์ทูล",
handToolTooltip: "เปิดใช้แฮนด์ทูล",
documentPropertiesLabel: "คุณสมบัติของเอกสาร",
documentPropertiesTooltip: "ดูคุณสมบัติของเอกสาร",
pageScrollingLabel: "การเลื่อนภายในหน้า",
pageScrollingTooltip: "เปิดใช้การเลื่อนภายในหน้า",
verticalScrollingLabel: "การเลื่อนแนวตั้ง",
verticalScrollingTooltip: "เปิดใช้การเลื่อนแนวตั้ง",
horizontalLabel: "การเลื่อนแนวนอน",
horizontalTooltip: "เปิดใช้การเลื่อนแนวนอน",
wrappedScrollingLabel: "การเลื่อนแบบแรพ",
wrappedScrollingTooltip: "เปิดใช้การเลื่อนแบบแรพ",
singlePageLabel: "หน้าเดี่ยว",
singlePageTooltip: "เปิดใช้หน้าเดี่ยว",
dualPageLabel: "หน้าคู่",
dualPageTooltip: "เปิดใช้หน้าคู่",
dualPageWithCoverLabel: "หน้าคู่พร้อมปก",
dualPageWithCoverTooltip: "เปิดใช้หน้าคู่พร้อมปก",
propertiesFilenameLabel: "ชื่อเอกสาร",
propertiesFileSizeLabel: "ขนาดเอกสาร",
propertiesTitleLabel: "ชื่อเรื่อง",
propertiesAuthorLabel: "ผู้เขียน",
propertiesSubjectLabel: "หัวข้อ",
propertiesKeywordLabel: "คำสำคัญ",
propertiesCreatorLabel: "ผู้สร้าง",
propertiesCreateOnLabel: "วันที่สร้าง",
propertiesModifiedOnLabel: "วันที่แก้ไข",
propertiesPDFProducerLabel: "ผู้ผลิต PDF",
propertiesPDFVersionLabel: "เวอร์ชัน PDF",
propertiesPageCountLabel: "จำนวนหน้า",
thumbnailTooltip: "ภาพย่อ",
passwordModalTitle: "กรุณากรอกรหัสผ่าน",
passwordModalMessage: "เอกสารนี้ได้รับการป้องกันด้วยรหัสผ่าน กรุณาใส่รหัสผ่านเพื่อเปิดไฟล์",
passwordPlaceholder: "กรอกรหัสผ่าน",
passwordConfirmLabel: "ส่ง",
passwordError: "รหัสผ่านไม่ถูกต้อง",
dragDropFileMessage: "ลากและวางไฟล์ PDF ที่นี่",
ofTotalPagesLabel: "จาก"
}, a = {
searchButtonTooltip: "Im Dokument suchen",
searchInputPlaceholder: "Zum Suchen eingeben",
searchInputTooltip: "Suche",
searchPrevTooltip: "Vorheriger Treffer",
searchNextTooltip: "Nächster Treffer",
searchCloseButtonTooltip: "Schließen",
searchMatchCaseLabel: "Groß-/Kleinschreibung",
searchMatchCaseTooltip: "Groß-/Kleinschreibung beachten",
searchWholeWordsLabel: "Ganze Wörter",
searchWholeWordsTooltip: "Exakte Wörter suchen (Groß-/Kleinschreibung ignorieren)",
previousPageTooltip: "Vorherige Seite",
currentPageTooltip: "Aktuelle Seite",
nextPageTooltip: "Nächste Seite",
zoomOutTooltip: "Verkleinern",
zoomInTooltip: "Vergrößern",
zoomSelectTooltip: "Zoomstufe auswählen",
zoomActualSize: "Originalgröße",
zoomPageFit: "Seite einpassen",
zoomPageWidth: "Seitenbreite",
themeEnableDarkTooltip: "Dunkles Design aktivieren",
themeEnableLightTooltip: "Helles Design aktivieren",
openLocalFileLabel: "Lokale Datei öffnen",
openLocalFileTooltip: "Lokale Datei öffnen",
downloadFileLabel: "Datei herunterladen",
downloadFileTooltip: "Datei herunterladen",
printLabel: "Drucken",
printTooltip: "Drucken",
printLoadingMessage: "Dokument wird vorbereitet",
printCancelLabel: "Abbrechen",
fullScreenLabel: "Vollbild",
fullScreenTooltip: "Vollbild",
moreOptionTooltip: "Weitere Optionen",
firstPageLabel: "Erste Seite",
firstPageTooltip: "Zur ersten Seite",
lastPageLabel: "Letzte Seite",
lastPageTooltip: "Zur letzten Seite",
rotateClockwiseLabel: "Im Uhrzeigersinn drehen",
rotateClockwiseTooltip: "Im Uhrzeigersinn drehen",
rotateCounterclockwiseLabel: "Gegen den Uhrzeigersinn drehen",
rotateCounterclockwiseTooltip: "Gegen den Uhrzeigersinn drehen",
textSelectionLabel: "Textauswahl-Werkzeug",
textSelectionTooltip: "Textauswahl-Werkzeug aktivieren",
handToolLabel: "Hand-Werkzeug",
handToolTooltip: "Hand-Werkzeug aktivieren",
documentPropertiesLabel: "Dokumenteigenschaften",
documentPropertiesTooltip: "Dokumenteigenschaften anzeigen",
pageScrollingLabel: "Bildlauf",
pageScrollingTooltip: "Seitenweises Blättern aktivieren",
verticalScrollingLabel: "Vertikaler Bildlauf",
verticalScrollingTooltip: "Vertikalen Bildlauf aktivieren",
horizontalLabel: "Horizontaler Bildlauf",
horizontalTooltip: "Horizontalen Bildlauf aktivieren",
wrappedScrollingLabel: "Bildlauf mit Umbruch",
wrappedScrollingTooltip: "Bildlauf mit Umbruch aktivieren",
singlePageLabel: "Einzelseite",
singlePageTooltip: "Einzelseitenansicht aktivieren",
dualPageLabel: "Doppelseite",
dualPageTooltip: "Doppelseitenansicht aktivieren",
dualPageWithCoverLabel: "Doppelseite mit Deckblatt",
dualPageWithCoverTooltip: "Doppelseitenansicht mit Deckblatt aktivieren",
propertiesFilenameLabel: "Dateiname",
propertiesFileSizeLabel: "Dateigröße",
propertiesTitleLabel: "Titel",
propertiesAuthorLabel: "Autor",
propertiesSubjectLabel: "Thema",
propertiesKeywordLabel: "Stichwörter",
propertiesCreatorLabel: "Ersteller",
propertiesCreateOnLabel: "Erstellt am",
propertiesModifiedOnLabel: "Geändert am",
propertiesPDFProducerLabel: "PDF-Produzent",
propertiesPDFVersionLabel: "PDF-Version",
propertiesPageCountLabel: "Seitenanzahl",
thumbnailTooltip: "Miniaturansicht",
passwordModalTitle: "Passwort erforderlich",
passwordModalMessage: "Dieses Dokument ist passwortgeschützt. Bitte geben Sie ein Passwort ein, um die Datei zu öffnen.",
passwordPlaceholder: "Passwort eingeben",
passwordConfirmLabel: "Bestätigen",
passwordError: "Falsches Passwort",
dragDropFileMessage: "PDF-Datei hierher ziehen",
ofTotalPagesLabel: "von"
};
//#endregion
export { t as a, n as i, i as n, e as o, r, a as t };
import { d as e, i as t, l as n, r } from "./dist-CgoP608h.js";
import { i } from "./dist-BfuBBQ14.js";
import { t as a } from "./dist-CNbFpoT1.js";
import * as o from "react";
import { useLayoutEffect as s } from "react";
import { jsx as c } from "react/jsx-runtime";
import * as l from "react-dom";
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
var u = [
"top",
"right",
"bottom",
"left"
], d = Math.min, f = Math.max, p = Math.round, m = Math.floor, h = (e) => ({
x: e,
y: e
}), g = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
}, _ = {
start: "end",
end: "start"
};
function v(e, t, n) {
return f(e, d(t, n));
}
function y(e, t) {
return typeof e == "function" ? e(t) : e;
}
function b(e) {
return e.split("-")[0];
}
function x(e) {
return e.split("-")[1];
}
function S(e) {
return e === "x" ? "y" : "x";
}
function C(e) {
return e === "y" ? "height" : "width";
}
var w = /* @__PURE__ */ new Set(["top", "bottom"]);
function T(e) {
return w.has(b(e)) ? "y" : "x";
}
function E(e) {
return S(T(e));
}
function D(e, t, n) {
n === void 0 && (n = !1);
let r = x(e), i = E(e), a = C(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
return t.reference[a] > t.floating[a] && (o = I(o)), [o, I(o)];
}
function O(e) {
let t = I(e);
return [
k(e),
t,
k(t)
];
}
function k(e) {
return e.replace(/start|end/g, (e) => _[e]);
}
var A = ["left", "right"], j = ["right", "left"], M = ["top", "bottom"], N = ["bottom", "top"];
function P(e, t, n) {
switch (e) {
case "top":
case "bottom": return n ? t ? j : A : t ? A : j;
case "left":
case "right": return t ? M : N;
default: return [];
}
}
function F(e, t, n, r) {
let i = x(e), a = P(b(e), n === "start", r);
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(k)))), a;
}
function I(e) {
return e.replace(/left|right|bottom|top/g, (e) => g[e]);
}
function L(e) {
return {
top: 0,
right: 0,
bottom: 0,
left: 0,
...e
};
}
function ee(e) {
return typeof e == "number" ? {
top: e,
right: e,
bottom: e,
left: e
} : L(e);
}
function R(e) {
let { x: t, y: n, width: r, height: i } = e;
return {
width: r,
height: i,
top: n,
left: t,
right: t + r,
bottom: n + i,
x: t,
y: n
};
}
//#endregion
//#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
function z(e, t, n) {
let { reference: r, floating: i } = e, a = T(t), o = E(t), s = C(o), c = b(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
switch (c) {
case "top":
p = {
x: u,
y: r.y - i.height
};
break;
case "bottom":
p = {
x: u,
y: r.y + r.height
};
break;
case "right":
p = {
x: r.x + r.width,
y: d
};
break;
case "left":
p = {
x: r.x - i.width,
y: d
};
break;
default: p = {
x: r.x,
y: r.y
};
}
switch (x(t)) {
case "start":
p[o] -= f * (n && l ? -1 : 1);
break;
case "end":
p[o] += f * (n && l ? -1 : 1);
break;
}
return p;
}
var B = async (e, t, n) => {
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = a.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
reference: e,
floating: t,
strategy: i
}), { x: u, y: d } = z(l, r, c), f = r, p = {}, m = 0;
for (let n = 0; n < s.length; n++) {
let { name: a, fn: h } = s[n], { x: g, y: _, data: v, reset: y } = await h({
x: u,
y: d,
initialPlacement: r,
placement: f,
strategy: i,
middlewareData: p,
rects: l,
platform: o,
elements: {
reference: e,
floating: t
}
});
u = g ?? u, d = _ ?? d, p = {
...p,
[a]: {
...p[a],
...v
}
}, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (f = y.placement), y.rects && (l = y.rects === !0 ? await o.getElementRects({
reference: e,
floating: t,
strategy: i
}) : y.rects), {x: u, y: d} = z(l, f, c)), n = -1);
}
return {
x: u,
y: d,
placement: f,
strategy: i,
middlewareData: p
};
};
async function V(e, t) {
t === void 0 && (t = {});
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = y(t, e), p = ee(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = R(await i.getClippingRect({
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
boundary: c,
rootBoundary: l,
strategy: s
})), g = u === "floating" ? {
x: n,
y: r,
width: a.floating.width,
height: a.floating.height
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
x: 1,
y: 1
}, b = R(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
elements: o,
rect: g,
offsetParent: _,
strategy: s
}) : g);
return {
top: (h.top - b.top + p.top) / v.y,
bottom: (b.bottom - h.bottom + p.bottom) / v.y,
left: (h.left - b.left + p.left) / v.x,
right: (b.right - h.right + p.right) / v.x
};
}
var te = (e) => ({
name: "arrow",
options: e,
async fn(t) {
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = y(e, t) || {};
if (l == null) return {};
let f = ee(u), p = {
x: n,
y: r
}, m = E(i), h = C(m), g = await o.getDimensions(l), _ = m === "y", b = _ ? "top" : "left", S = _ ? "bottom" : "right", w = _ ? "clientHeight" : "clientWidth", T = a.reference[h] + a.reference[m] - p[m] - a.floating[h], D = p[m] - a.reference[m], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), k = O ? O[w] : 0;
(!k || !await (o.isElement == null ? void 0 : o.isElement(O))) && (k = s.floating[w] || a.floating[h]);
let A = T / 2 - D / 2, j = k / 2 - g[h] / 2 - 1, M = d(f[b], j), N = d(f[S], j), P = M, F = k - g[h] - N, I = k / 2 - g[h] / 2 + A, L = v(P, I, F), R = !c.arrow && x(i) != null && I !== L && a.reference[h] / 2 - (I < P ? M : N) - g[h] / 2 < 0, z = R ? I < P ? I - P : I - F : 0;
return {
[m]: p[m] + z,
data: {
[m]: L,
centerOffset: I - L - z,
...R && { alignmentOffset: z }
},
reset: R
};
}
}), ne = function(e) {
return e === void 0 && (e = {}), {
name: "flip",
options: e,
async fn(t) {
var n;
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = y(e, t);
if ((n = i.arrow) != null && n.alignmentOffset) return {};
let g = b(r), _ = T(o), v = b(o) === o, x = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), S = d || (v || !m ? [I(o)] : O(o)), C = p !== "none";
!d && C && S.push(...F(o, m, p, x));
let w = [o, ...S], E = await V(t, h), k = [], A = i.flip?.overflows || [];
if (l && k.push(E[g]), u) {
let e = D(r, a, x);
k.push(E[e[0]], E[e[1]]);
}
if (A = [...A, {
placement: r,
overflows: k
}], !k.every((e) => e <= 0)) {
let e = (i.flip?.index || 0) + 1, t = w[e];
if (t && (!(u === "alignment" && _ !== T(t)) || A.every((e) => T(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
data: {
index: e,
overflows: A
},
reset: { placement: t }
};
let n = A.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
if (!n) switch (f) {
case "bestFit": {
let e = A.filter((e) => {
if (C) {
let t = T(e.placement);
return t === _ || t === "y";
}
return !0;
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
e && (n = e);
break;
}
case "initialPlacement":
n = o;
break;
}
if (r !== n) return { reset: { placement: n } };
}
return {};
}
};
};
function re(e, t) {
return {
top: e.top - t.height,
right: e.right - t.width,
bottom: e.bottom - t.height,
left: e.left - t.width
};
}
function ie(e) {
return u.some((t) => e[t] >= 0);
}
var ae = function(e) {
return e === void 0 && (e = {}), {
name: "hide",
options: e,
async fn(t) {
let { rects: n } = t, { strategy: r = "referenceHidden", ...i } = y(e, t);
switch (r) {
case "referenceHidden": {
let e = re(await V(t, {
...i,
elementContext: "reference"
}), n.reference);
return { data: {
referenceHiddenOffsets: e,
referenceHidden: ie(e)
} };
}
case "escaped": {
let e = re(await V(t, {
...i,
altBoundary: !0
}), n.floating);
return { data: {
escapedOffsets: e,
escaped: ie(e)
} };
}
default: return {};
}
}
};
}, oe = /* @__PURE__ */ new Set(["left", "top"]);
async function se(e, t) {
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = b(n), s = x(n), c = T(n) === "y", l = oe.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = y(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
mainAxis: d,
crossAxis: 0,
alignmentAxis: null
} : {
mainAxis: d.mainAxis || 0,
crossAxis: d.crossAxis || 0,
alignmentAxis: d.alignmentAxis
};
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
x: p * u,
y: f * l
} : {
x: f * l,
y: p * u
};
}
var ce = function(e) {
return e === void 0 && (e = 0), {
name: "offset",
options: e,
async fn(t) {
var n;
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await se(t, e);
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
x: r + s.x,
y: i + s.y,
data: {
...s,
placement: a
}
};
}
};
}, le = function(e) {
return e === void 0 && (e = {}), {
name: "shift",
options: e,
async fn(t) {
let { x: n, y: r, placement: i } = t, { mainAxis: a = !0, crossAxis: o = !1, limiter: s = { fn: (e) => {
let { x: t, y: n } = e;
return {
x: t,
y: n
};
} }, ...c } = y(e, t), l = {
x: n,
y: r
}, u = await V(t, c), d = T(b(i)), f = S(d), p = l[f], m = l[d];
if (a) {
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = p + u[e], r = p - u[t];
p = v(n, p, r);
}
if (o) {
let e = d === "y" ? "top" : "left", t = d === "y" ? "bottom" : "right", n = m + u[e], r = m - u[t];
m = v(n, m, r);
}
let h = s.fn({
...t,
[f]: p,
[d]: m
});
return {
...h,
data: {
x: h.x - n,
y: h.y - r,
enabled: {
[f]: a,
[d]: o
}
}
};
}
};
}, ue = function(e) {
return e === void 0 && (e = {}), {
options: e,
fn(t) {
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = y(e, t), u = {
x: n,
y: r
}, d = T(i), f = S(d), p = u[f], m = u[d], h = y(s, t), g = typeof h == "number" ? {
mainAxis: h,
crossAxis: 0
} : {
mainAxis: 0,
crossAxis: 0,
...h
};
if (c) {
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
p < t ? p = t : p > n && (p = n);
}
if (l) {
let e = f === "y" ? "width" : "height", t = oe.has(b(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
m < n ? m = n : m > r && (m = r);
}
return {
[f]: p,
[d]: m
};
}
};
}, de = function(e) {
return e === void 0 && (e = {}), {
name: "size",
options: e,
async fn(t) {
var n, r;
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = y(e, t), u = await V(t, l), p = b(i), m = x(i), h = T(i) === "y", { width: g, height: _ } = a.floating, v, S;
p === "top" || p === "bottom" ? (v = p, S = m === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (S = p, v = m === "end" ? "top" : "bottom");
let C = _ - u.top - u.bottom, w = g - u.left - u.right, E = d(_ - u[v], C), D = d(g - u[S], w), O = !t.middlewareData.shift, k = E, A = D;
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = w), (r = t.middlewareData.shift) != null && r.enabled.y && (k = C), O && !m) {
let e = f(u.left, 0), t = f(u.right, 0), n = f(u.top, 0), r = f(u.bottom, 0);
h ? A = g - 2 * (e !== 0 || t !== 0 ? e + t : f(u.left, u.right)) : k = _ - 2 * (n !== 0 || r !== 0 ? n + r : f(u.top, u.bottom));
}
await c({
...t,
availableWidth: A,
availableHeight: k
});
let j = await o.getDimensions(s.floating);
return g !== j.width || _ !== j.height ? { reset: { rects: !0 } } : {};
}
};
};
//#endregion
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
function fe() {
return typeof window < "u";
}
function H(e) {
return pe(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function U(e) {
var t;
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function W(e) {
return ((pe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
}
function pe(e) {
return fe() ? e instanceof Node || e instanceof U(e).Node : !1;
}
function G(e) {
return fe() ? e instanceof Element || e instanceof U(e).Element : !1;
}
function K(e) {
return fe() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
}
function me(e) {
return !fe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
}
var he = /* @__PURE__ */ new Set(["inline", "contents"]);
function q(e) {
let { overflow: t, overflowX: n, overflowY: r, display: i } = Y(e);
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !he.has(i);
}
var ge = /* @__PURE__ */ new Set([
"table",
"td",
"th"
]);
function _e(e) {
return ge.has(H(e));
}
var ve = [":popover-open", ":modal"];
function ye(e) {
return ve.some((t) => {
try {
return e.matches(t);
} catch {
return !1;
}
});
}
var be = [
"transform",
"translate",
"scale",
"rotate",
"perspective"
], xe = [
"transform",
"translate",
"scale",
"rotate",
"perspective",
"filter"
], Se = [
"paint",
"layout",
"strict",
"content"
];
function Ce(e) {
let t = Te(), n = G(e) ? Y(e) : e;
return be.some((e) => n[e] ? n[e] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || xe.some((e) => (n.willChange || "").includes(e)) || Se.some((e) => (n.contain || "").includes(e));
}
function we(e) {
let t = X(e);
for (; K(t) && !J(t);) {
if (Ce(t)) return t;
if (ye(t)) return null;
t = X(t);
}
return null;
}
function Te() {
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
var Ee = /* @__PURE__ */ new Set([
"html",
"body",
"#document"
]);
function J(e) {
return Ee.has(H(e));
}
function Y(e) {
return U(e).getComputedStyle(e);
}
function De(e) {
return G(e) ? {
scrollLeft: e.scrollLeft,
scrollTop: e.scrollTop
} : {
scrollLeft: e.scrollX,
scrollTop: e.scrollY
};
}
function X(e) {
if (H(e) === "html") return e;
let t = e.assignedSlot || e.parentNode || me(e) && e.host || W(e);
return me(t) ? t.host : t;
}
function Oe(e) {
let t = X(e);
return J(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : K(t) && q(t) ? t : Oe(t);
}
function Z(e, t, n) {
t === void 0 && (t = []), n === void 0 && (n = !0);
let r = Oe(e), i = r === e.ownerDocument?.body, a = U(r);
if (i) {
let e = ke(a);
return t.concat(a, a.visualViewport || [], q(r) ? r : [], e && n ? Z(e) : []);
}
return t.concat(r, Z(r, [], n));
}
function ke(e) {
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
//#endregion
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
function Ae(e) {
let t = Y(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = K(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = p(n) !== a || p(r) !== o;
return s && (n = a, r = o), {
width: n,
height: r,
$: s
};
}
function je(e) {
return G(e) ? e : e.contextElement;
}
function Q(e) {
let t = je(e);
if (!K(t)) return h(1);
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Ae(t), o = (a ? p(n.width) : n.width) / r, s = (a ? p(n.height) : n.height) / i;
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
x: o,
y: s
};
}
var Me = /* @__PURE__ */ h(0);
function Ne(e) {
let t = U(e);
return !Te() || !t.visualViewport ? Me : {
x: t.visualViewport.offsetLeft,
y: t.visualViewport.offsetTop
};
}
function Pe(e, t, n) {
return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
}
function $(e, t, n, r) {
t === void 0 && (t = !1), n === void 0 && (n = !1);
let i = e.getBoundingClientRect(), a = je(e), o = h(1);
t && (r ? G(r) && (o = Q(r)) : o = Q(e));
let s = Pe(a, n, r) ? Ne(a) : h(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
if (a) {
let e = U(a), t = r && G(r) ? U(r) : r, n = e, i = ke(n);
for (; i && r && t !== n;) {
let e = Q(i), t = i.getBoundingClientRect(), r = Y(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = U(i), i = ke(n);
}
}
return R({
width: u,
height: d,
x: c,
y: l
});
}
function Fe(e, t) {
let n = De(e).scrollLeft;
return t ? t.left + n : $(W(e)).left + n;
}
function Ie(e, t) {
let n = e.getBoundingClientRect();
return {
x: n.left + t.scrollLeft - Fe(e, n),
y: n.top + t.scrollTop
};
}
function Le(e) {
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = W(r), s = t ? ye(t.floating) : !1;
if (r === o || s && a) return n;
let c = {
scrollLeft: 0,
scrollTop: 0
}, l = h(1), u = h(0), d = K(r);
if ((d || !d && !a) && ((H(r) !== "body" || q(o)) && (c = De(r)), K(r))) {
let e = $(r);
l = Q(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
}
let f = o && !d && !a ? Ie(o, c) : h(0);
return {
width: n.width * l.x,
height: n.height * l.y,
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
};
}
function Re(e) {
return Array.from(e.getClientRects());
}
function ze(e) {
let t = W(e), n = De(e), r = e.ownerDocument.body, i = f(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = f(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Fe(e), s = -n.scrollTop;
return Y(r).direction === "rtl" && (o += f(t.clientWidth, r.clientWidth) - i), {
width: i,
height: a,
x: o,
y: s
};
}
var Be = 25;
function Ve(e, t) {
let n = U(e), r = W(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
if (i) {
a = i.width, o = i.height;
let e = Te();
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
}
let l = Fe(r);
if (l <= 0) {
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
o <= Be && (a -= o);
} else l <= Be && (a += l);
return {
width: a,
height: o,
x: s,
y: c
};
}
var He = /* @__PURE__ */ new Set(["absolute", "fixed"]);
function Ue(e, t) {
let n = $(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = K(e) ? Q(e) : h(1);
return {
width: e.clientWidth * a.x,
height: e.clientHeight * a.y,
x: i * a.x,
y: r * a.y
};
}
function We(e, t, n) {
let r;
if (t === "viewport") r = Ve(e, n);
else if (t === "document") r = ze(W(e));
else if (G(t)) r = Ue(t, n);
else {
let n = Ne(e);
r = {
x: t.x - n.x,
y: t.y - n.y,
width: t.width,
height: t.height
};
}
return R(r);
}
function Ge(e, t) {
let n = X(e);
return n === t || !G(n) || J(n) ? !1 : Y(n).position === "fixed" || Ge(n, t);
}
function Ke(e, t) {
let n = t.get(e);
if (n) return n;
let r = Z(e, [], !1).filter((e) => G(e) && H(e) !== "body"), i = null, a = Y(e).position === "fixed", o = a ? X(e) : e;
for (; G(o) && !J(o);) {
let t = Y(o), n = Ce(o);
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && He.has(i.position) || q(o) && !n && Ge(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = X(o);
}
return t.set(e, r), r;
}
function qe(e) {
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? ye(t) ? [] : Ke(t, this._c) : [].concat(n), r], o = a[0], s = a.reduce((e, n) => {
let r = We(t, n, i);
return e.top = f(r.top, e.top), e.right = d(r.right, e.right), e.bottom = d(r.bottom, e.bottom), e.left = f(r.left, e.left), e;
}, We(t, o, i));
return {
width: s.right - s.left,
height: s.bottom - s.top,
x: s.left,
y: s.top
};
}
function Je(e) {
let { width: t, height: n } = Ae(e);
return {
width: t,
height: n
};
}
function Ye(e, t, n) {
let r = K(t), i = W(t), a = n === "fixed", o = $(e, !0, a, t), s = {
scrollLeft: 0,
scrollTop: 0
}, c = h(0);
function l() {
c.x = Fe(i);
}
if (r || !r && !a) if ((H(t) !== "body" || q(i)) && (s = De(t)), r) {
let e = $(t, !0, a, t);
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
} else i && l();
a && !r && i && l();
let u = i && !r && !a ? Ie(i, s) : h(0);
return {
x: o.left + s.scrollLeft - c.x - u.x,
y: o.top + s.scrollTop - c.y - u.y,
width: o.width,
height: o.height
};
}
function Xe(e) {
return Y(e).position === "static";
}
function Ze(e, t) {
if (!K(e) || Y(e).position === "fixed") return null;
if (t) return t(e);
let n = e.offsetParent;
return W(e) === n && (n = n.ownerDocument.body), n;
}
function Qe(e, t) {
let n = U(e);
if (ye(e)) return n;
if (!K(e)) {
let t = X(e);
for (; t && !J(t);) {
if (G(t) && !Xe(t)) return t;
t = X(t);
}
return n;
}
let r = Ze(e, t);
for (; r && _e(r) && Xe(r);) r = Ze(r, t);
return r && J(r) && Xe(r) && !Ce(r) ? n : r || we(e) || n;
}
var $e = async function(e) {
let t = this.getOffsetParent || Qe, n = this.getDimensions, r = await n(e.floating);
return {
reference: Ye(e.reference, await t(e.floating), e.strategy),
floating: {
x: 0,
y: 0,
width: r.width,
height: r.height
}
};
};
function et(e) {
return Y(e).direction === "rtl";
}
var tt = {
convertOffsetParentRelativeRectToViewportRelativeRect: Le,
getDocumentElement: W,
getClippingRect: qe,
getOffsetParent: Qe,
getElementRects: $e,
getClientRects: Re,
getDimensions: Je,
getScale: Q,
isElement: G,
isRTL: et
};
function nt(e, t) {
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
}
function rt(e, t) {
let n = null, r, i = W(e);
function a() {
var e;
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
}
function o(s, c) {
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
let l = e.getBoundingClientRect(), { left: u, top: p, width: h, height: g } = l;
if (s || t(), !h || !g) return;
let _ = m(p), v = m(i.clientWidth - (u + h)), y = m(i.clientHeight - (p + g)), b = m(u), x = {
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
threshold: f(0, d(1, c)) || 1
}, S = !0;
function C(t) {
let n = t[0].intersectionRatio;
if (n !== c) {
if (!S) return o();
n ? o(!1, n) : r = setTimeout(() => {
o(!1, 1e-7);
}, 1e3);
}
n === 1 && !nt(l, e.getBoundingClientRect()) && o(), S = !1;
}
try {
n = new IntersectionObserver(C, {
...x,
root: i.ownerDocument
});
} catch {
n = new IntersectionObserver(C, x);
}
n.observe(e);
}
return o(!0), a;
}
function it(e, t, n, r) {
r === void 0 && (r = {});
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = je(e), u = i || a ? [...l ? Z(l) : [], ...Z(t)] : [];
u.forEach((e) => {
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
});
let d = l && s ? rt(l, n) : null, f = -1, p = null;
o && (p = new ResizeObserver((e) => {
let [r] = e;
r && r.target === l && p && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
var e;
(e = p) == null || e.observe(t);
})), n();
}), l && !c && p.observe(l), p.observe(t));
let m, h = c ? $(e) : null;
c && g();
function g() {
let t = $(e);
h && !nt(h, t) && n(), h = t, m = requestAnimationFrame(g);
}
return n(), () => {
var e;
u.forEach((e) => {
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
};
}
var at = ce, ot = le, st = ne, ct = de, lt = ae, ut = te, dt = ue, ft = (e, t, n) => {
let r = /* @__PURE__ */ new Map(), i = {
platform: tt,
...n
}, a = {
...i.platform,
_c: r
};
return B(e, t, {
...i,
platform: a
});
}, pt = typeof document < "u" ? s : function() {};
function mt(e, t) {
if (e === t) return !0;
if (typeof e != typeof t) return !1;
if (typeof e == "function" && e.toString() === t.toString()) return !0;
let n, r, i;
if (e && t && typeof e == "object") {
if (Array.isArray(e)) {
if (n = e.length, n !== t.length) return !1;
for (r = n; r-- !== 0;) if (!mt(e[r], t[r])) return !1;
return !0;
}
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
for (r = n; r-- !== 0;) {
let n = i[r];
if (!(n === "_owner" && e.$$typeof) && !mt(e[n], t[n])) return !1;
}
return !0;
}
return e !== e && t !== t;
}
function ht(e) {
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
}
function gt(e, t) {
let n = ht(e);
return Math.round(t * n) / n;
}
function _t(e) {
let t = o.useRef(e);
return pt(() => {
t.current = e;
}), t;
}
function vt(e) {
e === void 0 && (e = {});
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: s } = {}, transform: c = !0, whileElementsMounted: u, open: d } = e, [f, p] = o.useState({
x: 0,
y: 0,
strategy: n,
placement: t,
middlewareData: {},
isPositioned: !1
}), [m, h] = o.useState(r);
mt(m, r) || h(r);
let [g, _] = o.useState(null), [v, y] = o.useState(null), b = o.useCallback((e) => {
e !== w.current && (w.current = e, _(e));
}, []), x = o.useCallback((e) => {
e !== T.current && (T.current = e, y(e));
}, []), S = a || g, C = s || v, w = o.useRef(null), T = o.useRef(null), E = o.useRef(f), D = u != null, O = _t(u), k = _t(i), A = _t(d), j = o.useCallback(() => {
if (!w.current || !T.current) return;
let e = {
placement: t,
strategy: n,
middleware: m
};
k.current && (e.platform = k.current), ft(w.current, T.current, e).then((e) => {
let t = {
...e,
isPositioned: A.current !== !1
};
M.current && !mt(E.current, t) && (E.current = t, l.flushSync(() => {
p(t);
}));
});
}, [
m,
t,
n,
k,
A
]);
pt(() => {
d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((e) => ({
...e,
isPositioned: !1
})));
}, [d]);
let M = o.useRef(!1);
pt(() => (M.current = !0, () => {
M.current = !1;
}), []), pt(() => {
if (S && (w.current = S), C && (T.current = C), S && C) {
if (O.current) return O.current(S, C, j);
j();
}
}, [
S,
C,
j,
O,
D
]);
let N = o.useMemo(() => ({
reference: w,
floating: T,
setReference: b,
setFloating: x
}), [b, x]), P = o.useMemo(() => ({
reference: S,
floating: C
}), [S, C]), F = o.useMemo(() => {
let e = {
position: n,
left: 0,
top: 0
};
if (!P.floating) return e;
let t = gt(P.floating, f.x), r = gt(P.floating, f.y);
return c ? {
...e,
transform: "translate(" + t + "px, " + r + "px)",
...ht(P.floating) >= 1.5 && { willChange: "transform" }
} : {
position: n,
left: t,
top: r
};
}, [
n,
c,
P.floating,
f.x,
f.y
]);
return o.useMemo(() => ({
...f,
update: j,
refs: N,
elements: P,
floatingStyles: F
}), [
f,
j,
N,
P,
F
]);
}
var yt = (e) => {
function t(e) {
return {}.hasOwnProperty.call(e, "current");
}
return {
name: "arrow",
options: e,
fn(n) {
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
return r && t(r) ? r.current == null ? {} : ut({
element: r.current,
padding: i
}).fn(n) : r ? ut({
element: r,
padding: i
}).fn(n) : {};
}
};
}, bt = (e, t) => ({
...at(e),
options: [e, t]
}), xt = (e, t) => ({
...ot(e),
options: [e, t]
}), St = (e, t) => ({
...dt(e),
options: [e, t]
}), Ct = (e, t) => ({
...st(e),
options: [e, t]
}), wt = (e, t) => ({
...ct(e),
options: [e, t]
}), Tt = (e, t) => ({
...lt(e),
options: [e, t]
}), Et = (e, t) => ({
...yt(e),
options: [e, t]
}), Dt = "Arrow", Ot = o.forwardRef((e, n) => {
let { children: r, width: i = 10, height: a = 5, ...o } = e;
return /* @__PURE__ */ c(t.svg, {
...o,
ref: n,
width: i,
height: a,
viewBox: "0 0 30 10",
preserveAspectRatio: "none",
children: e.asChild ? r : /* @__PURE__ */ c("polygon", { points: "0,0 30,0 15,10" })
});
});
Ot.displayName = Dt;
var kt = Ot, At = "Popper", [jt, Mt] = n(At), [Nt, Pt] = jt(At), Ft = (e) => {
let { __scopePopper: t, children: n } = e, [r, i] = o.useState(null);
return /* @__PURE__ */ c(Nt, {
scope: t,
anchor: r,
onAnchorChange: i,
children: n
});
};
Ft.displayName = At;
var It = "PopperAnchor", Lt = o.forwardRef((n, r) => {
let { __scopePopper: i, virtualRef: a, ...s } = n, l = Pt(It, i), u = o.useRef(null), d = e(r, u), f = o.useRef(null);
return o.useEffect(() => {
let e = f.current;
f.current = a?.current || u.current, e !== f.current && l.onAnchorChange(f.current);
}), a ? null : /* @__PURE__ */ c(t.div, {
...s,
ref: d
});
});
Lt.displayName = It;
var Rt = "PopperContent", [zt, Bt] = jt(Rt), Vt = o.forwardRef((n, s) => {
let { __scopePopper: l, side: u = "bottom", sideOffset: d = 0, align: f = "center", alignOffset: p = 0, arrowPadding: m = 0, avoidCollisions: h = !0, collisionBoundary: g = [], collisionPadding: _ = 0, sticky: v = "partial", hideWhenDetached: y = !1, updatePositionStrategy: b = "optimized", onPlaced: x, ...S } = n, C = Pt(Rt, l), [w, T] = o.useState(null), E = e(s, (e) => T(e)), [D, O] = o.useState(null), k = a(D), A = k?.width ?? 0, j = k?.height ?? 0, M = u + (f === "center" ? "" : "-" + f), N = typeof _ == "number" ? _ : {
top: 0,
right: 0,
bottom: 0,
left: 0,
..._
}, P = Array.isArray(g) ? g : [g], F = P.length > 0, I = {
padding: N,
boundary: P.filter(Gt),
altBoundary: F
}, { refs: L, floatingStyles: ee, placement: R, isPositioned: z, middlewareData: B } = vt({
strategy: "fixed",
placement: M,
whileElementsMounted: (...e) => it(...e, { animationFrame: b === "always" }),
elements: { reference: C.anchor },
middleware: [
bt({
mainAxis: d + j,
alignmentAxis: p
}),
h && xt({
mainAxis: !0,
crossAxis: !1,
limiter: v === "partial" ? St() : void 0,
...I
}),
h && Ct({ ...I }),
wt({
...I,
apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
let { width: i, height: a } = t.reference, o = e.floating.style;
o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
}
}),
D && Et({
element: D,
padding: m
}),
Kt({
arrowWidth: A,
arrowHeight: j
}),
y && Tt({
strategy: "referenceHidden",
...I
})
]
}), [V, te] = qt(R), ne = i(x);
r(() => {
z && ne?.();
}, [z, ne]);
let re = B.arrow?.x, ie = B.arrow?.y, ae = B.arrow?.centerOffset !== 0, [oe, se] = o.useState();
return r(() => {
w && se(window.getComputedStyle(w).zIndex);
}, [w]), /* @__PURE__ */ c("div", {
ref: L.setFloating,
"data-radix-popper-content-wrapper": "",
style: {
...ee,
transform: z ? ee.transform : "translate(0, -200%)",
minWidth: "max-content",
zIndex: oe,
"--radix-popper-transform-origin": [B.transformOrigin?.x, B.transformOrigin?.y].join(" "),
...B.hide?.referenceHidden && {
visibility: "hidden",
pointerEvents: "none"
}
},
dir: n.dir,
children: /* @__PURE__ */ c(zt, {
scope: l,
placedSide: V,
onArrowChange: O,
arrowX: re,
arrowY: ie,
shouldHideArrow: ae,
children: /* @__PURE__ */ c(t.div, {
"data-side": V,
"data-align": te,
...S,
ref: E,
style: {
...S.style,
animation: z ? void 0 : "none"
}
})
})
});
});
Vt.displayName = Rt;
var Ht = "PopperArrow", Ut = {
top: "bottom",
right: "left",
bottom: "top",
left: "right"
}, Wt = o.forwardRef(function(e, t) {
let { __scopePopper: n, ...r } = e, i = Bt(Ht, n), a = Ut[i.placedSide];
return /* @__PURE__ */ c("span", {
ref: i.onArrowChange,
style: {
position: "absolute",
left: i.arrowX,
top: i.arrowY,
[a]: 0,
transformOrigin: {
top: "",
right: "0 0",
bottom: "center 0",
left: "100% 0"
}[i.placedSide],
transform: {
top: "translateY(100%)",
right: "translateY(50%) rotate(90deg) translateX(-50%)",
bottom: "rotate(180deg)",
left: "translateY(50%) rotate(-90deg) translateX(50%)"
}[i.placedSide],
visibility: i.shouldHideArrow ? "hidden" : void 0
},
children: /* @__PURE__ */ c(kt, {
...r,
ref: t,
style: {
...r.style,
display: "block"
}
})
});
});
Wt.displayName = Ht;
function Gt(e) {
return e !== null;
}
var Kt = (e) => ({
name: "transformOrigin",
options: e,
fn(t) {
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = qt(n), u = {
start: "0%",
center: "50%",
end: "100%"
}[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
x: p,
y: m
} };
}
});
function qt(e) {
let [t, n = "center"] = e.split("-");
return [t, n];
}
var Jt = Ft, Yt = Lt, Xt = Vt, Zt = Wt;
//#endregion
export { Mt as a, Jt as i, Zt as n, Xt as r, Yt as t };
import { a as e, d as t, f as n, i as r, r as i } from "./dist-CgoP608h.js";
import * as a from "react";
import { jsx as o } from "react/jsx-runtime";
import s from "react-dom";
//#region node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
function c(e) {
let t = a.useRef(e);
return a.useEffect(() => {
t.current = e;
}), a.useMemo(() => (...e) => t.current?.(...e), []);
}
//#endregion
//#region node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
function l(e, t = globalThis?.document) {
let n = c(e);
a.useEffect(() => {
let e = (e) => {
e.key === "Escape" && n(e);
};
return t.addEventListener("keydown", e, { capture: !0 }), () => t.removeEventListener("keydown", e, { capture: !0 });
}, [n, t]);
}
//#endregion
//#region node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
var u = "DismissableLayer", d = "dismissableLayer.update", f = "dismissableLayer.pointerDownOutside", p = "dismissableLayer.focusOutside", m, h = a.createContext({
layers: /* @__PURE__ */ new Set(),
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
branches: /* @__PURE__ */ new Set()
}), g = a.forwardRef((e, i) => {
let { disableOutsidePointerEvents: s = !1, onEscapeKeyDown: c, onPointerDownOutside: u, onFocusOutside: f, onInteractOutside: p, onDismiss: g, ..._ } = e, v = a.useContext(h), [S, C] = a.useState(null), w = S?.ownerDocument ?? globalThis?.document, [, T] = a.useState({}), E = t(i, (e) => C(e)), D = Array.from(v.layers), [O] = [...v.layersWithOutsidePointerEventsDisabled].slice(-1), k = D.indexOf(O), A = S ? D.indexOf(S) : -1, j = v.layersWithOutsidePointerEventsDisabled.size > 0, M = A >= k, N = y((e) => {
let t = e.target, n = [...v.branches].some((e) => e.contains(t));
!M || n || (u?.(e), p?.(e), e.defaultPrevented || g?.());
}, w), P = b((e) => {
let t = e.target;
[...v.branches].some((e) => e.contains(t)) || (f?.(e), p?.(e), e.defaultPrevented || g?.());
}, w);
return l((e) => {
A === v.layers.size - 1 && (c?.(e), !e.defaultPrevented && g && (e.preventDefault(), g()));
}, w), a.useEffect(() => {
if (S) return s && (v.layersWithOutsidePointerEventsDisabled.size === 0 && (m = w.body.style.pointerEvents, w.body.style.pointerEvents = "none"), v.layersWithOutsidePointerEventsDisabled.add(S)), v.layers.add(S), x(), () => {
s && v.layersWithOutsidePointerEventsDisabled.size === 1 && (w.body.style.pointerEvents = m);
};
}, [
S,
w,
s,
v
]), a.useEffect(() => () => {
S && (v.layers.delete(S), v.layersWithOutsidePointerEventsDisabled.delete(S), x());
}, [S, v]), a.useEffect(() => {
let e = () => T({});
return document.addEventListener(d, e), () => document.removeEventListener(d, e);
}, []), /* @__PURE__ */ o(r.div, {
..._,
ref: E,
style: {
pointerEvents: j ? M ? "auto" : "none" : void 0,
...e.style
},
onFocusCapture: n(e.onFocusCapture, P.onFocusCapture),
onBlurCapture: n(e.onBlurCapture, P.onBlurCapture),
onPointerDownCapture: n(e.onPointerDownCapture, N.onPointerDownCapture)
});
});
g.displayName = u;
var _ = "DismissableLayerBranch", v = a.forwardRef((e, n) => {
let i = a.useContext(h), s = a.useRef(null), c = t(n, s);
return a.useEffect(() => {
let e = s.current;
if (e) return i.branches.add(e), () => {
i.branches.delete(e);
};
}, [i.branches]), /* @__PURE__ */ o(r.div, {
...e,
ref: c
});
});
v.displayName = _;
function y(e, t = globalThis?.document) {
let n = c(e), r = a.useRef(!1), i = a.useRef(() => {});
return a.useEffect(() => {
let e = (e) => {
if (e.target && !r.current) {
let r = function() {
S(f, n, a, { discrete: !0 });
}, a = { originalEvent: e };
e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = r, t.addEventListener("click", i.current, { once: !0 })) : r();
} else t.removeEventListener("click", i.current);
r.current = !1;
}, a = window.setTimeout(() => {
t.addEventListener("pointerdown", e);
}, 0);
return () => {
window.clearTimeout(a), t.removeEventListener("pointerdown", e), t.removeEventListener("click", i.current);
};
}, [t, n]), { onPointerDownCapture: () => r.current = !0 };
}
function b(e, t = globalThis?.document) {
let n = c(e), r = a.useRef(!1);
return a.useEffect(() => {
let e = (e) => {
e.target && !r.current && S(p, n, { originalEvent: e }, { discrete: !1 });
};
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
}, [t, n]), {
onFocusCapture: () => r.current = !0,
onBlurCapture: () => r.current = !1
};
}
function x() {
let e = new CustomEvent(d);
document.dispatchEvent(e);
}
function S(t, n, r, { discrete: i }) {
let a = r.originalEvent.target, o = new CustomEvent(t, {
bubbles: !1,
cancelable: !0,
detail: r
});
n && a.addEventListener(t, n, { once: !0 }), i ? e(a, o) : a.dispatchEvent(o);
}
//#endregion
//#region node_modules/@radix-ui/react-id/dist/index.mjs
var C = a.useId || (() => void 0), w = 0;
function T(e) {
let [t, n] = a.useState(C());
return i(() => {
e || n((e) => e ?? String(w++));
}, [e]), e || (t ? `radix-${t}` : "");
}
//#endregion
//#region node_modules/@radix-ui/react-portal/dist/index.mjs
var E = "Portal", D = a.forwardRef((e, t) => {
let { container: n, ...c } = e, [l, u] = a.useState(!1);
i(() => u(!0), []);
let d = n || l && globalThis?.document?.body;
return d ? s.createPortal(/* @__PURE__ */ o(r.div, {
...c,
ref: t
}), d) : null;
});
D.displayName = E;
//#endregion
export { c as i, T as n, g as r, D as t };
import * as e from "react";
import { Fragment as t, jsx as n } from "react/jsx-runtime";
import * as r from "react-dom";
typeof window < "u" && window.document && window.document.createElement;
function i(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
return function(r) {
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
};
}
//#endregion
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
function a(e, t) {
if (typeof e == "function") return e(t);
e != null && (e.current = t);
}
function o(...e) {
return (t) => {
let n = !1, r = e.map((e) => {
let r = a(e, t);
return !n && typeof r == "function" && (n = !0), r;
});
if (n) return () => {
for (let t = 0; t < r.length; t++) {
let n = r[t];
typeof n == "function" ? n() : a(e[t], null);
}
};
};
}
function s(...t) {
return e.useCallback(o(...t), t);
}
//#endregion
//#region node_modules/@radix-ui/react-context/dist/index.mjs
function c(t, r) {
let i = e.createContext(r), a = (t) => {
let { children: r, ...a } = t, o = e.useMemo(() => a, Object.values(a));
return /* @__PURE__ */ n(i.Provider, {
value: o,
children: r
});
};
a.displayName = t + "Provider";
function o(n) {
let a = e.useContext(i);
if (a) return a;
if (r !== void 0) return r;
throw Error(`\`${n}\` must be used within \`${t}\``);
}
return [a, o];
}
function l(t, r = []) {
let i = [];
function a(r, a) {
let o = e.createContext(a), s = i.length;
i = [...i, a];
let c = (r) => {
let { scope: i, children: a, ...c } = r, l = i?.[t]?.[s] || o, u = e.useMemo(() => c, Object.values(c));
return /* @__PURE__ */ n(l.Provider, {
value: u,
children: a
});
};
c.displayName = r + "Provider";
function l(n, i) {
let c = i?.[t]?.[s] || o, l = e.useContext(c);
if (l) return l;
if (a !== void 0) return a;
throw Error(`\`${n}\` must be used within \`${r}\``);
}
return [c, l];
}
let o = () => {
let n = i.map((t) => e.createContext(t));
return function(r) {
let i = r?.[t] || n;
return e.useMemo(() => ({ [`__scope${t}`]: {
...r,
[t]: i
} }), [r, i]);
};
};
return o.scopeName = t, [a, u(o, ...r)];
}
function u(...t) {
let n = t[0];
if (t.length === 1) return n;
let r = () => {
let r = t.map((e) => ({
useScope: e(),
scopeName: e.scopeName
}));
return function(t) {
let i = r.reduce((e, { useScope: n, scopeName: r }) => {
let i = n(t)[`__scope${r}`];
return {
...e,
...i
};
}, {});
return e.useMemo(() => ({ [`__scope${n.scopeName}`]: i }), [i]);
};
};
return r.scopeName = n.scopeName, r;
}
//#endregion
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
/* @__NO_SIDE_EFFECTS__ */
function d(t) {
let r = /* @__PURE__ */ f(t), i = e.forwardRef((t, i) => {
let { children: a, ...o } = t, s = e.Children.toArray(a), c = s.find(h);
if (c) {
let t = c.props.children, a = s.map((n) => n === c ? e.Children.count(t) > 1 ? e.Children.only(null) : e.isValidElement(t) ? t.props.children : null : n);
return /* @__PURE__ */ n(r, {
...o,
ref: i,
children: e.isValidElement(t) ? e.cloneElement(t, void 0, a) : null
});
}
return /* @__PURE__ */ n(r, {
...o,
ref: i,
children: a
});
});
return i.displayName = `${t}.Slot`, i;
}
/* @__NO_SIDE_EFFECTS__ */
function f(t) {
let n = e.forwardRef((t, n) => {
let { children: r, ...i } = t;
if (e.isValidElement(r)) {
let t = _(r), a = g(i, r.props);
return r.type !== e.Fragment && (a.ref = n ? o(n, t) : t), e.cloneElement(r, a);
}
return e.Children.count(r) > 1 ? e.Children.only(null) : null;
});
return n.displayName = `${t}.SlotClone`, n;
}
var p = Symbol("radix.slottable");
/* @__NO_SIDE_EFFECTS__ */
function m(e) {
let r = ({ children: e }) => /* @__PURE__ */ n(t, { children: e });
return r.displayName = `${e}.Slottable`, r.__radixId = p, r;
}
function h(t) {
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === p;
}
function g(e, t) {
let n = { ...t };
for (let r in t) {
let i = e[r], a = t[r];
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
let t = a(...e);
return i(...e), t;
} : i && (n[r] = i) : r === "style" ? n[r] = {
...i,
...a
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
}
return {
...e,
...n
};
}
function _(e) {
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
var v = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
].reduce((t, r) => {
let i = /* @__PURE__ */ d(`Primitive.${r}`), a = e.forwardRef((e, t) => {
let { asChild: a, ...o } = e, s = a ? i : r;
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, {
...o,
ref: t
});
});
return a.displayName = `Primitive.${r}`, {
...t,
[r]: a
};
}, {});
function y(e, t) {
e && r.flushSync(() => e.dispatchEvent(t));
}
//#endregion
//#region node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var b = globalThis?.document ? e.useLayoutEffect : () => {};
//#endregion
//#region node_modules/@radix-ui/react-presence/dist/index.mjs
function x(t, n) {
return e.useReducer((e, t) => n[e][t] ?? e, t);
}
var S = (t) => {
let { present: n, children: r } = t, i = C(n), a = typeof r == "function" ? r({ present: i.isPresent }) : e.Children.only(r), o = s(i.ref, T(a));
return typeof r == "function" || i.isPresent ? e.cloneElement(a, { ref: o }) : null;
};
S.displayName = "Presence";
function C(t) {
let [n, r] = e.useState(), i = e.useRef(null), a = e.useRef(t), o = e.useRef("none"), [s, c] = x(t ? "mounted" : "unmounted", {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: { MOUNT: "mounted" }
});
return e.useEffect(() => {
let e = w(i.current);
o.current = s === "mounted" ? e : "none";
}, [s]), b(() => {
let e = i.current, n = a.current;
if (n !== t) {
let r = o.current, i = w(e);
t ? c("MOUNT") : i === "none" || e?.display === "none" ? c("UNMOUNT") : c(n && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), a.current = t;
}
}, [t, c]), b(() => {
if (n) {
let e, t = n.ownerDocument.defaultView ?? window, r = (r) => {
let o = w(i.current).includes(CSS.escape(r.animationName));
if (r.target === n && o && (c("ANIMATION_END"), !a.current)) {
let r = n.style.animationFillMode;
n.style.animationFillMode = "forwards", e = t.setTimeout(() => {
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = r);
});
}
}, s = (e) => {
e.target === n && (o.current = w(i.current));
};
return n.addEventListener("animationstart", s), n.addEventListener("animationcancel", r), n.addEventListener("animationend", r), () => {
t.clearTimeout(e), n.removeEventListener("animationstart", s), n.removeEventListener("animationcancel", r), n.removeEventListener("animationend", r);
};
} else c("ANIMATION_END");
}, [n, c]), {
isPresent: ["mounted", "unmountSuspended"].includes(s),
ref: e.useCallback((e) => {
i.current = e ? getComputedStyle(e) : null, r(e);
}, [])
};
}
function w(e) {
return e?.animationName || "none";
}
function T(e) {
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var E = e.useInsertionEffect || b;
function D({ prop: t, defaultProp: n, onChange: r = () => {}, caller: i }) {
let [a, o, s] = O({
defaultProp: n,
onChange: r
}), c = t !== void 0, l = c ? t : a;
{
let n = e.useRef(t !== void 0);
e.useEffect(() => {
let e = n.current;
e !== c && console.warn(`${i} is changing from ${e ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), n.current = c;
}, [c, i]);
}
return [l, e.useCallback((e) => {
if (c) {
let n = k(e) ? e(t) : e;
n !== t && s.current?.(n);
} else o(e);
}, [
c,
t,
o,
s
])];
}
function O({ defaultProp: t, onChange: n }) {
let [r, i] = e.useState(t), a = e.useRef(r), o = e.useRef(n);
return E(() => {
o.current = n;
}, [n]), e.useEffect(() => {
a.current !== r && (o.current?.(r), a.current = r);
}, [r, a]), [
r,
i,
o
];
}
function k(e) {
return typeof e == "function";
}
//#endregion
export { y as a, c, s as d, i as f, v as i, l, S as n, d as o, b as r, m as s, D as t, o as u };
import { r as e } from "./dist-CgoP608h.js";
import * as t from "react";
//#region node_modules/@radix-ui/react-use-size/dist/index.mjs
function n(n) {
let [r, i] = t.useState(void 0);
return e(() => {
if (n) {
i({
width: n.offsetWidth,
height: n.offsetHeight
});
let e = new ResizeObserver((e) => {
if (!Array.isArray(e) || !e.length) return;
let t = e[0], r, a;
if ("borderBoxSize" in t) {
let e = t.borderBoxSize, n = Array.isArray(e) ? e[0] : e;
r = n.inlineSize, a = n.blockSize;
} else r = n.offsetWidth, a = n.offsetHeight;
i({
width: r,
height: a
});
});
return e.observe(n, { box: "border-box" }), () => e.unobserve(n);
} else i(void 0);
}, [n]), r;
}
//#endregion
export { n as t };
import { a as e, d as t, f as n, i as r, l as i, n as a, o, t as s, u as c } from "./dist-CgoP608h.js";
import { i as l, n as u, r as d, t as f } from "./dist-BfuBBQ14.js";
import { a as p, i as m, n as h, r as g, t as _ } from "./dist-B2hwhF6G.js";
import { i as v, n as y, r as b, t as x } from "./Combination-11kyhTGt.js";
import * as S from "react";
import C from "react";
import { jsx as w } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-collection/dist/index.mjs
function T(e) {
let n = e + "CollectionProvider", [r, a] = i(n), [s, c] = r(n, {
collectionRef: { current: null },
itemMap: /* @__PURE__ */ new Map()
}), l = (e) => {
let { scope: t, children: n } = e, r = C.useRef(null), i = C.useRef(/* @__PURE__ */ new Map()).current;
return /* @__PURE__ */ w(s, {
scope: t,
itemMap: i,
collectionRef: r,
children: n
});
};
l.displayName = n;
let u = e + "CollectionSlot", d = o(u), f = C.forwardRef((e, n) => {
let { scope: r, children: i } = e;
return /* @__PURE__ */ w(d, {
ref: t(n, c(u, r).collectionRef),
children: i
});
});
f.displayName = u;
let p = e + "CollectionItemSlot", m = "data-radix-collection-item", h = o(p), g = C.forwardRef((e, n) => {
let { scope: r, children: i, ...a } = e, o = C.useRef(null), s = t(n, o), l = c(p, r);
return C.useEffect(() => (l.itemMap.set(o, {
ref: o,
...a
}), () => void l.itemMap.delete(o))), /* @__PURE__ */ w(h, {
[m]: "",
ref: s,
children: i
});
});
g.displayName = p;
function _(t) {
let n = c(e + "CollectionConsumer", t);
return C.useCallback(() => {
let e = n.collectionRef.current;
if (!e) return [];
let t = Array.from(e.querySelectorAll(`[${m}]`));
return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
}, [n.collectionRef, n.itemMap]);
}
return [
{
Provider: l,
Slot: f,
ItemSlot: g
},
_,
a
];
}
//#endregion
//#region node_modules/@radix-ui/react-direction/dist/index.mjs
var E = S.createContext(void 0);
function D(e) {
let t = S.useContext(E);
return e || t || "ltr";
}
//#endregion
//#region node_modules/@radix-ui/react-roving-focus/dist/index.mjs
var O = "rovingFocusGroup.onEntryFocus", ee = {
bubbles: !1,
cancelable: !0
}, k = "RovingFocusGroup", [A, j, M] = T(k), [N, P] = i(k, [M]), [te, F] = N(k), I = S.forwardRef((e, t) => /* @__PURE__ */ w(A.Provider, {
scope: e.__scopeRovingFocusGroup,
children: /* @__PURE__ */ w(A.Slot, {
scope: e.__scopeRovingFocusGroup,
children: /* @__PURE__ */ w(L, {
...e,
ref: t
})
})
}));
I.displayName = k;
var L = S.forwardRef((e, i) => {
let { __scopeRovingFocusGroup: a, orientation: o, loop: c = !1, dir: u, currentTabStopId: d, defaultCurrentTabStopId: f, onCurrentTabStopIdChange: p, onEntryFocus: m, preventScrollOnEntryFocus: h = !1, ...g } = e, _ = S.useRef(null), v = t(i, _), y = D(u), [b, x] = s({
prop: d,
defaultProp: f ?? null,
onChange: p,
caller: k
}), [C, T] = S.useState(!1), E = l(m), A = j(a), M = S.useRef(!1), [N, P] = S.useState(0);
return S.useEffect(() => {
let e = _.current;
if (e) return e.addEventListener(O, E), () => e.removeEventListener(O, E);
}, [E]), /* @__PURE__ */ w(te, {
scope: a,
orientation: o,
dir: y,
loop: c,
currentTabStopId: b,
onItemFocus: S.useCallback((e) => x(e), [x]),
onItemShiftTab: S.useCallback(() => T(!0), []),
onFocusableItemAdd: S.useCallback(() => P((e) => e + 1), []),
onFocusableItemRemove: S.useCallback(() => P((e) => e - 1), []),
children: /* @__PURE__ */ w(r.div, {
tabIndex: C || N === 0 ? -1 : 0,
"data-orientation": o,
...g,
ref: v,
style: {
outline: "none",
...e.style
},
onMouseDown: n(e.onMouseDown, () => {
M.current = !0;
}),
onFocus: n(e.onFocus, (e) => {
let t = !M.current;
if (e.target === e.currentTarget && t && !C) {
let t = new CustomEvent(O, ee);
if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
let e = A().filter((e) => e.focusable);
oe([
e.find((e) => e.active),
e.find((e) => e.id === b),
...e
].filter(Boolean).map((e) => e.ref.current), h);
}
}
M.current = !1;
}),
onBlur: n(e.onBlur, () => T(!1))
})
});
}), ne = "RovingFocusGroupItem", re = S.forwardRef((e, t) => {
let { __scopeRovingFocusGroup: i, focusable: a = !0, active: o = !1, tabStopId: s, children: c, ...l } = e, d = u(), f = s || d, p = F(ne, i), m = p.currentTabStopId === f, h = j(i), { onFocusableItemAdd: g, onFocusableItemRemove: _, currentTabStopId: v } = p;
return S.useEffect(() => {
if (a) return g(), () => _();
}, [
a,
g,
_
]), /* @__PURE__ */ w(A.ItemSlot, {
scope: i,
id: f,
focusable: a,
active: o,
children: /* @__PURE__ */ w(r.span, {
tabIndex: m ? 0 : -1,
"data-orientation": p.orientation,
...l,
ref: t,
onMouseDown: n(e.onMouseDown, (e) => {
a ? p.onItemFocus(f) : e.preventDefault();
}),
onFocus: n(e.onFocus, () => p.onItemFocus(f)),
onKeyDown: n(e.onKeyDown, (e) => {
if (e.key === "Tab" && e.shiftKey) {
p.onItemShiftTab();
return;
}
if (e.target !== e.currentTarget) return;
let t = ae(e, p.orientation, p.dir);
if (t !== void 0) {
if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
e.preventDefault();
let n = h().filter((e) => e.focusable).map((e) => e.ref.current);
if (t === "last") n.reverse();
else if (t === "prev" || t === "next") {
t === "prev" && n.reverse();
let r = n.indexOf(e.currentTarget);
n = p.loop ? se(n, r + 1) : n.slice(r + 1);
}
setTimeout(() => oe(n));
}
}),
children: typeof c == "function" ? c({
isCurrentTabStop: m,
hasTabStop: v != null
}) : c
})
});
});
re.displayName = ne;
var ie = {
ArrowLeft: "prev",
ArrowUp: "prev",
ArrowRight: "next",
ArrowDown: "next",
PageUp: "first",
Home: "first",
PageDown: "last",
End: "last"
};
function R(e, t) {
return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
}
function ae(e, t, n) {
let r = R(e.key, n);
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return ie[r];
}
function oe(e, t = !1) {
let n = document.activeElement;
for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
}
function se(e, t) {
return e.map((n, r) => e[(t + r) % e.length]);
}
var ce = I, le = re, z = ["Enter", " "], ue = [
"ArrowDown",
"PageUp",
"Home"
], de = [
"ArrowUp",
"PageDown",
"End"
], fe = [...ue, ...de], pe = {
ltr: [...z, "ArrowRight"],
rtl: [...z, "ArrowLeft"]
}, me = {
ltr: ["ArrowLeft"],
rtl: ["ArrowRight"]
}, B = "Menu", [V, he, ge] = T(B), [H, _e] = i(B, [
ge,
p,
P
]), U = p(), ve = P(), [ye, W] = H(B), [be, G] = H(B), xe = (e) => {
let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = U(t), [c, u] = S.useState(null), d = S.useRef(!1), f = l(a), p = D(i);
return S.useEffect(() => {
let e = () => {
d.current = !0, document.addEventListener("pointerdown", t, {
capture: !0,
once: !0
}), document.addEventListener("pointermove", t, {
capture: !0,
once: !0
});
}, t = () => d.current = !1;
return document.addEventListener("keydown", e, { capture: !0 }), () => {
document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
};
}, []), /* @__PURE__ */ w(m, {
...s,
children: /* @__PURE__ */ w(ye, {
scope: t,
open: n,
onOpenChange: f,
content: c,
onContentChange: u,
children: /* @__PURE__ */ w(be, {
scope: t,
onClose: S.useCallback(() => f(!1), [f]),
isUsingKeyboardRef: d,
dir: p,
modal: o,
children: r
})
})
});
};
xe.displayName = B;
var Se = "MenuAnchor", Ce = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...r } = e;
return /* @__PURE__ */ w(_, {
...U(n),
...r,
ref: t
});
});
Ce.displayName = Se;
var we = "MenuPortal", [Te, Ee] = H(we, { forceMount: void 0 }), De = (e) => {
let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, o = W(we, t);
return /* @__PURE__ */ w(Te, {
scope: t,
forceMount: n,
children: /* @__PURE__ */ w(a, {
present: n || o.open,
children: /* @__PURE__ */ w(f, {
asChild: !0,
container: i,
children: r
})
})
});
};
De.displayName = we;
var K = "MenuContent", [Oe, ke] = H(K), Ae = S.forwardRef((e, t) => {
let n = Ee(K, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, o = W(K, e.__scopeMenu), s = G(K, e.__scopeMenu);
return /* @__PURE__ */ w(V.Provider, {
scope: e.__scopeMenu,
children: /* @__PURE__ */ w(a, {
present: r || o.open,
children: /* @__PURE__ */ w(V.Slot, {
scope: e.__scopeMenu,
children: s.modal ? /* @__PURE__ */ w(je, {
...i,
ref: t
}) : /* @__PURE__ */ w(Me, {
...i,
ref: t
})
})
})
});
}), je = S.forwardRef((e, r) => {
let i = W(K, e.__scopeMenu), a = S.useRef(null), o = t(r, a);
return S.useEffect(() => {
let e = a.current;
if (e) return y(e);
}, []), /* @__PURE__ */ w(Pe, {
...e,
ref: o,
trapFocus: i.open,
disableOutsidePointerEvents: i.open,
disableOutsideScroll: !0,
onFocusOutside: n(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
onDismiss: () => i.onOpenChange(!1)
});
}), Me = S.forwardRef((e, t) => {
let n = W(K, e.__scopeMenu);
return /* @__PURE__ */ w(Pe, {
...e,
ref: t,
trapFocus: !1,
disableOutsidePointerEvents: !1,
disableOutsideScroll: !1,
onDismiss: () => n.onOpenChange(!1)
});
}), Ne = o("MenuContent.ScrollLock"), Pe = S.forwardRef((e, r) => {
let { __scopeMenu: i, loop: a = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: f, onPointerDownOutside: p, onFocusOutside: m, onInteractOutside: h, onDismiss: _, disableOutsideScroll: y, ...C } = e, T = W(K, i), E = G(K, i), D = U(i), O = ve(i), ee = he(i), [k, A] = S.useState(null), j = S.useRef(null), M = t(r, j, T.onContentChange), N = S.useRef(0), P = S.useRef(""), te = S.useRef(0), F = S.useRef(null), I = S.useRef("right"), L = S.useRef(0), ne = y ? x : S.Fragment, re = y ? {
as: Ne,
allowPinchZoom: !0
} : void 0, ie = (e) => {
let t = P.current + e, n = ee().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = mt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
(function e(t) {
P.current = t, window.clearTimeout(N.current), t !== "" && (N.current = window.setTimeout(() => e(""), 1e3));
})(t), o && setTimeout(() => o.focus());
};
S.useEffect(() => () => window.clearTimeout(N.current), []), v();
let R = S.useCallback((e) => I.current === F.current?.side && gt(e, F.current?.area), []);
return /* @__PURE__ */ w(Oe, {
scope: i,
searchRef: P,
onItemEnter: S.useCallback((e) => {
R(e) && e.preventDefault();
}, [R]),
onItemLeave: S.useCallback((e) => {
R(e) || (j.current?.focus(), A(null));
}, [R]),
onTriggerLeave: S.useCallback((e) => {
R(e) && e.preventDefault();
}, [R]),
pointerGraceTimerRef: te,
onPointerGraceIntentChange: S.useCallback((e) => {
F.current = e;
}, []),
children: /* @__PURE__ */ w(ne, {
...re,
children: /* @__PURE__ */ w(b, {
asChild: !0,
trapped: o,
onMountAutoFocus: n(s, (e) => {
e.preventDefault(), j.current?.focus({ preventScroll: !0 });
}),
onUnmountAutoFocus: c,
children: /* @__PURE__ */ w(d, {
asChild: !0,
disableOutsidePointerEvents: l,
onEscapeKeyDown: f,
onPointerDownOutside: p,
onFocusOutside: m,
onInteractOutside: h,
onDismiss: _,
children: /* @__PURE__ */ w(ce, {
asChild: !0,
...O,
dir: E.dir,
orientation: "vertical",
loop: a,
currentTabStopId: k,
onCurrentTabStopIdChange: A,
onEntryFocus: n(u, (e) => {
E.isUsingKeyboardRef.current || e.preventDefault();
}),
preventScrollOnEntryFocus: !0,
children: /* @__PURE__ */ w(g, {
role: "menu",
"aria-orientation": "vertical",
"data-state": ut(T.open),
"data-radix-menu-content": "",
dir: E.dir,
...D,
...C,
ref: M,
style: {
outline: "none",
...C.style
},
onKeyDown: n(C.onKeyDown, (e) => {
let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
t && (e.key === "Tab" && e.preventDefault(), !n && r && ie(e.key));
let i = j.current;
if (e.target !== i || !fe.includes(e.key)) return;
e.preventDefault();
let a = ee().filter((e) => !e.disabled).map((e) => e.ref.current);
de.includes(e.key) && a.reverse(), ft(a);
}),
onBlur: n(e.onBlur, (e) => {
e.currentTarget.contains(e.target) || (window.clearTimeout(N.current), P.current = "");
}),
onPointerMove: n(e.onPointerMove, Z((e) => {
let t = e.target, n = L.current !== e.clientX;
e.currentTarget.contains(t) && n && (I.current = e.clientX > L.current ? "right" : "left", L.current = e.clientX);
}))
})
})
})
})
})
});
});
Ae.displayName = K;
var Fe = "MenuGroup", Ie = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...i } = e;
return /* @__PURE__ */ w(r.div, {
role: "group",
...i,
ref: t
});
});
Ie.displayName = Fe;
var Le = "MenuLabel", Re = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...i } = e;
return /* @__PURE__ */ w(r.div, {
...i,
ref: t
});
});
Re.displayName = Le;
var q = "MenuItem", ze = "menu.itemSelect", J = S.forwardRef((r, i) => {
let { disabled: a = !1, onSelect: o, ...s } = r, c = S.useRef(null), l = G(q, r.__scopeMenu), u = ke(q, r.__scopeMenu), d = t(i, c), f = S.useRef(!1), p = () => {
let t = c.current;
if (!a && t) {
let n = new CustomEvent(ze, {
bubbles: !0,
cancelable: !0
});
t.addEventListener(ze, (e) => o?.(e), { once: !0 }), e(t, n), n.defaultPrevented ? f.current = !1 : l.onClose();
}
};
return /* @__PURE__ */ w(Be, {
...s,
ref: d,
disabled: a,
onClick: n(r.onClick, p),
onPointerDown: (e) => {
r.onPointerDown?.(e), f.current = !0;
},
onPointerUp: n(r.onPointerUp, (e) => {
f.current || e.currentTarget?.click();
}),
onKeyDown: n(r.onKeyDown, (e) => {
let t = u.searchRef.current !== "";
a || t && e.key === " " || z.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
})
});
});
J.displayName = q;
var Be = S.forwardRef((e, i) => {
let { __scopeMenu: a, disabled: o = !1, textValue: s, ...c } = e, l = ke(q, a), u = ve(a), d = S.useRef(null), f = t(i, d), [p, m] = S.useState(!1), [h, g] = S.useState("");
return S.useEffect(() => {
let e = d.current;
e && g((e.textContent ?? "").trim());
}, [c.children]), /* @__PURE__ */ w(V.ItemSlot, {
scope: a,
disabled: o,
textValue: s ?? h,
children: /* @__PURE__ */ w(le, {
asChild: !0,
...u,
focusable: !o,
children: /* @__PURE__ */ w(r.div, {
role: "menuitem",
"data-highlighted": p ? "" : void 0,
"aria-disabled": o || void 0,
"data-disabled": o ? "" : void 0,
...c,
ref: f,
onPointerMove: n(e.onPointerMove, Z((e) => {
o ? l.onItemLeave(e) : (l.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
})),
onPointerLeave: n(e.onPointerLeave, Z((e) => l.onItemLeave(e))),
onFocus: n(e.onFocus, () => m(!0)),
onBlur: n(e.onBlur, () => m(!1))
})
})
});
}), Ve = "MenuCheckboxItem", He = S.forwardRef((e, t) => {
let { checked: r = !1, onCheckedChange: i, ...a } = e;
return /* @__PURE__ */ w(Xe, {
scope: e.__scopeMenu,
checked: r,
children: /* @__PURE__ */ w(J, {
role: "menuitemcheckbox",
"aria-checked": X(r) ? "mixed" : r,
...a,
ref: t,
"data-state": dt(r),
onSelect: n(a.onSelect, () => i?.(X(r) ? !0 : !r), { checkForDefaultPrevented: !1 })
})
});
});
He.displayName = Ve;
var Ue = "MenuRadioGroup", [We, Ge] = H(Ue, {
value: void 0,
onValueChange: () => {}
}), Ke = S.forwardRef((e, t) => {
let { value: n, onValueChange: r, ...i } = e, a = l(r);
return /* @__PURE__ */ w(We, {
scope: e.__scopeMenu,
value: n,
onValueChange: a,
children: /* @__PURE__ */ w(Ie, {
...i,
ref: t
})
});
});
Ke.displayName = Ue;
var qe = "MenuRadioItem", Je = S.forwardRef((e, t) => {
let { value: r, ...i } = e, a = Ge(qe, e.__scopeMenu), o = r === a.value;
return /* @__PURE__ */ w(Xe, {
scope: e.__scopeMenu,
checked: o,
children: /* @__PURE__ */ w(J, {
role: "menuitemradio",
"aria-checked": o,
...i,
ref: t,
"data-state": dt(o),
onSelect: n(i.onSelect, () => a.onValueChange?.(r), { checkForDefaultPrevented: !1 })
})
});
});
Je.displayName = qe;
var Ye = "MenuItemIndicator", [Xe, Ze] = H(Ye, { checked: !1 }), Qe = S.forwardRef((e, t) => {
let { __scopeMenu: n, forceMount: i, ...o } = e, s = Ze(Ye, n);
return /* @__PURE__ */ w(a, {
present: i || X(s.checked) || s.checked === !0,
children: /* @__PURE__ */ w(r.span, {
...o,
ref: t,
"data-state": dt(s.checked)
})
});
});
Qe.displayName = Ye;
var $e = "MenuSeparator", et = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...i } = e;
return /* @__PURE__ */ w(r.div, {
role: "separator",
"aria-orientation": "horizontal",
...i,
ref: t
});
});
et.displayName = $e;
var tt = "MenuArrow", nt = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...r } = e;
return /* @__PURE__ */ w(h, {
...U(n),
...r,
ref: t
});
});
nt.displayName = tt;
var rt = "MenuSub", [it, at] = H(rt), ot = (e) => {
let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = W(rt, t), o = U(t), [s, c] = S.useState(null), [d, f] = S.useState(null), p = l(i);
return S.useEffect(() => (a.open === !1 && p(!1), () => p(!1)), [a.open, p]), /* @__PURE__ */ w(m, {
...o,
children: /* @__PURE__ */ w(ye, {
scope: t,
open: r,
onOpenChange: p,
content: d,
onContentChange: f,
children: /* @__PURE__ */ w(it, {
scope: t,
contentId: u(),
triggerId: u(),
trigger: s,
onTriggerChange: c,
children: n
})
})
});
};
ot.displayName = rt;
var Y = "MenuSubTrigger", st = S.forwardRef((e, t) => {
let r = W(Y, e.__scopeMenu), i = G(Y, e.__scopeMenu), a = at(Y, e.__scopeMenu), o = ke(Y, e.__scopeMenu), s = S.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = o, d = { __scopeMenu: e.__scopeMenu }, f = S.useCallback(() => {
s.current && window.clearTimeout(s.current), s.current = null;
}, []);
return S.useEffect(() => f, [f]), S.useEffect(() => {
let e = l.current;
return () => {
window.clearTimeout(e), u(null);
};
}, [l, u]), /* @__PURE__ */ w(Ce, {
asChild: !0,
...d,
children: /* @__PURE__ */ w(Be, {
id: a.triggerId,
"aria-haspopup": "menu",
"aria-expanded": r.open,
"aria-controls": a.contentId,
"data-state": ut(r.open),
...e,
ref: c(t, a.onTriggerChange),
onClick: (t) => {
e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), r.open || r.onOpenChange(!0));
},
onPointerMove: n(e.onPointerMove, Z((t) => {
o.onItemEnter(t), !t.defaultPrevented && !e.disabled && !r.open && !s.current && (o.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
r.onOpenChange(!0), f();
}, 100));
})),
onPointerLeave: n(e.onPointerLeave, Z((e) => {
f();
let t = r.content?.getBoundingClientRect();
if (t) {
let n = r.content?.dataset.side, i = n === "right", a = i ? -5 : 5, s = t[i ? "left" : "right"], c = t[i ? "right" : "left"];
o.onPointerGraceIntentChange({
area: [
{
x: e.clientX + a,
y: e.clientY
},
{
x: s,
y: t.top
},
{
x: c,
y: t.top
},
{
x: c,
y: t.bottom
},
{
x: s,
y: t.bottom
}
],
side: n
}), window.clearTimeout(l.current), l.current = window.setTimeout(() => o.onPointerGraceIntentChange(null), 300);
} else {
if (o.onTriggerLeave(e), e.defaultPrevented) return;
o.onPointerGraceIntentChange(null);
}
})),
onKeyDown: n(e.onKeyDown, (t) => {
let n = o.searchRef.current !== "";
e.disabled || n && t.key === " " || pe[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
})
})
});
});
st.displayName = Y;
var ct = "MenuSubContent", lt = S.forwardRef((e, r) => {
let i = Ee(K, e.__scopeMenu), { forceMount: o = i.forceMount, ...s } = e, c = W(K, e.__scopeMenu), l = G(K, e.__scopeMenu), u = at(ct, e.__scopeMenu), d = S.useRef(null), f = t(r, d);
return /* @__PURE__ */ w(V.Provider, {
scope: e.__scopeMenu,
children: /* @__PURE__ */ w(a, {
present: o || c.open,
children: /* @__PURE__ */ w(V.Slot, {
scope: e.__scopeMenu,
children: /* @__PURE__ */ w(Pe, {
id: u.contentId,
"aria-labelledby": u.triggerId,
...s,
ref: f,
align: "start",
side: l.dir === "rtl" ? "left" : "right",
disableOutsidePointerEvents: !1,
disableOutsideScroll: !1,
trapFocus: !1,
onOpenAutoFocus: (e) => {
l.isUsingKeyboardRef.current && d.current?.focus(), e.preventDefault();
},
onCloseAutoFocus: (e) => e.preventDefault(),
onFocusOutside: n(e.onFocusOutside, (e) => {
e.target !== u.trigger && c.onOpenChange(!1);
}),
onEscapeKeyDown: n(e.onEscapeKeyDown, (e) => {
l.onClose(), e.preventDefault();
}),
onKeyDown: n(e.onKeyDown, (e) => {
let t = e.currentTarget.contains(e.target), n = me[l.dir].includes(e.key);
t && n && (c.onOpenChange(!1), u.trigger?.focus(), e.preventDefault());
})
})
})
})
});
});
lt.displayName = ct;
function ut(e) {
return e ? "open" : "closed";
}
function X(e) {
return e === "indeterminate";
}
function dt(e) {
return X(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
function ft(e) {
let t = document.activeElement;
for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
}
function pt(e, t) {
return e.map((n, r) => e[(t + r) % e.length]);
}
function mt(e, t, n) {
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = pt(e, Math.max(i, 0));
r.length === 1 && (a = a.filter((e) => e !== n));
let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
return o === n ? void 0 : o;
}
function ht(e, t) {
let { x: n, y: r } = e, i = !1;
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
}
return i;
}
function gt(e, t) {
return t ? ht({
x: e.clientX,
y: e.clientY
}, t) : !1;
}
function Z(e) {
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
}
var _t = xe, vt = Ce, yt = De, bt = Ae, xt = Ie, St = Re, Ct = J, wt = He, Tt = Ke, Et = Je, Dt = Qe, Ot = et, kt = nt, At = st, jt = lt, Q = "DropdownMenu", [Mt, Nt] = i(Q, [_e]), $ = _e(), [Pt, Ft] = Mt(Q), It = (e) => {
let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: c = !0 } = e, l = $(t), d = S.useRef(null), [f, p] = s({
prop: i,
defaultProp: a ?? !1,
onChange: o,
caller: Q
});
return /* @__PURE__ */ w(Pt, {
scope: t,
triggerId: u(),
triggerRef: d,
contentId: u(),
open: f,
onOpenChange: p,
onOpenToggle: S.useCallback(() => p((e) => !e), [p]),
modal: c,
children: /* @__PURE__ */ w(_t, {
...l,
open: f,
onOpenChange: p,
dir: r,
modal: c,
children: n
})
});
};
It.displayName = Q;
var Lt = "DropdownMenuTrigger", Rt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: i, disabled: a = !1, ...o } = e, s = Ft(Lt, i);
return /* @__PURE__ */ w(vt, {
asChild: !0,
...$(i),
children: /* @__PURE__ */ w(r.button, {
type: "button",
id: s.triggerId,
"aria-haspopup": "menu",
"aria-expanded": s.open,
"aria-controls": s.open ? s.contentId : void 0,
"data-state": s.open ? "open" : "closed",
"data-disabled": a ? "" : void 0,
disabled: a,
...o,
ref: c(t, s.triggerRef),
onPointerDown: n(e.onPointerDown, (e) => {
!a && e.button === 0 && e.ctrlKey === !1 && (s.onOpenToggle(), s.open || e.preventDefault());
}),
onKeyDown: n(e.onKeyDown, (e) => {
a || (["Enter", " "].includes(e.key) && s.onOpenToggle(), e.key === "ArrowDown" && s.onOpenChange(!0), [
"Enter",
" ",
"ArrowDown"
].includes(e.key) && e.preventDefault());
})
})
});
});
Rt.displayName = Lt;
var zt = "DropdownMenuPortal", Bt = (e) => {
let { __scopeDropdownMenu: t, ...n } = e;
return /* @__PURE__ */ w(yt, {
...$(t),
...n
});
};
Bt.displayName = zt;
var Vt = "DropdownMenuContent", Ht = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: r, ...i } = e, a = Ft(Vt, r), o = $(r), s = S.useRef(!1);
return /* @__PURE__ */ w(bt, {
id: a.contentId,
"aria-labelledby": a.triggerId,
...o,
...i,
ref: t,
onCloseAutoFocus: n(e.onCloseAutoFocus, (e) => {
s.current || a.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
}),
onInteractOutside: n(e.onInteractOutside, (e) => {
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
(!a.modal || r) && (s.current = !0);
}),
style: {
...e.style,
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
}
});
});
Ht.displayName = Vt;
var Ut = "DropdownMenuGroup", Wt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(xt, {
...$(n),
...r,
ref: t
});
});
Wt.displayName = Ut;
var Gt = "DropdownMenuLabel", Kt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(St, {
...$(n),
...r,
ref: t
});
});
Kt.displayName = Gt;
var qt = "DropdownMenuItem", Jt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Ct, {
...$(n),
...r,
ref: t
});
});
Jt.displayName = qt;
var Yt = "DropdownMenuCheckboxItem", Xt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(wt, {
...$(n),
...r,
ref: t
});
});
Xt.displayName = Yt;
var Zt = "DropdownMenuRadioGroup", Qt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Tt, {
...$(n),
...r,
ref: t
});
});
Qt.displayName = Zt;
var $t = "DropdownMenuRadioItem", en = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Et, {
...$(n),
...r,
ref: t
});
});
en.displayName = $t;
var tn = "DropdownMenuItemIndicator", nn = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Dt, {
...$(n),
...r,
ref: t
});
});
nn.displayName = tn;
var rn = "DropdownMenuSeparator", an = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Ot, {
...$(n),
...r,
ref: t
});
});
an.displayName = rn;
var on = "DropdownMenuArrow", sn = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(kt, {
...$(n),
...r,
ref: t
});
});
sn.displayName = on;
var cn = "DropdownMenuSubTrigger", ln = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(At, {
...$(n),
...r,
ref: t
});
});
ln.displayName = cn;
var un = "DropdownMenuSubContent", dn = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(jt, {
...$(n),
...r,
ref: t,
style: {
...e.style,
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
}
});
});
dn.displayName = un;
var fn = It, pn = Rt, mn = Bt, hn = Ht, gn = Wt, _n = Jt, vn = an;
//#endregion
export { fn as a, mn as i, gn as n, vn as o, _n as r, pn as s, hn as t };
import { useDocumentContext as e } from "./contexts/RPDocumentContext.js";
import { useLayoutContainer as t } from "./contexts/LayoutContainerContext.js";
import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
import { useOtherToolContext as r } from "./contexts/OtherToolContext.js";
import { dateFormatter as i } from "./utils/dateFormatter.js";
import { c as a, d as o, f as s, i as c, l, n as u, o as d, t as f } from "./dist-CgoP608h.js";
import { n as p, r as m, t as h } from "./dist-BfuBBQ14.js";
import { i as g, n as ee, r as _, t as v } from "./Combination-11kyhTGt.js";
import { CloseIcon as te } from "./components/icons/CloseIcon.js";
import { t as y } from "./PropertyItem-evJWWmWZ.js";
import * as b from "react";
import { useMemo as x } from "react";
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
import './assets/DocumentDialog.css';//#region node_modules/@radix-ui/react-dialog/dist/index.mjs
var T = "Dialog", [E, ne] = l(T), [D, O] = E(T), k = (e) => {
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = b.useRef(null), c = b.useRef(null), [l, u] = f({
prop: r,
defaultProp: i ?? !1,
onChange: a,
caller: T
});
return /* @__PURE__ */ C(D, {
scope: t,
triggerRef: s,
contentRef: c,
contentId: p(),
titleId: p(),
descriptionId: p(),
open: l,
onOpenChange: u,
onOpenToggle: b.useCallback(() => u((e) => !e), [u]),
modal: o,
children: n
});
};
k.displayName = T;
var A = "DialogTrigger", j = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(A, n), a = o(t, i.triggerRef);
return /* @__PURE__ */ C(c.button, {
type: "button",
"aria-haspopup": "dialog",
"aria-expanded": i.open,
"aria-controls": i.contentId,
"data-state": Y(i.open),
...r,
ref: a,
onClick: s(e.onClick, i.onOpenToggle)
});
});
j.displayName = A;
var M = "DialogPortal", [N, P] = E(M, { forceMount: void 0 }), F = (e) => {
let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = O(M, t);
return /* @__PURE__ */ C(N, {
scope: t,
forceMount: n,
children: b.Children.map(r, (e) => /* @__PURE__ */ C(u, {
present: n || a.open,
children: /* @__PURE__ */ C(h, {
asChild: !0,
container: i,
children: e
})
}))
});
};
F.displayName = M;
var I = "DialogOverlay", L = b.forwardRef((e, t) => {
let n = P(I, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = O(I, e.__scopeDialog);
return a.modal ? /* @__PURE__ */ C(u, {
present: r || a.open,
children: /* @__PURE__ */ C(ie, {
...i,
ref: t
})
}) : null;
});
L.displayName = I;
var re = d("DialogOverlay.RemoveScroll"), ie = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(I, n);
return /* @__PURE__ */ C(v, {
as: re,
allowPinchZoom: !0,
shards: [i.contentRef],
children: /* @__PURE__ */ C(c.div, {
"data-state": Y(i.open),
...r,
ref: t,
style: {
pointerEvents: "auto",
...r.style
}
})
});
}), R = "DialogContent", z = b.forwardRef((e, t) => {
let n = P(R, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = O(R, e.__scopeDialog);
return /* @__PURE__ */ C(u, {
present: r || a.open,
children: a.modal ? /* @__PURE__ */ C(B, {
...i,
ref: t
}) : /* @__PURE__ */ C(V, {
...i,
ref: t
})
});
});
z.displayName = R;
var B = b.forwardRef((e, t) => {
let n = O(R, e.__scopeDialog), r = b.useRef(null), i = o(t, n.contentRef, r);
return b.useEffect(() => {
let e = r.current;
if (e) return ee(e);
}, []), /* @__PURE__ */ C(H, {
...e,
ref: i,
trapFocus: n.open,
disableOutsidePointerEvents: !0,
onCloseAutoFocus: s(e.onCloseAutoFocus, (e) => {
e.preventDefault(), n.triggerRef.current?.focus();
}),
onPointerDownOutside: s(e.onPointerDownOutside, (e) => {
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
(t.button === 2 || n) && e.preventDefault();
}),
onFocusOutside: s(e.onFocusOutside, (e) => e.preventDefault())
});
}), V = b.forwardRef((e, t) => {
let n = O(R, e.__scopeDialog), r = b.useRef(!1), i = b.useRef(!1);
return /* @__PURE__ */ C(H, {
...e,
ref: t,
trapFocus: !1,
disableOutsidePointerEvents: !1,
onCloseAutoFocus: (t) => {
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
},
onInteractOutside: (t) => {
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
let a = t.target;
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
}
});
}), H = b.forwardRef((e, t) => {
let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...s } = e, c = O(R, n), l = b.useRef(null), u = o(t, l);
return g(), /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(_, {
asChild: !0,
loop: !0,
trapped: r,
onMountAutoFocus: i,
onUnmountAutoFocus: a,
children: /* @__PURE__ */ C(m, {
role: "dialog",
id: c.contentId,
"aria-describedby": c.descriptionId,
"aria-labelledby": c.titleId,
"data-state": Y(c.open),
...s,
ref: u,
onDismiss: () => c.onOpenChange(!1)
})
}), /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(oe, { titleId: c.titleId }), /* @__PURE__ */ C(Q, {
contentRef: l,
descriptionId: c.descriptionId
})] })] });
}), U = "DialogTitle", W = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(U, n);
return /* @__PURE__ */ C(c.h2, {
id: i.titleId,
...r,
ref: t
});
});
W.displayName = U;
var G = "DialogDescription", K = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(G, n);
return /* @__PURE__ */ C(c.p, {
id: i.descriptionId,
...r,
ref: t
});
});
K.displayName = G;
var q = "DialogClose", J = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(q, n);
return /* @__PURE__ */ C(c.button, {
type: "button",
...r,
ref: t,
onClick: s(e.onClick, () => i.onOpenChange(!1))
});
});
J.displayName = q;
function Y(e) {
return e ? "open" : "closed";
}
var X = "DialogTitleWarning", [ae, Z] = a(X, {
contentName: R,
titleName: U,
docsSlug: "dialog"
}), oe = ({ titleId: e }) => {
let t = Z(X), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
return b.useEffect(() => {
e && (document.getElementById(e) || console.error(n));
}, [n, e]), null;
}, se = "DialogDescriptionWarning", Q = ({ contentRef: e, descriptionId: t }) => {
let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Z(se).contentName}}.`;
return b.useEffect(() => {
let r = e.current?.getAttribute("aria-describedby");
t && r && (document.getElementById(t) || console.warn(n));
}, [
n,
e,
t
]), null;
}, ce = k, le = F, ue = L, de = z, fe = W, pe = J, $ = {
"rp-dialog-wrapper": "_rp-dialog-wrapper_39boz_1",
"rp-dialog-overlay": "_rp-dialog-overlay_39boz_7",
"rp-document-dialog": "_rp-document-dialog_39boz_13",
"rp-dialog-title": "_rp-dialog-title_39boz_35",
"rp-dialog-close": "_rp-dialog-close_39boz_44",
"rp-properties-divider": "_rp-properties-divider_39boz_52"
}, me = () => {
let { pdfProperties: a } = e(), { container: o } = t(), { activeDocumentProperties: s, setActiveDocumentProperties: c } = r(), { localeMessages: l } = n(), u = x(() => {
if (!a) return [];
let { fileSize: e, filename: t, title: n, author: r, subject: o, createdOn: s, creator: c, keywords: u, modifiedOn: d, pdfProducer: f, pdfVersion: p, pageCount: m } = a;
return [
{
label: l?.propertiesFilenameLabel,
value: t
},
{
label: l?.propertiesFileSizeLabel,
value: e
},
{ separate: !0 },
{
label: l?.propertiesTitleLabel,
value: n
},
{
label: l?.propertiesAuthorLabel,
value: r
},
{
label: l?.propertiesSubjectLabel,
value: o
},
{
label: l?.propertiesKeywordLabel,
value: u
},
{
label: l?.propertiesCreatorLabel,
value: c
},
{
label: l?.propertiesCreateOnLabel,
value: s ? i(s) : ""
},
{
label: l?.propertiesModifiedOnLabel,
value: d ? i(d) : ""
},
{ separate: !0 },
{
label: l?.propertiesPDFProducerLabel,
value: f
},
{
label: l?.propertiesPDFVersionLabel,
value: p
},
{
label: l?.propertiesPageCountLabel,
value: m
}
];
}, [a, l]);
return /* @__PURE__ */ C(ce, {
open: s,
onOpenChange: c,
children: /* @__PURE__ */ C(le, {
container: o,
children: /* @__PURE__ */ w("div", {
className: $["rp-dialog-wrapper"],
children: [/* @__PURE__ */ C(ue, { className: $["rp-dialog-overlay"] }), /* @__PURE__ */ w(de, {
className: $["rp-document-dialog"],
"aria-describedby": void 0,
children: [
/* @__PURE__ */ C(fe, {
className: $["rp-dialog-title"],
children: l?.documentPropertiesLabel ?? "Document properties"
}),
/* @__PURE__ */ C("div", {
className: $["rp-document-properties"],
role: "region",
"aria-label": l?.documentPropertiesLabel ?? "Document properties",
children: u.map((e, t) => /* @__PURE__ */ C("div", { children: e.separate ? /* @__PURE__ */ C("div", {
className: $["rp-properties-divider"],
role: "separator",
"aria-orientation": "horizontal"
}) : /* @__PURE__ */ C(y, {
label: e.label,
value: e.value
}) }, t))
}),
/* @__PURE__ */ C(pe, {
asChild: !0,
className: $["rp-dialog-close"],
"aria-label": l?.searchCloseButtonTooltip || "Close dialog",
children: /* @__PURE__ */ C(te, { "aria-hidden": "true" })
})
]
})]
})
})
});
};
//#endregion
export { me as t };
import { t as e } from "./clsx-DSGuh5YW.js";
import { a as t, i as n, s as r, t as i } from "./dist-VbpVNBs6.js";
import { jsx as a, jsxs as o } from "react/jsx-runtime";
import './assets/DropDown.css';var s = {
"rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
slideDownAndFade: "_slideDownAndFade_1vzkq_1",
slideLeftAndFade: "_slideLeftAndFade_1vzkq_1",
slideUpAndFade: "_slideUpAndFade_1vzkq_1",
slideRightAndFade: "_slideRightAndFade_1vzkq_1",
"rp-dropdown-arrow": "_rp-dropdown-arrow_1vzkq_30"
}, c = (c) => {
let { triggerComponent: l, children: u, container: d, className: f, open: p, onOpenChange: m, ...h } = c;
return /* @__PURE__ */ o(t, {
modal: !1,
open: p,
onOpenChange: m,
children: [/* @__PURE__ */ a(r, {
asChild: !0,
children: l
}), /* @__PURE__ */ a(n, {
container: d,
children: /* @__PURE__ */ a(i, {
sideOffset: 8,
align: "end",
...h,
className: e(s["rp-dropdown-content"], f),
children: u
})
})]
});
};
//#endregion
export { c as t };
import { t as e } from "./clsx-DSGuh5YW.js";
import { withRef as t } from "./utils/withRef.js";
import { useId as n } from "react";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import './assets/Input.css';//#region lib/components/ui/Input.module.css
var a = {
"rp-input": "_rp-input_dun7b_1",
"rp-input-wrapper": "_rp-input-wrapper_dun7b_28",
"rp-input-label": "_rp-input-label_dun7b_32",
"rp-input-icon": "_rp-input-icon_dun7b_44"
}, o = t((t, o) => {
let { className: s, icon: c, children: l, id: u, label: d, ...f } = t, p = n(), m = u || p, h = f.role || (f.type === "text" || !f.type ? "textbox" : void 0);
return /* @__PURE__ */ i("div", {
className: a["rp-input-wrapper"],
children: [
d ? /* @__PURE__ */ r("label", {
htmlFor: m,
className: a["rp-input-label"],
children: d
}) : null,
/* @__PURE__ */ r("input", {
...f,
id: m,
role: h,
"data-icon": !!c,
ref: o,
className: e(s, a["rp-input"], "ignore-hover")
}),
c && /* @__PURE__ */ r("span", {
className: a["rp-input-icon"],
"aria-hidden": "true",
children: c
}),
l
]
});
});
//#endregion
export { o as t };
import { t as e } from "./clsx-DSGuh5YW.js";
import { jsx as t } from "react/jsx-runtime";
import './assets/LoaderIcon.css';//#region lib/assets/loader.png
var n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABPbSURBVHgB5Vx7jB3ldT/nm7mPfXqxsQFj4msCMYRCTCBVDCFeUlEVhQa7ld0SpcI0KSFUwIJCq6ZqvUZV2iR/sDZJWuiDpU1UCUsYUEOgIuxaFKgiCyelMTbYeNfYMeDX2l7v4975vi/n8c3c67UXP9Y29t6zujvvmTu/+zuP75wzg/ARyjVP7pnisfEG7+Ei7+yViDALvLsIPDgH/kIAz2LB0R7eD9AhW2luAJzdBojvWqj83Cbxmxu/Ov0AfESCcBpl3uO+DZrLCyLAGzy6W2jVRQIOoUZAOQYMHFiPNO9oFdISrfHO8Tb68LLnZToGrALMZ/Dv0uzPE+9fgl371m78y8tOG6CnBcDPPOUXeEw6CJHPI/hWBsAHMOSjyFkBkbhGizoPvOSEgb4GQBb64gI6f4yexMqxgi4+42zSu+HOi9bAKZZTBuC81b4tNu4+9L6DbquNVI5JRTfOCND9old2eVkXGMfs0vXCtMAyASWsFyC9q4Kpv4aA6BU8WY98agfb6PPPWCi8vv6OGe/BKZCTDmA7ATdCwNEd3kc30kY3h4iomooEpyUNRQVOQPLpPIHC652ocmAds8r6wEYnW3mbbILAWF4VzoE+sBIcKjsVfITtBOlzG+/62ONwkuWkAvjZZ/ztdJ+dBECJcPN6n8w5L9fhpWDrAvtcBgSGm6WVVtRTwXKqkmADINmneg4+VrAKao/EPqu2Ueyp88bJpZmt22naveEbc16AkyQnBcDPrvYljOzj9DXbvZ6WbwjZmLHqCpAeUhA9ZEC4jFnMHrpDq8BkAMt2r3YwqC1bQAKNLYJzquLMVLWrys6MjcxE2omugKL9aiNp/5dHy/jDLR0Xvw8TFAMTlPmryx3G2HWEVjurqKAUfhZU+qFMURnIgGaCJqwkoSNlR4bc1/ywgoUeL+aQ90TIfhGTXi6sEzMJPvwMTuAyukFZKUoA1+dy/h8v7XrrJpignDAD2dbZyC2j79WhqqnrAwPlv6uu1hllJVRtGNPGb6H5NbThl2Te+qHst45GZuD/b2t8t/Z6V/1o96wIoLXi4ULSyrl09rmep95foA4nqHCq4hICOVFkupoNF3VMaHEzyPvTQQ5Wb77nksfgBOWEAGz/qS8liVtNX2Me2zpdS1/J1xAqnN4razIJ/OilDasLhdwzr34R+2ECcvW/7pw5CuVr6UZuoXNfrZobVJq9uao1m1bmtthWUWeylR6CCwO/2Y1Ef7f5wUs+gOOU4waQwXMV10NwlQ5lXZhXPVWdAfSBcayFe4kRKxsh7updhANwCuTy/9h5AYwMf40ufDVdd4YR/83IaYijsWMIheRLCXWFqbSOwpz4rzfde+nO47nmcQHI4BHne+i6JV4eA5DaKLZg6TLINx6gvVYUTyFwY2Xudza0RK0NN5NZ/UPCZ4YwMQTvqLEmW1y1kBoJ+OD53/cm/pvjAfGYAWTwgMEDmO1TV4tis7GqtuJ4Uabyz60ouLjzdAE3Vj75gy3n+whuJ7xuYtiMRlEh2A7+RONGvhX12mA/8EPlZZu+9eljAvGYAGTw6PfqoUvOlhUBKQVL1RYztZXlPvqad/zvolwvnAHCQFq03yUezoAw2lG1BgnYMXUw3qW38D6MjD50LCAeUxiD1q2mK8xGHUughBshNuE/I6GJBs2srnkXXX2mgMey/s/nvBf5kbuJgk859crirY0Mk1LwJC6S3592mOaK8QMXPLq28WjnPioDv/Bf9mHaqyNzGDokq/GumdrSj2nvf+VL+S44g+Wyrje/bE30R6y5VbVlPEGcTVAjXs3++vktD175ow8734cCSKp7u3HucQhGDTIHAVANZXXWJ/ZPX16U74azQD7+yIYvRNbd4yUo5ESGhDuQjqOzqJWZaeHHW/7iyv8e71zjAsh2L3LudZo9J5wc0vCkNkyRk6D9dO8X87+As0jmfu+Xc2wcf1c8c7CBTA8nY1AZ7mkY62BwtJL/2+3funz3kc4zrg2MvWfVbUsRVsMH6UBLhmz68XecbeCxbHzwU1vAm++H9EYKHk+dU5akSYuGXDzy1fHOc0QAb/pJspROtzAN5qpg6UhW/Ydc8qHeW+In4CyVTQ9cvgaM7UZIwVMHzbGijDOdZsPJ2Xxi9vden3+kcxyZgYjLmHEBLZ9+UiCBvYZzK3t/P9cJZ7lsvu9Tz9Pt/FTHyaLOVmyiF/MYbCFa4/GWCzqfPcwrHwbg7/7EEngSsrD4jHE+S7Qwrv0uiTthksjB5tGnjHc7fchKiIcWVdacpOYn7NR8ceaNY489BMDf44DZ4NJUdU3IMCmIVUYWwLR/VKOLUyE7vn7tEFX4/oVDGSkv8EiFcIwMhnmUOJHAap91/6sNtceOYaBtpxOUUs1Vx6ue1qDORx6eeG6CGZQzUfq+ee0Gbysv6hBPSGc5Y6sEtKEm44twLrbXHjcGQLJ9MlGvi5wg1YSoDBbJmPZjubwcJqmMjuCzRJpBqUWjjA58Og/BKxsffb72mAzAm19IFhJQJZ7P7F+t21W1XvH8ooY+mKSyo/PaIaru/Qx9Wn32UirVeox1Air6wqy/f/WS9JgMQCrF3JpF1epx2RykhGQw+0ZHTTdMcinnyy8R0wbZG6PmDEWPDQ+aSZUlzKng59L9BcCFPb6NMFoqNQ2lbkgYmKoXBuidTI5jPNn2wHXDNCru0U4I9cKaKxSLSPkI5CLNxaXOLUXeXwBMyuQ8UBKiaZIlzSvXlIAmr+0bK0lTskaLhjIudprBQctJWE1CYN6Z7R/nfQVA2nirOAwTxrY1H3K/5L597/M3T17bN1aYhcSzt4WFMsxzWqCWAinbRkt/WOJ9jf4j18zsCx63xndwfo+Kj+4JqDNxmLzhpY/CsSOx6hA0JkRWZe8v5/0M2z9CrqTeAjPPi9XaLkRge6HeJIJfaQUvdEhYqQRo+4TawbZSZ0/RQJLM4/0l7tORW0gup6kq6Hu6jtQ3la1/dcNewMoeF8bFTltJLMfXRkra3o5CoUT5UrNAD/FVuxe6AJiFpN5nXarqZInxZrNmrSWkyTrJ0r6HyNgphozgHHYgBjFrkUBt0eCuKqZs3QKYuGSHtOJpa53Vnh3KQ1m1h5WyOy8mmGdDWpcSHcYwimGhvY2pWwDJ1e5FYwkso71NEpFonoD7oHIxtMa0doqSLihxmrYKlTZKHvRDnUri3EDORM6lfUvWh/IJw+ggsQQgUa3EO6c1oprhnPyjGGYv1Kk0Wz8yHHELHdtD0kbORqmDkGpUxIwk9knRyISab+Z9g1N56ncmX+rqWOWd79y0LwqZackVSobByshE8zSuJQ6ZFqiyLwVRszlQ55IQcJpxSVvP9NGBVOIsbDlEau1gfUsUWlrF6oWZtLGTF+NsT0mehq4gXQF1Tz+QNIwF8cI+6xo1FPxxaoZLHpyp7w8pfPXDMpxTQ8k28Q9+5mdDncrUZc+1aszHLGT+6ce5RMbEFe+HTAiaQ5tQLZAgTUOR1c6EepTCYJLHKATODm3tUwKI8gDAPlblPtVZn9k8zOCkdcaWoE7FYaEFbCIZaSoN64MTISNDKy1p8gg5EdcPmdVT0dxqGItAVLcqbGKYymkD4DRgxA6FG7nSWAUJSbufQkH8RajAZdW4GlvoicHzoE4FK8lURgkjtYOstNZwNosLJZZm/f6YEOyTnvXQ8ydT7d7VeNDhAqhToaxpW/aESTratSCFEY6UK7louylEUW8a7qUZGUyDau2lnPPlOvTE0+9+spkKwk0EG+UA+QPpU1ScFeSWfzsjv3+36b4RBySUCUM4n1XlUFs7BHa3COpMMN84gxTW8sgtPPAtKSx2v9r+4Q6s71xS1pqIMas15S/9H9UBSOgZJmbeCnUnycXqcQkzKxVNGQbzPNtCWtzBewmABPSaav1XW3kxy1BLinDBUqkd14ec980XmkhXpyMHgPqEjqUoRgNpfZCet0iSRQBUO0iqLIzTfph0aJcCm/Dzv3UiiR26gkHjWE9YaAQXaXejBKkUlc5/tyxPegqAbAdpsoZ3M9qDnz4hWVMndh11wcI71+bIYUyLWE2NdnMgx9KYCIhiB8vlzetXLSnz7tXeGLRdoSshLGcdWiE5iFNcHbBwSmHTxyjUK1pPgBFw2iNIILrISl9CIjmZben+h+Sr/qTH7eXH9AHx8I0goO4lxb44MHbyyf1PNkxLzPWUOW2KyLWCdhQhj0EorUXVEU8Di2ho58qFz6WHHNIfSL66i46r7YWutnnoAOUcOmIZTFJpS+JPkNlriL2yjhmInMmXDnSyh4RNxdpf1R5zCIBUoltBkO+ThVDeVK8ceqWNOBiyhZV2mGxC7KNK20x1GtzWxvZOumGsZrM4gLaDDZXcIc/PHQKgqqZfkfUHhgxN1vYhU9pmoscnlUNp74xbRuy1MWX4GCxJwMgj2uhilFcncUjtKpHr2/HYl4ZqDz2sS58Uv4t415/FhWmRHTIi8vrZcTR5VLl17qVzyPUWSUcJPCtqS4GfBcqkWKdsJGdy8MCKJRvHHnsYgDq0c8uzDgVfJZ5Ow1CZVPlrPbYDznJpW/qfJRPBLGYZxW42jnLqdcnegUt8HKk9JF3ccKTjx60aLe11PYTUgtBviWMPSBMO/FjEY5/DJ+AslPPu+vcZoz66jMweKV6en0/i53UNe4OIppT/M5bmKX75YN8P/vj1I51j/OeFPd5B8AwoEbH6bFzaApfu53z3n73iz76c4Z3PNg5ZvETGtfJqHlJdI2kreT2A9GGRSlN8XGnJmzfHO824AJIq99GpHkofcc3Aq2n7Des4273uG//Dby06O6TltkfPbXW7r2KQYsOF80S9bEVHGvy0JsY8Erb8gp83tz28ZHi8c33oE+v/diOSQ3Er026F6uNe2XDFaxucvKmo+65X/BnvWJpJbbE5P4dZxyAlBFJiIvK4iYQv3PpHxKNl6T/o3/X92379YefDo12Qw5XYcNc6zKvtWpVpzdGpmpOsKFRgedeZNlrp7DSNWy86n2zceTmMDYUnpuIo4xmJp6TliIq9EujS1NIeuYO7Hr1t7dFOe9R3JrBXjh0uolFNHy/Xqq/G2LXrJO99Xznn193Vo69GOSPkzkcbC+/MvASNOxdt5CvEtmG2dZxnhgRyxMCkbIWNrM4uZ4ba8lPeOJZTH5WBqTAgVJnqAX6SU9JdoZEVNAkbcojSaaPDPqkvd9uKWf5PNyr4p12IdU0bL5yORTtN2ZUzOeOEecxACCyMI869OxNHBTSQVNryA29seuTe0WO5xDEDyHLXa75EPx+rc+kQdc68cvrCNgzPmAiSfTS7IqpA92lTawIO3poxpVAonJO3lkaoOaOqmQiIZONomZQ0qCvPV+iw5hxUpuT2rT9W8FiOC0AWZqKP4SUCaE51lOKrQ73gsbmbMxSl0n6cLTS/hqbLu+afIkYy67/ySEuDbZ7icwdjb/LCsjxQYdISywwBRnVIShZEDBiDyvaQQaQvWDm36eCG4wGP5bgBZGEQMQfy8rHscdg02M5ixsBAKVJJLAnZez4Qe+l/t4eRNV3zJ/gEALNtLRShobXYGOWKPiqSLx2lGLiChYZWM1IZIYAizOerICobDeYKsUxpADe6p3lwMxwneHIrMAG5+2XbRWBokhUlhEe1iSlgaVICfI1KZ1UroxtJxWEdTf8PY1jnytBP/nDgHw5nqdZrYImBa84xcOX8iAqzeRjamoO42TTFzjT4KDqYjxHKzhSKJhqxCRaIhSM2QlbbvICXExaSKRJVLiblXbuHp70Hq5ZYOAGZEIAsd7/ilxITH6YTtWG1u7Ua4aQjl1Ai0PmaYBxDCMS4Gn2XSrqNAf72b/Pi4ohBK7XMjPqaiewN0w3krYGDe0xL67nRgWFnmos5StuNRJBw1zK5VVZX/i/gsTKz7eNlE5ZjX8lVPjjw2Nd3wQRkwm+w/OH12J2P8GqafSYNtMMLotJ6ir7FEtP5at1UAcdMs0OjbNgWXuhDs4sXL6Y110DcMNVfwBv3DfmpPG2bAgeGy5R6H3SDg4MwNJr3Q+W8h8hKGpQHsRjlaJmsHgXHZVpXjmj0EZvBPbnK2xMFjyWGkyDBKSy89zUaznnopI96aXUkmL3/E2scdpA01QNjX/1ZVX9YFVZs4n+793loacI9hSYPB3b6VsjD/mIem5O8Hxyt+Ebumzc535B3OMQWrZL4YoP3IxXvG+JCxVRye/Z0f2U/nCSZMANrZeV8fGLldTiHZpeD2jZMew19yif974PvFkmTtz7dFlZne69a79tbdtDM2wBzr/JwHq3fpeTZT+NXSIwbjAvEtApFJInHcuKHy5aWiX3G+tHRvC063D1Q6t+658cnD7zw3U+NdLwmDzAuoDE6uUksQRrv+DRRCzWJWkgTjembHDNv/u3P0GBrySoD77xoYMZvGWhODBStmT7SSLXqA9HenDetlQLuJycCI2T3yBY2kjPx7EwseeKcHRwo7dtP3trBKZBTBmCtdLzq+X0MCwmT26thTk2iMW0Kg+BU0oK+OBEwixevMqve2WtgeAfOuqI12ja8H6GBtCc/lRwJORMCEZIR2jsXNdNxUUNTZd+0ZOhEwpLjlZNiA48mXdfh0zR5umOd74iGoZ1und/P0O7lhY4hvKnphkiPC6/Xo8+TlIMiFb4YMG7a72GYVhab/NRdu2FPcwPtdo6FZptAWyEZXHlPOcsenQY5LQwcTwjQtuIIzCPdaqfFEgUYsynEoCAP+TWjbZiFMZ2mnWDvnc42+5MAV9Dev37Rw1szPfQss6cTsLHyG7LNE1I07Q7WAAAAAElFTkSuQmCC", r = {
"rp-loader-icon": "_rp-loader-icon_7y2fm_1",
spin: "_spin_7y2fm_1"
}, i = ({ className: i, ...a }) => /* @__PURE__ */ t("img", {
...a,
className: e(r["rp-loader-icon"], i),
alt: "loader",
src: n
});
//#endregion
export { i as t };
import { useLocalizationContext as e } from "./contexts/LocalizationContext.js";
import { usePrintContext as t } from "./contexts/PrintContext.js";
import { t as n } from "./clsx-DSGuh5YW.js";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import './assets/LoadingIndicator.css';var a = {
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
"rp-loading-title": "_rp-loading-title_wazy2_27",
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
loading: "_loading_wazy2_1"
}, o = ({ percentage: o }) => {
let { cancel: s } = t(), { localeMessages: c } = e();
return o < 1 ? null : /* @__PURE__ */ r("div", {
className: n(a["rp-loading-overlay"]),
children: /* @__PURE__ */ i("div", {
className: n(a["rp-loading-modal"]),
children: [
/* @__PURE__ */ i("div", {
className: n(a["rp-loading-title"]),
children: [c?.printLoadingMessage, "..."]
}),
/* @__PURE__ */ r("div", {
className: n(a["rp-loading-progress-bar"]),
children: /* @__PURE__ */ r("div", {
className: n(a["rp-loading-progress"]),
style: { width: `${o}%` }
})
}),
/* @__PURE__ */ r("button", {
className: n(a["rp-loading-cancel-button"]),
onClick: s,
onKeyDown: (e) => {
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), s());
},
autoFocus: !0,
children: c?.printCancelLabel
})
]
})
});
};
//#endregion
export { o as t };
import { useViewModeContext as e } from "./contexts/ViewModeContext.js";
import { r as t } from "./PaginationContext-Cwf8sCpK.js";
import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
import { t as r } from "./Button-DBu3SaMk.js";
import { t as i } from "./RPTooltip-CXBVXusS.js";
import { DualPageWithCoverIcon as a } from "./components/icons/DualPageWithCoverIcon.js";
import { GoToDownIcon as o } from "./components/icons/GoToDownIcon.js";
import { t as s } from "./MostPageTool.module-BRVv-sGz.js";
import { useCallback as c } from "react";
import { jsx as l } from "react/jsx-runtime";
//#region lib/components/layout/toolbar/tools/DualPageWithCoverTool.tsx
var u = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ l(i, {
className: t,
content: n?.dualPageWithCoverTooltip,
children: e
}), d = ({ icon: t }) => {
let { setDualPageWithCover: i } = e(), { localeMessages: o } = n();
return /* @__PURE__ */ l(u, {
localeMessages: o,
children: /* @__PURE__ */ l(r, {
onClick: i,
"aria-label": o?.dualPageWithCoverTooltip,
children: t || /* @__PURE__ */ l(a, {})
})
});
}, f = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ l(i, {
className: t,
content: n?.firstPageTooltip,
children: e
}), p = ({ icon: e }) => {
let { goToPage: i } = t(), { localeMessages: a } = n();
return /* @__PURE__ */ l(f, {
localeMessages: a,
children: /* @__PURE__ */ l(r, {
onClick: c(() => {
i(1);
}, [i]),
"aria-label": a?.firstPageTooltip,
children: e || /* @__PURE__ */ l(o, { className: s["rp-go-to-Top"] })
})
});
}, m = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ l(i, {
className: t,
content: n?.lastPageTooltip,
children: e
}), h = ({ icon: e }) => {
let { goToPage: i, totalPages: a } = t(), { localeMessages: s } = n();
return /* @__PURE__ */ l(m, {
localeMessages: s,
children: /* @__PURE__ */ l(r, {
onClick: c(() => {
i(a);
}, [i, a]),
"aria-label": s?.lastPageTooltip,
children: e || /* @__PURE__ */ l(o, {})
})
});
};
//#endregion
export { p as n, d as r, h as t };
import { t as e } from "./clsx-DSGuh5YW.js";
import { r as t } from "./dist-VbpVNBs6.js";
import { jsx as n } from "react/jsx-runtime";
import './assets/MenuItem.css';//#region lib/components/layout/toolbar/MenuItem.module.css
var r = { "rp-menu-item": "_rp-menu-item_cu12j_1" }, i = (i) => {
let { children: a, className: o, ...s } = i;
return /* @__PURE__ */ n(t, {
...s,
tabIndex: 0,
className: e(r["rp-menu-item"], o),
children: a
});
};
//#endregion
export { i as t };
import { o as e } from "./dist-VbpVNBs6.js";
import { jsx as t } from "react/jsx-runtime";
import './assets/MenuSeparator.css';//#region lib/components/layout/toolbar/MenuSeparator.module.css
var n = { "rp-menu-separator": "_rp-menu-separator_17dlz_1" }, r = () => /* @__PURE__ */ t(e, { className: n["rp-menu-separator"] });
//#endregion
export { r as t };
import { useDocumentPasswordContext as e } from "./contexts/DocumentPasswordContext.js";
import { useLocalizationContext as t } from "./contexts/LocalizationContext.js";
import { t as n } from "./clsx-DSGuh5YW.js";
import { useState as r } from "react";
import { jsx as i, jsxs as a } from "react/jsx-runtime";
import './assets/PasswordModal.css';//#region lib/components/ui/PasswordModal.module.css
var o = {
"rp-password-overlay": "_rp-password-overlay_9cdbk_1",
"rp-password-modal": "_rp-password-modal_9cdbk_13",
"rp-password-title": "_rp-password-title_9cdbk_27",
"rp-password-content": "_rp-password-content_9cdbk_35",
"rp-password-form": "_rp-password-form_9cdbk_41",
"rp-password-label": "_rp-password-label_9cdbk_45",
"rp-password-input": "_rp-password-input_9cdbk_57",
"rp-password-input-invalid": "_rp-password-input-invalid_9cdbk_74",
"rp-password-message-invalid": "_rp-password-message-invalid_9cdbk_78",
"rp-password-submit-button": "_rp-password-submit-button_9cdbk_84"
}, s = () => {
let [s, c] = r(""), { localeMessages: l } = t(), { setPassword: u, setPasswordError: d, invalidPassword: f } = e(), p = (e) => {
c(e.target.value), f && d(void 0);
}, m = (e) => {
e.preventDefault(), s && s.trim() && u(s);
}, h = !s.trim();
return /* @__PURE__ */ i("div", {
className: n(o["rp-password-overlay"]),
role: "dialog",
"aria-modal": "true",
"aria-labelledby": "password-modal-title",
children: /* @__PURE__ */ a("div", {
className: n(o["rp-password-modal"]),
children: [
/* @__PURE__ */ i("div", {
id: "password-modal-title",
className: n(o["rp-password-title"]),
children: l?.passwordModalTitle
}),
/* @__PURE__ */ i("div", {
id: "password-modal-message",
className: n(o["rp-password-content"]),
children: l?.passwordModalMessage
}),
/* @__PURE__ */ a("form", {
onSubmit: m,
children: [/* @__PURE__ */ a("div", {
className: n(o["rp-password-form"]),
children: [
/* @__PURE__ */ i("label", {
htmlFor: "rp-password-input",
className: o["rp-password-label"],
children: l?.passwordPlaceholder || "Password"
}),
/* @__PURE__ */ i("input", {
type: "password",
id: "rp-password-input",
name: "rp-password-input",
value: s,
onChange: p,
className: n(o["rp-password-input"], f && o["rp-password-input-invalid"]),
placeholder: l?.passwordPlaceholder,
autoComplete: "current-password",
"aria-label": l?.passwordPlaceholder,
"aria-required": "true",
"aria-invalid": f,
"aria-describedby": f ? "password-modal-message password-error" : "password-modal-message"
}),
/* @__PURE__ */ i("div", {
id: "password-error",
className: n(o["rp-password-message-invalid"]),
role: "alert",
"aria-live": "polite",
children: f && /* @__PURE__ */ i("span", { children: l?.passwordError })
})
]
}), /* @__PURE__ */ i("button", {
type: "submit",
disabled: h,
className: n(o["rp-password-submit-button"]),
onClick: m,
"aria-label": l?.passwordConfirmLabel,
children: l?.passwordConfirmLabel
})]
})
]
})
});
};
//#endregion
export { s as t };
import { useDarkModeContext as e } from "./contexts/DarkModeContext.js";
import { useLocalizationContext as t } from "./contexts/LocalizationContext.js";
import { useDropFileZoneContext as n } from "./contexts/DropFileZoneContext.js";
import { t as r } from "./clsx-DSGuh5YW.js";
import { t as i } from "./LightPdfIcon-DL8MYtWQ.js";
import { t as a } from "./DarkPdfIcon-B5ehd9CV.js";
import { useDropFileZone as o } from "./utils/hooks/useDropFileZone.js";
import { useCallback as s } from "react";
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
import './assets/RPDropFileZone.css';//#region lib/components/RPDropFileZone.module.css
var d = {
"rp-drop-zone": "_rp-drop-zone_1sc50_1",
"rp-drop-zone-transparent": "_rp-drop-zone-transparent_1sc50_15"
}, f = {}, p = () => {
let { dragging: p, handleDragLeave: m, handleDrop: h } = n(), { darkMode: g } = e(), { localeMessages: _ } = t(), { DropFileZoneLayout: v, DropFileZoneTool: y, DropFileZoneToolbar: b } = o(), x = [
v,
y,
b
].includes(!1), S = s((e) => {
e.preventDefault();
}, []);
if (!p || x) return null;
let C = (e) => e ? typeof e == "function" ? /* @__PURE__ */ l(e, {}) : typeof e == "boolean" ? null : /* @__PURE__ */ l(c, { children: e }) : null, w = /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", { children: l(g ? a : i, {}) }), /* @__PURE__ */ l("p", { children: _?.dragDropFileMessage })] });
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
className: r(d["rp-drop-zone"], g ? f["rp-dark-mode"] : ""),
children: /* @__PURE__ */ l(() => C(v) ?? C(y) ?? C(b) ?? w, {})
}), /* @__PURE__ */ l("div", {
className: d["rp-drop-zone-transparent"],
onDragOver: S,
onDragLeave: m,
onDrop: h
})] });
};
//#endregion
export { p as t };
import { ErrorType as e, ScrollMode as t, SelectionMode as n, ViewMode as r } from "./utils/types.js";
import { useDocumentPasswordContext as i } from "./contexts/DocumentPasswordContext.js";
import { useDocumentContext as a } from "./contexts/RPDocumentContext.js";
import { useInitialStateContext as o } from "./contexts/InitialStateContext.js";
import { useScrollModeContext as s } from "./contexts/ScrollModeContext.js";
import { useViewModeContext as c } from "./contexts/ViewModeContext.js";
import { useVirtualScrollContext as l } from "./contexts/VirtualScrollContext.js";
import { useLayoutContainer as u } from "./contexts/LayoutContainerContext.js";
import { useEventCallbackContext as d } from "./contexts/EventCallbackContext.js";
import { useDebounce as f } from "./utils/hooks/useDebounce.js";
import { getPageFromPosition as p } from "./utils/calculatePage.js";
import { a as m, r as h } from "./PaginationContext-Cwf8sCpK.js";
import { useSelectionModeContext as g } from "./contexts/SelectionModeContext.js";
import { useFullScreenContext as _ } from "./contexts/FullScreenContext.js";
import { t as v } from "./clsx-DSGuh5YW.js";
import { useLoaderContext as ee } from "./contexts/LoaderContext.js";
import { t as y } from "./RPPage-C_r8aeTc.js";
import { useVirtualReactWindow as te } from "./utils/hooks/useVirtualReactWindow.js";
import { DualPage as ne } from "./components/page/DualPage.js";
import { DualPageWithCover as re } from "./components/page/DualPageWithCover.js";
import { SinglePage as ie } from "./components/page/SinglePage.js";
import { useMousePressed as ae } from "./utils/hooks/useMousePressed.js";
import { useGrabScroll as oe } from "./utils/hooks/useGrabScroll.js";
import { usePinch as se } from "./utils/hooks/usePinch.js";
import { t as b } from "./PasswordModal-BtHVvrMg.js";
import { usePresentPage as x } from "./utils/hooks/usePresentPage.js";
import { LayoutContainer as ce } from "./components/layout/LayoutContainer.js";
import { LayoutWrapper as le } from "./components/layout/LayoutWrapper.js";
import { useCopyText as ue } from "./utils/hooks/useCopyText.js";
import { useTextSelection as de } from "./utils/hooks/useTextSelection.js";
import { approximateFraction as fe } from "./utils/approximateFragtion.js";
import { Component as pe, PureComponent as S, createElement as C, memo as me, useCallback as w, useEffect as T, useMemo as he, useRef as E, useState as ge } from "react";
import { OutputScale as _e } from "pdfjs-dist";
import { Fragment as ve, jsx as D, jsxs as ye } from "react/jsx-runtime";
import './assets/RPPages.css';//#region lib/components/RPPages.module.css
var O = {
"rp-pages": "_rp-pages_fn8tz_1",
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_fn8tz_6",
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_fn8tz_11",
"rp-not-supported-list": "_rp-not-supported-list_fn8tz_15",
"rp-pages-container": "_rp-pages-container_fn8tz_23",
"rp-viewer": "_rp-viewer_fn8tz_65",
"rp-cursor-grab": "_rp-cursor-grab_fn8tz_70",
"rp-cursor-grabbing": "_rp-cursor-grabbing_fn8tz_78",
"rp-loader": "_rp-loader_fn8tz_86",
"rp-not-supported": "_rp-not-supported_fn8tz_15",
"rp-not-supported-content": "_rp-not-supported-content_fn8tz_102",
"rp-load-error": "_rp-load-error_fn8tz_108",
"rp-load-error-message": "_rp-load-error-message_fn8tz_116"
};
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/extends.js
function k() {
return k = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
}, k.apply(null, arguments);
}
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function A(e) {
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function be(e, t) {
return be = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
return e.__proto__ = t, e;
}, be(e, t);
}
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
function xe(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, be(e, t);
}
//#endregion
//#region node_modules/memoize-one/dist/memoize-one.esm.js
var Se = Number.isNaN || function(e) {
return typeof e == "number" && e !== e;
};
function Ce(e, t) {
return !!(e === t || Se(e) && Se(t));
}
function j(e, t) {
if (e.length !== t.length) return !1;
for (var n = 0; n < e.length; n++) if (!Ce(e[n], t[n])) return !1;
return !0;
}
function M(e, t) {
t === void 0 && (t = j);
var n, r = [], i, a = !1;
function o() {
var o = [...arguments];
return a && n === this && t(o, r) ? i : (i = e.apply(this, o), a = !0, n = this, r = o, i);
}
return o;
}
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function N(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
if (t.indexOf(r) !== -1) continue;
n[r] = e[r];
}
return n;
}
//#endregion
//#region node_modules/react-window/dist/index.esm.js
var P = typeof performance == "object" && typeof performance.now == "function" ? function() {
return performance.now();
} : function() {
return Date.now();
};
function we(e) {
cancelAnimationFrame(e.id);
}
function Te(e, t) {
var n = P();
function r() {
P() - n >= t ? e.call(null) : i.id = requestAnimationFrame(r);
}
var i = { id: requestAnimationFrame(r) };
return i;
}
var F = -1;
function Ee(e) {
if (e === void 0 && (e = !1), F === -1 || e) {
var t = document.createElement("div"), n = t.style;
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), F = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
}
return F;
}
var I = null;
function De(e) {
if (e === void 0 && (e = !1), I === null || e) {
var t = document.createElement("div"), n = t.style;
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
var r = document.createElement("div"), i = r.style;
return i.width = "100px", i.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? I = "positive-descending" : (t.scrollLeft = 1, I = t.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(t), I;
}
return I;
}
var Oe = 150, L = function(e) {
var t = e.columnIndex;
return e.data, e.rowIndex + ":" + t;
}, R = null, z = null, B = null;
process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet !== void 0 && (R = /* @__PURE__ */ new WeakSet(), z = /* @__PURE__ */ new WeakSet(), B = /* @__PURE__ */ new WeakSet());
function ke(e) {
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, i = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, o = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, l = e.getOffsetForRowAndAlignment, u = e.getRowHeight, d = e.getRowOffset, f = e.getRowStartIndexForOffset, p = e.getRowStopIndexForStartIndex, m = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
return t = /* @__PURE__ */ function(e) {
xe(t, e);
function t(t) {
var r = e.call(this, t) || this;
return r._instanceProps = m(r.props, A(r)), r._resetIsScrollingTimeoutId = null, r._outerRef = void 0, r.state = {
instance: A(r),
isScrolling: !1,
horizontalScrollDirection: "forward",
scrollLeft: typeof r.props.initialScrollLeft == "number" ? r.props.initialScrollLeft : 0,
scrollTop: typeof r.props.initialScrollTop == "number" ? r.props.initialScrollTop : 0,
scrollUpdateWasRequested: !1,
verticalScrollDirection: "forward"
}, r._callOnItemsRendered = void 0, r._callOnItemsRendered = M(function(e, t, n, i, a, o, s, c) {
return r.props.onItemsRendered({
overscanColumnStartIndex: e,
overscanColumnStopIndex: t,
overscanRowStartIndex: n,
overscanRowStopIndex: i,
visibleColumnStartIndex: a,
visibleColumnStopIndex: o,
visibleRowStartIndex: s,
visibleRowStopIndex: c
});
}), r._callOnScroll = void 0, r._callOnScroll = M(function(e, t, n, i, a) {
return r.props.onScroll({
horizontalScrollDirection: n,
scrollLeft: e,
scrollTop: t,
verticalScrollDirection: i,
scrollUpdateWasRequested: a
});
}), r._getItemStyle = void 0, r._getItemStyle = function(e, t) {
var i = r.props, o = i.columnWidth, s = i.direction, c = i.rowHeight, l = r._getItemStyleCache(h && o, h && s, h && c), f = e + ":" + t, p;
if (l.hasOwnProperty(f)) p = l[f];
else {
var m = n(r.props, t, r._instanceProps), g = s === "rtl";
l[f] = p = {
position: "absolute",
left: g ? void 0 : m,
right: g ? m : void 0,
top: d(r.props, e, r._instanceProps),
height: u(r.props, e, r._instanceProps),
width: a(r.props, t, r._instanceProps)
};
}
return p;
}, r._getItemStyleCache = void 0, r._getItemStyleCache = M(function(e, t, n) {
return {};
}), r._onScroll = function(e) {
var t = e.currentTarget, n = t.clientHeight, i = t.clientWidth, a = t.scrollLeft, o = t.scrollTop, s = t.scrollHeight, c = t.scrollWidth;
r.setState(function(e) {
if (e.scrollLeft === a && e.scrollTop === o) return null;
var t = r.props.direction, l = a;
if (t === "rtl") switch (De()) {
case "negative":
l = -a;
break;
case "positive-descending":
l = c - i - a;
break;
}
l = Math.max(0, Math.min(l, c - i));
var u = Math.max(0, Math.min(o, s - n));
return {
isScrolling: !0,
horizontalScrollDirection: e.scrollLeft < a ? "forward" : "backward",
scrollLeft: l,
scrollTop: u,
verticalScrollDirection: e.scrollTop < o ? "forward" : "backward",
scrollUpdateWasRequested: !1
};
}, r._resetIsScrollingDebounced);
}, r._outerRefSetter = function(e) {
var t = r.props.outerRef;
r._outerRef = e, typeof t == "function" ? t(e) : typeof t == "object" && t && t.hasOwnProperty("current") && (t.current = e);
}, r._resetIsScrollingDebounced = function() {
r._resetIsScrollingTimeoutId !== null && we(r._resetIsScrollingTimeoutId), r._resetIsScrollingTimeoutId = Te(r._resetIsScrolling, Oe);
}, r._resetIsScrolling = function() {
r._resetIsScrollingTimeoutId = null, r.setState({ isScrolling: !1 }, function() {
r._getItemStyleCache(-1);
});
}, r;
}
t.getDerivedStateFromProps = function(e, t) {
return V(e, t), g(e), null;
};
var _ = t.prototype;
return _.scrollTo = function(e) {
var t = e.scrollLeft, n = e.scrollTop;
t !== void 0 && (t = Math.max(0, t)), n !== void 0 && (n = Math.max(0, n)), this.setState(function(e) {
return t === void 0 && (t = e.scrollLeft), n === void 0 && (n = e.scrollTop), e.scrollLeft === t && e.scrollTop === n ? null : {
horizontalScrollDirection: e.scrollLeft < t ? "forward" : "backward",
scrollLeft: t,
scrollTop: n,
scrollUpdateWasRequested: !0,
verticalScrollDirection: e.scrollTop < n ? "forward" : "backward"
};
}, this._resetIsScrollingDebounced);
}, _.scrollToItem = function(e) {
var t = e.align, n = t === void 0 ? "auto" : t, r = e.columnIndex, i = e.rowIndex, a = this.props, u = a.columnCount, d = a.height, f = a.rowCount, p = a.width, m = this.state, h = m.scrollLeft, g = m.scrollTop, _ = Ee();
r !== void 0 && (r = Math.max(0, Math.min(r, u - 1))), i !== void 0 && (i = Math.max(0, Math.min(i, f - 1)));
var v = o(this.props, this._instanceProps), ee = s(this.props, this._instanceProps) > p ? _ : 0, y = v > d ? _ : 0;
this.scrollTo({
scrollLeft: r === void 0 ? h : c(this.props, r, n, h, this._instanceProps, y),
scrollTop: i === void 0 ? g : l(this.props, i, n, g, this._instanceProps, ee)
});
}, _.componentDidMount = function() {
var e = this.props, t = e.initialScrollLeft, n = e.initialScrollTop;
if (this._outerRef != null) {
var r = this._outerRef;
typeof t == "number" && (r.scrollLeft = t), typeof n == "number" && (r.scrollTop = n);
}
this._callPropsCallbacks();
}, _.componentDidUpdate = function() {
var e = this.props.direction, t = this.state, n = t.scrollLeft, r = t.scrollTop;
if (t.scrollUpdateWasRequested && this._outerRef != null) {
var i = this._outerRef;
if (e === "rtl") switch (De()) {
case "negative":
i.scrollLeft = -n;
break;
case "positive-ascending":
i.scrollLeft = n;
break;
default:
var a = i.clientWidth;
i.scrollLeft = i.scrollWidth - a - n;
break;
}
else i.scrollLeft = Math.max(0, n);
i.scrollTop = Math.max(0, r);
}
this._callPropsCallbacks();
}, _.componentWillUnmount = function() {
this._resetIsScrollingTimeoutId !== null && we(this._resetIsScrollingTimeoutId);
}, _.render = function() {
var e = this.props, t = e.children, n = e.className, r = e.columnCount, i = e.direction, a = e.height, c = e.innerRef, l = e.innerElementType, u = e.innerTagName, d = e.itemData, f = e.itemKey, p = f === void 0 ? L : f, m = e.outerElementType, h = e.outerTagName, g = e.rowCount, _ = e.style, v = e.useIsScrolling, ee = e.width, y = this.state.isScrolling, te = this._getHorizontalRangeToRender(), ne = te[0], re = te[1], ie = this._getVerticalRangeToRender(), ae = ie[0], oe = ie[1], se = [];
if (r > 0 && g) for (var b = ae; b <= oe; b++) for (var x = ne; x <= re; x++) se.push(C(t, {
columnIndex: x,
data: d,
isScrolling: v ? y : void 0,
key: p({
columnIndex: x,
data: d,
rowIndex: b
}),
rowIndex: b,
style: this._getItemStyle(b, x)
}));
var ce = o(this.props, this._instanceProps), le = s(this.props, this._instanceProps);
return C(m || h || "div", {
className: n,
onScroll: this._onScroll,
ref: this._outerRefSetter,
style: k({
position: "relative",
height: a,
width: ee,
overflow: "auto",
WebkitOverflowScrolling: "touch",
willChange: "transform",
direction: i
}, _)
}, C(l || u || "div", {
children: se,
ref: c,
style: {
height: ce,
pointerEvents: y ? "none" : void 0,
width: le
}
}));
}, _._callPropsCallbacks = function() {
var e = this.props, t = e.columnCount, n = e.onItemsRendered, r = e.onScroll, i = e.rowCount;
if (typeof n == "function" && t > 0 && i > 0) {
var a = this._getHorizontalRangeToRender(), o = a[0], s = a[1], c = a[2], l = a[3], u = this._getVerticalRangeToRender(), d = u[0], f = u[1], p = u[2], m = u[3];
this._callOnItemsRendered(o, s, d, f, c, l, p, m);
}
if (typeof r == "function") {
var h = this.state, g = h.horizontalScrollDirection, _ = h.scrollLeft, v = h.scrollTop, ee = h.scrollUpdateWasRequested, y = h.verticalScrollDirection;
this._callOnScroll(_, v, g, y, ee);
}
}, _._getHorizontalRangeToRender = function() {
var e = this.props, t = e.columnCount, n = e.overscanColumnCount, a = e.overscanColumnsCount, o = e.overscanCount, s = e.rowCount, c = this.state, l = c.horizontalScrollDirection, u = c.isScrolling, d = c.scrollLeft, f = n || a || o || 1;
if (t === 0 || s === 0) return [
0,
0,
0,
0
];
var p = r(this.props, d, this._instanceProps), m = i(this.props, p, d, this._instanceProps), h = !u || l === "backward" ? Math.max(1, f) : 1, g = !u || l === "forward" ? Math.max(1, f) : 1;
return [
Math.max(0, p - h),
Math.max(0, Math.min(t - 1, m + g)),
p,
m
];
}, _._getVerticalRangeToRender = function() {
var e = this.props, t = e.columnCount, n = e.overscanCount, r = e.overscanRowCount, i = e.overscanRowsCount, a = e.rowCount, o = this.state, s = o.isScrolling, c = o.verticalScrollDirection, l = o.scrollTop, u = r || i || n || 1;
if (t === 0 || a === 0) return [
0,
0,
0,
0
];
var d = f(this.props, l, this._instanceProps), m = p(this.props, d, l, this._instanceProps), h = !s || c === "backward" ? Math.max(1, u) : 1, g = !s || c === "forward" ? Math.max(1, u) : 1;
return [
Math.max(0, d - h),
Math.max(0, Math.min(a - 1, m + g)),
d,
m
];
}, t;
}(S), t.defaultProps = {
direction: "ltr",
itemData: void 0,
useIsScrolling: !1
}, t;
}
var V = function(e, t) {
var n = e.children, r = e.direction, i = e.height, a = e.innerTagName, o = e.outerTagName, s = e.overscanColumnsCount, c = e.overscanCount, l = e.overscanRowsCount, u = e.width, d = t.instance;
if (process.env.NODE_ENV !== "production") {
if (typeof c == "number" && R && !R.has(d) && (R.add(d), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof l == "number") && z && !z.has(d) && (z.add(d), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || o != null) && B && !B.has(d) && (B.add(d), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), n == null) throw Error("An invalid \"children\" prop has been specified. Value should be a React component. " + ("\"" + (n === null ? "null" : typeof n) + "\" was specified."));
switch (r) {
case "ltr":
case "rtl": break;
default: throw Error("An invalid \"direction\" prop has been specified. Value should be either \"ltr\" or \"rtl\". " + ("\"" + r + "\" was specified."));
}
if (typeof u != "number") throw Error("An invalid \"width\" prop has been specified. Grids must specify a number for width. " + ("\"" + (u === null ? "null" : typeof u) + "\" was specified."));
if (typeof i != "number") throw Error("An invalid \"height\" prop has been specified. Grids must specify a number for height. " + ("\"" + (i === null ? "null" : typeof i) + "\" was specified."));
}
}, Ae = 50, je = function(e, t) {
var n = e.rowCount, r = t.rowMetadataMap, i = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, o = 0;
if (a >= n && (a = n - 1), a >= 0) {
var s = r[a];
o = s.offset + s.size;
}
var c = (n - a - 1) * i;
return o + c;
}, H = function(e, t) {
var n = e.columnCount, r = t.columnMetadataMap, i = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, o = 0;
if (a >= n && (a = n - 1), a >= 0) {
var s = r[a];
o = s.offset + s.size;
}
var c = (n - a - 1) * i;
return o + c;
}, U = function(e, t, n, r) {
var i, a, o;
if (e === "column" ? (i = r.columnMetadataMap, a = t.columnWidth, o = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, a = t.rowHeight, o = r.lastMeasuredRowIndex), n > o) {
var s = 0;
if (o >= 0) {
var c = i[o];
s = c.offset + c.size;
}
for (var l = o + 1; l <= n; l++) {
var u = a(l);
i[l] = {
offset: s,
size: u
}, s += u;
}
e === "column" ? r.lastMeasuredColumnIndex = n : r.lastMeasuredRowIndex = n;
}
return i[n];
}, Me = function(e, t, n, r) {
var i, a;
return e === "column" ? (i = n.columnMetadataMap, a = n.lastMeasuredColumnIndex) : (i = n.rowMetadataMap, a = n.lastMeasuredRowIndex), (a > 0 ? i[a].offset : 0) >= r ? Ne(e, t, n, a, 0, r) : Pe(e, t, n, Math.max(0, a), r);
}, Ne = function(e, t, n, r, i, a) {
for (; i <= r;) {
var o = i + Math.floor((r - i) / 2), s = U(e, t, o, n).offset;
if (s === a) return o;
s < a ? i = o + 1 : s > a && (r = o - 1);
}
return i > 0 ? i - 1 : 0;
}, Pe = function(e, t, n, r, i) {
for (var a = e === "column" ? t.columnCount : t.rowCount, o = 1; r < a && U(e, t, r, n).offset < i;) r += o, o *= 2;
return Ne(e, t, n, Math.min(r, a - 1), Math.floor(r / 2), i);
}, Fe = function(e, t, n, r, i, a, o) {
var s = e === "column" ? t.width : t.height, c = U(e, t, n, a), l = e === "column" ? H(t, a) : je(t, a), u = Math.max(0, Math.min(l - s, c.offset)), d = Math.max(0, c.offset - s + o + c.size);
switch (r === "smart" && (r = i >= d - s && i <= u + s ? "auto" : "center"), r) {
case "start": return u;
case "end": return d;
case "center": return Math.round(d + (u - d) / 2);
default: return i >= d && i <= u ? i : d > u || i < d ? d : u;
}
}, Ie = /* @__PURE__ */ ke({
getColumnOffset: function(e, t, n) {
return U("column", e, t, n).offset;
},
getColumnStartIndexForOffset: function(e, t, n) {
return Me("column", e, n, t);
},
getColumnStopIndexForStartIndex: function(e, t, n, r) {
for (var i = e.columnCount, a = e.width, o = U("column", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += U("column", e, l, r).size;
return l;
},
getColumnWidth: function(e, t, n) {
return n.columnMetadataMap[t].size;
},
getEstimatedTotalHeight: je,
getEstimatedTotalWidth: H,
getOffsetForColumnAndAlignment: function(e, t, n, r, i, a) {
return Fe("column", e, t, n, r, i, a);
},
getOffsetForRowAndAlignment: function(e, t, n, r, i, a) {
return Fe("row", e, t, n, r, i, a);
},
getRowOffset: function(e, t, n) {
return U("row", e, t, n).offset;
},
getRowHeight: function(e, t, n) {
return n.rowMetadataMap[t].size;
},
getRowStartIndexForOffset: function(e, t, n) {
return Me("row", e, n, t);
},
getRowStopIndexForStartIndex: function(e, t, n, r) {
for (var i = e.rowCount, a = e.height, o = U("row", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += U("row", e, l, r).size;
return l;
},
initInstanceProps: function(e, t) {
var n = e, r = n.estimatedColumnWidth, i = n.estimatedRowHeight, a = {
columnMetadataMap: {},
estimatedColumnWidth: r || Ae,
estimatedRowHeight: i || Ae,
lastMeasuredColumnIndex: -1,
lastMeasuredRowIndex: -1,
rowMetadataMap: {}
};
return t.resetAfterColumnIndex = function(e, n) {
n === void 0 && (n = !0), t.resetAfterIndices({
columnIndex: e,
shouldForceUpdate: n
});
}, t.resetAfterRowIndex = function(e, n) {
n === void 0 && (n = !0), t.resetAfterIndices({
rowIndex: e,
shouldForceUpdate: n
});
}, t.resetAfterIndices = function(e) {
var n = e.columnIndex, r = e.rowIndex, i = e.shouldForceUpdate, o = i === void 0 ? !0 : i;
typeof n == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, n - 1)), typeof r == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, r - 1)), t._getItemStyleCache(-1), o && t.forceUpdate();
}, a;
},
shouldResetStyleCacheOnItemSizeChange: !1,
validateProps: function(e) {
var t = e.columnWidth, n = e.rowHeight;
if (process.env.NODE_ENV !== "production") {
if (typeof t != "function") throw Error("An invalid \"columnWidth\" prop has been specified. Value should be a function. " + ("\"" + (t === null ? "null" : typeof t) + "\" was specified."));
if (typeof n != "function") throw Error("An invalid \"rowHeight\" prop has been specified. Value should be a function. " + ("\"" + (n === null ? "null" : typeof n) + "\" was specified."));
}
}
});
process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet;
function W(e, t) {
for (var n in e) if (!(n in t)) return !0;
for (var r in t) if (e[r] !== t[r]) return !0;
return !1;
}
var G = ["style"], K = ["style"];
function q(e, t) {
var n = e.style, r = N(e, G), i = t.style, a = N(t, K);
return !W(n, i) && !W(r, a);
}
//#endregion
//#region node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.esm.js
var J = typeof window < "u" ? window : typeof self < "u" ? self : global, Y = null, X = null, Le = 20, Z = J.clearTimeout, Re = J.setTimeout, Q = J.cancelAnimationFrame || J.mozCancelAnimationFrame || J.webkitCancelAnimationFrame, $ = J.requestAnimationFrame || J.mozRequestAnimationFrame || J.webkitRequestAnimationFrame;
Q == null || $ == null ? (Y = Z, X = function(e) {
return Re(e, Le);
}) : (Y = function([e, t]) {
Q(e), Z(t);
}, X = function(e) {
let t = $(function() {
Z(n), e();
}), n = Re(function() {
Q(t), e();
}, Le);
return [t, n];
});
function ze(e) {
let t, n, r, i, a, o, s, c = typeof document < "u" && document.attachEvent;
if (!c) {
o = function(e) {
let t = e.__resizeTriggers__, n = t.firstElementChild, r = t.lastElementChild, i = n.firstElementChild;
r.scrollLeft = r.scrollWidth, r.scrollTop = r.scrollHeight, i.style.width = n.offsetWidth + 1 + "px", i.style.height = n.offsetHeight + 1 + "px", n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight;
}, a = function(e) {
return e.offsetWidth !== e.__resizeLast__.width || e.offsetHeight !== e.__resizeLast__.height;
}, s = function(e) {
if (e.target.className && typeof e.target.className.indexOf == "function" && e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0) return;
let t = this;
o(this), this.__resizeRAF__ && Y(this.__resizeRAF__), this.__resizeRAF__ = X(function() {
a(t) && (t.__resizeLast__.width = t.offsetWidth, t.__resizeLast__.height = t.offsetHeight, t.__resizeListeners__.forEach(function(n) {
n.call(t, e);
}));
});
};
let e = !1, c = "";
r = "animationstart";
let l = "Webkit Moz O ms".split(" "), u = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), d = "";
{
let t = document.createElement("fakeelement");
if (t.style.animationName !== void 0 && (e = !0), e === !1) {
for (let n = 0; n < l.length; n++) if (t.style[l[n] + "AnimationName"] !== void 0) {
d = l[n], c = "-" + d.toLowerCase() + "-", r = u[n], e = !0;
break;
}
}
}
n = "resizeanim", t = "@" + c + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", i = c + "animation: 1ms " + n + "; ";
}
let l = function(n) {
if (!n.getElementById("detectElementResize")) {
let r = (t || "") + ".resize-triggers { " + (i || "") + "visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }", a = n.head || n.getElementsByTagName("head")[0], o = n.createElement("style");
o.id = "detectElementResize", o.type = "text/css", e != null && o.setAttribute("nonce", e), o.styleSheet ? o.styleSheet.cssText = r : o.appendChild(n.createTextNode(r)), a.appendChild(o);
}
};
return {
addResizeListener: function(e, t) {
if (c) e.attachEvent("onresize", t);
else {
if (!e.__resizeTriggers__) {
let t = e.ownerDocument, i = J.getComputedStyle(e);
i && i.position === "static" && (e.style.position = "relative"), l(t), e.__resizeLast__ = {}, e.__resizeListeners__ = [], (e.__resizeTriggers__ = t.createElement("div")).className = "resize-triggers";
let a = t.createElement("div");
a.className = "expand-trigger", a.appendChild(t.createElement("div"));
let c = t.createElement("div");
c.className = "contract-trigger", e.__resizeTriggers__.appendChild(a), e.__resizeTriggers__.appendChild(c), e.appendChild(e.__resizeTriggers__), o(e), e.addEventListener("scroll", s, !0), r && (e.__resizeTriggers__.__animationListener__ = function(t) {
t.animationName === n && o(e);
}, e.__resizeTriggers__.addEventListener(r, e.__resizeTriggers__.__animationListener__));
}
e.__resizeListeners__.push(t);
}
},
removeResizeListener: function(e, t) {
if (c) e.detachEvent("onresize", t);
else if (e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t), 1), !e.__resizeListeners__.length) {
e.removeEventListener("scroll", s, !0), e.__resizeTriggers__.__animationListener__ && (e.__resizeTriggers__.removeEventListener(r, e.__resizeTriggers__.__animationListener__), e.__resizeTriggers__.__animationListener__ = null);
try {
e.__resizeTriggers__ = !e.removeChild(e.__resizeTriggers__);
} catch {}
}
}
};
}
var Be = class extends pe {
constructor(...e) {
super(...e), this.state = {
height: this.props.defaultHeight || 0,
width: this.props.defaultWidth || 0
}, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
this._timeoutId = null;
let { disableHeight: e, disableWidth: t, onResize: n } = this.props;
if (this._parentNode) {
let r = window.getComputedStyle(this._parentNode) || {}, i = parseFloat(r.paddingLeft || "0"), a = parseFloat(r.paddingRight || "0"), o = parseFloat(r.paddingTop || "0"), s = parseFloat(r.paddingBottom || "0"), c = this._parentNode.getBoundingClientRect(), l = c.height - o - s, u = c.width - i - a;
if (!e && this.state.height !== l || !t && this.state.width !== u) {
this.setState({
height: l,
width: u
});
let e = () => {
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
};
typeof n == "function" && n({
height: l,
width: u,
get scaledHeight() {
return e(), l;
},
get scaledWidth() {
return e(), u;
}
});
}
}
}, this._setRef = (e) => {
this._autoSizer = e;
};
}
componentDidMount() {
let { nonce: e } = this.props, t = this._autoSizer ? this._autoSizer.parentNode : null;
if (t != null && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
this._parentNode = t;
let n = t.ownerDocument.defaultView.ResizeObserver;
n == null ? (this._detectElementResize = ze(e), this._detectElementResize.addResizeListener(t, this._onResize)) : (this._resizeObserver = new n(() => {
this._timeoutId = setTimeout(this._onResize, 0);
}), this._resizeObserver.observe(t)), this._onResize();
}
}
componentWillUnmount() {
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && this._resizeObserver.disconnect());
}
render() {
let { children: e, defaultHeight: t, defaultWidth: n, disableHeight: r = !1, disableWidth: i = !1, doNotBailOutOnEmptyChildren: a = !1, nonce: o, onResize: s, style: c = {}, tagName: l = "div", ...u } = this.props, { height: d, width: f } = this.state, p = { overflow: "visible" }, m = {}, h = !1;
return r || (d === 0 && (h = !0), p.height = 0, m.height = d, m.scaledHeight = d), i || (f === 0 && (h = !0), p.width = 0, m.width = f, m.scaledWidth = f), a && (h = !1), C(l, {
ref: this._setRef,
style: {
...p,
...c
},
...u
}, !h && e(m));
}
}, Ve = me(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
let i = p(t, e, n.columnCount, n.isDualPageWithCover);
if (i <= 0) return null;
if (n.isDualPageWithCover) {
let a = i === n.totalPages && n.totalPages % 2 == 0;
if (t === 0 && i === 1 || a && e === 0) {
let e = n.columnWidths.reduce((e, t) => e + t, 0);
return /* @__PURE__ */ D("div", {
style: {
...r,
width: e,
display: "flex",
justifyContent: "center",
alignItems: "flex-start"
},
children: /* @__PURE__ */ D(y, {
style: { position: "relative" },
pageNumber: i
}, i)
});
}
}
return n.columnCount === 2 ? /* @__PURE__ */ D("div", {
style: {
...r,
display: "flex",
justifyContent: e === 0 ? "flex-end" : "flex-start",
alignItems: "flex-start"
},
children: /* @__PURE__ */ D(y, {
style: { position: "relative" },
pageNumber: i
}, i)
}) : /* @__PURE__ */ D(y, {
style: r,
pageNumber: i
}, i);
}, q), He = () => {
let p = E(new _e()), { initialPage: y = 1, initialScrollMode: pe } = o(), { pagesRef: S, setPagesRef: C, setContentRef: me } = u(), { scrollToPage: k } = m();
ue(S);
let { virtualScrollRef: A, getVirtualScrollRef: be, getPageScrollElementRef: xe, getVirtualScrollableElementRef: Se, setTotalInnerDimensions: Ce, virtualScrollableElementRef: j, totalInnerDimensions: M, pageScrollElementRef: N } = l(), P = E(y > 1), [we, Te] = ge(y > 1), { nextPage: F, prevPage: Ee, setFocusedPage: I, focusedPage: De, totalPages: Oe } = h(), { scrollMode: L } = s(), { viewMode: R } = c(), z = E(null), B = E(null), { loading: ke, error: V } = a(), { passwordRequired: Ae } = i(), { LoaderImageComponent: je } = ee(), H = E(M), U = E({
viewMode: R,
scrollMode: L
}), Me = E(!1), Ne = E(), { isFullScreen: Pe } = _(), { pageDimension: Fe, rowCount: W, rowHeight: G, columnCount: K, columnWidth: q, estimatedColumnWidth: J, estimatedRowHeight: Y, totalDimension: X } = te(), Le = f(M, 100), { onScroll: Z, onTextSelect: Re } = d();
de({
onTextSelect: Re,
pagesRef: S
});
let Q = E();
x(K, W, j, R);
let $ = E({
scrollTop: 0,
scrollLeft: 0
});
se(S);
let { isPressed: ze } = ae(), { selectionMode: He } = g(), { initializeGrabScroll: Ue, resetGrabState: We } = oe({ isPressed: ze }), Ge = he(() => He === n.HAND, [He]), Ke = he(() => {
let e = Array.from({ length: K }, (e, t) => q(t));
return {
columnCount: K,
isDualPageWithCover: R === r.DUAL_PAGE_WITH_COVER,
columnWidths: e,
totalPages: Oe
};
}, [
K,
R,
q,
Oe
]), qe = w((e) => {
let t = document.activeElement !== S;
!Pe && t || (["ArrowUp", "ArrowLeft"].includes(e.key) ? (e.preventDefault(), Ee()) : ["ArrowDown", "ArrowRight"].includes(e.key) && (e.preventDefault(), F()));
}, [
F,
Ee,
Pe,
L
]);
T(() => (window.addEventListener("keydown", qe), () => {
window.removeEventListener("keydown", qe);
}), [qe]), T(() => {
if (z.current && (z.current.style.position = "relative"), A) for (let e = 0; e < W; e++) for (let t = 0; t < K; t++) A.resetAfterIndices({
columnIndex: t,
rowIndex: e,
shouldForceUpdate: !0
});
}, [
W,
K,
Fe,
A
]);
let Je = w((e, t) => {
if (!j) return {
scrollTop: 0,
scrollLeft: 0
};
let n = $.current.scrollTop > t, r = $.current.scrollLeft > e;
return n || r ? $.current : {
scrollTop: j.scrollTop,
scrollLeft: j.scrollLeft
};
}, [j]), Ye = w((e, t) => {
if (U.current.viewMode !== R || U.current.scrollMode !== L) {
Q.current && clearTimeout(Q.current), Me.current = !0, k(De, "auto"), Q.current = setTimeout(() => {
requestAnimationFrame(() => {
U.current = {
viewMode: R,
scrollMode: L
};
});
}, 100);
return;
}
let n = e.scrollTop, r = e.scrollLeft;
if (!t.height || !t.width) return;
Me.current = !0;
let { height: i, width: a } = t, { height: o, width: s } = H.current;
if (o === i && s === a) return;
if (P.current && y > 1) {
H.current = {
height: t.height,
width: t.width
};
return;
}
if (!o || !s) {
H.current = {
height: t.height,
width: t.width
};
return;
}
if (n === 0 && r === 0) {
H.current = {
height: t.height,
width: t.width
};
return;
}
let c = n / o * i, l = r / s * a, u = Math.round(Math.min(c, i)) || 0, d = Math.round(Math.min(l, a)) || 0;
Ne.current = setTimeout(() => {
requestAnimationFrame(() => {
j?.scrollTo({
top: u,
left: d,
behavior: "auto"
});
});
}, 0), H.current = {
height: t.height,
width: t.width
};
}, [
j,
R,
L,
k,
y
]);
T(() => {
clearTimeout(Ne.current);
let e = Array.from({ length: W }).reduce((e, t, n) => e + G(n), 0), t = Array.from({ length: K }).reduce((e, t, n) => e + q(n), 0), n = Je(t, e);
$.current = n, Ye(n, {
height: e,
width: t
}), Ce({
height: e,
width: t
});
}, [
Fe,
W,
K,
Ye
]);
let Xe = w((e) => {
$.current = {
scrollTop: e.scrollTop,
scrollLeft: e.scrollLeft
};
}, [j]);
T(() => {
if (Z) return N && N.addEventListener("scroll", Z), j && j.addEventListener("scroll", Z), () => {
N?.removeEventListener("scroll", Z), j?.removeEventListener("scroll", Z);
};
}, [
j,
N,
Z
]), T(() => () => {
Q.current && clearTimeout(Q.current);
}, []);
let Ze = he(() => v(O["rp-pages-container"], {
[O["rp-cursor-grab"]]: Ge && !ze,
[O["rp-cursor-grabbing"]]: Ge && ze
}), [Ge, ze]), Qe = w((e) => {
if (Ge && e) {
let e = v(O["rp-pages"]);
Ue(document.querySelector(`.${e}`));
}
}, [
Ge,
Ue,
O
]);
return T(() => {
ke && We();
}, [ke]), T(() => {
if (V !== e.INVALID_OR_CORRUPTED_PDF) return;
let t = requestAnimationFrame(() => {
B.current?.focus();
});
return () => {
cancelAnimationFrame(t);
};
}, [V]), T(() => {
if (!(Le.height === 0 || !P.current)) {
if (pe === t.PAGE_SCROLLING) {
y !== De && N && I(y), P.current = !1, Te(!1);
return;
}
j && (k(y, "auto"), (j.scrollLeft > 0 || j.scrollTop > 0) && (I(y), P.current = !1, Te(!1)));
}
}, [
k,
pe,
N,
I,
Le,
j
]), /* @__PURE__ */ ye(ve, { children: [/* @__PURE__ */ D(le, {
ref: me,
children: /* @__PURE__ */ D(ce, {
ref: C,
tabIndex: -1,
className: Ze,
style: {
"--scale-round-x": `${fe(p.current.sx)[1]}px`,
"--scale-round-y": `${fe(p.current.sy)[1]}px`
},
children: /* @__PURE__ */ D(Be, {
style: { minHeight: "50px" },
children: ({ width: n, height: i }) => /* @__PURE__ */ D("div", {
"data-rp": "pages",
ref: Qe,
style: {
width: n,
height: i,
...we && { visibility: "hidden" }
},
children: L === t.PAGE_SCROLLING ? V === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ D("div", {
ref: B,
className: O["rp-load-error"],
style: {
width: n,
height: i
},
tabIndex: -1,
role: "alert",
"aria-live": "assertive",
"aria-atomic": "true",
children: /* @__PURE__ */ D("div", {
className: O["rp-load-error-message"],
children: "Invalid or corrupted PDF file."
})
}) : /* @__PURE__ */ D("div", {
ref: xe,
style: {
width: n,
height: i
},
className: v(O["rp-pages"], O["rp-page-scrolling-wrapper"]),
children: R === r.DUAL_PAGE ? /* @__PURE__ */ D(ne, {
widths: q,
heights: G
}) : R === r.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ D(re, {
widths: q,
heights: G
}) : /* @__PURE__ */ D(ie, {
widths: q,
heights: G
})
}) : Y ? /* @__PURE__ */ D(Ie, {
ref: be,
itemData: Ke,
outerRef: Se,
innerRef: z,
onScroll: Xe,
columnCount: K,
columnWidth: q,
rowHeight: G,
height: i,
width: n,
estimatedColumnWidth: J,
estimatedRowHeight: Y,
rowCount: W,
className: v(O["rp-pages"], L === t.HORIZONTAL_SCROLLING ? O["rp-pages-horizontal-scroll"] : ""),
style: {
"--rp-pages-height": `${X.height}px`,
"--rp-pages-width": `${X.width}px`,
"--rp-row-count": `${W}`,
"--rp-column-count": `${K}`
},
children: Ve
}) : !ke && !V ? /* @__PURE__ */ D("div", {
className: O["rp-loader"],
style: {
display: "flex",
justifyContent: "center",
alignItems: "center",
height: "100%",
width: "100%"
},
children: je && /* @__PURE__ */ D(je, {})
}) : V === e.NOT_SUPPORTED ? /* @__PURE__ */ D("div", {
className: O["rp-not-supported"],
children: /* @__PURE__ */ ye("div", {
className: O["rp-not-supported-content"],
children: ["React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:", /* @__PURE__ */ D("div", { children: /* @__PURE__ */ ye("ul", {
className: O["rp-not-supported-list"],
children: [
/* @__PURE__ */ D("li", { children: "Chrome 126+" }),
/* @__PURE__ */ D("li", { children: "Edge 126+" }),
/* @__PURE__ */ D("li", { children: "Firefox 126+" }),
/* @__PURE__ */ D("li", { children: "Safari 18.4+" }),
/* @__PURE__ */ D("li", { children: "Safari iOS 18.4+" }),
/* @__PURE__ */ D("li", { children: "Chrome Android 126+" })
]
}) })]
})
}) : V === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ D("div", {
ref: B,
className: O["rp-load-error"],
tabIndex: -1,
role: "alert",
"aria-live": "assertive",
"aria-atomic": "true",
children: /* @__PURE__ */ D("div", {
className: O["rp-load-error-message"],
children: "Invalid or corrupted PDF file."
})
}) : null
})
})
})
}), Ae && /* @__PURE__ */ D(b, {})] });
};
//#endregion
export { He as t };
import { withRef as e } from "./utils/withRef.js";
import { d as t, f as n, i as r, l as i, n as a, s as o, t as s } from "./dist-CgoP608h.js";
import { n as c, r as l, t as u } from "./dist-BfuBBQ14.js";
import { a as d, i as f, n as p, r as m, t as h } from "./dist-B2hwhF6G.js";
import * as g from "react";
import { jsx as _, jsxs as v } from "react/jsx-runtime";
import './assets/RPTooltip.css';//#region node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
var y = Object.freeze({
position: "absolute",
border: 0,
width: 1,
height: 1,
padding: 0,
margin: -1,
overflow: "hidden",
clip: "rect(0, 0, 0, 0)",
whiteSpace: "nowrap",
wordWrap: "normal"
}), b = "VisuallyHidden", x = g.forwardRef((e, t) => /* @__PURE__ */ _(r.span, {
...e,
ref: t,
style: {
...y,
...e.style
}
}));
x.displayName = b;
var S = x, [C, w] = i("Tooltip", [d]), T = d(), E = "TooltipProvider", D = 700, O = "tooltip.open", [k, A] = C(E), j = (e) => {
let { __scopeTooltip: t, delayDuration: n = D, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = g.useRef(!0), s = g.useRef(!1), c = g.useRef(0);
return g.useEffect(() => {
let e = c.current;
return () => window.clearTimeout(e);
}, []), /* @__PURE__ */ _(k, {
scope: t,
isOpenDelayedRef: o,
delayDuration: n,
onOpen: g.useCallback(() => {
window.clearTimeout(c.current), o.current = !1;
}, []),
onClose: g.useCallback(() => {
window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r);
}, [r]),
isPointerInTransitRef: s,
onPointerInTransitChange: g.useCallback((e) => {
s.current = e;
}, []),
disableHoverableContent: i,
children: a
});
};
j.displayName = E;
var M = "Tooltip", [N, P] = C(M), F = (e) => {
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: l } = e, u = A(M, e.__scopeTooltip), d = T(t), [p, m] = g.useState(null), h = c(), v = g.useRef(0), y = o ?? u.disableHoverableContent, b = l ?? u.delayDuration, x = g.useRef(!1), [S, C] = s({
prop: r,
defaultProp: i ?? !1,
onChange: (e) => {
e ? (u.onOpen(), document.dispatchEvent(new CustomEvent(O))) : u.onClose(), a?.(e);
},
caller: M
}), w = g.useMemo(() => S ? x.current ? "delayed-open" : "instant-open" : "closed", [S]), E = g.useCallback(() => {
window.clearTimeout(v.current), v.current = 0, x.current = !1, C(!0);
}, [C]), D = g.useCallback(() => {
window.clearTimeout(v.current), v.current = 0, C(!1);
}, [C]), k = g.useCallback(() => {
window.clearTimeout(v.current), v.current = window.setTimeout(() => {
x.current = !0, C(!0), v.current = 0;
}, b);
}, [b, C]);
return g.useEffect(() => () => {
v.current &&= (window.clearTimeout(v.current), 0);
}, []), /* @__PURE__ */ _(f, {
...d,
children: /* @__PURE__ */ _(N, {
scope: t,
contentId: h,
open: S,
stateAttribute: w,
trigger: p,
onTriggerChange: m,
onTriggerEnter: g.useCallback(() => {
u.isOpenDelayedRef.current ? k() : E();
}, [
u.isOpenDelayedRef,
k,
E
]),
onTriggerLeave: g.useCallback(() => {
y ? D() : (window.clearTimeout(v.current), v.current = 0);
}, [D, y]),
onOpen: E,
onClose: D,
disableHoverableContent: y,
children: n
})
});
};
F.displayName = M;
var I = "TooltipTrigger", L = g.forwardRef((e, i) => {
let { __scopeTooltip: a, ...o } = e, s = P(I, a), c = A(I, a), l = T(a), u = t(i, g.useRef(null), s.onTriggerChange), d = g.useRef(!1), f = g.useRef(!1), p = g.useCallback(() => d.current = !1, []);
return g.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ _(h, {
asChild: !0,
...l,
children: /* @__PURE__ */ _(r.button, {
"aria-describedby": s.open ? s.contentId : void 0,
"data-state": s.stateAttribute,
...o,
ref: u,
onPointerMove: n(e.onPointerMove, (e) => {
e.pointerType !== "touch" && !f.current && !c.isPointerInTransitRef.current && (s.onTriggerEnter(), f.current = !0);
}),
onPointerLeave: n(e.onPointerLeave, () => {
s.onTriggerLeave(), f.current = !1;
}),
onPointerDown: n(e.onPointerDown, () => {
s.open && s.onClose(), d.current = !0, document.addEventListener("pointerup", p, { once: !0 });
}),
onFocus: n(e.onFocus, () => {
d.current || s.onOpen();
}),
onBlur: n(e.onBlur, s.onClose),
onClick: n(e.onClick, s.onClose)
})
});
});
L.displayName = I;
var R = "TooltipPortal", [z, B] = C(R, { forceMount: void 0 }), V = (e) => {
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, o = P(R, t);
return /* @__PURE__ */ _(z, {
scope: t,
forceMount: n,
children: /* @__PURE__ */ _(a, {
present: n || o.open,
children: /* @__PURE__ */ _(u, {
asChild: !0,
container: i,
children: r
})
})
});
};
V.displayName = R;
var H = "TooltipContent", U = g.forwardRef((e, t) => {
let n = B(H, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...o } = e, s = P(H, e.__scopeTooltip);
return /* @__PURE__ */ _(a, {
present: r || s.open,
children: s.disableHoverableContent ? /* @__PURE__ */ _(J, {
side: i,
...o,
ref: t
}) : /* @__PURE__ */ _(W, {
side: i,
...o,
ref: t
})
});
}), W = g.forwardRef((e, n) => {
let r = P(H, e.__scopeTooltip), i = A(H, e.__scopeTooltip), a = g.useRef(null), o = t(n, a), [s, c] = g.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = g.useCallback(() => {
c(null), f(!1);
}, [f]), m = g.useCallback((e, t) => {
let n = e.currentTarget, r = {
x: e.clientX,
y: e.clientY
}, i = Q(r, Z(r, n.getBoundingClientRect())), a = ee(t.getBoundingClientRect());
c(ne([...i, ...a])), f(!0);
}, [f]);
return g.useEffect(() => () => p(), [p]), g.useEffect(() => {
if (l && d) {
let e = (e) => m(e, d), t = (e) => m(e, l);
return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
};
}
}, [
l,
d,
m,
p
]), g.useEffect(() => {
if (s) {
let e = (e) => {
let t = e.target, n = {
x: e.clientX,
y: e.clientY
}, r = l?.contains(t) || d?.contains(t), i = !te(n, s);
r ? p() : i && (p(), u());
};
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
}
}, [
l,
d,
s,
u,
p
]), /* @__PURE__ */ _(J, {
...e,
ref: o
});
}), [G, K] = C(M, { isInside: !1 }), q = o("TooltipContent"), J = g.forwardRef((e, t) => {
let { __scopeTooltip: n, children: r, "aria-label": i, onEscapeKeyDown: a, onPointerDownOutside: o, ...s } = e, c = P(H, n), u = T(n), { onClose: d } = c;
return g.useEffect(() => (document.addEventListener(O, d), () => document.removeEventListener(O, d)), [d]), g.useEffect(() => {
if (c.trigger) {
let e = (e) => {
e.target?.contains(c.trigger) && d();
};
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
}
}, [c.trigger, d]), /* @__PURE__ */ _(l, {
asChild: !0,
disableOutsidePointerEvents: !1,
onEscapeKeyDown: a,
onPointerDownOutside: o,
onFocusOutside: (e) => e.preventDefault(),
onDismiss: d,
children: /* @__PURE__ */ v(m, {
"data-state": c.stateAttribute,
...u,
...s,
ref: t,
style: {
...s.style,
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
},
children: [/* @__PURE__ */ _(q, { children: r }), /* @__PURE__ */ _(G, {
scope: n,
isInside: !0,
children: /* @__PURE__ */ _(S, {
id: c.contentId,
role: "tooltip",
children: i || r
})
})]
})
});
});
U.displayName = H;
var Y = "TooltipArrow", X = g.forwardRef((e, t) => {
let { __scopeTooltip: n, ...r } = e, i = T(n);
return K(Y, n).isInside ? null : /* @__PURE__ */ _(p, {
...i,
...r,
ref: t
});
});
X.displayName = Y;
function Z(e, t) {
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
switch (Math.min(n, r, i, a)) {
case a: return "left";
case i: return "right";
case n: return "top";
case r: return "bottom";
default: throw Error("unreachable");
}
}
function Q(e, t, n = 5) {
let r = [];
switch (t) {
case "top":
r.push({
x: e.x - n,
y: e.y + n
}, {
x: e.x + n,
y: e.y + n
});
break;
case "bottom":
r.push({
x: e.x - n,
y: e.y - n
}, {
x: e.x + n,
y: e.y - n
});
break;
case "left":
r.push({
x: e.x + n,
y: e.y - n
}, {
x: e.x + n,
y: e.y + n
});
break;
case "right":
r.push({
x: e.x - n,
y: e.y - n
}, {
x: e.x - n,
y: e.y + n
});
break;
}
return r;
}
function ee(e) {
let { top: t, right: n, bottom: r, left: i } = e;
return [
{
x: i,
y: t
},
{
x: n,
y: t
},
{
x: n,
y: r
},
{
x: i,
y: r
}
];
}
function te(e, t) {
let { x: n, y: r } = e, i = !1;
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
}
return i;
}
function ne(e) {
let t = e.slice();
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), re(t);
}
function re(e) {
if (e.length <= 1) return e.slice();
let t = [];
for (let n = 0; n < e.length; n++) {
let r = e[n];
for (; t.length >= 2;) {
let e = t[t.length - 1], n = t[t.length - 2];
if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
else break;
}
t.push(r);
}
t.pop();
let n = [];
for (let t = e.length - 1; t >= 0; t--) {
let r = e[t];
for (; n.length >= 2;) {
let e = n[n.length - 1], t = n[n.length - 2];
if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
else break;
}
n.push(r);
}
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
}
var $ = {
tooltipContent: "_tooltipContent_12gjy_1",
tooltipArrow: "_tooltipArrow_12gjy_8",
fadeIn: "_fadeIn_12gjy_1"
}, ie = e(({ children: e, content: t, className: n, style: r }, i) => /* @__PURE__ */ _(j, { children: /* @__PURE__ */ v(F, {
delayDuration: 1e3,
children: [/* @__PURE__ */ _(L, {
asChild: !0,
children: /* @__PURE__ */ _("div", {
ref: i,
className: n,
style: r,
children: e
})
}), /* @__PURE__ */ v(U, {
className: $.tooltipContent,
sideOffset: 5,
children: [/* @__PURE__ */ _(X, { className: $.tooltipArrow }), /* @__PURE__ */ _("span", { children: t })]
})]
}) }));
//#endregion
export { ie as t };
import { useDocumentContext as e } from "./contexts/RPDocumentContext.js";
import { usePagesRotateContext as t } from "./contexts/PagesRotateContext.js";
import { r as n } from "./PaginationContext-Cwf8sCpK.js";
import { useRenderQueue as r } from "./contexts/RenderQueueProvider.js";
import { t as i } from "./clsx-DSGuh5YW.js";
import { t as a } from "./LoaderIcon-B3ddfd0D.js";
import { t as o } from "./CustomThumbnailElement-C2quEICO.js";
import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
import { jsx as f, jsxs as p } from "react/jsx-runtime";
import './assets/Thumbnail.css';//#region lib/components/layout/sidebar/Thumbnail.module.css
var m = {
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_czi7p_1",
"rp-thumbnail-text": "_rp-thumbnail-text_czi7p_10",
"rp-thumbnail": "_rp-thumbnail_czi7p_1",
"rp-thumbnail-active": "_rp-thumbnail-active_czi7p_23",
"rp-thumbnail-loader": "_rp-thumbnail-loader_czi7p_32"
}, h = (h) => {
let { pageNumber: g, isFocused: _, viewport: v } = h, { goToPage: y } = n(), { pageRotate: b } = t(), x = u(null), S = r(), { pages: C } = e(), [w, T] = d(null), E = u(!1), D = u(), O = l(() => _ ? m["rp-thumbnail-active"] : "", [_]), k = l(() => ({
width: Math.round(v.width),
height: Math.round(v.height)
}), [v]), A = s(() => {
g && y(g);
}, [y, g]);
return c(() => {
let e = C.get(g);
D.current !== e && (T(null), D.current = e);
}, [C, g]), c(() => {
let e = C.get(g);
if (!x.current || !g || !e || w) return;
let t = new IntersectionObserver((t) => {
t.forEach((t) => {
if (E.current) {
E.current = !1, S.removeQueue(`thumbnail-${g}`);
return;
}
if (t.isIntersecting) {
let t = document.createElement("canvas");
E.current = !0, S.enqueue(`thumbnail-${g}`, {
page: e.page,
canvasElem: t,
options: { scale: 1 },
onLoaded: () => {
t.toBlob((e) => {
e && T(URL.createObjectURL(e));
});
}
}, 2);
}
});
});
return x.current && t.observe(x.current), () => {
t.disconnect(), S.removeQueue(`thumbnail-${g}`);
};
}, [
S,
g,
C,
w
]), /* @__PURE__ */ p("div", {
onClick: A,
onKeyDown: (e) => {
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), A());
},
id: `page-${g}`,
className: m["rp-thumbnail-wrapper"],
ref: x,
role: "button",
tabIndex: 0,
"aria-label": `Go to page ${g}`,
"aria-current": _ ? "page" : void 0,
children: [/* @__PURE__ */ p("div", {
style: { transform: `rotate(${b[g || 0]}deg)` },
className: i(O, m["rp-thumbnail"]),
"aria-hidden": "true",
children: [w ? /* @__PURE__ */ f("img", {
src: w,
width: k.width,
height: k.height,
alt: `Page ${g} thumbnail`,
"aria-hidden": "true"
}) : /* @__PURE__ */ f("div", {
className: m["rp-thumbnail-loader"],
style: {
width: `${k.width}px`,
height: `${k.height}px`
},
children: /* @__PURE__ */ f(a, { "aria-hidden": "true" })
}), /* @__PURE__ */ f(o, { pageNumber: g })]
}), /* @__PURE__ */ f("div", {
className: m["rp-thumbnail-text"],
"aria-hidden": "true",
children: g
})]
});
};
//#endregion
export { h as t };
import { r as e } from "./PaginationContext-Cwf8sCpK.js";
import { useThumbnailContext as t } from "./contexts/ThumbnailsContext.js";
import { useThumbnailContainerRegister as n } from "./contexts/ElementThumbnailContext.js";
import { withRef as r } from "./utils/withRef.js";
import { t as i } from "./Thumbnail-DyRfHsAh.js";
import { useInfiniteScroll as a } from "./utils/hooks/useInfiniteScroll.js";
import { useCallback as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u } from "react";
import { jsx as d } from "react/jsx-runtime";
import './assets/Thumbnails.css';//#region lib/components/layout/sidebar/Thumbnails.module.css
var f = {
"rp-thumbnails-container": "_rp-thumbnails-container_1szrf_1",
"rp-thumbnails": "_rp-thumbnails_1szrf_1"
}, p = 16, m = (e, t) => {
let n = e?.querySelector(`#page-${t}`);
e && n?.offsetTop && (e.scrollTop = n?.offsetTop - p);
}, h = r((r, p) => {
let { show: h, width: g } = r, { focusedPage: _, totalPages: v } = e(), { thumbnailPages: y, addPage: b, thumbnailLength: x, addToPage: S } = t(), C = n(), w = u(null), T = u(1);
c(p, () => w.current), s(() => (C(w.current), () => C(null)), [C]);
let E = l(() => Object.values(y), [y]), D = o(() => {
let e = x + 1;
e <= v && b(e);
}, [
b,
v,
x
]);
return s(() => {
_ > x && v > x ? S(_) : h && T.current !== _ && (m(w.current, _), T.current = _);
}, [
_,
x,
S,
h,
E
]), a(w.current, D), /* @__PURE__ */ d("div", {
ref: w,
className: f["rp-thumbnails-container"],
style: { width: g },
children: /* @__PURE__ */ d("div", {
className: f["rp-thumbnails"],
children: h ? E.map((e, t) => /* @__PURE__ */ d(i, {
isFocused: _ === e.page?.pageNumber,
pageNumber: e.page?.pageNumber,
loading: e.loading,
viewport: e.viewport,
defaultRotation: e.defaultRotation
}, t)) : null
})
});
});
//#endregion
export { h as t };
+1
-1

@@ -1,2 +0,2 @@

import { t as e } from "../../LoaderIcon-D9YjinGf.js";
import { t as e } from "../../LoaderIcon-B3ddfd0D.js";
export { e as LoaderIcon };

@@ -1,2 +0,2 @@

import { t as e } from "../../Container-BxNZX82X.js";
import { t as e } from "../../Container-BuamPhw4.js";
export { e as Container };
import { useDarkModeContext as e } from "../../contexts/DarkModeContext.js";
import { t } from "../../clsx-B7LyVm5O.js";
import { t } from "../../clsx-DSGuh5YW.js";
import { withRef as n } from "../../utils/withRef.js";

@@ -4,0 +4,0 @@ import { t as r } from "../../RPLayout.module-Vc3h4xxS.js";

@@ -12,5 +12,5 @@ "use client";

import { RPSidebar as l } from "./sidebar/RPSidebar.js";
import { t as u } from "../../Container-BxNZX82X.js";
import { t as u } from "../../Container-BuamPhw4.js";
import { t as d } from "../../WrapperLayout-Dcd9l9xH.js";
import { t as f } from "../../RPDropFileZone-D1C3ouep.js";
import { t as f } from "../../RPDropFileZone-Bq1bzWmO.js";
import { t as p } from "../../SkipLink-CdcjClGB.js";

@@ -17,0 +17,0 @@ import { forwardRef as m, useEffect as h, useState as g } from "react";

@@ -8,5 +8,5 @@ "use client";

import { ViewportProvider as a } from "../../contexts/ViewportContext.js";
import { t as o } from "../../Container-BxNZX82X.js";
import { t as o } from "../../Container-BuamPhw4.js";
import { t as s } from "../../WrapperLayout-Dcd9l9xH.js";
import { t as c } from "../../RPDropFileZone-D1C3ouep.js";
import { t as c } from "../../RPDropFileZone-Bq1bzWmO.js";
import { LayoutDropFileZoneProvider as l } from "../../contexts/LayoutDropFileZoneContext.js";

@@ -13,0 +13,0 @@ import { t as u } from "../../SkipLink-CdcjClGB.js";

@@ -7,8 +7,8 @@ "use client";

import { useIconToolContext as r } from "../../../contexts/IconToolContext.js";
import { t as i } from "../../../Button-BNlmxWrV.js";
import { t as i } from "../../../Button-DBu3SaMk.js";
import { useIconContext as a } from "../../../contexts/IconContext.js";
import { t as o } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as o } from "../../../RPTooltip-CXBVXusS.js";
import { ThumbnailIcon as s } from "../../icons/Thumbnail.js";
import { n as c, t as l } from "../../../RPSplitter-C63X9M8w.js";
import { t as u } from "../../../Thumbnails-DnAsrttK.js";
import { t as u } from "../../../Thumbnails-Cbr54TOa.js";
import { useCallback as d, useMemo as f, useRef as p, useState as m } from "react";

@@ -15,0 +15,0 @@ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";

"use client";
import { t as e } from "../../../Thumbnail-CzclS3h_.js";
import { t as e } from "../../../Thumbnail-DyRfHsAh.js";
export { e as Thumbnail };

@@ -1,2 +0,2 @@

import { t as e } from "../../../Thumbnails-DnAsrttK.js";
import { t as e } from "../../../Thumbnails-Cbr54TOa.js";
export { e as Thumbnails };

@@ -6,5 +6,5 @@ import { useDarkModeContext as e } from "../../../contexts/DarkModeContext.js";

import { useIconToolContext as i } from "../../../contexts/IconToolContext.js";
import { t as a } from "../../../Button-BNlmxWrV.js";
import { t as a } from "../../../Button-DBu3SaMk.js";
import { useIconContext as o } from "../../../contexts/IconContext.js";
import { t as s } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as s } from "../../../RPTooltip-CXBVXusS.js";
import { MoonIcon as c } from "../../icons/MoonIcon.js";

@@ -11,0 +11,0 @@ import { SunIcon as l } from "../../icons/SunIcon.js";

@@ -1,2 +0,2 @@

import { t as e } from "../../../DocumentDialog-C9G7lVTh.js";
import { t as e } from "../../../DocumentDialog-cRr9sSSH.js";
export { e as DocumentDialog };

@@ -7,6 +7,6 @@ import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";

import { useIconContext as a } from "../../../contexts/IconContext.js";
import { t as o } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as s } from "../../../MenuItem-BJDWfzAw.js";
import { t as o } from "../../../RPTooltip-CXBVXusS.js";
import { t as s } from "../../../MenuItem-9kCH_GQ0.js";
import { InfoIcon as c } from "../../icons/InfoIcon.js";
import { t as l } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as l } from "../../../MenuSeparator-CaFxd8b5.js";
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";

@@ -13,0 +13,0 @@ //#region lib/components/layout/toolbar/DocumentProperties.tsx

@@ -6,7 +6,7 @@ import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";

import { useFileDownload as i } from "../../../utils/hooks/useFileDownload.js";
import { t as a } from "../../../Button-BNlmxWrV.js";
import { t as a } from "../../../Button-DBu3SaMk.js";
import { useIconContext as o } from "../../../contexts/IconContext.js";
import { useViewportContext as s } from "../../../contexts/ViewportContext.js";
import { t as c } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as l } from "../../../MenuItem-BJDWfzAw.js";
import { t as c } from "../../../RPTooltip-CXBVXusS.js";
import { t as l } from "../../../MenuItem-9kCH_GQ0.js";
import { FileDownloadDefaultIcon as u } from "../../icons/FileDownloadDefaultIcon.js";

@@ -13,0 +13,0 @@ import { jsx as d, jsxs as f } from "react/jsx-runtime";

@@ -6,8 +6,8 @@ import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";

import { useIconToolContext as i } from "../../../contexts/IconToolContext.js";
import { t as a } from "../../../Button-BNlmxWrV.js";
import { t as a } from "../../../Button-DBu3SaMk.js";
import { useIconContext as o } from "../../../contexts/IconContext.js";
import { useViewportContext as s } from "../../../contexts/ViewportContext.js";
import { t as c } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as c } from "../../../RPTooltip-CXBVXusS.js";
import { FileUploadDefaultIcon as l } from "../../icons/FileUploadDefaultIcon.js";
import { t as u } from "../../../MenuItem-BJDWfzAw.js";
import { t as u } from "../../../MenuItem-9kCH_GQ0.js";
import { jsx as d, jsxs as f } from "react/jsx-runtime";

@@ -14,0 +14,0 @@ //#region lib/components/layout/toolbar/FileUploadTool.tsx

@@ -6,7 +6,7 @@ import { useFullScreenContext as e } from "../../../contexts/FullScreenContext.js";

import { useIconToolContext as i } from "../../../contexts/IconToolContext.js";
import { t as a } from "../../../Button-BNlmxWrV.js";
import { t as a } from "../../../Button-DBu3SaMk.js";
import { useIconContext as o } from "../../../contexts/IconContext.js";
import { useViewportContext as s } from "../../../contexts/ViewportContext.js";
import { t as c } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as l } from "../../../MenuItem-BJDWfzAw.js";
import { t as c } from "../../../RPTooltip-CXBVXusS.js";
import { t as l } from "../../../MenuItem-9kCH_GQ0.js";
import { FullScreenIcon as u } from "../../icons/FullScreenIcon.js";

@@ -13,0 +13,0 @@ import { jsx as d, jsxs as f } from "react/jsx-runtime";

@@ -1,2 +0,2 @@

import { t as e } from "../../../MenuItem-BJDWfzAw.js";
import { t as e } from "../../../MenuItem-9kCH_GQ0.js";
export { e as MenuItem };

@@ -1,2 +0,2 @@

import { t as e } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as e } from "../../../MenuSeparator-CaFxd8b5.js";
export { e as MenuSeparator };

@@ -7,6 +7,6 @@ import { r as e } from "../../../PaginationContext-Cwf8sCpK.js";

import { useIconContext as a } from "../../../contexts/IconContext.js";
import { t as o } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as s } from "../../../dist-CKteKPPA.js";
import { t as c } from "../../../MenuItem-BJDWfzAw.js";
import { t as l } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as o } from "../../../RPTooltip-CXBVXusS.js";
import { n as s } from "../../../dist-VbpVNBs6.js";
import { t as c } from "../../../MenuItem-9kCH_GQ0.js";
import { t as l } from "../../../MenuSeparator-CaFxd8b5.js";
import { GoToDownIcon as u } from "../../icons/GoToDownIcon.js";

@@ -13,0 +13,0 @@ import { t as d } from "../../../MostPageTool.module-BRVv-sGz.js";

@@ -5,12 +5,12 @@ import { useLayoutContainer as e } from "../../../contexts/LayoutContainerContext.js";

import { useToolComponentContext as te } from "../../../contexts/ToolComponentContext.js";
import { t as n } from "../../../Button-BNlmxWrV.js";
import { t as n } from "../../../Button-DBu3SaMk.js";
import { useViewportContext as r } from "../../../contexts/ViewportContext.js";
import { t as i } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as a } from "../../../dist-CKteKPPA.js";
import { t as i } from "../../../RPTooltip-CXBVXusS.js";
import { n as a } from "../../../dist-VbpVNBs6.js";
import { FileUploadTool as o } from "./FileUploadTool.js";
import { ThreeDotIcon as s } from "../../icons/ThreeDotIcon.js";
import { t as c } from "../../../DropDown-DikL-krI.js";
import { t as l } from "../../../DocumentDialog-C9G7lVTh.js";
import { t as c } from "../../../DropDown-CM6xEwZC.js";
import { t as l } from "../../../DocumentDialog-cRr9sSSH.js";
import { t as u } from "../../../OtherTool.module-BQY9Nfqz.js";
import { t as d } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as d } from "../../../MenuSeparator-CaFxd8b5.js";
import { DocumentProperties as f } from "./DocumentProperties.js";

@@ -17,0 +17,0 @@ import { RotateTool as p } from "./RotateTool.js";

@@ -10,8 +10,8 @@ import { ScrollMode as e, ViewMode as t } from "../../../utils/types.js";

import { ChevronUpIcon as l } from "../../icons/ChevronUpIcon.js";
import { t as u } from "../../../Button-BNlmxWrV.js";
import { t as d } from "../../../Input-DjSWOjCI.js";
import { t as u } from "../../../Button-DBu3SaMk.js";
import { t as d } from "../../../Input-Dpo1Xfxe.js";
import { t as f } from "../../../Paginate.module-B0GMw-MB.js";
import { useIconContext as p } from "../../../contexts/IconContext.js";
import { useViewportContext as m } from "../../../contexts/ViewportContext.js";
import { t as h } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as h } from "../../../RPTooltip-CXBVXusS.js";
import { useCallback as g, useEffect as _, useMemo as v, useState as y } from "react";

@@ -85,2 +85,4 @@ import { jsx as b, jsxs as x } from "react/jsx-runtime";

className: f["rp-total-page"],
"aria-label": `${P?.ofTotalPagesLabel ?? "of"} ${l}`,
"aria-live": "polite",
children: ["/", l]

@@ -87,0 +89,0 @@ }),

@@ -6,7 +6,7 @@ import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";

import { useIconToolContext as i } from "../../../contexts/IconToolContext.js";
import { t as a } from "../../../Button-BNlmxWrV.js";
import { t as a } from "../../../Button-DBu3SaMk.js";
import { useIconContext as o } from "../../../contexts/IconContext.js";
import { useViewportContext as s } from "../../../contexts/ViewportContext.js";
import { t as c } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as l } from "../../../MenuItem-BJDWfzAw.js";
import { t as c } from "../../../RPTooltip-CXBVXusS.js";
import { t as l } from "../../../MenuItem-9kCH_GQ0.js";
import { PrintDefaultTool as u } from "../../icons/PrintDefaultIcon.js";

@@ -13,0 +13,0 @@ import { jsx as d, jsxs as f } from "react/jsx-runtime";

@@ -6,6 +6,6 @@ import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";

import { useIconContext as i } from "../../../contexts/IconContext.js";
import { t as a } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as o } from "../../../dist-CKteKPPA.js";
import { t as s } from "../../../MenuItem-BJDWfzAw.js";
import { t as c } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as a } from "../../../RPTooltip-CXBVXusS.js";
import { n as o } from "../../../dist-VbpVNBs6.js";
import { t as s } from "../../../MenuItem-9kCH_GQ0.js";
import { t as c } from "../../../MenuSeparator-CaFxd8b5.js";
import { ClockwiseIcon as l } from "../../icons/ClockwiseIcon.js";

@@ -12,0 +12,0 @@ import { t as u } from "../../../RotateTool.module-DH5yWbvM.js";

@@ -1,5 +0,5 @@

import { t as e } from "../../../RPTooltip-ZZoFqP7C.js";
import { t } from "../../../MenuItem-BJDWfzAw.js";
import { t as e } from "../../../RPTooltip-CXBVXusS.js";
import { t } from "../../../MenuItem-9kCH_GQ0.js";
import { InfoIcon as n } from "../../icons/InfoIcon.js";
import { t as r } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as r } from "../../../MenuSeparator-CaFxd8b5.js";
import "react";

@@ -6,0 +6,0 @@ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";

import { useLayoutContainer as e } from "../../../contexts/LayoutContainerContext.js";
import { useLocalizationContext as t } from "../../../contexts/LocalizationContext.js";
import { t as n } from "../../../Button-BNlmxWrV.js";
import { t as n } from "../../../Button-DBu3SaMk.js";
import { useViewportContext as r } from "../../../contexts/ViewportContext.js";
import { t as i } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as a } from "../../../dist-CKteKPPA.js";
import { t as i } from "../../../RPTooltip-CXBVXusS.js";
import { n as a } from "../../../dist-VbpVNBs6.js";
import { ThreeDotIcon as o } from "../../icons/ThreeDotIcon.js";
import { t as s } from "../../../DropDown-DikL-krI.js";
import { t as c } from "../../../DocumentDialog-C9G7lVTh.js";
import { t as s } from "../../../DropDown-CM6xEwZC.js";
import { t as c } from "../../../DocumentDialog-cRr9sSSH.js";
import { t as l } from "../../../OtherTool.module-BQY9Nfqz.js";
import { t as u } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as u } from "../../../MenuSeparator-CaFxd8b5.js";
import { FileDownloadTool as d } from "./tools/more-options/FileDownloadTool.js";

@@ -13,0 +13,0 @@ import { FileUploadTool as f } from "./tools/more-options/FileUploadTool.js";

@@ -11,3 +11,3 @@ import { usePrintContext as e } from "../../../contexts/PrintContext.js";

import { SearchTool as l } from "./SearchTool.js";
import { t as u } from "../../../LoadingIndicator-DiWoWs4Y.js";
import { t as u } from "../../../LoadingIndicator-Bzzf28Xv.js";
import { jsx as d, jsxs as f } from "react/jsx-runtime";

@@ -14,0 +14,0 @@ //#region lib/components/layout/toolbar/RPToolbar.tsx

@@ -9,5 +9,5 @@ import { ScrollMode as e, ViewMode as t } from "../../../utils/types.js";

import { useIconContext as c } from "../../../contexts/IconContext.js";
import { t as l } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as u } from "../../../dist-CKteKPPA.js";
import { t as d } from "../../../MenuItem-BJDWfzAw.js";
import { t as l } from "../../../RPTooltip-CXBVXusS.js";
import { n as u } from "../../../dist-VbpVNBs6.js";
import { t as d } from "../../../MenuItem-9kCH_GQ0.js";
import { CheckIcon as f } from "../../icons/CheckIcon.js";

@@ -14,0 +14,0 @@ import { PageScrollingIcon as p } from "../../icons/PageScrollingIcon.js";

import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";
import { t } from "../../../Button-BNlmxWrV.js";
import { t as n } from "../../../RPTooltip-ZZoFqP7C.js";
import { t } from "../../../Button-DBu3SaMk.js";
import { t as n } from "../../../RPTooltip-CXBVXusS.js";
import { CloseIcon as r } from "../../icons/CloseIcon.js";

@@ -5,0 +5,0 @@ import { t as i } from "../../../SearchTool.module-DUkVXfOn.js";

import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";
import { useSearchContext as t } from "../../../contexts/SearchContext.js";
import { ChevronUpIcon as n } from "../../icons/ChevronUpIcon.js";
import { t as r } from "../../../Button-BNlmxWrV.js";
import { t as i } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../Button-DBu3SaMk.js";
import { t as i } from "../../../RPTooltip-CXBVXusS.js";
import { t as a } from "../../../SearchTool.module-DUkVXfOn.js";

@@ -7,0 +7,0 @@ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";

@@ -7,14 +7,14 @@ import { useDocumentContext as e } from "../../../contexts/RPDocumentContext.js";

import { useSearchContext as ee } from "../../../contexts/SearchContext.js";
import { t as te } from "../../../LoaderIcon-D9YjinGf.js";
import { t as te } from "../../../LoaderIcon-B3ddfd0D.js";
import { useIconToolContext as a } from "../../../contexts/IconToolContext.js";
import { t as o } from "../../../Button-BNlmxWrV.js";
import { t as s } from "../../../Input-DjSWOjCI.js";
import { t as o } from "../../../Button-DBu3SaMk.js";
import { t as s } from "../../../Input-Dpo1Xfxe.js";
import { useIconContext as c } from "../../../contexts/IconContext.js";
import { useViewportContext as ne } from "../../../contexts/ViewportContext.js";
import { t as l } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as re } from "../../../DropDown-DikL-krI.js";
import { t as l } from "../../../RPTooltip-CXBVXusS.js";
import { t as re } from "../../../DropDown-CM6xEwZC.js";
import { InfoIcon as u } from "../../icons/InfoIcon.js";
import { SearchIcon as d } from "../../icons/SearchIcon.js";
import { t as f } from "../../../SearchTool.module-DUkVXfOn.js";
import { t as p } from "../../../Checkbox-Brta-YKG.js";
import { t as p } from "../../../Checkbox-CSIEUyO8.js";
import { ClearIcon as m } from "../../icons/ClearIcon.js";

@@ -21,0 +21,0 @@ import { SearchResultNavigator as h } from "./SearchResultNavigator.js";

@@ -8,6 +8,6 @@ import { SelectionMode as e } from "../../../utils/types.js";

import { useIconContext as o } from "../../../contexts/IconContext.js";
import { t as s } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as c } from "../../../dist-CKteKPPA.js";
import { t as l } from "../../../MenuItem-BJDWfzAw.js";
import { t as u } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as s } from "../../../RPTooltip-CXBVXusS.js";
import { n as c } from "../../../dist-VbpVNBs6.js";
import { t as l } from "../../../MenuItem-9kCH_GQ0.js";
import { t as u } from "../../../MenuSeparator-CaFxd8b5.js";
import { CheckIcon as d } from "../../icons/CheckIcon.js";

@@ -14,0 +14,0 @@ import { TextSelectionDefaultIcon as f } from "../../icons/TextSelectionDefaultIcon.js";

@@ -5,4 +5,4 @@ import { useLocalizationContext as e } from "../../../contexts/LocalizationContext.js";

import { useIconToolContext as r } from "../../../contexts/IconToolContext.js";
import { t as i } from "../../../Button-BNlmxWrV.js";
import { t as a } from "../../../RPTooltip-ZZoFqP7C.js";
import { t as i } from "../../../Button-DBu3SaMk.js";
import { t as a } from "../../../RPTooltip-CXBVXusS.js";
import { ThumbnailIcon as o } from "../../icons/Thumbnail.js";

@@ -9,0 +9,0 @@ import { Fragment as s, jsx as c } from "react/jsx-runtime";

@@ -5,5 +5,5 @@ import "../../../utils/constants.js";

import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
import { t as r } from "../../../LoadingIndicator-DiWoWs4Y.js";
import { t as r } from "../../../LoadingIndicator-Bzzf28Xv.js";
import { t as i } from "../../../RPSplitter-C63X9M8w.js";
import { t as a } from "../../../Thumbnails-DnAsrttK.js";
import { t as a } from "../../../Thumbnails-Cbr54TOa.js";
import { t as o } from "../../../ToolbarLayout.module-Zo715dbb.js";

@@ -10,0 +10,0 @@ import { useRef as s, useState as c } from "react";

@@ -5,5 +5,5 @@ import "../../../utils/constants.js";

import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
import { t as r } from "../../../LoadingIndicator-DiWoWs4Y.js";
import { t as r } from "../../../LoadingIndicator-Bzzf28Xv.js";
import { t as i } from "../../../RPSplitter-C63X9M8w.js";
import { t as a } from "../../../Thumbnails-DnAsrttK.js";
import { t as a } from "../../../Thumbnails-Cbr54TOa.js";
import { t as o } from "../../../ToolbarLayout.module-Zo715dbb.js";

@@ -10,0 +10,0 @@ import { RPVerticalBar as s } from "./tools/defaults/RPVerticalBar.js";

import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { useOtherToolContext as t } from "../../../../contexts/OtherToolContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as i } from "../../../../DocumentDialog-C9G7lVTh.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { t as i } from "../../../../DocumentDialog-cRr9sSSH.js";
import { InfoIcon as a } from "../../../icons/InfoIcon.js";

@@ -7,0 +7,0 @@ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";

import { useViewModeContext as e } from "../../../../contexts/ViewModeContext.js";
import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { DualPageIcon as i } from "../../../icons/DualPageIcon.js";

@@ -6,0 +6,0 @@ import { jsx as a } from "react/jsx-runtime";

@@ -1,2 +0,2 @@

import { r as e } from "../../../../main-CKr9unOk.js";
import { r as e } from "../../../../main-Zah9b8M8.js";
export { e as DualPageWithCoverTool };
import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { useFileDownload as t } from "../../../../utils/hooks/useFileDownload.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { FileDownloadDefaultIcon as i } from "../../../icons/FileDownloadDefaultIcon.js";

@@ -6,0 +6,0 @@ import { jsx as a } from "react/jsx-runtime";

import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { useOpenFileContext as t } from "../../../../contexts/FileInputContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { FileUploadDefaultIcon as i } from "../../../icons/FileUploadDefaultIcon.js";

@@ -6,0 +6,0 @@ import { jsx as a } from "react/jsx-runtime";

@@ -1,2 +0,2 @@

import { n as e } from "../../../../main-CKr9unOk.js";
import { n as e } from "../../../../main-Zah9b8M8.js";
export { e as FirstPageTool };
import { useFullScreenContext as e } from "../../../../contexts/FullScreenContext.js";
import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { FullScreenIcon as i } from "../../../icons/FullScreenIcon.js";

@@ -6,0 +6,0 @@ import { jsx as a } from "react/jsx-runtime";

import { ScrollMode as e } from "../../../../utils/types.js";
import { useScrollModeContext as t } from "../../../../contexts/ScrollModeContext.js";
import { useLocalizationContext as n } from "../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { HorizontalScrollingIcon as a } from "../../../icons/HorizontalScrollingIcon.js";

@@ -7,0 +7,0 @@ import { jsx as o } from "react/jsx-runtime";

import { r as e } from "../../../../PaginationContext-Cwf8sCpK.js";
import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
import { t as n } from "../../../../Input-DjSWOjCI.js";
import { t as n } from "../../../../Input-Dpo1Xfxe.js";
import { t as r } from "../../../../Paginate.module-B0GMw-MB.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { useCallback as a, useEffect as o, useState as s } from "react";

@@ -7,0 +7,0 @@ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";

@@ -1,2 +0,2 @@

import { t as e } from "../../../../main-CKr9unOk.js";
import { t as e } from "../../../../main-Zah9b8M8.js";
export { e as LastPageTool };
import { useLocalizationContext as e } from "../../../../../contexts/LocalizationContext.js";
import { useOtherToolContext as t } from "../../../../../contexts/OtherToolContext.js";
import { t as n } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as n } from "../../../../../RPTooltip-CXBVXusS.js";
import { t as r } from "../../../../../MenuItem-9kCH_GQ0.js";
import { InfoIcon as i } from "../../../../icons/InfoIcon.js";

@@ -6,0 +6,0 @@ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";

import { useLocalizationContext as e } from "../../../../../contexts/LocalizationContext.js";
import { useFileDownload as t } from "../../../../../utils/hooks/useFileDownload.js";
import { useViewportContext as n } from "../../../../../contexts/ViewportContext.js";
import { t as r } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { t as i } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as r } from "../../../../../RPTooltip-CXBVXusS.js";
import { t as i } from "../../../../../MenuItem-9kCH_GQ0.js";
import { FileDownloadDefaultIcon as a } from "../../../../icons/FileDownloadDefaultIcon.js";

@@ -7,0 +7,0 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";

import { useLocalizationContext as e } from "../../../../../contexts/LocalizationContext.js";
import { useOpenFileContext as t } from "../../../../../contexts/FileInputContext.js";
import { useViewportContext as n } from "../../../../../contexts/ViewportContext.js";
import { t as r } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../../RPTooltip-CXBVXusS.js";
import { FileUploadDefaultIcon as i } from "../../../../icons/FileUploadDefaultIcon.js";
import { t as a } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as a } from "../../../../../MenuItem-9kCH_GQ0.js";
import { jsx as o, jsxs as s } from "react/jsx-runtime";

@@ -8,0 +8,0 @@ //#region lib/components/layout/toolbar/tools/more-options/FileUploadTool.tsx

import { useFullScreenContext as e } from "../../../../../contexts/FullScreenContext.js";
import { useLocalizationContext as t } from "../../../../../contexts/LocalizationContext.js";
import { useViewportContext as n } from "../../../../../contexts/ViewportContext.js";
import { t as r } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { t as i } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as r } from "../../../../../RPTooltip-CXBVXusS.js";
import { t as i } from "../../../../../MenuItem-9kCH_GQ0.js";
import { FullScreenIcon as a } from "../../../../icons/FullScreenIcon.js";

@@ -7,0 +7,0 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";

import { r as e } from "../../../../../PaginationContext-Cwf8sCpK.js";
import { useLocalizationContext as t } from "../../../../../contexts/LocalizationContext.js";
import { t as n } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { n as r } from "../../../../../dist-CKteKPPA.js";
import { t as i } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as a } from "../../../../../MenuSeparator-D1H5l8Ej.js";
import { t as n } from "../../../../../RPTooltip-CXBVXusS.js";
import { n as r } from "../../../../../dist-VbpVNBs6.js";
import { t as i } from "../../../../../MenuItem-9kCH_GQ0.js";
import { t as a } from "../../../../../MenuSeparator-CaFxd8b5.js";
import { GoToDownIcon as o } from "../../../../icons/GoToDownIcon.js";

@@ -8,0 +8,0 @@ import { t as s } from "../../../../../MostPageTool.module-BRVv-sGz.js";

import { useLocalizationContext as e } from "../../../../../contexts/LocalizationContext.js";
import { usePrintContext as t } from "../../../../../contexts/PrintContext.js";
import { useViewportContext as n } from "../../../../../contexts/ViewportContext.js";
import { t as r } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { t as i } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as r } from "../../../../../RPTooltip-CXBVXusS.js";
import { t as i } from "../../../../../MenuItem-9kCH_GQ0.js";
import { PrintDefaultTool as a } from "../../../../icons/PrintDefaultIcon.js";

@@ -7,0 +7,0 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";

import { useLocalizationContext as e } from "../../../../../contexts/LocalizationContext.js";
import { t } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { n } from "../../../../../dist-CKteKPPA.js";
import { t as r } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as i } from "../../../../../MenuSeparator-D1H5l8Ej.js";
import { t } from "../../../../../RPTooltip-CXBVXusS.js";
import { n } from "../../../../../dist-VbpVNBs6.js";
import { t as r } from "../../../../../MenuItem-9kCH_GQ0.js";
import { t as i } from "../../../../../MenuSeparator-CaFxd8b5.js";
import { ClockwiseIcon as a } from "../../../../icons/ClockwiseIcon.js";

@@ -7,0 +7,0 @@ import { t as o } from "../../../../../RotateTool.module-DH5yWbvM.js";

@@ -5,5 +5,5 @@ import { ScrollMode as e, ViewMode as t } from "../../../../../utils/types.js";

import { useLocalizationContext as i } from "../../../../../contexts/LocalizationContext.js";
import { t as a } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { n as o } from "../../../../../dist-CKteKPPA.js";
import { t as s } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as a } from "../../../../../RPTooltip-CXBVXusS.js";
import { n as o } from "../../../../../dist-VbpVNBs6.js";
import { t as s } from "../../../../../MenuItem-9kCH_GQ0.js";
import { CheckIcon as c } from "../../../../icons/CheckIcon.js";

@@ -10,0 +10,0 @@ import { PageScrollingIcon as l } from "../../../../icons/PageScrollingIcon.js";

import { SelectionMode as e } from "../../../../../utils/types.js";
import { useSelectionModeContext as t } from "../../../../../contexts/SelectionModeContext.js";
import { useLocalizationContext as n } from "../../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { n as i } from "../../../../../dist-CKteKPPA.js";
import { t as a } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as o } from "../../../../../MenuSeparator-D1H5l8Ej.js";
import { t as r } from "../../../../../RPTooltip-CXBVXusS.js";
import { n as i } from "../../../../../dist-VbpVNBs6.js";
import { t as a } from "../../../../../MenuItem-9kCH_GQ0.js";
import { t as o } from "../../../../../MenuSeparator-CaFxd8b5.js";
import { CheckIcon as s } from "../../../../icons/CheckIcon.js";

@@ -9,0 +9,0 @@ import { TextSelectionDefaultIcon as c } from "../../../../icons/TextSelectionDefaultIcon.js";

@@ -5,6 +5,6 @@ import { ScrollMode as e, ViewMode as t } from "../../../../../utils/types.js";

import { useLocalizationContext as i } from "../../../../../contexts/LocalizationContext.js";
import { t as a } from "../../../../../RPTooltip-ZZoFqP7C.js";
import { n as o } from "../../../../../dist-CKteKPPA.js";
import { t as s } from "../../../../../MenuItem-BJDWfzAw.js";
import { t as c } from "../../../../../MenuSeparator-D1H5l8Ej.js";
import { t as a } from "../../../../../RPTooltip-CXBVXusS.js";
import { n as o } from "../../../../../dist-VbpVNBs6.js";
import { t as s } from "../../../../../MenuItem-9kCH_GQ0.js";
import { t as c } from "../../../../../MenuSeparator-CaFxd8b5.js";
import { DualPageIcon as l } from "../../../../icons/DualPageIcon.js";

@@ -11,0 +11,0 @@ import { DualPageWithCoverIcon as u } from "../../../../icons/DualPageWithCoverIcon.js";

@@ -7,4 +7,4 @@ import { ScrollMode as e, ViewMode as t } from "../../../../utils/types.js";

import { ChevronUpIcon as o } from "../../../icons/ChevronUpIcon.js";
import { t as s } from "../../../../Button-BNlmxWrV.js";
import { t as c } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as s } from "../../../../Button-DBu3SaMk.js";
import { t as c } from "../../../../RPTooltip-CXBVXusS.js";
import { useMemo as l } from "react";

@@ -11,0 +11,0 @@ import { Fragment as u, jsx as d } from "react/jsx-runtime";

import { ScrollMode as e } from "../../../../utils/types.js";
import { useScrollModeContext as t } from "../../../../contexts/ScrollModeContext.js";
import { useLocalizationContext as n } from "../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { PageScrollingIcon as a } from "../../../icons/PageScrollingIcon.js";

@@ -7,0 +7,0 @@ import { jsx as o } from "react/jsx-runtime";

import { r as e } from "../../../../PaginationContext-Cwf8sCpK.js";
import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
import { ChevronUpIcon as n } from "../../../icons/ChevronUpIcon.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { Fragment as a, jsx as o } from "react/jsx-runtime";

@@ -7,0 +7,0 @@ //#region lib/components/layout/toolbar/tools/PreviousPageTool.tsx

import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { usePrintContext as t } from "../../../../contexts/PrintContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { PrintDefaultTool as i } from "../../../icons/PrintDefaultIcon.js";

@@ -6,0 +6,0 @@ import { jsx as a } from "react/jsx-runtime";

import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { t } from "../../../../Button-BNlmxWrV.js";
import { t as n } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t } from "../../../../Button-DBu3SaMk.js";
import { t as n } from "../../../../RPTooltip-CXBVXusS.js";
import { ClockwiseIcon as r } from "../../../icons/ClockwiseIcon.js";

@@ -5,0 +5,0 @@ import { useRotate as i } from "../../../../utils/hooks/useRotate.js";

import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { t } from "../../../../Button-BNlmxWrV.js";
import { t as n } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t } from "../../../../Button-DBu3SaMk.js";
import { t as n } from "../../../../RPTooltip-CXBVXusS.js";
import { ClockwiseIcon as r } from "../../../icons/ClockwiseIcon.js";

@@ -5,0 +5,0 @@ import { t as i } from "../../../../RotateTool.module-DH5yWbvM.js";

import { SelectionMode as e } from "../../../../utils/types.js";
import { useSelectionModeContext as t } from "../../../../contexts/SelectionModeContext.js";
import { useLocalizationContext as n } from "../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { TextSelectionDefaultIcon as a } from "../../../icons/TextSelectionDefaultIcon.js";

@@ -7,0 +7,0 @@ import { HandModeDefaultIcon as o } from "../../../icons/HandModeDefaultIcon.js";

import { useViewModeContext as e } from "../../../../contexts/ViewModeContext.js";
import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { SinglePageIcon as i } from "../../../icons/SinglePageIcon.js";

@@ -6,0 +6,0 @@ import { jsx as a } from "react/jsx-runtime";

import { useDarkModeContext as e } from "../../../../contexts/DarkModeContext.js";
import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { MoonIcon as i } from "../../../icons/MoonIcon.js";

@@ -6,0 +6,0 @@ import { SunIcon as a } from "../../../icons/SunIcon.js";

"use client";
import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
import { useThumbnailContext as t } from "../../../../contexts/ThumbnailsContext.js";
import { t as n } from "../../../../Button-BNlmxWrV.js";
import { t as r } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as n } from "../../../../Button-DBu3SaMk.js";
import { t as r } from "../../../../RPTooltip-CXBVXusS.js";
import { ThumbnailIcon as i } from "../../../icons/Thumbnail.js";

@@ -7,0 +7,0 @@ import { Fragment as a, jsx as o } from "react/jsx-runtime";

import { ScrollMode as e } from "../../../../utils/types.js";
import { useScrollModeContext as t } from "../../../../contexts/ScrollModeContext.js";
import { useLocalizationContext as n } from "../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { VerticalScrollingIcon as a } from "../../../icons/VerticalScrollingIcon.js";

@@ -7,0 +7,0 @@ import { jsx as o } from "react/jsx-runtime";

import { MAX_ZOOM_SCALE as e } from "../../../../utils/constants.js";
import { useZoomContext as t } from "../../../../contexts/ZoomContext.js";
import { useLocalizationContext as n } from "../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { ZoomInIcon as a } from "../../../icons/ZoomInIcon.js";

@@ -7,0 +7,0 @@ import { isZoomInDisabled as o } from "../../../../utils/zoom.js";

@@ -5,8 +5,8 @@ import { ZoomLevel as e } from "../../../../utils/types.js";

import { useLocalizationContext as r } from "../../../../contexts/LocalizationContext.js";
import { t as i } from "../../../../Button-BNlmxWrV.js";
import { t as a } from "../../../../RPTooltip-ZZoFqP7C.js";
import { n as o } from "../../../../dist-CKteKPPA.js";
import { t as s } from "../../../../MenuItem-BJDWfzAw.js";
import { t as c } from "../../../../DropDown-DikL-krI.js";
import { t as l } from "../../../../MenuSeparator-D1H5l8Ej.js";
import { t as i } from "../../../../Button-DBu3SaMk.js";
import { t as a } from "../../../../RPTooltip-CXBVXusS.js";
import { n as o } from "../../../../dist-VbpVNBs6.js";
import { t as s } from "../../../../MenuItem-9kCH_GQ0.js";
import { t as c } from "../../../../DropDown-CM6xEwZC.js";
import { t as l } from "../../../../MenuSeparator-CaFxd8b5.js";
import { t as u } from "../../../../ZoomTool.module-BrIPy8pO.js";

@@ -13,0 +13,0 @@ import { ZoomLevelDisplay as d } from "./ZoomLevelDisplay.js";

import { MAX_ZOOM_SCALE as e } from "../../../../utils/constants.js";
import { useZoomContext as t } from "../../../../contexts/ZoomContext.js";
import { useLocalizationContext as n } from "../../../../contexts/LocalizationContext.js";
import { t as r } from "../../../../Button-BNlmxWrV.js";
import { t as i } from "../../../../RPTooltip-ZZoFqP7C.js";
import { t as r } from "../../../../Button-DBu3SaMk.js";
import { t as i } from "../../../../RPTooltip-CXBVXusS.js";
import { ZoomOutIcon as a } from "../../../icons/ZoomOutIcon.js";

@@ -7,0 +7,0 @@ import { isZoomOutDisabled as o } from "../../../../utils/zoom.js";

@@ -9,6 +9,6 @@ import { ScrollMode as e, ViewMode as t } from "../../../utils/types.js";

import { useIconContext as c } from "../../../contexts/IconContext.js";
import { t as l } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as u } from "../../../dist-CKteKPPA.js";
import { t as d } from "../../../MenuItem-BJDWfzAw.js";
import { t as f } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as l } from "../../../RPTooltip-CXBVXusS.js";
import { n as u } from "../../../dist-VbpVNBs6.js";
import { t as d } from "../../../MenuItem-9kCH_GQ0.js";
import { t as f } from "../../../MenuSeparator-CaFxd8b5.js";
import { DualPageIcon as p } from "../../icons/DualPageIcon.js";

@@ -15,0 +15,0 @@ import { DualPageWithCoverIcon as m } from "../../icons/DualPageWithCoverIcon.js";

@@ -8,13 +8,13 @@ import { ZoomLevel as e } from "../../../utils/types.js";

import { useToolComponentContext as o } from "../../../contexts/ToolComponentContext.js";
import { t as s } from "../../../clsx-B7LyVm5O.js";
import { t as s } from "../../../clsx-DSGuh5YW.js";
import { useIconToolContext as c } from "../../../contexts/IconToolContext.js";
import { ChevronUpIcon as l } from "../../icons/ChevronUpIcon.js";
import { t as u } from "../../../Button-BNlmxWrV.js";
import { t as u } from "../../../Button-DBu3SaMk.js";
import { useIconContext as d } from "../../../contexts/IconContext.js";
import { useViewportContext as f } from "../../../contexts/ViewportContext.js";
import { t as p } from "../../../RPTooltip-ZZoFqP7C.js";
import { n as m } from "../../../dist-CKteKPPA.js";
import { t as h } from "../../../MenuItem-BJDWfzAw.js";
import { t as g } from "../../../DropDown-DikL-krI.js";
import { t as _ } from "../../../MenuSeparator-D1H5l8Ej.js";
import { t as p } from "../../../RPTooltip-CXBVXusS.js";
import { n as m } from "../../../dist-VbpVNBs6.js";
import { t as h } from "../../../MenuItem-9kCH_GQ0.js";
import { t as g } from "../../../DropDown-CM6xEwZC.js";
import { t as _ } from "../../../MenuSeparator-CaFxd8b5.js";
import { ZoomInIcon as v } from "../../icons/ZoomInIcon.js";

@@ -21,0 +21,0 @@ import { ZoomOutIcon as y } from "../../icons/ZoomOutIcon.js";

"use client";
import { t as e } from "../RPDropFileZone-D1C3ouep.js";
import { t as e } from "../RPDropFileZone-Bq1bzWmO.js";
export { e as RPDropFileZone };
"use client";
import { t as e } from "../RPPages-CmXHTAqF.js";
import { t as e } from "../RPPages-DeA52_rv.js";
export { e as RPPages };

@@ -1,2 +0,2 @@

import { t as e } from "../../Button-BNlmxWrV.js";
import { t as e } from "../../Button-DBu3SaMk.js";
export { e as UIButton };

@@ -1,2 +0,2 @@

import { t as e } from "../../Checkbox-Brta-YKG.js";
import { t as e } from "../../Checkbox-CSIEUyO8.js";
export { e as UICheckbox };

@@ -1,2 +0,2 @@

import { t as e } from "../../DropDown-DikL-krI.js";
import { t as e } from "../../DropDown-CM6xEwZC.js";
export { e as UIDropDown };

@@ -1,2 +0,2 @@

import { t as e } from "../../Input-DjSWOjCI.js";
import { t as e } from "../../Input-Dpo1Xfxe.js";
export { e as UIInput };

@@ -1,2 +0,2 @@

import { t as e } from "../../LoadingIndicator-DiWoWs4Y.js";
import { t as e } from "../../LoadingIndicator-Bzzf28Xv.js";
export { e as default };

@@ -1,2 +0,2 @@

import { t as e } from "../../PasswordModal-CB9Rd2zJ.js";
import { t as e } from "../../PasswordModal-BtHVvrMg.js";
export { e as default };

@@ -1,2 +0,2 @@

import { t as e } from "../../RPTooltip-ZZoFqP7C.js";
import { t as e } from "../../RPTooltip-CXBVXusS.js";
export { e as default };
import { appConsole as e } from "../utils/appConsole.js";
import { t } from "../LoaderIcon-D9YjinGf.js";
import { t } from "../LoaderIcon-B3ddfd0D.js";
import { createContext as n, useContext as r } from "react";

@@ -4,0 +4,0 @@ import { jsx as i } from "react/jsx-runtime";

@@ -1,2 +0,2 @@

import { t as e } from "./LoaderIcon-D9YjinGf.js";
import { t as e } from "./LoaderIcon-B3ddfd0D.js";
import { ChevronUpIcon as t } from "./components/icons/ChevronUpIcon.js";

@@ -3,0 +3,0 @@ import { FileUploadDefaultIcon as n } from "./components/icons/FileUploadDefaultIcon.js";

@@ -19,8 +19,8 @@ import { Locales as e, ScrollMode as t, SelectionMode as n, ThemeVariables as r, ViewMode as i, ZoomLevel as a } from "./utils/types.js";

import { RPProvider as S } from "./components/RPProvider.js";
import { t as C } from "./RPPages-CmXHTAqF.js";
import { t as C } from "./RPPages-DeA52_rv.js";
import { useFileDownload as w } from "./utils/hooks/useFileDownload.js";
import { RPTheme as T } from "./components/RPTheme.js";
import { RPConfig as E } from "./components/RPConfig.js";
import { t as D } from "./Button-BNlmxWrV.js";
import { t as O } from "./RPTooltip-ZZoFqP7C.js";
import { t as D } from "./Button-DBu3SaMk.js";
import { t as O } from "./RPTooltip-CXBVXusS.js";
import { SearchTool as k } from "./components/layout/toolbar/SearchTool.js";

@@ -50,3 +50,3 @@ import { RPDefaultLayout as A } from "./components/layout/RPDefaultLayout.js";

import { DualPageTool as Q } from "./components/layout/toolbar/tools/DualPageTool.js";
import { n as $, r as ee, t as te } from "./main-CKr9unOk.js";
import { n as $, r as ee, t as te } from "./main-Zah9b8M8.js";
import { PageScrollingTool as ne } from "./components/layout/toolbar/tools/PageScrollingTool.js";

@@ -53,0 +53,0 @@ import { VerticalScrollingTool as re } from "./components/layout/toolbar/tools/VerticalScrollingTool.js";

@@ -80,5 +80,7 @@ declare const _default: {

"passwordError": "Falsches Passwort",
"dragDropFileMessage": "PDF-Datei hierher ziehen"
};
"dragDropFileMessage": "PDF-Datei hierher ziehen",
"ofTotalPagesLabel": "von"
}
;
export default _default;

@@ -80,5 +80,7 @@ declare const _default: {

"passwordError": "Incorrect password",
"dragDropFileMessage": "Drag and drop the PDF file here"
};
"dragDropFileMessage": "Drag and drop the PDF file here",
"ofTotalPagesLabel": "of"
}
;
export default _default;

@@ -80,5 +80,7 @@ declare const _default: {

"passwordError": "Password errata",
"dragDropFileMessage": "Trascina e rilascia il file PDF qui"
};
"dragDropFileMessage": "Trascina e rilascia il file PDF qui",
"ofTotalPagesLabel": "di"
}
;
export default _default;

@@ -80,5 +80,7 @@ declare const _default: {

"passwordError": "Senha incorreta",
"dragDropFileMessage": "Arraste e solte o arquivo PDF aqui"
};
"dragDropFileMessage": "Arraste e solte o arquivo PDF aqui",
"ofTotalPagesLabel": "de"
}
;
export default _default;

@@ -80,5 +80,7 @@ declare const _default: {

"passwordError": "รหัสผ่านไม่ถูกต้อง",
"dragDropFileMessage": "ลากและวางไฟล์ PDF ที่นี่"
};
"dragDropFileMessage": "ลากและวางไฟล์ PDF ที่นี่",
"ofTotalPagesLabel": "จาก"
}
;
export default _default;

@@ -80,5 +80,7 @@ declare const _default: {

"passwordError": "密码错误",
"dragDropFileMessage": "将PDF文件拖放到这里"
};
"dragDropFileMessage": "将PDF文件拖放到这里",
"ofTotalPagesLabel": "共"
}
;
export default _default;

@@ -92,2 +92,3 @@ import { PDFPageProxy } from 'pdfjs-dist';

nextPageTooltip?: string;
ofTotalPagesLabel?: string;
zoomOutTooltip?: string;

@@ -94,0 +95,0 @@ zoomInTooltip?: string;

@@ -6,3 +6,3 @@ import { n as e } from "../../chunk-C_CI6nMA.js";

//#region lib/utils/hooks/useLicense.ts
var o = /* @__PURE__ */ new Date("2026-05-22T11:11:37.835Z"), s = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx\ngr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b\nHLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y\nBm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W\nvXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD\nvzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR\nkwIDAQAB\n-----END PUBLIC KEY-----", c = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", l = {
var o = /* @__PURE__ */ new Date("2026-05-25T02:41:16.252Z"), s = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx\ngr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b\nHLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y\nBm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W\nvXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD\nvzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR\nkwIDAQAB\n-----END PUBLIC KEY-----", c = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", l = {
invalidLicense: `You are currently using without a valid license. ${c}`,

@@ -9,0 +9,0 @@ mismatchedDomain: `Your license key is not valid for the current domain / IP. ${c}`,

@@ -1,2 +0,2 @@

import { a as e, i as t, n, o as r, r as i, t as a } from "../../de_DE--0LF-SJR.js";
import { a as e, i as t, n, o as r, r as i, t as a } from "../../de_DE-Bym09FFW.js";
import { useCallback as o, useMemo as s, useState as c } from "react";

@@ -3,0 +3,0 @@ //#region lib/utils/hooks/useLocalization.ts

@@ -1,2 +0,2 @@

import { a as e, i as t, n, o as r, r as i, t as a } from "../de_DE--0LF-SJR.js";
import { a as e, i as t, n, o as r, r as i, t as a } from "../de_DE-Bym09FFW.js";
//#region lib/utils/types.ts

@@ -3,0 +3,0 @@ var o = /* @__PURE__ */ function(e) {

{
"name": "@react-pdf-kit/viewer",
"version": "2.8.0-beta.3",
"version": "2.8.0-beta.4",
"private": false,

@@ -5,0 +5,0 @@ "description": "A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.",

import { t as e } from "./clsx-B7LyVm5O.js";
import { withRef as t } from "./utils/withRef.js";
import { jsx as n } from "react/jsx-runtime";
import './assets/Button.css';//#region lib/components/ui/Button.module.css
var r = {
"rp-button": "_rp-button_xxds9_1",
"rp-button-active": "_rp-button-active_xxds9_20"
}, i = t((t, i) => {
let { children: a, active: o, className: s, role: c, ...l } = t;
return /* @__PURE__ */ n("button", {
tabIndex: 0,
ref: i,
role: c,
"aria-pressed": o === void 0 ? void 0 : o,
...l,
className: e(r["rp-button"], s, o ? r["rp-button-active"] : ""),
children: a
});
});
//#endregion
export { i as t };
import { d as e, f as t, i as n, l as r, n as i, t as a } from "./dist-bK-AHWLF.js";
import { t as o } from "./dist-C3WNMuW2.js";
import { CheckIcon as s } from "./components/icons/CheckIcon.js";
import * as c from "react";
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
import './assets/Checkbox.css';//#region node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
function f(e) {
let t = c.useRef({
value: e,
previous: e
});
return c.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@18.3.7_@types+react@18.3.27__@types+rea_cb5de23141bd54a8bfa4180b5db14bd0/node_modules/@radix-ui/react-checkbox/dist/index.mjs
var p = "Checkbox", [m, h] = r(p), [g, _] = m(p);
function v(e) {
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: o, form: s, name: l, onCheckedChange: d, required: f, value: m = "on", internal_do_not_use_render: h } = e, [_, v] = a({
prop: n,
defaultProp: i ?? !1,
onChange: d,
caller: p
}), [y, b] = c.useState(null), [x, S] = c.useState(null), C = c.useRef(!1), w = y ? !!s || !!y.closest("form") : !0, T = {
checked: _,
disabled: o,
setChecked: v,
control: y,
setControl: b,
name: l,
form: s,
value: m,
hasConsumerStoppedPropagationRef: C,
required: f,
defaultChecked: D(i) ? !1 : i,
isFormControl: w,
bubbleInput: x,
setBubbleInput: S
};
return /* @__PURE__ */ u(g, {
scope: t,
...T,
children: E(h) ? h(T) : r
});
}
var y = "CheckboxTrigger", b = c.forwardRef(({ __scopeCheckbox: r, onKeyDown: i, onClick: a, ...o }, s) => {
let { control: l, value: d, disabled: f, checked: p, required: m, setControl: h, setChecked: g, hasConsumerStoppedPropagationRef: v, isFormControl: b, bubbleInput: x } = _(y, r), S = e(s, h), C = c.useRef(p);
return c.useEffect(() => {
let e = l?.form;
if (e) {
let t = () => g(C.current);
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
}
}, [l, g]), /* @__PURE__ */ u(n.button, {
type: "button",
role: "checkbox",
"aria-checked": D(p) ? "mixed" : p,
"aria-required": m,
"data-state": O(p),
"data-disabled": f ? "" : void 0,
disabled: f,
value: d,
...o,
ref: S,
onKeyDown: t(i, (e) => {
e.key === "Enter" && e.preventDefault();
}),
onClick: t(a, (e) => {
g((e) => D(e) ? !0 : !e), x && b && (v.current = e.isPropagationStopped(), v.current || e.stopPropagation());
})
});
});
b.displayName = y;
var x = c.forwardRef((e, t) => {
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: f, form: p, ...m } = e;
return /* @__PURE__ */ u(v, {
__scopeCheckbox: n,
checked: i,
defaultChecked: a,
disabled: s,
required: o,
onCheckedChange: f,
name: r,
form: p,
value: c,
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(b, {
...m,
ref: t,
__scopeCheckbox: n
}), e && /* @__PURE__ */ u(T, { __scopeCheckbox: n })] })
});
});
x.displayName = p;
var S = "CheckboxIndicator", C = c.forwardRef((e, t) => {
let { __scopeCheckbox: r, forceMount: a, ...o } = e, s = _(S, r);
return /* @__PURE__ */ u(i, {
present: a || D(s.checked) || s.checked === !0,
children: /* @__PURE__ */ u(n.span, {
"data-state": O(s.checked),
"data-disabled": s.disabled ? "" : void 0,
...o,
ref: t,
style: {
pointerEvents: "none",
...e.style
}
})
});
});
C.displayName = S;
var w = "CheckboxBubbleInput", T = c.forwardRef(({ __scopeCheckbox: t, ...r }, i) => {
let { control: a, hasConsumerStoppedPropagationRef: s, checked: l, defaultChecked: d, required: p, disabled: m, name: h, value: g, form: v, bubbleInput: y, setBubbleInput: b } = _(w, t), x = e(i, b), S = f(l), C = o(a);
c.useEffect(() => {
let e = y;
if (!e) return;
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !s.current;
if (S !== l && n) {
let t = new Event("click", { bubbles: r });
e.indeterminate = D(l), n.call(e, D(l) ? !1 : l), e.dispatchEvent(t);
}
}, [
y,
S,
l,
s
]);
let T = c.useRef(D(l) ? !1 : l);
return /* @__PURE__ */ u(n.input, {
type: "checkbox",
"aria-hidden": !0,
defaultChecked: d ?? T.current,
required: p,
disabled: m,
name: h,
value: g,
form: v,
...r,
tabIndex: -1,
ref: x,
style: {
...r.style,
...C,
position: "absolute",
pointerEvents: "none",
opacity: 0,
margin: 0,
transform: "translateX(-100%)"
}
});
});
T.displayName = w;
function E(e) {
return typeof e == "function";
}
function D(e) {
return e === "indeterminate";
}
function O(e) {
return D(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
//#endregion
//#region lib/components/ui/Checkbox.module.css
var k = {
"rp-checkbox": "_rp-checkbox_1vwg8_1",
"rp-checkbox-indicator": "_rp-checkbox-indicator_1vwg8_25"
}, A = ({ children: e, value: t, name: n, onChange: r, tabIndex: i, "aria-label": a }) => {
let o = a ? { "aria-label": a } : {};
return /* @__PURE__ */ d("div", {
style: {
display: "flex",
alignItems: "center",
position: "relative"
},
children: [/* @__PURE__ */ u(x, {
tabIndex: i,
className: k["rp-checkbox"],
checked: t,
id: n,
onCheckedChange: r,
role: "checkbox",
"aria-checked": t,
...o,
children: /* @__PURE__ */ u(C, {
className: k["rp-checkbox-indicator"],
"aria-hidden": "true",
children: /* @__PURE__ */ u(s, {})
})
}), /* @__PURE__ */ u("label", {
className: k["rp-checkbox-label"],
htmlFor: n,
children: e
})]
});
};
//#endregion
export { A as t };
//#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
function e(t) {
var n, r, i = "";
if (typeof t == "string" || typeof t == "number") i += t;
else if (typeof t == "object") if (Array.isArray(t)) {
var a = t.length;
for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
} else for (r in t) t[r] && (i && (i += " "), i += r);
return i;
}
function t() {
for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
return i;
}
//#endregion
export { t };
import { d as e, i as t } from "./dist-bK-AHWLF.js";
import { i as n } from "./dist-BRVqFn7R.js";
import * as r from "react";
import { useState as i } from "react";
import { jsx as a } from "react/jsx-runtime";
//#region node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
var o = 0;
function s() {
r.useEffect(() => {
let e = document.querySelectorAll("[data-radix-focus-guard]");
return document.body.insertAdjacentElement("afterbegin", e[0] ?? c()), document.body.insertAdjacentElement("beforeend", e[1] ?? c()), o++, () => {
o === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((e) => e.remove()), o--;
};
}, []);
}
function c() {
let e = document.createElement("span");
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@18.3.7_@types+react@18.3.27__@types+_c9bbb58fdda48c8c67e5a2aa62d74a2f/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
var l = "focusScope.autoFocusOnMount", u = "focusScope.autoFocusOnUnmount", d = {
bubbles: !1,
cancelable: !0
}, f = "FocusScope", p = r.forwardRef((i, o) => {
let { loop: s = !1, trapped: c = !1, onMountAutoFocus: f, onUnmountAutoFocus: p, ..._ } = i, [v, y] = r.useState(null), S = n(f), C = n(p), T = r.useRef(null), E = e(o, (e) => y(e)), D = r.useRef({
paused: !1,
pause() {
this.paused = !0;
},
resume() {
this.paused = !1;
}
}).current;
r.useEffect(() => {
if (c) {
let e = function(e) {
if (D.paused || !v) return;
let t = e.target;
v.contains(t) ? T.current = t : b(T.current, { select: !0 });
}, t = function(e) {
if (D.paused || !v) return;
let t = e.relatedTarget;
t !== null && (v.contains(t) || b(T.current, { select: !0 }));
}, n = function(e) {
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && b(v);
};
document.addEventListener("focusin", e), document.addEventListener("focusout", t);
let r = new MutationObserver(n);
return v && r.observe(v, {
childList: !0,
subtree: !0
}), () => {
document.removeEventListener("focusin", e), document.removeEventListener("focusout", t), r.disconnect();
};
}
}, [
c,
v,
D.paused
]), r.useEffect(() => {
if (v) {
x.add(D);
let e = document.activeElement;
if (!v.contains(e)) {
let t = new CustomEvent(l, d);
v.addEventListener(l, S), v.dispatchEvent(t), t.defaultPrevented || (m(w(g(v)), { select: !0 }), document.activeElement === e && b(v));
}
return () => {
v.removeEventListener(l, S), setTimeout(() => {
let t = new CustomEvent(u, d);
v.addEventListener(u, C), v.dispatchEvent(t), t.defaultPrevented || b(e ?? document.body, { select: !0 }), v.removeEventListener(u, C), x.remove(D);
}, 0);
};
}
}, [
v,
S,
C,
D
]);
let O = r.useCallback((e) => {
if (!s && !c || D.paused) return;
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, n = document.activeElement;
if (t && n) {
let t = e.currentTarget, [r, i] = h(t);
r && i ? !e.shiftKey && n === i ? (e.preventDefault(), s && b(r, { select: !0 })) : e.shiftKey && n === r && (e.preventDefault(), s && b(i, { select: !0 })) : n === t && e.preventDefault();
}
}, [
s,
c,
D.paused
]);
return /* @__PURE__ */ a(t.div, {
tabIndex: -1,
..._,
ref: E,
onKeyDown: O
});
});
p.displayName = f;
function m(e, { select: t = !1 } = {}) {
let n = document.activeElement;
for (let r of e) if (b(r, { select: t }), document.activeElement !== n) return;
}
function h(e) {
let t = g(e);
return [_(t, e), _(t.reverse(), e)];
}
function g(e) {
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
let t = e.tagName === "INPUT" && e.type === "hidden";
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
} });
for (; n.nextNode();) t.push(n.currentNode);
return t;
}
function _(e, t) {
for (let n of e) if (!v(n, { upTo: t })) return n;
}
function v(e, { upTo: t }) {
if (getComputedStyle(e).visibility === "hidden") return !0;
for (; e;) {
if (t !== void 0 && e === t) return !1;
if (getComputedStyle(e).display === "none") return !0;
e = e.parentElement;
}
return !1;
}
function y(e) {
return e instanceof HTMLInputElement && "select" in e;
}
function b(e, { select: t = !1 } = {}) {
if (e && e.focus) {
let n = document.activeElement;
e.focus({ preventScroll: !0 }), e !== n && y(e) && t && e.select();
}
}
var x = S();
function S() {
let e = [];
return {
add(t) {
let n = e[0];
t !== n && n?.pause(), e = C(e, t), e.unshift(t);
},
remove(t) {
e = C(e, t), e[0]?.resume();
}
};
}
function C(e, t) {
let n = [...e], r = n.indexOf(t);
return r !== -1 && n.splice(r, 1), n;
}
function w(e) {
return e.filter((e) => e.tagName !== "A");
}
//#endregion
//#region node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
var T = function(e) {
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
}, E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = {}, k = 0, A = function(e) {
return e && (e.host || A(e.parentNode));
}, ee = function(e, t) {
return t.map(function(t) {
if (e.contains(t)) return t;
var n = A(t);
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
}).filter(function(e) {
return !!e;
});
}, te = function(e, t, n, r) {
var i = ee(t, Array.isArray(e) ? e : [e]);
O[n] || (O[n] = /* @__PURE__ */ new WeakMap());
var a = O[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
!e || s.has(e) || (s.add(e), l(e.parentNode));
};
i.forEach(l);
var u = function(e) {
!e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
if (s.has(e)) u(e);
else try {
var t = e.getAttribute(r), i = t !== null && t !== "false", c = (E.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
E.set(e, c), a.set(e, l), o.push(e), c === 1 && i && D.set(e, !0), l === 1 && e.setAttribute(n, "true"), i || e.setAttribute(r, "true");
} catch (t) {
console.error("aria-hidden: cannot operate on ", e, t);
}
});
};
return u(t), s.clear(), k++, function() {
o.forEach(function(e) {
var t = E.get(e) - 1, i = a.get(e) - 1;
E.set(e, t), a.set(e, i), t || (D.has(e) || e.removeAttribute(r), D.delete(e)), i || e.removeAttribute(n);
}), k--, k || (E = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = {});
};
}, ne = function(e, t, n) {
n === void 0 && (n = "data-aria-hidden");
var r = Array.from(Array.isArray(e) ? e : [e]), i = t || T(e);
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), te(r, i, n, "aria-hidden")) : function() {
return null;
};
}, j = function() {
return j = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e;
}, j.apply(this, arguments);
};
function M(e, t) {
var n = {};
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
return n;
}
function re(e, t, n) {
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
return e.concat(a || Array.prototype.slice.call(t));
}
//#endregion
//#region node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.27_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
var N = "right-scroll-bar-position", P = "width-before-scroll-bar", ie = "with-scroll-bars-hidden", ae = "--removed-body-scroll-bar-size";
//#endregion
//#region node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.27_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.js
function F(e, t) {
return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
//#endregion
//#region node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.27_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.js
function oe(e, t) {
var n = i(function() {
return {
value: e,
callback: t,
facade: {
get current() {
return n.value;
},
set current(e) {
var t = n.value;
t !== e && (n.value = e, n.callback(e, t));
}
}
};
})[0];
return n.callback = t, n.facade;
}
//#endregion
//#region node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.27_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
var se = typeof window < "u" ? r.useLayoutEffect : r.useEffect, ce = /* @__PURE__ */ new WeakMap();
function le(e, t) {
var n = oe(t || null, function(t) {
return e.forEach(function(e) {
return F(e, t);
});
});
return se(function() {
var t = ce.get(n);
if (t) {
var r = new Set(t), i = new Set(e), a = n.current;
r.forEach(function(e) {
i.has(e) || F(e, null);
}), i.forEach(function(e) {
r.has(e) || F(e, a);
});
}
ce.set(n, e);
}, [e]), n;
}
//#endregion
//#region node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.27_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.js
function ue(e) {
return e;
}
function de(e, t) {
t === void 0 && (t = ue);
var n = [], r = !1;
return {
read: function() {
if (r) throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
return n.length ? n[n.length - 1] : e;
},
useMedium: function(e) {
var i = t(e, r);
return n.push(i), function() {
n = n.filter(function(e) {
return e !== i;
});
};
},
assignSyncMedium: function(e) {
for (r = !0; n.length;) {
var t = n;
n = [], t.forEach(e);
}
n = {
push: function(t) {
return e(t);
},
filter: function() {
return n;
}
};
},
assignMedium: function(e) {
r = !0;
var t = [];
if (n.length) {
var i = n;
n = [], i.forEach(e), t = n;
}
var a = function() {
var n = t;
t = [], n.forEach(e);
}, o = function() {
return Promise.resolve().then(a);
};
o(), n = {
push: function(e) {
t.push(e), o();
},
filter: function(e) {
return t = t.filter(e), n;
}
};
}
};
}
function fe(e) {
e === void 0 && (e = {});
var t = de(null);
return t.options = j({
async: !0,
ssr: !1
}, e), t;
}
//#endregion
//#region node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.27_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.js
var I = function(e) {
var t = e.sideCar, n = M(e, ["sideCar"]);
if (!t) throw Error("Sidecar: please provide `sideCar` property to import the right car");
var i = t.read();
if (!i) throw Error("Sidecar medium not found");
return r.createElement(i, j({}, n));
};
I.isSideCarExport = !0;
function pe(e, t) {
return e.useMedium(t), I;
}
//#endregion
//#region node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js
var L = fe(), R = function() {}, z = r.forwardRef(function(e, t) {
var n = r.useRef(null), i = r.useState({
onScrollCapture: R,
onWheelCapture: R,
onTouchMoveCapture: R
}), a = i[0], o = i[1], s = e.forwardProps, c = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, p = e.sideCar, m = e.noRelative, h = e.noIsolation, g = e.inert, _ = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, b = e.gapMode, x = M(e, [
"forwardProps",
"children",
"className",
"removeScrollBar",
"enabled",
"shards",
"sideCar",
"noRelative",
"noIsolation",
"inert",
"allowPinchZoom",
"as",
"gapMode"
]), S = p, C = le([n, t]), w = j(j({}, x), a);
return r.createElement(r.Fragment, null, d && r.createElement(S, {
sideCar: L,
removeScrollBar: u,
shards: f,
noRelative: m,
noIsolation: h,
inert: g,
setCallbacks: o,
allowPinchZoom: !!_,
lockRef: n,
gapMode: b
}), s ? r.cloneElement(r.Children.only(c), j(j({}, w), { ref: C })) : r.createElement(y, j({}, w, {
className: l,
ref: C
}), c));
});
z.defaultProps = {
enabled: !0,
removeScrollBar: !0,
inert: !1
}, z.classNames = {
fullWidth: P,
zeroRight: N
};
//#endregion
//#region node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
var B, me = function() {
if (B) return B;
if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
};
//#endregion
//#region node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.27_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.js
function he() {
if (!document) return null;
var e = document.createElement("style");
e.type = "text/css";
var t = me();
return t && e.setAttribute("nonce", t), e;
}
function ge(e, t) {
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function _e(e) {
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
}
var ve = function() {
var e = 0, t = null;
return {
add: function(n) {
e == 0 && (t = he()) && (ge(t, n), _e(t)), e++;
},
remove: function() {
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
}
};
}, ye = function() {
var e = ve();
return function(t, n) {
r.useEffect(function() {
return e.add(t), function() {
e.remove();
};
}, [t && n]);
};
}, V = function() {
var e = ye();
return function(t) {
var n = t.styles, r = t.dynamic;
return e(n, r), null;
};
}, be = {
left: 0,
top: 0,
right: 0,
gap: 0
}, H = function(e) {
return parseInt(e || "", 10) || 0;
}, xe = function(e) {
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], i = t[e === "padding" ? "paddingRight" : "marginRight"];
return [
H(n),
H(r),
H(i)
];
}, Se = function(e) {
if (e === void 0 && (e = "margin"), typeof window > "u") return be;
var t = xe(e), n = document.documentElement.clientWidth, r = window.innerWidth;
return {
left: t[0],
top: t[1],
right: t[2],
gap: Math.max(0, r - n + t[2] - t[0])
};
}, Ce = V(), U = "data-scroll-locked", we = function(e, t, n, r) {
var i = e.left, a = e.top, o = e.right, s = e.gap;
return n === void 0 && (n = "margin"), `
.${ie} {
overflow: hidden ${r};
padding-right: ${s}px ${r};
}
body[${U}] {
overflow: hidden ${r};
overscroll-behavior: contain;
${[
t && `position: relative ${r};`,
n === "margin" && `
padding-left: ${i}px;
padding-top: ${a}px;
padding-right: ${o}px;
margin-left:0;
margin-top:0;
margin-right: ${s}px ${r};
`,
n === "padding" && `padding-right: ${s}px ${r};`
].filter(Boolean).join("")}
}
.${N} {
right: ${s}px ${r};
}
.${P} {
margin-right: ${s}px ${r};
}
.${N} .${N} {
right: 0 ${r};
}
.${P} .${P} {
margin-right: 0 ${r};
}
body[${U}] {
${ae}: ${s}px;
}
`;
}, W = function() {
var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
return isFinite(e) ? e : 0;
}, Te = function() {
r.useEffect(function() {
return document.body.setAttribute(U, (W() + 1).toString()), function() {
var e = W() - 1;
e <= 0 ? document.body.removeAttribute(U) : document.body.setAttribute(U, e.toString());
};
}, []);
}, Ee = function(e) {
var t = e.noRelative, n = e.noImportant, i = e.gapMode, a = i === void 0 ? "margin" : i;
Te();
var o = r.useMemo(function() {
return Se(a);
}, [a]);
return r.createElement(Ce, { styles: we(o, !t, a, n ? "" : "!important") });
}, G = !1;
if (typeof window < "u") try {
var K = Object.defineProperty({}, "passive", { get: function() {
return G = !0, !0;
} });
window.addEventListener("test", K, K), window.removeEventListener("test", K, K);
} catch {
G = !1;
}
var q = G ? { passive: !1 } : !1, De = function(e) {
return e.tagName === "TEXTAREA";
}, J = function(e, t) {
if (!(e instanceof Element)) return !1;
var n = window.getComputedStyle(e);
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !De(e) && n[t] === "visible");
}, Oe = function(e) {
return J(e, "overflowY");
}, ke = function(e) {
return J(e, "overflowX");
}, Y = function(e, t) {
var n = t.ownerDocument, r = t;
do {
if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host), X(e, r)) {
var i = Z(e, r);
if (i[1] > i[2]) return !0;
}
r = r.parentNode;
} while (r && r !== n.body);
return !1;
}, Ae = function(e) {
return [
e.scrollTop,
e.scrollHeight,
e.clientHeight
];
}, je = function(e) {
return [
e.scrollLeft,
e.scrollWidth,
e.clientWidth
];
}, X = function(e, t) {
return e === "v" ? Oe(t) : ke(t);
}, Z = function(e, t) {
return e === "v" ? Ae(t) : je(t);
}, Me = function(e, t) {
return e === "h" && t === "rtl" ? -1 : 1;
}, Ne = function(e, t, n, r, i) {
var a = Me(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
do {
if (!s) break;
var p = Z(e, s), m = p[0], h = p[1] - p[2] - a * m;
(m || h) && X(e, s) && (d += h, f += m);
var g = s.parentNode;
s = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
} while (!c && s !== document.body || c && (t.contains(s) || t === s));
return (u && (i && Math.abs(d) < 1 || !i && o > d) || !u && (i && Math.abs(f) < 1 || !i && -o > f)) && (l = !0), l;
}, Q = function(e) {
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Pe = function(e) {
return [e.deltaX, e.deltaY];
}, Fe = function(e) {
return e && "current" in e ? e.current : e;
}, Ie = function(e, t) {
return e[0] === t[0] && e[1] === t[1];
}, Le = function(e) {
return `
.block-interactivity-${e} {pointer-events: none;}
.allow-interactivity-${e} {pointer-events: all;}
`;
}, Re = 0, $ = [];
function ze(e) {
var t = r.useRef([]), n = r.useRef([0, 0]), i = r.useRef(), a = r.useState(Re++)[0], o = r.useState(V)[0], s = r.useRef(e);
r.useEffect(function() {
s.current = e;
}, [e]), r.useEffect(function() {
if (e.inert) {
document.body.classList.add(`block-interactivity-${a}`);
var t = re([e.lockRef.current], (e.shards || []).map(Fe), !0).filter(Boolean);
return t.forEach(function(e) {
return e.classList.add(`allow-interactivity-${a}`);
}), function() {
document.body.classList.remove(`block-interactivity-${a}`), t.forEach(function(e) {
return e.classList.remove(`allow-interactivity-${a}`);
});
};
}
}, [
e.inert,
e.lockRef.current,
e.shards
]);
var c = r.useCallback(function(e, t) {
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey) return !s.current.allowPinchZoom;
var r = Q(e), a = n.current, o = "deltaX" in e ? e.deltaX : a[0] - r[0], c = "deltaY" in e ? e.deltaY : a[1] - r[1], l, u = e.target, d = Math.abs(o) > Math.abs(c) ? "h" : "v";
if ("touches" in e && d === "h" && u.type === "range") return !1;
var f = Y(d, u);
if (!f) return !0;
if (f ? l = d : (l = d === "v" ? "h" : "v", f = Y(d, u)), !f) return !1;
if (!i.current && "changedTouches" in e && (o || c) && (i.current = l), !l) return !0;
var p = i.current || l;
return Ne(p, t, e, p === "h" ? o : c, !0);
}, []), l = r.useCallback(function(e) {
var n = e;
if (!(!$.length || $[$.length - 1] !== o)) {
var r = "deltaY" in n ? Pe(n) : Q(n), i = t.current.filter(function(e) {
return e.name === n.type && (e.target === n.target || n.target === e.shadowParent) && Ie(e.delta, r);
})[0];
if (i && i.should) {
n.cancelable && n.preventDefault();
return;
}
if (!i) {
var a = (s.current.shards || []).map(Fe).filter(Boolean).filter(function(e) {
return e.contains(n.target);
});
(a.length > 0 ? c(n, a[0]) : !s.current.noIsolation) && n.cancelable && n.preventDefault();
}
}
}, []), u = r.useCallback(function(e, n, r, i) {
var a = {
name: e,
delta: n,
target: r,
should: i,
shadowParent: Be(r)
};
t.current.push(a), setTimeout(function() {
t.current = t.current.filter(function(e) {
return e !== a;
});
}, 1);
}, []), d = r.useCallback(function(e) {
n.current = Q(e), i.current = void 0;
}, []), f = r.useCallback(function(t) {
u(t.type, Pe(t), t.target, c(t, e.lockRef.current));
}, []), p = r.useCallback(function(t) {
u(t.type, Q(t), t.target, c(t, e.lockRef.current));
}, []);
r.useEffect(function() {
return $.push(o), e.setCallbacks({
onScrollCapture: f,
onWheelCapture: f,
onTouchMoveCapture: p
}), document.addEventListener("wheel", l, q), document.addEventListener("touchmove", l, q), document.addEventListener("touchstart", d, q), function() {
$ = $.filter(function(e) {
return e !== o;
}), document.removeEventListener("wheel", l, q), document.removeEventListener("touchmove", l, q), document.removeEventListener("touchstart", d, q);
};
}, []);
var m = e.removeScrollBar, h = e.inert;
return r.createElement(r.Fragment, null, h ? r.createElement(o, { styles: Le(a) }) : null, m ? r.createElement(Ee, {
noRelative: e.noRelative,
gapMode: e.gapMode
}) : null);
}
function Be(e) {
for (var t = null; e !== null;) e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
return t;
}
//#endregion
//#region node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
var Ve = pe(L, ze), He = r.forwardRef(function(e, t) {
return r.createElement(z, j({}, e, {
ref: t,
sideCar: Ve
}));
});
He.classNames = z.classNames;
//#endregion
export { s as i, ne as n, p as r, He as t };
import { useLocalizationContext as e } from "./contexts/LocalizationContext.js";
import { t } from "./clsx-B7LyVm5O.js";
import { jsx as n } from "react/jsx-runtime";
import './assets/Container.css';//#region lib/components/layout/Container.module.css
var r = { "rp-container": "_rp-container_f63gc_1" }, i = (e) => e.replace(/_/g, "-"), a = (a) => {
let { children: o, getContainerRef: s, style: c, className: l } = a, { locale: u } = e();
return /* @__PURE__ */ n("div", {
tabIndex: 0,
ref: s,
"data-rp": "container",
lang: u ? i(u) : void 0,
className: t(r["rp-container"], l),
style: c,
children: o
});
};
//#endregion
export { a as t };
var e = {
searchButtonTooltip: "Search in Document",
searchInputPlaceholder: "Enter to search",
searchInputTooltip: "Search",
searchPrevTooltip: "Previous match",
searchNextTooltip: "Next match",
searchCloseButtonTooltip: "Close",
searchMatchCaseLabel: "Match Case",
searchMatchCaseTooltip: "Search case sensitive text",
searchWholeWordsLabel: "Whole Words",
searchWholeWordsTooltip: "Search exact and case insensitive word(s)",
previousPageTooltip: "Previous page",
currentPageTooltip: "Current page",
nextPageTooltip: "Next page",
zoomOutTooltip: "Zoom out",
zoomInTooltip: "Zoom in",
zoomSelectTooltip: "Select zoom level",
zoomActualSize: "Actual Size",
zoomPageFit: "Page Fit",
zoomPageWidth: "Page Width",
themeEnableDarkTooltip: "Enable dark theme",
themeEnableLightTooltip: "Enable light theme",
openLocalFileLabel: "Open local file",
openLocalFileTooltip: "Open local file",
downloadFileLabel: "Download file",
downloadFileTooltip: "Download file",
printLabel: "Print",
printTooltip: "Print",
printLoadingMessage: "Preparing Document",
printCancelLabel: "Cancel",
fullScreenLabel: "Full screen",
fullScreenTooltip: "Full screen",
moreOptionTooltip: "More options",
firstPageLabel: "First page",
firstPageTooltip: "Go to first page",
lastPageLabel: "Last page",
lastPageTooltip: "Go to last page",
rotateClockwiseLabel: "Rotate clockwise",
rotateClockwiseTooltip: "Rotate clockwise",
rotateCounterclockwiseLabel: "Rotate counterclockwise",
rotateCounterclockwiseTooltip: "Rotate counterclockwise",
textSelectionLabel: "Text selection tool",
textSelectionTooltip: "Enable text selection tool",
handToolLabel: "Hand tool",
handToolTooltip: "Enable hand tool",
documentPropertiesLabel: "Document properties",
documentPropertiesTooltip: "View document properties",
pageScrollingLabel: "Page scrolling",
pageScrollingTooltip: "Enable page scrolling",
verticalScrollingLabel: "Vertical scrolling",
verticalScrollingTooltip: "Enable vertical scrolling",
horizontalLabel: "Horizontal scrolling",
horizontalTooltip: "Enable horizontal scrolling",
wrappedScrollingLabel: "Wrapped scrolling",
wrappedScrollingTooltip: "Enable wrapped scrolling",
singlePageLabel: "Single page",
singlePageTooltip: "Enable single page view",
dualPageLabel: "Dual page",
dualPageTooltip: "Enable dual page view",
dualPageWithCoverLabel: "Dual page with cover",
dualPageWithCoverTooltip: "Enable dual page view with cover",
propertiesFilenameLabel: "File name",
propertiesFileSizeLabel: "File size",
propertiesTitleLabel: "Title",
propertiesAuthorLabel: "Author",
propertiesSubjectLabel: "Subject",
propertiesKeywordLabel: "Keywords",
propertiesCreatorLabel: "Creator",
propertiesCreateOnLabel: "Created on",
propertiesModifiedOnLabel: "Modified on",
propertiesPDFProducerLabel: "PDF producer",
propertiesPDFVersionLabel: "PDF version",
propertiesPageCountLabel: "Page count",
thumbnailTooltip: "Thumbnail",
passwordModalTitle: "Password Required",
passwordModalMessage: "This document is password protected. Please enter a password to open the file.",
passwordPlaceholder: "Enter password",
passwordConfirmLabel: "Submit",
passwordError: "Incorrect password",
dragDropFileMessage: "Drag and drop the PDF file here"
}, t = {
searchButtonTooltip: "搜索文件",
searchInputPlaceholder: "输入搜索词",
searchInputTooltip: "搜索",
searchPrevTooltip: "上一条",
searchNextTooltip: "下一条",
searchCloseButtonTooltip: "关闭",
searchMatchCaseLabel: "区分大小写",
searchMatchCaseTooltip: "搜索区分大小写",
searchWholeWordsLabel: "全字匹配",
searchWholeWordsTooltip: "搜索完全匹配",
previousPageTooltip: "上一页",
currentPageTooltip: "当前页",
nextPageTooltip: "下一页",
zoomOutTooltip: "缩小",
zoomInTooltip: "放大",
zoomSelectTooltip: "选择缩放级别",
zoomActualSize: "实际大小",
zoomPageFit: "适合页面",
zoomPageWidth: "页面宽度",
themeEnableDarkTooltip: "切换到深色模式",
themeEnableLightTooltip: "切换到浅色模式",
openLocalFileLabel: "打开文件",
openLocalFileTooltip: "打开文件",
downloadFileLabel: "下载文件",
downloadFileTooltip: "下载文件",
printLabel: "打印",
printTooltip: "打印",
printLoadingMessage: "准备文件",
printCancelLabel: "取消",
fullScreenLabel: "全屏",
fullScreenTooltip: "全屏",
moreOptionTooltip: "更多选项",
firstPageLabel: "第一页",
firstPageTooltip: "跳转到第一页",
lastPageLabel: "最后一页",
lastPageTooltip: "跳转到最后一页",
rotateClockwiseLabel: "顺时针旋转",
rotateClockwiseTooltip: "顺时针旋转",
rotateCounterclockwiseLabel: "逆时针旋转",
rotateCounterclockwiseTooltip: "逆时针旋转",
textSelectionLabel: "文本选择工具",
textSelectionTooltip: "启用文本选择工具",
handToolLabel: "手型工具",
handToolTooltip: "启用手型工具",
documentPropertiesLabel: "文件属性",
documentPropertiesTooltip: "查看文件属性",
pageScrollingLabel: "页面滚动",
pageScrollingTooltip: "启用页面滚动",
verticalScrollingLabel: "垂直滚动",
verticalScrollingTooltip: "启用垂直滚动",
horizontalLabel: "水平滚动",
horizontalTooltip: "启用水平滚动",
wrappedScrollingLabel: "环绕滚动",
wrappedScrollingTooltip: "启用环绕滚动",
singlePageLabel: "单页面视图",
singlePageTooltip: "启用单页视图",
dualPageLabel: "双页面视图",
dualPageTooltip: "启用双页视图",
dualPageWithCoverLabel: "封面双页面视图",
dualPageWithCoverTooltip: "启用封面双页视图",
propertiesFilenameLabel: "文件名称",
propertiesFileSizeLabel: "文件大小",
propertiesTitleLabel: "标题",
propertiesAuthorLabel: "作者",
propertiesSubjectLabel: "主题",
propertiesKeywordLabel: "关键字",
propertiesCreatorLabel: "创建者",
propertiesCreateOnLabel: "创建于",
propertiesModifiedOnLabel: "修改于",
propertiesPDFProducerLabel: "PDF 制作程序 ",
propertiesPDFVersionLabel: "PDF版本",
propertiesPageCountLabel: "页数",
thumbnailTooltip: "缩略图",
passwordModalTitle: "需要密码",
passwordModalMessage: "此文件受密码保护。请输入密码以打开文件。",
passwordPlaceholder: "输入密码",
passwordConfirmLabel: "提交",
passwordError: "密码错误",
dragDropFileMessage: "将PDF文件拖放到这里"
}, n = {
searchButtonTooltip: "Cerca nel documento",
searchInputPlaceholder: "Premi Invio per cercare",
searchInputTooltip: "Cerca",
searchPrevTooltip: "Corrispondenza precedente",
searchNextTooltip: "Corrispondenza successiva",
searchCloseButtonTooltip: "Chiudi",
searchMatchCaseLabel: "Maiuscole/minuscole",
searchMatchCaseTooltip: "Cerca testo con distinzione maiuscole/minuscole",
searchWholeWordsLabel: "Parola intera",
searchWholeWordsTooltip: "Cerca esatte parole senza distinzione maiuscole/minuscole",
previousPageTooltip: "Pagina precedente",
currentPageTooltip: "Pagina corrente",
nextPageTooltip: "Pagina successiva",
zoomOutTooltip: "Ridurre",
zoomInTooltip: "Ingrandire",
zoomSelectTooltip: "Seleziona un livello di zoom",
zoomActualSize: "Dimensioni effettive",
zoomPageFit: "Adatta pagina",
zoomPageWidth: "Larghezza pagina",
themeEnableDarkTooltip: "Abilita tema scuro",
themeEnableLightTooltip: "Abilita tema chiaro",
openLocalFileLabel: "Aprire file",
openLocalFileTooltip: "Aprire file",
downloadFileLabel: "Scaricare file",
downloadFileTooltip: "Scaricare file",
printLabel: "Stampa",
printTooltip: "Stampa",
printLoadingMessage: "Preparazione del documento",
printCancelLabel: "Annulla",
fullScreenLabel: "Schermo intero",
fullScreenTooltip: "Schermo intero",
moreOptionTooltip: "Altre opzioni",
firstPageLabel: "Prima pagina",
firstPageTooltip: "Vai alla prima pagina",
lastPageLabel: "Ultima pagina",
lastPageTooltip: "Vai all’ultima pagina",
rotateClockwiseLabel: "Ruota in senso orario",
rotateClockwiseTooltip: "Ruota in senso orario",
rotateCounterclockwiseLabel: "Ruota in senso antiorario",
rotateCounterclockwiseTooltip: "Ruota in senso antiorario",
textSelectionLabel: "Strumento di selezione testo",
textSelectionTooltip: "Abilita strumento di selezione testo",
handToolLabel: "Strumento mano",
handToolTooltip: "Abilita strumento mano",
documentPropertiesLabel: "Proprietà documento",
documentPropertiesTooltip: "Visualizza proprietà documento",
pageScrollingLabel: "Scorrimento pagina",
pageScrollingTooltip: "Abilita lo scorrimento delle pagine",
verticalScrollingLabel: "Scorrimento verticale",
verticalScrollingTooltip: "Abilita lo scorrimento verticale",
horizontalLabel: "Scorrimento orizzontale",
horizontalTooltip: "Abilita lo scorrimento orizzontale",
wrappedScrollingLabel: "Scorrimento avvolto",
wrappedScrollingTooltip: "Abilita lo scorrimento avvolto",
singlePageLabel: "Singolo",
singlePageTooltip: "Visualizzazione singola",
dualPageLabel: "Doppio",
dualPageTooltip: "Visualizzazione doppio",
dualPageWithCoverLabel: "Doppio con copertina",
dualPageWithCoverTooltip: "Visualizzazione doppio con copertina",
propertiesFilenameLabel: "Nome file",
propertiesFileSizeLabel: "Dimensione file",
propertiesTitleLabel: "Titolo",
propertiesAuthorLabel: "Autore",
propertiesSubjectLabel: "Oggetto",
propertiesKeywordLabel: "Parole chiave",
propertiesCreatorLabel: "Creatore",
propertiesCreateOnLabel: "Creato il",
propertiesModifiedOnLabel: "Modificato il",
propertiesPDFProducerLabel: "Produttore PDF",
propertiesPDFVersionLabel: "Versione PDF",
propertiesPageCountLabel: "Numero di pagine",
thumbnailTooltip: "Miniature",
passwordModalTitle: "Password richiesta",
passwordModalMessage: "Questo documento è protetto da password. Si prega di inserire una password per aprire il file.",
passwordPlaceholder: "Inserisci la password",
passwordConfirmLabel: "Invia",
passwordError: "Password errata",
dragDropFileMessage: "Trascina e rilascia il file PDF qui"
}, r = {
searchButtonTooltip: "Pesquisar no documento",
searchInputPlaceholder: "Pressione Enter para pesquisar",
searchInputTooltip: "Pesquisar",
searchPrevTooltip: "Correspondência anterior",
searchNextTooltip: "Correspondência seguinte",
searchCloseButtonTooltip: "Fechar",
searchMatchCaseLabel: "Diferenciar maiúsculas/minúsculas",
searchMatchCaseTooltip: "Pesquisar texto com distinção de maiúsculas/minúsculas",
searchWholeWordsLabel: "Palavra inteira",
searchWholeWordsTooltip: "Pesquisar palavras exatas sem distinção de maiúsculas/minúsculas",
previousPageTooltip: "Página anterior",
currentPageTooltip: "Página atual",
nextPageTooltip: "Próxima página",
zoomOutTooltip: "Reduzir",
zoomInTooltip: "Ampliar",
zoomSelectTooltip: "Selecionar nível de zoom",
zoomActualSize: "Tamanho real",
zoomPageFit: "Ajustar à página",
zoomPageWidth: "Largura da página",
themeEnableDarkTooltip: "Ativar tema escuro",
themeEnableLightTooltip: "Ativar tema claro",
openLocalFileLabel: "Abrir arquivo",
openLocalFileTooltip: "Abrir arquivo",
downloadFileLabel: "Baixar arquivo",
downloadFileTooltip: "Baixar arquivo",
printLabel: "Imprimir",
printTooltip: "Imprimir",
printLoadingMessage: "Preparando documento",
printCancelLabel: "Cancelar",
fullScreenLabel: "Tela inteira",
fullScreenTooltip: "Tela inteira",
moreOptionTooltip: "Mais opções",
firstPageLabel: "Primeira página",
firstPageTooltip: "Ir para a primeira página",
lastPageLabel: "Última página",
lastPageTooltip: "Ir para a última página",
rotateClockwiseLabel: "Girar no sentido horário",
rotateClockwiseTooltip: "Girar no sentido horário",
rotateCounterclockwiseLabel: "Girar no sentido anti-horário",
rotateCounterclockwiseTooltip: "Girar no sentido anti-horário",
textSelectionLabel: "Ferramenta de seleção de texto",
textSelectionTooltip: "Ativar ferramenta de seleção de texto",
handToolLabel: "Ferramenta de mão",
handToolTooltip: "Ativar ferramenta de mão",
documentPropertiesLabel: "Propriedades do documento",
documentPropertiesTooltip: "Ver propriedades do documento",
pageScrollingLabel: "Rolagem página",
pageScrollingTooltip: "Ativar rolagem de página",
verticalScrollingLabel: "Rolagem vertical",
verticalScrollingTooltip: "Ativar rolagem vertical",
horizontalLabel: "Rolagem horizontal",
horizontalTooltip: "Ativar rolagem horizontal",
wrappedScrollingLabel: "Rolagem envolvida",
wrappedScrollingTooltip: "Ativar rolagem envolvente",
singlePageLabel: "Página única",
singlePageTooltip: "Ativar página única",
dualPageLabel: "Página dupla",
dualPageTooltip: "Ativar página dupla",
dualPageWithCoverLabel: "Página dupla com capa",
dualPageWithCoverTooltip: "Ativar página dupla com capa",
propertiesFilenameLabel: "Nome do arquivo",
propertiesFileSizeLabel: "Tamanho do arquivo",
propertiesTitleLabel: "Título",
propertiesAuthorLabel: "Autor",
propertiesSubjectLabel: "Assunto",
propertiesKeywordLabel: "Palavras-chave",
propertiesCreatorLabel: "Criador",
propertiesCreateOnLabel: "Criado em",
propertiesModifiedOnLabel: "Modificado em",
propertiesPDFProducerLabel: "Produtor do PDF",
propertiesPDFVersionLabel: "Versão do PDF",
propertiesPageCountLabel: "Número de páginas",
thumbnailTooltip: "Miniatura",
passwordModalTitle: "Senha necessária",
passwordModalMessage: "Este documento é protegido por senha. Por favor, insira uma senha para abrir o arquivo.",
passwordPlaceholder: "Insira a senha",
passwordConfirmLabel: "Enviar",
passwordError: "Senha incorreta",
dragDropFileMessage: "Arraste e solte o arquivo PDF aqui"
}, i = {
searchButtonTooltip: "ค้นหาในเอกสาร",
searchInputPlaceholder: "กรอกคำค้นหา",
searchInputTooltip: "ค้นหา",
searchPrevTooltip: "ผลการค้นหาก่อนหน้า",
searchNextTooltip: "ผลการค้นหาถัดไป",
searchCloseButtonTooltip: "ปิด",
searchMatchCaseLabel: "ข้อความที่มีคำ",
searchMatchCaseTooltip: "ค้นหาข้อความที่มีการแยกตัวพิมพ์ใหญ่/พิมพ์เล็ก",
searchWholeWordsLabel: "ทั้งคำ",
searchWholeWordsTooltip: "ค้นหาคำที่ตรงตัวไม่มีการแยกตัวพิมพ์ใหญ่/พิมพ์เล็ก",
previousPageTooltip: "หน้าก่อนหน้า",
currentPageTooltip: "หน้าปัจจุบัน",
nextPageTooltip: "หน้าถัดไป",
zoomOutTooltip: "ย่อ",
zoomInTooltip: "ขยาย",
zoomSelectTooltip: "เลือกระดับซูม",
zoomActualSize: "ขนาดจริง",
zoomPageFit: "พอดีหน้า",
zoomPageWidth: "พอดีความกว้าง",
themeEnableDarkTooltip: "เปิดโหมดมืด",
themeEnableLightTooltip: "เปิดโหมดสว่าง",
openLocalFileLabel: "เปิดไฟล์",
openLocalFileTooltip: "เปิดไฟล์",
downloadFileLabel: "ดาวน์โหลดเอกสาร",
downloadFileTooltip: "ดาวน์โหลดเอกสาร",
printLabel: "พิมพ์",
printTooltip: "พิมพ์",
printLoadingMessage: "เตรียมเอกสาร",
printCancelLabel: "ยกเลิก",
fullScreenLabel: "เต็มจอ",
fullScreenTooltip: "เต็มจอ",
moreOptionTooltip: "ตัวเลือกเพิ่มเติม",
firstPageLabel: "หน้าแรก",
firstPageTooltip: "ไปที่หน้าแรก",
lastPageLabel: "หน้าสุดท้าย",
lastPageTooltip: "ไปที่หน้าสุดท้าย",
rotateClockwiseLabel: "หมุนตามเข็มนาฬิกา",
rotateClockwiseTooltip: "หมุนตามเข็มนาฬิกา",
rotateCounterclockwiseLabel: "หมุนทวนเข็มนาฬิกา",
rotateCounterclockwiseTooltip: "หมุนทวนเข็มนาฬิกา",
textSelectionLabel: "เครื่องมือเลือกข้อความ",
textSelectionTooltip: "เปิดใช้การเลือกข้อความ",
handToolLabel: "เครื่องมือแฮนด์ทูล",
handToolTooltip: "เปิดใช้แฮนด์ทูล",
documentPropertiesLabel: "คุณสมบัติของเอกสาร",
documentPropertiesTooltip: "ดูคุณสมบัติของเอกสาร",
pageScrollingLabel: "การเลื่อนภายในหน้า",
pageScrollingTooltip: "เปิดใช้การเลื่อนภายในหน้า",
verticalScrollingLabel: "การเลื่อนแนวตั้ง",
verticalScrollingTooltip: "เปิดใช้การเลื่อนแนวตั้ง",
horizontalLabel: "การเลื่อนแนวนอน",
horizontalTooltip: "เปิดใช้การเลื่อนแนวนอน",
wrappedScrollingLabel: "การเลื่อนแบบแรพ",
wrappedScrollingTooltip: "เปิดใช้การเลื่อนแบบแรพ",
singlePageLabel: "หน้าเดี่ยว",
singlePageTooltip: "เปิดใช้หน้าเดี่ยว",
dualPageLabel: "หน้าคู่",
dualPageTooltip: "เปิดใช้หน้าคู่",
dualPageWithCoverLabel: "หน้าคู่พร้อมปก",
dualPageWithCoverTooltip: "เปิดใช้หน้าคู่พร้อมปก",
propertiesFilenameLabel: "ชื่อเอกสาร",
propertiesFileSizeLabel: "ขนาดเอกสาร",
propertiesTitleLabel: "ชื่อเรื่อง",
propertiesAuthorLabel: "ผู้เขียน",
propertiesSubjectLabel: "หัวข้อ",
propertiesKeywordLabel: "คำสำคัญ",
propertiesCreatorLabel: "ผู้สร้าง",
propertiesCreateOnLabel: "วันที่สร้าง",
propertiesModifiedOnLabel: "วันที่แก้ไข",
propertiesPDFProducerLabel: "ผู้ผลิต PDF",
propertiesPDFVersionLabel: "เวอร์ชัน PDF",
propertiesPageCountLabel: "จำนวนหน้า",
thumbnailTooltip: "ภาพย่อ",
passwordModalTitle: "กรุณากรอกรหัสผ่าน",
passwordModalMessage: "เอกสารนี้ได้รับการป้องกันด้วยรหัสผ่าน กรุณาใส่รหัสผ่านเพื่อเปิดไฟล์",
passwordPlaceholder: "กรอกรหัสผ่าน",
passwordConfirmLabel: "ส่ง",
passwordError: "รหัสผ่านไม่ถูกต้อง",
dragDropFileMessage: "ลากและวางไฟล์ PDF ที่นี่"
}, a = {
searchButtonTooltip: "Im Dokument suchen",
searchInputPlaceholder: "Zum Suchen eingeben",
searchInputTooltip: "Suche",
searchPrevTooltip: "Vorheriger Treffer",
searchNextTooltip: "Nächster Treffer",
searchCloseButtonTooltip: "Schließen",
searchMatchCaseLabel: "Groß-/Kleinschreibung",
searchMatchCaseTooltip: "Groß-/Kleinschreibung beachten",
searchWholeWordsLabel: "Ganze Wörter",
searchWholeWordsTooltip: "Exakte Wörter suchen (Groß-/Kleinschreibung ignorieren)",
previousPageTooltip: "Vorherige Seite",
currentPageTooltip: "Aktuelle Seite",
nextPageTooltip: "Nächste Seite",
zoomOutTooltip: "Verkleinern",
zoomInTooltip: "Vergrößern",
zoomSelectTooltip: "Zoomstufe auswählen",
zoomActualSize: "Originalgröße",
zoomPageFit: "Seite einpassen",
zoomPageWidth: "Seitenbreite",
themeEnableDarkTooltip: "Dunkles Design aktivieren",
themeEnableLightTooltip: "Helles Design aktivieren",
openLocalFileLabel: "Lokale Datei öffnen",
openLocalFileTooltip: "Lokale Datei öffnen",
downloadFileLabel: "Datei herunterladen",
downloadFileTooltip: "Datei herunterladen",
printLabel: "Drucken",
printTooltip: "Drucken",
printLoadingMessage: "Dokument wird vorbereitet",
printCancelLabel: "Abbrechen",
fullScreenLabel: "Vollbild",
fullScreenTooltip: "Vollbild",
moreOptionTooltip: "Weitere Optionen",
firstPageLabel: "Erste Seite",
firstPageTooltip: "Zur ersten Seite",
lastPageLabel: "Letzte Seite",
lastPageTooltip: "Zur letzten Seite",
rotateClockwiseLabel: "Im Uhrzeigersinn drehen",
rotateClockwiseTooltip: "Im Uhrzeigersinn drehen",
rotateCounterclockwiseLabel: "Gegen den Uhrzeigersinn drehen",
rotateCounterclockwiseTooltip: "Gegen den Uhrzeigersinn drehen",
textSelectionLabel: "Textauswahl-Werkzeug",
textSelectionTooltip: "Textauswahl-Werkzeug aktivieren",
handToolLabel: "Hand-Werkzeug",
handToolTooltip: "Hand-Werkzeug aktivieren",
documentPropertiesLabel: "Dokumenteigenschaften",
documentPropertiesTooltip: "Dokumenteigenschaften anzeigen",
pageScrollingLabel: "Bildlauf",
pageScrollingTooltip: "Seitenweises Blättern aktivieren",
verticalScrollingLabel: "Vertikaler Bildlauf",
verticalScrollingTooltip: "Vertikalen Bildlauf aktivieren",
horizontalLabel: "Horizontaler Bildlauf",
horizontalTooltip: "Horizontalen Bildlauf aktivieren",
wrappedScrollingLabel: "Bildlauf mit Umbruch",
wrappedScrollingTooltip: "Bildlauf mit Umbruch aktivieren",
singlePageLabel: "Einzelseite",
singlePageTooltip: "Einzelseitenansicht aktivieren",
dualPageLabel: "Doppelseite",
dualPageTooltip: "Doppelseitenansicht aktivieren",
dualPageWithCoverLabel: "Doppelseite mit Deckblatt",
dualPageWithCoverTooltip: "Doppelseitenansicht mit Deckblatt aktivieren",
propertiesFilenameLabel: "Dateiname",
propertiesFileSizeLabel: "Dateigröße",
propertiesTitleLabel: "Titel",
propertiesAuthorLabel: "Autor",
propertiesSubjectLabel: "Thema",
propertiesKeywordLabel: "Stichwörter",
propertiesCreatorLabel: "Ersteller",
propertiesCreateOnLabel: "Erstellt am",
propertiesModifiedOnLabel: "Geändert am",
propertiesPDFProducerLabel: "PDF-Produzent",
propertiesPDFVersionLabel: "PDF-Version",
propertiesPageCountLabel: "Seitenanzahl",
thumbnailTooltip: "Miniaturansicht",
passwordModalTitle: "Passwort erforderlich",
passwordModalMessage: "Dieses Dokument ist passwortgeschützt. Bitte geben Sie ein Passwort ein, um die Datei zu öffnen.",
passwordPlaceholder: "Passwort eingeben",
passwordConfirmLabel: "Bestätigen",
passwordError: "Falsches Passwort",
dragDropFileMessage: "PDF-Datei hierher ziehen"
};
//#endregion
export { t as a, n as i, i as n, e as o, r, a as t };
import { d as e, i as t, l as n, r } from "./dist-bK-AHWLF.js";
import { i } from "./dist-BRVqFn7R.js";
import { t as a } from "./dist-C3WNMuW2.js";
import * as o from "react";
import { useLayoutEffect as s } from "react";
import { jsx as c } from "react/jsx-runtime";
import * as l from "react-dom";
//#region node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
var u = [
"top",
"right",
"bottom",
"left"
], d = Math.min, f = Math.max, p = Math.round, m = Math.floor, h = (e) => ({
x: e,
y: e
}), g = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
}, _ = {
start: "end",
end: "start"
};
function v(e, t, n) {
return f(e, d(t, n));
}
function y(e, t) {
return typeof e == "function" ? e(t) : e;
}
function b(e) {
return e.split("-")[0];
}
function x(e) {
return e.split("-")[1];
}
function S(e) {
return e === "x" ? "y" : "x";
}
function C(e) {
return e === "y" ? "height" : "width";
}
var w = /* @__PURE__ */ new Set(["top", "bottom"]);
function T(e) {
return w.has(b(e)) ? "y" : "x";
}
function E(e) {
return S(T(e));
}
function D(e, t, n) {
n === void 0 && (n = !1);
let r = x(e), i = E(e), a = C(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
return t.reference[a] > t.floating[a] && (o = I(o)), [o, I(o)];
}
function O(e) {
let t = I(e);
return [
k(e),
t,
k(t)
];
}
function k(e) {
return e.replace(/start|end/g, (e) => _[e]);
}
var A = ["left", "right"], j = ["right", "left"], M = ["top", "bottom"], N = ["bottom", "top"];
function P(e, t, n) {
switch (e) {
case "top":
case "bottom": return n ? t ? j : A : t ? A : j;
case "left":
case "right": return t ? M : N;
default: return [];
}
}
function F(e, t, n, r) {
let i = x(e), a = P(b(e), n === "start", r);
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(k)))), a;
}
function I(e) {
return e.replace(/left|right|bottom|top/g, (e) => g[e]);
}
function L(e) {
return {
top: 0,
right: 0,
bottom: 0,
left: 0,
...e
};
}
function ee(e) {
return typeof e == "number" ? {
top: e,
right: e,
bottom: e,
left: e
} : L(e);
}
function R(e) {
let { x: t, y: n, width: r, height: i } = e;
return {
width: r,
height: i,
top: n,
left: t,
right: t + r,
bottom: n + i,
x: t,
y: n
};
}
//#endregion
//#region node_modules/.pnpm/@floating-ui+core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
function z(e, t, n) {
let { reference: r, floating: i } = e, a = T(t), o = E(t), s = C(o), c = b(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
switch (c) {
case "top":
p = {
x: u,
y: r.y - i.height
};
break;
case "bottom":
p = {
x: u,
y: r.y + r.height
};
break;
case "right":
p = {
x: r.x + r.width,
y: d
};
break;
case "left":
p = {
x: r.x - i.width,
y: d
};
break;
default: p = {
x: r.x,
y: r.y
};
}
switch (x(t)) {
case "start":
p[o] -= f * (n && l ? -1 : 1);
break;
case "end":
p[o] += f * (n && l ? -1 : 1);
break;
}
return p;
}
var B = async (e, t, n) => {
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = a.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
reference: e,
floating: t,
strategy: i
}), { x: u, y: d } = z(l, r, c), f = r, p = {}, m = 0;
for (let n = 0; n < s.length; n++) {
let { name: a, fn: h } = s[n], { x: g, y: _, data: v, reset: y } = await h({
x: u,
y: d,
initialPlacement: r,
placement: f,
strategy: i,
middlewareData: p,
rects: l,
platform: o,
elements: {
reference: e,
floating: t
}
});
u = g ?? u, d = _ ?? d, p = {
...p,
[a]: {
...p[a],
...v
}
}, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (f = y.placement), y.rects && (l = y.rects === !0 ? await o.getElementRects({
reference: e,
floating: t,
strategy: i
}) : y.rects), {x: u, y: d} = z(l, f, c)), n = -1);
}
return {
x: u,
y: d,
placement: f,
strategy: i,
middlewareData: p
};
};
async function V(e, t) {
t === void 0 && (t = {});
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = y(t, e), p = ee(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = R(await i.getClippingRect({
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
boundary: c,
rootBoundary: l,
strategy: s
})), g = u === "floating" ? {
x: n,
y: r,
width: a.floating.width,
height: a.floating.height
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
x: 1,
y: 1
}, b = R(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
elements: o,
rect: g,
offsetParent: _,
strategy: s
}) : g);
return {
top: (h.top - b.top + p.top) / v.y,
bottom: (b.bottom - h.bottom + p.bottom) / v.y,
left: (h.left - b.left + p.left) / v.x,
right: (b.right - h.right + p.right) / v.x
};
}
var te = (e) => ({
name: "arrow",
options: e,
async fn(t) {
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = y(e, t) || {};
if (l == null) return {};
let f = ee(u), p = {
x: n,
y: r
}, m = E(i), h = C(m), g = await o.getDimensions(l), _ = m === "y", b = _ ? "top" : "left", S = _ ? "bottom" : "right", w = _ ? "clientHeight" : "clientWidth", T = a.reference[h] + a.reference[m] - p[m] - a.floating[h], D = p[m] - a.reference[m], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), k = O ? O[w] : 0;
(!k || !await (o.isElement == null ? void 0 : o.isElement(O))) && (k = s.floating[w] || a.floating[h]);
let A = T / 2 - D / 2, j = k / 2 - g[h] / 2 - 1, M = d(f[b], j), N = d(f[S], j), P = M, F = k - g[h] - N, I = k / 2 - g[h] / 2 + A, L = v(P, I, F), R = !c.arrow && x(i) != null && I !== L && a.reference[h] / 2 - (I < P ? M : N) - g[h] / 2 < 0, z = R ? I < P ? I - P : I - F : 0;
return {
[m]: p[m] + z,
data: {
[m]: L,
centerOffset: I - L - z,
...R && { alignmentOffset: z }
},
reset: R
};
}
}), ne = function(e) {
return e === void 0 && (e = {}), {
name: "flip",
options: e,
async fn(t) {
var n;
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = y(e, t);
if ((n = i.arrow) != null && n.alignmentOffset) return {};
let g = b(r), _ = T(o), v = b(o) === o, x = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), S = d || (v || !m ? [I(o)] : O(o)), C = p !== "none";
!d && C && S.push(...F(o, m, p, x));
let w = [o, ...S], E = await V(t, h), k = [], A = i.flip?.overflows || [];
if (l && k.push(E[g]), u) {
let e = D(r, a, x);
k.push(E[e[0]], E[e[1]]);
}
if (A = [...A, {
placement: r,
overflows: k
}], !k.every((e) => e <= 0)) {
let e = (i.flip?.index || 0) + 1, t = w[e];
if (t && (!(u === "alignment" && _ !== T(t)) || A.every((e) => T(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
data: {
index: e,
overflows: A
},
reset: { placement: t }
};
let n = A.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
if (!n) switch (f) {
case "bestFit": {
let e = A.filter((e) => {
if (C) {
let t = T(e.placement);
return t === _ || t === "y";
}
return !0;
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
e && (n = e);
break;
}
case "initialPlacement":
n = o;
break;
}
if (r !== n) return { reset: { placement: n } };
}
return {};
}
};
};
function re(e, t) {
return {
top: e.top - t.height,
right: e.right - t.width,
bottom: e.bottom - t.height,
left: e.left - t.width
};
}
function ie(e) {
return u.some((t) => e[t] >= 0);
}
var ae = function(e) {
return e === void 0 && (e = {}), {
name: "hide",
options: e,
async fn(t) {
let { rects: n } = t, { strategy: r = "referenceHidden", ...i } = y(e, t);
switch (r) {
case "referenceHidden": {
let e = re(await V(t, {
...i,
elementContext: "reference"
}), n.reference);
return { data: {
referenceHiddenOffsets: e,
referenceHidden: ie(e)
} };
}
case "escaped": {
let e = re(await V(t, {
...i,
altBoundary: !0
}), n.floating);
return { data: {
escapedOffsets: e,
escaped: ie(e)
} };
}
default: return {};
}
}
};
}, oe = /* @__PURE__ */ new Set(["left", "top"]);
async function se(e, t) {
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = b(n), s = x(n), c = T(n) === "y", l = oe.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = y(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
mainAxis: d,
crossAxis: 0,
alignmentAxis: null
} : {
mainAxis: d.mainAxis || 0,
crossAxis: d.crossAxis || 0,
alignmentAxis: d.alignmentAxis
};
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
x: p * u,
y: f * l
} : {
x: f * l,
y: p * u
};
}
var ce = function(e) {
return e === void 0 && (e = 0), {
name: "offset",
options: e,
async fn(t) {
var n;
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await se(t, e);
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
x: r + s.x,
y: i + s.y,
data: {
...s,
placement: a
}
};
}
};
}, le = function(e) {
return e === void 0 && (e = {}), {
name: "shift",
options: e,
async fn(t) {
let { x: n, y: r, placement: i } = t, { mainAxis: a = !0, crossAxis: o = !1, limiter: s = { fn: (e) => {
let { x: t, y: n } = e;
return {
x: t,
y: n
};
} }, ...c } = y(e, t), l = {
x: n,
y: r
}, u = await V(t, c), d = T(b(i)), f = S(d), p = l[f], m = l[d];
if (a) {
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = p + u[e], r = p - u[t];
p = v(n, p, r);
}
if (o) {
let e = d === "y" ? "top" : "left", t = d === "y" ? "bottom" : "right", n = m + u[e], r = m - u[t];
m = v(n, m, r);
}
let h = s.fn({
...t,
[f]: p,
[d]: m
});
return {
...h,
data: {
x: h.x - n,
y: h.y - r,
enabled: {
[f]: a,
[d]: o
}
}
};
}
};
}, ue = function(e) {
return e === void 0 && (e = {}), {
options: e,
fn(t) {
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = y(e, t), u = {
x: n,
y: r
}, d = T(i), f = S(d), p = u[f], m = u[d], h = y(s, t), g = typeof h == "number" ? {
mainAxis: h,
crossAxis: 0
} : {
mainAxis: 0,
crossAxis: 0,
...h
};
if (c) {
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
p < t ? p = t : p > n && (p = n);
}
if (l) {
let e = f === "y" ? "width" : "height", t = oe.has(b(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
m < n ? m = n : m > r && (m = r);
}
return {
[f]: p,
[d]: m
};
}
};
}, de = function(e) {
return e === void 0 && (e = {}), {
name: "size",
options: e,
async fn(t) {
var n, r;
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = y(e, t), u = await V(t, l), p = b(i), m = x(i), h = T(i) === "y", { width: g, height: _ } = a.floating, v, S;
p === "top" || p === "bottom" ? (v = p, S = m === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (S = p, v = m === "end" ? "top" : "bottom");
let C = _ - u.top - u.bottom, w = g - u.left - u.right, E = d(_ - u[v], C), D = d(g - u[S], w), O = !t.middlewareData.shift, k = E, A = D;
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = w), (r = t.middlewareData.shift) != null && r.enabled.y && (k = C), O && !m) {
let e = f(u.left, 0), t = f(u.right, 0), n = f(u.top, 0), r = f(u.bottom, 0);
h ? A = g - 2 * (e !== 0 || t !== 0 ? e + t : f(u.left, u.right)) : k = _ - 2 * (n !== 0 || r !== 0 ? n + r : f(u.top, u.bottom));
}
await c({
...t,
availableWidth: A,
availableHeight: k
});
let j = await o.getDimensions(s.floating);
return g !== j.width || _ !== j.height ? { reset: { rects: !0 } } : {};
}
};
};
//#endregion
//#region node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
function fe() {
return typeof window < "u";
}
function H(e) {
return pe(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function U(e) {
var t;
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function W(e) {
return ((pe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
}
function pe(e) {
return fe() ? e instanceof Node || e instanceof U(e).Node : !1;
}
function G(e) {
return fe() ? e instanceof Element || e instanceof U(e).Element : !1;
}
function K(e) {
return fe() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
}
function me(e) {
return !fe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
}
var he = /* @__PURE__ */ new Set(["inline", "contents"]);
function q(e) {
let { overflow: t, overflowX: n, overflowY: r, display: i } = Y(e);
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !he.has(i);
}
var ge = /* @__PURE__ */ new Set([
"table",
"td",
"th"
]);
function _e(e) {
return ge.has(H(e));
}
var ve = [":popover-open", ":modal"];
function ye(e) {
return ve.some((t) => {
try {
return e.matches(t);
} catch {
return !1;
}
});
}
var be = [
"transform",
"translate",
"scale",
"rotate",
"perspective"
], xe = [
"transform",
"translate",
"scale",
"rotate",
"perspective",
"filter"
], Se = [
"paint",
"layout",
"strict",
"content"
];
function Ce(e) {
let t = Te(), n = G(e) ? Y(e) : e;
return be.some((e) => n[e] ? n[e] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || xe.some((e) => (n.willChange || "").includes(e)) || Se.some((e) => (n.contain || "").includes(e));
}
function we(e) {
let t = X(e);
for (; K(t) && !J(t);) {
if (Ce(t)) return t;
if (ye(t)) return null;
t = X(t);
}
return null;
}
function Te() {
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
var Ee = /* @__PURE__ */ new Set([
"html",
"body",
"#document"
]);
function J(e) {
return Ee.has(H(e));
}
function Y(e) {
return U(e).getComputedStyle(e);
}
function De(e) {
return G(e) ? {
scrollLeft: e.scrollLeft,
scrollTop: e.scrollTop
} : {
scrollLeft: e.scrollX,
scrollTop: e.scrollY
};
}
function X(e) {
if (H(e) === "html") return e;
let t = e.assignedSlot || e.parentNode || me(e) && e.host || W(e);
return me(t) ? t.host : t;
}
function Oe(e) {
let t = X(e);
return J(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : K(t) && q(t) ? t : Oe(t);
}
function Z(e, t, n) {
t === void 0 && (t = []), n === void 0 && (n = !0);
let r = Oe(e), i = r === e.ownerDocument?.body, a = U(r);
if (i) {
let e = ke(a);
return t.concat(a, a.visualViewport || [], q(r) ? r : [], e && n ? Z(e) : []);
}
return t.concat(r, Z(r, [], n));
}
function ke(e) {
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
//#endregion
//#region node_modules/.pnpm/@floating-ui+dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
function Ae(e) {
let t = Y(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = K(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = p(n) !== a || p(r) !== o;
return s && (n = a, r = o), {
width: n,
height: r,
$: s
};
}
function je(e) {
return G(e) ? e : e.contextElement;
}
function Q(e) {
let t = je(e);
if (!K(t)) return h(1);
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Ae(t), o = (a ? p(n.width) : n.width) / r, s = (a ? p(n.height) : n.height) / i;
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
x: o,
y: s
};
}
var Me = /* @__PURE__ */ h(0);
function Ne(e) {
let t = U(e);
return !Te() || !t.visualViewport ? Me : {
x: t.visualViewport.offsetLeft,
y: t.visualViewport.offsetTop
};
}
function Pe(e, t, n) {
return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
}
function $(e, t, n, r) {
t === void 0 && (t = !1), n === void 0 && (n = !1);
let i = e.getBoundingClientRect(), a = je(e), o = h(1);
t && (r ? G(r) && (o = Q(r)) : o = Q(e));
let s = Pe(a, n, r) ? Ne(a) : h(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
if (a) {
let e = U(a), t = r && G(r) ? U(r) : r, n = e, i = ke(n);
for (; i && r && t !== n;) {
let e = Q(i), t = i.getBoundingClientRect(), r = Y(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = U(i), i = ke(n);
}
}
return R({
width: u,
height: d,
x: c,
y: l
});
}
function Fe(e, t) {
let n = De(e).scrollLeft;
return t ? t.left + n : $(W(e)).left + n;
}
function Ie(e, t) {
let n = e.getBoundingClientRect();
return {
x: n.left + t.scrollLeft - Fe(e, n),
y: n.top + t.scrollTop
};
}
function Le(e) {
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = W(r), s = t ? ye(t.floating) : !1;
if (r === o || s && a) return n;
let c = {
scrollLeft: 0,
scrollTop: 0
}, l = h(1), u = h(0), d = K(r);
if ((d || !d && !a) && ((H(r) !== "body" || q(o)) && (c = De(r)), K(r))) {
let e = $(r);
l = Q(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
}
let f = o && !d && !a ? Ie(o, c) : h(0);
return {
width: n.width * l.x,
height: n.height * l.y,
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
};
}
function Re(e) {
return Array.from(e.getClientRects());
}
function ze(e) {
let t = W(e), n = De(e), r = e.ownerDocument.body, i = f(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = f(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Fe(e), s = -n.scrollTop;
return Y(r).direction === "rtl" && (o += f(t.clientWidth, r.clientWidth) - i), {
width: i,
height: a,
x: o,
y: s
};
}
var Be = 25;
function Ve(e, t) {
let n = U(e), r = W(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
if (i) {
a = i.width, o = i.height;
let e = Te();
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
}
let l = Fe(r);
if (l <= 0) {
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
o <= Be && (a -= o);
} else l <= Be && (a += l);
return {
width: a,
height: o,
x: s,
y: c
};
}
var He = /* @__PURE__ */ new Set(["absolute", "fixed"]);
function Ue(e, t) {
let n = $(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = K(e) ? Q(e) : h(1);
return {
width: e.clientWidth * a.x,
height: e.clientHeight * a.y,
x: i * a.x,
y: r * a.y
};
}
function We(e, t, n) {
let r;
if (t === "viewport") r = Ve(e, n);
else if (t === "document") r = ze(W(e));
else if (G(t)) r = Ue(t, n);
else {
let n = Ne(e);
r = {
x: t.x - n.x,
y: t.y - n.y,
width: t.width,
height: t.height
};
}
return R(r);
}
function Ge(e, t) {
let n = X(e);
return n === t || !G(n) || J(n) ? !1 : Y(n).position === "fixed" || Ge(n, t);
}
function Ke(e, t) {
let n = t.get(e);
if (n) return n;
let r = Z(e, [], !1).filter((e) => G(e) && H(e) !== "body"), i = null, a = Y(e).position === "fixed", o = a ? X(e) : e;
for (; G(o) && !J(o);) {
let t = Y(o), n = Ce(o);
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && He.has(i.position) || q(o) && !n && Ge(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = X(o);
}
return t.set(e, r), r;
}
function qe(e) {
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? ye(t) ? [] : Ke(t, this._c) : [].concat(n), r], o = a[0], s = a.reduce((e, n) => {
let r = We(t, n, i);
return e.top = f(r.top, e.top), e.right = d(r.right, e.right), e.bottom = d(r.bottom, e.bottom), e.left = f(r.left, e.left), e;
}, We(t, o, i));
return {
width: s.right - s.left,
height: s.bottom - s.top,
x: s.left,
y: s.top
};
}
function Je(e) {
let { width: t, height: n } = Ae(e);
return {
width: t,
height: n
};
}
function Ye(e, t, n) {
let r = K(t), i = W(t), a = n === "fixed", o = $(e, !0, a, t), s = {
scrollLeft: 0,
scrollTop: 0
}, c = h(0);
function l() {
c.x = Fe(i);
}
if (r || !r && !a) if ((H(t) !== "body" || q(i)) && (s = De(t)), r) {
let e = $(t, !0, a, t);
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
} else i && l();
a && !r && i && l();
let u = i && !r && !a ? Ie(i, s) : h(0);
return {
x: o.left + s.scrollLeft - c.x - u.x,
y: o.top + s.scrollTop - c.y - u.y,
width: o.width,
height: o.height
};
}
function Xe(e) {
return Y(e).position === "static";
}
function Ze(e, t) {
if (!K(e) || Y(e).position === "fixed") return null;
if (t) return t(e);
let n = e.offsetParent;
return W(e) === n && (n = n.ownerDocument.body), n;
}
function Qe(e, t) {
let n = U(e);
if (ye(e)) return n;
if (!K(e)) {
let t = X(e);
for (; t && !J(t);) {
if (G(t) && !Xe(t)) return t;
t = X(t);
}
return n;
}
let r = Ze(e, t);
for (; r && _e(r) && Xe(r);) r = Ze(r, t);
return r && J(r) && Xe(r) && !Ce(r) ? n : r || we(e) || n;
}
var $e = async function(e) {
let t = this.getOffsetParent || Qe, n = this.getDimensions, r = await n(e.floating);
return {
reference: Ye(e.reference, await t(e.floating), e.strategy),
floating: {
x: 0,
y: 0,
width: r.width,
height: r.height
}
};
};
function et(e) {
return Y(e).direction === "rtl";
}
var tt = {
convertOffsetParentRelativeRectToViewportRelativeRect: Le,
getDocumentElement: W,
getClippingRect: qe,
getOffsetParent: Qe,
getElementRects: $e,
getClientRects: Re,
getDimensions: Je,
getScale: Q,
isElement: G,
isRTL: et
};
function nt(e, t) {
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
}
function rt(e, t) {
let n = null, r, i = W(e);
function a() {
var e;
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
}
function o(s, c) {
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
let l = e.getBoundingClientRect(), { left: u, top: p, width: h, height: g } = l;
if (s || t(), !h || !g) return;
let _ = m(p), v = m(i.clientWidth - (u + h)), y = m(i.clientHeight - (p + g)), b = m(u), x = {
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
threshold: f(0, d(1, c)) || 1
}, S = !0;
function C(t) {
let n = t[0].intersectionRatio;
if (n !== c) {
if (!S) return o();
n ? o(!1, n) : r = setTimeout(() => {
o(!1, 1e-7);
}, 1e3);
}
n === 1 && !nt(l, e.getBoundingClientRect()) && o(), S = !1;
}
try {
n = new IntersectionObserver(C, {
...x,
root: i.ownerDocument
});
} catch {
n = new IntersectionObserver(C, x);
}
n.observe(e);
}
return o(!0), a;
}
function it(e, t, n, r) {
r === void 0 && (r = {});
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = je(e), u = i || a ? [...l ? Z(l) : [], ...Z(t)] : [];
u.forEach((e) => {
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
});
let d = l && s ? rt(l, n) : null, f = -1, p = null;
o && (p = new ResizeObserver((e) => {
let [r] = e;
r && r.target === l && p && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
var e;
(e = p) == null || e.observe(t);
})), n();
}), l && !c && p.observe(l), p.observe(t));
let m, h = c ? $(e) : null;
c && g();
function g() {
let t = $(e);
h && !nt(h, t) && n(), h = t, m = requestAnimationFrame(g);
}
return n(), () => {
var e;
u.forEach((e) => {
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
};
}
var at = ce, ot = le, st = ne, ct = de, lt = ae, ut = te, dt = ue, ft = (e, t, n) => {
let r = /* @__PURE__ */ new Map(), i = {
platform: tt,
...n
}, a = {
...i.platform,
_c: r
};
return B(e, t, {
...i,
platform: a
});
}, pt = typeof document < "u" ? s : function() {};
function mt(e, t) {
if (e === t) return !0;
if (typeof e != typeof t) return !1;
if (typeof e == "function" && e.toString() === t.toString()) return !0;
let n, r, i;
if (e && t && typeof e == "object") {
if (Array.isArray(e)) {
if (n = e.length, n !== t.length) return !1;
for (r = n; r-- !== 0;) if (!mt(e[r], t[r])) return !1;
return !0;
}
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
for (r = n; r-- !== 0;) {
let n = i[r];
if (!(n === "_owner" && e.$$typeof) && !mt(e[n], t[n])) return !1;
}
return !0;
}
return e !== e && t !== t;
}
function ht(e) {
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
}
function gt(e, t) {
let n = ht(e);
return Math.round(t * n) / n;
}
function _t(e) {
let t = o.useRef(e);
return pt(() => {
t.current = e;
}), t;
}
function vt(e) {
e === void 0 && (e = {});
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: s } = {}, transform: c = !0, whileElementsMounted: u, open: d } = e, [f, p] = o.useState({
x: 0,
y: 0,
strategy: n,
placement: t,
middlewareData: {},
isPositioned: !1
}), [m, h] = o.useState(r);
mt(m, r) || h(r);
let [g, _] = o.useState(null), [v, y] = o.useState(null), b = o.useCallback((e) => {
e !== w.current && (w.current = e, _(e));
}, []), x = o.useCallback((e) => {
e !== T.current && (T.current = e, y(e));
}, []), S = a || g, C = s || v, w = o.useRef(null), T = o.useRef(null), E = o.useRef(f), D = u != null, O = _t(u), k = _t(i), A = _t(d), j = o.useCallback(() => {
if (!w.current || !T.current) return;
let e = {
placement: t,
strategy: n,
middleware: m
};
k.current && (e.platform = k.current), ft(w.current, T.current, e).then((e) => {
let t = {
...e,
isPositioned: A.current !== !1
};
M.current && !mt(E.current, t) && (E.current = t, l.flushSync(() => {
p(t);
}));
});
}, [
m,
t,
n,
k,
A
]);
pt(() => {
d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((e) => ({
...e,
isPositioned: !1
})));
}, [d]);
let M = o.useRef(!1);
pt(() => (M.current = !0, () => {
M.current = !1;
}), []), pt(() => {
if (S && (w.current = S), C && (T.current = C), S && C) {
if (O.current) return O.current(S, C, j);
j();
}
}, [
S,
C,
j,
O,
D
]);
let N = o.useMemo(() => ({
reference: w,
floating: T,
setReference: b,
setFloating: x
}), [b, x]), P = o.useMemo(() => ({
reference: S,
floating: C
}), [S, C]), F = o.useMemo(() => {
let e = {
position: n,
left: 0,
top: 0
};
if (!P.floating) return e;
let t = gt(P.floating, f.x), r = gt(P.floating, f.y);
return c ? {
...e,
transform: "translate(" + t + "px, " + r + "px)",
...ht(P.floating) >= 1.5 && { willChange: "transform" }
} : {
position: n,
left: t,
top: r
};
}, [
n,
c,
P.floating,
f.x,
f.y
]);
return o.useMemo(() => ({
...f,
update: j,
refs: N,
elements: P,
floatingStyles: F
}), [
f,
j,
N,
P,
F
]);
}
var yt = (e) => {
function t(e) {
return {}.hasOwnProperty.call(e, "current");
}
return {
name: "arrow",
options: e,
fn(n) {
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
return r && t(r) ? r.current == null ? {} : ut({
element: r.current,
padding: i
}).fn(n) : r ? ut({
element: r,
padding: i
}).fn(n) : {};
}
};
}, bt = (e, t) => ({
...at(e),
options: [e, t]
}), xt = (e, t) => ({
...ot(e),
options: [e, t]
}), St = (e, t) => ({
...dt(e),
options: [e, t]
}), Ct = (e, t) => ({
...st(e),
options: [e, t]
}), wt = (e, t) => ({
...ct(e),
options: [e, t]
}), Tt = (e, t) => ({
...lt(e),
options: [e, t]
}), Et = (e, t) => ({
...yt(e),
options: [e, t]
}), Dt = "Arrow", Ot = o.forwardRef((e, n) => {
let { children: r, width: i = 10, height: a = 5, ...o } = e;
return /* @__PURE__ */ c(t.svg, {
...o,
ref: n,
width: i,
height: a,
viewBox: "0 0 30 10",
preserveAspectRatio: "none",
children: e.asChild ? r : /* @__PURE__ */ c("polygon", { points: "0,0 30,0 15,10" })
});
});
Ot.displayName = Dt;
var kt = Ot, At = "Popper", [jt, Mt] = n(At), [Nt, Pt] = jt(At), Ft = (e) => {
let { __scopePopper: t, children: n } = e, [r, i] = o.useState(null);
return /* @__PURE__ */ c(Nt, {
scope: t,
anchor: r,
onAnchorChange: i,
children: n
});
};
Ft.displayName = At;
var It = "PopperAnchor", Lt = o.forwardRef((n, r) => {
let { __scopePopper: i, virtualRef: a, ...s } = n, l = Pt(It, i), u = o.useRef(null), d = e(r, u), f = o.useRef(null);
return o.useEffect(() => {
let e = f.current;
f.current = a?.current || u.current, e !== f.current && l.onAnchorChange(f.current);
}), a ? null : /* @__PURE__ */ c(t.div, {
...s,
ref: d
});
});
Lt.displayName = It;
var Rt = "PopperContent", [zt, Bt] = jt(Rt), Vt = o.forwardRef((n, s) => {
let { __scopePopper: l, side: u = "bottom", sideOffset: d = 0, align: f = "center", alignOffset: p = 0, arrowPadding: m = 0, avoidCollisions: h = !0, collisionBoundary: g = [], collisionPadding: _ = 0, sticky: v = "partial", hideWhenDetached: y = !1, updatePositionStrategy: b = "optimized", onPlaced: x, ...S } = n, C = Pt(Rt, l), [w, T] = o.useState(null), E = e(s, (e) => T(e)), [D, O] = o.useState(null), k = a(D), A = k?.width ?? 0, j = k?.height ?? 0, M = u + (f === "center" ? "" : "-" + f), N = typeof _ == "number" ? _ : {
top: 0,
right: 0,
bottom: 0,
left: 0,
..._
}, P = Array.isArray(g) ? g : [g], F = P.length > 0, I = {
padding: N,
boundary: P.filter(Gt),
altBoundary: F
}, { refs: L, floatingStyles: ee, placement: R, isPositioned: z, middlewareData: B } = vt({
strategy: "fixed",
placement: M,
whileElementsMounted: (...e) => it(...e, { animationFrame: b === "always" }),
elements: { reference: C.anchor },
middleware: [
bt({
mainAxis: d + j,
alignmentAxis: p
}),
h && xt({
mainAxis: !0,
crossAxis: !1,
limiter: v === "partial" ? St() : void 0,
...I
}),
h && Ct({ ...I }),
wt({
...I,
apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
let { width: i, height: a } = t.reference, o = e.floating.style;
o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
}
}),
D && Et({
element: D,
padding: m
}),
Kt({
arrowWidth: A,
arrowHeight: j
}),
y && Tt({
strategy: "referenceHidden",
...I
})
]
}), [V, te] = qt(R), ne = i(x);
r(() => {
z && ne?.();
}, [z, ne]);
let re = B.arrow?.x, ie = B.arrow?.y, ae = B.arrow?.centerOffset !== 0, [oe, se] = o.useState();
return r(() => {
w && se(window.getComputedStyle(w).zIndex);
}, [w]), /* @__PURE__ */ c("div", {
ref: L.setFloating,
"data-radix-popper-content-wrapper": "",
style: {
...ee,
transform: z ? ee.transform : "translate(0, -200%)",
minWidth: "max-content",
zIndex: oe,
"--radix-popper-transform-origin": [B.transformOrigin?.x, B.transformOrigin?.y].join(" "),
...B.hide?.referenceHidden && {
visibility: "hidden",
pointerEvents: "none"
}
},
dir: n.dir,
children: /* @__PURE__ */ c(zt, {
scope: l,
placedSide: V,
onArrowChange: O,
arrowX: re,
arrowY: ie,
shouldHideArrow: ae,
children: /* @__PURE__ */ c(t.div, {
"data-side": V,
"data-align": te,
...S,
ref: E,
style: {
...S.style,
animation: z ? void 0 : "none"
}
})
})
});
});
Vt.displayName = Rt;
var Ht = "PopperArrow", Ut = {
top: "bottom",
right: "left",
bottom: "top",
left: "right"
}, Wt = o.forwardRef(function(e, t) {
let { __scopePopper: n, ...r } = e, i = Bt(Ht, n), a = Ut[i.placedSide];
return /* @__PURE__ */ c("span", {
ref: i.onArrowChange,
style: {
position: "absolute",
left: i.arrowX,
top: i.arrowY,
[a]: 0,
transformOrigin: {
top: "",
right: "0 0",
bottom: "center 0",
left: "100% 0"
}[i.placedSide],
transform: {
top: "translateY(100%)",
right: "translateY(50%) rotate(90deg) translateX(-50%)",
bottom: "rotate(180deg)",
left: "translateY(50%) rotate(-90deg) translateX(50%)"
}[i.placedSide],
visibility: i.shouldHideArrow ? "hidden" : void 0
},
children: /* @__PURE__ */ c(kt, {
...r,
ref: t,
style: {
...r.style,
display: "block"
}
})
});
});
Wt.displayName = Ht;
function Gt(e) {
return e !== null;
}
var Kt = (e) => ({
name: "transformOrigin",
options: e,
fn(t) {
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = qt(n), u = {
start: "0%",
center: "50%",
end: "100%"
}[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
x: p,
y: m
} };
}
});
function qt(e) {
let [t, n = "center"] = e.split("-");
return [t, n];
}
var Jt = Ft, Yt = Lt, Xt = Vt, Zt = Wt;
//#endregion
export { Mt as a, Jt as i, Zt as n, Xt as r, Yt as t };
import * as e from "react";
import { Fragment as t, jsx as n } from "react/jsx-runtime";
import * as r from "react-dom";
typeof window < "u" && window.document && window.document.createElement;
function i(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
return function(r) {
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
};
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
function a(e, t) {
if (typeof e == "function") return e(t);
e != null && (e.current = t);
}
function o(...e) {
return (t) => {
let n = !1, r = e.map((e) => {
let r = a(e, t);
return !n && typeof r == "function" && (n = !0), r;
});
if (n) return () => {
for (let t = 0; t < r.length; t++) {
let n = r[t];
typeof n == "function" ? n() : a(e[t], null);
}
};
};
}
function s(...t) {
return e.useCallback(o(...t), t);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs
function c(t, r) {
let i = e.createContext(r), a = (t) => {
let { children: r, ...a } = t, o = e.useMemo(() => a, Object.values(a));
return /* @__PURE__ */ n(i.Provider, {
value: o,
children: r
});
};
a.displayName = t + "Provider";
function o(n) {
let a = e.useContext(i);
if (a) return a;
if (r !== void 0) return r;
throw Error(`\`${n}\` must be used within \`${t}\``);
}
return [a, o];
}
function l(t, r = []) {
let i = [];
function a(r, a) {
let o = e.createContext(a), s = i.length;
i = [...i, a];
let c = (r) => {
let { scope: i, children: a, ...c } = r, l = i?.[t]?.[s] || o, u = e.useMemo(() => c, Object.values(c));
return /* @__PURE__ */ n(l.Provider, {
value: u,
children: a
});
};
c.displayName = r + "Provider";
function l(n, i) {
let c = i?.[t]?.[s] || o, l = e.useContext(c);
if (l) return l;
if (a !== void 0) return a;
throw Error(`\`${n}\` must be used within \`${r}\``);
}
return [c, l];
}
let o = () => {
let n = i.map((t) => e.createContext(t));
return function(r) {
let i = r?.[t] || n;
return e.useMemo(() => ({ [`__scope${t}`]: {
...r,
[t]: i
} }), [r, i]);
};
};
return o.scopeName = t, [a, u(o, ...r)];
}
function u(...t) {
let n = t[0];
if (t.length === 1) return n;
let r = () => {
let r = t.map((e) => ({
useScope: e(),
scopeName: e.scopeName
}));
return function(t) {
let i = r.reduce((e, { useScope: n, scopeName: r }) => {
let i = n(t)[`__scope${r}`];
return {
...e,
...i
};
}, {});
return e.useMemo(() => ({ [`__scope${n.scopeName}`]: i }), [i]);
};
};
return r.scopeName = n.scopeName, r;
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
/* @__NO_SIDE_EFFECTS__ */
function d(t) {
let r = /* @__PURE__ */ f(t), i = e.forwardRef((t, i) => {
let { children: a, ...o } = t, s = e.Children.toArray(a), c = s.find(h);
if (c) {
let t = c.props.children, a = s.map((n) => n === c ? e.Children.count(t) > 1 ? e.Children.only(null) : e.isValidElement(t) ? t.props.children : null : n);
return /* @__PURE__ */ n(r, {
...o,
ref: i,
children: e.isValidElement(t) ? e.cloneElement(t, void 0, a) : null
});
}
return /* @__PURE__ */ n(r, {
...o,
ref: i,
children: a
});
});
return i.displayName = `${t}.Slot`, i;
}
/* @__NO_SIDE_EFFECTS__ */
function f(t) {
let n = e.forwardRef((t, n) => {
let { children: r, ...i } = t;
if (e.isValidElement(r)) {
let t = _(r), a = g(i, r.props);
return r.type !== e.Fragment && (a.ref = n ? o(n, t) : t), e.cloneElement(r, a);
}
return e.Children.count(r) > 1 ? e.Children.only(null) : null;
});
return n.displayName = `${t}.SlotClone`, n;
}
var p = Symbol("radix.slottable");
/* @__NO_SIDE_EFFECTS__ */
function m(e) {
let r = ({ children: e }) => /* @__PURE__ */ n(t, { children: e });
return r.displayName = `${e}.Slottable`, r.__radixId = p, r;
}
function h(t) {
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === p;
}
function g(e, t) {
let n = { ...t };
for (let r in t) {
let i = e[r], a = t[r];
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
let t = a(...e);
return i(...e), t;
} : i && (n[r] = i) : r === "style" ? n[r] = {
...i,
...a
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
}
return {
...e,
...n
};
}
function _(e) {
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.7_@types+react@18.3.27__@types+re_8fc36fddadfc5720002d5ad7c1f55b49/node_modules/@radix-ui/react-primitive/dist/index.mjs
var v = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
].reduce((t, r) => {
let i = /* @__PURE__ */ d(`Primitive.${r}`), a = e.forwardRef((e, t) => {
let { asChild: a, ...o } = e, s = a ? i : r;
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, {
...o,
ref: t
});
});
return a.displayName = `Primitive.${r}`, {
...t,
[r]: a
};
}, {});
function y(e, t) {
e && r.flushSync(() => e.dispatchEvent(t));
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var b = globalThis?.document ? e.useLayoutEffect : () => {};
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@18.3.7_@types+react@18.3.27__@types+rea_3fd5045f6b2ce13867beb3cd4d530871/node_modules/@radix-ui/react-presence/dist/index.mjs
function x(t, n) {
return e.useReducer((e, t) => n[e][t] ?? e, t);
}
var S = (t) => {
let { present: n, children: r } = t, i = C(n), a = typeof r == "function" ? r({ present: i.isPresent }) : e.Children.only(r), o = s(i.ref, T(a));
return typeof r == "function" || i.isPresent ? e.cloneElement(a, { ref: o }) : null;
};
S.displayName = "Presence";
function C(t) {
let [n, r] = e.useState(), i = e.useRef(null), a = e.useRef(t), o = e.useRef("none"), [s, c] = x(t ? "mounted" : "unmounted", {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: { MOUNT: "mounted" }
});
return e.useEffect(() => {
let e = w(i.current);
o.current = s === "mounted" ? e : "none";
}, [s]), b(() => {
let e = i.current, n = a.current;
if (n !== t) {
let r = o.current, i = w(e);
t ? c("MOUNT") : i === "none" || e?.display === "none" ? c("UNMOUNT") : c(n && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), a.current = t;
}
}, [t, c]), b(() => {
if (n) {
let e, t = n.ownerDocument.defaultView ?? window, r = (r) => {
let o = w(i.current).includes(CSS.escape(r.animationName));
if (r.target === n && o && (c("ANIMATION_END"), !a.current)) {
let r = n.style.animationFillMode;
n.style.animationFillMode = "forwards", e = t.setTimeout(() => {
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = r);
});
}
}, s = (e) => {
e.target === n && (o.current = w(i.current));
};
return n.addEventListener("animationstart", s), n.addEventListener("animationcancel", r), n.addEventListener("animationend", r), () => {
t.clearTimeout(e), n.removeEventListener("animationstart", s), n.removeEventListener("animationcancel", r), n.removeEventListener("animationend", r);
};
} else c("ANIMATION_END");
}, [n, c]), {
isPresent: ["mounted", "unmountSuspended"].includes(s),
ref: e.useCallback((e) => {
i.current = e ? getComputedStyle(e) : null, r(e);
}, [])
};
}
function w(e) {
return e?.animationName || "none";
}
function T(e) {
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var E = e.useInsertionEffect || b;
function D({ prop: t, defaultProp: n, onChange: r = () => {}, caller: i }) {
let [a, o, s] = O({
defaultProp: n,
onChange: r
}), c = t !== void 0, l = c ? t : a;
{
let n = e.useRef(t !== void 0);
e.useEffect(() => {
let e = n.current;
e !== c && console.warn(`${i} is changing from ${e ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), n.current = c;
}, [c, i]);
}
return [l, e.useCallback((e) => {
if (c) {
let n = k(e) ? e(t) : e;
n !== t && s.current?.(n);
} else o(e);
}, [
c,
t,
o,
s
])];
}
function O({ defaultProp: t, onChange: n }) {
let [r, i] = e.useState(t), a = e.useRef(r), o = e.useRef(n);
return E(() => {
o.current = n;
}, [n]), e.useEffect(() => {
a.current !== r && (o.current?.(r), a.current = r);
}, [r, a]), [
r,
i,
o
];
}
function k(e) {
return typeof e == "function";
}
//#endregion
export { y as a, c, s as d, i as f, v as i, l, S as n, d as o, b as r, m as s, D as t, o as u };
import { a as e, d as t, f as n, i as r, r as i } from "./dist-bK-AHWLF.js";
import * as a from "react";
import { jsx as o } from "react/jsx-runtime";
import s from "react-dom";
//#region node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
function c(e) {
let t = a.useRef(e);
return a.useEffect(() => {
t.current = e;
}), a.useMemo(() => (...e) => t.current?.(...e), []);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
function l(e, t = globalThis?.document) {
let n = c(e);
a.useEffect(() => {
let e = (e) => {
e.key === "Escape" && n(e);
};
return t.addEventListener("keydown", e, { capture: !0 }), () => t.removeEventListener("keydown", e, { capture: !0 });
}, [n, t]);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@18.3.7_@types+react@18.3.27___dcde4bd9d3907d7eba47126fb3340842/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
var u = "DismissableLayer", d = "dismissableLayer.update", f = "dismissableLayer.pointerDownOutside", p = "dismissableLayer.focusOutside", m, h = a.createContext({
layers: /* @__PURE__ */ new Set(),
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
branches: /* @__PURE__ */ new Set()
}), g = a.forwardRef((e, i) => {
let { disableOutsidePointerEvents: s = !1, onEscapeKeyDown: c, onPointerDownOutside: u, onFocusOutside: f, onInteractOutside: p, onDismiss: g, ..._ } = e, v = a.useContext(h), [S, C] = a.useState(null), w = S?.ownerDocument ?? globalThis?.document, [, T] = a.useState({}), E = t(i, (e) => C(e)), D = Array.from(v.layers), [O] = [...v.layersWithOutsidePointerEventsDisabled].slice(-1), k = D.indexOf(O), A = S ? D.indexOf(S) : -1, j = v.layersWithOutsidePointerEventsDisabled.size > 0, M = A >= k, N = y((e) => {
let t = e.target, n = [...v.branches].some((e) => e.contains(t));
!M || n || (u?.(e), p?.(e), e.defaultPrevented || g?.());
}, w), P = b((e) => {
let t = e.target;
[...v.branches].some((e) => e.contains(t)) || (f?.(e), p?.(e), e.defaultPrevented || g?.());
}, w);
return l((e) => {
A === v.layers.size - 1 && (c?.(e), !e.defaultPrevented && g && (e.preventDefault(), g()));
}, w), a.useEffect(() => {
if (S) return s && (v.layersWithOutsidePointerEventsDisabled.size === 0 && (m = w.body.style.pointerEvents, w.body.style.pointerEvents = "none"), v.layersWithOutsidePointerEventsDisabled.add(S)), v.layers.add(S), x(), () => {
s && v.layersWithOutsidePointerEventsDisabled.size === 1 && (w.body.style.pointerEvents = m);
};
}, [
S,
w,
s,
v
]), a.useEffect(() => () => {
S && (v.layers.delete(S), v.layersWithOutsidePointerEventsDisabled.delete(S), x());
}, [S, v]), a.useEffect(() => {
let e = () => T({});
return document.addEventListener(d, e), () => document.removeEventListener(d, e);
}, []), /* @__PURE__ */ o(r.div, {
..._,
ref: E,
style: {
pointerEvents: j ? M ? "auto" : "none" : void 0,
...e.style
},
onFocusCapture: n(e.onFocusCapture, P.onFocusCapture),
onBlurCapture: n(e.onBlurCapture, P.onBlurCapture),
onPointerDownCapture: n(e.onPointerDownCapture, N.onPointerDownCapture)
});
});
g.displayName = u;
var _ = "DismissableLayerBranch", v = a.forwardRef((e, n) => {
let i = a.useContext(h), s = a.useRef(null), c = t(n, s);
return a.useEffect(() => {
let e = s.current;
if (e) return i.branches.add(e), () => {
i.branches.delete(e);
};
}, [i.branches]), /* @__PURE__ */ o(r.div, {
...e,
ref: c
});
});
v.displayName = _;
function y(e, t = globalThis?.document) {
let n = c(e), r = a.useRef(!1), i = a.useRef(() => {});
return a.useEffect(() => {
let e = (e) => {
if (e.target && !r.current) {
let r = function() {
S(f, n, a, { discrete: !0 });
}, a = { originalEvent: e };
e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = r, t.addEventListener("click", i.current, { once: !0 })) : r();
} else t.removeEventListener("click", i.current);
r.current = !1;
}, a = window.setTimeout(() => {
t.addEventListener("pointerdown", e);
}, 0);
return () => {
window.clearTimeout(a), t.removeEventListener("pointerdown", e), t.removeEventListener("click", i.current);
};
}, [t, n]), { onPointerDownCapture: () => r.current = !0 };
}
function b(e, t = globalThis?.document) {
let n = c(e), r = a.useRef(!1);
return a.useEffect(() => {
let e = (e) => {
e.target && !r.current && S(p, n, { originalEvent: e }, { discrete: !1 });
};
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
}, [t, n]), {
onFocusCapture: () => r.current = !0,
onBlurCapture: () => r.current = !1
};
}
function x() {
let e = new CustomEvent(d);
document.dispatchEvent(e);
}
function S(t, n, r, { discrete: i }) {
let a = r.originalEvent.target, o = new CustomEvent(t, {
bubbles: !1,
cancelable: !0,
detail: r
});
n && a.addEventListener(t, n, { once: !0 }), i ? e(a, o) : a.dispatchEvent(o);
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
var C = a.useId || (() => void 0), w = 0;
function T(e) {
let [t, n] = a.useState(C());
return i(() => {
e || n((e) => e ?? String(w++));
}, [e]), e || (t ? `radix-${t}` : "");
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react_ad66f61ba8072589babcd5af3002b951/node_modules/@radix-ui/react-portal/dist/index.mjs
var E = "Portal", D = a.forwardRef((e, t) => {
let { container: n, ...c } = e, [l, u] = a.useState(!1);
i(() => u(!0), []);
let d = n || l && globalThis?.document?.body;
return d ? s.createPortal(/* @__PURE__ */ o(r.div, {
...c,
ref: t
}), d) : null;
});
D.displayName = E;
//#endregion
export { c as i, T as n, g as r, D as t };
import { r as e } from "./dist-bK-AHWLF.js";
import * as t from "react";
//#region node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs
function n(n) {
let [r, i] = t.useState(void 0);
return e(() => {
if (n) {
i({
width: n.offsetWidth,
height: n.offsetHeight
});
let e = new ResizeObserver((e) => {
if (!Array.isArray(e) || !e.length) return;
let t = e[0], r, a;
if ("borderBoxSize" in t) {
let e = t.borderBoxSize, n = Array.isArray(e) ? e[0] : e;
r = n.inlineSize, a = n.blockSize;
} else r = n.offsetWidth, a = n.offsetHeight;
i({
width: r,
height: a
});
});
return e.observe(n, { box: "border-box" }), () => e.unobserve(n);
} else i(void 0);
}, [n]), r;
}
//#endregion
export { n as t };
import { a as e, d as t, f as n, i as r, l as i, n as a, o, t as s, u as c } from "./dist-bK-AHWLF.js";
import { i as l, n as u, r as d, t as f } from "./dist-BRVqFn7R.js";
import { a as p, i as m, n as h, r as g, t as _ } from "./dist-7FA4Do6I.js";
import { i as v, n as y, r as b, t as x } from "./Combination-DqNkTtir.js";
import * as S from "react";
import C from "react";
import { jsx as w } from "react/jsx-runtime";
//#region node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@18.3.7_@types+react@18.3.27__@types+r_2a160d6c4f7d367deed369796ce196e5/node_modules/@radix-ui/react-collection/dist/index.mjs
function T(e) {
let n = e + "CollectionProvider", [r, a] = i(n), [s, c] = r(n, {
collectionRef: { current: null },
itemMap: /* @__PURE__ */ new Map()
}), l = (e) => {
let { scope: t, children: n } = e, r = C.useRef(null), i = C.useRef(/* @__PURE__ */ new Map()).current;
return /* @__PURE__ */ w(s, {
scope: t,
itemMap: i,
collectionRef: r,
children: n
});
};
l.displayName = n;
let u = e + "CollectionSlot", d = o(u), f = C.forwardRef((e, n) => {
let { scope: r, children: i } = e;
return /* @__PURE__ */ w(d, {
ref: t(n, c(u, r).collectionRef),
children: i
});
});
f.displayName = u;
let p = e + "CollectionItemSlot", m = "data-radix-collection-item", h = o(p), g = C.forwardRef((e, n) => {
let { scope: r, children: i, ...a } = e, o = C.useRef(null), s = t(n, o), l = c(p, r);
return C.useEffect(() => (l.itemMap.set(o, {
ref: o,
...a
}), () => void l.itemMap.delete(o))), /* @__PURE__ */ w(h, {
[m]: "",
ref: s,
children: i
});
});
g.displayName = p;
function _(t) {
let n = c(e + "CollectionConsumer", t);
return C.useCallback(() => {
let e = n.collectionRef.current;
if (!e) return [];
let t = Array.from(e.querySelectorAll(`[${m}]`));
return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
}, [n.collectionRef, n.itemMap]);
}
return [
{
Provider: l,
Slot: f,
ItemSlot: g
},
_,
a
];
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs
var E = S.createContext(void 0);
function D(e) {
let t = S.useContext(E);
return e || t || "ltr";
}
//#endregion
//#region node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@18.3.7_@types+react@18.3.27__@type_7c6f9bc85f65519fbef65d6b537f1710/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
var O = "rovingFocusGroup.onEntryFocus", ee = {
bubbles: !1,
cancelable: !0
}, k = "RovingFocusGroup", [A, j, M] = T(k), [N, P] = i(k, [M]), [te, F] = N(k), I = S.forwardRef((e, t) => /* @__PURE__ */ w(A.Provider, {
scope: e.__scopeRovingFocusGroup,
children: /* @__PURE__ */ w(A.Slot, {
scope: e.__scopeRovingFocusGroup,
children: /* @__PURE__ */ w(L, {
...e,
ref: t
})
})
}));
I.displayName = k;
var L = S.forwardRef((e, i) => {
let { __scopeRovingFocusGroup: a, orientation: o, loop: c = !1, dir: u, currentTabStopId: d, defaultCurrentTabStopId: f, onCurrentTabStopIdChange: p, onEntryFocus: m, preventScrollOnEntryFocus: h = !1, ...g } = e, _ = S.useRef(null), v = t(i, _), y = D(u), [b, x] = s({
prop: d,
defaultProp: f ?? null,
onChange: p,
caller: k
}), [C, T] = S.useState(!1), E = l(m), A = j(a), M = S.useRef(!1), [N, P] = S.useState(0);
return S.useEffect(() => {
let e = _.current;
if (e) return e.addEventListener(O, E), () => e.removeEventListener(O, E);
}, [E]), /* @__PURE__ */ w(te, {
scope: a,
orientation: o,
dir: y,
loop: c,
currentTabStopId: b,
onItemFocus: S.useCallback((e) => x(e), [x]),
onItemShiftTab: S.useCallback(() => T(!0), []),
onFocusableItemAdd: S.useCallback(() => P((e) => e + 1), []),
onFocusableItemRemove: S.useCallback(() => P((e) => e - 1), []),
children: /* @__PURE__ */ w(r.div, {
tabIndex: C || N === 0 ? -1 : 0,
"data-orientation": o,
...g,
ref: v,
style: {
outline: "none",
...e.style
},
onMouseDown: n(e.onMouseDown, () => {
M.current = !0;
}),
onFocus: n(e.onFocus, (e) => {
let t = !M.current;
if (e.target === e.currentTarget && t && !C) {
let t = new CustomEvent(O, ee);
if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
let e = A().filter((e) => e.focusable);
oe([
e.find((e) => e.active),
e.find((e) => e.id === b),
...e
].filter(Boolean).map((e) => e.ref.current), h);
}
}
M.current = !1;
}),
onBlur: n(e.onBlur, () => T(!1))
})
});
}), ne = "RovingFocusGroupItem", re = S.forwardRef((e, t) => {
let { __scopeRovingFocusGroup: i, focusable: a = !0, active: o = !1, tabStopId: s, children: c, ...l } = e, d = u(), f = s || d, p = F(ne, i), m = p.currentTabStopId === f, h = j(i), { onFocusableItemAdd: g, onFocusableItemRemove: _, currentTabStopId: v } = p;
return S.useEffect(() => {
if (a) return g(), () => _();
}, [
a,
g,
_
]), /* @__PURE__ */ w(A.ItemSlot, {
scope: i,
id: f,
focusable: a,
active: o,
children: /* @__PURE__ */ w(r.span, {
tabIndex: m ? 0 : -1,
"data-orientation": p.orientation,
...l,
ref: t,
onMouseDown: n(e.onMouseDown, (e) => {
a ? p.onItemFocus(f) : e.preventDefault();
}),
onFocus: n(e.onFocus, () => p.onItemFocus(f)),
onKeyDown: n(e.onKeyDown, (e) => {
if (e.key === "Tab" && e.shiftKey) {
p.onItemShiftTab();
return;
}
if (e.target !== e.currentTarget) return;
let t = ae(e, p.orientation, p.dir);
if (t !== void 0) {
if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
e.preventDefault();
let n = h().filter((e) => e.focusable).map((e) => e.ref.current);
if (t === "last") n.reverse();
else if (t === "prev" || t === "next") {
t === "prev" && n.reverse();
let r = n.indexOf(e.currentTarget);
n = p.loop ? se(n, r + 1) : n.slice(r + 1);
}
setTimeout(() => oe(n));
}
}),
children: typeof c == "function" ? c({
isCurrentTabStop: m,
hasTabStop: v != null
}) : c
})
});
});
re.displayName = ne;
var ie = {
ArrowLeft: "prev",
ArrowUp: "prev",
ArrowRight: "next",
ArrowDown: "next",
PageUp: "first",
Home: "first",
PageDown: "last",
End: "last"
};
function R(e, t) {
return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
}
function ae(e, t, n) {
let r = R(e.key, n);
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return ie[r];
}
function oe(e, t = !1) {
let n = document.activeElement;
for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
}
function se(e, t) {
return e.map((n, r) => e[(t + r) % e.length]);
}
var ce = I, le = re, z = ["Enter", " "], ue = [
"ArrowDown",
"PageUp",
"Home"
], de = [
"ArrowUp",
"PageDown",
"End"
], fe = [...ue, ...de], pe = {
ltr: [...z, "ArrowRight"],
rtl: [...z, "ArrowLeft"]
}, me = {
ltr: ["ArrowLeft"],
rtl: ["ArrowRight"]
}, B = "Menu", [V, he, ge] = T(B), [H, _e] = i(B, [
ge,
p,
P
]), U = p(), ve = P(), [ye, W] = H(B), [be, G] = H(B), xe = (e) => {
let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = U(t), [c, u] = S.useState(null), d = S.useRef(!1), f = l(a), p = D(i);
return S.useEffect(() => {
let e = () => {
d.current = !0, document.addEventListener("pointerdown", t, {
capture: !0,
once: !0
}), document.addEventListener("pointermove", t, {
capture: !0,
once: !0
});
}, t = () => d.current = !1;
return document.addEventListener("keydown", e, { capture: !0 }), () => {
document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
};
}, []), /* @__PURE__ */ w(m, {
...s,
children: /* @__PURE__ */ w(ye, {
scope: t,
open: n,
onOpenChange: f,
content: c,
onContentChange: u,
children: /* @__PURE__ */ w(be, {
scope: t,
onClose: S.useCallback(() => f(!1), [f]),
isUsingKeyboardRef: d,
dir: p,
modal: o,
children: r
})
})
});
};
xe.displayName = B;
var Se = "MenuAnchor", Ce = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...r } = e;
return /* @__PURE__ */ w(_, {
...U(n),
...r,
ref: t
});
});
Ce.displayName = Se;
var we = "MenuPortal", [Te, Ee] = H(we, { forceMount: void 0 }), De = (e) => {
let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, o = W(we, t);
return /* @__PURE__ */ w(Te, {
scope: t,
forceMount: n,
children: /* @__PURE__ */ w(a, {
present: n || o.open,
children: /* @__PURE__ */ w(f, {
asChild: !0,
container: i,
children: r
})
})
});
};
De.displayName = we;
var K = "MenuContent", [Oe, ke] = H(K), Ae = S.forwardRef((e, t) => {
let n = Ee(K, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, o = W(K, e.__scopeMenu), s = G(K, e.__scopeMenu);
return /* @__PURE__ */ w(V.Provider, {
scope: e.__scopeMenu,
children: /* @__PURE__ */ w(a, {
present: r || o.open,
children: /* @__PURE__ */ w(V.Slot, {
scope: e.__scopeMenu,
children: s.modal ? /* @__PURE__ */ w(je, {
...i,
ref: t
}) : /* @__PURE__ */ w(Me, {
...i,
ref: t
})
})
})
});
}), je = S.forwardRef((e, r) => {
let i = W(K, e.__scopeMenu), a = S.useRef(null), o = t(r, a);
return S.useEffect(() => {
let e = a.current;
if (e) return y(e);
}, []), /* @__PURE__ */ w(Pe, {
...e,
ref: o,
trapFocus: i.open,
disableOutsidePointerEvents: i.open,
disableOutsideScroll: !0,
onFocusOutside: n(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
onDismiss: () => i.onOpenChange(!1)
});
}), Me = S.forwardRef((e, t) => {
let n = W(K, e.__scopeMenu);
return /* @__PURE__ */ w(Pe, {
...e,
ref: t,
trapFocus: !1,
disableOutsidePointerEvents: !1,
disableOutsideScroll: !1,
onDismiss: () => n.onOpenChange(!1)
});
}), Ne = o("MenuContent.ScrollLock"), Pe = S.forwardRef((e, r) => {
let { __scopeMenu: i, loop: a = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: f, onPointerDownOutside: p, onFocusOutside: m, onInteractOutside: h, onDismiss: _, disableOutsideScroll: y, ...C } = e, T = W(K, i), E = G(K, i), D = U(i), O = ve(i), ee = he(i), [k, A] = S.useState(null), j = S.useRef(null), M = t(r, j, T.onContentChange), N = S.useRef(0), P = S.useRef(""), te = S.useRef(0), F = S.useRef(null), I = S.useRef("right"), L = S.useRef(0), ne = y ? x : S.Fragment, re = y ? {
as: Ne,
allowPinchZoom: !0
} : void 0, ie = (e) => {
let t = P.current + e, n = ee().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = mt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
(function e(t) {
P.current = t, window.clearTimeout(N.current), t !== "" && (N.current = window.setTimeout(() => e(""), 1e3));
})(t), o && setTimeout(() => o.focus());
};
S.useEffect(() => () => window.clearTimeout(N.current), []), v();
let R = S.useCallback((e) => I.current === F.current?.side && gt(e, F.current?.area), []);
return /* @__PURE__ */ w(Oe, {
scope: i,
searchRef: P,
onItemEnter: S.useCallback((e) => {
R(e) && e.preventDefault();
}, [R]),
onItemLeave: S.useCallback((e) => {
R(e) || (j.current?.focus(), A(null));
}, [R]),
onTriggerLeave: S.useCallback((e) => {
R(e) && e.preventDefault();
}, [R]),
pointerGraceTimerRef: te,
onPointerGraceIntentChange: S.useCallback((e) => {
F.current = e;
}, []),
children: /* @__PURE__ */ w(ne, {
...re,
children: /* @__PURE__ */ w(b, {
asChild: !0,
trapped: o,
onMountAutoFocus: n(s, (e) => {
e.preventDefault(), j.current?.focus({ preventScroll: !0 });
}),
onUnmountAutoFocus: c,
children: /* @__PURE__ */ w(d, {
asChild: !0,
disableOutsidePointerEvents: l,
onEscapeKeyDown: f,
onPointerDownOutside: p,
onFocusOutside: m,
onInteractOutside: h,
onDismiss: _,
children: /* @__PURE__ */ w(ce, {
asChild: !0,
...O,
dir: E.dir,
orientation: "vertical",
loop: a,
currentTabStopId: k,
onCurrentTabStopIdChange: A,
onEntryFocus: n(u, (e) => {
E.isUsingKeyboardRef.current || e.preventDefault();
}),
preventScrollOnEntryFocus: !0,
children: /* @__PURE__ */ w(g, {
role: "menu",
"aria-orientation": "vertical",
"data-state": ut(T.open),
"data-radix-menu-content": "",
dir: E.dir,
...D,
...C,
ref: M,
style: {
outline: "none",
...C.style
},
onKeyDown: n(C.onKeyDown, (e) => {
let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
t && (e.key === "Tab" && e.preventDefault(), !n && r && ie(e.key));
let i = j.current;
if (e.target !== i || !fe.includes(e.key)) return;
e.preventDefault();
let a = ee().filter((e) => !e.disabled).map((e) => e.ref.current);
de.includes(e.key) && a.reverse(), ft(a);
}),
onBlur: n(e.onBlur, (e) => {
e.currentTarget.contains(e.target) || (window.clearTimeout(N.current), P.current = "");
}),
onPointerMove: n(e.onPointerMove, Z((e) => {
let t = e.target, n = L.current !== e.clientX;
e.currentTarget.contains(t) && n && (I.current = e.clientX > L.current ? "right" : "left", L.current = e.clientX);
}))
})
})
})
})
})
});
});
Ae.displayName = K;
var Fe = "MenuGroup", Ie = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...i } = e;
return /* @__PURE__ */ w(r.div, {
role: "group",
...i,
ref: t
});
});
Ie.displayName = Fe;
var Le = "MenuLabel", Re = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...i } = e;
return /* @__PURE__ */ w(r.div, {
...i,
ref: t
});
});
Re.displayName = Le;
var q = "MenuItem", ze = "menu.itemSelect", J = S.forwardRef((r, i) => {
let { disabled: a = !1, onSelect: o, ...s } = r, c = S.useRef(null), l = G(q, r.__scopeMenu), u = ke(q, r.__scopeMenu), d = t(i, c), f = S.useRef(!1), p = () => {
let t = c.current;
if (!a && t) {
let n = new CustomEvent(ze, {
bubbles: !0,
cancelable: !0
});
t.addEventListener(ze, (e) => o?.(e), { once: !0 }), e(t, n), n.defaultPrevented ? f.current = !1 : l.onClose();
}
};
return /* @__PURE__ */ w(Be, {
...s,
ref: d,
disabled: a,
onClick: n(r.onClick, p),
onPointerDown: (e) => {
r.onPointerDown?.(e), f.current = !0;
},
onPointerUp: n(r.onPointerUp, (e) => {
f.current || e.currentTarget?.click();
}),
onKeyDown: n(r.onKeyDown, (e) => {
let t = u.searchRef.current !== "";
a || t && e.key === " " || z.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
})
});
});
J.displayName = q;
var Be = S.forwardRef((e, i) => {
let { __scopeMenu: a, disabled: o = !1, textValue: s, ...c } = e, l = ke(q, a), u = ve(a), d = S.useRef(null), f = t(i, d), [p, m] = S.useState(!1), [h, g] = S.useState("");
return S.useEffect(() => {
let e = d.current;
e && g((e.textContent ?? "").trim());
}, [c.children]), /* @__PURE__ */ w(V.ItemSlot, {
scope: a,
disabled: o,
textValue: s ?? h,
children: /* @__PURE__ */ w(le, {
asChild: !0,
...u,
focusable: !o,
children: /* @__PURE__ */ w(r.div, {
role: "menuitem",
"data-highlighted": p ? "" : void 0,
"aria-disabled": o || void 0,
"data-disabled": o ? "" : void 0,
...c,
ref: f,
onPointerMove: n(e.onPointerMove, Z((e) => {
o ? l.onItemLeave(e) : (l.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
})),
onPointerLeave: n(e.onPointerLeave, Z((e) => l.onItemLeave(e))),
onFocus: n(e.onFocus, () => m(!0)),
onBlur: n(e.onBlur, () => m(!1))
})
})
});
}), Ve = "MenuCheckboxItem", He = S.forwardRef((e, t) => {
let { checked: r = !1, onCheckedChange: i, ...a } = e;
return /* @__PURE__ */ w(Xe, {
scope: e.__scopeMenu,
checked: r,
children: /* @__PURE__ */ w(J, {
role: "menuitemcheckbox",
"aria-checked": X(r) ? "mixed" : r,
...a,
ref: t,
"data-state": dt(r),
onSelect: n(a.onSelect, () => i?.(X(r) ? !0 : !r), { checkForDefaultPrevented: !1 })
})
});
});
He.displayName = Ve;
var Ue = "MenuRadioGroup", [We, Ge] = H(Ue, {
value: void 0,
onValueChange: () => {}
}), Ke = S.forwardRef((e, t) => {
let { value: n, onValueChange: r, ...i } = e, a = l(r);
return /* @__PURE__ */ w(We, {
scope: e.__scopeMenu,
value: n,
onValueChange: a,
children: /* @__PURE__ */ w(Ie, {
...i,
ref: t
})
});
});
Ke.displayName = Ue;
var qe = "MenuRadioItem", Je = S.forwardRef((e, t) => {
let { value: r, ...i } = e, a = Ge(qe, e.__scopeMenu), o = r === a.value;
return /* @__PURE__ */ w(Xe, {
scope: e.__scopeMenu,
checked: o,
children: /* @__PURE__ */ w(J, {
role: "menuitemradio",
"aria-checked": o,
...i,
ref: t,
"data-state": dt(o),
onSelect: n(i.onSelect, () => a.onValueChange?.(r), { checkForDefaultPrevented: !1 })
})
});
});
Je.displayName = qe;
var Ye = "MenuItemIndicator", [Xe, Ze] = H(Ye, { checked: !1 }), Qe = S.forwardRef((e, t) => {
let { __scopeMenu: n, forceMount: i, ...o } = e, s = Ze(Ye, n);
return /* @__PURE__ */ w(a, {
present: i || X(s.checked) || s.checked === !0,
children: /* @__PURE__ */ w(r.span, {
...o,
ref: t,
"data-state": dt(s.checked)
})
});
});
Qe.displayName = Ye;
var $e = "MenuSeparator", et = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...i } = e;
return /* @__PURE__ */ w(r.div, {
role: "separator",
"aria-orientation": "horizontal",
...i,
ref: t
});
});
et.displayName = $e;
var tt = "MenuArrow", nt = S.forwardRef((e, t) => {
let { __scopeMenu: n, ...r } = e;
return /* @__PURE__ */ w(h, {
...U(n),
...r,
ref: t
});
});
nt.displayName = tt;
var rt = "MenuSub", [it, at] = H(rt), ot = (e) => {
let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = W(rt, t), o = U(t), [s, c] = S.useState(null), [d, f] = S.useState(null), p = l(i);
return S.useEffect(() => (a.open === !1 && p(!1), () => p(!1)), [a.open, p]), /* @__PURE__ */ w(m, {
...o,
children: /* @__PURE__ */ w(ye, {
scope: t,
open: r,
onOpenChange: p,
content: d,
onContentChange: f,
children: /* @__PURE__ */ w(it, {
scope: t,
contentId: u(),
triggerId: u(),
trigger: s,
onTriggerChange: c,
children: n
})
})
});
};
ot.displayName = rt;
var Y = "MenuSubTrigger", st = S.forwardRef((e, t) => {
let r = W(Y, e.__scopeMenu), i = G(Y, e.__scopeMenu), a = at(Y, e.__scopeMenu), o = ke(Y, e.__scopeMenu), s = S.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = o, d = { __scopeMenu: e.__scopeMenu }, f = S.useCallback(() => {
s.current && window.clearTimeout(s.current), s.current = null;
}, []);
return S.useEffect(() => f, [f]), S.useEffect(() => {
let e = l.current;
return () => {
window.clearTimeout(e), u(null);
};
}, [l, u]), /* @__PURE__ */ w(Ce, {
asChild: !0,
...d,
children: /* @__PURE__ */ w(Be, {
id: a.triggerId,
"aria-haspopup": "menu",
"aria-expanded": r.open,
"aria-controls": a.contentId,
"data-state": ut(r.open),
...e,
ref: c(t, a.onTriggerChange),
onClick: (t) => {
e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), r.open || r.onOpenChange(!0));
},
onPointerMove: n(e.onPointerMove, Z((t) => {
o.onItemEnter(t), !t.defaultPrevented && !e.disabled && !r.open && !s.current && (o.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
r.onOpenChange(!0), f();
}, 100));
})),
onPointerLeave: n(e.onPointerLeave, Z((e) => {
f();
let t = r.content?.getBoundingClientRect();
if (t) {
let n = r.content?.dataset.side, i = n === "right", a = i ? -5 : 5, s = t[i ? "left" : "right"], c = t[i ? "right" : "left"];
o.onPointerGraceIntentChange({
area: [
{
x: e.clientX + a,
y: e.clientY
},
{
x: s,
y: t.top
},
{
x: c,
y: t.top
},
{
x: c,
y: t.bottom
},
{
x: s,
y: t.bottom
}
],
side: n
}), window.clearTimeout(l.current), l.current = window.setTimeout(() => o.onPointerGraceIntentChange(null), 300);
} else {
if (o.onTriggerLeave(e), e.defaultPrevented) return;
o.onPointerGraceIntentChange(null);
}
})),
onKeyDown: n(e.onKeyDown, (t) => {
let n = o.searchRef.current !== "";
e.disabled || n && t.key === " " || pe[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
})
})
});
});
st.displayName = Y;
var ct = "MenuSubContent", lt = S.forwardRef((e, r) => {
let i = Ee(K, e.__scopeMenu), { forceMount: o = i.forceMount, ...s } = e, c = W(K, e.__scopeMenu), l = G(K, e.__scopeMenu), u = at(ct, e.__scopeMenu), d = S.useRef(null), f = t(r, d);
return /* @__PURE__ */ w(V.Provider, {
scope: e.__scopeMenu,
children: /* @__PURE__ */ w(a, {
present: o || c.open,
children: /* @__PURE__ */ w(V.Slot, {
scope: e.__scopeMenu,
children: /* @__PURE__ */ w(Pe, {
id: u.contentId,
"aria-labelledby": u.triggerId,
...s,
ref: f,
align: "start",
side: l.dir === "rtl" ? "left" : "right",
disableOutsidePointerEvents: !1,
disableOutsideScroll: !1,
trapFocus: !1,
onOpenAutoFocus: (e) => {
l.isUsingKeyboardRef.current && d.current?.focus(), e.preventDefault();
},
onCloseAutoFocus: (e) => e.preventDefault(),
onFocusOutside: n(e.onFocusOutside, (e) => {
e.target !== u.trigger && c.onOpenChange(!1);
}),
onEscapeKeyDown: n(e.onEscapeKeyDown, (e) => {
l.onClose(), e.preventDefault();
}),
onKeyDown: n(e.onKeyDown, (e) => {
let t = e.currentTarget.contains(e.target), n = me[l.dir].includes(e.key);
t && n && (c.onOpenChange(!1), u.trigger?.focus(), e.preventDefault());
})
})
})
})
});
});
lt.displayName = ct;
function ut(e) {
return e ? "open" : "closed";
}
function X(e) {
return e === "indeterminate";
}
function dt(e) {
return X(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
function ft(e) {
let t = document.activeElement;
for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
}
function pt(e, t) {
return e.map((n, r) => e[(t + r) % e.length]);
}
function mt(e, t, n) {
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = pt(e, Math.max(i, 0));
r.length === 1 && (a = a.filter((e) => e !== n));
let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
return o === n ? void 0 : o;
}
function ht(e, t) {
let { x: n, y: r } = e, i = !1;
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
}
return i;
}
function gt(e, t) {
return t ? ht({
x: e.clientX,
y: e.clientY
}, t) : !1;
}
function Z(e) {
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
}
var _t = xe, vt = Ce, yt = De, bt = Ae, xt = Ie, St = Re, Ct = J, wt = He, Tt = Ke, Et = Je, Dt = Qe, Ot = et, kt = nt, At = st, jt = lt, Q = "DropdownMenu", [Mt, Nt] = i(Q, [_e]), $ = _e(), [Pt, Ft] = Mt(Q), It = (e) => {
let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: c = !0 } = e, l = $(t), d = S.useRef(null), [f, p] = s({
prop: i,
defaultProp: a ?? !1,
onChange: o,
caller: Q
});
return /* @__PURE__ */ w(Pt, {
scope: t,
triggerId: u(),
triggerRef: d,
contentId: u(),
open: f,
onOpenChange: p,
onOpenToggle: S.useCallback(() => p((e) => !e), [p]),
modal: c,
children: /* @__PURE__ */ w(_t, {
...l,
open: f,
onOpenChange: p,
dir: r,
modal: c,
children: n
})
});
};
It.displayName = Q;
var Lt = "DropdownMenuTrigger", Rt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: i, disabled: a = !1, ...o } = e, s = Ft(Lt, i);
return /* @__PURE__ */ w(vt, {
asChild: !0,
...$(i),
children: /* @__PURE__ */ w(r.button, {
type: "button",
id: s.triggerId,
"aria-haspopup": "menu",
"aria-expanded": s.open,
"aria-controls": s.open ? s.contentId : void 0,
"data-state": s.open ? "open" : "closed",
"data-disabled": a ? "" : void 0,
disabled: a,
...o,
ref: c(t, s.triggerRef),
onPointerDown: n(e.onPointerDown, (e) => {
!a && e.button === 0 && e.ctrlKey === !1 && (s.onOpenToggle(), s.open || e.preventDefault());
}),
onKeyDown: n(e.onKeyDown, (e) => {
a || (["Enter", " "].includes(e.key) && s.onOpenToggle(), e.key === "ArrowDown" && s.onOpenChange(!0), [
"Enter",
" ",
"ArrowDown"
].includes(e.key) && e.preventDefault());
})
})
});
});
Rt.displayName = Lt;
var zt = "DropdownMenuPortal", Bt = (e) => {
let { __scopeDropdownMenu: t, ...n } = e;
return /* @__PURE__ */ w(yt, {
...$(t),
...n
});
};
Bt.displayName = zt;
var Vt = "DropdownMenuContent", Ht = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: r, ...i } = e, a = Ft(Vt, r), o = $(r), s = S.useRef(!1);
return /* @__PURE__ */ w(bt, {
id: a.contentId,
"aria-labelledby": a.triggerId,
...o,
...i,
ref: t,
onCloseAutoFocus: n(e.onCloseAutoFocus, (e) => {
s.current || a.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
}),
onInteractOutside: n(e.onInteractOutside, (e) => {
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
(!a.modal || r) && (s.current = !0);
}),
style: {
...e.style,
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
}
});
});
Ht.displayName = Vt;
var Ut = "DropdownMenuGroup", Wt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(xt, {
...$(n),
...r,
ref: t
});
});
Wt.displayName = Ut;
var Gt = "DropdownMenuLabel", Kt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(St, {
...$(n),
...r,
ref: t
});
});
Kt.displayName = Gt;
var qt = "DropdownMenuItem", Jt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Ct, {
...$(n),
...r,
ref: t
});
});
Jt.displayName = qt;
var Yt = "DropdownMenuCheckboxItem", Xt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(wt, {
...$(n),
...r,
ref: t
});
});
Xt.displayName = Yt;
var Zt = "DropdownMenuRadioGroup", Qt = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Tt, {
...$(n),
...r,
ref: t
});
});
Qt.displayName = Zt;
var $t = "DropdownMenuRadioItem", en = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Et, {
...$(n),
...r,
ref: t
});
});
en.displayName = $t;
var tn = "DropdownMenuItemIndicator", nn = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Dt, {
...$(n),
...r,
ref: t
});
});
nn.displayName = tn;
var rn = "DropdownMenuSeparator", an = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(Ot, {
...$(n),
...r,
ref: t
});
});
an.displayName = rn;
var on = "DropdownMenuArrow", sn = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(kt, {
...$(n),
...r,
ref: t
});
});
sn.displayName = on;
var cn = "DropdownMenuSubTrigger", ln = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(At, {
...$(n),
...r,
ref: t
});
});
ln.displayName = cn;
var un = "DropdownMenuSubContent", dn = S.forwardRef((e, t) => {
let { __scopeDropdownMenu: n, ...r } = e;
return /* @__PURE__ */ w(jt, {
...$(n),
...r,
ref: t,
style: {
...e.style,
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
}
});
});
dn.displayName = un;
var fn = It, pn = Rt, mn = Bt, hn = Ht, gn = Wt, _n = Jt, vn = an;
//#endregion
export { fn as a, mn as i, gn as n, vn as o, _n as r, pn as s, hn as t };
import { useDocumentContext as e } from "./contexts/RPDocumentContext.js";
import { useLayoutContainer as t } from "./contexts/LayoutContainerContext.js";
import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
import { useOtherToolContext as r } from "./contexts/OtherToolContext.js";
import { dateFormatter as i } from "./utils/dateFormatter.js";
import { c as a, d as o, f as s, i as c, l, n as u, o as d, t as f } from "./dist-bK-AHWLF.js";
import { n as p, r as m, t as h } from "./dist-BRVqFn7R.js";
import { i as g, n as ee, r as _, t as v } from "./Combination-DqNkTtir.js";
import { CloseIcon as te } from "./components/icons/CloseIcon.js";
import { t as y } from "./PropertyItem-evJWWmWZ.js";
import * as b from "react";
import { useMemo as x } from "react";
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
import './assets/DocumentDialog.css';//#region node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@18.3.7_@types+react@18.3.27__@types+reac_2e279b9f45eaccf149bfa3a9b35ce50c/node_modules/@radix-ui/react-dialog/dist/index.mjs
var T = "Dialog", [E, ne] = l(T), [D, O] = E(T), k = (e) => {
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = b.useRef(null), c = b.useRef(null), [l, u] = f({
prop: r,
defaultProp: i ?? !1,
onChange: a,
caller: T
});
return /* @__PURE__ */ C(D, {
scope: t,
triggerRef: s,
contentRef: c,
contentId: p(),
titleId: p(),
descriptionId: p(),
open: l,
onOpenChange: u,
onOpenToggle: b.useCallback(() => u((e) => !e), [u]),
modal: o,
children: n
});
};
k.displayName = T;
var A = "DialogTrigger", j = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(A, n), a = o(t, i.triggerRef);
return /* @__PURE__ */ C(c.button, {
type: "button",
"aria-haspopup": "dialog",
"aria-expanded": i.open,
"aria-controls": i.contentId,
"data-state": Y(i.open),
...r,
ref: a,
onClick: s(e.onClick, i.onOpenToggle)
});
});
j.displayName = A;
var M = "DialogPortal", [N, P] = E(M, { forceMount: void 0 }), F = (e) => {
let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = O(M, t);
return /* @__PURE__ */ C(N, {
scope: t,
forceMount: n,
children: b.Children.map(r, (e) => /* @__PURE__ */ C(u, {
present: n || a.open,
children: /* @__PURE__ */ C(h, {
asChild: !0,
container: i,
children: e
})
}))
});
};
F.displayName = M;
var I = "DialogOverlay", L = b.forwardRef((e, t) => {
let n = P(I, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = O(I, e.__scopeDialog);
return a.modal ? /* @__PURE__ */ C(u, {
present: r || a.open,
children: /* @__PURE__ */ C(ie, {
...i,
ref: t
})
}) : null;
});
L.displayName = I;
var re = d("DialogOverlay.RemoveScroll"), ie = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(I, n);
return /* @__PURE__ */ C(v, {
as: re,
allowPinchZoom: !0,
shards: [i.contentRef],
children: /* @__PURE__ */ C(c.div, {
"data-state": Y(i.open),
...r,
ref: t,
style: {
pointerEvents: "auto",
...r.style
}
})
});
}), R = "DialogContent", z = b.forwardRef((e, t) => {
let n = P(R, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = O(R, e.__scopeDialog);
return /* @__PURE__ */ C(u, {
present: r || a.open,
children: a.modal ? /* @__PURE__ */ C(B, {
...i,
ref: t
}) : /* @__PURE__ */ C(V, {
...i,
ref: t
})
});
});
z.displayName = R;
var B = b.forwardRef((e, t) => {
let n = O(R, e.__scopeDialog), r = b.useRef(null), i = o(t, n.contentRef, r);
return b.useEffect(() => {
let e = r.current;
if (e) return ee(e);
}, []), /* @__PURE__ */ C(H, {
...e,
ref: i,
trapFocus: n.open,
disableOutsidePointerEvents: !0,
onCloseAutoFocus: s(e.onCloseAutoFocus, (e) => {
e.preventDefault(), n.triggerRef.current?.focus();
}),
onPointerDownOutside: s(e.onPointerDownOutside, (e) => {
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
(t.button === 2 || n) && e.preventDefault();
}),
onFocusOutside: s(e.onFocusOutside, (e) => e.preventDefault())
});
}), V = b.forwardRef((e, t) => {
let n = O(R, e.__scopeDialog), r = b.useRef(!1), i = b.useRef(!1);
return /* @__PURE__ */ C(H, {
...e,
ref: t,
trapFocus: !1,
disableOutsidePointerEvents: !1,
onCloseAutoFocus: (t) => {
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
},
onInteractOutside: (t) => {
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
let a = t.target;
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
}
});
}), H = b.forwardRef((e, t) => {
let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...s } = e, c = O(R, n), l = b.useRef(null), u = o(t, l);
return g(), /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(_, {
asChild: !0,
loop: !0,
trapped: r,
onMountAutoFocus: i,
onUnmountAutoFocus: a,
children: /* @__PURE__ */ C(m, {
role: "dialog",
id: c.contentId,
"aria-describedby": c.descriptionId,
"aria-labelledby": c.titleId,
"data-state": Y(c.open),
...s,
ref: u,
onDismiss: () => c.onOpenChange(!1)
})
}), /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(oe, { titleId: c.titleId }), /* @__PURE__ */ C(Q, {
contentRef: l,
descriptionId: c.descriptionId
})] })] });
}), U = "DialogTitle", W = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(U, n);
return /* @__PURE__ */ C(c.h2, {
id: i.titleId,
...r,
ref: t
});
});
W.displayName = U;
var G = "DialogDescription", K = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(G, n);
return /* @__PURE__ */ C(c.p, {
id: i.descriptionId,
...r,
ref: t
});
});
K.displayName = G;
var q = "DialogClose", J = b.forwardRef((e, t) => {
let { __scopeDialog: n, ...r } = e, i = O(q, n);
return /* @__PURE__ */ C(c.button, {
type: "button",
...r,
ref: t,
onClick: s(e.onClick, () => i.onOpenChange(!1))
});
});
J.displayName = q;
function Y(e) {
return e ? "open" : "closed";
}
var X = "DialogTitleWarning", [ae, Z] = a(X, {
contentName: R,
titleName: U,
docsSlug: "dialog"
}), oe = ({ titleId: e }) => {
let t = Z(X), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
return b.useEffect(() => {
e && (document.getElementById(e) || console.error(n));
}, [n, e]), null;
}, se = "DialogDescriptionWarning", Q = ({ contentRef: e, descriptionId: t }) => {
let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Z(se).contentName}}.`;
return b.useEffect(() => {
let r = e.current?.getAttribute("aria-describedby");
t && r && (document.getElementById(t) || console.warn(n));
}, [
n,
e,
t
]), null;
}, ce = k, le = F, ue = L, de = z, fe = W, pe = J, $ = {
"rp-dialog-wrapper": "_rp-dialog-wrapper_39boz_1",
"rp-dialog-overlay": "_rp-dialog-overlay_39boz_7",
"rp-document-dialog": "_rp-document-dialog_39boz_13",
"rp-dialog-title": "_rp-dialog-title_39boz_35",
"rp-dialog-close": "_rp-dialog-close_39boz_44",
"rp-properties-divider": "_rp-properties-divider_39boz_52"
}, me = () => {
let { pdfProperties: a } = e(), { container: o } = t(), { activeDocumentProperties: s, setActiveDocumentProperties: c } = r(), { localeMessages: l } = n(), u = x(() => {
if (!a) return [];
let { fileSize: e, filename: t, title: n, author: r, subject: o, createdOn: s, creator: c, keywords: u, modifiedOn: d, pdfProducer: f, pdfVersion: p, pageCount: m } = a;
return [
{
label: l?.propertiesFilenameLabel,
value: t
},
{
label: l?.propertiesFileSizeLabel,
value: e
},
{ separate: !0 },
{
label: l?.propertiesTitleLabel,
value: n
},
{
label: l?.propertiesAuthorLabel,
value: r
},
{
label: l?.propertiesSubjectLabel,
value: o
},
{
label: l?.propertiesKeywordLabel,
value: u
},
{
label: l?.propertiesCreatorLabel,
value: c
},
{
label: l?.propertiesCreateOnLabel,
value: s ? i(s) : ""
},
{
label: l?.propertiesModifiedOnLabel,
value: d ? i(d) : ""
},
{ separate: !0 },
{
label: l?.propertiesPDFProducerLabel,
value: f
},
{
label: l?.propertiesPDFVersionLabel,
value: p
},
{
label: l?.propertiesPageCountLabel,
value: m
}
];
}, [a, l]);
return /* @__PURE__ */ C(ce, {
open: s,
onOpenChange: c,
children: /* @__PURE__ */ C(le, {
container: o,
children: /* @__PURE__ */ w("div", {
className: $["rp-dialog-wrapper"],
children: [/* @__PURE__ */ C(ue, { className: $["rp-dialog-overlay"] }), /* @__PURE__ */ w(de, {
className: $["rp-document-dialog"],
"aria-describedby": void 0,
children: [
/* @__PURE__ */ C(fe, {
className: $["rp-dialog-title"],
children: l?.documentPropertiesLabel ?? "Document properties"
}),
/* @__PURE__ */ C("div", {
className: $["rp-document-properties"],
role: "region",
"aria-label": l?.documentPropertiesLabel ?? "Document properties",
children: u.map((e, t) => /* @__PURE__ */ C("div", { children: e.separate ? /* @__PURE__ */ C("div", {
className: $["rp-properties-divider"],
role: "separator",
"aria-orientation": "horizontal"
}) : /* @__PURE__ */ C(y, {
label: e.label,
value: e.value
}) }, t))
}),
/* @__PURE__ */ C(pe, {
asChild: !0,
className: $["rp-dialog-close"],
"aria-label": l?.searchCloseButtonTooltip || "Close dialog",
children: /* @__PURE__ */ C(te, { "aria-hidden": "true" })
})
]
})]
})
})
});
};
//#endregion
export { me as t };
import { t as e } from "./clsx-B7LyVm5O.js";
import { a as t, i as n, s as r, t as i } from "./dist-CKteKPPA.js";
import { jsx as a, jsxs as o } from "react/jsx-runtime";
import './assets/DropDown.css';var s = {
"rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
slideDownAndFade: "_slideDownAndFade_1vzkq_1",
slideLeftAndFade: "_slideLeftAndFade_1vzkq_1",
slideUpAndFade: "_slideUpAndFade_1vzkq_1",
slideRightAndFade: "_slideRightAndFade_1vzkq_1",
"rp-dropdown-arrow": "_rp-dropdown-arrow_1vzkq_30"
}, c = (c) => {
let { triggerComponent: l, children: u, container: d, className: f, open: p, onOpenChange: m, ...h } = c;
return /* @__PURE__ */ o(t, {
modal: !1,
open: p,
onOpenChange: m,
children: [/* @__PURE__ */ a(r, {
asChild: !0,
children: l
}), /* @__PURE__ */ a(n, {
container: d,
children: /* @__PURE__ */ a(i, {
sideOffset: 8,
align: "end",
...h,
className: e(s["rp-dropdown-content"], f),
children: u
})
})]
});
};
//#endregion
export { c as t };
import { t as e } from "./clsx-B7LyVm5O.js";
import { withRef as t } from "./utils/withRef.js";
import { useId as n } from "react";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import './assets/Input.css';//#region lib/components/ui/Input.module.css
var a = {
"rp-input": "_rp-input_dun7b_1",
"rp-input-wrapper": "_rp-input-wrapper_dun7b_28",
"rp-input-label": "_rp-input-label_dun7b_32",
"rp-input-icon": "_rp-input-icon_dun7b_44"
}, o = t((t, o) => {
let { className: s, icon: c, children: l, id: u, label: d, ...f } = t, p = n(), m = u || p, h = f.role || (f.type === "text" || !f.type ? "textbox" : void 0);
return /* @__PURE__ */ i("div", {
className: a["rp-input-wrapper"],
children: [
d ? /* @__PURE__ */ r("label", {
htmlFor: m,
className: a["rp-input-label"],
children: d
}) : null,
/* @__PURE__ */ r("input", {
...f,
id: m,
role: h,
"data-icon": !!c,
ref: o,
className: e(s, a["rp-input"], "ignore-hover")
}),
c && /* @__PURE__ */ r("span", {
className: a["rp-input-icon"],
"aria-hidden": "true",
children: c
}),
l
]
});
});
//#endregion
export { o as t };
import { t as e } from "./clsx-B7LyVm5O.js";
import { jsx as t } from "react/jsx-runtime";
import './assets/LoaderIcon.css';//#region lib/assets/loader.png
var n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABPbSURBVHgB5Vx7jB3ldT/nm7mPfXqxsQFj4msCMYRCTCBVDCFeUlEVhQa7ld0SpcI0KSFUwIJCq6ZqvUZV2iR/sDZJWuiDpU1UCUsYUEOgIuxaFKgiCyelMTbYeNfYMeDX2l7v4975vi/n8c3c67UXP9Y29t6zujvvmTu/+zuP75wzg/ARyjVP7pnisfEG7+Ei7+yViDALvLsIPDgH/kIAz2LB0R7eD9AhW2luAJzdBojvWqj83Cbxmxu/Ov0AfESCcBpl3uO+DZrLCyLAGzy6W2jVRQIOoUZAOQYMHFiPNO9oFdISrfHO8Tb68LLnZToGrALMZ/Dv0uzPE+9fgl371m78y8tOG6CnBcDPPOUXeEw6CJHPI/hWBsAHMOSjyFkBkbhGizoPvOSEgb4GQBb64gI6f4yexMqxgi4+42zSu+HOi9bAKZZTBuC81b4tNu4+9L6DbquNVI5JRTfOCND9old2eVkXGMfs0vXCtMAyASWsFyC9q4Kpv4aA6BU8WY98agfb6PPPWCi8vv6OGe/BKZCTDmA7ATdCwNEd3kc30kY3h4iomooEpyUNRQVOQPLpPIHC652ocmAds8r6wEYnW3mbbILAWF4VzoE+sBIcKjsVfITtBOlzG+/62ONwkuWkAvjZZ/ztdJ+dBECJcPN6n8w5L9fhpWDrAvtcBgSGm6WVVtRTwXKqkmADINmneg4+VrAKao/EPqu2Ueyp88bJpZmt22naveEbc16AkyQnBcDPrvYljOzj9DXbvZ6WbwjZmLHqCpAeUhA9ZEC4jFnMHrpDq8BkAMt2r3YwqC1bQAKNLYJzquLMVLWrys6MjcxE2omugKL9aiNp/5dHy/jDLR0Xvw8TFAMTlPmryx3G2HWEVjurqKAUfhZU+qFMURnIgGaCJqwkoSNlR4bc1/ywgoUeL+aQ90TIfhGTXi6sEzMJPvwMTuAyukFZKUoA1+dy/h8v7XrrJpignDAD2dbZyC2j79WhqqnrAwPlv6uu1hllJVRtGNPGb6H5NbThl2Te+qHst45GZuD/b2t8t/Z6V/1o96wIoLXi4ULSyrl09rmep95foA4nqHCq4hICOVFkupoNF3VMaHEzyPvTQQ5Wb77nksfgBOWEAGz/qS8liVtNX2Me2zpdS1/J1xAqnN4razIJ/OilDasLhdwzr34R+2ECcvW/7pw5CuVr6UZuoXNfrZobVJq9uao1m1bmtthWUWeylR6CCwO/2Y1Ef7f5wUs+gOOU4waQwXMV10NwlQ5lXZhXPVWdAfSBcayFe4kRKxsh7updhANwCuTy/9h5AYwMf40ufDVdd4YR/83IaYijsWMIheRLCXWFqbSOwpz4rzfde+nO47nmcQHI4BHne+i6JV4eA5DaKLZg6TLINx6gvVYUTyFwY2Xudza0RK0NN5NZ/UPCZ4YwMQTvqLEmW1y1kBoJ+OD53/cm/pvjAfGYAWTwgMEDmO1TV4tis7GqtuJ4Uabyz60ouLjzdAE3Vj75gy3n+whuJ7xuYtiMRlEh2A7+RONGvhX12mA/8EPlZZu+9eljAvGYAGTw6PfqoUvOlhUBKQVL1RYztZXlPvqad/zvolwvnAHCQFq03yUezoAw2lG1BgnYMXUw3qW38D6MjD50LCAeUxiD1q2mK8xGHUughBshNuE/I6GJBs2srnkXXX2mgMey/s/nvBf5kbuJgk859crirY0Mk1LwJC6S3592mOaK8QMXPLq28WjnPioDv/Bf9mHaqyNzGDokq/GumdrSj2nvf+VL+S44g+Wyrje/bE30R6y5VbVlPEGcTVAjXs3++vktD175ow8734cCSKp7u3HucQhGDTIHAVANZXXWJ/ZPX16U74azQD7+yIYvRNbd4yUo5ESGhDuQjqOzqJWZaeHHW/7iyv8e71zjAsh2L3LudZo9J5wc0vCkNkyRk6D9dO8X87+As0jmfu+Xc2wcf1c8c7CBTA8nY1AZ7mkY62BwtJL/2+3funz3kc4zrg2MvWfVbUsRVsMH6UBLhmz68XecbeCxbHzwU1vAm++H9EYKHk+dU5akSYuGXDzy1fHOc0QAb/pJspROtzAN5qpg6UhW/Ydc8qHeW+In4CyVTQ9cvgaM7UZIwVMHzbGijDOdZsPJ2Xxi9vden3+kcxyZgYjLmHEBLZ9+UiCBvYZzK3t/P9cJZ7lsvu9Tz9Pt/FTHyaLOVmyiF/MYbCFa4/GWCzqfPcwrHwbg7/7EEngSsrD4jHE+S7Qwrv0uiTthksjB5tGnjHc7fchKiIcWVdacpOYn7NR8ceaNY489BMDf44DZ4NJUdU3IMCmIVUYWwLR/VKOLUyE7vn7tEFX4/oVDGSkv8EiFcIwMhnmUOJHAap91/6sNtceOYaBtpxOUUs1Vx6ue1qDORx6eeG6CGZQzUfq+ee0Gbysv6hBPSGc5Y6sEtKEm44twLrbXHjcGQLJ9MlGvi5wg1YSoDBbJmPZjubwcJqmMjuCzRJpBqUWjjA58Og/BKxsffb72mAzAm19IFhJQJZ7P7F+t21W1XvH8ooY+mKSyo/PaIaru/Qx9Wn32UirVeox1Air6wqy/f/WS9JgMQCrF3JpF1epx2RykhGQw+0ZHTTdMcinnyy8R0wbZG6PmDEWPDQ+aSZUlzKng59L9BcCFPb6NMFoqNQ2lbkgYmKoXBuidTI5jPNn2wHXDNCru0U4I9cKaKxSLSPkI5CLNxaXOLUXeXwBMyuQ8UBKiaZIlzSvXlIAmr+0bK0lTskaLhjIudprBQctJWE1CYN6Z7R/nfQVA2nirOAwTxrY1H3K/5L597/M3T17bN1aYhcSzt4WFMsxzWqCWAinbRkt/WOJ9jf4j18zsCx63xndwfo+Kj+4JqDNxmLzhpY/CsSOx6hA0JkRWZe8v5/0M2z9CrqTeAjPPi9XaLkRge6HeJIJfaQUvdEhYqQRo+4TawbZSZ0/RQJLM4/0l7tORW0gup6kq6Hu6jtQ3la1/dcNewMoeF8bFTltJLMfXRkra3o5CoUT5UrNAD/FVuxe6AJiFpN5nXarqZInxZrNmrSWkyTrJ0r6HyNgphozgHHYgBjFrkUBt0eCuKqZs3QKYuGSHtOJpa53Vnh3KQ1m1h5WyOy8mmGdDWpcSHcYwimGhvY2pWwDJ1e5FYwkso71NEpFonoD7oHIxtMa0doqSLihxmrYKlTZKHvRDnUri3EDORM6lfUvWh/IJw+ggsQQgUa3EO6c1oprhnPyjGGYv1Kk0Wz8yHHELHdtD0kbORqmDkGpUxIwk9knRyISab+Z9g1N56ncmX+rqWOWd79y0LwqZackVSobByshE8zSuJQ6ZFqiyLwVRszlQ55IQcJpxSVvP9NGBVOIsbDlEau1gfUsUWlrF6oWZtLGTF+NsT0mehq4gXQF1Tz+QNIwF8cI+6xo1FPxxaoZLHpyp7w8pfPXDMpxTQ8k28Q9+5mdDncrUZc+1aszHLGT+6ce5RMbEFe+HTAiaQ5tQLZAgTUOR1c6EepTCYJLHKATODm3tUwKI8gDAPlblPtVZn9k8zOCkdcaWoE7FYaEFbCIZaSoN64MTISNDKy1p8gg5EdcPmdVT0dxqGItAVLcqbGKYymkD4DRgxA6FG7nSWAUJSbufQkH8RajAZdW4GlvoicHzoE4FK8lURgkjtYOstNZwNosLJZZm/f6YEOyTnvXQ8ydT7d7VeNDhAqhToaxpW/aESTratSCFEY6UK7louylEUW8a7qUZGUyDau2lnPPlOvTE0+9+spkKwk0EG+UA+QPpU1ScFeSWfzsjv3+36b4RBySUCUM4n1XlUFs7BHa3COpMMN84gxTW8sgtPPAtKSx2v9r+4Q6s71xS1pqIMas15S/9H9UBSOgZJmbeCnUnycXqcQkzKxVNGQbzPNtCWtzBewmABPSaav1XW3kxy1BLinDBUqkd14ec980XmkhXpyMHgPqEjqUoRgNpfZCet0iSRQBUO0iqLIzTfph0aJcCm/Dzv3UiiR26gkHjWE9YaAQXaXejBKkUlc5/tyxPegqAbAdpsoZ3M9qDnz4hWVMndh11wcI71+bIYUyLWE2NdnMgx9KYCIhiB8vlzetXLSnz7tXeGLRdoSshLGcdWiE5iFNcHbBwSmHTxyjUK1pPgBFw2iNIILrISl9CIjmZben+h+Sr/qTH7eXH9AHx8I0goO4lxb44MHbyyf1PNkxLzPWUOW2KyLWCdhQhj0EorUXVEU8Di2ho58qFz6WHHNIfSL66i46r7YWutnnoAOUcOmIZTFJpS+JPkNlriL2yjhmInMmXDnSyh4RNxdpf1R5zCIBUoltBkO+ThVDeVK8ceqWNOBiyhZV2mGxC7KNK20x1GtzWxvZOumGsZrM4gLaDDZXcIc/PHQKgqqZfkfUHhgxN1vYhU9pmoscnlUNp74xbRuy1MWX4GCxJwMgj2uhilFcncUjtKpHr2/HYl4ZqDz2sS58Uv4t415/FhWmRHTIi8vrZcTR5VLl17qVzyPUWSUcJPCtqS4GfBcqkWKdsJGdy8MCKJRvHHnsYgDq0c8uzDgVfJZ5Ow1CZVPlrPbYDznJpW/qfJRPBLGYZxW42jnLqdcnegUt8HKk9JF3ccKTjx60aLe11PYTUgtBviWMPSBMO/FjEY5/DJ+AslPPu+vcZoz66jMweKV6en0/i53UNe4OIppT/M5bmKX75YN8P/vj1I51j/OeFPd5B8AwoEbH6bFzaApfu53z3n73iz76c4Z3PNg5ZvETGtfJqHlJdI2kreT2A9GGRSlN8XGnJmzfHO824AJIq99GpHkofcc3Aq2n7Des4273uG//Dby06O6TltkfPbXW7r2KQYsOF80S9bEVHGvy0JsY8Erb8gp83tz28ZHi8c33oE+v/diOSQ3Er026F6uNe2XDFaxucvKmo+65X/BnvWJpJbbE5P4dZxyAlBFJiIvK4iYQv3PpHxKNl6T/o3/X92379YefDo12Qw5XYcNc6zKvtWpVpzdGpmpOsKFRgedeZNlrp7DSNWy86n2zceTmMDYUnpuIo4xmJp6TliIq9EujS1NIeuYO7Hr1t7dFOe9R3JrBXjh0uolFNHy/Xqq/G2LXrJO99Xznn193Vo69GOSPkzkcbC+/MvASNOxdt5CvEtmG2dZxnhgRyxMCkbIWNrM4uZ4ba8lPeOJZTH5WBqTAgVJnqAX6SU9JdoZEVNAkbcojSaaPDPqkvd9uKWf5PNyr4p12IdU0bL5yORTtN2ZUzOeOEecxACCyMI869OxNHBTSQVNryA29seuTe0WO5xDEDyHLXa75EPx+rc+kQdc68cvrCNgzPmAiSfTS7IqpA92lTawIO3poxpVAonJO3lkaoOaOqmQiIZONomZQ0qCvPV+iw5hxUpuT2rT9W8FiOC0AWZqKP4SUCaE51lOKrQ73gsbmbMxSl0n6cLTS/hqbLu+afIkYy67/ySEuDbZ7icwdjb/LCsjxQYdISywwBRnVIShZEDBiDyvaQQaQvWDm36eCG4wGP5bgBZGEQMQfy8rHscdg02M5ixsBAKVJJLAnZez4Qe+l/t4eRNV3zJ/gEALNtLRShobXYGOWKPiqSLx2lGLiChYZWM1IZIYAizOerICobDeYKsUxpADe6p3lwMxwneHIrMAG5+2XbRWBokhUlhEe1iSlgaVICfI1KZ1UroxtJxWEdTf8PY1jnytBP/nDgHw5nqdZrYImBa84xcOX8iAqzeRjamoO42TTFzjT4KDqYjxHKzhSKJhqxCRaIhSM2QlbbvICXExaSKRJVLiblXbuHp70Hq5ZYOAGZEIAsd7/ilxITH6YTtWG1u7Ua4aQjl1Ai0PmaYBxDCMS4Gn2XSrqNAf72b/Pi4ohBK7XMjPqaiewN0w3krYGDe0xL67nRgWFnmos5StuNRJBw1zK5VVZX/i/gsTKz7eNlE5ZjX8lVPjjw2Nd3wQRkwm+w/OH12J2P8GqafSYNtMMLotJ6ir7FEtP5at1UAcdMs0OjbNgWXuhDs4sXL6Y110DcMNVfwBv3DfmpPG2bAgeGy5R6H3SDg4MwNJr3Q+W8h8hKGpQHsRjlaJmsHgXHZVpXjmj0EZvBPbnK2xMFjyWGkyDBKSy89zUaznnopI96aXUkmL3/E2scdpA01QNjX/1ZVX9YFVZs4n+793loacI9hSYPB3b6VsjD/mIem5O8Hxyt+Ebumzc535B3OMQWrZL4YoP3IxXvG+JCxVRye/Z0f2U/nCSZMANrZeV8fGLldTiHZpeD2jZMew19yif974PvFkmTtz7dFlZne69a79tbdtDM2wBzr/JwHq3fpeTZT+NXSIwbjAvEtApFJInHcuKHy5aWiX3G+tHRvC063D1Q6t+658cnD7zw3U+NdLwmDzAuoDE6uUksQRrv+DRRCzWJWkgTjembHDNv/u3P0GBrySoD77xoYMZvGWhODBStmT7SSLXqA9HenDetlQLuJycCI2T3yBY2kjPx7EwseeKcHRwo7dtP3trBKZBTBmCtdLzq+X0MCwmT26thTk2iMW0Kg+BU0oK+OBEwixevMqve2WtgeAfOuqI12ja8H6GBtCc/lRwJORMCEZIR2jsXNdNxUUNTZd+0ZOhEwpLjlZNiA48mXdfh0zR5umOd74iGoZ1und/P0O7lhY4hvKnphkiPC6/Xo8+TlIMiFb4YMG7a72GYVhab/NRdu2FPcwPtdo6FZptAWyEZXHlPOcsenQY5LQwcTwjQtuIIzCPdaqfFEgUYsynEoCAP+TWjbZiFMZ2mnWDvnc42+5MAV9Dev37Rw1szPfQss6cTsLHyG7LNE1I07Q7WAAAAAElFTkSuQmCC", r = {
"rp-loader-icon": "_rp-loader-icon_7y2fm_1",
spin: "_spin_7y2fm_1"
}, i = ({ className: i, ...a }) => /* @__PURE__ */ t("img", {
...a,
className: e(r["rp-loader-icon"], i),
alt: "loader",
src: n
});
//#endregion
export { i as t };
import { useLocalizationContext as e } from "./contexts/LocalizationContext.js";
import { usePrintContext as t } from "./contexts/PrintContext.js";
import { t as n } from "./clsx-B7LyVm5O.js";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import './assets/LoadingIndicator.css';var a = {
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
"rp-loading-title": "_rp-loading-title_wazy2_27",
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
loading: "_loading_wazy2_1"
}, o = ({ percentage: o }) => {
let { cancel: s } = t(), { localeMessages: c } = e();
return o < 1 ? null : /* @__PURE__ */ r("div", {
className: n(a["rp-loading-overlay"]),
children: /* @__PURE__ */ i("div", {
className: n(a["rp-loading-modal"]),
children: [
/* @__PURE__ */ i("div", {
className: n(a["rp-loading-title"]),
children: [c?.printLoadingMessage, "..."]
}),
/* @__PURE__ */ r("div", {
className: n(a["rp-loading-progress-bar"]),
children: /* @__PURE__ */ r("div", {
className: n(a["rp-loading-progress"]),
style: { width: `${o}%` }
})
}),
/* @__PURE__ */ r("button", {
className: n(a["rp-loading-cancel-button"]),
onClick: s,
onKeyDown: (e) => {
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), s());
},
autoFocus: !0,
children: c?.printCancelLabel
})
]
})
});
};
//#endregion
export { o as t };
import { useViewModeContext as e } from "./contexts/ViewModeContext.js";
import { r as t } from "./PaginationContext-Cwf8sCpK.js";
import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
import { t as r } from "./Button-BNlmxWrV.js";
import { t as i } from "./RPTooltip-ZZoFqP7C.js";
import { DualPageWithCoverIcon as a } from "./components/icons/DualPageWithCoverIcon.js";
import { GoToDownIcon as o } from "./components/icons/GoToDownIcon.js";
import { t as s } from "./MostPageTool.module-BRVv-sGz.js";
import { useCallback as c } from "react";
import { jsx as l } from "react/jsx-runtime";
//#region lib/components/layout/toolbar/tools/DualPageWithCoverTool.tsx
var u = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ l(i, {
className: t,
content: n?.dualPageWithCoverTooltip,
children: e
}), d = ({ icon: t }) => {
let { setDualPageWithCover: i } = e(), { localeMessages: o } = n();
return /* @__PURE__ */ l(u, {
localeMessages: o,
children: /* @__PURE__ */ l(r, {
onClick: i,
"aria-label": o?.dualPageWithCoverTooltip,
children: t || /* @__PURE__ */ l(a, {})
})
});
}, f = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ l(i, {
className: t,
content: n?.firstPageTooltip,
children: e
}), p = ({ icon: e }) => {
let { goToPage: i } = t(), { localeMessages: a } = n();
return /* @__PURE__ */ l(f, {
localeMessages: a,
children: /* @__PURE__ */ l(r, {
onClick: c(() => {
i(1);
}, [i]),
"aria-label": a?.firstPageTooltip,
children: e || /* @__PURE__ */ l(o, { className: s["rp-go-to-Top"] })
})
});
}, m = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ l(i, {
className: t,
content: n?.lastPageTooltip,
children: e
}), h = ({ icon: e }) => {
let { goToPage: i, totalPages: a } = t(), { localeMessages: s } = n();
return /* @__PURE__ */ l(m, {
localeMessages: s,
children: /* @__PURE__ */ l(r, {
onClick: c(() => {
i(a);
}, [i, a]),
"aria-label": s?.lastPageTooltip,
children: e || /* @__PURE__ */ l(o, {})
})
});
};
//#endregion
export { p as n, d as r, h as t };
import { t as e } from "./clsx-B7LyVm5O.js";
import { r as t } from "./dist-CKteKPPA.js";
import { jsx as n } from "react/jsx-runtime";
import './assets/MenuItem.css';//#region lib/components/layout/toolbar/MenuItem.module.css
var r = { "rp-menu-item": "_rp-menu-item_cu12j_1" }, i = (i) => {
let { children: a, className: o, ...s } = i;
return /* @__PURE__ */ n(t, {
...s,
tabIndex: 0,
className: e(r["rp-menu-item"], o),
children: a
});
};
//#endregion
export { i as t };
import { o as e } from "./dist-CKteKPPA.js";
import { jsx as t } from "react/jsx-runtime";
import './assets/MenuSeparator.css';//#region lib/components/layout/toolbar/MenuSeparator.module.css
var n = { "rp-menu-separator": "_rp-menu-separator_17dlz_1" }, r = () => /* @__PURE__ */ t(e, { className: n["rp-menu-separator"] });
//#endregion
export { r as t };
import { useDocumentPasswordContext as e } from "./contexts/DocumentPasswordContext.js";
import { useLocalizationContext as t } from "./contexts/LocalizationContext.js";
import { t as n } from "./clsx-B7LyVm5O.js";
import { useState as r } from "react";
import { jsx as i, jsxs as a } from "react/jsx-runtime";
import './assets/PasswordModal.css';//#region lib/components/ui/PasswordModal.module.css
var o = {
"rp-password-overlay": "_rp-password-overlay_9cdbk_1",
"rp-password-modal": "_rp-password-modal_9cdbk_13",
"rp-password-title": "_rp-password-title_9cdbk_27",
"rp-password-content": "_rp-password-content_9cdbk_35",
"rp-password-form": "_rp-password-form_9cdbk_41",
"rp-password-label": "_rp-password-label_9cdbk_45",
"rp-password-input": "_rp-password-input_9cdbk_57",
"rp-password-input-invalid": "_rp-password-input-invalid_9cdbk_74",
"rp-password-message-invalid": "_rp-password-message-invalid_9cdbk_78",
"rp-password-submit-button": "_rp-password-submit-button_9cdbk_84"
}, s = () => {
let [s, c] = r(""), { localeMessages: l } = t(), { setPassword: u, setPasswordError: d, invalidPassword: f } = e(), p = (e) => {
c(e.target.value), f && d(void 0);
}, m = (e) => {
e.preventDefault(), s && s.trim() && u(s);
}, h = !s.trim();
return /* @__PURE__ */ i("div", {
className: n(o["rp-password-overlay"]),
role: "dialog",
"aria-modal": "true",
"aria-labelledby": "password-modal-title",
children: /* @__PURE__ */ a("div", {
className: n(o["rp-password-modal"]),
children: [
/* @__PURE__ */ i("div", {
id: "password-modal-title",
className: n(o["rp-password-title"]),
children: l?.passwordModalTitle
}),
/* @__PURE__ */ i("div", {
id: "password-modal-message",
className: n(o["rp-password-content"]),
children: l?.passwordModalMessage
}),
/* @__PURE__ */ a("form", {
onSubmit: m,
children: [/* @__PURE__ */ a("div", {
className: n(o["rp-password-form"]),
children: [
/* @__PURE__ */ i("label", {
htmlFor: "rp-password-input",
className: o["rp-password-label"],
children: l?.passwordPlaceholder || "Password"
}),
/* @__PURE__ */ i("input", {
type: "password",
id: "rp-password-input",
name: "rp-password-input",
value: s,
onChange: p,
className: n(o["rp-password-input"], f && o["rp-password-input-invalid"]),
placeholder: l?.passwordPlaceholder,
autoComplete: "current-password",
"aria-label": l?.passwordPlaceholder,
"aria-required": "true",
"aria-invalid": f,
"aria-describedby": f ? "password-modal-message password-error" : "password-modal-message"
}),
/* @__PURE__ */ i("div", {
id: "password-error",
className: n(o["rp-password-message-invalid"]),
role: "alert",
"aria-live": "polite",
children: f && /* @__PURE__ */ i("span", { children: l?.passwordError })
})
]
}), /* @__PURE__ */ i("button", {
type: "submit",
disabled: h,
className: n(o["rp-password-submit-button"]),
onClick: m,
"aria-label": l?.passwordConfirmLabel,
children: l?.passwordConfirmLabel
})]
})
]
})
});
};
//#endregion
export { s as t };
import { useDarkModeContext as e } from "./contexts/DarkModeContext.js";
import { useLocalizationContext as t } from "./contexts/LocalizationContext.js";
import { useDropFileZoneContext as n } from "./contexts/DropFileZoneContext.js";
import { t as r } from "./clsx-B7LyVm5O.js";
import { t as i } from "./LightPdfIcon-DL8MYtWQ.js";
import { t as a } from "./DarkPdfIcon-B5ehd9CV.js";
import { useDropFileZone as o } from "./utils/hooks/useDropFileZone.js";
import { useCallback as s } from "react";
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
import './assets/RPDropFileZone.css';//#region lib/components/RPDropFileZone.module.css
var d = {
"rp-drop-zone": "_rp-drop-zone_1sc50_1",
"rp-drop-zone-transparent": "_rp-drop-zone-transparent_1sc50_15"
}, f = {}, p = () => {
let { dragging: p, handleDragLeave: m, handleDrop: h } = n(), { darkMode: g } = e(), { localeMessages: _ } = t(), { DropFileZoneLayout: v, DropFileZoneTool: y, DropFileZoneToolbar: b } = o(), x = [
v,
y,
b
].includes(!1), S = s((e) => {
e.preventDefault();
}, []);
if (!p || x) return null;
let C = (e) => e ? typeof e == "function" ? /* @__PURE__ */ l(e, {}) : typeof e == "boolean" ? null : /* @__PURE__ */ l(c, { children: e }) : null, w = /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", { children: l(g ? a : i, {}) }), /* @__PURE__ */ l("p", { children: _?.dragDropFileMessage })] });
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
className: r(d["rp-drop-zone"], g ? f["rp-dark-mode"] : ""),
children: /* @__PURE__ */ l(() => C(v) ?? C(y) ?? C(b) ?? w, {})
}), /* @__PURE__ */ l("div", {
className: d["rp-drop-zone-transparent"],
onDragOver: S,
onDragLeave: m,
onDrop: h
})] });
};
//#endregion
export { p as t };
import { ErrorType as e, ScrollMode as t, SelectionMode as n, ViewMode as r } from "./utils/types.js";
import { useDocumentPasswordContext as i } from "./contexts/DocumentPasswordContext.js";
import { useDocumentContext as a } from "./contexts/RPDocumentContext.js";
import { useInitialStateContext as o } from "./contexts/InitialStateContext.js";
import { useScrollModeContext as s } from "./contexts/ScrollModeContext.js";
import { useViewModeContext as c } from "./contexts/ViewModeContext.js";
import { useVirtualScrollContext as l } from "./contexts/VirtualScrollContext.js";
import { useLayoutContainer as u } from "./contexts/LayoutContainerContext.js";
import { useEventCallbackContext as d } from "./contexts/EventCallbackContext.js";
import { useDebounce as f } from "./utils/hooks/useDebounce.js";
import { getPageFromPosition as p } from "./utils/calculatePage.js";
import { a as m, r as h } from "./PaginationContext-Cwf8sCpK.js";
import { useSelectionModeContext as g } from "./contexts/SelectionModeContext.js";
import { useFullScreenContext as _ } from "./contexts/FullScreenContext.js";
import { t as v } from "./clsx-B7LyVm5O.js";
import { useLoaderContext as ee } from "./contexts/LoaderContext.js";
import { t as y } from "./RPPage-C_r8aeTc.js";
import { useVirtualReactWindow as te } from "./utils/hooks/useVirtualReactWindow.js";
import { DualPage as ne } from "./components/page/DualPage.js";
import { DualPageWithCover as re } from "./components/page/DualPageWithCover.js";
import { SinglePage as ie } from "./components/page/SinglePage.js";
import { useMousePressed as ae } from "./utils/hooks/useMousePressed.js";
import { useGrabScroll as oe } from "./utils/hooks/useGrabScroll.js";
import { usePinch as se } from "./utils/hooks/usePinch.js";
import { t as b } from "./PasswordModal-CB9Rd2zJ.js";
import { usePresentPage as x } from "./utils/hooks/usePresentPage.js";
import { LayoutContainer as ce } from "./components/layout/LayoutContainer.js";
import { LayoutWrapper as le } from "./components/layout/LayoutWrapper.js";
import { useCopyText as ue } from "./utils/hooks/useCopyText.js";
import { useTextSelection as de } from "./utils/hooks/useTextSelection.js";
import { approximateFraction as fe } from "./utils/approximateFragtion.js";
import { Component as pe, PureComponent as S, createElement as C, memo as me, useCallback as w, useEffect as T, useMemo as he, useRef as E, useState as ge } from "react";
import { OutputScale as _e } from "pdfjs-dist";
import { Fragment as ve, jsx as D, jsxs as ye } from "react/jsx-runtime";
import './assets/RPPages.css';//#region lib/components/RPPages.module.css
var O = {
"rp-pages": "_rp-pages_fn8tz_1",
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_fn8tz_6",
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_fn8tz_11",
"rp-not-supported-list": "_rp-not-supported-list_fn8tz_15",
"rp-pages-container": "_rp-pages-container_fn8tz_23",
"rp-viewer": "_rp-viewer_fn8tz_65",
"rp-cursor-grab": "_rp-cursor-grab_fn8tz_70",
"rp-cursor-grabbing": "_rp-cursor-grabbing_fn8tz_78",
"rp-loader": "_rp-loader_fn8tz_86",
"rp-not-supported": "_rp-not-supported_fn8tz_15",
"rp-not-supported-content": "_rp-not-supported-content_fn8tz_102",
"rp-load-error": "_rp-load-error_fn8tz_108",
"rp-load-error-message": "_rp-load-error-message_fn8tz_116"
};
//#endregion
//#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.js
function k() {
return k = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
}, k.apply(null, arguments);
}
//#endregion
//#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function A(e) {
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
//#endregion
//#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function be(e, t) {
return be = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
return e.__proto__ = t, e;
}, be(e, t);
}
//#endregion
//#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
function xe(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, be(e, t);
}
//#endregion
//#region node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js
var Se = Number.isNaN || function(e) {
return typeof e == "number" && e !== e;
};
function Ce(e, t) {
return !!(e === t || Se(e) && Se(t));
}
function j(e, t) {
if (e.length !== t.length) return !1;
for (var n = 0; n < e.length; n++) if (!Ce(e[n], t[n])) return !1;
return !0;
}
function M(e, t) {
t === void 0 && (t = j);
var n, r = [], i, a = !1;
function o() {
var o = [...arguments];
return a && n === this && t(o, r) ? i : (i = e.apply(this, o), a = !0, n = this, r = o, i);
}
return o;
}
//#endregion
//#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function N(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
if (t.indexOf(r) !== -1) continue;
n[r] = e[r];
}
return n;
}
//#endregion
//#region node_modules/.pnpm/react-window@1.8.11_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-window/dist/index.esm.js
var P = typeof performance == "object" && typeof performance.now == "function" ? function() {
return performance.now();
} : function() {
return Date.now();
};
function we(e) {
cancelAnimationFrame(e.id);
}
function Te(e, t) {
var n = P();
function r() {
P() - n >= t ? e.call(null) : i.id = requestAnimationFrame(r);
}
var i = { id: requestAnimationFrame(r) };
return i;
}
var F = -1;
function Ee(e) {
if (e === void 0 && (e = !1), F === -1 || e) {
var t = document.createElement("div"), n = t.style;
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), F = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
}
return F;
}
var I = null;
function De(e) {
if (e === void 0 && (e = !1), I === null || e) {
var t = document.createElement("div"), n = t.style;
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
var r = document.createElement("div"), i = r.style;
return i.width = "100px", i.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? I = "positive-descending" : (t.scrollLeft = 1, I = t.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(t), I;
}
return I;
}
var Oe = 150, L = function(e) {
var t = e.columnIndex;
return e.data, e.rowIndex + ":" + t;
}, R = null, z = null, B = null;
process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet !== void 0 && (R = /* @__PURE__ */ new WeakSet(), z = /* @__PURE__ */ new WeakSet(), B = /* @__PURE__ */ new WeakSet());
function ke(e) {
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, i = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, o = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, l = e.getOffsetForRowAndAlignment, u = e.getRowHeight, d = e.getRowOffset, f = e.getRowStartIndexForOffset, p = e.getRowStopIndexForStartIndex, m = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
return t = /* @__PURE__ */ function(e) {
xe(t, e);
function t(t) {
var r = e.call(this, t) || this;
return r._instanceProps = m(r.props, A(r)), r._resetIsScrollingTimeoutId = null, r._outerRef = void 0, r.state = {
instance: A(r),
isScrolling: !1,
horizontalScrollDirection: "forward",
scrollLeft: typeof r.props.initialScrollLeft == "number" ? r.props.initialScrollLeft : 0,
scrollTop: typeof r.props.initialScrollTop == "number" ? r.props.initialScrollTop : 0,
scrollUpdateWasRequested: !1,
verticalScrollDirection: "forward"
}, r._callOnItemsRendered = void 0, r._callOnItemsRendered = M(function(e, t, n, i, a, o, s, c) {
return r.props.onItemsRendered({
overscanColumnStartIndex: e,
overscanColumnStopIndex: t,
overscanRowStartIndex: n,
overscanRowStopIndex: i,
visibleColumnStartIndex: a,
visibleColumnStopIndex: o,
visibleRowStartIndex: s,
visibleRowStopIndex: c
});
}), r._callOnScroll = void 0, r._callOnScroll = M(function(e, t, n, i, a) {
return r.props.onScroll({
horizontalScrollDirection: n,
scrollLeft: e,
scrollTop: t,
verticalScrollDirection: i,
scrollUpdateWasRequested: a
});
}), r._getItemStyle = void 0, r._getItemStyle = function(e, t) {
var i = r.props, o = i.columnWidth, s = i.direction, c = i.rowHeight, l = r._getItemStyleCache(h && o, h && s, h && c), f = e + ":" + t, p;
if (l.hasOwnProperty(f)) p = l[f];
else {
var m = n(r.props, t, r._instanceProps), g = s === "rtl";
l[f] = p = {
position: "absolute",
left: g ? void 0 : m,
right: g ? m : void 0,
top: d(r.props, e, r._instanceProps),
height: u(r.props, e, r._instanceProps),
width: a(r.props, t, r._instanceProps)
};
}
return p;
}, r._getItemStyleCache = void 0, r._getItemStyleCache = M(function(e, t, n) {
return {};
}), r._onScroll = function(e) {
var t = e.currentTarget, n = t.clientHeight, i = t.clientWidth, a = t.scrollLeft, o = t.scrollTop, s = t.scrollHeight, c = t.scrollWidth;
r.setState(function(e) {
if (e.scrollLeft === a && e.scrollTop === o) return null;
var t = r.props.direction, l = a;
if (t === "rtl") switch (De()) {
case "negative":
l = -a;
break;
case "positive-descending":
l = c - i - a;
break;
}
l = Math.max(0, Math.min(l, c - i));
var u = Math.max(0, Math.min(o, s - n));
return {
isScrolling: !0,
horizontalScrollDirection: e.scrollLeft < a ? "forward" : "backward",
scrollLeft: l,
scrollTop: u,
verticalScrollDirection: e.scrollTop < o ? "forward" : "backward",
scrollUpdateWasRequested: !1
};
}, r._resetIsScrollingDebounced);
}, r._outerRefSetter = function(e) {
var t = r.props.outerRef;
r._outerRef = e, typeof t == "function" ? t(e) : typeof t == "object" && t && t.hasOwnProperty("current") && (t.current = e);
}, r._resetIsScrollingDebounced = function() {
r._resetIsScrollingTimeoutId !== null && we(r._resetIsScrollingTimeoutId), r._resetIsScrollingTimeoutId = Te(r._resetIsScrolling, Oe);
}, r._resetIsScrolling = function() {
r._resetIsScrollingTimeoutId = null, r.setState({ isScrolling: !1 }, function() {
r._getItemStyleCache(-1);
});
}, r;
}
t.getDerivedStateFromProps = function(e, t) {
return V(e, t), g(e), null;
};
var _ = t.prototype;
return _.scrollTo = function(e) {
var t = e.scrollLeft, n = e.scrollTop;
t !== void 0 && (t = Math.max(0, t)), n !== void 0 && (n = Math.max(0, n)), this.setState(function(e) {
return t === void 0 && (t = e.scrollLeft), n === void 0 && (n = e.scrollTop), e.scrollLeft === t && e.scrollTop === n ? null : {
horizontalScrollDirection: e.scrollLeft < t ? "forward" : "backward",
scrollLeft: t,
scrollTop: n,
scrollUpdateWasRequested: !0,
verticalScrollDirection: e.scrollTop < n ? "forward" : "backward"
};
}, this._resetIsScrollingDebounced);
}, _.scrollToItem = function(e) {
var t = e.align, n = t === void 0 ? "auto" : t, r = e.columnIndex, i = e.rowIndex, a = this.props, u = a.columnCount, d = a.height, f = a.rowCount, p = a.width, m = this.state, h = m.scrollLeft, g = m.scrollTop, _ = Ee();
r !== void 0 && (r = Math.max(0, Math.min(r, u - 1))), i !== void 0 && (i = Math.max(0, Math.min(i, f - 1)));
var v = o(this.props, this._instanceProps), ee = s(this.props, this._instanceProps) > p ? _ : 0, y = v > d ? _ : 0;
this.scrollTo({
scrollLeft: r === void 0 ? h : c(this.props, r, n, h, this._instanceProps, y),
scrollTop: i === void 0 ? g : l(this.props, i, n, g, this._instanceProps, ee)
});
}, _.componentDidMount = function() {
var e = this.props, t = e.initialScrollLeft, n = e.initialScrollTop;
if (this._outerRef != null) {
var r = this._outerRef;
typeof t == "number" && (r.scrollLeft = t), typeof n == "number" && (r.scrollTop = n);
}
this._callPropsCallbacks();
}, _.componentDidUpdate = function() {
var e = this.props.direction, t = this.state, n = t.scrollLeft, r = t.scrollTop;
if (t.scrollUpdateWasRequested && this._outerRef != null) {
var i = this._outerRef;
if (e === "rtl") switch (De()) {
case "negative":
i.scrollLeft = -n;
break;
case "positive-ascending":
i.scrollLeft = n;
break;
default:
var a = i.clientWidth;
i.scrollLeft = i.scrollWidth - a - n;
break;
}
else i.scrollLeft = Math.max(0, n);
i.scrollTop = Math.max(0, r);
}
this._callPropsCallbacks();
}, _.componentWillUnmount = function() {
this._resetIsScrollingTimeoutId !== null && we(this._resetIsScrollingTimeoutId);
}, _.render = function() {
var e = this.props, t = e.children, n = e.className, r = e.columnCount, i = e.direction, a = e.height, c = e.innerRef, l = e.innerElementType, u = e.innerTagName, d = e.itemData, f = e.itemKey, p = f === void 0 ? L : f, m = e.outerElementType, h = e.outerTagName, g = e.rowCount, _ = e.style, v = e.useIsScrolling, ee = e.width, y = this.state.isScrolling, te = this._getHorizontalRangeToRender(), ne = te[0], re = te[1], ie = this._getVerticalRangeToRender(), ae = ie[0], oe = ie[1], se = [];
if (r > 0 && g) for (var b = ae; b <= oe; b++) for (var x = ne; x <= re; x++) se.push(C(t, {
columnIndex: x,
data: d,
isScrolling: v ? y : void 0,
key: p({
columnIndex: x,
data: d,
rowIndex: b
}),
rowIndex: b,
style: this._getItemStyle(b, x)
}));
var ce = o(this.props, this._instanceProps), le = s(this.props, this._instanceProps);
return C(m || h || "div", {
className: n,
onScroll: this._onScroll,
ref: this._outerRefSetter,
style: k({
position: "relative",
height: a,
width: ee,
overflow: "auto",
WebkitOverflowScrolling: "touch",
willChange: "transform",
direction: i
}, _)
}, C(l || u || "div", {
children: se,
ref: c,
style: {
height: ce,
pointerEvents: y ? "none" : void 0,
width: le
}
}));
}, _._callPropsCallbacks = function() {
var e = this.props, t = e.columnCount, n = e.onItemsRendered, r = e.onScroll, i = e.rowCount;
if (typeof n == "function" && t > 0 && i > 0) {
var a = this._getHorizontalRangeToRender(), o = a[0], s = a[1], c = a[2], l = a[3], u = this._getVerticalRangeToRender(), d = u[0], f = u[1], p = u[2], m = u[3];
this._callOnItemsRendered(o, s, d, f, c, l, p, m);
}
if (typeof r == "function") {
var h = this.state, g = h.horizontalScrollDirection, _ = h.scrollLeft, v = h.scrollTop, ee = h.scrollUpdateWasRequested, y = h.verticalScrollDirection;
this._callOnScroll(_, v, g, y, ee);
}
}, _._getHorizontalRangeToRender = function() {
var e = this.props, t = e.columnCount, n = e.overscanColumnCount, a = e.overscanColumnsCount, o = e.overscanCount, s = e.rowCount, c = this.state, l = c.horizontalScrollDirection, u = c.isScrolling, d = c.scrollLeft, f = n || a || o || 1;
if (t === 0 || s === 0) return [
0,
0,
0,
0
];
var p = r(this.props, d, this._instanceProps), m = i(this.props, p, d, this._instanceProps), h = !u || l === "backward" ? Math.max(1, f) : 1, g = !u || l === "forward" ? Math.max(1, f) : 1;
return [
Math.max(0, p - h),
Math.max(0, Math.min(t - 1, m + g)),
p,
m
];
}, _._getVerticalRangeToRender = function() {
var e = this.props, t = e.columnCount, n = e.overscanCount, r = e.overscanRowCount, i = e.overscanRowsCount, a = e.rowCount, o = this.state, s = o.isScrolling, c = o.verticalScrollDirection, l = o.scrollTop, u = r || i || n || 1;
if (t === 0 || a === 0) return [
0,
0,
0,
0
];
var d = f(this.props, l, this._instanceProps), m = p(this.props, d, l, this._instanceProps), h = !s || c === "backward" ? Math.max(1, u) : 1, g = !s || c === "forward" ? Math.max(1, u) : 1;
return [
Math.max(0, d - h),
Math.max(0, Math.min(a - 1, m + g)),
d,
m
];
}, t;
}(S), t.defaultProps = {
direction: "ltr",
itemData: void 0,
useIsScrolling: !1
}, t;
}
var V = function(e, t) {
var n = e.children, r = e.direction, i = e.height, a = e.innerTagName, o = e.outerTagName, s = e.overscanColumnsCount, c = e.overscanCount, l = e.overscanRowsCount, u = e.width, d = t.instance;
if (process.env.NODE_ENV !== "production") {
if (typeof c == "number" && R && !R.has(d) && (R.add(d), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof l == "number") && z && !z.has(d) && (z.add(d), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || o != null) && B && !B.has(d) && (B.add(d), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), n == null) throw Error("An invalid \"children\" prop has been specified. Value should be a React component. " + ("\"" + (n === null ? "null" : typeof n) + "\" was specified."));
switch (r) {
case "ltr":
case "rtl": break;
default: throw Error("An invalid \"direction\" prop has been specified. Value should be either \"ltr\" or \"rtl\". " + ("\"" + r + "\" was specified."));
}
if (typeof u != "number") throw Error("An invalid \"width\" prop has been specified. Grids must specify a number for width. " + ("\"" + (u === null ? "null" : typeof u) + "\" was specified."));
if (typeof i != "number") throw Error("An invalid \"height\" prop has been specified. Grids must specify a number for height. " + ("\"" + (i === null ? "null" : typeof i) + "\" was specified."));
}
}, Ae = 50, je = function(e, t) {
var n = e.rowCount, r = t.rowMetadataMap, i = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, o = 0;
if (a >= n && (a = n - 1), a >= 0) {
var s = r[a];
o = s.offset + s.size;
}
var c = (n - a - 1) * i;
return o + c;
}, H = function(e, t) {
var n = e.columnCount, r = t.columnMetadataMap, i = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, o = 0;
if (a >= n && (a = n - 1), a >= 0) {
var s = r[a];
o = s.offset + s.size;
}
var c = (n - a - 1) * i;
return o + c;
}, U = function(e, t, n, r) {
var i, a, o;
if (e === "column" ? (i = r.columnMetadataMap, a = t.columnWidth, o = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, a = t.rowHeight, o = r.lastMeasuredRowIndex), n > o) {
var s = 0;
if (o >= 0) {
var c = i[o];
s = c.offset + c.size;
}
for (var l = o + 1; l <= n; l++) {
var u = a(l);
i[l] = {
offset: s,
size: u
}, s += u;
}
e === "column" ? r.lastMeasuredColumnIndex = n : r.lastMeasuredRowIndex = n;
}
return i[n];
}, Me = function(e, t, n, r) {
var i, a;
return e === "column" ? (i = n.columnMetadataMap, a = n.lastMeasuredColumnIndex) : (i = n.rowMetadataMap, a = n.lastMeasuredRowIndex), (a > 0 ? i[a].offset : 0) >= r ? Ne(e, t, n, a, 0, r) : Pe(e, t, n, Math.max(0, a), r);
}, Ne = function(e, t, n, r, i, a) {
for (; i <= r;) {
var o = i + Math.floor((r - i) / 2), s = U(e, t, o, n).offset;
if (s === a) return o;
s < a ? i = o + 1 : s > a && (r = o - 1);
}
return i > 0 ? i - 1 : 0;
}, Pe = function(e, t, n, r, i) {
for (var a = e === "column" ? t.columnCount : t.rowCount, o = 1; r < a && U(e, t, r, n).offset < i;) r += o, o *= 2;
return Ne(e, t, n, Math.min(r, a - 1), Math.floor(r / 2), i);
}, Fe = function(e, t, n, r, i, a, o) {
var s = e === "column" ? t.width : t.height, c = U(e, t, n, a), l = e === "column" ? H(t, a) : je(t, a), u = Math.max(0, Math.min(l - s, c.offset)), d = Math.max(0, c.offset - s + o + c.size);
switch (r === "smart" && (r = i >= d - s && i <= u + s ? "auto" : "center"), r) {
case "start": return u;
case "end": return d;
case "center": return Math.round(d + (u - d) / 2);
default: return i >= d && i <= u ? i : d > u || i < d ? d : u;
}
}, Ie = /* @__PURE__ */ ke({
getColumnOffset: function(e, t, n) {
return U("column", e, t, n).offset;
},
getColumnStartIndexForOffset: function(e, t, n) {
return Me("column", e, n, t);
},
getColumnStopIndexForStartIndex: function(e, t, n, r) {
for (var i = e.columnCount, a = e.width, o = U("column", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += U("column", e, l, r).size;
return l;
},
getColumnWidth: function(e, t, n) {
return n.columnMetadataMap[t].size;
},
getEstimatedTotalHeight: je,
getEstimatedTotalWidth: H,
getOffsetForColumnAndAlignment: function(e, t, n, r, i, a) {
return Fe("column", e, t, n, r, i, a);
},
getOffsetForRowAndAlignment: function(e, t, n, r, i, a) {
return Fe("row", e, t, n, r, i, a);
},
getRowOffset: function(e, t, n) {
return U("row", e, t, n).offset;
},
getRowHeight: function(e, t, n) {
return n.rowMetadataMap[t].size;
},
getRowStartIndexForOffset: function(e, t, n) {
return Me("row", e, n, t);
},
getRowStopIndexForStartIndex: function(e, t, n, r) {
for (var i = e.rowCount, a = e.height, o = U("row", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += U("row", e, l, r).size;
return l;
},
initInstanceProps: function(e, t) {
var n = e, r = n.estimatedColumnWidth, i = n.estimatedRowHeight, a = {
columnMetadataMap: {},
estimatedColumnWidth: r || Ae,
estimatedRowHeight: i || Ae,
lastMeasuredColumnIndex: -1,
lastMeasuredRowIndex: -1,
rowMetadataMap: {}
};
return t.resetAfterColumnIndex = function(e, n) {
n === void 0 && (n = !0), t.resetAfterIndices({
columnIndex: e,
shouldForceUpdate: n
});
}, t.resetAfterRowIndex = function(e, n) {
n === void 0 && (n = !0), t.resetAfterIndices({
rowIndex: e,
shouldForceUpdate: n
});
}, t.resetAfterIndices = function(e) {
var n = e.columnIndex, r = e.rowIndex, i = e.shouldForceUpdate, o = i === void 0 ? !0 : i;
typeof n == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, n - 1)), typeof r == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, r - 1)), t._getItemStyleCache(-1), o && t.forceUpdate();
}, a;
},
shouldResetStyleCacheOnItemSizeChange: !1,
validateProps: function(e) {
var t = e.columnWidth, n = e.rowHeight;
if (process.env.NODE_ENV !== "production") {
if (typeof t != "function") throw Error("An invalid \"columnWidth\" prop has been specified. Value should be a function. " + ("\"" + (t === null ? "null" : typeof t) + "\" was specified."));
if (typeof n != "function") throw Error("An invalid \"rowHeight\" prop has been specified. Value should be a function. " + ("\"" + (n === null ? "null" : typeof n) + "\" was specified."));
}
}
});
process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet;
function W(e, t) {
for (var n in e) if (!(n in t)) return !0;
for (var r in t) if (e[r] !== t[r]) return !0;
return !1;
}
var G = ["style"], K = ["style"];
function q(e, t) {
var n = e.style, r = N(e, G), i = t.style, a = N(t, K);
return !W(n, i) && !W(r, a);
}
//#endregion
//#region node_modules/.pnpm/react-virtualized-auto-sizer@1.0.26_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.esm.js
var J = typeof window < "u" ? window : typeof self < "u" ? self : global, Y = null, X = null, Le = 20, Z = J.clearTimeout, Re = J.setTimeout, Q = J.cancelAnimationFrame || J.mozCancelAnimationFrame || J.webkitCancelAnimationFrame, $ = J.requestAnimationFrame || J.mozRequestAnimationFrame || J.webkitRequestAnimationFrame;
Q == null || $ == null ? (Y = Z, X = function(e) {
return Re(e, Le);
}) : (Y = function([e, t]) {
Q(e), Z(t);
}, X = function(e) {
let t = $(function() {
Z(n), e();
}), n = Re(function() {
Q(t), e();
}, Le);
return [t, n];
});
function ze(e) {
let t, n, r, i, a, o, s, c = typeof document < "u" && document.attachEvent;
if (!c) {
o = function(e) {
let t = e.__resizeTriggers__, n = t.firstElementChild, r = t.lastElementChild, i = n.firstElementChild;
r.scrollLeft = r.scrollWidth, r.scrollTop = r.scrollHeight, i.style.width = n.offsetWidth + 1 + "px", i.style.height = n.offsetHeight + 1 + "px", n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight;
}, a = function(e) {
return e.offsetWidth !== e.__resizeLast__.width || e.offsetHeight !== e.__resizeLast__.height;
}, s = function(e) {
if (e.target.className && typeof e.target.className.indexOf == "function" && e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0) return;
let t = this;
o(this), this.__resizeRAF__ && Y(this.__resizeRAF__), this.__resizeRAF__ = X(function() {
a(t) && (t.__resizeLast__.width = t.offsetWidth, t.__resizeLast__.height = t.offsetHeight, t.__resizeListeners__.forEach(function(n) {
n.call(t, e);
}));
});
};
let e = !1, c = "";
r = "animationstart";
let l = "Webkit Moz O ms".split(" "), u = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), d = "";
{
let t = document.createElement("fakeelement");
if (t.style.animationName !== void 0 && (e = !0), e === !1) {
for (let n = 0; n < l.length; n++) if (t.style[l[n] + "AnimationName"] !== void 0) {
d = l[n], c = "-" + d.toLowerCase() + "-", r = u[n], e = !0;
break;
}
}
}
n = "resizeanim", t = "@" + c + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", i = c + "animation: 1ms " + n + "; ";
}
let l = function(n) {
if (!n.getElementById("detectElementResize")) {
let r = (t || "") + ".resize-triggers { " + (i || "") + "visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }", a = n.head || n.getElementsByTagName("head")[0], o = n.createElement("style");
o.id = "detectElementResize", o.type = "text/css", e != null && o.setAttribute("nonce", e), o.styleSheet ? o.styleSheet.cssText = r : o.appendChild(n.createTextNode(r)), a.appendChild(o);
}
};
return {
addResizeListener: function(e, t) {
if (c) e.attachEvent("onresize", t);
else {
if (!e.__resizeTriggers__) {
let t = e.ownerDocument, i = J.getComputedStyle(e);
i && i.position === "static" && (e.style.position = "relative"), l(t), e.__resizeLast__ = {}, e.__resizeListeners__ = [], (e.__resizeTriggers__ = t.createElement("div")).className = "resize-triggers";
let a = t.createElement("div");
a.className = "expand-trigger", a.appendChild(t.createElement("div"));
let c = t.createElement("div");
c.className = "contract-trigger", e.__resizeTriggers__.appendChild(a), e.__resizeTriggers__.appendChild(c), e.appendChild(e.__resizeTriggers__), o(e), e.addEventListener("scroll", s, !0), r && (e.__resizeTriggers__.__animationListener__ = function(t) {
t.animationName === n && o(e);
}, e.__resizeTriggers__.addEventListener(r, e.__resizeTriggers__.__animationListener__));
}
e.__resizeListeners__.push(t);
}
},
removeResizeListener: function(e, t) {
if (c) e.detachEvent("onresize", t);
else if (e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t), 1), !e.__resizeListeners__.length) {
e.removeEventListener("scroll", s, !0), e.__resizeTriggers__.__animationListener__ && (e.__resizeTriggers__.removeEventListener(r, e.__resizeTriggers__.__animationListener__), e.__resizeTriggers__.__animationListener__ = null);
try {
e.__resizeTriggers__ = !e.removeChild(e.__resizeTriggers__);
} catch {}
}
}
};
}
var Be = class extends pe {
constructor(...e) {
super(...e), this.state = {
height: this.props.defaultHeight || 0,
width: this.props.defaultWidth || 0
}, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
this._timeoutId = null;
let { disableHeight: e, disableWidth: t, onResize: n } = this.props;
if (this._parentNode) {
let r = window.getComputedStyle(this._parentNode) || {}, i = parseFloat(r.paddingLeft || "0"), a = parseFloat(r.paddingRight || "0"), o = parseFloat(r.paddingTop || "0"), s = parseFloat(r.paddingBottom || "0"), c = this._parentNode.getBoundingClientRect(), l = c.height - o - s, u = c.width - i - a;
if (!e && this.state.height !== l || !t && this.state.width !== u) {
this.setState({
height: l,
width: u
});
let e = () => {
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
};
typeof n == "function" && n({
height: l,
width: u,
get scaledHeight() {
return e(), l;
},
get scaledWidth() {
return e(), u;
}
});
}
}
}, this._setRef = (e) => {
this._autoSizer = e;
};
}
componentDidMount() {
let { nonce: e } = this.props, t = this._autoSizer ? this._autoSizer.parentNode : null;
if (t != null && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
this._parentNode = t;
let n = t.ownerDocument.defaultView.ResizeObserver;
n == null ? (this._detectElementResize = ze(e), this._detectElementResize.addResizeListener(t, this._onResize)) : (this._resizeObserver = new n(() => {
this._timeoutId = setTimeout(this._onResize, 0);
}), this._resizeObserver.observe(t)), this._onResize();
}
}
componentWillUnmount() {
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && this._resizeObserver.disconnect());
}
render() {
let { children: e, defaultHeight: t, defaultWidth: n, disableHeight: r = !1, disableWidth: i = !1, doNotBailOutOnEmptyChildren: a = !1, nonce: o, onResize: s, style: c = {}, tagName: l = "div", ...u } = this.props, { height: d, width: f } = this.state, p = { overflow: "visible" }, m = {}, h = !1;
return r || (d === 0 && (h = !0), p.height = 0, m.height = d, m.scaledHeight = d), i || (f === 0 && (h = !0), p.width = 0, m.width = f, m.scaledWidth = f), a && (h = !1), C(l, {
ref: this._setRef,
style: {
...p,
...c
},
...u
}, !h && e(m));
}
}, Ve = me(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
let i = p(t, e, n.columnCount, n.isDualPageWithCover);
if (i <= 0) return null;
if (n.isDualPageWithCover) {
let a = i === n.totalPages && n.totalPages % 2 == 0;
if (t === 0 && i === 1 || a && e === 0) {
let e = n.columnWidths.reduce((e, t) => e + t, 0);
return /* @__PURE__ */ D("div", {
style: {
...r,
width: e,
display: "flex",
justifyContent: "center",
alignItems: "flex-start"
},
children: /* @__PURE__ */ D(y, {
style: { position: "relative" },
pageNumber: i
}, i)
});
}
}
return n.columnCount === 2 ? /* @__PURE__ */ D("div", {
style: {
...r,
display: "flex",
justifyContent: e === 0 ? "flex-end" : "flex-start",
alignItems: "flex-start"
},
children: /* @__PURE__ */ D(y, {
style: { position: "relative" },
pageNumber: i
}, i)
}) : /* @__PURE__ */ D(y, {
style: r,
pageNumber: i
}, i);
}, q), He = () => {
let p = E(new _e()), { initialPage: y = 1, initialScrollMode: pe } = o(), { pagesRef: S, setPagesRef: C, setContentRef: me } = u(), { scrollToPage: k } = m();
ue(S);
let { virtualScrollRef: A, getVirtualScrollRef: be, getPageScrollElementRef: xe, getVirtualScrollableElementRef: Se, setTotalInnerDimensions: Ce, virtualScrollableElementRef: j, totalInnerDimensions: M, pageScrollElementRef: N } = l(), P = E(y > 1), [we, Te] = ge(y > 1), { nextPage: F, prevPage: Ee, setFocusedPage: I, focusedPage: De, totalPages: Oe } = h(), { scrollMode: L } = s(), { viewMode: R } = c(), z = E(null), B = E(null), { loading: ke, error: V } = a(), { passwordRequired: Ae } = i(), { LoaderImageComponent: je } = ee(), H = E(M), U = E({
viewMode: R,
scrollMode: L
}), Me = E(!1), Ne = E(), { isFullScreen: Pe } = _(), { pageDimension: Fe, rowCount: W, rowHeight: G, columnCount: K, columnWidth: q, estimatedColumnWidth: J, estimatedRowHeight: Y, totalDimension: X } = te(), Le = f(M, 100), { onScroll: Z, onTextSelect: Re } = d();
de({
onTextSelect: Re,
pagesRef: S
});
let Q = E();
x(K, W, j, R);
let $ = E({
scrollTop: 0,
scrollLeft: 0
});
se(S);
let { isPressed: ze } = ae(), { selectionMode: He } = g(), { initializeGrabScroll: Ue, resetGrabState: We } = oe({ isPressed: ze }), Ge = he(() => He === n.HAND, [He]), Ke = he(() => {
let e = Array.from({ length: K }, (e, t) => q(t));
return {
columnCount: K,
isDualPageWithCover: R === r.DUAL_PAGE_WITH_COVER,
columnWidths: e,
totalPages: Oe
};
}, [
K,
R,
q,
Oe
]), qe = w((e) => {
let t = document.activeElement !== S;
!Pe && t || (["ArrowUp", "ArrowLeft"].includes(e.key) ? (e.preventDefault(), Ee()) : ["ArrowDown", "ArrowRight"].includes(e.key) && (e.preventDefault(), F()));
}, [
F,
Ee,
Pe,
L
]);
T(() => (window.addEventListener("keydown", qe), () => {
window.removeEventListener("keydown", qe);
}), [qe]), T(() => {
if (z.current && (z.current.style.position = "relative"), A) for (let e = 0; e < W; e++) for (let t = 0; t < K; t++) A.resetAfterIndices({
columnIndex: t,
rowIndex: e,
shouldForceUpdate: !0
});
}, [
W,
K,
Fe,
A
]);
let Je = w((e, t) => {
if (!j) return {
scrollTop: 0,
scrollLeft: 0
};
let n = $.current.scrollTop > t, r = $.current.scrollLeft > e;
return n || r ? $.current : {
scrollTop: j.scrollTop,
scrollLeft: j.scrollLeft
};
}, [j]), Ye = w((e, t) => {
if (U.current.viewMode !== R || U.current.scrollMode !== L) {
Q.current && clearTimeout(Q.current), Me.current = !0, k(De, "auto"), Q.current = setTimeout(() => {
requestAnimationFrame(() => {
U.current = {
viewMode: R,
scrollMode: L
};
});
}, 100);
return;
}
let n = e.scrollTop, r = e.scrollLeft;
if (!t.height || !t.width) return;
Me.current = !0;
let { height: i, width: a } = t, { height: o, width: s } = H.current;
if (o === i && s === a) return;
if (P.current && y > 1) {
H.current = {
height: t.height,
width: t.width
};
return;
}
if (!o || !s) {
H.current = {
height: t.height,
width: t.width
};
return;
}
if (n === 0 && r === 0) {
H.current = {
height: t.height,
width: t.width
};
return;
}
let c = n / o * i, l = r / s * a, u = Math.round(Math.min(c, i)) || 0, d = Math.round(Math.min(l, a)) || 0;
Ne.current = setTimeout(() => {
requestAnimationFrame(() => {
j?.scrollTo({
top: u,
left: d,
behavior: "auto"
});
});
}, 0), H.current = {
height: t.height,
width: t.width
};
}, [
j,
R,
L,
k,
y
]);
T(() => {
clearTimeout(Ne.current);
let e = Array.from({ length: W }).reduce((e, t, n) => e + G(n), 0), t = Array.from({ length: K }).reduce((e, t, n) => e + q(n), 0), n = Je(t, e);
$.current = n, Ye(n, {
height: e,
width: t
}), Ce({
height: e,
width: t
});
}, [
Fe,
W,
K,
Ye
]);
let Xe = w((e) => {
$.current = {
scrollTop: e.scrollTop,
scrollLeft: e.scrollLeft
};
}, [j]);
T(() => {
if (Z) return N && N.addEventListener("scroll", Z), j && j.addEventListener("scroll", Z), () => {
N?.removeEventListener("scroll", Z), j?.removeEventListener("scroll", Z);
};
}, [
j,
N,
Z
]), T(() => () => {
Q.current && clearTimeout(Q.current);
}, []);
let Ze = he(() => v(O["rp-pages-container"], {
[O["rp-cursor-grab"]]: Ge && !ze,
[O["rp-cursor-grabbing"]]: Ge && ze
}), [Ge, ze]), Qe = w((e) => {
if (Ge && e) {
let e = v(O["rp-pages"]);
Ue(document.querySelector(`.${e}`));
}
}, [
Ge,
Ue,
O
]);
return T(() => {
ke && We();
}, [ke]), T(() => {
if (V !== e.INVALID_OR_CORRUPTED_PDF) return;
let t = requestAnimationFrame(() => {
B.current?.focus();
});
return () => {
cancelAnimationFrame(t);
};
}, [V]), T(() => {
if (!(Le.height === 0 || !P.current)) {
if (pe === t.PAGE_SCROLLING) {
y !== De && N && I(y), P.current = !1, Te(!1);
return;
}
j && (k(y, "auto"), (j.scrollLeft > 0 || j.scrollTop > 0) && (I(y), P.current = !1, Te(!1)));
}
}, [
k,
pe,
N,
I,
Le,
j
]), /* @__PURE__ */ ye(ve, { children: [/* @__PURE__ */ D(le, {
ref: me,
children: /* @__PURE__ */ D(ce, {
ref: C,
tabIndex: -1,
className: Ze,
style: {
"--scale-round-x": `${fe(p.current.sx)[1]}px`,
"--scale-round-y": `${fe(p.current.sy)[1]}px`
},
children: /* @__PURE__ */ D(Be, {
style: { minHeight: "50px" },
children: ({ width: n, height: i }) => /* @__PURE__ */ D("div", {
"data-rp": "pages",
ref: Qe,
style: {
width: n,
height: i,
...we && { visibility: "hidden" }
},
children: L === t.PAGE_SCROLLING ? V === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ D("div", {
ref: B,
className: O["rp-load-error"],
style: {
width: n,
height: i
},
tabIndex: -1,
role: "alert",
"aria-live": "assertive",
"aria-atomic": "true",
children: /* @__PURE__ */ D("div", {
className: O["rp-load-error-message"],
children: "Invalid or corrupted PDF file."
})
}) : /* @__PURE__ */ D("div", {
ref: xe,
style: {
width: n,
height: i
},
className: v(O["rp-pages"], O["rp-page-scrolling-wrapper"]),
children: R === r.DUAL_PAGE ? /* @__PURE__ */ D(ne, {
widths: q,
heights: G
}) : R === r.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ D(re, {
widths: q,
heights: G
}) : /* @__PURE__ */ D(ie, {
widths: q,
heights: G
})
}) : Y ? /* @__PURE__ */ D(Ie, {
ref: be,
itemData: Ke,
outerRef: Se,
innerRef: z,
onScroll: Xe,
columnCount: K,
columnWidth: q,
rowHeight: G,
height: i,
width: n,
estimatedColumnWidth: J,
estimatedRowHeight: Y,
rowCount: W,
className: v(O["rp-pages"], L === t.HORIZONTAL_SCROLLING ? O["rp-pages-horizontal-scroll"] : ""),
style: {
"--rp-pages-height": `${X.height}px`,
"--rp-pages-width": `${X.width}px`,
"--rp-row-count": `${W}`,
"--rp-column-count": `${K}`
},
children: Ve
}) : !ke && !V ? /* @__PURE__ */ D("div", {
className: O["rp-loader"],
style: {
display: "flex",
justifyContent: "center",
alignItems: "center",
height: "100%",
width: "100%"
},
children: je && /* @__PURE__ */ D(je, {})
}) : V === e.NOT_SUPPORTED ? /* @__PURE__ */ D("div", {
className: O["rp-not-supported"],
children: /* @__PURE__ */ ye("div", {
className: O["rp-not-supported-content"],
children: ["React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:", /* @__PURE__ */ D("div", { children: /* @__PURE__ */ ye("ul", {
className: O["rp-not-supported-list"],
children: [
/* @__PURE__ */ D("li", { children: "Chrome 126+" }),
/* @__PURE__ */ D("li", { children: "Edge 126+" }),
/* @__PURE__ */ D("li", { children: "Firefox 126+" }),
/* @__PURE__ */ D("li", { children: "Safari 18.4+" }),
/* @__PURE__ */ D("li", { children: "Safari iOS 18.4+" }),
/* @__PURE__ */ D("li", { children: "Chrome Android 126+" })
]
}) })]
})
}) : V === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ D("div", {
ref: B,
className: O["rp-load-error"],
tabIndex: -1,
role: "alert",
"aria-live": "assertive",
"aria-atomic": "true",
children: /* @__PURE__ */ D("div", {
className: O["rp-load-error-message"],
children: "Invalid or corrupted PDF file."
})
}) : null
})
})
})
}), Ae && /* @__PURE__ */ D(b, {})] });
};
//#endregion
export { He as t };
import { withRef as e } from "./utils/withRef.js";
import { d as t, f as n, i as r, l as i, n as a, s as o, t as s } from "./dist-bK-AHWLF.js";
import { n as c, r as l, t as u } from "./dist-BRVqFn7R.js";
import { a as d, i as f, n as p, r as m, t as h } from "./dist-7FA4Do6I.js";
import * as g from "react";
import { jsx as _, jsxs as v } from "react/jsx-runtime";
import './assets/RPTooltip.css';//#region node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@18.3.7_@types+react@18.3.27__@ty_a0e385f362a25de1e1388c87472ea469/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
var y = Object.freeze({
position: "absolute",
border: 0,
width: 1,
height: 1,
padding: 0,
margin: -1,
overflow: "hidden",
clip: "rect(0, 0, 0, 0)",
whiteSpace: "nowrap",
wordWrap: "normal"
}), b = "VisuallyHidden", x = g.forwardRef((e, t) => /* @__PURE__ */ _(r.span, {
...e,
ref: t,
style: {
...y,
...e.style
}
}));
x.displayName = b;
var S = x, [C, w] = i("Tooltip", [d]), T = d(), E = "TooltipProvider", D = 700, O = "tooltip.open", [k, A] = C(E), j = (e) => {
let { __scopeTooltip: t, delayDuration: n = D, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = g.useRef(!0), s = g.useRef(!1), c = g.useRef(0);
return g.useEffect(() => {
let e = c.current;
return () => window.clearTimeout(e);
}, []), /* @__PURE__ */ _(k, {
scope: t,
isOpenDelayedRef: o,
delayDuration: n,
onOpen: g.useCallback(() => {
window.clearTimeout(c.current), o.current = !1;
}, []),
onClose: g.useCallback(() => {
window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r);
}, [r]),
isPointerInTransitRef: s,
onPointerInTransitChange: g.useCallback((e) => {
s.current = e;
}, []),
disableHoverableContent: i,
children: a
});
};
j.displayName = E;
var M = "Tooltip", [N, P] = C(M), F = (e) => {
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: l } = e, u = A(M, e.__scopeTooltip), d = T(t), [p, m] = g.useState(null), h = c(), v = g.useRef(0), y = o ?? u.disableHoverableContent, b = l ?? u.delayDuration, x = g.useRef(!1), [S, C] = s({
prop: r,
defaultProp: i ?? !1,
onChange: (e) => {
e ? (u.onOpen(), document.dispatchEvent(new CustomEvent(O))) : u.onClose(), a?.(e);
},
caller: M
}), w = g.useMemo(() => S ? x.current ? "delayed-open" : "instant-open" : "closed", [S]), E = g.useCallback(() => {
window.clearTimeout(v.current), v.current = 0, x.current = !1, C(!0);
}, [C]), D = g.useCallback(() => {
window.clearTimeout(v.current), v.current = 0, C(!1);
}, [C]), k = g.useCallback(() => {
window.clearTimeout(v.current), v.current = window.setTimeout(() => {
x.current = !0, C(!0), v.current = 0;
}, b);
}, [b, C]);
return g.useEffect(() => () => {
v.current &&= (window.clearTimeout(v.current), 0);
}, []), /* @__PURE__ */ _(f, {
...d,
children: /* @__PURE__ */ _(N, {
scope: t,
contentId: h,
open: S,
stateAttribute: w,
trigger: p,
onTriggerChange: m,
onTriggerEnter: g.useCallback(() => {
u.isOpenDelayedRef.current ? k() : E();
}, [
u.isOpenDelayedRef,
k,
E
]),
onTriggerLeave: g.useCallback(() => {
y ? D() : (window.clearTimeout(v.current), v.current = 0);
}, [D, y]),
onOpen: E,
onClose: D,
disableHoverableContent: y,
children: n
})
});
};
F.displayName = M;
var I = "TooltipTrigger", L = g.forwardRef((e, i) => {
let { __scopeTooltip: a, ...o } = e, s = P(I, a), c = A(I, a), l = T(a), u = t(i, g.useRef(null), s.onTriggerChange), d = g.useRef(!1), f = g.useRef(!1), p = g.useCallback(() => d.current = !1, []);
return g.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ _(h, {
asChild: !0,
...l,
children: /* @__PURE__ */ _(r.button, {
"aria-describedby": s.open ? s.contentId : void 0,
"data-state": s.stateAttribute,
...o,
ref: u,
onPointerMove: n(e.onPointerMove, (e) => {
e.pointerType !== "touch" && !f.current && !c.isPointerInTransitRef.current && (s.onTriggerEnter(), f.current = !0);
}),
onPointerLeave: n(e.onPointerLeave, () => {
s.onTriggerLeave(), f.current = !1;
}),
onPointerDown: n(e.onPointerDown, () => {
s.open && s.onClose(), d.current = !0, document.addEventListener("pointerup", p, { once: !0 });
}),
onFocus: n(e.onFocus, () => {
d.current || s.onOpen();
}),
onBlur: n(e.onBlur, s.onClose),
onClick: n(e.onClick, s.onClose)
})
});
});
L.displayName = I;
var R = "TooltipPortal", [z, B] = C(R, { forceMount: void 0 }), V = (e) => {
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, o = P(R, t);
return /* @__PURE__ */ _(z, {
scope: t,
forceMount: n,
children: /* @__PURE__ */ _(a, {
present: n || o.open,
children: /* @__PURE__ */ _(u, {
asChild: !0,
container: i,
children: r
})
})
});
};
V.displayName = R;
var H = "TooltipContent", U = g.forwardRef((e, t) => {
let n = B(H, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...o } = e, s = P(H, e.__scopeTooltip);
return /* @__PURE__ */ _(a, {
present: r || s.open,
children: s.disableHoverableContent ? /* @__PURE__ */ _(J, {
side: i,
...o,
ref: t
}) : /* @__PURE__ */ _(W, {
side: i,
...o,
ref: t
})
});
}), W = g.forwardRef((e, n) => {
let r = P(H, e.__scopeTooltip), i = A(H, e.__scopeTooltip), a = g.useRef(null), o = t(n, a), [s, c] = g.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = g.useCallback(() => {
c(null), f(!1);
}, [f]), m = g.useCallback((e, t) => {
let n = e.currentTarget, r = {
x: e.clientX,
y: e.clientY
}, i = Q(r, Z(r, n.getBoundingClientRect())), a = ee(t.getBoundingClientRect());
c(ne([...i, ...a])), f(!0);
}, [f]);
return g.useEffect(() => () => p(), [p]), g.useEffect(() => {
if (l && d) {
let e = (e) => m(e, d), t = (e) => m(e, l);
return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
};
}
}, [
l,
d,
m,
p
]), g.useEffect(() => {
if (s) {
let e = (e) => {
let t = e.target, n = {
x: e.clientX,
y: e.clientY
}, r = l?.contains(t) || d?.contains(t), i = !te(n, s);
r ? p() : i && (p(), u());
};
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
}
}, [
l,
d,
s,
u,
p
]), /* @__PURE__ */ _(J, {
...e,
ref: o
});
}), [G, K] = C(M, { isInside: !1 }), q = o("TooltipContent"), J = g.forwardRef((e, t) => {
let { __scopeTooltip: n, children: r, "aria-label": i, onEscapeKeyDown: a, onPointerDownOutside: o, ...s } = e, c = P(H, n), u = T(n), { onClose: d } = c;
return g.useEffect(() => (document.addEventListener(O, d), () => document.removeEventListener(O, d)), [d]), g.useEffect(() => {
if (c.trigger) {
let e = (e) => {
e.target?.contains(c.trigger) && d();
};
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
}
}, [c.trigger, d]), /* @__PURE__ */ _(l, {
asChild: !0,
disableOutsidePointerEvents: !1,
onEscapeKeyDown: a,
onPointerDownOutside: o,
onFocusOutside: (e) => e.preventDefault(),
onDismiss: d,
children: /* @__PURE__ */ v(m, {
"data-state": c.stateAttribute,
...u,
...s,
ref: t,
style: {
...s.style,
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
},
children: [/* @__PURE__ */ _(q, { children: r }), /* @__PURE__ */ _(G, {
scope: n,
isInside: !0,
children: /* @__PURE__ */ _(S, {
id: c.contentId,
role: "tooltip",
children: i || r
})
})]
})
});
});
U.displayName = H;
var Y = "TooltipArrow", X = g.forwardRef((e, t) => {
let { __scopeTooltip: n, ...r } = e, i = T(n);
return K(Y, n).isInside ? null : /* @__PURE__ */ _(p, {
...i,
...r,
ref: t
});
});
X.displayName = Y;
function Z(e, t) {
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
switch (Math.min(n, r, i, a)) {
case a: return "left";
case i: return "right";
case n: return "top";
case r: return "bottom";
default: throw Error("unreachable");
}
}
function Q(e, t, n = 5) {
let r = [];
switch (t) {
case "top":
r.push({
x: e.x - n,
y: e.y + n
}, {
x: e.x + n,
y: e.y + n
});
break;
case "bottom":
r.push({
x: e.x - n,
y: e.y - n
}, {
x: e.x + n,
y: e.y - n
});
break;
case "left":
r.push({
x: e.x + n,
y: e.y - n
}, {
x: e.x + n,
y: e.y + n
});
break;
case "right":
r.push({
x: e.x - n,
y: e.y - n
}, {
x: e.x - n,
y: e.y + n
});
break;
}
return r;
}
function ee(e) {
let { top: t, right: n, bottom: r, left: i } = e;
return [
{
x: i,
y: t
},
{
x: n,
y: t
},
{
x: n,
y: r
},
{
x: i,
y: r
}
];
}
function te(e, t) {
let { x: n, y: r } = e, i = !1;
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
}
return i;
}
function ne(e) {
let t = e.slice();
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), re(t);
}
function re(e) {
if (e.length <= 1) return e.slice();
let t = [];
for (let n = 0; n < e.length; n++) {
let r = e[n];
for (; t.length >= 2;) {
let e = t[t.length - 1], n = t[t.length - 2];
if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
else break;
}
t.push(r);
}
t.pop();
let n = [];
for (let t = e.length - 1; t >= 0; t--) {
let r = e[t];
for (; n.length >= 2;) {
let e = n[n.length - 1], t = n[n.length - 2];
if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
else break;
}
n.push(r);
}
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
}
var $ = {
tooltipContent: "_tooltipContent_12gjy_1",
tooltipArrow: "_tooltipArrow_12gjy_8",
fadeIn: "_fadeIn_12gjy_1"
}, ie = e(({ children: e, content: t, className: n, style: r }, i) => /* @__PURE__ */ _(j, { children: /* @__PURE__ */ v(F, {
delayDuration: 1e3,
children: [/* @__PURE__ */ _(L, {
asChild: !0,
children: /* @__PURE__ */ _("div", {
ref: i,
className: n,
style: r,
children: e
})
}), /* @__PURE__ */ v(U, {
className: $.tooltipContent,
sideOffset: 5,
children: [/* @__PURE__ */ _(X, { className: $.tooltipArrow }), /* @__PURE__ */ _("span", { children: t })]
})]
}) }));
//#endregion
export { ie as t };
import { useDocumentContext as e } from "./contexts/RPDocumentContext.js";
import { usePagesRotateContext as t } from "./contexts/PagesRotateContext.js";
import { r as n } from "./PaginationContext-Cwf8sCpK.js";
import { useRenderQueue as r } from "./contexts/RenderQueueProvider.js";
import { t as i } from "./clsx-B7LyVm5O.js";
import { t as a } from "./LoaderIcon-D9YjinGf.js";
import { t as o } from "./CustomThumbnailElement-C2quEICO.js";
import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
import { jsx as f, jsxs as p } from "react/jsx-runtime";
import './assets/Thumbnail.css';//#region lib/components/layout/sidebar/Thumbnail.module.css
var m = {
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_czi7p_1",
"rp-thumbnail-text": "_rp-thumbnail-text_czi7p_10",
"rp-thumbnail": "_rp-thumbnail_czi7p_1",
"rp-thumbnail-active": "_rp-thumbnail-active_czi7p_23",
"rp-thumbnail-loader": "_rp-thumbnail-loader_czi7p_32"
}, h = (h) => {
let { pageNumber: g, isFocused: _, viewport: v } = h, { goToPage: y } = n(), { pageRotate: b } = t(), x = u(null), S = r(), { pages: C } = e(), [w, T] = d(null), E = u(!1), D = u(), O = l(() => _ ? m["rp-thumbnail-active"] : "", [_]), k = l(() => ({
width: Math.round(v.width),
height: Math.round(v.height)
}), [v]), A = s(() => {
g && y(g);
}, [y, g]);
return c(() => {
let e = C.get(g);
D.current !== e && (T(null), D.current = e);
}, [C, g]), c(() => {
let e = C.get(g);
if (!x.current || !g || !e || w) return;
let t = new IntersectionObserver((t) => {
t.forEach((t) => {
if (E.current) {
E.current = !1, S.removeQueue(`thumbnail-${g}`);
return;
}
if (t.isIntersecting) {
let t = document.createElement("canvas");
E.current = !0, S.enqueue(`thumbnail-${g}`, {
page: e.page,
canvasElem: t,
options: { scale: 1 },
onLoaded: () => {
t.toBlob((e) => {
e && T(URL.createObjectURL(e));
});
}
}, 2);
}
});
});
return x.current && t.observe(x.current), () => {
t.disconnect(), S.removeQueue(`thumbnail-${g}`);
};
}, [
S,
g,
C,
w
]), /* @__PURE__ */ p("div", {
onClick: A,
onKeyDown: (e) => {
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), A());
},
id: `page-${g}`,
className: m["rp-thumbnail-wrapper"],
ref: x,
role: "button",
tabIndex: 0,
"aria-label": `Go to page ${g}`,
"aria-current": _ ? "page" : void 0,
children: [/* @__PURE__ */ p("div", {
style: { transform: `rotate(${b[g || 0]}deg)` },
className: i(O, m["rp-thumbnail"]),
"aria-hidden": "true",
children: [w ? /* @__PURE__ */ f("img", {
src: w,
width: k.width,
height: k.height,
alt: `Page ${g} thumbnail`,
"aria-hidden": "true"
}) : /* @__PURE__ */ f("div", {
className: m["rp-thumbnail-loader"],
style: {
width: `${k.width}px`,
height: `${k.height}px`
},
children: /* @__PURE__ */ f(a, { "aria-hidden": "true" })
}), /* @__PURE__ */ f(o, { pageNumber: g })]
}), /* @__PURE__ */ f("div", {
className: m["rp-thumbnail-text"],
"aria-hidden": "true",
children: g
})]
});
};
//#endregion
export { h as t };
import { r as e } from "./PaginationContext-Cwf8sCpK.js";
import { useThumbnailContext as t } from "./contexts/ThumbnailsContext.js";
import { useThumbnailContainerRegister as n } from "./contexts/ElementThumbnailContext.js";
import { withRef as r } from "./utils/withRef.js";
import { t as i } from "./Thumbnail-CzclS3h_.js";
import { useInfiniteScroll as a } from "./utils/hooks/useInfiniteScroll.js";
import { useCallback as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u } from "react";
import { jsx as d } from "react/jsx-runtime";
import './assets/Thumbnails.css';//#region lib/components/layout/sidebar/Thumbnails.module.css
var f = {
"rp-thumbnails-container": "_rp-thumbnails-container_1szrf_1",
"rp-thumbnails": "_rp-thumbnails_1szrf_1"
}, p = 16, m = (e, t) => {
let n = e?.querySelector(`#page-${t}`);
e && n?.offsetTop && (e.scrollTop = n?.offsetTop - p);
}, h = r((r, p) => {
let { show: h, width: g } = r, { focusedPage: _, totalPages: v } = e(), { thumbnailPages: y, addPage: b, thumbnailLength: x, addToPage: S } = t(), C = n(), w = u(null), T = u(1);
c(p, () => w.current), s(() => (C(w.current), () => C(null)), [C]);
let E = l(() => Object.values(y), [y]), D = o(() => {
let e = x + 1;
e <= v && b(e);
}, [
b,
v,
x
]);
return s(() => {
_ > x && v > x ? S(_) : h && T.current !== _ && (m(w.current, _), T.current = _);
}, [
_,
x,
S,
h,
E
]), a(w.current, D), /* @__PURE__ */ d("div", {
ref: w,
className: f["rp-thumbnails-container"],
style: { width: g },
children: /* @__PURE__ */ d("div", {
className: f["rp-thumbnails"],
children: h ? E.map((e, t) => /* @__PURE__ */ d(i, {
isFocused: _ === e.page?.pageNumber,
pageNumber: e.page?.pageNumber,
loading: e.loading,
viewport: e.viewport,
defaultRotation: e.defaultRotation
}, t)) : null
})
});
});
//#endregion
export { h as t };