@topvisor/ui 1.0.42-date.2 → 1.0.42-popupPosition.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.
Files changed (105) hide show
  1. package/.chunks/{core-CTWfwyjq.es.js → core-BGKb9a73.es.js} +4 -4
  2. package/.chunks/{core-CTWfwyjq.es.js.map → core-BGKb9a73.es.js.map} +1 -1
  3. package/.chunks/{core-BDx1sI2y.amd.js → core-D-etXW3Y.amd.js} +2 -2
  4. package/.chunks/{core-BDx1sI2y.amd.js.map → core-D-etXW3Y.amd.js.map} +1 -1
  5. package/.chunks/{datepicker-Esxy0UQA.amd.js → datepicker-BWaVsTd0.amd.js} +2 -2
  6. package/.chunks/{datepicker-Esxy0UQA.amd.js.map → datepicker-BWaVsTd0.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-iaUT_eSc.es.js → datepicker-DCDYQmsc.es.js} +2 -2
  8. package/.chunks/{datepicker-iaUT_eSc.es.js.map → datepicker-DCDYQmsc.es.js.map} +1 -1
  9. package/.chunks/{dialog_selectorRegions-B-4xalwM.es.js → dialog_selectorRegions-BAK6xG6N.es.js} +4 -4
  10. package/.chunks/{dialog_selectorRegions-B-4xalwM.es.js.map → dialog_selectorRegions-BAK6xG6N.es.js.map} +1 -1
  11. package/.chunks/{dialog_selectorRegions-C7tvNWJk.amd.js → dialog_selectorRegions-CMI1gx5d.amd.js} +2 -2
  12. package/.chunks/{dialog_selectorRegions-C7tvNWJk.amd.js.map → dialog_selectorRegions-CMI1gx5d.amd.js.map} +1 -1
  13. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CqYKaqcT.amd.js → dialogs.vue_vue_type_script_setup_true_lang-BSxHPUWf.amd.js} +2 -2
  14. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-BSxHPUWf.amd.js.map +1 -0
  15. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DBzDS_l7.es.js → dialogs.vue_vue_type_script_setup_true_lang-CjUHErAY.es.js} +3 -3
  16. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CjUHErAY.es.js.map +1 -0
  17. package/.chunks/{forms-BZlFXc5U.es.js → forms-DOGPN_TR.es.js} +50 -51
  18. package/.chunks/{forms-BZlFXc5U.es.js.map → forms-DOGPN_TR.es.js.map} +1 -1
  19. package/.chunks/{forms-DMI0BqCj.amd.js → forms-Gb7ujpmz.amd.js} +3 -3
  20. package/.chunks/{forms-DMI0BqCj.amd.js.map → forms-Gb7ujpmz.amd.js.map} +1 -1
  21. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CACzwZ0A.amd.js → listItem.vue_vue_type_script_setup_true_lang-CF_hIWa6.amd.js} +2 -2
  22. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CACzwZ0A.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-CF_hIWa6.amd.js.map} +1 -1
  23. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-KxTfgv5Z.es.js → listItem.vue_vue_type_script_setup_true_lang-CJQj81Yq.es.js} +2 -2
  24. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-KxTfgv5Z.es.js.map → listItem.vue_vue_type_script_setup_true_lang-CJQj81Yq.es.js.map} +1 -1
  25. package/.chunks/{menu.vue_vue_type_style_index_0_lang-CIdaxq15.amd.js → menu.vue_vue_type_style_index_0_lang-CczcI_-j.amd.js} +2 -2
  26. package/.chunks/{menu.vue_vue_type_style_index_0_lang-CIdaxq15.amd.js.map → menu.vue_vue_type_style_index_0_lang-CczcI_-j.amd.js.map} +1 -1
  27. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BMpVs3Du.es.js → menu.vue_vue_type_style_index_0_lang-Dq5eEX9i.es.js} +2 -2
  28. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BMpVs3Du.es.js.map → menu.vue_vue_type_style_index_0_lang-Dq5eEX9i.es.js.map} +1 -1
  29. package/.chunks/{notice-ULAk8EKs.amd.js → notice-C5sXcBql.amd.js} +2 -2
  30. package/.chunks/{notice-ULAk8EKs.amd.js.map → notice-C5sXcBql.amd.js.map} +1 -1
  31. package/.chunks/{notice-C0QQCxdI.es.js → notice-DE88Oe-t.es.js} +2 -2
  32. package/.chunks/{notice-C0QQCxdI.es.js.map → notice-DE88Oe-t.es.js.map} +1 -1
  33. package/.chunks/{page.vue_vue_type_script_setup_true_lang-BjGqYm-r.es.js → page.vue_vue_type_script_setup_true_lang-DFvul4oF.es.js} +4 -4
  34. package/.chunks/{page.vue_vue_type_script_setup_true_lang-BjGqYm-r.es.js.map → page.vue_vue_type_script_setup_true_lang-DFvul4oF.es.js.map} +1 -1
  35. package/.chunks/{page.vue_vue_type_script_setup_true_lang-f557_PUb.amd.js → page.vue_vue_type_script_setup_true_lang-DJSuza2e.amd.js} +2 -2
  36. package/.chunks/{page.vue_vue_type_script_setup_true_lang-f557_PUb.amd.js.map → page.vue_vue_type_script_setup_true_lang-DJSuza2e.amd.js.map} +1 -1
  37. package/.chunks/popup-B_8bvIsF.amd.js +2 -0
  38. package/.chunks/{popup-BDm3_TJy.amd.js.map → popup-B_8bvIsF.amd.js.map} +1 -1
  39. package/.chunks/{popup-Cl0Rac26.es.js → popup-BjsK_pMZ.es.js} +106 -80
  40. package/.chunks/{popup-Cl0Rac26.es.js.map → popup-BjsK_pMZ.es.js.map} +1 -1
  41. package/.chunks/{utils-C4bTrMJX.amd.js → utils-BVdq18mg.amd.js} +2 -2
  42. package/.chunks/{utils-C4bTrMJX.amd.js.map → utils-BVdq18mg.amd.js.map} +1 -1
  43. package/.chunks/{utils-D9KqMkio.es.js → utils-CRPkMfKD.es.js} +2 -2
  44. package/.chunks/{utils-D9KqMkio.es.js.map → utils-CRPkMfKD.es.js.map} +1 -1
  45. package/.chunks/{utils-BfXpHkpA.es.js → utils-CacKxWvO.es.js} +87 -88
  46. package/.chunks/utils-CacKxWvO.es.js.map +1 -0
  47. package/.chunks/utils-DiQZv1Ae.amd.js +2 -0
  48. package/.chunks/utils-DiQZv1Ae.amd.js.map +1 -0
  49. package/assets/core.css +1 -1
  50. package/assets/forms.css +1 -1
  51. package/assets/formsExt.css +1 -1
  52. package/charts/charts.amd.js +1 -1
  53. package/charts/charts.js +1 -1
  54. package/components/dialog/lib/utils.d.ts +5 -5
  55. package/components/dialog/lib/worker.d.ts +5 -5
  56. package/components/formsExt/formsExt.d.ts +2 -0
  57. package/components/formsExt/policy/policy.vue.d.ts +4 -0
  58. package/components/formsExt/policy/types.d.ts +10 -0
  59. package/core/app.amd.js +1 -1
  60. package/core/app.js +5 -5
  61. package/core/utils/date.d.ts +4 -3
  62. package/core/utils/dom.d.ts +10 -0
  63. package/dialog/dialog.amd.js +1 -1
  64. package/dialog/dialog.js +2 -2
  65. package/forms/forms.amd.js +1 -1
  66. package/forms/forms.js +1 -1
  67. package/formsExt/formsExt.amd.js +1 -1
  68. package/formsExt/formsExt.amd.js.map +1 -1
  69. package/formsExt/formsExt.js +274 -242
  70. package/formsExt/formsExt.js.map +1 -1
  71. package/layout/layout.amd.js +1 -1
  72. package/layout/layout.js +1 -1
  73. package/package.json +1 -1
  74. package/popup/popup.amd.js +1 -1
  75. package/popup/popup.js +2 -2
  76. package/popup/worker.amd.js +1 -1
  77. package/popup/worker.js +2 -2
  78. package/project/project.amd.js +1 -1
  79. package/project/project.js +5 -5
  80. package/tabsView/tabsView.amd.js +1 -1
  81. package/tabsView/tabsView.js +1 -1
  82. package/utils/clipboard.amd.js +1 -1
  83. package/utils/clipboard.js +1 -1
  84. package/utils/date.amd.js +1 -1
  85. package/utils/date.js +1 -1
  86. package/utils/device.amd.js +1 -1
  87. package/utils/device.js +1 -1
  88. package/utils/dom.amd.js +1 -1
  89. package/utils/dom.amd.js.map +1 -1
  90. package/utils/dom.js +27 -22
  91. package/utils/dom.js.map +1 -1
  92. package/utils/lodash.amd.js +1 -1
  93. package/utils/lodash.js +1 -1
  94. package/utils/price.amd.js +1 -1
  95. package/utils/price.js +1 -1
  96. package/utils/searchers.amd.js +1 -1
  97. package/utils/searchers.js +3 -3
  98. package/utils/string.amd.js +1 -1
  99. package/utils/string.js +1 -1
  100. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CqYKaqcT.amd.js.map +0 -1
  101. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DBzDS_l7.es.js.map +0 -1
  102. package/.chunks/popup-BDm3_TJy.amd.js +0 -2
  103. package/.chunks/utils-BV1bu3yj.amd.js +0 -2
  104. package/.chunks/utils-BV1bu3yj.amd.js.map +0 -1
  105. package/.chunks/utils-BfXpHkpA.es.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { u as w, C as f } from "./forms-BZlFXc5U.es.js";
