@retailcrm/embed-ui-v1-components 0.9.5 → 0.9.6
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/dist/host.cjs +181 -254
- package/dist/host.css +1 -0
- package/dist/host.js +182 -255
- package/dist/remote.cjs +12 -14
- package/dist/remote.d.ts +0 -7
- package/dist/remote.js +13 -15
- package/package.json +22 -29
- package/dist/host.d.ts +0 -752
package/dist/host.cjs
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
3
|
const vue = require("vue");
|
|
7
4
|
const imagePreview = require("@retailcrm/image-preview");
|
|
@@ -13,14 +10,14 @@ const _hoisted_1$m = {
|
|
|
13
10
|
viewBox: "0 0 24 24"
|
|
14
11
|
};
|
|
15
12
|
function render$a(_ctx, _cache) {
|
|
16
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$m, _cache[0] || (_cache[0] = [
|
|
13
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$m, [..._cache[0] || (_cache[0] = [
|
|
17
14
|
vue.createElementVNode("path", {
|
|
18
15
|
fill: "currentColor",
|
|
19
16
|
"fill-rule": "evenodd",
|
|
20
17
|
d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16m3.237-10.576A2.424 2.424 0 0 0 12.812 7H11.13a2.424 2.424 0 0 0-2.424 2.424v.421c0 .233.188.421.42.421h.64a.42.42 0 0 0 .421-.42v-.422a.943.943 0 0 1 .943-.942h1.683c.521 0 .943.422.943.942v.472a.95.95 0 0 1-.64.9l-.8.261a1.58 1.58 0 0 0-1.085 1.499v.656c0 .233.188.421.42.421h.64a.42.42 0 0 0 .421-.42v-.657a.11.11 0 0 1 .101-.101l.8-.261a2.43 2.43 0 0 0 1.684-2.298zm-2.845 5.893h-.842a.42.42 0 0 0-.421.42v.842c0 .233.188.421.42.421h.843a.42.42 0 0 0 .42-.42v-.843a.42.42 0 0 0-.42-.42",
|
|
21
18
|
"clip-rule": "evenodd"
|
|
22
19
|
}, null, -1)
|
|
23
|
-
]));
|
|
20
|
+
])]);
|
|
24
21
|
}
|
|
25
22
|
const IconHelpOutlined = { render: render$a };
|
|
26
23
|
const _hoisted_1$l = {
|
|
@@ -28,11 +25,11 @@ const _hoisted_1$l = {
|
|
|
28
25
|
viewBox: "0 0 18 8"
|
|
29
26
|
};
|
|
30
27
|
function render$9(_ctx, _cache) {
|
|
31
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$l, _cache[0] || (_cache[0] = [
|
|
28
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$l, [..._cache[0] || (_cache[0] = [
|
|
32
29
|
vue.createElementVNode("g", { fill: "currentColor" }, [
|
|
33
30
|
vue.createElementVNode("path", { d: "M0 0v8h2.867q1.257-.011 1.935-.604.68-.594.68-1.748 0-.675-.33-1.143a1.54 1.54 0 0 0-.892-.62q.497-.21.775-.654.279-.45.279-1.039 0-1.077-.694-1.632Q3.926 0 2.584 0zm1.52 6.676v-2.16h1.393q1.048.016 1.048 1.116 0 .488-.303.77-.3.273-.836.274zm1.124-3.324H1.52V1.335h1.064q.628 0 .916.242.294.236.294.78 0 .972-1.15.995M7.503 6.352h2.665L10.679 8h1.616l-2.76-8H8.125L5.38 8h1.616zm2.254-1.336H7.913l.917-2.994zM12.362 8V0h2.27q.972 0 1.737.478.77.473 1.2 1.352.432.873.431 1.989v.368q0 1.115-.425 1.983a3.17 3.17 0 0 1-1.191 1.346A3.26 3.26 0 0 1 14.646 8zm1.52-6.665v5.34h.734q.891 0 1.363-.631.47-.632.481-1.808v-.423q0-1.22-.466-1.846-.466-.632-1.363-.632z" })
|
|
34
31
|
], -1)
|
|
35
|
-
]));
|
|
32
|
+
])]);
|
|
36
33
|
}
|
|
37
34
|
const SpriteBAD = { render: render$9 };
|
|
38
35
|
const _hoisted_1$k = {
|
|
@@ -40,11 +37,11 @@ const _hoisted_1$k = {
|
|
|
40
37
|
viewBox: "0 0 16 8"
|
|
41
38
|
};
|
|
42
39
|
function render$8(_ctx, _cache) {
|
|
43
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$k, _cache[0] || (_cache[0] = [
|
|
40
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$k, [..._cache[0] || (_cache[0] = [
|
|
44
41
|
vue.createElementVNode("g", { fill: "currentColor" }, [
|
|
45
42
|
vue.createElementVNode("path", { d: "M3.373 6.016 5.058 0h1.704L4.175 8H2.577L0 0h1.7zM8.99 8H7.46V0H8.99zM11.84 8V5.181h1.343q1.322 0 2.067-.676.75-.681.75-1.857 0-.774-.342-1.379a2.3 2.3 0 0 0-.98-.94Q14.045 0 13.208 0H10.31v8zm1.368-4.154h-1.367v-2.51h1.403q.567.01.888.373t.322.95q0 .571-.322.88-.316.307-.924.307" })
|
|
46
43
|
], -1)
|
|
47
|
-
]));
|
|
44
|
+
])]);
|
|
48
45
|
}
|
|
49
46
|
const SpriteVIP = { render: render$8 };
|
|
50
47
|
const ImageWorkersKey = Symbol("$image.workers");
|
|
@@ -406,22 +403,12 @@ const _sfc_main$m = vue.defineComponent({
|
|
|
406
403
|
setup(props, { attrs, expose, slots }) {
|
|
407
404
|
const root = useElementRef();
|
|
408
405
|
expose({
|
|
409
|
-
click: () =>
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
},
|
|
413
|
-
focus: () => {
|
|
414
|
-
var _a;
|
|
415
|
-
return (_a = root.value) == null ? void 0 : _a.focus();
|
|
416
|
-
},
|
|
417
|
-
blur: () => {
|
|
418
|
-
var _a;
|
|
419
|
-
return (_a = root.value) == null ? void 0 : _a.blur();
|
|
420
|
-
}
|
|
406
|
+
click: () => root.value?.click(),
|
|
407
|
+
focus: () => root.value?.focus(),
|
|
408
|
+
blur: () => root.value?.blur()
|
|
421
409
|
});
|
|
422
410
|
return () => {
|
|
423
|
-
|
|
424
|
-
const content = normalize$1("default" in slots ? ((_a = slots.default) == null ? void 0 : _a.call(slots)) ?? [] : []);
|
|
411
|
+
const content = normalize$1("default" in slots ? slots.default?.() ?? [] : []);
|
|
425
412
|
const hasText = content.some(([, isIcon]) => !isIcon);
|
|
426
413
|
const [, hasLeadingIcon] = content[0] ?? [null, false];
|
|
427
414
|
const [, hasTrailingIcon] = content[content.length - 1] ?? [null, false];
|
|
@@ -460,14 +447,14 @@ const _hoisted_1$h = {
|
|
|
460
447
|
viewBox: "0 0 24 24"
|
|
461
448
|
};
|
|
462
449
|
function render$7(_ctx, _cache) {
|
|
463
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$h, _cache[0] || (_cache[0] = [
|
|
450
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$h, [..._cache[0] || (_cache[0] = [
|
|
464
451
|
vue.createElementVNode("path", {
|
|
465
452
|
fill: "currentColor",
|
|
466
453
|
"fill-rule": "evenodd",
|
|
467
454
|
d: "M19.793 6.965a.77.77 0 0 1-.022 1.075l-9.815 9.607a1.224 1.224 0 0 1-1.714.006l-4.01-3.878a.77.77 0 0 1-.028-1.074l.684-.736a.735.735 0 0 1 1.053-.028l3.15 3.046 8.96-8.771a.735.735 0 0 1 1.054.022z",
|
|
468
455
|
"clip-rule": "evenodd"
|
|
469
456
|
}, null, -1)
|
|
470
|
-
]));
|
|
457
|
+
])]);
|
|
471
458
|
}
|
|
472
459
|
const IconDone = { render: render$7 };
|
|
473
460
|
const expect = (value) => ({
|
|
@@ -555,18 +542,9 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
555
542
|
const props = __props;
|
|
556
543
|
const emit = __emit;
|
|
557
544
|
const checkbox = useElementRef();
|
|
558
|
-
const click = () =>
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
};
|
|
562
|
-
const focus = () => {
|
|
563
|
-
var _a;
|
|
564
|
-
return (_a = checkbox.value) == null ? void 0 : _a.focus();
|
|
565
|
-
};
|
|
566
|
-
const blur = () => {
|
|
567
|
-
var _a;
|
|
568
|
-
return (_a = checkbox.value) == null ? void 0 : _a.blur();
|
|
569
|
-
};
|
|
545
|
+
const click = () => checkbox.value?.click();
|
|
546
|
+
const focus = () => checkbox.value?.focus();
|
|
547
|
+
const blur = () => checkbox.value?.blur();
|
|
570
548
|
__expose({
|
|
571
549
|
click,
|
|
572
550
|
focus,
|
|
@@ -627,14 +605,14 @@ const _hoisted_1$f = {
|
|
|
627
605
|
viewBox: "0 0 24 24"
|
|
628
606
|
};
|
|
629
607
|
function render$6(_ctx, _cache) {
|
|
630
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$f, _cache[0] || (_cache[0] = [
|
|
608
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$f, [..._cache[0] || (_cache[0] = [
|
|
631
609
|
vue.createElementVNode("path", {
|
|
632
610
|
fill: "currentColor",
|
|
633
611
|
"fill-rule": "evenodd",
|
|
634
612
|
d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16m3.12-11.51a.5.5 0 0 1 .7 0l.5.53a.5.5 0 0 1 0 .71l-5.62 5.62a.48.48 0 0 1-.7 0l-2.35-2.37a.5.5 0 0 1 0-.71l.53-.53a.48.48 0 0 1 .7 0l1.5 1.49z",
|
|
635
613
|
"clip-rule": "evenodd"
|
|
636
614
|
}, null, -1)
|
|
637
|
-
]));
|
|
615
|
+
])]);
|
|
638
616
|
}
|
|
639
617
|
const IconCheckmarkCircleOutlined = { render: render$6 };
|
|
640
618
|
const _hoisted_1$e = {
|
|
@@ -642,12 +620,12 @@ const _hoisted_1$e = {
|
|
|
642
620
|
viewBox: "0 0 24 24"
|
|
643
621
|
};
|
|
644
622
|
function render$5(_ctx, _cache) {
|
|
645
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$e, _cache[0] || (_cache[0] = [
|
|
623
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$e, [..._cache[0] || (_cache[0] = [
|
|
646
624
|
vue.createElementVNode("path", {
|
|
647
625
|
fill: "currentColor",
|
|
648
626
|
d: "M18 16V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M4 4h12v12H4zm16 14V6a2 2 0 0 1 2 2v10a4 4 0 0 1-4 4H8a2 2 0 0 1-2-2h12a2 2 0 0 0 2-2"
|
|
649
627
|
}, null, -1)
|
|
650
|
-
]));
|
|
628
|
+
])]);
|
|
651
629
|
}
|
|
652
630
|
const IconCopy = { render: render$5 };
|
|
653
631
|
const isArray = Array.isArray;
|
|
@@ -660,15 +638,15 @@ const normalize = (triggers) => {
|
|
|
660
638
|
};
|
|
661
639
|
};
|
|
662
640
|
class Listener {
|
|
641
|
+
_target = null;
|
|
642
|
+
_triggers = {
|
|
643
|
+
show: [],
|
|
644
|
+
hide: []
|
|
645
|
+
};
|
|
646
|
+
_listeners = [];
|
|
647
|
+
_onShow;
|
|
648
|
+
_onHide;
|
|
663
649
|
constructor(onShow, onHide) {
|
|
664
|
-
__publicField(this, "_target", null);
|
|
665
|
-
__publicField(this, "_triggers", {
|
|
666
|
-
show: [],
|
|
667
|
-
hide: []
|
|
668
|
-
});
|
|
669
|
-
__publicField(this, "_listeners", []);
|
|
670
|
-
__publicField(this, "_onShow");
|
|
671
|
-
__publicField(this, "_onHide");
|
|
672
650
|
this._onShow = onShow;
|
|
673
651
|
this._onHide = onHide;
|
|
674
652
|
}
|
|
@@ -737,9 +715,7 @@ class Listener {
|
|
|
737
715
|
}
|
|
738
716
|
}
|
|
739
717
|
class Scheduler {
|
|
740
|
-
|
|
741
|
-
__publicField(this, "_timer");
|
|
742
|
-
}
|
|
718
|
+
_timer = void 0;
|
|
743
719
|
schedule(operation, delay) {
|
|
744
720
|
clearTimeout(this._timer);
|
|
745
721
|
if (delay > 0) {
|
|
@@ -804,8 +780,9 @@ function getOppositeAxis(axis) {
|
|
|
804
780
|
function getAxisLength(axis) {
|
|
805
781
|
return axis === "y" ? "height" : "width";
|
|
806
782
|
}
|
|
783
|
+
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
807
784
|
function getSideAxis(placement) {
|
|
808
|
-
return
|
|
785
|
+
return yAxisSides.has(getSide(placement)) ? "y" : "x";
|
|
809
786
|
}
|
|
810
787
|
function getAlignmentAxis(placement) {
|
|
811
788
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -830,19 +807,19 @@ function getExpandedPlacements(placement) {
|
|
|
830
807
|
function getOppositeAlignmentPlacement(placement) {
|
|
831
808
|
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
832
809
|
}
|
|
810
|
+
const lrPlacement = ["left", "right"];
|
|
811
|
+
const rlPlacement = ["right", "left"];
|
|
812
|
+
const tbPlacement = ["top", "bottom"];
|
|
813
|
+
const btPlacement = ["bottom", "top"];
|
|
833
814
|
function getSideList(side, isStart, rtl) {
|
|
834
|
-
const lr = ["left", "right"];
|
|
835
|
-
const rl = ["right", "left"];
|
|
836
|
-
const tb = ["top", "bottom"];
|
|
837
|
-
const bt = ["bottom", "top"];
|
|
838
815
|
switch (side) {
|
|
839
816
|
case "top":
|
|
840
817
|
case "bottom":
|
|
841
|
-
if (rtl) return isStart ?
|
|
842
|
-
return isStart ?
|
|
818
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
819
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
843
820
|
case "left":
|
|
844
821
|
case "right":
|
|
845
|
-
return isStart ?
|
|
822
|
+
return isStart ? tbPlacement : btPlacement;
|
|
846
823
|
default:
|
|
847
824
|
return [];
|
|
848
825
|
}
|
|
@@ -1210,15 +1187,20 @@ const flip$1 = function(options) {
|
|
|
1210
1187
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1211
1188
|
const nextPlacement = placements[nextIndex];
|
|
1212
1189
|
if (nextPlacement) {
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1190
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1191
|
+
if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
|
|
1192
|
+
// overflows the main axis.
|
|
1193
|
+
overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
1194
|
+
return {
|
|
1195
|
+
data: {
|
|
1196
|
+
index: nextIndex,
|
|
1197
|
+
overflows: overflowsData
|
|
1198
|
+
},
|
|
1199
|
+
reset: {
|
|
1200
|
+
placement: nextPlacement
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1222
1204
|
}
|
|
1223
1205
|
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
1224
1206
|
if (!resetPlacement) {
|
|
@@ -1316,6 +1298,7 @@ const hide$1 = function(options) {
|
|
|
1316
1298
|
}
|
|
1317
1299
|
};
|
|
1318
1300
|
};
|
|
1301
|
+
const originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1319
1302
|
async function convertValueToCoords(state, options) {
|
|
1320
1303
|
const {
|
|
1321
1304
|
placement,
|
|
@@ -1326,7 +1309,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1326
1309
|
const side = getSide(placement);
|
|
1327
1310
|
const alignment = getAlignment(placement);
|
|
1328
1311
|
const isVertical = getSideAxis(placement) === "y";
|
|
1329
|
-
const mainAxisMulti =
|
|
1312
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
1330
1313
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
1331
1314
|
const rawValue = evaluate(options, state);
|
|
1332
1315
|
let {
|
|
@@ -1496,31 +1479,37 @@ function isShadowRoot(value) {
|
|
|
1496
1479
|
}
|
|
1497
1480
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1498
1481
|
}
|
|
1482
|
+
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1499
1483
|
function isOverflowElement(element) {
|
|
1500
1484
|
const {
|
|
1501
1485
|
overflow,
|
|
1502
1486
|
overflowX,
|
|
1503
1487
|
overflowY,
|
|
1504
1488
|
display
|
|
1505
|
-
} = getComputedStyle(element);
|
|
1506
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
1489
|
+
} = getComputedStyle$1(element);
|
|
1490
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
1507
1491
|
}
|
|
1492
|
+
const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1508
1493
|
function isTableElement(element) {
|
|
1509
|
-
return
|
|
1494
|
+
return tableElements.has(getNodeName(element));
|
|
1510
1495
|
}
|
|
1496
|
+
const topLayerSelectors = [":popover-open", ":modal"];
|
|
1511
1497
|
function isTopLayer(element) {
|
|
1512
|
-
return
|
|
1498
|
+
return topLayerSelectors.some((selector) => {
|
|
1513
1499
|
try {
|
|
1514
1500
|
return element.matches(selector);
|
|
1515
|
-
} catch (
|
|
1501
|
+
} catch (_e) {
|
|
1516
1502
|
return false;
|
|
1517
1503
|
}
|
|
1518
1504
|
});
|
|
1519
1505
|
}
|
|
1506
|
+
const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
|
|
1507
|
+
const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
|
|
1508
|
+
const containValues = ["paint", "layout", "strict", "content"];
|
|
1520
1509
|
function isContainingBlock(elementOrCss) {
|
|
1521
1510
|
const webkit = isWebKit();
|
|
1522
|
-
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1523
|
-
return
|
|
1511
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1512
|
+
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));
|
|
1524
1513
|
}
|
|
1525
1514
|
function getContainingBlock(element) {
|
|
1526
1515
|
let currentNode = getParentNode(element);
|
|
@@ -1538,10 +1527,11 @@ function isWebKit() {
|
|
|
1538
1527
|
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
1539
1528
|
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
1540
1529
|
}
|
|
1530
|
+
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1541
1531
|
function isLastTraversableNode(node) {
|
|
1542
|
-
return
|
|
1532
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
1543
1533
|
}
|
|
1544
|
-
function getComputedStyle(element) {
|
|
1534
|
+
function getComputedStyle$1(element) {
|
|
1545
1535
|
return getWindow(element).getComputedStyle(element);
|
|
1546
1536
|
}
|
|
1547
1537
|
function getNodeScroll(element) {
|
|
@@ -1600,7 +1590,7 @@ function getFrameElement(win) {
|
|
|
1600
1590
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1601
1591
|
}
|
|
1602
1592
|
function getCssDimensions(element) {
|
|
1603
|
-
const css = getComputedStyle(element);
|
|
1593
|
+
const css = getComputedStyle$1(element);
|
|
1604
1594
|
let width = parseFloat(css.width) || 0;
|
|
1605
1595
|
let height = parseFloat(css.height) || 0;
|
|
1606
1596
|
const hasOffset = isHTMLElement(element);
|
|
@@ -1696,7 +1686,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1696
1686
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1697
1687
|
const iframeScale = getScale(currentIFrame);
|
|
1698
1688
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1699
|
-
const css = getComputedStyle(currentIFrame);
|
|
1689
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
1700
1690
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1701
1691
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1702
1692
|
x *= iframeScale.x;
|
|
@@ -1723,15 +1713,9 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1723
1713
|
}
|
|
1724
1714
|
return rect.left + leftScroll;
|
|
1725
1715
|
}
|
|
1726
|
-
function getHTMLOffset(documentElement, scroll
|
|
1727
|
-
if (ignoreScrollbarX === void 0) {
|
|
1728
|
-
ignoreScrollbarX = false;
|
|
1729
|
-
}
|
|
1716
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
1730
1717
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
1731
|
-
const x = htmlRect.left + scroll.scrollLeft - (
|
|
1732
|
-
// RTL <body> scrollbar.
|
|
1733
|
-
getWindowScrollBarX(documentElement, htmlRect)
|
|
1734
|
-
));
|
|
1718
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
1735
1719
|
const y = htmlRect.top + scroll.scrollTop;
|
|
1736
1720
|
return {
|
|
1737
1721
|
x,
|
|
@@ -1769,7 +1753,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1769
1753
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1770
1754
|
}
|
|
1771
1755
|
}
|
|
1772
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll
|
|
1756
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1773
1757
|
return {
|
|
1774
1758
|
width: rect.width * scale.x,
|
|
1775
1759
|
height: rect.height * scale.y,
|
|
@@ -1788,7 +1772,7 @@ function getDocumentRect(element) {
|
|
|
1788
1772
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1789
1773
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1790
1774
|
const y = -scroll.scrollTop;
|
|
1791
|
-
if (getComputedStyle(body).direction === "rtl") {
|
|
1775
|
+
if (getComputedStyle$1(body).direction === "rtl") {
|
|
1792
1776
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1793
1777
|
}
|
|
1794
1778
|
return {
|
|
@@ -1798,6 +1782,7 @@ function getDocumentRect(element) {
|
|
|
1798
1782
|
y
|
|
1799
1783
|
};
|
|
1800
1784
|
}
|
|
1785
|
+
const SCROLLBAR_MAX = 25;
|
|
1801
1786
|
function getViewportRect(element, strategy) {
|
|
1802
1787
|
const win = getWindow(element);
|
|
1803
1788
|
const html = getDocumentElement(element);
|
|
@@ -1815,6 +1800,19 @@ function getViewportRect(element, strategy) {
|
|
|
1815
1800
|
y = visualViewport.offsetTop;
|
|
1816
1801
|
}
|
|
1817
1802
|
}
|
|
1803
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1804
|
+
if (windowScrollbarX <= 0) {
|
|
1805
|
+
const doc = html.ownerDocument;
|
|
1806
|
+
const body = doc.body;
|
|
1807
|
+
const bodyStyles = getComputedStyle(body);
|
|
1808
|
+
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1809
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1810
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
1811
|
+
width -= clippingStableScrollbarWidth;
|
|
1812
|
+
}
|
|
1813
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1814
|
+
width += windowScrollbarX;
|
|
1815
|
+
}
|
|
1818
1816
|
return {
|
|
1819
1817
|
width,
|
|
1820
1818
|
height,
|
|
@@ -1822,6 +1820,7 @@ function getViewportRect(element, strategy) {
|
|
|
1822
1820
|
y
|
|
1823
1821
|
};
|
|
1824
1822
|
}
|
|
1823
|
+
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1825
1824
|
function getInnerBoundingClientRect(element, strategy) {
|
|
1826
1825
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
1827
1826
|
const top = clientRect.top + element.clientTop;
|
|
@@ -1862,7 +1861,7 @@ function hasFixedPositionAncestor(element, stopNode) {
|
|
|
1862
1861
|
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1863
1862
|
return false;
|
|
1864
1863
|
}
|
|
1865
|
-
return getComputedStyle(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1864
|
+
return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1866
1865
|
}
|
|
1867
1866
|
function getClippingElementAncestors(element, cache) {
|
|
1868
1867
|
const cachedResult = cache.get(element);
|
|
@@ -1871,15 +1870,15 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1871
1870
|
}
|
|
1872
1871
|
let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
1873
1872
|
let currentContainingBlockComputedStyle = null;
|
|
1874
|
-
const elementIsFixed = getComputedStyle(element).position === "fixed";
|
|
1873
|
+
const elementIsFixed = getComputedStyle$1(element).position === "fixed";
|
|
1875
1874
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1876
1875
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1877
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
1876
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
1878
1877
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1879
1878
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
1880
1879
|
currentContainingBlockComputedStyle = null;
|
|
1881
1880
|
}
|
|
1882
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
1881
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1883
1882
|
if (shouldDropCurrentNode) {
|
|
1884
1883
|
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
1885
1884
|
} else {
|
|
@@ -1935,6 +1934,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1935
1934
|
scrollTop: 0
|
|
1936
1935
|
};
|
|
1937
1936
|
const offsets = createCoords(0);
|
|
1937
|
+
function setLeftRTLScrollbarOffset() {
|
|
1938
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1939
|
+
}
|
|
1938
1940
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1939
1941
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
1940
1942
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -1944,9 +1946,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1944
1946
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1945
1947
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1946
1948
|
} else if (documentElement) {
|
|
1947
|
-
|
|
1949
|
+
setLeftRTLScrollbarOffset();
|
|
1948
1950
|
}
|
|
1949
1951
|
}
|
|
1952
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
1953
|
+
setLeftRTLScrollbarOffset();
|
|
1954
|
+
}
|
|
1950
1955
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1951
1956
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1952
1957
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -1958,10 +1963,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1958
1963
|
};
|
|
1959
1964
|
}
|
|
1960
1965
|
function isStaticPositioned(element) {
|
|
1961
|
-
return getComputedStyle(element).position === "static";
|
|
1966
|
+
return getComputedStyle$1(element).position === "static";
|
|
1962
1967
|
}
|
|
1963
1968
|
function getTrueOffsetParent(element, polyfill) {
|
|
1964
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
|
1969
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
1965
1970
|
return null;
|
|
1966
1971
|
}
|
|
1967
1972
|
if (polyfill) {
|
|
@@ -2012,7 +2017,7 @@ const getElementRects = async function(data) {
|
|
|
2012
2017
|
};
|
|
2013
2018
|
};
|
|
2014
2019
|
function isRTL(element) {
|
|
2015
|
-
return getComputedStyle(element).direction === "rtl";
|
|
2020
|
+
return getComputedStyle$1(element).direction === "rtl";
|
|
2016
2021
|
}
|
|
2017
2022
|
const platform = {
|
|
2018
2023
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
@@ -2095,7 +2100,7 @@ function observeMove(element, onMove) {
|
|
|
2095
2100
|
// Handle <iframe>s
|
|
2096
2101
|
root: root.ownerDocument
|
|
2097
2102
|
});
|
|
2098
|
-
} catch (
|
|
2103
|
+
} catch (_e) {
|
|
2099
2104
|
io = new IntersectionObserver(handleObserve, options);
|
|
2100
2105
|
}
|
|
2101
2106
|
io.observe(element);
|
|
@@ -2208,7 +2213,6 @@ const moveArrow = (el, placement, strategy, coords) => {
|
|
|
2208
2213
|
});
|
|
2209
2214
|
};
|
|
2210
2215
|
const move = async (el, arrow$12, target, options) => {
|
|
2211
|
-
var _a;
|
|
2212
2216
|
const adaptation = typeof options.placement === "object" ? options.placement.adaptation ?? ["flip", "shift"] : ["flip", "shift"];
|
|
2213
2217
|
const middleware = [];
|
|
2214
2218
|
if (options.offsetMainAxis || options.offsetCrossAxis) {
|
|
@@ -2250,7 +2254,7 @@ const move = async (el, arrow$12, target, options) => {
|
|
|
2250
2254
|
if (middlewareData.hide) {
|
|
2251
2255
|
const { referenceHidden } = middlewareData.hide;
|
|
2252
2256
|
if (referenceHidden) {
|
|
2253
|
-
|
|
2257
|
+
options.onReferenceHidden?.();
|
|
2254
2258
|
}
|
|
2255
2259
|
}
|
|
2256
2260
|
};
|
|
@@ -2511,10 +2515,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
2511
2515
|
detach();
|
|
2512
2516
|
emit("dispose");
|
|
2513
2517
|
};
|
|
2514
|
-
const contains = (el) =>
|
|
2515
|
-
var _a;
|
|
2516
|
-
return ((_a = popper.value) == null ? void 0 : _a.contains(el)) ?? false;
|
|
2517
|
-
};
|
|
2518
|
+
const contains = (el) => popper.value?.contains(el) ?? false;
|
|
2518
2519
|
const onGlobalTap = async (event, touch = false) => {
|
|
2519
2520
|
const captures = state.clicked || contains(event.target);
|
|
2520
2521
|
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
@@ -2749,22 +2750,10 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
2749
2750
|
setup(__props, { expose: __expose }) {
|
|
2750
2751
|
const popper = vue.ref(null);
|
|
2751
2752
|
__expose({
|
|
2752
|
-
adjust: () =>
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
dispose: () => {
|
|
2757
|
-
var _a;
|
|
2758
|
-
return (_a = popper.value) == null ? void 0 : _a.dispose();
|
|
2759
|
-
},
|
|
2760
|
-
show: () => {
|
|
2761
|
-
var _a;
|
|
2762
|
-
return (_a = popper.value) == null ? void 0 : _a.show();
|
|
2763
|
-
},
|
|
2764
|
-
hide: () => {
|
|
2765
|
-
var _a;
|
|
2766
|
-
return (_a = popper.value) == null ? void 0 : _a.hide();
|
|
2767
|
-
}
|
|
2753
|
+
adjust: () => popper.value?.adjust(),
|
|
2754
|
+
dispose: () => popper.value?.dispose(),
|
|
2755
|
+
show: () => popper.value?.show(),
|
|
2756
|
+
hide: () => popper.value?.hide()
|
|
2768
2757
|
});
|
|
2769
2758
|
return (_ctx, _cache) => {
|
|
2770
2759
|
return vue.openBlock(), vue.createBlock(_sfc_main$k, vue.mergeProps({
|
|
@@ -2839,14 +2828,13 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
2839
2828
|
clipboardAvailable.value = navigator.clipboard && "writeText" in navigator.clipboard;
|
|
2840
2829
|
});
|
|
2841
2830
|
const copy = async () => {
|
|
2842
|
-
var _a, _b;
|
|
2843
2831
|
try {
|
|
2844
2832
|
if (clipboardAvailable.value) {
|
|
2845
2833
|
await navigator.clipboard.writeText(props.text);
|
|
2846
2834
|
copied.value = true;
|
|
2847
2835
|
} else {
|
|
2848
|
-
|
|
2849
|
-
|
|
2836
|
+
input.value?.focus();
|
|
2837
|
+
input.value?.select();
|
|
2850
2838
|
copied.value = document.execCommand("copy");
|
|
2851
2839
|
}
|
|
2852
2840
|
} catch (e) {
|
|
@@ -2932,15 +2920,15 @@ function buildFormatLongFn(args) {
|
|
|
2932
2920
|
}
|
|
2933
2921
|
function buildLocalizeFn(args) {
|
|
2934
2922
|
return (value, options) => {
|
|
2935
|
-
const context =
|
|
2923
|
+
const context = options?.context ? String(options.context) : "standalone";
|
|
2936
2924
|
let valuesArray;
|
|
2937
2925
|
if (context === "formatting" && args.formattingValues) {
|
|
2938
2926
|
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
2939
|
-
const width =
|
|
2927
|
+
const width = options?.width ? String(options.width) : defaultWidth;
|
|
2940
2928
|
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
2941
2929
|
} else {
|
|
2942
2930
|
const defaultWidth = args.defaultWidth;
|
|
2943
|
-
const width =
|
|
2931
|
+
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
2944
2932
|
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
2945
2933
|
}
|
|
2946
2934
|
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
@@ -3023,10 +3011,9 @@ function toDate(argument, context) {
|
|
|
3023
3011
|
return constructFrom(context || argument, argument);
|
|
3024
3012
|
}
|
|
3025
3013
|
function startOfWeek(date, options) {
|
|
3026
|
-
var _a, _b, _c, _d;
|
|
3027
3014
|
const defaultOptions2 = getDefaultOptions();
|
|
3028
|
-
const weekStartsOn =
|
|
3029
|
-
const _date = toDate(date, options
|
|
3015
|
+
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
3016
|
+
const _date = toDate(date, options?.in);
|
|
3030
3017
|
const day = _date.getDay();
|
|
3031
3018
|
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
3032
3019
|
_date.setDate(_date.getDate() - diff);
|
|
@@ -3035,7 +3022,7 @@ function startOfWeek(date, options) {
|
|
|
3035
3022
|
}
|
|
3036
3023
|
function isSameWeek(laterDate, earlierDate, options) {
|
|
3037
3024
|
const [laterDate_, earlierDate_] = normalizeDates(
|
|
3038
|
-
options
|
|
3025
|
+
options?.in,
|
|
3039
3026
|
laterDate,
|
|
3040
3027
|
earlierDate
|
|
3041
3028
|
);
|
|
@@ -3114,7 +3101,7 @@ const formatDistance$2 = (token, count, options) => {
|
|
|
3114
3101
|
} else {
|
|
3115
3102
|
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
3116
3103
|
}
|
|
3117
|
-
if (options
|
|
3104
|
+
if (options?.addSuffix) {
|
|
3118
3105
|
if (options.comparison && options.comparison > 0) {
|
|
3119
3106
|
return "in " + result;
|
|
3120
3107
|
} else {
|
|
@@ -3526,7 +3513,7 @@ const formatDistance$1 = (token, count, options) => {
|
|
|
3526
3513
|
} else {
|
|
3527
3514
|
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
3528
3515
|
}
|
|
3529
|
-
if (options
|
|
3516
|
+
if (options?.addSuffix) {
|
|
3530
3517
|
if (options.comparison && options.comparison > 0) {
|
|
3531
3518
|
return "en " + result;
|
|
3532
3519
|
} else {
|
|
@@ -3890,7 +3877,7 @@ function declension(scheme, count) {
|
|
|
3890
3877
|
}
|
|
3891
3878
|
function buildLocalizeTokenFn(scheme) {
|
|
3892
3879
|
return (count, options) => {
|
|
3893
|
-
if (options
|
|
3880
|
+
if (options?.addSuffix) {
|
|
3894
3881
|
if (options.comparison && options.comparison > 0) {
|
|
3895
3882
|
if (scheme.future) {
|
|
3896
3883
|
return declension(scheme.future, count);
|
|
@@ -3942,7 +3929,7 @@ const formatDistanceLocale = {
|
|
|
3942
3929
|
}
|
|
3943
3930
|
}),
|
|
3944
3931
|
halfAMinute: (_count, options) => {
|
|
3945
|
-
if (options
|
|
3932
|
+
if (options?.addSuffix) {
|
|
3946
3933
|
if (options.comparison && options.comparison > 0) {
|
|
3947
3934
|
return "через полминуты";
|
|
3948
3935
|
} else {
|
|
@@ -4350,7 +4337,7 @@ const formattingDayPeriodValues = {
|
|
|
4350
4337
|
};
|
|
4351
4338
|
const ordinalNumber = (dirtyNumber, options) => {
|
|
4352
4339
|
const number = Number(dirtyNumber);
|
|
4353
|
-
const unit = options
|
|
4340
|
+
const unit = options?.unit;
|
|
4354
4341
|
let suffix;
|
|
4355
4342
|
if (unit === "date") {
|
|
4356
4343
|
suffix = "-е";
|
|
@@ -4540,9 +4527,8 @@ const formatDateTime = (date, locale = void 0) => dateFns.format(date, "Pp", {
|
|
|
4540
4527
|
}[locale ?? detectLocale()] ?? enGB
|
|
4541
4528
|
});
|
|
4542
4529
|
function detectLocale() {
|
|
4543
|
-
var _a, _b, _c, _d;
|
|
4544
4530
|
const instance = vue.getCurrentInstance();
|
|
4545
|
-
const i18n =
|
|
4531
|
+
const i18n = instance?.appContext?.app?.config?.globalProperties?.$i18n;
|
|
4546
4532
|
if (i18n) {
|
|
4547
4533
|
try {
|
|
4548
4534
|
const locale = (typeof i18n.locale === "object" ? i18n.locale.value : i18n.locale) ?? "en-GB";
|
|
@@ -4631,12 +4617,12 @@ const _hoisted_1$b = {
|
|
|
4631
4617
|
viewBox: "0 0 24 24"
|
|
4632
4618
|
};
|
|
4633
4619
|
function render$4(_ctx, _cache) {
|
|
4634
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$b, _cache[0] || (_cache[0] = [
|
|
4620
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$b, [..._cache[0] || (_cache[0] = [
|
|
4635
4621
|
vue.createElementVNode("path", {
|
|
4636
4622
|
fill: "currentColor",
|
|
4637
4623
|
d: "m6.844 17.854-.7-.703a.5.5 0 0 1 0-.704l8.48-8.456-6.212.007a.49.49 0 0 1-.496-.5l.007-.991a.5.5 0 0 1 .496-.5L16.994 6c.196 0 .385.078.524.218l.265.267c.137.142.215.33.217.528l-.007 8.633a.5.5 0 0 1-.496.5h-.992a.48.48 0 0 1-.49-.493l.007-6.255-8.48 8.456a.49.49 0 0 1-.698 0"
|
|
4638
4624
|
}, null, -1)
|
|
4639
|
-
]));
|
|
4625
|
+
])]);
|
|
4640
4626
|
}
|
|
4641
4627
|
const IconOpenInNew = { render: render$4 };
|
|
4642
4628
|
var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
@@ -4871,16 +4857,12 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
4871
4857
|
const root = vue.ref(null);
|
|
4872
4858
|
const scrollable = vue.ref(null);
|
|
4873
4859
|
const scroll = (y) => {
|
|
4874
|
-
|
|
4875
|
-
const el = root.value ?? ((_a = scrollable.value) == null ? void 0 : _a.$el);
|
|
4860
|
+
const el = root.value ?? scrollable.value?.$el;
|
|
4876
4861
|
if (el) {
|
|
4877
4862
|
el.scrollTop = y;
|
|
4878
4863
|
}
|
|
4879
4864
|
};
|
|
4880
|
-
const update = () =>
|
|
4881
|
-
var _a;
|
|
4882
|
-
return (_a = scrollable.value) == null ? void 0 : _a.$forceUpdate();
|
|
4883
|
-
};
|
|
4865
|
+
const update = () => scrollable.value?.$forceUpdate();
|
|
4884
4866
|
__expose({
|
|
4885
4867
|
scroll,
|
|
4886
4868
|
update
|
|
@@ -4902,7 +4884,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
4902
4884
|
"opacity",
|
|
4903
4885
|
"transform",
|
|
4904
4886
|
"visibility"
|
|
4905
|
-
], e
|
|
4887
|
+
], e?.propertyName)) {
|
|
4906
4888
|
update();
|
|
4907
4889
|
}
|
|
4908
4890
|
};
|
|
@@ -4943,12 +4925,12 @@ const _hoisted_1$9 = {
|
|
|
4943
4925
|
viewBox: "0 0 24 24"
|
|
4944
4926
|
};
|
|
4945
4927
|
function render$3(_ctx, _cache) {
|
|
4946
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$9, _cache[0] || (_cache[0] = [
|
|
4928
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
|
|
4947
4929
|
vue.createElementVNode("path", {
|
|
4948
4930
|
fill: "currentColor",
|
|
4949
4931
|
d: "M7.113 6.176a.6.6 0 0 1 .848 0L12 10.214l4.038-4.038a.6.6 0 0 1 .849 0l.937.937a.6.6 0 0 1 0 .848L13.785 12l4.04 4.04a.6.6 0 0 1 0 .848l-.937.937a.6.6 0 0 1-.849 0L12 13.784l-4.038 4.04a.6.6 0 0 1-.849 0l-.937-.937a.6.6 0 0 1 0-.848l4.04-4.04-4.039-4.038a.6.6 0 0 1 0-.849z"
|
|
4950
4932
|
}, null, -1)
|
|
4951
|
-
]));
|
|
4933
|
+
])]);
|
|
4952
4934
|
}
|
|
4953
4935
|
const IconClear = { render: render$3 };
|
|
4954
4936
|
const ModalInjectKey = Symbol("$embedModal");
|
|
@@ -4962,9 +4944,9 @@ const plugin$1 = {
|
|
|
4962
4944
|
};
|
|
4963
4945
|
const nextAnimationFrame = async () => new Promise((resolve) => requestAnimationFrame(resolve));
|
|
4964
4946
|
class LayerRegistry {
|
|
4947
|
+
registry;
|
|
4948
|
+
started = false;
|
|
4965
4949
|
constructor() {
|
|
4966
|
-
__publicField(this, "registry");
|
|
4967
|
-
__publicField(this, "started", false);
|
|
4968
4950
|
this.registry = [];
|
|
4969
4951
|
}
|
|
4970
4952
|
start() {
|
|
@@ -5279,10 +5261,9 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
5279
5261
|
}
|
|
5280
5262
|
};
|
|
5281
5263
|
return (_ctx, _cache) => {
|
|
5282
|
-
var _a;
|
|
5283
5264
|
return state.attached ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
5284
5265
|
key: 0,
|
|
5285
|
-
to:
|
|
5266
|
+
to: vue.unref(globals)?.container || "body"
|
|
5286
5267
|
}, [
|
|
5287
5268
|
vue.createVNode(_sfc_main$e, {
|
|
5288
5269
|
name: "fade-2",
|
|
@@ -5346,9 +5327,9 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
5346
5327
|
target: closerTarget.value,
|
|
5347
5328
|
"offset-main-axis": 0
|
|
5348
5329
|
}, {
|
|
5349
|
-
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
5350
|
-
vue.createTextVNode(" Esc ")
|
|
5351
|
-
])),
|
|
5330
|
+
default: vue.withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
5331
|
+
vue.createTextVNode(" Esc ", -1)
|
|
5332
|
+
])]),
|
|
5352
5333
|
_: 1
|
|
5353
5334
|
}, 8, ["target"])
|
|
5354
5335
|
], 512)
|
|
@@ -5570,8 +5551,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
5570
5551
|
scheduleDetach();
|
|
5571
5552
|
};
|
|
5572
5553
|
const close = (event = void 0) => {
|
|
5573
|
-
const target = event
|
|
5574
|
-
if (target
|
|
5554
|
+
const target = event?.target;
|
|
5555
|
+
if (target?.closest(".ps__thumb-y")) {
|
|
5575
5556
|
return;
|
|
5576
5557
|
}
|
|
5577
5558
|
if (props.closable) {
|
|
@@ -5640,7 +5621,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
5640
5621
|
}
|
|
5641
5622
|
};
|
|
5642
5623
|
const EmbedModalWindowSurface = () => !state.attached ? void 0 : vue.h(vue.Teleport, {
|
|
5643
|
-
to:
|
|
5624
|
+
to: globals?.container ?? document.body
|
|
5644
5625
|
}, vue.h(_sfc_main$e, {
|
|
5645
5626
|
name: "fade-2",
|
|
5646
5627
|
onBeforeEnter: () => visibilityOfOverlay.value = "showing",
|
|
@@ -5669,9 +5650,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
5669
5650
|
onClick: onOverlayClick,
|
|
5670
5651
|
onPsYReachEnd: (event) => emit("scroll:y:end", event),
|
|
5671
5652
|
onScroll: (event) => {
|
|
5672
|
-
var _a, _b;
|
|
5673
5653
|
if (!state.overlapped) {
|
|
5674
|
-
emit("scroll:y", event,
|
|
5654
|
+
emit("scroll:y", event, body.value?.getBoundingClientRect()?.toJSON() ?? null);
|
|
5675
5655
|
}
|
|
5676
5656
|
}
|
|
5677
5657
|
}, {
|
|
@@ -5688,14 +5668,14 @@ const _hoisted_1$7 = {
|
|
|
5688
5668
|
viewBox: "0 0 24 24"
|
|
5689
5669
|
};
|
|
5690
5670
|
function render$2(_ctx, _cache) {
|
|
5691
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
|
|
5671
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
|
|
5692
5672
|
vue.createElementVNode("path", {
|
|
5693
5673
|
fill: "currentColor",
|
|
5694
5674
|
"fill-rule": "evenodd",
|
|
5695
5675
|
d: "M22.905 19.63 12.813 2.37a.76.76 0 0 0-.65-.37h-.3a.76.76 0 0 0-.65.37L1.1 19.63a.79.79 0 0 0 0 .76l.14.23a.73.73 0 0 0 .65.38h20.225a.73.73 0 0 0 .65-.38l.14-.23a.79.79 0 0 0 0-.76m-9.902-3.13a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5zm-.47-3.5a.25.25 0 0 0 .25-.22l.4-3.22a.5.5 0 0 0-.5-.56h-1.36a.5.5 0 0 0-.5.56l.4 3.22a.25.25 0 0 0 .25.22z",
|
|
5696
5676
|
"clip-rule": "evenodd"
|
|
5697
5677
|
}, null, -1)
|
|
5698
|
-
]));
|
|
5678
|
+
])]);
|
|
5699
5679
|
}
|
|
5700
5680
|
const IconWarning = { render: render$2 };
|
|
5701
5681
|
const _hoisted_1$6 = {
|
|
@@ -5996,18 +5976,9 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5996
5976
|
const props = __props;
|
|
5997
5977
|
const emit = __emit;
|
|
5998
5978
|
const radio = useElementRef();
|
|
5999
|
-
const click = () =>
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
};
|
|
6003
|
-
const focus = () => {
|
|
6004
|
-
var _a;
|
|
6005
|
-
return (_a = radio.value) == null ? void 0 : _a.focus();
|
|
6006
|
-
};
|
|
6007
|
-
const blur = () => {
|
|
6008
|
-
var _a;
|
|
6009
|
-
return (_a = radio.value) == null ? void 0 : _a.blur();
|
|
6010
|
-
};
|
|
5979
|
+
const click = () => radio.value?.click();
|
|
5980
|
+
const focus = () => radio.value?.focus();
|
|
5981
|
+
const blur = () => radio.value?.blur();
|
|
6011
5982
|
__expose({
|
|
6012
5983
|
click,
|
|
6013
5984
|
focus,
|
|
@@ -6049,17 +6020,17 @@ const _hoisted_1$4 = {
|
|
|
6049
6020
|
viewBox: "0 0 24 24"
|
|
6050
6021
|
};
|
|
6051
6022
|
function render$1(_ctx, _cache) {
|
|
6052
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [
|
|
6023
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
|
|
6053
6024
|
vue.createElementVNode("path", {
|
|
6054
6025
|
fill: "currentColor",
|
|
6055
6026
|
d: "m14.675 4.6.544-1.257a.99.99 0 0 0-.04-.911.82.82 0 0 0-.739-.421L9.5 2a.81.81 0 0 0-.704.423.99.99 0 0 0-.047.88l.55 1.26c.155.358.201.762.13 1.15l-.623 3.441a2.8 2.8 0 0 1-.685 1.426l-.875.96a.96.96 0 0 0-.246.646l.025.555c.002.502.373.91.83.912l8.312.025c.458 0 .828-.407.828-.909l.005-.536a.96.96 0 0 0-.248-.646l-.878-.964a2.85 2.85 0 0 1-.691-1.43l-.636-3.443a2 2 0 0 1 .128-1.15M10.967 20.047a3 3 0 0 1-.196-1.079l-.007-3.771 2.424.057.007 3.758a3 3 0 0 1-.193 1.079l-.638 1.632a.415.415 0 0 1-.382.277.42.42 0 0 1-.383-.279z"
|
|
6056
6027
|
}, null, -1)
|
|
6057
|
-
]));
|
|
6028
|
+
])]);
|
|
6058
6029
|
}
|
|
6059
6030
|
const IconPinned = { render: render$1 };
|
|
6060
6031
|
class VueI18n {
|
|
6032
|
+
_state;
|
|
6061
6033
|
constructor(locale = void 0) {
|
|
6062
|
-
__publicField(this, "_state");
|
|
6063
6034
|
this._state = vue.reactive({ locale });
|
|
6064
6035
|
}
|
|
6065
6036
|
get locale() {
|
|
@@ -6072,7 +6043,7 @@ class VueI18n {
|
|
|
6072
6043
|
const I18nInjectKey = Symbol("$embedI18n");
|
|
6073
6044
|
const plugin = {
|
|
6074
6045
|
install(app, options) {
|
|
6075
|
-
app.provide(I18nInjectKey, options instanceof VueI18n ? options : new VueI18n(options
|
|
6046
|
+
app.provide(I18nInjectKey, options instanceof VueI18n ? options : new VueI18n(options?.locale));
|
|
6076
6047
|
}
|
|
6077
6048
|
};
|
|
6078
6049
|
var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
|
|
@@ -6143,22 +6114,22 @@ const plural = (template, choice, rule) => {
|
|
|
6143
6114
|
return forms[rule(choice, forms.length)];
|
|
6144
6115
|
};
|
|
6145
6116
|
class I18n {
|
|
6117
|
+
parent;
|
|
6118
|
+
messages;
|
|
6119
|
+
computed;
|
|
6120
|
+
pluralization;
|
|
6121
|
+
fallback;
|
|
6146
6122
|
constructor(options = void 0, parent = void 0) {
|
|
6147
|
-
__publicField(this, "parent");
|
|
6148
|
-
__publicField(this, "messages");
|
|
6149
|
-
__publicField(this, "computed");
|
|
6150
|
-
__publicField(this, "pluralization");
|
|
6151
|
-
__publicField(this, "fallback");
|
|
6152
6123
|
this.parent = parent;
|
|
6153
|
-
this.messages =
|
|
6154
|
-
this.computed =
|
|
6124
|
+
this.messages = options?.messages ?? {};
|
|
6125
|
+
this.computed = options?.computed ?? {};
|
|
6155
6126
|
this.pluralization = {
|
|
6156
6127
|
"en-GB": pluralization_en_GB,
|
|
6157
6128
|
"es-ES": pluralization_es_ES,
|
|
6158
6129
|
"ru-RU": pluralization_ru_RU,
|
|
6159
|
-
...
|
|
6130
|
+
...options?.pluralization ?? {}
|
|
6160
6131
|
};
|
|
6161
|
-
this.fallback = options
|
|
6132
|
+
this.fallback = options?.fallback;
|
|
6162
6133
|
}
|
|
6163
6134
|
t(locale, path, values = void 0) {
|
|
6164
6135
|
try {
|
|
@@ -6291,10 +6262,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6291
6262
|
emits: ["remove"],
|
|
6292
6263
|
setup(__props) {
|
|
6293
6264
|
const props = __props;
|
|
6294
|
-
const i18n = vue.computed(() =>
|
|
6295
|
-
var _a;
|
|
6296
|
-
return _i18n$1.init(((_a = vue.inject(I18nInjectKey, null)) == null ? void 0 : _a.locale) ?? _i18n$1.fallback);
|
|
6297
|
-
});
|
|
6265
|
+
const i18n = vue.computed(() => _i18n$1.init(vue.inject(I18nInjectKey, null)?.locale ?? _i18n$1.fallback));
|
|
6298
6266
|
const textRef = vue.ref(null);
|
|
6299
6267
|
const textStyle = vue.ref({});
|
|
6300
6268
|
const onHover = () => {
|
|
@@ -6349,14 +6317,14 @@ const _hoisted_1$2 = {
|
|
|
6349
6317
|
viewBox: "0 0 24 24"
|
|
6350
6318
|
};
|
|
6351
6319
|
function render(_ctx, _cache) {
|
|
6352
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
|
|
6320
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
|
|
6353
6321
|
vue.createElementVNode("path", {
|
|
6354
6322
|
fill: "currentColor",
|
|
6355
6323
|
"fill-rule": "evenodd",
|
|
6356
6324
|
d: "M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0m11 2.045c0-.122-.05-.24-.14-.324L13.148 12l1.712-1.721a.445.445 0 0 0 0-.648l-.49-.49a.444.444 0 0 0-.649 0L12 10.851 10.279 9.14a.444.444 0 0 0-.648 0l-.49.49a.444.444 0 0 0 0 .649L10.851 12 9.14 13.721a.444.444 0 0 0 0 .648l.49.49a.444.444 0 0 0 .649 0L12 13.149l1.721 1.712a.444.444 0 0 0 .648 0l.49-.49a.45.45 0 0 0 .141-.325",
|
|
6357
6325
|
"clip-rule": "evenodd"
|
|
6358
6326
|
}, null, -1)
|
|
6359
|
-
]));
|
|
6327
|
+
])]);
|
|
6360
6328
|
}
|
|
6361
6329
|
const IconClearCircle = { render };
|
|
6362
6330
|
var TYPE = /* @__PURE__ */ ((TYPE2) => {
|
|
@@ -6623,10 +6591,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6623
6591
|
const props = __props;
|
|
6624
6592
|
const emit = __emit;
|
|
6625
6593
|
const uid2 = vue.useId();
|
|
6626
|
-
const i18n = vue.computed(() =>
|
|
6627
|
-
var _a;
|
|
6628
|
-
return _i18n.init(((_a = vue.inject(I18nInjectKey, null)) == null ? void 0 : _a.locale) ?? _i18n.fallback);
|
|
6629
|
-
});
|
|
6594
|
+
const i18n = vue.computed(() => _i18n.init(vue.inject(I18nInjectKey, null)?.locale ?? _i18n.fallback));
|
|
6630
6595
|
const decimalsParsed = vue.computed(() => {
|
|
6631
6596
|
if (props.decimals === "*" || props.decimals === void 0) return "*";
|
|
6632
6597
|
const n = Number(props.decimals);
|
|
@@ -6702,9 +6667,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6702
6667
|
emit("input", event);
|
|
6703
6668
|
};
|
|
6704
6669
|
const onPaste = async (event) => {
|
|
6705
|
-
var _a;
|
|
6706
6670
|
event.preventDefault();
|
|
6707
|
-
const text2 =
|
|
6671
|
+
const text2 = event.clipboardData?.getData("text") ?? "";
|
|
6708
6672
|
if (!text2) return;
|
|
6709
6673
|
await insert(text2);
|
|
6710
6674
|
emit("paste", event);
|
|
@@ -6742,26 +6706,11 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6742
6706
|
};
|
|
6743
6707
|
const root = useElementRef();
|
|
6744
6708
|
const textbox = vue.shallowRef(null);
|
|
6745
|
-
const getSelectionStart = () =>
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
const
|
|
6750
|
-
var _a;
|
|
6751
|
-
return ((_a = textbox.value) == null ? void 0 : _a.selectionEnd) ?? 0;
|
|
6752
|
-
};
|
|
6753
|
-
const setSelectionRange = (start, end) => {
|
|
6754
|
-
var _a;
|
|
6755
|
-
return (_a = textbox.value) == null ? void 0 : _a.setSelectionRange(start, end);
|
|
6756
|
-
};
|
|
6757
|
-
const select = () => {
|
|
6758
|
-
var _a;
|
|
6759
|
-
return (_a = textbox.value) == null ? void 0 : _a.select();
|
|
6760
|
-
};
|
|
6761
|
-
const focus = () => {
|
|
6762
|
-
var _a;
|
|
6763
|
-
return (_a = textbox.value) == null ? void 0 : _a.focus();
|
|
6764
|
-
};
|
|
6709
|
+
const getSelectionStart = () => textbox.value?.selectionStart ?? 0;
|
|
6710
|
+
const getSelectionEnd = () => textbox.value?.selectionEnd ?? 0;
|
|
6711
|
+
const setSelectionRange = (start, end) => textbox.value?.setSelectionRange(start, end);
|
|
6712
|
+
const select = () => textbox.value?.select();
|
|
6713
|
+
const focus = () => textbox.value?.focus();
|
|
6765
6714
|
const onFocus = async (event) => {
|
|
6766
6715
|
emit("focus", event);
|
|
6767
6716
|
emit("update:focused", true);
|
|
@@ -6796,10 +6745,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6796
6745
|
/** Установка фокуса на поле ввода */
|
|
6797
6746
|
focus,
|
|
6798
6747
|
/** Сброс фокуса с поля ввода */
|
|
6799
|
-
blur: () =>
|
|
6800
|
-
var _a;
|
|
6801
|
-
return (_a = textbox.value) == null ? void 0 : _a.blur();
|
|
6802
|
-
},
|
|
6748
|
+
blur: () => textbox.value?.blur(),
|
|
6803
6749
|
/** Выбор значения внутри поля ввода */
|
|
6804
6750
|
select,
|
|
6805
6751
|
/** Вставка значения */
|
|
@@ -6985,18 +6931,9 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6985
6931
|
setup(__props, { expose: __expose }) {
|
|
6986
6932
|
const root = vue.ref(null);
|
|
6987
6933
|
__expose({
|
|
6988
|
-
click: () =>
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
},
|
|
6992
|
-
focus: () => {
|
|
6993
|
-
var _a;
|
|
6994
|
-
return (_a = root.value) == null ? void 0 : _a.focus();
|
|
6995
|
-
},
|
|
6996
|
-
blur: () => {
|
|
6997
|
-
var _a;
|
|
6998
|
-
return (_a = root.value) == null ? void 0 : _a.blur();
|
|
6999
|
-
}
|
|
6934
|
+
click: () => root.value?.click(),
|
|
6935
|
+
focus: () => root.value?.focus(),
|
|
6936
|
+
blur: () => root.value?.blur()
|
|
7000
6937
|
});
|
|
7001
6938
|
const toolbarSize = useToolbarSize();
|
|
7002
6939
|
const size = vue.computed(() => {
|
|
@@ -7145,14 +7082,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7145
7082
|
const emit = __emit;
|
|
7146
7083
|
const i18nBus = vue.inject(I18nInjectKey, null);
|
|
7147
7084
|
const iframe = vue.ref(null);
|
|
7148
|
-
const getIFrameDocument = () =>
|
|
7149
|
-
|
|
7150
|
-
return ((_a = iframe.value) == null ? void 0 : _a.contentDocument) ?? null;
|
|
7151
|
-
};
|
|
7152
|
-
const getIFrameWindow = () => {
|
|
7153
|
-
var _a;
|
|
7154
|
-
return ((_a = iframe.value) == null ? void 0 : _a.contentWindow) ?? null;
|
|
7155
|
-
};
|
|
7085
|
+
const getIFrameDocument = () => iframe.value?.contentDocument ?? null;
|
|
7086
|
+
const getIFrameWindow = () => iframe.value?.contentWindow ?? null;
|
|
7156
7087
|
const getIFrameYMaps = () => {
|
|
7157
7088
|
const iframeWindow = getIFrameWindow();
|
|
7158
7089
|
if (iframeWindow && "ymaps3" in iframeWindow) {
|
|
@@ -7165,8 +7096,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7165
7096
|
zoom: 10
|
|
7166
7097
|
};
|
|
7167
7098
|
const waitIFrameContentLoaded = (retry = 5) => {
|
|
7168
|
-
|
|
7169
|
-
if ((_a = iframe.value) == null ? void 0 : _a.contentDocument) {
|
|
7099
|
+
if (iframe.value?.contentDocument) {
|
|
7170
7100
|
return Promise.resolve();
|
|
7171
7101
|
}
|
|
7172
7102
|
if (retry <= 1) {
|
|
@@ -7182,7 +7112,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7182
7112
|
"en-GB": "en_US",
|
|
7183
7113
|
"es-ES": "en_US",
|
|
7184
7114
|
"ru-RU": "ru_RU"
|
|
7185
|
-
})[
|
|
7115
|
+
})[i18nBus?.locale ?? "en-GB"]);
|
|
7186
7116
|
const apiUrl = vue.computed(() => `https://api-maps.yandex.ru/v3/?apikey=${props.apiKey}&lang=${apiLocale.value}`);
|
|
7187
7117
|
const apiUrlVersion = vue.ref(0);
|
|
7188
7118
|
const getGeocodeApiUrl = (geocode) => `https://geocode-maps.yandex.ru/1.x/?apikey=${props.apiKey}&geocode=${geocode}&lang=${apiLocale.value}&format=json`;
|
|
@@ -7193,19 +7123,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7193
7123
|
});
|
|
7194
7124
|
}
|
|
7195
7125
|
const fetchAddressFromCoordinates = async (coordinates) => {
|
|
7196
|
-
var _a, _b, _c, _d, _e;
|
|
7197
7126
|
const response = await fetch(getGeocodeApiUrl(coordinates.toString()));
|
|
7198
7127
|
const result = await response.json();
|
|
7199
|
-
return
|
|
7128
|
+
return result.response.GeoObjectCollection.featureMember[0]?.GeoObject?.metaDataProperty?.GeocoderMetaData?.Address?.formatted ?? "";
|
|
7200
7129
|
};
|
|
7201
7130
|
const fetchCoordinatesFromAddress = async (address) => {
|
|
7202
|
-
var _a, _b;
|
|
7203
7131
|
const response = await fetch(getGeocodeApiUrl(address));
|
|
7204
7132
|
const result = await response.json();
|
|
7205
|
-
return
|
|
7133
|
+
return result.response.GeoObjectCollection.featureMember[0]?.GeoObject?.Point.pos ?? "";
|
|
7206
7134
|
};
|
|
7207
7135
|
const loadApi = async () => {
|
|
7208
|
-
var _a;
|
|
7209
7136
|
await waitIFrameContentLoaded();
|
|
7210
7137
|
const iframeDocument = getIFrameDocument();
|
|
7211
7138
|
if (iframeDocument) {
|
|
@@ -7213,7 +7140,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7213
7140
|
style.innerHTML = "body { margin: 0; }";
|
|
7214
7141
|
iframeDocument.head.appendChild(style);
|
|
7215
7142
|
await load(iframeDocument, apiUrl.value);
|
|
7216
|
-
await
|
|
7143
|
+
await getIFrameYMaps()?.ready;
|
|
7217
7144
|
const el = iframeDocument.createElement("div");
|
|
7218
7145
|
el.setAttribute("id", "map");
|
|
7219
7146
|
iframeDocument.body.appendChild(el);
|