@inploi/plugin-job-alerts 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +11 -11
- package/dist/job-alerts.d.ts +18 -3
- package/dist/job-alerts.terms.d.ts +18 -0
- package/dist/plugin-job-alerts.cjs +600 -383
- package/dist/plugin-job-alerts.js +600 -383
- package/package.json +4 -4
|
@@ -1173,163 +1173,87 @@ const compat_module = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
1173
1173
|
useTransition: k,
|
|
1174
1174
|
version: vn
|
|
1175
1175
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1176
|
-
function hasWindow() {
|
|
1176
|
+
function hasWindow$1() {
|
|
1177
1177
|
return typeof window !== "undefined";
|
|
1178
1178
|
}
|
|
1179
|
-
function getNodeName(node) {
|
|
1180
|
-
if (isNode(node)) {
|
|
1179
|
+
function getNodeName$1(node) {
|
|
1180
|
+
if (isNode$1(node)) {
|
|
1181
1181
|
return (node.nodeName || "").toLowerCase();
|
|
1182
1182
|
}
|
|
1183
1183
|
return "#document";
|
|
1184
1184
|
}
|
|
1185
|
-
function getWindow(node) {
|
|
1185
|
+
function getWindow$1(node) {
|
|
1186
1186
|
var _node$ownerDocument;
|
|
1187
1187
|
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
1188
1188
|
}
|
|
1189
|
-
function getDocumentElement(node) {
|
|
1189
|
+
function getDocumentElement$1(node) {
|
|
1190
1190
|
var _ref;
|
|
1191
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1191
|
+
return (_ref = (isNode$1(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1192
1192
|
}
|
|
1193
|
-
function isNode(value) {
|
|
1194
|
-
if (!hasWindow()) {
|
|
1193
|
+
function isNode$1(value) {
|
|
1194
|
+
if (!hasWindow$1()) {
|
|
1195
1195
|
return false;
|
|
1196
1196
|
}
|
|
1197
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1197
|
+
return value instanceof Node || value instanceof getWindow$1(value).Node;
|
|
1198
1198
|
}
|
|
1199
|
-
function isElement(value) {
|
|
1200
|
-
if (!hasWindow()) {
|
|
1199
|
+
function isElement$1(value) {
|
|
1200
|
+
if (!hasWindow$1()) {
|
|
1201
1201
|
return false;
|
|
1202
1202
|
}
|
|
1203
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1203
|
+
return value instanceof Element || value instanceof getWindow$1(value).Element;
|
|
1204
1204
|
}
|
|
1205
|
-
function isHTMLElement(value) {
|
|
1206
|
-
if (!hasWindow()) {
|
|
1205
|
+
function isHTMLElement$1(value) {
|
|
1206
|
+
if (!hasWindow$1()) {
|
|
1207
1207
|
return false;
|
|
1208
1208
|
}
|
|
1209
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1209
|
+
return value instanceof HTMLElement || value instanceof getWindow$1(value).HTMLElement;
|
|
1210
1210
|
}
|
|
1211
|
-
function isShadowRoot(value) {
|
|
1212
|
-
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
1211
|
+
function isShadowRoot$1(value) {
|
|
1212
|
+
if (!hasWindow$1() || typeof ShadowRoot === "undefined") {
|
|
1213
1213
|
return false;
|
|
1214
1214
|
}
|
|
1215
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1215
|
+
return value instanceof ShadowRoot || value instanceof getWindow$1(value).ShadowRoot;
|
|
1216
1216
|
}
|
|
1217
1217
|
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1218
|
-
function isOverflowElement(element) {
|
|
1218
|
+
function isOverflowElement$1(element) {
|
|
1219
1219
|
const {
|
|
1220
1220
|
overflow,
|
|
1221
1221
|
overflowX,
|
|
1222
1222
|
overflowY,
|
|
1223
1223
|
display
|
|
1224
|
-
} = getComputedStyle$
|
|
1224
|
+
} = getComputedStyle$2(element);
|
|
1225
1225
|
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
1226
1226
|
}
|
|
1227
|
-
|
|
1228
|
-
function isTableElement(element) {
|
|
1229
|
-
return tableElements.has(getNodeName(element));
|
|
1230
|
-
}
|
|
1231
|
-
const topLayerSelectors = [":popover-open", ":modal"];
|
|
1232
|
-
function isTopLayer(element) {
|
|
1233
|
-
return topLayerSelectors.some((selector) => {
|
|
1234
|
-
try {
|
|
1235
|
-
return element.matches(selector);
|
|
1236
|
-
} catch (_e) {
|
|
1237
|
-
return false;
|
|
1238
|
-
}
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
|
|
1242
|
-
const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
|
|
1243
|
-
const containValues = ["paint", "layout", "strict", "content"];
|
|
1244
|
-
function isContainingBlock(elementOrCss) {
|
|
1245
|
-
const webkit = isWebKit$1();
|
|
1246
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1247
|
-
return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
|
|
1248
|
-
}
|
|
1249
|
-
function getContainingBlock(element) {
|
|
1250
|
-
let currentNode = getParentNode(element);
|
|
1251
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1252
|
-
if (isContainingBlock(currentNode)) {
|
|
1253
|
-
return currentNode;
|
|
1254
|
-
} else if (isTopLayer(currentNode)) {
|
|
1255
|
-
return null;
|
|
1256
|
-
}
|
|
1257
|
-
currentNode = getParentNode(currentNode);
|
|
1258
|
-
}
|
|
1259
|
-
return null;
|
|
1260
|
-
}
|
|
1261
|
-
function isWebKit$1() {
|
|
1227
|
+
function isWebKit$2() {
|
|
1262
1228
|
if (typeof CSS === "undefined" || !CSS.supports)
|
|
1263
1229
|
return false;
|
|
1264
1230
|
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
1265
1231
|
}
|
|
1266
1232
|
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1267
|
-
function isLastTraversableNode(node) {
|
|
1268
|
-
return lastTraversableNodeNames.has(getNodeName(node));
|
|
1233
|
+
function isLastTraversableNode$1(node) {
|
|
1234
|
+
return lastTraversableNodeNames.has(getNodeName$1(node));
|
|
1269
1235
|
}
|
|
1270
|
-
function getComputedStyle$
|
|
1271
|
-
return getWindow(element).getComputedStyle(element);
|
|
1236
|
+
function getComputedStyle$2(element) {
|
|
1237
|
+
return getWindow$1(element).getComputedStyle(element);
|
|
1272
1238
|
}
|
|
1273
|
-
function
|
|
1274
|
-
if (
|
|
1275
|
-
return {
|
|
1276
|
-
scrollLeft: element.scrollLeft,
|
|
1277
|
-
scrollTop: element.scrollTop
|
|
1278
|
-
};
|
|
1279
|
-
}
|
|
1280
|
-
return {
|
|
1281
|
-
scrollLeft: element.scrollX,
|
|
1282
|
-
scrollTop: element.scrollY
|
|
1283
|
-
};
|
|
1284
|
-
}
|
|
1285
|
-
function getParentNode(node) {
|
|
1286
|
-
if (getNodeName(node) === "html") {
|
|
1239
|
+
function getParentNode$1(node) {
|
|
1240
|
+
if (getNodeName$1(node) === "html") {
|
|
1287
1241
|
return node;
|
|
1288
1242
|
}
|
|
1289
1243
|
const result = (
|
|
1290
1244
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1291
1245
|
node.assignedSlot || // DOM Element detected.
|
|
1292
1246
|
node.parentNode || // ShadowRoot detected.
|
|
1293
|
-
isShadowRoot(node) && node.host || // Fallback.
|
|
1294
|
-
getDocumentElement(node)
|
|
1247
|
+
isShadowRoot$1(node) && node.host || // Fallback.
|
|
1248
|
+
getDocumentElement$1(node)
|
|
1295
1249
|
);
|
|
1296
|
-
return isShadowRoot(result) ? result.host : result;
|
|
1297
|
-
}
|
|
1298
|
-
function getNearestOverflowAncestor(node) {
|
|
1299
|
-
const parentNode = getParentNode(node);
|
|
1300
|
-
if (isLastTraversableNode(parentNode)) {
|
|
1301
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1302
|
-
}
|
|
1303
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1304
|
-
return parentNode;
|
|
1305
|
-
}
|
|
1306
|
-
return getNearestOverflowAncestor(parentNode);
|
|
1307
|
-
}
|
|
1308
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1309
|
-
var _node$ownerDocument2;
|
|
1310
|
-
if (list === void 0) {
|
|
1311
|
-
list = [];
|
|
1312
|
-
}
|
|
1313
|
-
if (traverseIframes === void 0) {
|
|
1314
|
-
traverseIframes = true;
|
|
1315
|
-
}
|
|
1316
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1317
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1318
|
-
const win = getWindow(scrollableAncestor);
|
|
1319
|
-
if (isBody) {
|
|
1320
|
-
const frameElement = getFrameElement(win);
|
|
1321
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1322
|
-
}
|
|
1323
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1324
|
-
}
|
|
1325
|
-
function getFrameElement(win) {
|
|
1326
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1250
|
+
return isShadowRoot$1(result) ? result.host : result;
|
|
1327
1251
|
}
|
|
1328
1252
|
const hasNavigator = typeof navigator !== "undefined";
|
|
1329
1253
|
const nav = getNavigatorData();
|
|
1330
1254
|
const platform$1 = getPlatform();
|
|
1331
1255
|
const userAgent = getUserAgent();
|
|
1332
|
-
const isWebKit = typeof CSS === "undefined" || !CSS.supports ? false : CSS.supports("-webkit-backdrop-filter:none");
|
|
1256
|
+
const isWebKit$1 = typeof CSS === "undefined" || !CSS.supports ? false : CSS.supports("-webkit-backdrop-filter:none");
|
|
1333
1257
|
const isIOS = (
|
|
1334
1258
|
// iPads can claim to be MacIntel
|
|
1335
1259
|
nav.platform === "MacIntel" && nav.maxTouchPoints > 1 ? true : /iP(hone|ad|od)|iOS/.test(nav.platform)
|
|
@@ -1536,14 +1460,14 @@ function hasInsetScrollbars(referenceElement) {
|
|
|
1536
1460
|
return false;
|
|
1537
1461
|
}
|
|
1538
1462
|
const doc = ownerDocument(referenceElement);
|
|
1539
|
-
const win = getWindow(doc);
|
|
1463
|
+
const win = getWindow$1(doc);
|
|
1540
1464
|
return win.innerWidth - doc.documentElement.clientWidth > 0;
|
|
1541
1465
|
}
|
|
1542
1466
|
function preventScrollOverlayScrollbars(referenceElement) {
|
|
1543
1467
|
const doc = ownerDocument(referenceElement);
|
|
1544
1468
|
const html = doc.documentElement;
|
|
1545
1469
|
const body = doc.body;
|
|
1546
|
-
const elementToLock = isOverflowElement(html) ? html : body;
|
|
1470
|
+
const elementToLock = isOverflowElement$1(html) ? html : body;
|
|
1547
1471
|
const originalOverflow = elementToLock.style.overflow;
|
|
1548
1472
|
elementToLock.style.overflow = "hidden";
|
|
1549
1473
|
return () => {
|
|
@@ -1555,12 +1479,12 @@ function preventScrollInsetScrollbars(referenceElement) {
|
|
|
1555
1479
|
const doc = ownerDocument(referenceElement);
|
|
1556
1480
|
const html = doc.documentElement;
|
|
1557
1481
|
const body = doc.body;
|
|
1558
|
-
const win = getWindow(html);
|
|
1482
|
+
const win = getWindow$1(html);
|
|
1559
1483
|
let scrollTop = 0;
|
|
1560
1484
|
let scrollLeft = 0;
|
|
1561
1485
|
const resizeFrame = AnimationFrame.create();
|
|
1562
1486
|
const supportsStableScrollbarGutter = typeof CSS !== "undefined" && ((_a = CSS.supports) == null ? void 0 : _a.call(CSS, "scrollbar-gutter", "stable"));
|
|
1563
|
-
if (isWebKit && (((_b = win.visualViewport) == null ? void 0 : _b.scale) ?? 1) !== 1) {
|
|
1487
|
+
if (isWebKit$1 && (((_b = win.visualViewport) == null ? void 0 : _b.scale) ?? 1) !== 1) {
|
|
1564
1488
|
return () => {
|
|
1565
1489
|
};
|
|
1566
1490
|
}
|
|
@@ -1595,7 +1519,7 @@ function preventScrollInsetScrollbars(referenceElement) {
|
|
|
1595
1519
|
const scrollbarHeight = Math.max(0, win.innerHeight - html.clientHeight);
|
|
1596
1520
|
const marginY = parseFloat(bodyStyles.marginTop) + parseFloat(bodyStyles.marginBottom);
|
|
1597
1521
|
const marginX = parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight);
|
|
1598
|
-
const elementToLock = isOverflowElement(html) ? html : body;
|
|
1522
|
+
const elementToLock = isOverflowElement$1(html) ? html : body;
|
|
1599
1523
|
if (supportsStableScrollbarGutter) {
|
|
1600
1524
|
html.style.scrollbarGutter = scrollbarGutterValue;
|
|
1601
1525
|
elementToLock.style.overflowY = "hidden";
|
|
@@ -1683,7 +1607,7 @@ class ScrollLocker {
|
|
|
1683
1607
|
}
|
|
1684
1608
|
const doc = ownerDocument(referenceElement);
|
|
1685
1609
|
const html = doc.documentElement;
|
|
1686
|
-
const htmlOverflowY = getWindow(html).getComputedStyle(html).overflowY;
|
|
1610
|
+
const htmlOverflowY = getWindow$1(html).getComputedStyle(html).overflowY;
|
|
1687
1611
|
if (htmlOverflowY === "hidden" || htmlOverflowY === "clip") {
|
|
1688
1612
|
this.restore = NOOP;
|
|
1689
1613
|
return;
|
|
@@ -1769,7 +1693,7 @@ function contains(parent, child) {
|
|
|
1769
1693
|
if (parent.contains(child)) {
|
|
1770
1694
|
return true;
|
|
1771
1695
|
}
|
|
1772
|
-
if (rootNode && isShadowRoot(rootNode)) {
|
|
1696
|
+
if (rootNode && isShadowRoot$1(rootNode)) {
|
|
1773
1697
|
let next = child;
|
|
1774
1698
|
while (next) {
|
|
1775
1699
|
if (parent === next) {
|
|
@@ -1803,7 +1727,7 @@ function getDocument(node) {
|
|
|
1803
1727
|
return (node == null ? void 0 : node.ownerDocument) || document;
|
|
1804
1728
|
}
|
|
1805
1729
|
function isTypeableElement(element) {
|
|
1806
|
-
return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
|
|
1730
|
+
return isHTMLElement$1(element) && element.matches(TYPEABLE_SELECTOR);
|
|
1807
1731
|
}
|
|
1808
1732
|
function isTypeableCombobox(element) {
|
|
1809
1733
|
if (!element) {
|
|
@@ -1876,103 +1800,35 @@ function formatErrorMessage(code, ...args) {
|
|
|
1876
1800
|
args.forEach((arg) => url.searchParams.append("args[]", arg));
|
|
1877
1801
|
return `Base UI error #${code}; visit ${url} for the full message.`;
|
|
1878
1802
|
}
|
|
1879
|
-
const
|
|
1880
|
-
const
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
const createCoords = (v2) => ({
|
|
1885
|
-
x: v2,
|
|
1886
|
-
y: v2
|
|
1887
|
-
});
|
|
1888
|
-
const oppositeSideMap = {
|
|
1889
|
-
left: "right",
|
|
1890
|
-
right: "left",
|
|
1891
|
-
bottom: "top",
|
|
1892
|
-
top: "bottom"
|
|
1893
|
-
};
|
|
1894
|
-
const oppositeAlignmentMap = {
|
|
1895
|
-
start: "end",
|
|
1896
|
-
end: "start"
|
|
1897
|
-
};
|
|
1898
|
-
function clamp(start, value, end) {
|
|
1899
|
-
return max(start, min(value, end));
|
|
1803
|
+
const min$1 = Math.min;
|
|
1804
|
+
const max$1 = Math.max;
|
|
1805
|
+
const round$1 = Math.round;
|
|
1806
|
+
function clamp$1(start, value, end) {
|
|
1807
|
+
return max$1(start, min$1(value, end));
|
|
1900
1808
|
}
|
|
1901
|
-
function evaluate(value, param) {
|
|
1809
|
+
function evaluate$1(value, param) {
|
|
1902
1810
|
return typeof value === "function" ? value(param) : value;
|
|
1903
1811
|
}
|
|
1904
|
-
function getSide(placement) {
|
|
1812
|
+
function getSide$1(placement) {
|
|
1905
1813
|
return placement.split("-")[0];
|
|
1906
1814
|
}
|
|
1907
|
-
function getAlignment(placement) {
|
|
1815
|
+
function getAlignment$1(placement) {
|
|
1908
1816
|
return placement.split("-")[1];
|
|
1909
1817
|
}
|
|
1910
|
-
function getOppositeAxis(axis) {
|
|
1818
|
+
function getOppositeAxis$1(axis) {
|
|
1911
1819
|
return axis === "x" ? "y" : "x";
|
|
1912
1820
|
}
|
|
1913
|
-
function getAxisLength(axis) {
|
|
1821
|
+
function getAxisLength$1(axis) {
|
|
1914
1822
|
return axis === "y" ? "height" : "width";
|
|
1915
1823
|
}
|
|
1916
1824
|
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1917
|
-
function getSideAxis(placement) {
|
|
1918
|
-
return yAxisSides.has(getSide(placement)) ? "y" : "x";
|
|
1825
|
+
function getSideAxis$1(placement) {
|
|
1826
|
+
return yAxisSides.has(getSide$1(placement)) ? "y" : "x";
|
|
1919
1827
|
}
|
|
1920
|
-
function getAlignmentAxis(placement) {
|
|
1921
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
1828
|
+
function getAlignmentAxis$1(placement) {
|
|
1829
|
+
return getOppositeAxis$1(getSideAxis$1(placement));
|
|
1922
1830
|
}
|
|
1923
|
-
function
|
|
1924
|
-
if (rtl === void 0) {
|
|
1925
|
-
rtl = false;
|
|
1926
|
-
}
|
|
1927
|
-
const alignment = getAlignment(placement);
|
|
1928
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
1929
|
-
const length = getAxisLength(alignmentAxis);
|
|
1930
|
-
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
1931
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
1932
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
1933
|
-
}
|
|
1934
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
1935
|
-
}
|
|
1936
|
-
function getExpandedPlacements(placement) {
|
|
1937
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
1938
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
1939
|
-
}
|
|
1940
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
1941
|
-
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
1942
|
-
}
|
|
1943
|
-
const lrPlacement = ["left", "right"];
|
|
1944
|
-
const rlPlacement = ["right", "left"];
|
|
1945
|
-
const tbPlacement = ["top", "bottom"];
|
|
1946
|
-
const btPlacement = ["bottom", "top"];
|
|
1947
|
-
function getSideList(side, isStart, rtl) {
|
|
1948
|
-
switch (side) {
|
|
1949
|
-
case "top":
|
|
1950
|
-
case "bottom":
|
|
1951
|
-
if (rtl)
|
|
1952
|
-
return isStart ? rlPlacement : lrPlacement;
|
|
1953
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
1954
|
-
case "left":
|
|
1955
|
-
case "right":
|
|
1956
|
-
return isStart ? tbPlacement : btPlacement;
|
|
1957
|
-
default:
|
|
1958
|
-
return [];
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
1962
|
-
const alignment = getAlignment(placement);
|
|
1963
|
-
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
1964
|
-
if (alignment) {
|
|
1965
|
-
list = list.map((side) => side + "-" + alignment);
|
|
1966
|
-
if (flipAlignment) {
|
|
1967
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
return list;
|
|
1971
|
-
}
|
|
1972
|
-
function getOppositePlacement(placement) {
|
|
1973
|
-
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
1974
|
-
}
|
|
1975
|
-
function expandPaddingObject(padding) {
|
|
1831
|
+
function expandPaddingObject$1(padding) {
|
|
1976
1832
|
return {
|
|
1977
1833
|
top: 0,
|
|
1978
1834
|
right: 0,
|
|
@@ -1981,32 +1837,14 @@ function expandPaddingObject(padding) {
|
|
|
1981
1837
|
...padding
|
|
1982
1838
|
};
|
|
1983
1839
|
}
|
|
1984
|
-
function getPaddingObject(padding) {
|
|
1985
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
1840
|
+
function getPaddingObject$1(padding) {
|
|
1841
|
+
return typeof padding !== "number" ? expandPaddingObject$1(padding) : {
|
|
1986
1842
|
top: padding,
|
|
1987
1843
|
right: padding,
|
|
1988
1844
|
bottom: padding,
|
|
1989
1845
|
left: padding
|
|
1990
1846
|
};
|
|
1991
1847
|
}
|
|
1992
|
-
function rectToClientRect(rect) {
|
|
1993
|
-
const {
|
|
1994
|
-
x: x2,
|
|
1995
|
-
y: y2,
|
|
1996
|
-
width,
|
|
1997
|
-
height
|
|
1998
|
-
} = rect;
|
|
1999
|
-
return {
|
|
2000
|
-
width,
|
|
2001
|
-
height,
|
|
2002
|
-
top: y2,
|
|
2003
|
-
left: x2,
|
|
2004
|
-
right: x2 + width,
|
|
2005
|
-
bottom: y2 + height,
|
|
2006
|
-
x: x2,
|
|
2007
|
-
y: y2
|
|
2008
|
-
};
|
|
2009
|
-
}
|
|
2010
1848
|
/*!
|
|
2011
1849
|
* tabbable 6.3.0
|
|
2012
1850
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
@@ -2800,7 +2638,7 @@ function applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, iner
|
|
|
2800
2638
|
return;
|
|
2801
2639
|
}
|
|
2802
2640
|
[].forEach.call(parent.children, (node) => {
|
|
2803
|
-
if (getNodeName(node) === "script") {
|
|
2641
|
+
if (getNodeName$1(node) === "script") {
|
|
2804
2642
|
return;
|
|
2805
2643
|
}
|
|
2806
2644
|
if (elementsToKeep.has(node)) {
|
|
@@ -3142,7 +2980,7 @@ function useFloatingPortalNode(props = {}) {
|
|
|
3142
2980
|
if (uniqueId == null) {
|
|
3143
2981
|
return;
|
|
3144
2982
|
}
|
|
3145
|
-
const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
|
|
2983
|
+
const resolvedContainer = (containerProp && (isNode$1(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
|
|
3146
2984
|
if (resolvedContainer == null) {
|
|
3147
2985
|
if (containerRef.current) {
|
|
3148
2986
|
containerRef.current = null;
|
|
@@ -3277,7 +3115,7 @@ function resolveRef(maybeRef) {
|
|
|
3277
3115
|
return "current" in maybeRef ? maybeRef.current : maybeRef;
|
|
3278
3116
|
}
|
|
3279
3117
|
function getEventType(event, lastInteractionType) {
|
|
3280
|
-
const win = getWindow(event.target);
|
|
3118
|
+
const win = getWindow$1(event.target);
|
|
3281
3119
|
if (event instanceof win.KeyboardEvent) {
|
|
3282
3120
|
return "keyboard";
|
|
3283
3121
|
}
|
|
@@ -3302,7 +3140,7 @@ function clearDisconnectedPreviouslyFocusedElements() {
|
|
|
3302
3140
|
}
|
|
3303
3141
|
function addPreviouslyFocusedElement(element) {
|
|
3304
3142
|
clearDisconnectedPreviouslyFocusedElements();
|
|
3305
|
-
if (element && getNodeName(element) !== "body") {
|
|
3143
|
+
if (element && getNodeName$1(element) !== "body") {
|
|
3306
3144
|
previouslyFocusedElements.push(element);
|
|
3307
3145
|
if (previouslyFocusedElements.length > LIST_LIMIT) {
|
|
3308
3146
|
previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);
|
|
@@ -3330,7 +3168,7 @@ function isFocusable(element) {
|
|
|
3330
3168
|
if (typeof element.checkVisibility === "function") {
|
|
3331
3169
|
return element.checkVisibility();
|
|
3332
3170
|
}
|
|
3333
|
-
return getComputedStyle$
|
|
3171
|
+
return getComputedStyle$2(element).display !== "none";
|
|
3334
3172
|
}
|
|
3335
3173
|
function handleTabIndex(floatingFocusElement, orderRef) {
|
|
3336
3174
|
var _a;
|
|
@@ -3511,7 +3349,7 @@ function FloatingFocusManager(props) {
|
|
|
3511
3349
|
handleTabIndex(floatingFocusElement, orderRef);
|
|
3512
3350
|
}
|
|
3513
3351
|
if (restoreFocus && currentTarget !== domReference && !isFocusable(target) && activeElement(getDocument(floatingFocusElement)) === getDocument(floatingFocusElement).body) {
|
|
3514
|
-
if (isHTMLElement(floatingFocusElement)) {
|
|
3352
|
+
if (isHTMLElement$1(floatingFocusElement)) {
|
|
3515
3353
|
floatingFocusElement.focus();
|
|
3516
3354
|
if (restoreFocus === "popup") {
|
|
3517
3355
|
restoreFocusFrame.request(() => {
|
|
@@ -3523,7 +3361,7 @@ function FloatingFocusManager(props) {
|
|
|
3523
3361
|
const prevTabbableIndex = tabbableIndexRef.current;
|
|
3524
3362
|
const tabbableContent = getTabbableContent();
|
|
3525
3363
|
const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;
|
|
3526
|
-
if (isHTMLElement(nodeToFocus)) {
|
|
3364
|
+
if (isHTMLElement$1(nodeToFocus)) {
|
|
3527
3365
|
nodeToFocus.focus();
|
|
3528
3366
|
}
|
|
3529
3367
|
}
|
|
@@ -3553,7 +3391,7 @@ function FloatingFocusManager(props) {
|
|
|
3553
3391
|
dataRef.current.insideReactTree = false;
|
|
3554
3392
|
});
|
|
3555
3393
|
}
|
|
3556
|
-
const domReferenceElement = isHTMLElement(domReference) ? domReference : null;
|
|
3394
|
+
const domReferenceElement = isHTMLElement$1(domReference) ? domReference : null;
|
|
3557
3395
|
const cleanups = [];
|
|
3558
3396
|
if (!floating && !domReferenceElement) {
|
|
3559
3397
|
return void 0;
|
|
@@ -3606,7 +3444,7 @@ function FloatingFocusManager(props) {
|
|
|
3606
3444
|
};
|
|
3607
3445
|
}, [open, disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, getInsideElements, nextFocusableElement, previousFocusableElement]);
|
|
3608
3446
|
useIsoLayoutEffect(() => {
|
|
3609
|
-
if (!open || disabled || !isHTMLElement(floatingFocusElement)) {
|
|
3447
|
+
if (!open || disabled || !isHTMLElement$1(floatingFocusElement)) {
|
|
3610
3448
|
return;
|
|
3611
3449
|
}
|
|
3612
3450
|
const doc = getDocument(floatingFocusElement);
|
|
@@ -3707,7 +3545,7 @@ function FloatingFocusManager(props) {
|
|
|
3707
3545
|
const hasExplicitReturnFocus = typeof returnFocusRef.current !== "boolean";
|
|
3708
3546
|
if (
|
|
3709
3547
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3710
|
-
returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
3548
|
+
returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement$1(tabbableReturnElement) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
3711
3549
|
// since it likely entered a different element which should be
|
|
3712
3550
|
// respected: https://github.com/floating-ui/floating-ui/issues/2607
|
|
3713
3551
|
(!hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)
|
|
@@ -3895,6 +3733,134 @@ function useClick(context, props = {}) {
|
|
|
3895
3733
|
reference
|
|
3896
3734
|
} : EMPTY_OBJECT, [enabled, reference]);
|
|
3897
3735
|
}
|
|
3736
|
+
const sides = ["top", "right", "bottom", "left"];
|
|
3737
|
+
const min = Math.min;
|
|
3738
|
+
const max = Math.max;
|
|
3739
|
+
const round = Math.round;
|
|
3740
|
+
const floor = Math.floor;
|
|
3741
|
+
const createCoords = (v2) => ({
|
|
3742
|
+
x: v2,
|
|
3743
|
+
y: v2
|
|
3744
|
+
});
|
|
3745
|
+
const oppositeSideMap = {
|
|
3746
|
+
left: "right",
|
|
3747
|
+
right: "left",
|
|
3748
|
+
bottom: "top",
|
|
3749
|
+
top: "bottom"
|
|
3750
|
+
};
|
|
3751
|
+
function clamp(start, value, end) {
|
|
3752
|
+
return max(start, min(value, end));
|
|
3753
|
+
}
|
|
3754
|
+
function evaluate(value, param) {
|
|
3755
|
+
return typeof value === "function" ? value(param) : value;
|
|
3756
|
+
}
|
|
3757
|
+
function getSide(placement) {
|
|
3758
|
+
return placement.split("-")[0];
|
|
3759
|
+
}
|
|
3760
|
+
function getAlignment(placement) {
|
|
3761
|
+
return placement.split("-")[1];
|
|
3762
|
+
}
|
|
3763
|
+
function getOppositeAxis(axis) {
|
|
3764
|
+
return axis === "x" ? "y" : "x";
|
|
3765
|
+
}
|
|
3766
|
+
function getAxisLength(axis) {
|
|
3767
|
+
return axis === "y" ? "height" : "width";
|
|
3768
|
+
}
|
|
3769
|
+
function getSideAxis(placement) {
|
|
3770
|
+
const firstChar = placement[0];
|
|
3771
|
+
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
3772
|
+
}
|
|
3773
|
+
function getAlignmentAxis(placement) {
|
|
3774
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
3775
|
+
}
|
|
3776
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
3777
|
+
if (rtl === void 0) {
|
|
3778
|
+
rtl = false;
|
|
3779
|
+
}
|
|
3780
|
+
const alignment = getAlignment(placement);
|
|
3781
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
3782
|
+
const length = getAxisLength(alignmentAxis);
|
|
3783
|
+
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
3784
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
3785
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
3786
|
+
}
|
|
3787
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
3788
|
+
}
|
|
3789
|
+
function getExpandedPlacements(placement) {
|
|
3790
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
3791
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
3792
|
+
}
|
|
3793
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
3794
|
+
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
3795
|
+
}
|
|
3796
|
+
const lrPlacement = ["left", "right"];
|
|
3797
|
+
const rlPlacement = ["right", "left"];
|
|
3798
|
+
const tbPlacement = ["top", "bottom"];
|
|
3799
|
+
const btPlacement = ["bottom", "top"];
|
|
3800
|
+
function getSideList(side, isStart, rtl) {
|
|
3801
|
+
switch (side) {
|
|
3802
|
+
case "top":
|
|
3803
|
+
case "bottom":
|
|
3804
|
+
if (rtl)
|
|
3805
|
+
return isStart ? rlPlacement : lrPlacement;
|
|
3806
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
3807
|
+
case "left":
|
|
3808
|
+
case "right":
|
|
3809
|
+
return isStart ? tbPlacement : btPlacement;
|
|
3810
|
+
default:
|
|
3811
|
+
return [];
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
3815
|
+
const alignment = getAlignment(placement);
|
|
3816
|
+
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
3817
|
+
if (alignment) {
|
|
3818
|
+
list = list.map((side) => side + "-" + alignment);
|
|
3819
|
+
if (flipAlignment) {
|
|
3820
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
3821
|
+
}
|
|
3822
|
+
}
|
|
3823
|
+
return list;
|
|
3824
|
+
}
|
|
3825
|
+
function getOppositePlacement(placement) {
|
|
3826
|
+
const side = getSide(placement);
|
|
3827
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
3828
|
+
}
|
|
3829
|
+
function expandPaddingObject(padding) {
|
|
3830
|
+
return {
|
|
3831
|
+
top: 0,
|
|
3832
|
+
right: 0,
|
|
3833
|
+
bottom: 0,
|
|
3834
|
+
left: 0,
|
|
3835
|
+
...padding
|
|
3836
|
+
};
|
|
3837
|
+
}
|
|
3838
|
+
function getPaddingObject(padding) {
|
|
3839
|
+
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
3840
|
+
top: padding,
|
|
3841
|
+
right: padding,
|
|
3842
|
+
bottom: padding,
|
|
3843
|
+
left: padding
|
|
3844
|
+
};
|
|
3845
|
+
}
|
|
3846
|
+
function rectToClientRect(rect) {
|
|
3847
|
+
const {
|
|
3848
|
+
x: x2,
|
|
3849
|
+
y: y2,
|
|
3850
|
+
width,
|
|
3851
|
+
height
|
|
3852
|
+
} = rect;
|
|
3853
|
+
return {
|
|
3854
|
+
width,
|
|
3855
|
+
height,
|
|
3856
|
+
top: y2,
|
|
3857
|
+
left: x2,
|
|
3858
|
+
right: x2 + width,
|
|
3859
|
+
bottom: y2 + height,
|
|
3860
|
+
x: x2,
|
|
3861
|
+
y: y2
|
|
3862
|
+
};
|
|
3863
|
+
}
|
|
3898
3864
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
3899
3865
|
let {
|
|
3900
3866
|
reference,
|
|
@@ -3950,6 +3916,63 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
3950
3916
|
}
|
|
3951
3917
|
return coords;
|
|
3952
3918
|
}
|
|
3919
|
+
async function detectOverflow(state, options) {
|
|
3920
|
+
var _await$platform$isEle;
|
|
3921
|
+
if (options === void 0) {
|
|
3922
|
+
options = {};
|
|
3923
|
+
}
|
|
3924
|
+
const {
|
|
3925
|
+
x: x2,
|
|
3926
|
+
y: y2,
|
|
3927
|
+
platform: platform2,
|
|
3928
|
+
rects,
|
|
3929
|
+
elements,
|
|
3930
|
+
strategy
|
|
3931
|
+
} = state;
|
|
3932
|
+
const {
|
|
3933
|
+
boundary = "clippingAncestors",
|
|
3934
|
+
rootBoundary = "viewport",
|
|
3935
|
+
elementContext = "floating",
|
|
3936
|
+
altBoundary = false,
|
|
3937
|
+
padding = 0
|
|
3938
|
+
} = evaluate(options, state);
|
|
3939
|
+
const paddingObject = getPaddingObject(padding);
|
|
3940
|
+
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
3941
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
3942
|
+
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
3943
|
+
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
|
|
3944
|
+
boundary,
|
|
3945
|
+
rootBoundary,
|
|
3946
|
+
strategy
|
|
3947
|
+
}));
|
|
3948
|
+
const rect = elementContext === "floating" ? {
|
|
3949
|
+
x: x2,
|
|
3950
|
+
y: y2,
|
|
3951
|
+
width: rects.floating.width,
|
|
3952
|
+
height: rects.floating.height
|
|
3953
|
+
} : rects.reference;
|
|
3954
|
+
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
3955
|
+
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
3956
|
+
x: 1,
|
|
3957
|
+
y: 1
|
|
3958
|
+
} : {
|
|
3959
|
+
x: 1,
|
|
3960
|
+
y: 1
|
|
3961
|
+
};
|
|
3962
|
+
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3963
|
+
elements,
|
|
3964
|
+
rect,
|
|
3965
|
+
offsetParent,
|
|
3966
|
+
strategy
|
|
3967
|
+
}) : rect);
|
|
3968
|
+
return {
|
|
3969
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
3970
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
3971
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
3972
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
3973
|
+
};
|
|
3974
|
+
}
|
|
3975
|
+
const MAX_RESET_COUNT = 50;
|
|
3953
3976
|
const computePosition$1 = async (reference, floating, config) => {
|
|
3954
3977
|
const {
|
|
3955
3978
|
placement = "bottom",
|
|
@@ -3957,7 +3980,10 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
3957
3980
|
middleware = [],
|
|
3958
3981
|
platform: platform2
|
|
3959
3982
|
} = config;
|
|
3960
|
-
const
|
|
3983
|
+
const platformWithDetectOverflow = platform2.detectOverflow ? platform2 : {
|
|
3984
|
+
...platform2,
|
|
3985
|
+
detectOverflow
|
|
3986
|
+
};
|
|
3961
3987
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
|
|
3962
3988
|
let rects = await platform2.getElementRects({
|
|
3963
3989
|
reference,
|
|
@@ -3969,13 +3995,17 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
3969
3995
|
y: y2
|
|
3970
3996
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
3971
3997
|
let statefulPlacement = placement;
|
|
3972
|
-
let middlewareData = {};
|
|
3973
3998
|
let resetCount = 0;
|
|
3974
|
-
|
|
3999
|
+
const middlewareData = {};
|
|
4000
|
+
for (let i2 = 0; i2 < middleware.length; i2++) {
|
|
4001
|
+
const currentMiddleware = middleware[i2];
|
|
4002
|
+
if (!currentMiddleware) {
|
|
4003
|
+
continue;
|
|
4004
|
+
}
|
|
3975
4005
|
const {
|
|
3976
4006
|
name,
|
|
3977
4007
|
fn: fn2
|
|
3978
|
-
} =
|
|
4008
|
+
} = currentMiddleware;
|
|
3979
4009
|
const {
|
|
3980
4010
|
x: nextX,
|
|
3981
4011
|
y: nextY,
|
|
@@ -3989,7 +4019,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
3989
4019
|
strategy,
|
|
3990
4020
|
middlewareData,
|
|
3991
4021
|
rects,
|
|
3992
|
-
platform:
|
|
4022
|
+
platform: platformWithDetectOverflow,
|
|
3993
4023
|
elements: {
|
|
3994
4024
|
reference,
|
|
3995
4025
|
floating
|
|
@@ -3997,14 +4027,11 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
3997
4027
|
});
|
|
3998
4028
|
x2 = nextX != null ? nextX : x2;
|
|
3999
4029
|
y2 = nextY != null ? nextY : y2;
|
|
4000
|
-
middlewareData = {
|
|
4001
|
-
...middlewareData,
|
|
4002
|
-
|
|
4003
|
-
...middlewareData[name],
|
|
4004
|
-
...data
|
|
4005
|
-
}
|
|
4030
|
+
middlewareData[name] = {
|
|
4031
|
+
...middlewareData[name],
|
|
4032
|
+
...data
|
|
4006
4033
|
};
|
|
4007
|
-
if (reset && resetCount
|
|
4034
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
4008
4035
|
resetCount++;
|
|
4009
4036
|
if (typeof reset === "object") {
|
|
4010
4037
|
if (reset.placement) {
|
|
@@ -4033,62 +4060,6 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
4033
4060
|
middlewareData
|
|
4034
4061
|
};
|
|
4035
4062
|
};
|
|
4036
|
-
async function detectOverflow(state, options) {
|
|
4037
|
-
var _await$platform$isEle;
|
|
4038
|
-
if (options === void 0) {
|
|
4039
|
-
options = {};
|
|
4040
|
-
}
|
|
4041
|
-
const {
|
|
4042
|
-
x: x2,
|
|
4043
|
-
y: y2,
|
|
4044
|
-
platform: platform2,
|
|
4045
|
-
rects,
|
|
4046
|
-
elements,
|
|
4047
|
-
strategy
|
|
4048
|
-
} = state;
|
|
4049
|
-
const {
|
|
4050
|
-
boundary = "clippingAncestors",
|
|
4051
|
-
rootBoundary = "viewport",
|
|
4052
|
-
elementContext = "floating",
|
|
4053
|
-
altBoundary = false,
|
|
4054
|
-
padding = 0
|
|
4055
|
-
} = evaluate(options, state);
|
|
4056
|
-
const paddingObject = getPaddingObject(padding);
|
|
4057
|
-
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
4058
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
4059
|
-
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
4060
|
-
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
|
|
4061
|
-
boundary,
|
|
4062
|
-
rootBoundary,
|
|
4063
|
-
strategy
|
|
4064
|
-
}));
|
|
4065
|
-
const rect = elementContext === "floating" ? {
|
|
4066
|
-
x: x2,
|
|
4067
|
-
y: y2,
|
|
4068
|
-
width: rects.floating.width,
|
|
4069
|
-
height: rects.floating.height
|
|
4070
|
-
} : rects.reference;
|
|
4071
|
-
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
4072
|
-
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
4073
|
-
x: 1,
|
|
4074
|
-
y: 1
|
|
4075
|
-
} : {
|
|
4076
|
-
x: 1,
|
|
4077
|
-
y: 1
|
|
4078
|
-
};
|
|
4079
|
-
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4080
|
-
elements,
|
|
4081
|
-
rect,
|
|
4082
|
-
offsetParent,
|
|
4083
|
-
strategy
|
|
4084
|
-
}) : rect);
|
|
4085
|
-
return {
|
|
4086
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
4087
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
4088
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
4089
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
4090
|
-
};
|
|
4091
|
-
}
|
|
4092
4063
|
const flip$2 = function(options) {
|
|
4093
4064
|
if (options === void 0) {
|
|
4094
4065
|
options = {};
|
|
@@ -4128,7 +4099,7 @@ const flip$2 = function(options) {
|
|
|
4128
4099
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
4129
4100
|
}
|
|
4130
4101
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
4131
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4102
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
4132
4103
|
const overflows = [];
|
|
4133
4104
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
4134
4105
|
if (checkMainAxis) {
|
|
@@ -4218,7 +4189,8 @@ const hide$3 = function(options) {
|
|
|
4218
4189
|
options,
|
|
4219
4190
|
async fn(state) {
|
|
4220
4191
|
const {
|
|
4221
|
-
rects
|
|
4192
|
+
rects,
|
|
4193
|
+
platform: platform2
|
|
4222
4194
|
} = state;
|
|
4223
4195
|
const {
|
|
4224
4196
|
strategy = "referenceHidden",
|
|
@@ -4226,7 +4198,7 @@ const hide$3 = function(options) {
|
|
|
4226
4198
|
} = evaluate(options, state);
|
|
4227
4199
|
switch (strategy) {
|
|
4228
4200
|
case "referenceHidden": {
|
|
4229
|
-
const overflow = await detectOverflow(state, {
|
|
4201
|
+
const overflow = await platform2.detectOverflow(state, {
|
|
4230
4202
|
...detectOverflowOptions,
|
|
4231
4203
|
elementContext: "reference"
|
|
4232
4204
|
});
|
|
@@ -4239,7 +4211,7 @@ const hide$3 = function(options) {
|
|
|
4239
4211
|
};
|
|
4240
4212
|
}
|
|
4241
4213
|
case "escaped": {
|
|
4242
|
-
const overflow = await detectOverflow(state, {
|
|
4214
|
+
const overflow = await platform2.detectOverflow(state, {
|
|
4243
4215
|
...detectOverflowOptions,
|
|
4244
4216
|
altBoundary: true
|
|
4245
4217
|
});
|
|
@@ -4337,7 +4309,8 @@ const shift$2 = function(options) {
|
|
|
4337
4309
|
const {
|
|
4338
4310
|
x: x2,
|
|
4339
4311
|
y: y2,
|
|
4340
|
-
placement
|
|
4312
|
+
placement,
|
|
4313
|
+
platform: platform2
|
|
4341
4314
|
} = state;
|
|
4342
4315
|
const {
|
|
4343
4316
|
mainAxis: checkMainAxis = true,
|
|
@@ -4360,7 +4333,7 @@ const shift$2 = function(options) {
|
|
|
4360
4333
|
x: x2,
|
|
4361
4334
|
y: y2
|
|
4362
4335
|
};
|
|
4363
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4336
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
4364
4337
|
const crossAxis = getSideAxis(getSide(placement));
|
|
4365
4338
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
4366
4339
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -4483,7 +4456,7 @@ const size$2 = function(options) {
|
|
|
4483
4456
|
},
|
|
4484
4457
|
...detectOverflowOptions
|
|
4485
4458
|
} = evaluate(options, state);
|
|
4486
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4459
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
4487
4460
|
const side = getSide(placement);
|
|
4488
4461
|
const alignment = getAlignment(placement);
|
|
4489
4462
|
const isYAxis = getSideAxis(placement) === "y";
|
|
@@ -4541,6 +4514,160 @@ const size$2 = function(options) {
|
|
|
4541
4514
|
}
|
|
4542
4515
|
};
|
|
4543
4516
|
};
|
|
4517
|
+
function hasWindow() {
|
|
4518
|
+
return typeof window !== "undefined";
|
|
4519
|
+
}
|
|
4520
|
+
function getNodeName(node) {
|
|
4521
|
+
if (isNode(node)) {
|
|
4522
|
+
return (node.nodeName || "").toLowerCase();
|
|
4523
|
+
}
|
|
4524
|
+
return "#document";
|
|
4525
|
+
}
|
|
4526
|
+
function getWindow(node) {
|
|
4527
|
+
var _node$ownerDocument;
|
|
4528
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4529
|
+
}
|
|
4530
|
+
function getDocumentElement(node) {
|
|
4531
|
+
var _ref;
|
|
4532
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
4533
|
+
}
|
|
4534
|
+
function isNode(value) {
|
|
4535
|
+
if (!hasWindow()) {
|
|
4536
|
+
return false;
|
|
4537
|
+
}
|
|
4538
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
4539
|
+
}
|
|
4540
|
+
function isElement(value) {
|
|
4541
|
+
if (!hasWindow()) {
|
|
4542
|
+
return false;
|
|
4543
|
+
}
|
|
4544
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
4545
|
+
}
|
|
4546
|
+
function isHTMLElement(value) {
|
|
4547
|
+
if (!hasWindow()) {
|
|
4548
|
+
return false;
|
|
4549
|
+
}
|
|
4550
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
4551
|
+
}
|
|
4552
|
+
function isShadowRoot(value) {
|
|
4553
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
4554
|
+
return false;
|
|
4555
|
+
}
|
|
4556
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
4557
|
+
}
|
|
4558
|
+
function isOverflowElement(element) {
|
|
4559
|
+
const {
|
|
4560
|
+
overflow,
|
|
4561
|
+
overflowX,
|
|
4562
|
+
overflowY,
|
|
4563
|
+
display
|
|
4564
|
+
} = getComputedStyle$1(element);
|
|
4565
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
4566
|
+
}
|
|
4567
|
+
function isTableElement(element) {
|
|
4568
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
4569
|
+
}
|
|
4570
|
+
function isTopLayer(element) {
|
|
4571
|
+
try {
|
|
4572
|
+
if (element.matches(":popover-open")) {
|
|
4573
|
+
return true;
|
|
4574
|
+
}
|
|
4575
|
+
} catch (_e) {
|
|
4576
|
+
}
|
|
4577
|
+
try {
|
|
4578
|
+
return element.matches(":modal");
|
|
4579
|
+
} catch (_e) {
|
|
4580
|
+
return false;
|
|
4581
|
+
}
|
|
4582
|
+
}
|
|
4583
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
4584
|
+
const containRe = /paint|layout|strict|content/;
|
|
4585
|
+
const isNotNone = (value) => !!value && value !== "none";
|
|
4586
|
+
let isWebKitValue;
|
|
4587
|
+
function isContainingBlock(elementOrCss) {
|
|
4588
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
4589
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
4590
|
+
}
|
|
4591
|
+
function getContainingBlock(element) {
|
|
4592
|
+
let currentNode = getParentNode(element);
|
|
4593
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
4594
|
+
if (isContainingBlock(currentNode)) {
|
|
4595
|
+
return currentNode;
|
|
4596
|
+
} else if (isTopLayer(currentNode)) {
|
|
4597
|
+
return null;
|
|
4598
|
+
}
|
|
4599
|
+
currentNode = getParentNode(currentNode);
|
|
4600
|
+
}
|
|
4601
|
+
return null;
|
|
4602
|
+
}
|
|
4603
|
+
function isWebKit() {
|
|
4604
|
+
if (isWebKitValue == null) {
|
|
4605
|
+
isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
4606
|
+
}
|
|
4607
|
+
return isWebKitValue;
|
|
4608
|
+
}
|
|
4609
|
+
function isLastTraversableNode(node) {
|
|
4610
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
4611
|
+
}
|
|
4612
|
+
function getComputedStyle$1(element) {
|
|
4613
|
+
return getWindow(element).getComputedStyle(element);
|
|
4614
|
+
}
|
|
4615
|
+
function getNodeScroll(element) {
|
|
4616
|
+
if (isElement(element)) {
|
|
4617
|
+
return {
|
|
4618
|
+
scrollLeft: element.scrollLeft,
|
|
4619
|
+
scrollTop: element.scrollTop
|
|
4620
|
+
};
|
|
4621
|
+
}
|
|
4622
|
+
return {
|
|
4623
|
+
scrollLeft: element.scrollX,
|
|
4624
|
+
scrollTop: element.scrollY
|
|
4625
|
+
};
|
|
4626
|
+
}
|
|
4627
|
+
function getParentNode(node) {
|
|
4628
|
+
if (getNodeName(node) === "html") {
|
|
4629
|
+
return node;
|
|
4630
|
+
}
|
|
4631
|
+
const result = (
|
|
4632
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
4633
|
+
node.assignedSlot || // DOM Element detected.
|
|
4634
|
+
node.parentNode || // ShadowRoot detected.
|
|
4635
|
+
isShadowRoot(node) && node.host || // Fallback.
|
|
4636
|
+
getDocumentElement(node)
|
|
4637
|
+
);
|
|
4638
|
+
return isShadowRoot(result) ? result.host : result;
|
|
4639
|
+
}
|
|
4640
|
+
function getNearestOverflowAncestor(node) {
|
|
4641
|
+
const parentNode = getParentNode(node);
|
|
4642
|
+
if (isLastTraversableNode(parentNode)) {
|
|
4643
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
4644
|
+
}
|
|
4645
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
4646
|
+
return parentNode;
|
|
4647
|
+
}
|
|
4648
|
+
return getNearestOverflowAncestor(parentNode);
|
|
4649
|
+
}
|
|
4650
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
4651
|
+
var _node$ownerDocument2;
|
|
4652
|
+
if (list === void 0) {
|
|
4653
|
+
list = [];
|
|
4654
|
+
}
|
|
4655
|
+
if (traverseIframes === void 0) {
|
|
4656
|
+
traverseIframes = true;
|
|
4657
|
+
}
|
|
4658
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
4659
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
4660
|
+
const win = getWindow(scrollableAncestor);
|
|
4661
|
+
if (isBody) {
|
|
4662
|
+
const frameElement = getFrameElement(win);
|
|
4663
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
4664
|
+
} else {
|
|
4665
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
4666
|
+
}
|
|
4667
|
+
}
|
|
4668
|
+
function getFrameElement(win) {
|
|
4669
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
4670
|
+
}
|
|
4544
4671
|
function getCssDimensions$1(element) {
|
|
4545
4672
|
const css = getComputedStyle$1(element);
|
|
4546
4673
|
let width = parseFloat(css.width) || 0;
|
|
@@ -4589,7 +4716,7 @@ function getScale(element) {
|
|
|
4589
4716
|
const noOffsets = /* @__PURE__ */ createCoords(0);
|
|
4590
4717
|
function getVisualOffsets(element) {
|
|
4591
4718
|
const win = getWindow(element);
|
|
4592
|
-
if (!isWebKit
|
|
4719
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
4593
4720
|
return noOffsets;
|
|
4594
4721
|
}
|
|
4595
4722
|
return {
|
|
@@ -4698,7 +4825,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
4698
4825
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
4699
4826
|
scroll = getNodeScroll(offsetParent);
|
|
4700
4827
|
}
|
|
4701
|
-
if (
|
|
4828
|
+
if (isOffsetParentAnElement) {
|
|
4702
4829
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
4703
4830
|
scale = getScale(offsetParent);
|
|
4704
4831
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
@@ -4746,7 +4873,7 @@ function getViewportRect(element, strategy) {
|
|
|
4746
4873
|
if (visualViewport) {
|
|
4747
4874
|
width = visualViewport.width;
|
|
4748
4875
|
height = visualViewport.height;
|
|
4749
|
-
const visualViewportBased = isWebKit
|
|
4876
|
+
const visualViewportBased = isWebKit();
|
|
4750
4877
|
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
4751
4878
|
x2 = visualViewport.offsetLeft;
|
|
4752
4879
|
y2 = visualViewport.offsetTop;
|
|
@@ -4772,7 +4899,6 @@ function getViewportRect(element, strategy) {
|
|
|
4772
4899
|
y: y2
|
|
4773
4900
|
};
|
|
4774
4901
|
}
|
|
4775
|
-
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
4776
4902
|
function getInnerBoundingClientRect(element, strategy) {
|
|
4777
4903
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
4778
4904
|
const top = clientRect.top + element.clientTop;
|
|
@@ -4830,7 +4956,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
4830
4956
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
4831
4957
|
currentContainingBlockComputedStyle = null;
|
|
4832
4958
|
}
|
|
4833
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
4959
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
4834
4960
|
if (shouldDropCurrentNode) {
|
|
4835
4961
|
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
4836
4962
|
} else {
|
|
@@ -4850,20 +4976,23 @@ function getClippingRect(_ref) {
|
|
|
4850
4976
|
} = _ref;
|
|
4851
4977
|
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
4852
4978
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
4853
|
-
const
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4979
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
4980
|
+
let top = firstRect.top;
|
|
4981
|
+
let right = firstRect.right;
|
|
4982
|
+
let bottom = firstRect.bottom;
|
|
4983
|
+
let left = firstRect.left;
|
|
4984
|
+
for (let i2 = 1; i2 < clippingAncestors.length; i2++) {
|
|
4985
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i2], strategy);
|
|
4986
|
+
top = max(rect.top, top);
|
|
4987
|
+
right = min(rect.right, right);
|
|
4988
|
+
bottom = min(rect.bottom, bottom);
|
|
4989
|
+
left = max(rect.left, left);
|
|
4990
|
+
}
|
|
4862
4991
|
return {
|
|
4863
|
-
width:
|
|
4864
|
-
height:
|
|
4865
|
-
x:
|
|
4866
|
-
y:
|
|
4992
|
+
width: right - left,
|
|
4993
|
+
height: bottom - top,
|
|
4994
|
+
x: left,
|
|
4995
|
+
y: top
|
|
4867
4996
|
};
|
|
4868
4997
|
}
|
|
4869
4998
|
function getDimensions(element) {
|
|
@@ -5072,7 +5201,7 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
5072
5201
|
animationFrame = false
|
|
5073
5202
|
} = options;
|
|
5074
5203
|
const referenceEl = unwrapElement(reference);
|
|
5075
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
5204
|
+
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
5076
5205
|
ancestors.forEach((ancestor) => {
|
|
5077
5206
|
ancestorScroll && ancestor.addEventListener("scroll", update2, {
|
|
5078
5207
|
passive: true
|
|
@@ -5085,7 +5214,7 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
5085
5214
|
if (elementResize) {
|
|
5086
5215
|
resizeObserver = new ResizeObserver((_ref) => {
|
|
5087
5216
|
let [firstEntry] = _ref;
|
|
5088
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
5217
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
5089
5218
|
resizeObserver.unobserve(floating);
|
|
5090
5219
|
cancelAnimationFrame(reobserveFrame);
|
|
5091
5220
|
reobserveFrame = requestAnimationFrame(() => {
|
|
@@ -5098,7 +5227,9 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
5098
5227
|
if (referenceEl && !animationFrame) {
|
|
5099
5228
|
resizeObserver.observe(referenceEl);
|
|
5100
5229
|
}
|
|
5101
|
-
|
|
5230
|
+
if (floating) {
|
|
5231
|
+
resizeObserver.observe(floating);
|
|
5232
|
+
}
|
|
5102
5233
|
}
|
|
5103
5234
|
let frameId;
|
|
5104
5235
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -5518,23 +5649,23 @@ function useDismiss(context, props = {}) {
|
|
|
5518
5649
|
if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
|
|
5519
5650
|
return;
|
|
5520
5651
|
}
|
|
5521
|
-
let targetRootAncestor = isElement(target) ? target : null;
|
|
5522
|
-
while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
|
|
5523
|
-
const nextParent = getParentNode(targetRootAncestor);
|
|
5524
|
-
if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
|
|
5652
|
+
let targetRootAncestor = isElement$1(target) ? target : null;
|
|
5653
|
+
while (targetRootAncestor && !isLastTraversableNode$1(targetRootAncestor)) {
|
|
5654
|
+
const nextParent = getParentNode$1(targetRootAncestor);
|
|
5655
|
+
if (isLastTraversableNode$1(nextParent) || !isElement$1(nextParent)) {
|
|
5525
5656
|
break;
|
|
5526
5657
|
}
|
|
5527
5658
|
targetRootAncestor = nextParent;
|
|
5528
5659
|
}
|
|
5529
|
-
if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
5660
|
+
if (markers.length && isElement$1(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
5530
5661
|
!contains(target, store5.select("floatingElement")) && // If the target root element contains none of the markers, then the
|
|
5531
5662
|
// element was injected after the floating element rendered.
|
|
5532
5663
|
Array.from(markers).every((marker) => !contains(targetRootAncestor, marker))) {
|
|
5533
5664
|
return;
|
|
5534
5665
|
}
|
|
5535
|
-
if (isHTMLElement(target) && !("touches" in event)) {
|
|
5536
|
-
const lastTraversableNode = isLastTraversableNode(target);
|
|
5537
|
-
const style = getComputedStyle$
|
|
5666
|
+
if (isHTMLElement$1(target) && !("touches" in event)) {
|
|
5667
|
+
const lastTraversableNode = isLastTraversableNode$1(target);
|
|
5668
|
+
const style = getComputedStyle$2(target);
|
|
5538
5669
|
const scrollRe = /auto|scroll/;
|
|
5539
5670
|
const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
|
|
5540
5671
|
const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
|
|
@@ -5688,7 +5819,7 @@ function useDismiss(context, props = {}) {
|
|
|
5688
5819
|
compositionTimeout.start(
|
|
5689
5820
|
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
5690
5821
|
// Only apply to WebKit for the test to remain 0ms.
|
|
5691
|
-
isWebKit$
|
|
5822
|
+
isWebKit$2() ? 5 : 0,
|
|
5692
5823
|
() => {
|
|
5693
5824
|
isComposingRef.current = false;
|
|
5694
5825
|
}
|
|
@@ -5711,13 +5842,13 @@ function useDismiss(context, props = {}) {
|
|
|
5711
5842
|
}
|
|
5712
5843
|
let ancestors = [];
|
|
5713
5844
|
if (ancestorScroll) {
|
|
5714
|
-
if (isElement(domReferenceElement)) {
|
|
5845
|
+
if (isElement$1(domReferenceElement)) {
|
|
5715
5846
|
ancestors = getOverflowAncestors(domReferenceElement);
|
|
5716
5847
|
}
|
|
5717
|
-
if (isElement(floatingElement)) {
|
|
5848
|
+
if (isElement$1(floatingElement)) {
|
|
5718
5849
|
ancestors = ancestors.concat(getOverflowAncestors(floatingElement));
|
|
5719
5850
|
}
|
|
5720
|
-
if (!isElement(referenceElement) && referenceElement && referenceElement.contextElement) {
|
|
5851
|
+
if (!isElement$1(referenceElement) && referenceElement && referenceElement.contextElement) {
|
|
5721
5852
|
ancestors = ancestors.concat(getOverflowAncestors(referenceElement.contextElement));
|
|
5722
5853
|
}
|
|
5723
5854
|
}
|
|
@@ -7335,7 +7466,7 @@ function useFloatingRootContext(options) {
|
|
|
7335
7466
|
const nested = useFloatingParentNodeId() != null;
|
|
7336
7467
|
if (process.env.NODE_ENV !== "production") {
|
|
7337
7468
|
const optionDomReference = elements.reference;
|
|
7338
|
-
if (optionDomReference && !isElement(optionDomReference)) {
|
|
7469
|
+
if (optionDomReference && !isElement$1(optionDomReference)) {
|
|
7339
7470
|
console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
|
|
7340
7471
|
}
|
|
7341
7472
|
}
|
|
@@ -7356,7 +7487,7 @@ function useFloatingRootContext(options) {
|
|
|
7356
7487
|
};
|
|
7357
7488
|
if (elements.reference !== void 0) {
|
|
7358
7489
|
valuesToSync.referenceElement = elements.reference;
|
|
7359
|
-
valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null;
|
|
7490
|
+
valuesToSync.domReferenceElement = isElement$1(elements.reference) ? elements.reference : null;
|
|
7360
7491
|
}
|
|
7361
7492
|
if (elements.floating !== void 0) {
|
|
7362
7493
|
valuesToSync.floatingElement = elements.floating;
|
|
@@ -7398,7 +7529,7 @@ function useFloating(options = {}) {
|
|
|
7398
7529
|
}
|
|
7399
7530
|
});
|
|
7400
7531
|
const setPositionReference = q$1((node) => {
|
|
7401
|
-
const computedPositionReference = isElement(node) ? {
|
|
7532
|
+
const computedPositionReference = isElement$1(node) ? {
|
|
7402
7533
|
getBoundingClientRect: () => node.getBoundingClientRect(),
|
|
7403
7534
|
getClientRects: () => node.getClientRects(),
|
|
7404
7535
|
contextElement: node
|
|
@@ -7409,17 +7540,17 @@ function useFloating(options = {}) {
|
|
|
7409
7540
|
const [localDomReference, setLocalDomReference] = d$2(null);
|
|
7410
7541
|
const [localFloatingElement, setLocalFloatingElement] = d$2(null);
|
|
7411
7542
|
rootContext.useSyncedValue("referenceElement", localDomReference);
|
|
7412
|
-
rootContext.useSyncedValue("domReferenceElement", isElement(localDomReference) ? localDomReference : null);
|
|
7543
|
+
rootContext.useSyncedValue("domReferenceElement", isElement$1(localDomReference) ? localDomReference : null);
|
|
7413
7544
|
rootContext.useSyncedValue("floatingElement", localFloatingElement);
|
|
7414
7545
|
const setReference = q$1((node) => {
|
|
7415
|
-
if (isElement(node) || node === null) {
|
|
7546
|
+
if (isElement$1(node) || node === null) {
|
|
7416
7547
|
domReferenceRef.current = node;
|
|
7417
7548
|
setLocalDomReference(node);
|
|
7418
7549
|
}
|
|
7419
|
-
if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
7550
|
+
if (isElement$1(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
7420
7551
|
// `null` to support `positionReference` + an unstable `reference`
|
|
7421
7552
|
// callback ref.
|
|
7422
|
-
node !== null && !isElement(node)) {
|
|
7553
|
+
node !== null && !isElement$1(node)) {
|
|
7423
7554
|
position.refs.setReference(node);
|
|
7424
7555
|
}
|
|
7425
7556
|
}, [position.refs, setLocalDomReference]);
|
|
@@ -7497,7 +7628,7 @@ function useSyncedFloatingRootContext(options) {
|
|
|
7497
7628
|
referenceElement,
|
|
7498
7629
|
floatingElement
|
|
7499
7630
|
};
|
|
7500
|
-
if (isElement(referenceElement)) {
|
|
7631
|
+
if (isElement$1(referenceElement)) {
|
|
7501
7632
|
valuesToSync.domReferenceElement = referenceElement;
|
|
7502
7633
|
}
|
|
7503
7634
|
store5.update(valuesToSync);
|
|
@@ -7631,7 +7762,7 @@ function useHoverFloatingInteraction(context, parameters = {}) {
|
|
|
7631
7762
|
if (!enabled) {
|
|
7632
7763
|
return void 0;
|
|
7633
7764
|
}
|
|
7634
|
-
if (open && ((_a = handleCloseOptionsRef.current) == null ? void 0 : _a.blockPointerEvents) && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
|
|
7765
|
+
if (open && ((_a = handleCloseOptionsRef.current) == null ? void 0 : _a.blockPointerEvents) && isHoverOpen() && isElement$1(domReferenceElement) && floatingElement) {
|
|
7635
7766
|
performedPointerEventsMutationRef.current = true;
|
|
7636
7767
|
const body = getDocument(floatingElement).body;
|
|
7637
7768
|
body.setAttribute(safePolygonIdentifier, "");
|
|
@@ -7832,7 +7963,7 @@ function useHoverReferenceInteraction(context, props = {}) {
|
|
|
7832
7963
|
return void 0;
|
|
7833
7964
|
}
|
|
7834
7965
|
const trigger = triggerElementRef.current ?? (isActiveTrigger ? store5.select("domReferenceElement") : null);
|
|
7835
|
-
if (!isElement(trigger)) {
|
|
7966
|
+
if (!isElement$1(trigger)) {
|
|
7836
7967
|
return void 0;
|
|
7837
7968
|
}
|
|
7838
7969
|
function onMouseEnter(event) {
|
|
@@ -8257,7 +8388,7 @@ function safePolygon(options = {}) {
|
|
|
8257
8388
|
hasLanded = true;
|
|
8258
8389
|
return void 0;
|
|
8259
8390
|
}
|
|
8260
|
-
if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {
|
|
8391
|
+
if (isLeave && isElement$1(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {
|
|
8261
8392
|
return void 0;
|
|
8262
8393
|
}
|
|
8263
8394
|
if (tree && getNodeChildren(tree.nodesRef.current, nodeId).some(({
|
|
@@ -8813,7 +8944,7 @@ function useButton(parameters = {}) {
|
|
|
8813
8944
|
};
|
|
8814
8945
|
}
|
|
8815
8946
|
function isButtonElement(elem) {
|
|
8816
|
-
return isHTMLElement(elem) && elem.tagName === "BUTTON";
|
|
8947
|
+
return isHTMLElement$1(elem) && elem.tagName === "BUTTON";
|
|
8817
8948
|
}
|
|
8818
8949
|
let TransitionStatusDataAttributes = /* @__PURE__ */ function(TransitionStatusDataAttributes2) {
|
|
8819
8950
|
TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
|
|
@@ -9104,17 +9235,17 @@ const baseArrow = (options) => ({
|
|
|
9104
9235
|
element,
|
|
9105
9236
|
padding = 0,
|
|
9106
9237
|
offsetParent = "real"
|
|
9107
|
-
} = evaluate(options, state) || {};
|
|
9238
|
+
} = evaluate$1(options, state) || {};
|
|
9108
9239
|
if (element == null) {
|
|
9109
9240
|
return {};
|
|
9110
9241
|
}
|
|
9111
|
-
const paddingObject = getPaddingObject(padding);
|
|
9242
|
+
const paddingObject = getPaddingObject$1(padding);
|
|
9112
9243
|
const coords = {
|
|
9113
9244
|
x: x2,
|
|
9114
9245
|
y: y2
|
|
9115
9246
|
};
|
|
9116
|
-
const axis = getAlignmentAxis(placement);
|
|
9117
|
-
const length = getAxisLength(axis);
|
|
9247
|
+
const axis = getAlignmentAxis$1(placement);
|
|
9248
|
+
const length = getAxisLength$1(axis);
|
|
9118
9249
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
9119
9250
|
const isYAxis = axis === "y";
|
|
9120
9251
|
const minProp = isYAxis ? "top" : "left";
|
|
@@ -9134,8 +9265,8 @@ const baseArrow = (options) => ({
|
|
|
9134
9265
|
const min2 = minPadding;
|
|
9135
9266
|
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
9136
9267
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
9137
|
-
const offset2 = clamp(min2, center, max2);
|
|
9138
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
9268
|
+
const offset2 = clamp$1(min2, center, max2);
|
|
9269
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment$1(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
9139
9270
|
const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
|
|
9140
9271
|
return {
|
|
9141
9272
|
[axis]: coords[axis] + alignmentOffset,
|
|
@@ -9194,7 +9325,7 @@ const adaptiveOrigin = {
|
|
|
9194
9325
|
strategy,
|
|
9195
9326
|
placement
|
|
9196
9327
|
} = state;
|
|
9197
|
-
const win = getWindow(floating);
|
|
9328
|
+
const win = getWindow$1(floating);
|
|
9198
9329
|
const styles = win.getComputedStyle(floating);
|
|
9199
9330
|
const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
|
|
9200
9331
|
if (!hasTransition) {
|
|
@@ -9223,7 +9354,7 @@ const adaptiveOrigin = {
|
|
|
9223
9354
|
} else if (await ((_b = platform2.isElement) == null ? void 0 : _b.call(platform2, offsetParent))) {
|
|
9224
9355
|
offsetDimensions = await platform2.getDimensions(offsetParent);
|
|
9225
9356
|
}
|
|
9226
|
-
const currentSide = getSide(placement);
|
|
9357
|
+
const currentSide = getSide$1(placement);
|
|
9227
9358
|
let x2 = rawX;
|
|
9228
9359
|
let y2 = rawY;
|
|
9229
9360
|
if (currentSide === "left") {
|
|
@@ -9261,8 +9392,8 @@ function getOffsetData(state, sideParam, isRtl) {
|
|
|
9261
9392
|
placement
|
|
9262
9393
|
} = state;
|
|
9263
9394
|
const data = {
|
|
9264
|
-
side: getLogicalSide(sideParam, getSide(placement), isRtl),
|
|
9265
|
-
align: getAlignment(placement) || "center",
|
|
9395
|
+
side: getLogicalSide(sideParam, getSide$1(placement), isRtl),
|
|
9396
|
+
align: getAlignment$1(placement) || "center",
|
|
9266
9397
|
anchor: {
|
|
9267
9398
|
width: rects.reference.width,
|
|
9268
9399
|
height: rects.reference.height
|
|
@@ -9400,7 +9531,7 @@ function useAnchorPositioning(params) {
|
|
|
9400
9531
|
width,
|
|
9401
9532
|
height
|
|
9402
9533
|
} = arrowRef.current.getBoundingClientRect();
|
|
9403
|
-
const sideAxis = getSideAxis(getSide(limitData.placement));
|
|
9534
|
+
const sideAxis = getSideAxis$1(getSide$1(limitData.placement));
|
|
9404
9535
|
const arrowSize = sideAxis === "y" ? width : height;
|
|
9405
9536
|
const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
|
|
9406
9537
|
return {
|
|
@@ -9452,8 +9583,8 @@ function useAnchorPositioning(params) {
|
|
|
9452
9583
|
rects,
|
|
9453
9584
|
y: y3
|
|
9454
9585
|
} = state;
|
|
9455
|
-
const currentRenderedSide = getSide(renderedPlacement2);
|
|
9456
|
-
const currentRenderedAxis = getSideAxis(currentRenderedSide);
|
|
9586
|
+
const currentRenderedSide = getSide$1(renderedPlacement2);
|
|
9587
|
+
const currentRenderedAxis = getSideAxis$1(currentRenderedSide);
|
|
9457
9588
|
const arrowEl = arrowRef.current;
|
|
9458
9589
|
const arrowX = ((_a2 = middlewareData2.arrow) == null ? void 0 : _a2.x) || 0;
|
|
9459
9590
|
const arrowY = ((_b2 = middlewareData2.arrow) == null ? void 0 : _b2.y) || 0;
|
|
@@ -9555,9 +9686,9 @@ function useAnchorPositioning(params) {
|
|
|
9555
9686
|
}
|
|
9556
9687
|
return void 0;
|
|
9557
9688
|
}, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
|
|
9558
|
-
const renderedSide = getSide(renderedPlacement);
|
|
9689
|
+
const renderedSide = getSide$1(renderedPlacement);
|
|
9559
9690
|
const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
|
|
9560
|
-
const renderedAlign = getAlignment(renderedPlacement) || "center";
|
|
9691
|
+
const renderedAlign = getAlignment$1(renderedPlacement) || "center";
|
|
9561
9692
|
const anchorHidden = Boolean((_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden);
|
|
9562
9693
|
useIsoLayoutEffect(() => {
|
|
9563
9694
|
if (lazyFlip && mounted && isPositioned) {
|
|
@@ -9752,13 +9883,13 @@ const PopoverPositioner = /* @__PURE__ */ D(function PopoverPositioner2(componen
|
|
|
9752
9883
|
if (process.env.NODE_ENV !== "production")
|
|
9753
9884
|
PopoverPositioner.displayName = "PopoverPositioner";
|
|
9754
9885
|
function getCssDimensions(element) {
|
|
9755
|
-
const css = getComputedStyle$
|
|
9886
|
+
const css = getComputedStyle$2(element);
|
|
9756
9887
|
let width = parseFloat(css.width) || 0;
|
|
9757
9888
|
let height = parseFloat(css.height) || 0;
|
|
9758
|
-
const hasOffset = isHTMLElement(element);
|
|
9889
|
+
const hasOffset = isHTMLElement$1(element);
|
|
9759
9890
|
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
9760
9891
|
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
9761
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
9892
|
+
const shouldFallback = round$1(width) !== offsetWidth || round$1(height) !== offsetHeight;
|
|
9762
9893
|
if (shouldFallback) {
|
|
9763
9894
|
width = offsetWidth;
|
|
9764
9895
|
height = offsetHeight;
|
|
@@ -10024,7 +10155,7 @@ const PopoverPopup = /* @__PURE__ */ D(function PopoverPopup2(componentProps, fo
|
|
|
10024
10155
|
initialFocus: resolvedInitialFocus,
|
|
10025
10156
|
returnFocus: finalFocus,
|
|
10026
10157
|
restoreFocus: "popup",
|
|
10027
|
-
previousFocusableElement: isHTMLElement(activeTriggerElement) ? activeTriggerElement : void 0,
|
|
10158
|
+
previousFocusableElement: isHTMLElement$1(activeTriggerElement) ? activeTriggerElement : void 0,
|
|
10028
10159
|
nextFocusableElement: store5.context.triggerFocusTargetRef,
|
|
10029
10160
|
beforeContentFocusGuardRef: store5.context.beforeContentFocusGuardRef,
|
|
10030
10161
|
children: element
|
|
@@ -10091,12 +10222,12 @@ var createTranslateFunction = ({
|
|
|
10091
10222
|
return t2;
|
|
10092
10223
|
};
|
|
10093
10224
|
var TranslationContext = R$2(null);
|
|
10094
|
-
var createTranslation = (
|
|
10225
|
+
var createTranslation = (defaultTerms2) => {
|
|
10095
10226
|
return {
|
|
10096
|
-
defaultTerms,
|
|
10227
|
+
defaultTerms: defaultTerms2,
|
|
10097
10228
|
TranslationProvider: ({ terms, children, locale }) => {
|
|
10098
10229
|
const t2 = T$1(() => {
|
|
10099
|
-
return createTranslateFunction({ locale, terms:
|
|
10230
|
+
return createTranslateFunction({ locale, terms: defaultTerms2, overrides: terms });
|
|
10100
10231
|
}, [terms, locale]);
|
|
10101
10232
|
return /* @__PURE__ */ u$2(TranslationContext.Provider, { value: { t: t2, locale }, children });
|
|
10102
10233
|
},
|
|
@@ -10109,10 +10240,10 @@ var createTranslation = (defaultTerms) => {
|
|
|
10109
10240
|
createTFunction: ({
|
|
10110
10241
|
overrides,
|
|
10111
10242
|
locale
|
|
10112
|
-
}) => createTranslateFunction({ terms:
|
|
10243
|
+
}) => createTranslateFunction({ terms: defaultTerms2, overrides, locale })
|
|
10113
10244
|
};
|
|
10114
10245
|
};
|
|
10115
|
-
const
|
|
10246
|
+
const defaultTerms = {
|
|
10116
10247
|
DAILY: "Daily",
|
|
10117
10248
|
WEEKLY: "Weekly",
|
|
10118
10249
|
MONTHLY: "Monthly",
|
|
@@ -10123,8 +10254,11 @@ const { TranslationProvider, useTranslation, createTFunction } = createTranslati
|
|
|
10123
10254
|
save: "Save",
|
|
10124
10255
|
save_alert: "Save Alert",
|
|
10125
10256
|
frequency: "Frequency",
|
|
10126
|
-
create_alert: "Create Alert"
|
|
10127
|
-
|
|
10257
|
+
create_alert: "Create Alert",
|
|
10258
|
+
create_alert_error: "Failed to create alert. Please try again later.",
|
|
10259
|
+
privacy_policy_link: "How we use your personal data"
|
|
10260
|
+
};
|
|
10261
|
+
const { TranslationProvider, useTranslation, createTFunction } = createTranslation(defaultTerms);
|
|
10128
10262
|
var i = Symbol.for("preact-signals");
|
|
10129
10263
|
function t() {
|
|
10130
10264
|
if (!(s$1 > 1)) {
|
|
@@ -10875,6 +11009,51 @@ function array(item, message2) {
|
|
|
10875
11009
|
};
|
|
10876
11010
|
}
|
|
10877
11011
|
// @__NO_SIDE_EFFECTS__
|
|
11012
|
+
function literal(literal_, message2) {
|
|
11013
|
+
return {
|
|
11014
|
+
kind: "schema",
|
|
11015
|
+
type: "literal",
|
|
11016
|
+
reference: literal,
|
|
11017
|
+
expects: /* @__PURE__ */ _stringify(literal_),
|
|
11018
|
+
async: false,
|
|
11019
|
+
literal: literal_,
|
|
11020
|
+
message: message2,
|
|
11021
|
+
get "~standard"() {
|
|
11022
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
11023
|
+
},
|
|
11024
|
+
"~run"(dataset, config2) {
|
|
11025
|
+
if (dataset.value === this.literal) {
|
|
11026
|
+
dataset.typed = true;
|
|
11027
|
+
} else {
|
|
11028
|
+
_addIssue(this, "type", dataset, config2);
|
|
11029
|
+
}
|
|
11030
|
+
return dataset;
|
|
11031
|
+
}
|
|
11032
|
+
};
|
|
11033
|
+
}
|
|
11034
|
+
// @__NO_SIDE_EFFECTS__
|
|
11035
|
+
function number(message2) {
|
|
11036
|
+
return {
|
|
11037
|
+
kind: "schema",
|
|
11038
|
+
type: "number",
|
|
11039
|
+
reference: number,
|
|
11040
|
+
expects: "number",
|
|
11041
|
+
async: false,
|
|
11042
|
+
message: message2,
|
|
11043
|
+
get "~standard"() {
|
|
11044
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
11045
|
+
},
|
|
11046
|
+
"~run"(dataset, config2) {
|
|
11047
|
+
if (typeof dataset.value === "number" && !isNaN(dataset.value)) {
|
|
11048
|
+
dataset.typed = true;
|
|
11049
|
+
} else {
|
|
11050
|
+
_addIssue(this, "type", dataset, config2);
|
|
11051
|
+
}
|
|
11052
|
+
return dataset;
|
|
11053
|
+
}
|
|
11054
|
+
};
|
|
11055
|
+
}
|
|
11056
|
+
// @__NO_SIDE_EFFECTS__
|
|
10878
11057
|
function object(entries2, message2) {
|
|
10879
11058
|
return {
|
|
10880
11059
|
kind: "schema",
|
|
@@ -11219,6 +11398,21 @@ function pipe(...pipe2) {
|
|
|
11219
11398
|
}
|
|
11220
11399
|
};
|
|
11221
11400
|
}
|
|
11401
|
+
const alertFiltersSchema = /* @__PURE__ */ record(
|
|
11402
|
+
/* @__PURE__ */ string(),
|
|
11403
|
+
/* @__PURE__ */ union([
|
|
11404
|
+
/* @__PURE__ */ string(),
|
|
11405
|
+
/* @__PURE__ */ array(/* @__PURE__ */ string()),
|
|
11406
|
+
/* @__PURE__ */ object({
|
|
11407
|
+
type: /* @__PURE__ */ literal("provided"),
|
|
11408
|
+
lat: /* @__PURE__ */ number(),
|
|
11409
|
+
lng: /* @__PURE__ */ number(),
|
|
11410
|
+
radius: /* @__PURE__ */ number(),
|
|
11411
|
+
unit: /* @__PURE__ */ optional(/* @__PURE__ */ picklist(["miles", "km"])),
|
|
11412
|
+
label: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
11413
|
+
})
|
|
11414
|
+
])
|
|
11415
|
+
);
|
|
11222
11416
|
const saveSearchEndpoint = sdk.endpoint({
|
|
11223
11417
|
pathname: "/search/save",
|
|
11224
11418
|
method: "POST",
|
|
@@ -11231,7 +11425,7 @@ const saveSearchEndpoint = sdk.endpoint({
|
|
|
11231
11425
|
last_name: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
11232
11426
|
}),
|
|
11233
11427
|
alerts: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ string(), /* @__PURE__ */ picklist(FREQUENCIES)),
|
|
11234
|
-
filters:
|
|
11428
|
+
filters: alertFiltersSchema
|
|
11235
11429
|
})
|
|
11236
11430
|
}
|
|
11237
11431
|
});
|
|
@@ -11424,13 +11618,6 @@ const InputError = ({ error: error2 }) => {
|
|
|
11424
11618
|
] });
|
|
11425
11619
|
};
|
|
11426
11620
|
const inputClass = "rounded-field-input bg-neutral-1 text-accent-11 autofill:shadow-[inset_0_0_0_1000px_var(--i-color-a-2)] autofill:focus:shadow-[inset_0_0_0_1000px_var(--i-color-a-1)] autofill:[-webkit-text-fill-color:var(--i-color-a-11)] px-3 py-2 ring ring-[1px] transition-all ease-expo-out duration-snappy ring-neutral-4 fr inline-flex w-full items-center justify-center px-2.5 text-base shadow-[0_0_0_1px] outline-none focus:shadow-[0_0_0_2px]";
|
|
11427
|
-
const getErrorMessage = (error2) => {
|
|
11428
|
-
if (typeof error2 === "string")
|
|
11429
|
-
return error2;
|
|
11430
|
-
if (typeof error2 === "object" && error2 !== null && "message" in error2 && typeof error2.message === "string")
|
|
11431
|
-
return error2.message;
|
|
11432
|
-
return "Failed to create alert. Please try again later.";
|
|
11433
|
-
};
|
|
11434
11621
|
const JobAlertsButton = D(
|
|
11435
11622
|
({ class: className, ...props }, ref) => /* @__PURE__ */ u$2(
|
|
11436
11623
|
"button",
|
|
@@ -11451,6 +11638,21 @@ const JobAlertsButton = D(
|
|
|
11451
11638
|
)
|
|
11452
11639
|
);
|
|
11453
11640
|
const PopoverHeader = () => /* @__PURE__ */ u$2("p", { class: "text-neutral-11 px-2 pb-4 pt-1 text-sm", children: store$1.config$.value.headerText });
|
|
11641
|
+
const PrivacyPolicyLink = ({ label }) => {
|
|
11642
|
+
const url = store$1.config$.value.privacyPolicyUrl;
|
|
11643
|
+
if (!url)
|
|
11644
|
+
return null;
|
|
11645
|
+
return /* @__PURE__ */ u$2(
|
|
11646
|
+
"a",
|
|
11647
|
+
{
|
|
11648
|
+
href: url,
|
|
11649
|
+
target: "_blank",
|
|
11650
|
+
rel: "noopener noreferrer",
|
|
11651
|
+
class: "text-neutral-11 hover:text-accent-11 px-2 text-xs underline underline-offset-2",
|
|
11652
|
+
children: label
|
|
11653
|
+
}
|
|
11654
|
+
);
|
|
11655
|
+
};
|
|
11454
11656
|
function noop2() {
|
|
11455
11657
|
}
|
|
11456
11658
|
const JobAlerts = ({ theme, rpcClient, logger, analytics }) => {
|
|
@@ -11499,7 +11701,7 @@ const JobAlerts = ({ theme, rpcClient, logger, analytics }) => {
|
|
|
11499
11701
|
setFormState("idle");
|
|
11500
11702
|
}).catch((err) => {
|
|
11501
11703
|
logger.error(err);
|
|
11502
|
-
setError(
|
|
11704
|
+
setError(t2("create_alert_error"));
|
|
11503
11705
|
setFormState("idle");
|
|
11504
11706
|
});
|
|
11505
11707
|
},
|
|
@@ -11553,6 +11755,7 @@ const JobAlerts = ({ theme, rpcClient, logger, analytics }) => {
|
|
|
11553
11755
|
/* @__PURE__ */ u$2("div", { class: "text-neutral-10 absolute bottom-0 right-0 top-0 flex items-center p-1", "aria-hidden": true, children: /* @__PURE__ */ u$2(Icon, { name: "chevron-up-down" }) })
|
|
11554
11756
|
] })
|
|
11555
11757
|
] }),
|
|
11758
|
+
/* @__PURE__ */ u$2(PrivacyPolicyLink, { label: t2("privacy_policy_link") }),
|
|
11556
11759
|
/* @__PURE__ */ u$2(
|
|
11557
11760
|
"button",
|
|
11558
11761
|
{
|
|
@@ -12190,6 +12393,11 @@ const tailwind = `#ija {
|
|
|
12190
12393
|
line-height: 1.25rem;
|
|
12191
12394
|
}
|
|
12192
12395
|
|
|
12396
|
+
#ija .text-xs {
|
|
12397
|
+
font-size: 0.75rem;
|
|
12398
|
+
line-height: 1rem;
|
|
12399
|
+
}
|
|
12400
|
+
|
|
12193
12401
|
#ija .font-medium {
|
|
12194
12402
|
font-weight: 500;
|
|
12195
12403
|
}
|
|
@@ -12240,6 +12448,10 @@ const tailwind = `#ija {
|
|
|
12240
12448
|
text-decoration-line: underline;
|
|
12241
12449
|
}
|
|
12242
12450
|
|
|
12451
|
+
#ija .underline-offset-2 {
|
|
12452
|
+
text-underline-offset: 2px;
|
|
12453
|
+
}
|
|
12454
|
+
|
|
12243
12455
|
#ija .opacity-0 {
|
|
12244
12456
|
opacity: 0;
|
|
12245
12457
|
}
|
|
@@ -12469,6 +12681,10 @@ const tailwind = `#ija {
|
|
|
12469
12681
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
12470
12682
|
}
|
|
12471
12683
|
|
|
12684
|
+
#ija .hover\\:text-accent-11:hover {
|
|
12685
|
+
color: var(--i-color-a-11);
|
|
12686
|
+
}
|
|
12687
|
+
|
|
12472
12688
|
#ija .focus\\:shadow-\\[0_0_0_2px\\]:focus {
|
|
12473
12689
|
--tw-shadow: 0 0 0 2px;
|
|
12474
12690
|
--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);
|
|
@@ -12634,4 +12850,5 @@ const jobAlertsPlugin = () => sdk.createPlugin(({ rpcClient, logger, analytics }
|
|
|
12634
12850
|
};
|
|
12635
12851
|
});
|
|
12636
12852
|
exports.createJobAlertsDomManager = createJobAlertsDomManager;
|
|
12853
|
+
exports.defaultTerms = defaultTerms;
|
|
12637
12854
|
exports.jobAlertsPlugin = jobAlertsPlugin;
|