@progress/kendo-react-common
Version:
React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package
1,581 lines • 55.4 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2023 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------*/
"use client";
import * as r from "react";
import * as Y from "@progress/kendo-licensing";
import * as bt from "react-dom";
import * as g from "prop-types";
import { dispatchDragAndDrop as xt, getScrollableParent as Xe, autoScroll as yt } from "@progress/kendo-draggable-common";
const qe = r.createContext(0), kn = () => r.useContext(qe);
qe.displayName = "KendoReactZIndexContext";
const pt = () => typeof document < "u" ? document : {};
class Ke {
constructor() {
this.scrollbar = 0;
}
get scrollbarWidth() {
const t = pt();
if (!this.scrollbar && t && t.createElement) {
const n = t.createElement("div");
n.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block", n.innerHTML = " ", t.body.appendChild(n), this.scrollbar = n.offsetWidth - n.scrollWidth, t.body.removeChild(n);
}
return this.scrollbar;
}
}
const he = !!// from fbjs
(typeof window < "u" && window.document && window.document.createElement), kt = (e) => {
var t;
return !!(typeof e == "function" && ((t = e.prototype) != null && t.isReactComponent));
}, Dt = (e) => !!(e.$$typeof && typeof e.render == "function"), Dn = (e) => typeof Comment != "string" && (kt(e) || Dt(e)), We = (...e) => {
const t = {}, n = (s) => typeof s == "object" ? Object.keys(s).forEach((l) => {
t[l] = s[l];
}) : t[s] = !0, o = (s) => s.filter((l) => l !== !0 && !!l).map((l) => Array.isArray(l) ? o(l) : n(l));
return o(e), Object.keys(t).map((s) => t[s] && s || null).filter((s) => s !== null).join(" ");
}, At = (e) => e ? new Date(e.getTime()) : null;
function An(e) {
const t = {};
return _e(e, t), t;
}
function _e(e, t) {
for (let n in e)
if (e.hasOwnProperty(n)) {
const o = e[n];
t[n] = $e(o, t[n]);
}
}
function $e(e, t) {
if (Array.isArray(e))
return wt(e);
if (e instanceof Date)
return At(e);
if (r.isValidElement(e))
return r.cloneElement(e, e.props);
if (e && typeof e == "object") {
const n = t || {};
return _e(e, n), n;
} else
return e;
}
function wt(e) {
return e.map((t) => $e(t, void 0));
}
const wn = (e) => {
if (e) {
if ((e instanceof HTMLInputElement || e.tabIndex !== -1) && e.focus) {
e.focus();
return;
}
const t = e.querySelector('input, [tabindex]:not([tabindex="-1"])');
t && t.focus && t.focus();
}
};
class Pn {
}
const Pt = -1, It = 0, In = (e, t, n) => {
const o = typeof e == "string" ? parseInt(e) : e;
if (!Number.isNaN(o))
return o !== void 0 ? o : t ? n ? void 0 : Pt : It;
}, Ot = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;
function et(e) {
const t = [];
return e.replace(Ot, function(n, o, s, l) {
t.push(o !== void 0 ? o : s || l);
}), t;
}
const z = {};
z.undefined = () => {
};
function On(e) {
if (z[e])
return z[e];
const t = et(e);
return z[e] = function(n) {
let o = n;
for (let s = 0; s < t.length && o; s++)
o = o[t[s]];
return o;
}, z[e];
}
const Ye = () => {
let e = "", t, n;
for (t = 0; t < 32; t++)
n = Math.random() * 16 | 0, (t === 8 || t === 12 || t === 16 || t === 20) && (e += "-"), e += (t === 12 ? 4 : t === 16 ? n & 3 | 8 : n).toString(16);
return e;
}, Mn = {
backspace: 8,
tab: 9,
enter: 13,
shift: 16,
esc: 27,
space: 32,
pageUp: 33,
pageDown: 34,
end: 35,
home: 36,
left: 37,
up: 38,
right: 39,
down: 40,
delete: 46
}, C = function() {
}, Sn = () => !he || !document.body ? !1 : new Ke().scrollbarWidth, Rn = () => {
if (!he || !document.body)
return !1;
let e = new Ke().scrollbarWidth;
document.body.style.setProperty("--kendo-scrollbar-width", `${e}px`);
}, F = {};
F.undefined = (e) => e;
const Mt = (e, t) => t && t.arrays && !isNaN(Number(e)) ? [] : {};
function Ln(e) {
if (F[e])
return F[e];
const t = et(e);
return F[e] = (n, o, s) => {
let l = n;
const c = t.length - 1;
for (let i = 0; i < c && l; i++)
l = l[t[i]] = l[t[i]] || Mt(t[i + 1], s);
l[t[c]] = o;
}, F[e];
}
function Ge(e, t, n) {
return n ? { ...e, [t]: n.length ? [...n] : void 0 } : e && e[t] ? [...e[t]] : [];
}
function tt(e, t, n) {
if (e[t]) {
let o = Ge(e, t).map((s) => tt(s, t, n));
return n(Ge(e, t, o));
}
return n(e);
}
const Tn = (e, t, n) => [...e.map((o) => tt(o, t, n))], Nn = (e, t, n, o) => {
let s = e;
const l = [];
for (let f = 0; f < t.length; f++)
s = s[t[f]], s = Array.isArray(s) ? s : s[n], l.push(s);
const c = l.length > 1 ? l[l.length - 2] : e, i = t[t.length - 1], h = o(c[i]);
c.splice(i, 1, h);
}, Hn = (e, t, n) => Object.assign(
{},
e,
e[t] ? { [t]: e[t].slice() } : {},
n || {}
), Bn = (e, t, n) => {
const o = [], s = [...t];
if (s.length) {
let l = e[s.shift() || 0];
for (o.push(l); s.length && n; )
l = l[n][s.shift() || 0], o.push(l);
}
return o;
}, St = ["telerik.com", "progress.com", "stackblitz.io", "csb.app"];
function jn(e) {
if (typeof Y < "u")
Y.validatePackage(e);
else {
let t = `License activation failed for ${e.name}
`;
t += `The @progress/kendo-licensing script is not loaded.
`, t += `See ${e.licensingDocsUrl} for more information.
`, console.warn(t);
}
}
function Qn(e) {
return !St.some((n) => {
var o;
return (o = globalThis.document) == null ? void 0 : o.location.hostname.endsWith(n);
}) && !(Y != null && Y.validatePackage(e));
}
const zn = (e) => {
if (!he)
return !1;
const t = e ? e.ownerDocument : document;
if (!t || !t.body)
return !1;
const n = 10, o = t.createElement("div");
o.style.transform = "matrix(10, 0, 0, 10, 0, 0)";
const s = t.createElement("div");
s.appendChild(t.createTextNode("child")), s.style.position = "fixed", s.style.top = n + "px", o.appendChild(s), t.body.appendChild(o);
const l = s.getBoundingClientRect().top !== n;
return t.body.removeChild(o), l;
}, Rt = "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-banner";
let Je = !1;
const Fn = () => {
const [e, t] = r.useState(!0), [n, o] = r.useState(!1);
r.useEffect(() => {
Je || (o(!0), Je = !0);
}, []);
const s = () => {
t(!1);
}, l = /* @__PURE__ */ r.createElement(r.Fragment, null, e && /* @__PURE__ */ r.createElement("div", { style: {
display: "flex",
justifyContent: "center",
alignItems: "center",
position: "fixed",
top: "16px",
right: "16px",
padding: "12px",
borderRadius: "4px",
boxShadow: "0px 4px 5px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.03)",
fontSize: "14px",
fontWeight: 400,
lineHeight: "20px",
backgroundColor: "#FFC000",
color: "#1E1E1E",
zIndex: 999
} }, /* @__PURE__ */ r.createElement("span", { style: { display: "flex", alignSelf: "center", marginRight: "8px" } }, /* @__PURE__ */ r.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8 1L0 15H16L8 1ZM7 6V11H9V6H7ZM7 14V12H9V14H7Z", fill: "#1E1E1E" }))), /* @__PURE__ */ r.createElement("span", null, "No valid license found for KendoReact. Learn how to activate your license."), /* @__PURE__ */ r.createElement("div", { style: { display: "flex", alignItems: "center", marginLeft: "24px" } }, /* @__PURE__ */ r.createElement("a", { href: Rt, style: { marginRight: "8px", display: "flex" } }, /* @__PURE__ */ r.createElement(
"button",
{
title: "Learn More",
style: {
display: "inline-flex",
position: "relative",
border: "none",
borderRadius: "4px",
padding: "5px",
backgroundColor: "transparent",
transition: "color 0.2s ease-in-out",
outline: "none",
cursor: "pointer"
}
},
/* @__PURE__ */ r.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ r.createElement("path", { d: "M15 8C15 11.8656 11.8656 15 8 15C4.13437 15 1 11.8656 1 8C1 4.13437 4.13437 1 8 1C11.8656 1 15 4.13437 15 8ZM14 8C14 4.6875 11.3125 2 8 2C4.6875 2 2 4.6875 2 8C2 11.3125 4.6875 14 8 14C11.3125 14 14 11.3125 14 8ZM11 6C11 7.4125 10.2687 8.05937 9.73125 8.53125C9.25937 8.94688 9 9.17813 9 10H7C7 8.275 7.84688 7.525 8.40938 7.03125C8.84062 6.65312 9 6.50938 9 6C9 5.45 8.55 5 8 5C7.45 5 7 5.45 7 6H5C5 4.34375 6.34375 3 8 3C9.65625 3 11 4.34375 11 6ZM9 13V11H7V13H9Z", fill: "#1E1E1E" }))
)), /* @__PURE__ */ r.createElement(
"button",
{
title: "Close",
style: {
display: "inline-flex",
position: "relative",
border: "none",
borderRadius: "4px",
padding: "5px",
backgroundColor: "transparent",
transition: "color 0.2s ease-in-out",
outline: "none",
cursor: "pointer"
},
onClick: s
},
/* @__PURE__ */ r.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ r.createElement("path", { d: "M13 4.41562L9.41563 8L13 11.5844L11.5844 13L8 9.41563L4.41562 13L3 11.5844L6.58437 8L3 4.41562L4.41562 3L8 6.58437L11.5844 3L13 4.41562Z", fill: "#1E1E1E" }))
))));
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
"div",
{
style: {
position: "absolute",
width: "100%",
height: "100%",
top: 0,
left: 0,
right: 0,
bottom: 0,
opacity: 0.12,
zIndex: 101,
pointerEvents: "none",
backgroundImage: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABVxSURBVHgB7Z3tVRtJE4WL9zgANgLLGRCCnAGOADmCxRGgDFAGYiOADKQMIAGO9J8ji42g37mjqlUjBgOanpn+uM85sjC2sKzbVd1dVV0tQgghhBBCCCGEEEIIKRPn3Gn1GAlJmmN1pP558J6OX9540ejh4WGlX09OTk7+EZIclXYXlY43+vVflY7PH3wd9c+AY/Wvvcb9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jpSuZo3hr/115r1lMAe+bNZrPO2fip/wH+nq9iKZkD8ZknLhfq79EQ8MneK7JYpGyov5JShV9oOAjKvnSjeP1LNn6j5EHgWl7akgPF6k/j31PiIGCef09x+jPP+5qSBgGd/2uKcgIHEdCJkBp/EOSaCaHxv00J+tdoDnRJ8V+jtePLHGshaPzvk7P+pGC47SOkYCqDn6FvH42fkAJxuyPdaN01FlIGbnc/37TkFE8o3L4nAmvHCyQ5/S3gw24oYXAvuyKxbLgwktK/xNr+rsFqKpU8sa78Zlz5hSMZ/Znq6Y4UikVMf72oYyYkGNHrT+PvnpgHAVd+3ROt/jT+/ohxEFD//ohOf4rfPzENAurfP1E5AVzPRPH7xx8EuJ1WBoDGPxyH+ruhjlTjbnR9AxMhvYLPHA4YGkjPIMpP4x+WIfUnhYMZx2voMRFCSFlohVqR3XwIIaQc3O5OtrGQJFC9RkKKRCsyRxICi/YuFgvs986ERA3Eh1ahUkT4GQg0Vc9XQqInqP6ODRyTA046VJ7Y1x/XdgmJnmD6M8+bLiGKRVjemy6t9WeeN30aBsGHI/bUP33a6M88bybYIPjs9o3658Gx+tuLmefNgGN1pP55QB0JIYQQQgghhBBCCJGy+T9ftRg+rVNPfAAAAABJRU5ErkJggg==')"
}
}
), n && bt.createPortal(l, document.body));
};
function Xn(e, t, n, o) {
if (e) {
const s = {
syntheticEvent: t,
nativeEvent: t.nativeEvent,
target: n
};
e.call(void 0, Object.assign(s, o));
}
}
function Lt({ onFocus: e, onBlur: t, onSyncFocus: n, onSyncBlur: o }) {
const s = r.useRef(!1), l = r.useRef(0), c = r.useCallback(
(f) => {
clearTimeout(l.current), l.current = window.setTimeout(() => f());
},
[l]
), i = r.useCallback(
(...f) => {
clearTimeout(l.current), n && n.call(void 0, f[0]), !s.current && (s.current = !0, e && e.call(void 0, ...f));
},
[s, e, n]
), h = r.useCallback(
(...f) => {
o && o.call(void 0, f[0]), c(() => {
s.current && t && (s.current = !1, t.call(void 0, ...f));
});
},
[s, c, t, o]
);
return r.useEffect(() => () => {
clearTimeout(l.current);
}, []), {
onFocus: i,
onBlur: h
};
}
const Yn = ({
children: e,
onFocus: t,
onBlur: n,
onSyncFocus: o,
onSyncBlur: s
}) => {
const l = Lt({ onFocus: t, onBlur: n, onSyncFocus: o, onSyncBlur: s });
return /* @__PURE__ */ r.createElement(r.Fragment, null, e.call(void 0, { ...l }));
}, Tt = (e, t) => r.useContext(e)(t), Gn = () => r.createContext((e) => e), Jn = (e, t) => r.forwardRef((n, o) => {
const s = Tt(e, n);
return /* @__PURE__ */ r.createElement(t, { ...s, ref: o });
}), Nt = typeof window < "u" ? r.useLayoutEffect : r.useEffect;
function Ht(e) {
const [t, n] = r.useState(!1);
r.useEffect(() => {
n(!0);
}, []);
const [o, s] = r.useState(() => {
if (e)
return e;
if (t)
return Ye();
});
return Nt(() => {
o === void 0 && s(Ye());
}, []), r.useId ? e ?? r.useId() : o;
}
const Un = (e) => r.forwardRef((t, n) => {
const o = Ht(t.id);
return /* @__PURE__ */ r.createElement(e, { ...t, id: o, ref: n });
});
function Zn(e, t, n) {
const [o, s] = r.useState(t);
return r.useEffect(
() => {
if (!o && window && e.current) {
const l = window.getComputedStyle(e.current).direction;
l && s(l);
}
},
n
), o;
}
function Vn(e, t, n) {
const [o, s] = r.useState(t);
return r.useEffect(
() => {
if (!o && window && e.current) {
const l = window.getComputedStyle(e.current).direction;
l && s(l);
}
},
n
), o;
}
const Bt = (e, t, n = {}) => {
const o = r.useCallback(
(u) => {
n.onMouseDown && n.onMouseDown.call(void 0, u), e.onMouseDown && e.onMouseDown.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseDown, e.onMouseDown, t]
), s = r.useCallback(
(u) => {
n.onMouseUp && n.onMouseUp.call(void 0, u), e.onMouseUp && e.onMouseUp.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseUp, e.onMouseUp, t]
), l = r.useCallback(
(u) => {
n.onClick && n.onClick.call(void 0, u), e.onClick && e.onClick.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onClick, e.onClick, t]
), c = r.useCallback(
(u) => {
n.onDoubleClick && n.onDoubleClick.call(void 0, u), e.onDoubleClick && e.onDoubleClick.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onDoubleClick, e.onDoubleClick, t]
), i = r.useCallback(
(u) => {
n.onMouseEnter && n.onMouseEnter.call(void 0, u), e.onMouseEnter && e.onMouseEnter.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseEnter, e.onMouseEnter, t]
), h = r.useCallback(
(u) => {
n.onMouseLeave && n.onMouseLeave.call(void 0, u), e.onMouseLeave && e.onMouseLeave.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseLeave, e.onMouseLeave, t]
), f = r.useCallback(
(u) => {
n.onMouseMove && n.onMouseMove.call(void 0, u), e.onMouseMove && e.onMouseMove.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseMove, e.onMouseMove, t]
), d = r.useCallback(
(u) => {
n.onMouseOut && n.onMouseOut.call(void 0, u), e.onMouseOut && e.onMouseOut.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseOut, e.onMouseOut, t]
), m = r.useCallback(
(u) => {
n.onMouseOver && n.onMouseOver.call(void 0, u), e.onMouseOver && e.onMouseOver.call(void 0, {
target: t.current,
syntheticEvent: u
});
},
[n.onMouseOver, e.onMouseOver, t]
);
return {
onClick: l,
onMouseUp: s,
onMouseDown: o,
onDoubleClick: c,
onMouseEnter: i,
onMouseLeave: h,
onMouseMove: f,
onMouseOut: d,
onMouseOver: m
};
}, qn = (e) => [e, {}];
var X = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(X || {});
const Ue = (e = []) => {
const t = r.useRef(e), n = r.useCallback(
(o) => {
switch (o.type) {
case 0:
t.current.push(o.item);
break;
case 1: {
const s = t.current.indexOf(o.item);
t.current.splice(s, 1);
break;
}
}
},
[]
);
return [t.current, n];
}, jt = (e) => {
const t = r.useCallback(
() => e.current && e.current.element ? e.current.element : e.current,
[e]
);
return r.useCallback(() => {
const o = t();
return o && o.ownerDocument || document;
}, [t]);
}, Kn = (e) => {
const t = jt(e);
return r.useCallback(() => {
const o = t();
return o && o.defaultView || window;
}, [t]);
}, nt = {
default: "",
xsmall: "k-icon-xs",
small: "k-icon-sm",
medium: "k-icon-md",
large: "k-icon-lg",
xlarge: "k-icon-xl",
xxlarge: "k-icon-xxl",
xxxlarge: "k-icon-xxxl"
}, Wn = (e) => e.replace(/^k-i-/, ""), Qt = (e) => "k-i-" + e, _n = g.shape({
name: g.string.isRequired,
content: g.string.isRequired,
viewBox: g.string.isRequired
}), de = (e, t) => {
const [n, o] = r.useContext(e), [s, l] = r.useState(t);
return [
n !== void 0 ? n : s,
(...h) => {
n !== void 0 ? o(...h) : l(h[0]);
}
];
}, rt = r.createContext([
void 0,
C
]), ge = r.createContext([
void 0,
C
]), ot = r.createContext([[], C, C]), me = r.createContext([[], C, C]), zt = 2e3;
function Ft(e, t, n = {}) {
const {
onPress: o = C,
onRelease: s = C,
onDragStart: l = C,
onDrag: c = C,
onDragEnd: i = C
} = t, {
hint: h = null,
mouseOnly: f = !1,
autoScroll: d = !0,
scrollContainer: m = null
} = n, [u, x] = r.useState(!1), [y, w] = r.useState(!1), [E] = de(ge), [R, M] = de(rt), [T] = r.useContext(me), [I, P, O] = r.useContext(ot), p = r.useRef({ x: 0, y: 0 }), K = r.useRef(), W = r.useRef(!1), ye = r.useRef(), j = r.useRef(null), _ = r.useRef(!1), pe = r.useRef({ x: 0, y: 0 }), ke = r.useRef({ x: 0, y: 0 }), Z = r.useRef({ x: 0, y: 0 }), De = r.useRef({ x: 0, y: 0 }), Ae = r.useRef({ x: 0, y: 0 }), we = r.useRef({ x: 0, y: 0 }), dt = !!(typeof window < "u" && window.PointerEvent), Pe = !f && dt, L = r.useCallback(
() => e.current && e.current.element ? e.current.element : e.current,
[e]
), ft = r.useCallback(
() => h && h.current && h.current.element ? h.current.element : h ? h.current : null,
[h]
), Ie = r.useCallback(
() => m && m.current && m.current.element ? m.current.element : m ? m.current : null,
[m]
), Oe = r.useCallback(
() => typeof d == "object" && d.boundaryElementRef && d.boundaryElementRef.current && d.boundaryElementRef.current.element ? d.boundaryElementRef.current.element : typeof d == "object" && d.boundaryElementRef && d.boundaryElementRef.current ? d.boundaryElementRef.current : null,
[d]
), Q = r.useRef(null);
r.useImperativeHandle(Q, () => ({
element: L(),
hint: ft(),
onPress: ht,
onDragStart: mt,
onDrag: vt,
onDragEnd: Ct,
onRelease: gt,
data: e.current
}));
const V = r.useCallback(
() => {
const a = L();
return a && a.ownerDocument || document;
},
[L]
), N = r.useCallback(
() => {
const a = V();
return a && a.defaultView || window;
},
[V]
), Me = r.useCallback(
() => ({
drag: R ? R.current : null,
drop: E ? E.current : null,
drags: I.map((a) => a.current),
drops: T.map((a) => a.current),
pressed: u,
ignoreMouse: W.current,
scrollOffset: Ae.current,
offset: pe.current,
pageOffset: ke.current,
initialScrollOffset: we.current,
clientOffset: Z.current,
initialClientOffset: De.current,
velocity: p.current,
autoScroll: !!(typeof d == "object" ? d.enabled !== !1 : d),
scrollableParent: Oe(),
autoScrollDirection: typeof d == "object" ? d.direction : { horizontal: !0, vertical: !0 },
isScrolling: y
}),
[R, E, I, T, u, d, Oe, y]
), Se = r.useCallback(
(a) => {
x(a);
},
[]
), Re = r.useCallback(
(a) => {
w(a);
},
[]
), Le = r.useCallback(
(a) => {
p.current = a;
},
[]
), Te = r.useCallback(
(a) => {
pe.current = a;
},
[]
), Ne = r.useCallback(
(a) => {
Z.current = a;
},
[]
), He = r.useCallback(
(a) => {
ke.current = a;
},
[]
), Be = r.useCallback(
(a) => {
De.current = a;
},
[]
), je = r.useCallback(
(a) => {
Ae.current = a;
},
[]
), Qe = r.useCallback(
(a) => {
we.current = a;
},
[]
), ht = r.useCallback(
(a) => {
o(a);
},
[o]
), gt = r.useCallback(
(a) => {
s(a);
},
[s]
), mt = r.useCallback(
(a) => {
M(Q, { target: e.current, event: a }), l(a);
},
[M, e, l]
), vt = r.useCallback(
(a) => {
c(a);
},
[c]
), Ct = r.useCallback(
(a) => {
_.current || (M(null, { target: e.current, event: a }), i(a));
},
[i, M, e]
), v = r.useCallback(
(a) => {
xt(
Me(),
{ event: a, payload: Q.current },
{
onVelocityChange: Le,
onOffsetChange: Te,
onClientOffsetChange: Ne,
onPageOffsetChange: He,
onInitialClientOffsetChange: Be,
onScrollOffsetChange: je,
onInitialScrollOffsetChange: Qe,
onIsPressedChange: Se,
onIsScrollingChange: Re
}
);
},
[
Me,
Le,
Te,
He,
Ne,
Be,
Qe,
Se,
je,
Re
]
), $ = r.useCallback(
(a) => {
v(a);
},
[v]
), ee = r.useCallback(
(a) => {
v(a);
},
[v]
), te = r.useCallback(
(a) => {
v(a);
},
[v]
), ne = r.useCallback(
(a) => {
v(a);
},
[v]
), re = r.useCallback(
(a) => {
v(a);
},
[v]
), oe = r.useCallback(
(a) => {
v(a);
},
[v]
), se = r.useCallback(
(a) => {
v(a);
},
[v]
), le = r.useCallback(
(a) => {
a.preventDefault(), v(a);
},
[v]
), ce = r.useCallback(
(a) => {
a.preventDefault(), v(a);
},
[v]
), ae = r.useCallback(
(a) => {
a.preventDefault(), v(a);
},
[v]
), ie = r.useCallback(
(a) => {
if (a.touches.length === 0 && a.changedTouches.length === 1) {
const b = N();
W.current = !0, ye.current = b.setTimeout(() => {
W.current = !1;
}, zt);
}
v(a);
},
[v, N]
), ue = r.useCallback(
(a) => {
v(a);
},
[v]
), ze = r.useCallback(
() => {
const a = L();
if (a) {
const b = a.style.touchAction;
return a.style.touchAction = "none", () => {
a.style.touchAction = b;
};
}
},
[L]
), Fe = r.useCallback(
() => (P(Q), () => {
O(Q);
}),
[O, P]
), Et = () => {
const a = N(), b = L(), D = V();
return Pe ? (b && (j.current = Xe(b), j.current && j.current.addEventListener("scroll", ue, { passive: !0 }), b.addEventListener("pointerdown", $, { passive: !0 })), u && (D.addEventListener("pointermove", ee), D.addEventListener("pointerup", ne, !0), D.addEventListener("contextmenu", le), D.addEventListener("pointercancel", te, { passive: !0 }))) : (a.addEventListener("touchmove", C, { capture: !1, passive: !1 }), b && (b.addEventListener("mousedown", re, { passive: !0 }), f || (b.addEventListener("touchstart", ce, { passive: !0 }), u && (b.addEventListener("touchmove", ae, { passive: !0 }), b.addEventListener("touchend", ie, { passive: !0 })))), u && (D.addEventListener("mousemove", oe, { passive: !0 }), D.addEventListener("mouseup", se, { passive: !0 }))), () => {
j.current && j.current.removeEventListener("scroll", ue), b && (b.removeEventListener("pointerdown", $), b.removeEventListener("mousedown", re), b.removeEventListener("touchstart", ce), b.removeEventListener("touchmove", ae), b.removeEventListener("touchend", ie)), D.removeEventListener("pointermove", ee), D.removeEventListener("pointerup", ne, !0), D.removeEventListener("contextmenu", le), D.removeEventListener("pointercancel", te), D.removeEventListener("mousemove", oe), D.removeEventListener("mouseup", se), a.removeEventListener("touchmove", C), a.clearTimeout(ye.current);
};
};
r.useEffect(() => {
const a = N();
if (y) {
const b = Ie() || Xe(document.elementFromPoint(Z.current.x, Z.current.y));
a.clearInterval(K.current), K.current = a.setInterval(() => {
yt(b, { x: p.current.x, y: p.current.y });
}, 50);
}
return () => {
a.clearInterval(K.current);
};
}, [L, Ie, N, y]), r.useEffect(ze, [ze]), r.useEffect(Et, [
u,
N,
L,
V,
f,
Pe,
le,
re,
oe,
se,
te,
$,
ee,
ne,
ie,
ae,
ce,
ue
]), r.useEffect(() => (_.current = !1, () => {
_.current = !0;
}), []), r.useLayoutEffect(Fe, [Fe]);
}
function Xt(e, t = {
onDragEnter: C,
onDragOver: C,
onDragLeave: C,
onDrop: C
}) {
const {
onDragEnter: n = C,
onDragOver: o = C,
onDragLeave: s = C,
onDrop: l = C
} = t, [, c] = de(ge), [, i, h] = r.useContext(me), f = r.useCallback(
() => e.current && e.current.element ? e.current.element : e.current,
[e]
), d = r.useRef(null);
r.useImperativeHandle(d, () => ({
element: f(),
onDragEnter: m,
onDragOver: u,
onDragLeave: x,
onDrop: y,
data: e.current
}));
const m = r.useCallback(
(E) => {
c(d, { target: e.current, event: E }), n(E);
},
[c, e, n]
), u = r.useCallback(
(E) => {
o(E);
},
[o]
), x = r.useCallback(
(E) => {
c(null, { target: e.current, event: E }), s(E);
},
[c, e, s]
), y = r.useCallback(
(E) => {
c(null, { target: e.current, event: E }), l(E);
},
[c, e, l]
), w = r.useCallback(
() => (i(d), () => {
h(d);
}),
[h, i]
);
r.useLayoutEffect(w, [w]);
}
const Ze = (e, t, n) => {
const [o, s] = r.useState(t || e), l = r.useCallback(
(c, i) => {
s(c), n && n.call(void 0, { ...i, value: c });
},
[n, s]
);
return [t !== void 0 ? t : o, l];
}, ve = r.forwardRef((e, t) => {
const {
className: n,
name: o,
themeColor: s,
size: l,
flip: c,
style: i,
id: h,
tabIndex: f,
...d
} = e, m = r.useRef(null), u = r.useRef(null);
r.useImperativeHandle(m, () => ({
element: u.current
})), r.useImperativeHandle(t, () => m.current);
const x = r.useMemo(
() => l || Ve.size,
[l]
), y = r.useMemo(
() => c || Ve.flip,
[c]
), w = r.useMemo(
() => We(
"k-icon",
"k-font-icon",
o && Qt(o),
{
[`k-color-${s}`]: s,
"k-flip-h": y === "horizontal" || y === "both",
"k-flip-v": y === "vertical" || y === "both"
},
nt[x],
n
),
[o, s, x, y, n]
), E = Bt(e, m);
return /* @__PURE__ */ r.createElement(
"span",
{
ref: u,
...d,
...E,
className: w,
id: h,
tabIndex: f,
style: i,
role: "presentation"
}
);
});
ve.propTypes = {
style: g.object,
classNames: g.string,
name: g.string,
themeColor: g.oneOf([
"inherit",
"primary",
"secondary",
"tertiary",
"info",
"success",
"error",
"warning",
"dark",
"light",
"inverse"
]),
size: g.oneOf(["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"]),
flip: g.oneOf(["default", "horizontal", "vertical", "both"])
};
const Ve = {
size: "default",
flip: "default"
};
ve.displayName = "KendoIcon";
const Ce = r.forwardRef((e, t) => {
const {
children: n,
className: o,
svgClassName: s,
icon: l,
flip: c,
id: i,
tabIndex: h,
size: f,
style: d,
svgStyle: m,
themeColor: u,
viewBox: x,
name: y,
onClick: w,
...E
} = e, R = r.useRef(null);
r.useImperativeHandle(
t,
() => ({
element: R.current
})
);
const M = r.useMemo(
() => l ? l.name : q.icon,
[l]
), T = r.useMemo(
() => f || q.size,
[f]
), I = r.useMemo(
() => c || q.flip,
[c]
), P = r.useMemo(
() => x || q.viewBox,
[x]
), O = r.useMemo(
() => We(
"k-icon",
"k-svg-icon",
"k-svg-i-" + M,
{
[`k-color-${u}`]: u,
"k-flip-h": I === "horizontal" || I === "both",
"k-flip-v": I === "vertical" || I === "both"
},
nt[T],
o
),
[M, u, T, I, o]
), p = r.useMemo(
() => e.width && e.height ? { width: e.width, height: e.height, ...d } : e.width ? { width: e.width, height: e.width, ...d } : e.height ? { width: e.height, height: e.height, ...d } : { ...d },
[e.width, e.height, d]
);
return /* @__PURE__ */ r.createElement(
"span",
{
className: O,
style: p,
ref: R,
onClick: w
},
/* @__PURE__ */ r.createElement(
"svg",
{
id: i,
className: s,
style: m,
"aria-hidden": !0,
tabIndex: h,
focusable: !1,
xmlns: "http://www.w3.org/2000/svg",
viewBox: l ? l.viewBox : P,
dangerouslySetInnerHTML: l ? { __html: l.content } : void 0,
...E
},
l ? void 0 : n
)
);
});
Ce.propTypes = {
style: g.object,
classNames: g.string,
children: g.any,
icon: g.object,
themeColor: g.oneOf([
"inherit",
"primary",
"secondary",
"tertiary",
"info",
"success",
"error",
"warning",
"dark",
"light",
"inverse"
]),
size: g.oneOf(["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"]),
flip: g.oneOf(["default", "horizontal", "vertical", "both"])
};
const q = {
size: "default",
flip: "default",
icon: "",
viewBox: "0 0 24 24"
};
Ce.displayName = "KendoSvgIcon";
const st = r.createContext({ type: "svg" });
st.displayName = "KendoReactIconsContext";
const Yt = r.forwardRef((e, t) => {
var h, f;
const { type: n, icons: o } = r.useContext(st), { icon: s, ...l } = e;
let c = n === "svg" ? ((h = e.icon) == null ? void 0 : h.name) || e.name : e.name || ((f = e.icon) == null ? void 0 : f.name);
c = c && o && o[c] && typeof o[c] == "string" ? o[c] : c;
const i = c && o && o[c] && typeof o[c] != "string" ? o[c] : s;
return n === "svg" && i ? /* @__PURE__ */ r.createElement(Ce, { ...e, icon: i, ref: t }) : /* @__PURE__ */ r.createElement(ve, { ...l, name: c, ref: t });
});
Yt.displayName = "KendoIconWrap";
const Gt = {
xsmall: "k-fs-xs",
small: "k-fs-sm",
medium: "k-fs-md",
large: "k-fs-lg",
xlarge: "k-fs-xl"
}, Jt = {
light: "k-font-weight-light",
normal: "k-font-weight-normal",
bold: "k-font-weight-bold"
}, Ut = {
xsmall: "k-m-xs",
small: "k-m-sm",
medium: "k-m-md",
large: "k-m-lg",
xlarge: "k-m-xl",
thin: "k-m-thin",
hair: "k-m-hair"
}, Zt = {
xsmall: "xs",
small: "sm",
medium: "md",
large: "lg",
xlarge: "xl",
thin: "thin",
hair: "hair"
}, Vt = {
top: "k-mt-",
right: "k-mr-",
bottom: "k-mb-",
left: "k-ml-"
}, qt = {
left: "k-text-left",
right: "k-text-right",
center: "k-text-center",
justify: "k-text-justify"
}, Kt = {
lowercase: "k-text-lowercase",
uppercase: "k-text-uppercase",
capitalize: "k-text-capitalize"
}, Wt = {
inherit: "k-color-inherit",
primary: "k-color-primary",
secondary: "k-color-secondary",
tertiary: "k-color-tertiary",
info: "k-color-info",
success: "k-color-success",
warning: "k-color-warning",
error: "k-color-error",
dark: "k-color-dark",
light: "k-color-light",
inverse: "k-color-inverse"
}, S = (e) => {
const t = r.forwardRef((n, o) => {
const {
id: s,
style: l,
className: c,
fontSize: i,
fontWeight: h,
textAlign: f,
textTransform: d,
themeColor: m,
margin: u,
...x
} = n, y = r.useRef(null), w = r.useRef(null);
r.useImperativeHandle(
y,
() => ({
element: w.current,
props: n
})
), r.useImperativeHandle(o, () => y.current);
const E = () => `k-${e === "p" ? "paragraph" : e}`, R = e, M = (P, O) => {
const p = typeof O == "string" ? Zt[O] : O;
return `${Vt[P]}${p}`;
}, T = () => {
if (u !== void 0) {
if (typeof u == "string")
return [Ut[u]];
if (typeof u == "number" && u >= 0 && u <= 24)
return [`k-m-${u}`];
if (typeof u == "object") {
const P = [];
return Object.keys(u).forEach((p) => {
u[p] !== null && u[p] !== void 0 && P.push(M(p, u[p]));
}), P.join(" ");
}
}
}, I = () => [
E(),
Gt[i],
Jt[h],
qt[f],
Kt[d],
Wt[m],
T(),
c
].filter((p) => p !== void 0).join(" ");
return /* @__PURE__ */ r.createElement(
R,
{
id: s,
ref: w,
className: I(),
style: l,
...x
},
n.children
);
});
return t.propTypes = {
style: g.object,
className: g.string,
fontSize: g.oneOf(["xsmall", "small", "medium", "large", "xlarge"]),
fontWeight: g.oneOf(["light", "normal", "bold"]),
margin: g.oneOfType([
g.number,
g.object,
g.oneOf(["xsmall", "small", "medium", "large", "xlarge", "thin", "hair"])
]),
textAlign: g.oneOf(["left", "right", "center", "justify"]),
textTransform: g.oneOf(["lowercase", "uppercase", "capitalize"]),
themeColor: g.oneOf([
"inherit",
"primary",
"secondary",
"tertiary",
"info",
"success",
"error",
"warning",
"dark",
"light",
"inverse"
])
}, t.displayName = `KendoReactTypography${e.toUpperCase()}`, t;
}, _t = S("h1"), $t = S("h2"), en = S("h3"), tn = S("h4"), nn = S("h5"), rn = S("h6"), on = S("p"), sn = S("code"), ln = S("pre"), $n = {
h1: _t,
h2: $t,
h3: en,
h4: tn,
h5: nn,
h6: rn,
p: on,
code: sn,
pre: ln
}, cn = (e) => {
const [t, n] = Ze(
null,
void 0
), [o, s] = Ze(
null,
void 0
), [l, c] = Ue([]), [i, h] = Ue([]), f = (x) => {
c({
type: X.add,
item: x
});
}, d = (x) => {
c({
type: X.remove,
item: x
});
}, m = (x) => {
h({
type: X.add,
item: x
});
}, u = (x) => {
h({
type: X.remove,
item: x
});
};
return /* @__PURE__ */ r.createElement(rt.Provider, { value: [t, n] }, /* @__PURE__ */ r.createElement(ge.Provider, { value: [o, s] }, /* @__PURE__ */ r.createElement(ot.Provider, { value: [l, f, d] }, /* @__PURE__ */ r.createElement(me.Provider, { value: [i, m, u] }, e.children))));
};
cn.displayName = "KendoReactDragAndDrop";
const an = r.forwardRef((e, t) => {
const n = r.useRef(null), o = r.useRef(null), s = r.useCallback(
() => n.current && n.current.element ? n.current.element : n.current,
[n]
);
r.useImperativeHandle(o, () => ({ element: s() || null })), r.useImperativeHandle(t, () => o.current), r.useImperativeHandle(e.childRef, () => n.current);
const l = r.useCallback(
(d) => {
e.onPress && e.onPress({
element: s(),
target: o.current,
event: d
});
},
[s, e.onPress]
), c = r.useCallback(
(d) => {
e.onRelease && e.onRelease({
element: s(),
target: o.current,
event: d
});
},
[s, e.onRelease]
), i = r.useCallback(
(d) => {
e.onDragStart && e.onDragStart({
element: s(),
target: o.current,
event: d
});
},
[e, s]
), h = r.useCallback(
(d) => {
e.onDrag && e.onDrag({
element: s(),
target: o.current,
event: d
});
},
[s, e.onDrag]
), f = r.useCallback(
(d) => {
e.onDragEnd && e.onDragEnd({
element: s(),
target: o.current,
event: d
});
},
[s, e.onDragEnd]
);
return Ft(n, {
onPress: l,
onRelease: c,
onDragStart: i,
onDrag: h,
onDragEnd: f
}, {
mouseOnly: e.mouseOnly,
autoScroll: e.autoScroll,
hint: e.hint,
scrollContainer: e.scrollContainer
}), e.children ? r.cloneElement(r.Children.only(e.children), { ref: n }) : null;
});
an.displayName = "KendoReactDraggable";
const un = r.forwardRef((e, t) => {
const n = r.useRef(null), o = r.useRef(null), s = r.useCallback(
() => n.current && n.current.element ? n.current.element : n.current,
[n]
);
r.useImperativeHandle(o, () => ({ element: s() || void 0 })), r.useImperativeHandle(t, () => o.current), r.useImperativeHandle(e.childRef, () => n.current);
const l = r.useCallback(
(f) => {
e.onDragEnter && e.onDragEnter({
element: s(),
target: o.current,
event: f
});
},
[e.onDragEnter, s]
), c = r.useCallback(
(f) => {
e.onDragOver && e.onDragOver({
element: s(),
target: o.current,
event: f
});
},
[s, e.onDragOver]
), i = r.useCallback(
(f) => {
e.onDragLeave && e.onDragLeave({
element: s(),
target: o.current,
event: f
});
},
[e.onDragLeave, s]
), h = r.useCallback(
(f) => {
e.onDrop && e.onDrop({
element: s(),
target: o.current,
event: f
});
},
[e.onDrop, s]
);
return Xt(n, {
onDragEnter: l,
onDragOver: c,
onDragLeave: i,
onDrop: h
}), e.children ? r.cloneElement(r.Children.only(e.children), { ref: n }) : null;
});
un.displayName = "KendoReactDroppable";
const er = {
sizeMap: {
small: "sm",
medium: "md",
large: "lg"
},
roundedMap: {
small: "sm",
medium: "md",
large: "lg"
},
orientationMap: {
vertical: "vstack",
horizontal: "hstack"
}
};
function dn(e, t) {
return e === t || Number.isNaN(e) && Number.isNaN(t);
}
function fn(e, t) {
if (e.length !== t.length)
return !1;
for (let n = 0; n < e.length; n++)
if (!dn(e[n], t[n]))
return !1;
return !0;
}
function tr(e, t = fn) {
let n = null;
function o(...s) {
if (n && n.lastThis === this && t(s, n.lastArgs))
return n.lastResult;
const l = e.apply(this, s);
return n = {
lastResult: l,
lastArgs: s,
lastThis: this
}, l;
}
return o.clear = function() {
n = null;
}, o;
}
const nr = [
"input:not([disabled]):not([type=hidden])",
"select:not([disabled])",
"textarea:not([disabled])",
"button:not([disabled])",
"a[href]",
"area[href]",
"summary",
"iframe",
"object",
"embed",
"audio[controls]",
"video[controls]",
"[contenteditable]"
];
class rr {
constructor(t) {
this.rovingTabIndex = !0, this.update = () => {
}, this.focusNextIndex = (n, o) => {
const s = this.elements;
let l = s.indexOf(n) + o;
l = l < 0 ? s.length - 1 : l;
const c = s[l % s.length];
return this.focusElement(c, n), c;
}, this.tabIndex = t.tabIndex || 0, this.root = t.root, this.selectors = t.selectors, this.focusOptions = t.focusOptions || { preventScroll: !0 }, this.rovingTabIndex = t.rovingTabIndex !== void 0 ? t.rovingTabIndex : !0, this.mouseEvents = t.mouseEvents || {}, this.keyboardEvents = t.keyboardEvents || {};
}
/**
* Returns the collection of DOM elements which the module will navigate in.
*/
get elements() {
return this.root.current ? Array.from(this.root.current.querySelectorAll(this.selectors.join(","))) : [];
}
/**
* Returns the first navigation DOM element.
*/
get first() {
return this.root.current && this.root.current.querySelector(this.selectors.join(",")) || null;
}
/**
* Returns the last navigation DOM element.
*/
get last() {
const t = this.elements;
return t[t.length - 1] || null;
}
/**
* Returns the focused DOM element from the navigation collection of DOM elements.
*/
get current() {
return this.elements.find((t) => t.matches(":focus")) || null;
}
/**
* Focuses the next element from the navigation collection of DOM elements.
*/
focusNext(t) {
return this.focusNextIndex(t, 1);
}
/**
* Focuses the previous element from the navigation collection of DOM elements.
*/
focusPrevious(t) {
return this.focusNextIndex(t, -1);
}
/**
* The keyboard events handler.
*/
triggerKeyboardEvent(t, n) {
const o = t.target instanceof Element && t.target.closest(this.selectors.join(",")), s = t.key === " " ? "Space" : t.key, l = t.nativeEvent.type;
o && this.keyboardEvents[l][s] && this.keyboardEvents[l][s].call(void 0, o, this, t, n);
}
/**
* The mouse events handler.
*/
triggerMouseEvent(t) {
const n = t.target instanceof Element && t.target.closest(this.selectors.join(",")), o = t.nativeEvent.type;
n && this.mouseEvents[o].call(void 0, n, this, t);
}
/**
* Focuses the passed element from the navigation collection of DOM elements.
*/
focusElement(t, n) {
t && (n && (this.rovingTabIndex && n.removeAttribute("tabindex"), n.classList.remove("k-focus")), this.rovingTabIndex && t.setAttribute("tabindex", String(this.tabIndex)), t.focus(this.focusOptions));
}
}
const fe = (e) => {
const t = e.shadowRoot, n = e.contentDocument;
return t && t.activeElement ? fe(t.activeElement) : n && n.activeElement ? fe(n.activeElement) : e;
}, or = (e) => {
if (!(!e || !e.activeElement))
return fe(e.activeElement);
};
function k(e, t) {
const n = (e || "").split(".");
let o = t;
return n.forEach((s) => {
o = o ? o[s] : void 0;
}), o;
}
function sr(e) {
return e.length !== void 0;
}
class lr {
constructor(t) {
this.expandField = t.expandField, this.selectField = t.selectField, this.hasChildrenField = t.hasChildrenField, this.childrenField = t.childrenField, this.textField = t.textField, this.disableField = t.disableField, this.checkField = t.checkField, this.checkIndeterminateField = t.checkIndeterminateField, this.focusIdField = t.focusIdField;
}
expanded(t) {
return k(this.expandField, t);
}
selected(t) {
return k(this.selectField, t);
}
text(t) {
return k(this.textField, t);
}
disabled(t) {
return k(this.disableField, t);
}
hasChildren(t) {
return k(this.hasChildrenField, t);
}
children(t) {
const n = k(this.childrenField, t);
return n || [];
}
checked(t) {
return k(this.checkField, t);
}
checkIndeterminate(t) {
return k(this.checkIndeterminateField, t);
}
focusId(t) {
return this.focusIdField && k(this.focusIdField, t);
}
getChildrenField() {
return this.childrenField;
}
}
const hn = 5e4;
class gn {
constructor() {
this.objects = [];
}
init(t) {
let n;
for (let o = 0; o < t.length; o++)
o % hn === 0 && (n = {}, this.objects.push(n)), n[t[o]] = !0;
}
hasId(t) {
return this.objects.some((n) => n[t]);
}
}
const G = "", lt = "0", A = "_";
function ct(e, t, n) {
if (U(e))
return t[Number(e)];
{
const o = t[Number(H(e))], s = o && o[n] || [];
return s.length ? ct(B(e), s, n) : void 0;
}
}
function H(e) {
return Ee(e) ? e : e.split(A)[0];
}
function B(e) {
if (Ee(e))
return e;
{
const t = e.indexOf(A);
return e.substring(t + 1);
}
}
function mn(e) {
return J("0", e);
}
function J(e, t) {
return e = e.toString(), t ? t + A + e : e;
}
function at(e) {
const t = e.