1
+ import { u as k, C as f } from "./forms-DOGPN_TR.es.js";
2
2
  import i from "../utils/dom.js";
3
- import { TopPopupWorker as s } from "../popup/worker.js";
4
- class x {
3
+ import { TopPopupWorker as l } from "../popup/worker.js";
4
+ class P {
5
5
  static componentName = "Top";
6
6
  componentName;
7
7
  // имя класса компонента
@@ -21,7 +21,7 @@ class x {
21
21
  init(t, p, o) {
22
22
  if (!p)
23
23
  throw t + ": el is undefined";
24
- const e = x.getComponent(p, t);
24
+ const e = P.getComponent(p, t);
25
25
  if (e)
26
26
  return e.reInit(o), e;
27
27
  this.componentName = t, this.className = "top" + t[0].toUpperCase() + t.substring(1), this.uid = this.componentName + (Math.random() + "").replace(".", ""), this._setComponent(p), this.el = p, this.el.classList.add(this.className), this.options = Object.assign(this.options, o), this.mount();
@@ -56,13 +56,13 @@ class x {
56
56
  }
57
57
  // указание новые события, которые должны будут удалиться после unmount
58
58
  registerEventForUnmount(t, p, o, e) {
59
- const n = {
59
+ const r = {
60
60
  el: t,
61
61
  type: p,
62
62
  listener: o,
63
63
  options: e
64
64
  };
65
- this.unmountEvents.push(n);
65
+ this.unmountEvents.push(r);
66
66
  }
67
67
  // функция перенастройки уже подключенного компонента
68
68
  reInit(t) {
@@ -82,7 +82,7 @@ class x {
82
82
  }
83
83
  }
84
84
  }
85
- class y {
85
+ class I {
86
86
  static isInited = !1;
87
87
  /**
88
88
  * Добавить глобальные обработчики
@@ -101,13 +101,13 @@ class y {
101
101
  var o;
102
102
  if (!(!(t.target instanceof HTMLElement) || !t.target.closest(".top-popup-wrapper"))) {
103
103
  if (t.target.matches("[data-top-popup]")) {
104
- const e = t.target.closest("ul"), n = t.target.closest("a, .a");
105
- e && ((o = e.querySelector("a.top-active, .a.top-active")) == null || o.classList.remove("top-active")), n && n.classList.add("top-active"), t.stopPropagation();
104
+ const e = t.target.closest("ul"), r = t.target.closest("a, .a");
105
+ e && ((o = e.querySelector("a.top-active, .a.top-active")) == null || o.classList.remove("top-active")), r && r.classList.add("top-active"), t.stopPropagation();
106
106
  return;
107
107
  }
108
108
  if (t.target.matches(".top-popup-wrapper")) {
109
109
  const e = t.target;
110
- s.close(e), t.stopPropagation();
110
+ l.close(e), t.stopPropagation();
111
111
  return;
112
112
  }
113
113
  }
@@ -124,14 +124,14 @@ class y {
124
124
  const o = t.target.closest(".top-popup-wrapper");
125
125
  if (!o || p.matches(".top-popup-noCloser"))
126
126
  return;
127
- p.getAttribute("href") === "." && t.preventDefault(), s.close(o);
127
+ p.getAttribute("href") === "." && t.preventDefault(), l.close(o);
128
128
  }
129
129
  }
130
130
  /**
131
131
  * Глобальный обработчик нажатия кнопки на клавиатуре
132
132
  */
133
133
  static onkeydown(t) {
134
- var e, n;
134
+ var e, r;
135
135
  if (!(t.target instanceof HTMLElement)) return;
136
136
  const p = t.target.closest(".top-popup-wrapper");
137
137
  if (!p)
@@ -139,25 +139,25 @@ class y {
139
139
  const o = p.querySelector("ul.top-popup_content");
140
140
  switch (t.key) {
141
141
  case "Escape":
142
- s.close(p);
142
+ l.close(p);
143
143
  break;
144
144
  case "Enter":
145
145
  if (!o) {
146
146
  if (i.querySelectorVisible(p, ".preloader"))
147
147
  break;
148
- const u = i.querySelectorVisible(p, ".top-popup_footer .go, .top-popup_footer [data-action]");
149
- if (u instanceof HTMLElement) {
150
- u.click();
148
+ const a = i.querySelectorVisible(p, ".top-popup_footer .go, .top-popup_footer [data-action]");
149
+ if (a instanceof HTMLElement) {
150
+ a.click();
151
151
  break;
152
152
  }
153
- let m = i.querySelectorVisibleLast(p, ".top-popup_footer .top-button:focus");
154
- m || (m = i.querySelectorVisibleLast(p, ".top-popup_footer .top-button")), m instanceof HTMLElement && m.click();
153
+ let g = i.querySelectorVisibleLast(p, ".top-popup_footer .top-button:focus");
154
+ g || (g = i.querySelectorVisibleLast(p, ".top-popup_footer .top-button")), g instanceof HTMLElement && g.click();
155
155
  break;
156
156
  }
157
- const r = i.querySelectorVisible(p, "li > a.top-active");
158
- r && r.getAttribute("href") && (t.preventDefault(), location.href = r.getAttribute("href"));
159
- const a = p.querySelector("li > .top-active");
160
- a instanceof HTMLElement && a.click();
157
+ const n = i.querySelectorVisible(p, "li > a.top-active");
158
+ n && n.getAttribute("href") && (t.preventDefault(), location.href = n.getAttribute("href"));
159
+ const c = p.querySelector("li > .top-active");
160
+ c instanceof HTMLElement && c.click();
161
161
  break;
162
162
  // управление стрелками
163
163
  case "ArrowUp":
@@ -170,30 +170,30 @@ class y {
170
170
  p,
171
171
  "ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active > .top-popup_listMore"
172
172
  ) && t.preventDefault() : t.preventDefault();
173
- const c = (e = p.querySelector("ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active")) == null ? void 0 : e.parentElement;
174
- if (t.key === "ArrowRight" && c) {
175
- const u = c.querySelector(".top-active > .top-popup_listMore");
176
- if (u instanceof HTMLElement)
177
- return u.click();
173
+ const h = (e = p.querySelector("ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active")) == null ? void 0 : e.parentElement;
174
+ if (t.key === "ArrowRight" && h) {
175
+ const a = h.querySelector(".top-active > .top-popup_listMore");
176
+ if (a instanceof HTMLElement)
177
+ return a.click();
178
178
  }
179
- const h = i.querySelectorAllVisible(p, "ul.top-popup_content > li:not(.top-popup_liNoSelectable)"), d = h.length;
180
- if (!d)
179
+ const u = i.querySelectorAllVisible(p, "ul.top-popup_content > li:not(.top-popup_liNoSelectable)"), m = u.length;
180
+ if (!m)
181
181
  return;
182
- let l = -1;
183
- if (c && (l = h.indexOf(c)), t.key === "ArrowUp" || t.key === "ArrowLeft" ? l-- : l++, t.key === "ArrowLeft" && l === -1)
184
- return t.target.matches("input") ? void 0 : s.close(p);
185
- if (t.key === "ArrowRight" && l === d)
182
+ let d = -1;
183
+ if (h && (d = u.indexOf(h)), t.key === "ArrowUp" || t.key === "ArrowLeft" ? d-- : d++, t.key === "ArrowLeft" && d === -1)
184
+ return t.target.matches("input") ? void 0 : l.close(p);
185
+ if (t.key === "ArrowRight" && d === m)
186
186
  return;
187
- l < 0 && (l = d - 1), l > d - 1 && (l = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((u) => u.classList.remove("top-active")), (n = h[l].querySelector(":scope > a, :scope > .a")) == null || n.classList.add("top-active"), s.scrollToActive(p);
187
+ d < 0 && (d = m - 1), d > m - 1 && (d = 0), p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach((a) => a.classList.remove("top-active")), (r = u[d].querySelector(":scope > a, :scope > .a")) == null || r.classList.add("top-active"), l.scrollToActive(p);
188
188
  break;
189
189
  }
190
190
  }
191
191
  }
192
- const _ = ":root{--top-popup-z-index: 200000;--top-popup-transition-delay: .1s;--top-popup-background-color: var(--color-layout-front-1);--top-popup-background-color-hover: var(--color-layout-front-3);--top-popup-background-color-active: var(--color-layout-front-4);--top-popup-border-color: var(--color-line-2-opacity);--top-popup-title-background-color: var(--color-layer-1);--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding));--top-popup-list-padding: var(--top-padding-2);--top-popup-listItem-radius: var(--top-radius-2);--top-popup-listItem-padding: var(--top-padding-2)}.top-popup-front{position:relative}.top-popup-wrapper{--top-popup-height: 0px;--top-popup-right-bounding: 0px;--top-popup-bottom-bounding: 0px;--top-popup-top: 0px;--top-popup-right: calc(100vw - var(--top-popup-right-bounding));--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));--top-popup-left: 0px;text-align:initial;white-space:normal;word-break:normal;position:absolute;z-index:200000}.top-popup-wrapper:not(.top-popup-wrapper-shown){overflow:hidden}.top-popupPanel{cursor:default;box-shadow:var(--top-shadow-b);border-radius:14px;background:var(--top-popup-background-color);position:absolute;overflow:hidden;display:flex;flex-direction:column}.top-popup-wrapper>*{opacity:0;transition:opacity var(--top-popup-transition-delay) linear,transform var(--top-popup-transition-delay) linear}.top-popup-wrapper.p0>*{transform:translateY(-8px)}.top-popup-wrapper.p1>*{transform:translateY(8px)}.top-popup-wrapper.p2>*{transform:translate(8px)}.top-popup-wrapper.p3>*{transform:translateY(8px)}.top-popup-wrapper.p4>*{transform:translate(-8px)}.top-popup-wrapper-shown:not(.top-popup-wrapper-closed)>*{opacity:1;transform:translate(0)!important}.top-popup-wrapper.p0>.top-popup{top:-16px;left:-8px}.top-popup-wrapper.p1>.top-popup{bottom:calc(100% + 8px)}.top-popup-wrapper.p2>.top-popup{left:calc(100% + 8px)}.top-popup-wrapper.p3>.top-popup{top:calc(100% + 8px)}.top-popup-wrapper.p4>.top-popup{right:calc(100% + 8px)}.top-popup-wrapper.p2>.top-popup,.top-popup-wrapper.p4>.top-popup{margin-top:-10px}.top-popup-wrapper.p2.invert-y>.top-popup,.top-popup-wrapper.p4.invert-y>.top-popup{margin-bottom:-10px}.top-popup-wrapper.p1.with_notch>.top-popup{margin-bottom:5px}.top-popup-wrapper.p2.with_notch>.top-popup{margin-left:5px}.top-popup-wrapper.p3.with_notch>.top-popup{margin-top:5px}.top-popup-wrapper.p4.with_notch>.top-popup{margin-right:5px}.top-popup-wrapper.invert-x>.top-popup{right:0}.top-popup-wrapper.invert-y>.top-popup{bottom:0}.top-popup-wrapper>.notch{border:7.4px solid transparent;position:absolute;display:block}.top-popup-wrapper.p1>.notch{border-bottom:0;border-top:7.4px solid var(--color-layout-front-1);margin:0 0 7.4px -7.4px;bottom:100%;left:50%}.top-popup-wrapper.p2>.notch{border-left:0;border-right:7.4px solid var(--color-layout-front-1);margin:0 0 -7.4px 7.4px;bottom:50%;left:100%}.top-popup-wrapper.p3>.notch{border-top:0;border-bottom:7.4px solid var(--color-layout-front-1);margin:7.4px 0 0 -7.4px;top:100%;left:50%}.top-popup-wrapper.p4>.notch{border-right:0;border-left:7.4px solid var(--color-layout-front-1);margin:0 7.4px -7.4px 0;bottom:50%;right:100%}.top-popup-wrapper.p1>.notch-border{border-top-color:#0000000d;margin-bottom:6px}.top-popup-wrapper.p2>.notch-border{border-right-color:#0000000d;margin-left:6px}.top-popup-wrapper.p3>.notch-border{border-bottom-color:#0000000d;margin-top:6px}.top-popup-wrapper.p4>.notch-border{border-left-color:#0000000d;margin-right:6px}.top-popup_header,.top-popup_content,.top-popup_footer{font-size:14px}.top-popup_header,.top-popup_footer{display:flex;align-items:center;justify-content:space-between}.top-popup_header{color:var(--color-text-1);border-bottom:1px solid var(--top-popup-border-color);padding:var(--top-padding-3);font-weight:600}.top-popup_header>*{font-weight:400}.top-popup_header>.a{cursor:pointer}.top-popup_header>.a:hover{color:var(--color-text-primary)}.top-popup_headerButton{width:60px}.top-popup_widget{padding:var(--top-padding-2)}.top-popup_content{margin:0;flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;gap:var(--top-gap-4);-webkit-overflow-scrolling:touch}div.top-popup_content{color:var(--color-text-1);padding:var(--top-popup-content-padding)}div.top-popup_content>*{flex-shrink:0}div.top-popup_content>.top-button{margin:0}div.top-popup_content .top-unwrap{--top-unwrap-x: var(--top-popup-content-padding)}ul.top-popup_content{color:var(--color-text-1);padding:var(--top-popup-list-padding);gap:2px}ul.top-popup_content .top-unwrap{--top-unwrap-x: var(--top-popup-list-padding)}.top-popup_listItem{border-radius:var(--top-popup-listItem-radius);padding:var(--top-popup-listItem-padding);line-height:1!important}ul.top-popup_content li{margin:0;list-style:none;display:flex;position:relative}ul.top-popup_content li>*{flex-grow:1}ul.top-popup_content li>a:not(.top-button),ul.top-popup_content li>.a{cursor:pointer;box-sizing:border-box;border-radius:var(--top-popup-listItem-radius);background:var(--top-popup-background-color);padding:var(--top-popup-listItem-padding);color:var(--color-text-1)!important;font-size:14px;font-weight:400!important;text-decoration:none!important;font-style:normal;line-height:1!important;display:flex;flex:1 1 100%;align-items:center;transition:background-color .1s ease-in-out}.top-popup-wrapper-no_animate ul.top-popup_content li>a:not(.top-button),.top-popup-wrapper-no_animate ul.top-popup_content li>.a{transition:none}ul.top-popup_content li>a:not(.top-button):hover,ul.top-popup_content li>.a:hover{background:var(--top-popup-background-color-hover)}ul.top-popup_content li>a:not(.top-button).top-active,ul.top-popup_content li>.a.top-active{--top-icon-color: var(--color-text-primary) !important;background:var(--top-popup-background-color-active)}.top-popup_content+.top-popup_content{padding-top:0}.top-popup_listItem-title{background:var(--color-layer-1);color:var(--color-text-1);font-size:12px}.top-popup_listItem-delimiter{border-radius:3px;background:var(--top-popup-border-color);height:1px;padding:0;margin:4px}.top-popup_listMore{font-size:20px;margin:calc(0px - var(--top-popup-listItem-padding)) calc(0px - var(--top-popup-listItem-padding) / 2) calc(0px - var(--top-popup-listItem-padding)) 0}.top-popup_listMore.top-button{margin:0}ul.top-popup_content li>.a.top-popup_listMore{text-align:center;flex-basis:10px}ul.top-popup_content li>.a.top-popup_listMore:before{color:var(--color-text-2)}ul.top-popup_content li>*>.top-popup_listMore{margin-left:auto;color:var(--color-layer-4);font-size:14px}ul.top-popup_content li>*>i.top-popup_listMore:hover,ul.top-popup_content li>*>i.top-popup_listMore.top-active{color:var(--color-text-primary)}ul.top-popup_content li>*>i.top-popup_listMore:before{transform:rotate(90deg);display:block}ul.top-popup_content li a.close{background:none!important}.top-popup_content>[data-top-icon]:before{--top-icon-size: 20px}ul.top-popup_content li>[data-top-icon]:not(.top-button){--top-icon-color: var(--color-text-3);--top-icon-size: 20px;--top-icon-width: 20px}ul.top-popup_content li>[data-top-icon]:not(.top-button):before{height:1rem;margin-right:8px;transition:color .1s}ul.top-popup_content li:hover>[data-top-icon]:not(.top-button){--top-icon-color: var(--color-text-2)}.top-popup_footer{padding:var(--top-padding-3);border-top:1px solid var(--top-popup-border-color);display:flex;gap:var(--top-gap-2);justify-content:flex-end}.top-popup_footerSupportLink{margin-right:auto}.top-popup>[data-widget]{padding:0 var(--top-popup-list-padding)}.top-popup>[data-widget]+hr{margin:0 var(--top-popup-list-padding)}.top-popup .placeholder{border:1px solid #E0D9D9!important;border-right:none!important;border-left:none!important;background:#f9f9f9!important;margin:-1px 0;z-index:1;position:relative}.top-popup-wrapper.simple_list>.top-popup{min-width:0;white-space:nowrap}.top-popup_content .top-column{display:flex;flex-direction:column;gap:4px}html .top-popup .top-popup_content li>.top-button{margin:calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding)}.top-popup li .check_all,.top-popup li .clear_all{cursor:pointer;color:var(--color-text-primary);padding:8px;display:inline-block}.top-popup li .check_all:hover,.top-popup li .clear_all:hover{text-decoration:underline}.top-popup li .clear_all{display:none}.top-popup_content table{margin:-9px 0}.top-popup_content table td,.top-popup_content table th{padding:9px var(--top-popup-listItem-padding) 9px 0;vertical-align:top}.top-popup_content table th{width:40%;font-weight:600;white-space:nowrap}ul.top-popup_content .a>[type=checkbox],ul.top-popup_content .a>[type=radio]{margin:-8px 0 -8px auto}ul.top-popup_content a>[class*=icon],ul.top-popup_content i.a>[class*=icon]{transition:.1s}.top-popup .buttons{border-radius:0 0 4px 4px;border-top:1px solid #BDC3C7;background:#ecf0f1;padding:10px 15px;margin:10px -15px -10px;white-space:nowrap}.top-popup_footer [class*=btn]:not(.btn-transparent){min-width:100px;padding:5px 14px;margin-left:10px}.top-popup_footer [class*=btn]:first-child{margin-left:0}.top-popup_footer .btn.full_width{margin:0;flex-grow:1}", L = ":root{--top-popup-list-padding: 0px;--top-popup-listItem-radius: 0px;--top-popup-listItem-padding: var(--top-padding-4)}html.with_popup{background:gray}.top-popup-wrapper{--top-popup-footer-offset: 25px;width:auto!important;height:auto!important;position:fixed;top:0!important;right:0!important;left:0!important;overflow:hidden;transition:background .3s}.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){background:#00000080;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.top-popup-wrapper-shown:not(.top-popup-wrapper-closed)>.top-popup{opacity:1!important}.top-popup{border-radius:8px 8px 0 0;width:auto!important;max-height:calc(100% - var(--header-height, 0px) - var(--toolbar-height, 0px) - 12px);margin:0!important;top:auto!important;right:0!important;bottom:var(--toolbar-height, 0px)!important;left:0!important;display:flex;flex-direction:column;transform:translateY(80%);transition:opacity .3s,transform .3s}.top-popup-wrapper.p-from-top{--top-popup-footer-offset: 0px;top:var(--header-height, 0px)!important}.with_dialog .top-popup-wrapper.p-from-top{top:50px!important}.top-popup-wrapper.p-from-top>.top-popup{border-radius:0 0 8px 8px;max-height:calc(100% - 24px);top:0!important;bottom:auto!important;transform:translateY(calc(-100% - 24px))}.top-popup_widget:not(.p-from-top){order:10}ul.top-popup_content{gap:0}ul.top-popup_content li:not(:last-child){border-bottom:1px solid var(--top-popup-border-color)}.top-popup-wrapper.top-style_alt>.top-popup>ul>li{border-bottom:none}.top-popup_footer{flex-direction:column-reverse}.top-popup_footer>.top-button{--top-forms-base-height: var(--top-forms-base-height_l);width:100%}ul.top-popup_content .top-popup_listItem-title{--top-popup-padding-v: 12px}ul.top-popup_content .top-popup_listItem-delimiter{background:var(--color-line-1-opacity);height:4px;margin:0}ul.top-popup_content li:first-child>.top-popup_listItem-delimiter{border-top:1px solid var(--top-popup-border-color)}", E = ".top-popup{min-width:250px;max-width:calc(100vw - var(--top-popup-left) - 16px);max-height:calc(var(--top-popup-bottom) + var(--top-popup-height))}.top-popup-wrapper.invert-x>.top-popup{max-width:calc(100vw - var(--top-popup-right) - 16px)}.top-popup-wrapper.invert-y>.top-popup{max-height:calc(100vh - var(--top-popup-bottom) - 16px)}.top-popup-wrapper.p1>.top-popup{max-height:calc(var(--top-popup-top) - var(--header-height, 0px) - 16px)}.top-popup-wrapper.p3>.top-popup{max-height:calc(var(--top-popup-bottom) - 16px)}.top-popup-wrapper.p2>.top-popup{max-width:calc(var(--top-popup-right) - 16px)}.top-popup-wrapper.p4>.top-popup{max-width:calc(var(--top-popup-left) - 16px)}.top-popup-wrapper.p1.with_notch>.top-popup,.top-popup-wrapper.p3.with_notch>.top-popup{margin-left:-16px!important}.top-popup-wrapper.p1.with_notch>.notch,.top-popup-wrapper.p3.with_notch>.notch{margin-left:-8px!important}.top-popup-wrapper.p1.with_notch.invert-x,.top-popup-wrapper.p3.with_notch.invert-x{margin-left:3px!important}.top-popup-wrapper.p1.with_notch.invert-x>.notch,.top-popup-wrapper.p3.with_notch.invert-x>.notch{margin-left:-9px!important}ul.top-popup_content li>*>i.top-popup_listMore{visibility:hidden;transition:none}ul.top-popup_content li:hover>*>i.top-popup_listMore,ul.top-popup_content li>*.top-active>i.top-popup_listMore,ul.top-popup_content li>*>i.top-popup_listMore.top-active{visibility:visible}";
193
- f.insertStyleToPage(_);
194
- f.insertStyleToPage(L, "m");
195
- f.insertStyleToPage(E, "pc");
196
- class v extends x {
192
+ const S = ":root{--top-popup-z-index: 200000;--top-popup-transition-delay: .1s;--top-popup-offset: var(--top-padding-2);--top-popup-background-color: var(--color-layout-front-1);--top-popup-background-color-hover: var(--color-layout-front-3);--top-popup-background-color-active: var(--color-layout-front-4);--top-popup-border-color: var(--color-line-2-opacity);--top-popup-title-background-color: var(--color-layer-1);--top-popup-content-padding: calc(var(--top-popup-list-padding) + var(--top-popup-listItem-padding));--top-popup-list-padding: var(--top-padding-2);--top-popup-listItem-radius: var(--top-radius-2);--top-popup-listItem-padding: var(--top-padding-2)}.top-popup-front{position:relative}.top-popup-wrapper{--top-popup-height: 0px;--top-popup-right-bounding: 0px;--top-popup-bottom-bounding: 0px;--top-popup-top: 0px;--top-popup-right: calc(100vw - var(--top-popup-right-bounding));--top-popup-bottom: calc(var(--100vh) - var(--top-popup-bottom-bounding));--top-popup-left: 0px;--top-popup-margin: -10px;text-align:initial;white-space:normal;word-break:normal;position:absolute;z-index:200000}.top-popup-wrapper:not(.top-popup-wrapper-shown){overflow:hidden}.top-popupPanel{cursor:default;box-shadow:var(--top-shadow-b);border-radius:14px;background:var(--top-popup-background-color);position:absolute;overflow:hidden;display:flex;flex-direction:column}.top-popup-wrapper>*{opacity:0;transition:opacity var(--top-popup-transition-delay) linear,transform var(--top-popup-transition-delay) linear}.top-popup-wrapper.p0>*{transform:translateY(-8px)}.top-popup-wrapper.p1>*{transform:translateY(8px)}.top-popup-wrapper.p2>*{transform:translate(8px)}.top-popup-wrapper.p3>*{transform:translateY(8px)}.top-popup-wrapper.p4>*{transform:translate(-8px)}.top-popup-wrapper-shown:not(.top-popup-wrapper-closed)>*{opacity:1;transform:translate(0)!important}.top-popup-wrapper.p0>.top-popup{top:-16px;left:-8px}.top-popup-wrapper.p1>.top-popup{bottom:calc(100% + 8px)}.top-popup-wrapper.p2>.top-popup{left:calc(100% + 8px)}.top-popup-wrapper.p3>.top-popup{top:calc(100% + 8px)}.top-popup-wrapper.p4>.top-popup{right:calc(100% + 8px)}.top-popup-wrapper.p2>.top-popup,.top-popup-wrapper.p4>.top-popup{margin-top:var(--top-popup-margin)}.top-popup-wrapper.p2.invert-y>.top-popup,.top-popup-wrapper.p4.invert-y>.top-popup{margin-bottom:var(--top-popup-margin)}.top-popup-wrapper.p1.with_notch>.top-popup{margin-bottom:5px}.top-popup-wrapper.p2.with_notch>.top-popup{margin-left:5px}.top-popup-wrapper.p3.with_notch>.top-popup{margin-top:5px}.top-popup-wrapper.p4.with_notch>.top-popup{margin-right:5px}.top-popup-wrapper.invert-x>.top-popup{right:0}.top-popup-wrapper.invert-y>.top-popup{bottom:0}.top-popup-wrapper>.notch{border:7.4px solid transparent;position:absolute;display:block}.top-popup-wrapper.p1>.notch{border-bottom:0;border-top:7.4px solid var(--color-layout-front-1);margin:0 0 7.4px -7.4px;bottom:100%;left:50%}.top-popup-wrapper.p2>.notch{border-left:0;border-right:7.4px solid var(--color-layout-front-1);margin:0 0 -7.4px 7.4px;bottom:50%;left:100%}.top-popup-wrapper.p3>.notch{border-top:0;border-bottom:7.4px solid var(--color-layout-front-1);margin:7.4px 0 0 -7.4px;top:100%;left:50%}.top-popup-wrapper.p4>.notch{border-right:0;border-left:7.4px solid var(--color-layout-front-1);margin:0 7.4px -7.4px 0;bottom:50%;right:100%}.top-popup-wrapper.p1>.notch-border{border-top-color:#0000000d;margin-bottom:6px}.top-popup-wrapper.p2>.notch-border{border-right-color:#0000000d;margin-left:6px}.top-popup-wrapper.p3>.notch-border{border-bottom-color:#0000000d;margin-top:6px}.top-popup-wrapper.p4>.notch-border{border-left-color:#0000000d;margin-right:6px}.top-popup_header,.top-popup_content,.top-popup_footer{font-size:14px}.top-popup_header,.top-popup_footer{display:flex;align-items:center;justify-content:space-between}.top-popup_header{color:var(--color-text-1);border-bottom:1px solid var(--top-popup-border-color);padding:var(--top-padding-3);font-weight:600}.top-popup_header>*{font-weight:400}.top-popup_header>.a{cursor:pointer}.top-popup_header>.a:hover{color:var(--color-text-primary)}.top-popup_headerButton{width:60px}.top-popup_widget{padding:var(--top-padding-2)}.top-popup_content{margin:0;flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;gap:var(--top-gap-4);-webkit-overflow-scrolling:touch}div.top-popup_content{color:var(--color-text-1);padding:var(--top-popup-content-padding)}div.top-popup_content>*{flex-shrink:0}div.top-popup_content>.top-button{margin:0}div.top-popup_content .top-unwrap{--top-unwrap-x: var(--top-popup-content-padding)}ul.top-popup_content{color:var(--color-text-1);padding:var(--top-popup-list-padding);gap:2px}ul.top-popup_content .top-unwrap{--top-unwrap-x: var(--top-popup-list-padding)}.top-popup_listItem{border-radius:var(--top-popup-listItem-radius);padding:var(--top-popup-listItem-padding);line-height:1!important}ul.top-popup_content li{margin:0;list-style:none;display:flex;position:relative}ul.top-popup_content li>*{flex-grow:1}ul.top-popup_content li>a:not(.top-button),ul.top-popup_content li>.a{cursor:pointer;box-sizing:border-box;border-radius:var(--top-popup-listItem-radius);background:var(--top-popup-background-color);padding:var(--top-popup-listItem-padding);color:var(--color-text-1)!important;font-size:14px;font-weight:400!important;text-decoration:none!important;font-style:normal;line-height:1!important;display:flex;flex:1 1 100%;align-items:center;transition:background-color .1s ease-in-out}.top-popup-wrapper-no_animate ul.top-popup_content li>a:not(.top-button),.top-popup-wrapper-no_animate ul.top-popup_content li>.a{transition:none}ul.top-popup_content li>a:not(.top-button):hover,ul.top-popup_content li>.a:hover{background:var(--top-popup-background-color-hover)}ul.top-popup_content li>a:not(.top-button).top-active,ul.top-popup_content li>.a.top-active{--top-icon-color: var(--color-text-primary) !important;background:var(--top-popup-background-color-active)}.top-popup_content+.top-popup_content{padding-top:0}.top-popup_listItem-title{background:var(--color-layer-1);color:var(--color-text-1);font-size:12px}.top-popup_listItem-delimiter{border-radius:3px;background:var(--top-popup-border-color);height:1px;padding:0;margin:4px}.top-popup_listMore{font-size:20px;margin:calc(0px - var(--top-popup-listItem-padding)) calc(0px - var(--top-popup-listItem-padding) / 2) calc(0px - var(--top-popup-listItem-padding)) 0}.top-popup_listMore.top-button{margin:0}ul.top-popup_content li>.a.top-popup_listMore{text-align:center;flex-basis:10px}ul.top-popup_content li>.a.top-popup_listMore:before{color:var(--color-text-2)}ul.top-popup_content li>*>.top-popup_listMore{margin-left:auto;color:var(--color-layer-4);font-size:14px}ul.top-popup_content li>*>i.top-popup_listMore:hover,ul.top-popup_content li>*>i.top-popup_listMore.top-active{color:var(--color-text-primary)}ul.top-popup_content li>*>i.top-popup_listMore:before{transform:rotate(90deg);display:block}ul.top-popup_content li a.close{background:none!important}.top-popup_content>[data-top-icon]:before{--top-icon-size: 20px}ul.top-popup_content li>[data-top-icon]:not(.top-button){--top-icon-color: var(--color-text-3);--top-icon-size: 20px;--top-icon-width: 20px}ul.top-popup_content li>[data-top-icon]:not(.top-button):before{height:1rem;margin-right:8px;transition:color .1s}ul.top-popup_content li:hover>[data-top-icon]:not(.top-button){--top-icon-color: var(--color-text-2)}.top-popup_footer{padding:var(--top-padding-3);border-top:1px solid var(--top-popup-border-color);display:flex;gap:var(--top-gap-2);justify-content:flex-end}.top-popup_footerSupportLink{margin-right:auto}.top-popup>[data-widget]{padding:0 var(--top-popup-list-padding)}.top-popup>[data-widget]+hr{margin:0 var(--top-popup-list-padding)}.top-popup .placeholder{border:1px solid #E0D9D9!important;border-right:none!important;border-left:none!important;background:#f9f9f9!important;margin:-1px 0;z-index:1;position:relative}.top-popup-wrapper.simple_list>.top-popup{min-width:0;white-space:nowrap}.top-popup_content .top-column{display:flex;flex-direction:column;gap:4px}html .top-popup .top-popup_content li>.top-button{margin:calc(var(--top-popup-listItem-padding) / 2) var(--top-popup-listItem-padding)}.top-popup li .check_all,.top-popup li .clear_all{cursor:pointer;color:var(--color-text-primary);padding:8px;display:inline-block}.top-popup li .check_all:hover,.top-popup li .clear_all:hover{text-decoration:underline}.top-popup li .clear_all{display:none}.top-popup_content table{margin:-9px 0}.top-popup_content table td,.top-popup_content table th{padding:9px var(--top-popup-listItem-padding) 9px 0;vertical-align:top}.top-popup_content table th{width:40%;font-weight:600;white-space:nowrap}ul.top-popup_content .a>[type=checkbox],ul.top-popup_content .a>[type=radio]{margin:-8px 0 -8px auto}ul.top-popup_content a>[class*=icon],ul.top-popup_content i.a>[class*=icon]{transition:.1s}.top-popup .buttons{border-radius:0 0 4px 4px;border-top:1px solid #BDC3C7;background:#ecf0f1;padding:10px 15px;margin:10px -15px -10px;white-space:nowrap}.top-popup_footer [class*=btn]:not(.btn-transparent){min-width:100px;padding:5px 14px;margin-left:10px}.top-popup_footer [class*=btn]:first-child{margin-left:0}.top-popup_footer .btn.full_width{margin:0;flex-grow:1}", M = ":root{--top-popup-list-padding: 0px;--top-popup-listItem-radius: 0px;--top-popup-listItem-padding: var(--top-padding-4)}html.with_popup{background:gray}.top-popup-wrapper{--top-popup-footer-offset: 25px;width:auto!important;height:auto!important;position:fixed;top:0!important;right:0!important;left:0!important;overflow:hidden;transition:background .3s}.top-popup-wrapper-shown:not(.top-popup-wrapper-closed){background:#00000080;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.top-popup-wrapper-shown:not(.top-popup-wrapper-closed)>.top-popup{opacity:1!important}.top-popup{border-radius:8px 8px 0 0;width:auto!important;max-height:calc(100% - var(--header-height, 0px) - var(--toolbar-height, 0px) - 12px);margin:0!important;top:auto!important;right:0!important;bottom:var(--toolbar-height, 0px)!important;left:0!important;display:flex;flex-direction:column;transform:translateY(80%);transition:opacity .3s,transform .3s}.top-popup-wrapper.p-from-top{--top-popup-footer-offset: 0px;top:var(--header-height, 0px)!important}.with_dialog .top-popup-wrapper.p-from-top{top:50px!important}.top-popup-wrapper.p-from-top>.top-popup{border-radius:0 0 8px 8px;max-height:calc(100% - 24px);top:0!important;bottom:auto!important;transform:translateY(calc(-100% - 24px))}.top-popup_widget:not(.p-from-top){order:10}ul.top-popup_content{gap:0}ul.top-popup_content li:not(:last-child){border-bottom:1px solid var(--top-popup-border-color)}.top-popup-wrapper.top-style_alt>.top-popup>ul>li{border-bottom:none}.top-popup_footer{flex-direction:column-reverse}.top-popup_footer>.top-button{--top-forms-base-height: var(--top-forms-base-height_l);width:100%}ul.top-popup_content .top-popup_listItem-title{--top-popup-padding-v: 12px}ul.top-popup_content .top-popup_listItem-delimiter{background:var(--color-line-1-opacity);height:4px;margin:0}ul.top-popup_content li:first-child>.top-popup_listItem-delimiter{border-top:1px solid var(--top-popup-border-color)}", T = ".top-popup{min-width:250px;max-width:calc(100vw - var(--top-popup-left) - 16px);max-height:calc(var(--top-popup-bottom) + var(--top-popup-height))}.top-popup-wrapper.invert-x>.top-popup{max-width:calc(100vw - var(--top-popup-right) - 16px)}.top-popup-wrapper.invert-y>.top-popup{max-height:calc(100vh - var(--top-popup-bottom) - 16px)}.top-popup-wrapper.p1>.top-popup{max-height:calc(var(--top-popup-top) - var(--header-height, 0px) - 16px)}.top-popup-wrapper.p3>.top-popup{max-height:calc(var(--top-popup-bottom) - 16px)}.top-popup-wrapper.p2>.top-popup{max-width:calc(var(--top-popup-right) - 16px)}.top-popup-wrapper.p4>.top-popup{max-width:calc(var(--top-popup-left) - 16px)}.top-popup-wrapper.p1.with_notch>.top-popup,.top-popup-wrapper.p3.with_notch>.top-popup{margin-left:-16px!important}.top-popup-wrapper.p1.with_notch>.notch,.top-popup-wrapper.p3.with_notch>.notch{margin-left:-8px!important}.top-popup-wrapper.p1.with_notch.invert-x,.top-popup-wrapper.p3.with_notch.invert-x{margin-left:3px!important}.top-popup-wrapper.p1.with_notch.invert-x>.notch,.top-popup-wrapper.p3.with_notch.invert-x>.notch{margin-left:-9px!important}ul.top-popup_content li>*>i.top-popup_listMore{visibility:hidden;transition:none}ul.top-popup_content li:hover>*>i.top-popup_listMore,ul.top-popup_content li>*.top-active>i.top-popup_listMore,ul.top-popup_content li>*>i.top-popup_listMore.top-active{visibility:visible}";
193
+ f.insertStyleToPage(S);
194
+ f.insertStyleToPage(M, "m");
195
+ f.insertStyleToPage(T, "pc");
196
+ class x extends P {
197
197
  static componentName = "TopPopup";
198
198
  // элемент, вызвавший открытие Popup
199
199
  elActiveByDefault;
@@ -250,13 +250,13 @@ class v extends x {
250
250
  * @param options
251
251
  */
252
252
  constructor(t, p) {
253
- super(), this.init(v.componentName, t, p);
253
+ super(), this.init(x.componentName, t, p);
254
254
  }
255
255
  async mount() {
256
- var e, n;
256
+ var e, r;
257
257
  if (!(this.el instanceof HTMLElement)) return;
258
258
  const t = this.vueGetComponent();
259
- if (this.el.closest(".top-popup-wrapper") && (this.popupParent = s.getPopup(this.el.closest(".top-popup-wrapper"))), await this.mountJQuery(), i.css(this.el, "position") !== "absolute" && (this.el.style.position = "relative"), this.el.dataset.topPopupOpened = "opened", this.elActiveByDefault = this.el.classList.contains("top-active"), this.el.classList.add("top-active"), t)
259
+ if (this.el.closest(".top-popup-wrapper") && (this.popupParent = l.getPopup(this.el.closest(".top-popup-wrapper"))), await this.mountJQuery(), i.css(this.el, "position") !== "absolute" && (this.el.style.position = "relative"), this.el.dataset.topPopupOpened = "opened", this.elActiveByDefault = this.el.classList.contains("top-active"), this.el.classList.add("top-active"), t)
260
260
  this.type = "vue", this.options.popup = "", this.elPopup = i.genEl("div", {}, this.options.popup);
261
261
  else if ((e = this.options.popup) != null && e.match(/^[#.]/))
262
262
  this.type = "selector", this.elPopup = document.querySelector(`${this.options.popup}.template`) || void 0;
@@ -268,7 +268,7 @@ class v extends x {
268
268
  if (!this.elPopup || t != null && t.opened) {
269
269
  if (this.options.useOriginal || t != null && t.opened) {
270
270
  if (t != null && t.opened ? this.elPopup = t.popup.elPopup : this.elPopup = document.querySelector(`${this.options.popup}.top-popup-wrapper-shown`) || void 0, this.elPopup) {
271
- this.el.dataset.topPopupOpened = "", this.elActiveByDefault || this.el.classList.remove("top-active"), s.close(this.elPopup), setTimeout(() => this.mount(), this.options.transitionDuration);
271
+ this.el.dataset.topPopupOpened = "", this.elActiveByDefault || this.el.classList.remove("top-active"), l.close(this.elPopup), setTimeout(() => this.mount(), this.options.transitionDuration);
272
272
  return;
273
273
  }
274
274
  throw "Option useOriginal state allowed only elements .template";
@@ -277,29 +277,29 @@ class v extends x {
277
277
  }
278
278
  if (!this.elPopup)
279
279
  return;
280
- for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition = i.wrap(this.elPopup, "i"), this.elStartPosition.classList.add("top-popup-el-start-position", "hidden"))) : (this.elPopup = this.elPopup.cloneNode(!0), this.type === "selector" && !this.elPopup.matches(".template") && (this.elPopup.classList.remove("hidden"), this.elPopup.querySelector(":scope > .top-popup_content") || this.elPopup.classList.add("top-popup_content"), this.elPopup = i.wrap(this.elPopup, "div")), this.type === "html" && (this.elPopup.querySelector(":scope > .top-popup_content") || (this.elPopup.classList.add("top-popup_content"), this.elPopup = i.wrap(this.elPopup, "div"))), (this.type === "selector" && !this.elPopup.matches(".template") || this.type === "html" || this.type === "vue") && (i.querySelectorAllArray(this.elPopup, "[data-top-popup]").forEach((r) => {
281
- r instanceof HTMLElement && (r.dataset.topPopupPosBy = "fixed");
282
- }), i.querySelectorAllArray(this.elPopup, ".top-popup-wrapper").forEach((r) => r.remove()))), s.decoratorBeforeOpen(this), t && (this.options.class = t.classRef.value, t.transitionDurationRef.value !== void 0 && (this.options.transitionDuration = t.transitionDurationRef.value, this.elPopup instanceof HTMLElement && this.elPopup.style.setProperty(
280
+ for (this.options.useOriginal ? (this.elStartPosition = this.elPopup.closest(".top-popup-el-start-position"), this.elStartPosition || (this.elStartPosition = i.wrap(this.elPopup, "i"), this.elStartPosition.classList.add("top-popup-el-start-position", "hidden"))) : (this.elPopup = this.elPopup.cloneNode(!0), this.type === "selector" && !this.elPopup.matches(".template") && (this.elPopup.classList.remove("hidden"), this.elPopup.querySelector(":scope > .top-popup_content") || this.elPopup.classList.add("top-popup_content"), this.elPopup = i.wrap(this.elPopup, "div")), this.type === "html" && (this.elPopup.querySelector(":scope > .top-popup_content") || (this.elPopup.classList.add("top-popup_content"), this.elPopup = i.wrap(this.elPopup, "div"))), (this.type === "selector" && !this.elPopup.matches(".template") || this.type === "html" || this.type === "vue") && (i.querySelectorAllArray(this.elPopup, "[data-top-popup]").forEach((n) => {
281
+ n instanceof HTMLElement && (n.dataset.topPopupPosBy = "fixed");
282
+ }), i.querySelectorAllArray(this.elPopup, ".top-popup-wrapper").forEach((n) => n.remove()))), l.decoratorBeforeOpen(this), t && (this.options.class = t.classRef.value, t.transitionDurationRef.value !== void 0 && (this.options.transitionDuration = t.transitionDurationRef.value, this.elPopup instanceof HTMLElement && this.elPopup.style.setProperty(
283
283
  "--top-popup-transition-delay",
284
284
  this.options.transitionDuration + "ms"
285
285
  ))), this.elPopupInner = document.createElement("div"), this.elPopupInner.classList.add("top-popupPanel", "top-popup"); this.elPopup.firstChild; )
286
286
  this.elPopupInner.appendChild(this.elPopup.firstChild);
287
287
  if (this.elPopup.append(this.elPopupInner), this.elPopup.classList.add("top-popup-wrapper"), this.options.class) {
288
- const r = this.options.class.split(" ");
289
- this.elPopup.classList.add(...r);
288
+ const n = this.options.class.split(" ");
289
+ this.elPopup.classList.add(...n);
290
290
  }
291
291
  this.options.notch && (this.elPopup.classList.add("with_notch"), this.elPopup.insertAdjacentHTML("beforeend", '<i class="notch notch-border"></i><i class="notch"></i>')), await this.vueOpen(), this.elPopupHeader = this.elPopupInner.querySelector(".top-popup_header"), this.elPopupWidget = this.elPopupInner.querySelector(".top-popup_widget"), this.elPopupBody = this.elPopupInner.querySelector(".top-popup_content"), this.elPopupFooter = this.elPopupInner.querySelector(".top-popup_footer");
292
292
  const p = !!this.elPopup.querySelector('[data-widget="search"]');
293
293
  if (this.options.isFullScreen && !p) {
294
- const r = w();
295
- !this.elPopupHeader && r.Common.Close && (this.elPopupHeader = i.genEl("i", { class: "top-popup_header" }), this.elPopupInner.prepend(this.elPopupHeader), this.elPopupHeader.prepend(i.genEl("i", { class: "a closer" }, r.Common.Close)), this.elPopupHeader.append(i.genEl("i", { class: "top-popup_headerButton" })));
294
+ const n = k();
295
+ !this.elPopupHeader && n.Common.Close && (this.elPopupHeader = i.genEl("i", { class: "top-popup_header" }), this.elPopupInner.prepend(this.elPopupHeader), this.elPopupHeader.prepend(i.genEl("i", { class: "a closer" }, n.Common.Close)), this.elPopupHeader.append(i.genEl("i", { class: "top-popup_headerButton" })));
296
296
  }
297
- i.storage(this.elPopup, v.componentName, this), this.options.frontSelector && (this.elFront = document.querySelector(this.options.frontSelector)), this.elFront || (this.elFront = this.el.closest(".top-popup-front")), this.elFront || (this.elFront = document.body), this.elPopup instanceof HTMLElement && (this.elPopup.style.width = this.el.offsetWidth + "px", this.elPopup.style.height = this.el.offsetHeight + "px", this.elPopup.style.top = this.el.offsetTop + "px", this.elPopup.style.right = parseInt(this.el.style.right || "0") + "px", this.elPopup.style.bottom = parseInt(this.el.style.bottom || "0") + "px"), (n = this.el.parentElement) == null || n.insertBefore(this.elPopup, this.el), this.elPopup.classList.remove("template"), this.options.invertX && this.elPopup.classList.add("invert-x");
297
+ i.storage(this.elPopup, x.componentName, this), this.options.frontSelector && (this.elFront = document.querySelector(this.options.frontSelector)), this.elFront || (this.elFront = this.el.closest(".top-popup-front")), this.elFront || (this.elFront = document.body), this.elPopup instanceof HTMLElement && (this.elPopup.style.width = this.el.offsetWidth + "px", this.elPopup.style.height = this.el.offsetHeight + "px", this.elPopup.style.top = this.el.offsetTop + "px", this.elPopup.style.right = parseInt(this.el.style.right || "0") + "px", this.elPopup.style.bottom = parseInt(this.el.style.bottom || "0") + "px"), (r = this.el.parentElement) == null || r.insertBefore(this.elPopup, this.el), this.elPopup.classList.remove("template"), this.options.invertX && this.elPopup.classList.add("invert-x");
298
298
  let o = !!this.el.closest(".modal-header");
299
299
  o || (o = !!this.el.closest("#top_panel")), o || (o = !!this.el.closest("#secondmenu")), o && this.elPopup.classList.add("p-from-top"), setTimeout(() => {
300
- var r;
301
- return (r = this.elPopup) == null ? void 0 : r.classList.add("top-popup-wrapper-shown");
302
- }), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top = i.offset(this.el).top - this.el.offsetTop - i.offset(this.elFront).top, this.shift.left = i.offset(this.el).left - this.el.offsetLeft - i.offset(this.elFront).left, this.shift.top -= parseInt(this.el.style["margin-top"] || 0), this.shift.left -= parseInt(this.el.style["margin-left"] || 0), this.elPopup instanceof HTMLElement && (this.elPopup.style.top = parseInt(this.elPopup.style.top || "0") + this.shift.top + "px", this.elPopup.style.left = parseInt(this.elPopup.style.left || "0") + this.shift.left + "px")), this.$ && f.$ && this.$.trigger("aftershow.top-menu-popup", [f.$(this.elPopup)]), this.recalcPosition(), this.elPopup.setAttribute("tabindex", "0"), this.focus(), s.decoratorAfterOpen(this), this.mountEvents();
300
+ var n;
301
+ return (n = this.elPopup) == null ? void 0 : n.classList.add("top-popup-wrapper-shown");
302
+ }), this.elFront && !this.elFront.matches("body") && (this.elFront.append(this.elPopup), this.shift.top = i.offset(this.el).top - this.el.offsetTop - i.offset(this.elFront).top, this.shift.left = i.offset(this.el).left - this.el.offsetLeft - i.offset(this.elFront).left, this.shift.top -= parseInt(this.el.style["margin-top"] || 0), this.shift.left -= parseInt(this.el.style["margin-left"] || 0), this.elPopup instanceof HTMLElement && (this.elPopup.style.top = parseInt(this.elPopup.style.top || "0") + this.shift.top + "px", this.elPopup.style.left = parseInt(this.elPopup.style.left || "0") + this.shift.left + "px")), this.$ && f.$ && this.$.trigger("aftershow.top-menu-popup", [f.$(this.elPopup)]), this.recalcPosition(), this.elPopup.setAttribute("tabindex", "0"), this.focus(), l.decoratorAfterOpen(this), this.mountEvents();
303
303
  }
304
304
  async mountJQuery() {
305
305
  f.$ && (this.$ = f.$(this.el));
@@ -323,7 +323,7 @@ class v extends x {
323
323
  if (!this.elPopup || !(t.target instanceof Element) || !this.isFirstClick || (this.isFirstClick = !1, setTimeout(() => this.isFirstClick = !0), t instanceof MouseEvent && t.button !== 0))
324
324
  return;
325
325
  let p = i.querySelectorVisibleLast(document.body, ":scope > .top-popup-wrapper");
326
- p && p !== this.elPopup || t.target.closest(".top-popup-front") && (p = i.querySelectorVisibleLast(t.target.closest(".top-popup-front"), ":scope > .top-popup-wrapper"), p && p !== this.elPopup) || this.elPopup.contains(t.target) || this.elPopup.closest(".ui-dialog") && !t.target.closest(".ui-dialog") || s.decoratorIsIgnoreOuterClick(t) || s.close(this.elPopup);
326
+ p && p !== this.elPopup || t.target.closest(".top-popup-front") && (p = i.querySelectorVisibleLast(t.target.closest(".top-popup-front"), ":scope > .top-popup-wrapper"), p && p !== this.elPopup) || this.elPopup.contains(t.target) || this.elPopup.closest(".ui-dialog") && !t.target.closest(".ui-dialog") || l.decoratorIsIgnoreOuterClick(t) || l.close(this.elPopup);
327
327
  }
328
328
  /**
329
329
  * Закрыть другие Popup при фокусе на элемент формы в текущем
@@ -331,9 +331,9 @@ class v extends x {
331
331
  onFocus(t) {
332
332
  if (t.target instanceof Element && t.target.matches("input") || this.isClosed)
333
333
  return;
334
- s.getAllVisible().forEach((o) => {
335
- var e, n, r, a;
336
- (e = this.elPopup) != null && e.contains(o) || ((n = this.popupParent) == null ? void 0 : n.elPopup) === o || ((a = (r = this.popupParent) == null ? void 0 : r.popupParent) == null ? void 0 : a.elPopup) === o || s.close(o);
334
+ l.getAllVisible().forEach((o) => {
335
+ var e, r, n, c;
336
+ (e = this.elPopup) != null && e.contains(o) || ((r = this.popupParent) == null ? void 0 : r.elPopup) === o || ((c = (n = this.popupParent) == null ? void 0 : n.popupParent) == null ? void 0 : c.elPopup) === o || l.close(o);
337
337
  });
338
338
  }
339
339
  /**
@@ -341,7 +341,7 @@ class v extends x {
341
341
  */
342
342
  onMouseleave(t) {
343
343
  setTimeout(() => {
344
- this.elPopupInner && this.elPopupInner.matches(":hover") || !this.elPopup || s.close(this.elPopup);
344
+ this.elPopupInner && this.elPopupInner.matches(":hover") || !this.elPopup || l.close(this.elPopup);
345
345
  }, 100);
346
346
  }
347
347
  /**
@@ -357,7 +357,7 @@ class v extends x {
357
357
  }
358
358
  // контроль за положением Popup, чтобы оно не вылезало за пределы документа
359
359
  recalcPosition(t) {
360
- var P, b;
360
+ var y, _;
361
361
  if (!(this.elPopup instanceof HTMLElement)) return;
362
362
  let p = t ?? this.options.p, o;
363
363
  if (this.el instanceof HTMLElement)
@@ -373,20 +373,46 @@ class v extends x {
373
373
  this.addEventListenerWithUnmount(window, "resize", () => this.onResize()), this.onResize();
374
374
  break;
375
375
  default:
376
- (P = this.options.posBy) == null || P.append(this.elPopup);
376
+ (y = this.options.posBy) == null || y.append(this.elPopup);
377
377
  }
378
378
  const e = this.elPopup.getBoundingClientRect();
379
379
  this.elPopup.style.setProperty("--top-popup-height", this.elPopup.offsetHeight + "px"), this.elPopup.style.setProperty("--top-popup-right-bounding", e.right + "px"), this.elPopup.style.setProperty("--top-popup-bottom-bounding", e.bottom + "px"), this.elPopup.style.setProperty("--top-popup-top", e.top + "px"), this.elPopup.style.setProperty("--top-popup-left", e.left + "px"), this.elPopupInner instanceof HTMLElement && (this.elPopupInner.style.maxWidth = "unset", this.elPopupInner.style.maxHeight = "unset");
380
- let n = !1, r = !1, a = !1, c = !1, h = e.left > window.innerWidth / 2, d = e.top > window.innerHeight / 2;
381
- p === 4 && (h = !h), p === 1 && (d = !d);
382
- const l = (b = this.elPopupInner) == null ? void 0 : b.getBoundingClientRect();
383
- let u, m;
384
- if (l) {
385
- u = window.innerWidth - l.right, m = window.innerHeight - l.bottom;
386
- const g = 8;
387
- l.top < g && (n = !0), u < g && (r = !0), m < g && (a = !0), l.left < g && (c = !0);
388
- }
389
- n && (p === 0 || p === 1) && d && (p = 3), a && p === 3 && d && (p = 1), r && p === 2 && h && (p = 4), c && p === 4 && h && (p = 2), r && (p === 0 || p === 1 || p === 3) && this.elPopup.classList.add("invert-x"), a && (p === 2 || p === 4) && d && (p === 2 && !h && this.elPopup.classList.add("invert-y"), p === 4 && !h && this.elPopup.classList.add("invert-x"), this.elPopup.matches(".invert-y") || (p = 1)), this.elPopup.classList.remove("p0", "p1", "p2", "p3", "p4"), this.elPopup.classList.add("p" + p), this.elPopupInner instanceof HTMLElement && (this.elPopupInner.style.maxWidth = "", this.elPopupInner.style.maxHeight = ""), s.scrollToActive(this.elPopup);
380
+ const r = {
381
+ top: !1,
382
+ right: !1,
383
+ bottom: !1,
384
+ left: !1
385
+ }, n = {
386
+ top: !1,
387
+ right: !1,
388
+ bottom: !1,
389
+ left: !1
390
+ };
391
+ let c = e.left > window.innerWidth / 2, h = e.top > window.innerHeight / 2;
392
+ p === 4 && (c = !c), p === 1 && (h = !h);
393
+ const u = (_ = this.elPopupInner) == null ? void 0 : _.getBoundingClientRect();
394
+ let m, d;
395
+ const a = i.cssNumber(this.elPopup, "--top-popup-offset"), g = this.el.offsetHeight, L = this.el.offsetWidth;
396
+ u && (m = window.innerWidth - u.right, d = window.innerHeight - u.bottom, u.top < a && (r.top = !0, u.top < a * 2 - u.height + g && (n.top = !0)), m < a && (r.right = !0, m < a * 2 - u.width + L && (n.right = !0)), d < a && (r.bottom = !0, d < a * 2 - u.height + g && (n.bottom = !0)), u.left < a && (r.left = !0, u.left < a * 2 - u.width + g && (n.left = !0)));
397
+ const E = (v, s) => {
398
+ if (v === "x") {
399
+ if (!r.right && !r.left || (s === 1 || s === 3) && !n.right && !n.left && c)
400
+ return s;
401
+ r.right && (s === 0 || s === 2) && c && (s = 4), r.left && (s === 0 || s === 4) && c && (s = 2);
402
+ }
403
+ if (v === "y") {
404
+ if (!r.top && !r.bottom || (s === 2 || s === 4) && !n.top && !n.bottom && h)
405
+ return s;
406
+ r.top && (s === 0 || s === 1) && h && (s = 3), r.bottom && h && (s = 1);
407
+ }
408
+ return s;
409
+ };
410
+ let w = ["x", "y"];
411
+ (p === 0 || p === 1 || p === 3) && (w = ["y", "x"]);
412
+ let b = p ?? 0;
413
+ w.forEach((v) => {
414
+ b = E(v, b);
415
+ }), p = b, r.bottom && (p === 2 || p === 4) && h && this.elPopup.classList.add("invert-y"), r.right && (p === 0 || p === 1 || p === 3) && this.elPopup.classList.add("invert-x"), this.elPopup.classList.remove("p0", "p1", "p2", "p3", "p4"), this.elPopup.classList.add("p" + p), this.elPopupInner instanceof HTMLElement && (this.elPopupInner.style.maxWidth = "", this.elPopupInner.style.maxHeight = ""), l.scrollToActive(this.elPopup);
390
416
  }
391
417
  onTouchmove(t) {
392
418
  var p, o, e;
@@ -398,12 +424,12 @@ class v extends x {
398
424
  }
399
425
  close() {
400
426
  var t;
401
- this.isClosed || (this.isClosed = !0, this.$ && f.$ && this.elPopup && this.$.trigger("afterclose.top-menu-popup", [f.$(this.elPopup)]), !s.noClose && (this.unmount(), (t = this.elPopup) == null || t.classList.add("top-popup-wrapper-closed"), setTimeout(() => {
402
- var e, n, r, a, c;
427
+ this.isClosed || (this.isClosed = !0, this.$ && f.$ && this.elPopup && this.$.trigger("afterclose.top-menu-popup", [f.$(this.elPopup)]), !l.noClose && (this.unmount(), (t = this.elPopup) == null || t.classList.add("top-popup-wrapper-closed"), setTimeout(() => {
428
+ var e, r, n, c, h;
403
429
  if (this.vueClose(), !this.elPopup) return;
404
- this.options.useOriginal ? (this.elPopup.removeAttribute("style"), this.elPopup.classList.remove("top-popup-wrapper-shown", "top-popup-wrapper-closed"), this.elPopup.classList.add("template"), (e = this.elStartPosition) == null || e.append(this.elPopup), (n = this.elPopup.querySelector("div.top-popup_content.top-column")) == null || n.classList.remove("top-column"), (r = this.elPopup.querySelector(".notch-border")) == null || r.remove(), (a = this.elPopup.querySelector(".notch")) == null || a.remove(), (c = this.elPopupInner) == null || c.replaceWith(...this.elPopupInner.childNodes), i.storageClear(this.elPopup)) : (i.storageClear(this.elPopup), this.elPopup.remove(), delete this.elPopup);
405
- const p = s.getAllVisible(), o = p.length && p[p.length - 1];
406
- o ? s.getPopup(o).focus() : document.documentElement.classList.remove("with_popup");
430
+ this.options.useOriginal ? (this.elPopup.removeAttribute("style"), this.elPopup.classList.remove("top-popup-wrapper-shown", "top-popup-wrapper-closed"), this.elPopup.classList.add("template"), (e = this.elStartPosition) == null || e.append(this.elPopup), (r = this.elPopup.querySelector("div.top-popup_content.top-column")) == null || r.classList.remove("top-column"), (n = this.elPopup.querySelector(".notch-border")) == null || n.remove(), (c = this.elPopup.querySelector(".notch")) == null || c.remove(), (h = this.elPopupInner) == null || h.replaceWith(...this.elPopupInner.childNodes), i.storageClear(this.elPopup)) : (i.storageClear(this.elPopup), this.elPopup.remove(), delete this.elPopup);
431
+ const p = l.getAllVisible(), o = p.length && p[p.length - 1];
432
+ o ? l.getPopup(o).focus() : document.documentElement.classList.remove("with_popup");
407
433
  }, this.options.transitionDuration)));
408
434
  }
409
435
  async vueOpen() {
@@ -416,11 +442,11 @@ class v extends x {
416
442
  }
417
443
  // получить vueConnectors компонента Popup
418
444
  vueGetComponent() {
419
- if (this.el instanceof HTMLElement && this.options.id) return s.vueConnectors.get(this.options.id);
445
+ if (this.el instanceof HTMLElement && this.options.id) return l.vueConnectors.get(this.options.id);
420
446
  }
421
447
  }
422
- y.init();
448
+ I.init();
423
449
  export {
424
- v as TopLibPopup
450
+ x as TopLibPopup
425
451
  };
426
- //# sourceMappingURL=popup-Cl0Rac26.es.js.map
452
+ //# sourceMappingURL=popup-BjsK_pMZ.es.js.map