@topvisor/ui 1.0.32 → 1.0.34

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 (86) hide show
  1. package/.chunks/{core-BOmJlsQh.amd.js → core-BHvOvH4M.amd.js} +2 -2
  2. package/.chunks/{core-BOmJlsQh.amd.js.map → core-BHvOvH4M.amd.js.map} +1 -1
  3. package/.chunks/{core-BM1cjH9-.es.js → core-CUNwUlL6.es.js} +4 -4
  4. package/.chunks/{core-BM1cjH9-.es.js.map → core-CUNwUlL6.es.js.map} +1 -1
  5. package/.chunks/{datepicker-B1J_phPN.amd.js → datepicker-C0a_eKze.amd.js} +2 -2
  6. package/.chunks/{datepicker-B1J_phPN.amd.js.map → datepicker-C0a_eKze.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-BJR_Fx8w.es.js → datepicker-CW2Ql1NG.es.js} +2 -2
  8. package/.chunks/{datepicker-BJR_Fx8w.es.js.map → datepicker-CW2Ql1NG.es.js.map} +1 -1
  9. package/.chunks/{dialog_selectorRegions-D1M6kSFL.amd.js → dialog_selectorRegions-Bhblg2Ks.amd.js} +2 -2
  10. package/.chunks/{dialog_selectorRegions-D1M6kSFL.amd.js.map → dialog_selectorRegions-Bhblg2Ks.amd.js.map} +1 -1
  11. package/.chunks/{dialog_selectorRegions-c7-xcsto.es.js → dialog_selectorRegions-Bkw1LXvI.es.js} +4 -4
  12. package/.chunks/{dialog_selectorRegions-c7-xcsto.es.js.map → dialog_selectorRegions-Bkw1LXvI.es.js.map} +1 -1
  13. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-B68tDOIP.amd.js → dialogs.vue_vue_type_script_setup_true_lang-CXtBj2Ah.amd.js} +2 -2
  14. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-B68tDOIP.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-CXtBj2Ah.amd.js.map} +1 -1
  15. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BFXZoJrj.es.js → dialogs.vue_vue_type_script_setup_true_lang-JyillkBh.es.js} +2 -2
  16. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BFXZoJrj.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-JyillkBh.es.js.map} +1 -1
  17. package/.chunks/{forms-C9txDxCB.amd.js → forms-CKYHAaPQ.amd.js} +3 -3
  18. package/.chunks/{forms-C9txDxCB.amd.js.map → forms-CKYHAaPQ.amd.js.map} +1 -1
  19. package/.chunks/{forms-T8ev76fm.es.js → forms-zDpk9gMK.es.js} +5 -5
  20. package/.chunks/{forms-T8ev76fm.es.js.map → forms-zDpk9gMK.es.js.map} +1 -1
  21. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-D3UiEWg-.amd.js → listItem.vue_vue_type_script_setup_true_lang-C_ZN2Nia.amd.js} +2 -2
  22. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-D3UiEWg-.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-C_ZN2Nia.amd.js.map} +1 -1
  23. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BnkPoCHf.es.js → listItem.vue_vue_type_script_setup_true_lang-Di1h6iID.es.js} +2 -2
  24. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BnkPoCHf.es.js.map → listItem.vue_vue_type_script_setup_true_lang-Di1h6iID.es.js.map} +1 -1
  25. package/.chunks/{menu.vue_vue_type_style_index_0_lang-D5I0ZtFp.es.js → menu.vue_vue_type_style_index_0_lang-B5fkWPo5.es.js} +2 -2
  26. package/.chunks/{menu.vue_vue_type_style_index_0_lang-D5I0ZtFp.es.js.map → menu.vue_vue_type_style_index_0_lang-B5fkWPo5.es.js.map} +1 -1
  27. package/.chunks/{menu.vue_vue_type_style_index_0_lang-CJhNCxSc.amd.js → menu.vue_vue_type_style_index_0_lang-vyCH9NUZ.amd.js} +2 -2
  28. package/.chunks/{menu.vue_vue_type_style_index_0_lang-CJhNCxSc.amd.js.map → menu.vue_vue_type_style_index_0_lang-vyCH9NUZ.amd.js.map} +1 -1
  29. package/.chunks/{notice-C4XVMB2L.es.js → notice-B8hUtbou.es.js} +2 -2
  30. package/.chunks/{notice-C4XVMB2L.es.js.map → notice-B8hUtbou.es.js.map} +1 -1
  31. package/.chunks/{notice-BzDSYDaS.amd.js → notice-CyeaHgdt.amd.js} +2 -2
  32. package/.chunks/{notice-BzDSYDaS.amd.js.map → notice-CyeaHgdt.amd.js.map} +1 -1
  33. package/.chunks/{page.vue_vue_type_script_setup_true_lang-vudnSBO5.es.js → page.vue_vue_type_script_setup_true_lang-C8oRGxFZ.es.js} +4 -4
  34. package/.chunks/{page.vue_vue_type_script_setup_true_lang-vudnSBO5.es.js.map → page.vue_vue_type_script_setup_true_lang-C8oRGxFZ.es.js.map} +1 -1
  35. package/.chunks/{page.vue_vue_type_script_setup_true_lang-CRYy99_V.amd.js → page.vue_vue_type_script_setup_true_lang-DmbqzLa6.amd.js} +2 -2
  36. package/.chunks/{page.vue_vue_type_script_setup_true_lang-CRYy99_V.amd.js.map → page.vue_vue_type_script_setup_true_lang-DmbqzLa6.amd.js.map} +1 -1
  37. package/.chunks/{popup-CMyspAlX.es.js → popup-BaFsC2VD.es.js} +3 -3
  38. package/.chunks/{popup-CMyspAlX.es.js.map → popup-BaFsC2VD.es.js.map} +1 -1
  39. package/.chunks/popup-DR6JnpNV.amd.js +2 -0
  40. package/.chunks/{popup-ClgV8wY0.amd.js.map → popup-DR6JnpNV.amd.js.map} +1 -1
  41. package/.chunks/{utils-BzUcKFH3.amd.js → utils-BO3j538g.amd.js} +2 -2
  42. package/.chunks/{utils-BzUcKFH3.amd.js.map → utils-BO3j538g.amd.js.map} +1 -1
  43. package/.chunks/{utils-h__3Q6cC.es.js → utils-BPcGxQ0s.es.js} +2 -2
  44. package/.chunks/{utils-h__3Q6cC.es.js.map → utils-BPcGxQ0s.es.js.map} +1 -1
  45. package/.chunks/{utils-uXq23KaQ.amd.js → utils-BPyrKdwc.amd.js} +2 -2
  46. package/.chunks/{utils-uXq23KaQ.amd.js.map → utils-BPyrKdwc.amd.js.map} +1 -1
  47. package/.chunks/{utils-DrJrj48C.es.js → utils-CKggUvLI.es.js} +3 -3
  48. package/.chunks/{utils-DrJrj48C.es.js.map → utils-CKggUvLI.es.js.map} +1 -1
  49. package/charts/charts.amd.js +1 -1
  50. package/charts/charts.js +1 -1
  51. package/core/app.amd.js +1 -1
  52. package/core/app.js +5 -5
  53. package/dialog/dialog.amd.js +1 -1
  54. package/dialog/dialog.js +2 -2
  55. package/forms/forms.amd.js +1 -1
  56. package/forms/forms.js +1 -1
  57. package/formsExt/formsExt.amd.js +1 -1
  58. package/formsExt/formsExt.amd.js.map +1 -1
  59. package/formsExt/formsExt.js +28 -28
  60. package/formsExt/formsExt.js.map +1 -1
  61. package/layout/layout.amd.js +1 -1
  62. package/layout/layout.js +1 -1
  63. package/package.json +1 -1
  64. package/popup/popup.amd.js +1 -1
  65. package/popup/popup.js +2 -2
  66. package/popup/worker.amd.js +1 -1
  67. package/popup/worker.js +2 -2
  68. package/project/project.amd.js +1 -1
  69. package/project/project.js +5 -5
  70. package/tabsView/tabsView.amd.js +1 -1
  71. package/tabsView/tabsView.js +1 -1
  72. package/utils/clipboard.amd.js +1 -1
  73. package/utils/clipboard.js +1 -1
  74. package/utils/date.amd.js +1 -1
  75. package/utils/date.js +1 -1
  76. package/utils/device.amd.js +1 -1
  77. package/utils/device.js +1 -1
  78. package/utils/lodash.amd.js +1 -1
  79. package/utils/lodash.js +1 -1
  80. package/utils/price.amd.js +1 -1
  81. package/utils/price.js +1 -1
  82. package/utils/searchers.amd.js +1 -1
  83. package/utils/searchers.js +3 -3
  84. package/utils/string.amd.js +1 -1
  85. package/utils/string.js +1 -1
  86. package/.chunks/popup-ClgV8wY0.amd.js +0 -2
package/popup/popup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Core as g } from "../core/app.js";
2
- import { _ as y, a as O, b as D } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BnkPoCHf.es.js";
2
+ import { _ as y, a as O, b as D } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Di1h6iID.es.js";
3
3
  import { defineComponent as b, mergeModels as I, useModel as M, createBlock as B, openBlock as V, mergeProps as S, createSlots as k, withCtx as n, renderSlot as l, createVNode as c, createTextVNode as C, toDisplayString as T, ref as L, watch as w } from "vue";
4
- import { f as H, _ as v } from "../.chunks/forms-T8ev76fm.es.js";
4
+ import { f as H, _ as v } from "../.chunks/forms-zDpk9gMK.es.js";
5
5
  const W = ["../assets/popup.css"].map((a) => import.meta.resolve(a));
6
6
  g.insertCSSLinkToPage(W, !0);
7
7
  const P = /* @__PURE__ */ b({
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd","../utils/dom.amd"],function(require,exports,forms,utils_dom){"use strict";if(typeof vue>"u")var vue=window.Vue;class Worker{static noClose=!1;static vueConnectors=new Map;static options={};static getPopup(t){return utils_dom.default.storage(t,"TopPopup")}static getAll(){return utils_dom.default.querySelectorAllArray(document,".top-popup-wrapper")}static getAllVisible(){return utils_dom.default.querySelectorAllVisible(document,".top-popup-wrapper")}static async openByOpener(t){if(!(t instanceof HTMLElement))return;const o={};return o.popup=t.dataset.topPopup,o.id=t.dataset.topPopupId,t.dataset.topPopupP&&(o.p=parseInt(t.dataset.topPopupP)),t.dataset.topPopupPos&&(o.p=parseInt(t.dataset.topPopupPos)),t.dataset.topPopupNotch&&(o.notch=t.dataset.topPopupNotch==="true"||t.dataset.topPopupNotch==="1"),t.dataset.topPopupClass&&(o.class=t.dataset.topPopupClass),t.dataset.topPopupPosBy&&(o.posBy=t.dataset.topPopupPosBy),t.dataset.topPopupFront&&(o.frontSelector=t.dataset.topPopupFront),t.dataset.topPopupInvertX&&(o.invertX=t.dataset.topPopupInvertX==="true"||t.dataset.topPopupInvertX==="1"),t.dataset.topPopupOpenByHover&&(o.openByHover=t.dataset.topPopupOpenByHover==="true"||t.dataset.topPopupOpenByHover==="1"),t.dataset.topPopupUseOriginal&&(o.useOriginal=t.dataset.topPopupUseOriginal==="true"||t.dataset.topPopupUseOriginal==="1"),await Worker.open(t,o)}static async open(elOpener,options){elOpener instanceof HTMLElement&&(elOpener.dataset.topPopupOpened="opened");const{TopLibPopup}=await new Promise((t,o)=>require(["../.chunks/popup-ClgV8wY0.amd"],t,o));if(forms.Core.$){const $elOpener=forms.Core.$(elOpener);if($elOpener.data("aftershow")){let afterShow=$elOpener.data("aftershow");typeof afterShow=="string"&&(afterShow=eval(afterShow.replace(/\W/g,""))),$elOpener.one("aftershow.top-menu-popup",afterShow)}if($elOpener.data("afterclose")){let afterclose=$elOpener.data("afterclose");typeof afterclose=="string"&&(afterclose=eval(afterclose.replace(/\W/g,""))),$elOpener.one("afterclose.top-menu-popup",afterclose)}}return options.isFullScreen=forms.Core.state.isMobile,new TopLibPopup(elOpener,options)}static close(t){const o=Worker.getPopup(t);o&&o.close()}static recalcPosition(t){const o=Worker.getPopup(t);o&&o.elPopupBody instanceof HTMLElement&&o.recalcPosition()}static scrollToActive(t){if(!utils_dom.default.querySelectorVisible(t,"ul.top-popup_content > li > .top-active"))return;const s=t.querySelector("ul.top-popup_content"),a=utils_dom.default.querySelectorAllVisible(t,"ul.top-popup_content > li");t.classList.add("top-popup-wrapper-no_animate"),setTimeout(()=>t.classList.remove("top-popup-wrapper-no_animate"),100);let p=100;for(const e of a){if(e.querySelector(":scope > .top-active"))break;e instanceof HTMLElement&&(p+=e.offsetHeight)}if(s instanceof HTMLElement){const e=s.offsetHeight;p>e?s.scrollTop=p-e:s.scrollTop=0}}static decoratorBeforeOpen(t){this.options.decoratorBeforeOpen&&this.options.decoratorBeforeOpen(t)}static decoratorAfterOpen(t){this.options.decoratorAfterOpen&&this.options.decoratorAfterOpen(t)}static decoratorIsIgnoreOuterClick(t){return this.options.decoratorIsIgnoreOuterClick?this.options.decoratorIsIgnoreOuterClick(t):!1}static regVueComponent(t,o){if(Worker.vueConnectors.get(t))throw"Vue component Popup use duplicated id: "+t;Worker.vueConnectors.set(t,o)}static unregVueComponent(t){Worker.vueConnectors.delete(t)}static genElPopupOpener(t,o,...s){const a=utils_dom.default.genEl(t,{},...s);a.dataset.topPopup="#"+o.id;for(let p in o){const e="topPopup"+p.charAt(0).toUpperCase()+p.slice(1);a.dataset[e]=o[p]}return a}}exports.TopPopupWorker=Worker,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd","../utils/dom.amd"],function(require,exports,forms,utils_dom){"use strict";if(typeof vue>"u")var vue=window.Vue;class Worker{static noClose=!1;static vueConnectors=new Map;static options={};static getPopup(t){return utils_dom.default.storage(t,"TopPopup")}static getAll(){return utils_dom.default.querySelectorAllArray(document,".top-popup-wrapper")}static getAllVisible(){return utils_dom.default.querySelectorAllVisible(document,".top-popup-wrapper")}static async openByOpener(t){if(!(t instanceof HTMLElement))return;const o={};return o.popup=t.dataset.topPopup,o.id=t.dataset.topPopupId,t.dataset.topPopupP&&(o.p=parseInt(t.dataset.topPopupP)),t.dataset.topPopupPos&&(o.p=parseInt(t.dataset.topPopupPos)),t.dataset.topPopupNotch&&(o.notch=t.dataset.topPopupNotch==="true"||t.dataset.topPopupNotch==="1"),t.dataset.topPopupClass&&(o.class=t.dataset.topPopupClass),t.dataset.topPopupPosBy&&(o.posBy=t.dataset.topPopupPosBy),t.dataset.topPopupFront&&(o.frontSelector=t.dataset.topPopupFront),t.dataset.topPopupInvertX&&(o.invertX=t.dataset.topPopupInvertX==="true"||t.dataset.topPopupInvertX==="1"),t.dataset.topPopupOpenByHover&&(o.openByHover=t.dataset.topPopupOpenByHover==="true"||t.dataset.topPopupOpenByHover==="1"),t.dataset.topPopupUseOriginal&&(o.useOriginal=t.dataset.topPopupUseOriginal==="true"||t.dataset.topPopupUseOriginal==="1"),await Worker.open(t,o)}static async open(elOpener,options){elOpener instanceof HTMLElement&&(elOpener.dataset.topPopupOpened="opened");const{TopLibPopup}=await new Promise((t,o)=>require(["../.chunks/popup-DR6JnpNV.amd"],t,o));if(forms.Core.$){const $elOpener=forms.Core.$(elOpener);if($elOpener.data("aftershow")){let afterShow=$elOpener.data("aftershow");typeof afterShow=="string"&&(afterShow=eval(afterShow.replace(/\W/g,""))),$elOpener.one("aftershow.top-menu-popup",afterShow)}if($elOpener.data("afterclose")){let afterclose=$elOpener.data("afterclose");typeof afterclose=="string"&&(afterclose=eval(afterclose.replace(/\W/g,""))),$elOpener.one("afterclose.top-menu-popup",afterclose)}}return options.isFullScreen=forms.Core.state.isMobile,new TopLibPopup(elOpener,options)}static close(t){const o=Worker.getPopup(t);o&&o.close()}static recalcPosition(t){const o=Worker.getPopup(t);o&&o.elPopupBody instanceof HTMLElement&&o.recalcPosition()}static scrollToActive(t){if(!utils_dom.default.querySelectorVisible(t,"ul.top-popup_content > li > .top-active"))return;const s=t.querySelector("ul.top-popup_content"),a=utils_dom.default.querySelectorAllVisible(t,"ul.top-popup_content > li");t.classList.add("top-popup-wrapper-no_animate"),setTimeout(()=>t.classList.remove("top-popup-wrapper-no_animate"),100);let p=100;for(const e of a){if(e.querySelector(":scope > .top-active"))break;e instanceof HTMLElement&&(p+=e.offsetHeight)}if(s instanceof HTMLElement){const e=s.offsetHeight;p>e?s.scrollTop=p-e:s.scrollTop=0}}static decoratorBeforeOpen(t){this.options.decoratorBeforeOpen&&this.options.decoratorBeforeOpen(t)}static decoratorAfterOpen(t){this.options.decoratorAfterOpen&&this.options.decoratorAfterOpen(t)}static decoratorIsIgnoreOuterClick(t){return this.options.decoratorIsIgnoreOuterClick?this.options.decoratorIsIgnoreOuterClick(t):!1}static regVueComponent(t,o){if(Worker.vueConnectors.get(t))throw"Vue component Popup use duplicated id: "+t;Worker.vueConnectors.set(t,o)}static unregVueComponent(t){Worker.vueConnectors.delete(t)}static genElPopupOpener(t,o,...s){const a=utils_dom.default.genEl(t,{},...s);a.dataset.topPopup="#"+o.id;for(let p in o){const e="topPopup"+p.charAt(0).toUpperCase()+p.slice(1);a.dataset[e]=o[p]}return a}}exports.TopPopupWorker=Worker,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=worker.amd.js.map
package/popup/worker.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Core } from "../.chunks/forms-T8ev76fm.es.js";
1
+ import { C as Core } from "../.chunks/forms-zDpk9gMK.es.js";
2
2
  import DOM from "../utils/dom.js";
3
3
  class Worker {
4
4
  /**
@@ -44,7 +44,7 @@ class Worker {
44
44
  */
45
45
  static async open(elOpener, options) {
46
46
  elOpener instanceof HTMLElement && (elOpener.dataset.topPopupOpened = "opened");
47
- const { TopLibPopup } = await import("../.chunks/popup-CMyspAlX.es.js");
47
+ const { TopLibPopup } = await import("../.chunks/popup-BaFsC2VD.es.js");
48
48
  if (Core.$) {
49
49
  const $elOpener = Core.$(elOpener);
50
50
  if ($elOpener.data("aftershow")) {
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","../.chunks/forms-C9txDxCB.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-D3UiEWg-.amd","../.chunks/menu.vue_vue_type_style_index_0_lang-CJhNCxSc.amd","../.chunks/utils-uXq23KaQ.amd","../utils/searchers.amd","../utils/dom.amd","../popup/worker.amd","../require/css.amd!../assets/project.css"],function(ne,T,e,x,E,oe,le,P,_,ae){"use strict";if(typeof e>"u")var e=window.Vue;const re={class:"top-selectorCompetitors"},ie={class:"top-ellipsis1"},de=e.defineComponent({__name:"selectorCompetitors",props:e.mergeModels({modelValue:{},items:{},showSelectAllItem:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=e.computed(()=>{if(l.showSelectAllItem)return{icon:"",title:x.useI18n().Common.Select_all,value:"all",content:""}});return(d,o)=>(e.openBlock(),e.createElementBlock("div",re,[e.unref(x.Core).state.isMobile?(e.openBlock(),e.createBlock(E._sfc_main,{key:0},{opener:e.withCtx(()=>[e.createVNode(x._sfc_main,{class:"top-selectorCompetitors_opener",color:"theme",icon:"",icon2:""},{default:e.withCtx(()=>{var a;return[e.createTextVNode(e.toDisplayString((a=d.items.find(s=>{var v;return s.value===((v=r.value)==null?void 0:v[0])}))==null?void 0:a.content),1)]}),_:1})]),contentList:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,a=>{var s;return e.openBlock(),e.createBlock(E._sfc_main$1,{class:e.normalizeClass({"top-active":(s=r.value)==null?void 0:s.includes(a.value)}),"data-top-icon":a.icon,title:a.title,onClick:()=>r.value=[a.value]},{default:e.withCtx(()=>[e.createElementVNode("span",ie,e.toDisplayString(a.content),1)]),_:2},1032,["class","data-top-icon","title","onClick"])}),256))]),_:1})):(e.openBlock(),e.createBlock(oe._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),items:d.items,isMultiple:!0,styling:"bar",canBeEmptyMultiple:!1,selectAllItem:t.value},null,8,["modelValue","items","selectAllItem"]))]))}}),w=-1,y=-2,L=-1,ue={0:"Yandex",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GoogleStore",20:"Yandex.com",21:"Yandex.com.tr"},J={key:y,name:"--",index:y},G={key:y,name:"--",regions:[J],regionByIndex:new Map([[y,J]])},A={key:y,name:"Autoselect",index:y},U={key:y,name:"Autoselect",regions:[A],regionByIndex:new Map([[y,A]])},Y={countryCode:"00",depth:1,device:0,key:L,index:L,lang:"ru",name:"Without region"},se=()=>(A.name=x.useI18n().Common.Autoselect,A),ce=()=>(se(),U.name=x.useI18n().Common.Autoselect,console.log(U),U),ge=()=>(Y.name=x.useI18n().Keywords.Without_region,Y),z=(n=!1,l=!1,r=[])=>{let t;return n?t=me(r):t=W(r),l&&t.set(y,ce()),t.size||t.set(y,G),t},W=(n,l=!0,r=[],t=!1)=>{const d=new Map;return n.forEach(o=>{if(!o.enabled||t&&typeof o.key=="number"&&o.key>1)return;const a={...o};a.regionByIndex=new Map,o.regions&&o.regions.forEach(s=>{if(l&&!s.enabled)return;const v={...s};a.regionByIndex.set(v.index,v)}),!a.regionByIndex.size&&r.length,(!o.regions||a.regionByIndex.size||r.length)&&typeof a.key=="number"&&d.set(a.key,a)}),r.forEach(o=>{if(d.has(o))return;const a={key:o,name:ue[o],regions:[],regionByIndex:new Map};d.set(a.key,a)}),d},me=n=>{const l=W(n,!1,[0,1],!0);if(l.has(2)){const r=l.get(2);r&&(r.regionByIndex=new Map)}return l.forEach(r=>{if(!r.regionByIndex)return;const t={...ge()};r.regionByIndex.set(t.index,t)}),l},H=(n,l,r=[])=>{const t=z(n,!1,r);let d;return t.forEach(o=>{if(!(l.searcher_key!==void 0&&l.searcher_key!=o.key)&&o.regions&&(o.regions.forEach(a=>{if(!d&&!(l.key!==void 0&&l.key!=a.key)&&!(l.index!==void 0&&l.index!=a.index)&&!(!n&&(l.lang!==void 0&&l.lang!=a.lang||l.device!==void 0&&l.device!=a.device)))return a.searcher_key=o.key,d=a,!1}),d))return!1}),d},Q=le.useAsyncTopDialog(()=>new Promise((n,l)=>ne(["../.chunks/dialog_selectorRegions-D1M6kSFL.amd"],n,l))),fe=(n,l)=>{const r=x.useI18n(),t=e.ref(l.value.keys().next().value??y),d=e.computed(()=>{const o=new Map;if(l.value.forEach(a=>{let s={value:a.key,title:a.name};n.addSearcherIcon&&(s.icon=P.getSearcherGIcon(a.key)),o.set(a.key,s)}),n.addCompare&&!o.has(y)){const a={value:"",title:"--------------------",disabled:!0};o.set(a.value,a);const s={value:w,title:r.Common.Compare};o.set(s.value,s)}return o});return{searcherKey:t,optionBySearcherKey:d}},ve=(n,l)=>{var o,a,s;const r=x.useI18n(),t=e.ref(y);n.modelValue.length===1&&(t.value=n.modelValue[0]),t.value===y&&(n.forFrequency?t.value=((a=(o=l.value)==null?void 0:o.regionByIndex.values().next().value)==null?void 0:a.key)??y:t.value=((s=l.value)==null?void 0:s.regionByIndex.keys().next().value)??y);const d=e.computed(()=>{var h;const v=new Map;return(h=l.value.regionByIndex)==null||h.forEach(S=>{let i=S.name;if(n.forFrequency){const I={value:S.key,title:i};v.has(S.key)||v.set(S.key,I);return}S.device&&(i+=" ("+r.Common["Device_"+S.device]+")");const m=P.getLangLabel(l.value.key||0,S.lang??"");m&&(i+=" / "+m);const c={value:S.index,title:i,icon:S.device?P.getDeviceGIcon(S.device):void 0};v.set(S.index,c)}),v});return e.watch(d,(v,h)=>{var c;if(n.onlySearcher||t.value!==void 0&&v.get(t.value))return;let S=v.keys().next().value;if(t.value===y||S===y){t.value=S;return}let i=((c=h==null?void 0:h.get(t.value))==null?void 0:c.title)||"",m=-1;for(const[I,B]of v.entries()){const C=B.title;if(typeof C!="string"||typeof I=="string")break;if(C===i){S=I;break}const V=new RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`);let f=i,u=3;C.indexOf(f)===-1&&(f=i.replace(/^[^a-zа-я]/i,"").replace(V,""),u--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),u--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),f=f.replace(/^[^a-zа-я]/i,"").replace(V,""),u--),C.indexOf(f)!==-1&&(u<=m||(m=u,S=I))}t.value=S}),{regionIndex:t,optionByRegionIndex:d}},pe=(n,l,r)=>{const t=e.ref([]),d=()=>{if(n.onlySearcher&&l.value){t.value=Array.from(l.value.keys());return}let a=[];if(n.modelValue.length>1)a=[...n.modelValue];else try{a=JSON.parse(localStorage.getItem("ui:project:regionSelector"+n.projectId+":regionsIndexes"))??[]}catch{}a.length&&(a=a.filter(s=>r.value.has(s))),a.length||(a=Array.from(r.value)),t.value=[...a]},o=()=>{t.value.length?localStorage.setItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes",JSON.stringify(t.value)):localStorage.removeItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes")};return e.watch(t,()=>{o()}),n.addCompare&&d(),{regionsIndexes:t}},ye=n=>{const l=e.computed(()=>z(n.forFrequency,n.autoRegion,n.searchers)),r=e.computed(()=>l.value.get(d.searcherKey.value)||G),t=e.computed(()=>{const i=new Set;return l.value.forEach(m=>{m.regionByIndex.forEach(c=>{c.index!==L&&c.index!==y&&i.add(c.index)})}),i}),d=fe(n,l),o=ve(n,r),a=pe(n,l,t);e.watch(l,()=>{var m,c,I,B;if(n.onlySearcher?a.regionsIndexes.value=Array.from(l.value.keys()):a.regionsIndexes.value=a.regionsIndexes.value.filter(C=>t.value.has(C)),d.searcherKey.value===w)return;let i=l.value.keys().next().value;l.value.forEach(C=>{var V,f,u;if(n.onlySearcher&&C.key===d.searcherKey.value){i=d.searcherKey.value;return}if(o.regionIndex.value&&((V=C.regionByIndex)!=null&&V.has(o.regionIndex.value))&&(i=C.key),!n.onlySearcher){let g;i!==void 0&&(g=(f=l.value.get(i))==null?void 0:f.regionByIndex);const p=(u=l.value.get(C.key))==null?void 0:u.regionByIndex;g!=null&&g.has(y)&&!(p!=null&&p.has(y))&&(i=C.key)}}),i!==void 0&&(d.searcherKey.value=i),o.regionIndex.value!==void 0&&!((c=(m=r.value)==null?void 0:m.regionByIndex)!=null&&c.has(o.regionIndex.value))&&(o.regionIndex.value=(B=(I=r.value)==null?void 0:I.regions)==null?void 0:B.keys().next().value)},{immediate:!0});const s=()=>{if(!(d.searcherKey.value===w||d.searcherKey.value===y))return d.searcherKey.value},v=()=>{if(n.onlySearcher||o.regionIndex.value===y)return;let i=o.regionIndex.value;if(n.forFrequency){const m=o.regionIndex.value,c=H(n.forFrequency,{searcher_key:s(),key:m},n.searchers);i=c==null?void 0:c.index}return i},h=()=>{const i=s();if(i!==void 0)return l.value.get(i)};return{selectSearcher:d,selectRegion:o,compare:a,searcherByKey:l,allRegionsIndexes:t,getSearcher:h,getRegion:()=>{var m,c;const i=v();if(i!==void 0)return(c=(m=h())==null?void 0:m.regionByIndex)==null?void 0:c.get(i)}}},he=e.defineComponent({__name:"selectorRegion",props:e.mergeModels({projectId:{},searchers:{default:()=>[]},modelValue:{},modelValueSingle:{},addCompare:{type:Boolean},forFrequency:{type:Boolean},autoRegion:{type:Boolean},onlySearcher:{type:Boolean},addChanger:{type:Boolean,default:!0},addSearcherIcon:{type:Boolean,default:!0},addRegionIcon:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{},modelValueSingle:{},modelValueSingleModifiers:{}}),emits:["update:modelValue","update:modelValueSingle"],setup(n,{expose:l}){const r=n,t=e.useModel(n,"modelValue"),d=e.useModel(n,"modelValueSingle"),{selectSearcher:o,selectRegion:a,compare:s,searcherByKey:v,allRegionsIndexes:h,getSearcher:S,getRegion:i}=ye(r),m=()=>{const c=[];v.value.forEach(I=>{I.enabled&&I.regions.forEach(B=>{B.enabled&&c.push(B)})}),Q.open("selectorRegions",{regions:c,regionsIndexes:s.regionsIndexes.value,"@update:regionsIndexes":I=>s.regionsIndexes.value=I})};return e.watch([a.regionIndex,o.searcherKey,s.regionsIndexes],()=>{if(o.searcherKey.value===w&&s.regionsIndexes.value.length){if(JSON.stringify(t.value)===JSON.stringify(s.regionsIndexes.value))return;t.value=[...s.regionsIndexes.value]}else r.onlySearcher?(t.value=[o.searcherKey.value],o.searcherKey.value===y&&!r.autoRegion&&(t.value.length=0)):(t.value=[a.regionIndex.value],a.regionIndex.value===y&&!r.autoRegion&&(t.value.length=0));!r.onlySearcher&&!h.value.size&&(o.searcherKey.value=y)}),d.value&&e.watch(d,()=>{d.value&&(t.value=[d.value])},{immediate:!0}),e.watch(t,()=>{var c,I,B,C,V;if(t.value[0]&&(d.value=t.value[0]),r.onlySearcher){if(!t.value.length||t.value.length===1&&!v.value.has(t.value[0])||t.value.length===1&&t.value[0]===y&&!r.autoRegion){let f=v.value.keys().next().value;f===y&&!r.autoRegion&&(f=void 0,d.value=y),f!==void 0?t.value=[f]:t.value.length=0;return}if(t.value.length>1&&JSON.stringify(t.value)!==JSON.stringify(s.regionsIndexes.value)){t.value=[...s.regionsIndexes.value];return}}else{let f=[...new Set(t.value)],u=(I=(c=v.value.values().next().value)==null?void 0:c.regionByIndex)==null?void 0:I.keys().next().value;if(r.forFrequency&&(u=(V=(C=(B=v.value.values().next().value)==null?void 0:B.regionByIndex)==null?void 0:C.values().next().value)==null?void 0:V.key),u===y&&!r.autoRegion&&(u=void 0,d.value=y),!f.length)u!==void 0&&f.push(u);else if(f.length===1){let g=h.value;r.forFrequency&&(g=new Set,v.value.forEach(p=>{p.regionByIndex.forEach(k=>{k.index!==L&&k.index!==y&&g.add(k.key)})})),g.has(f[0])||(f=[],u!==void 0&&f.push(u))}else f=f.filter(g=>h.value.has(g)),!f.length&&u!==void 0&&f.push(u);if(JSON.stringify(t.value)!==JSON.stringify(f)){t.value=f;return}}if(!(t.value.length===1&&t.value[0]===(r.onlySearcher?o.searcherKey.value:a.regionIndex.value)))if(r.onlySearcher){if(t.value.length===1){o.searcherKey.value=t.value[0];return}o.searcherKey.value=w;return}else{if(!t.value.length)return;if(t.value.length===1&&o.searcherKey.value!==w){a.regionIndex.value=t.value[0];let f;for(const u of v.value.values()){for(const g of u.regionByIndex.values())if((r.forFrequency?g.key:g.index)===a.regionIndex.value){f=u.key;break}if(f!==void 0)break}f!==void 0&&(o.searcherKey.value=f)}else o.searcherKey.value=w,s.regionsIndexes.value=[...t.value]}},{immediate:!0}),l({getSearcher:S,getRegion:i}),(c,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-selectorRegion":!0,"top-selectorRegion-onlySearcher":c.onlySearcher})},[e.createVNode(x._sfc_main$4,{options:e.unref(o).optionBySearcherKey.value,modelValue:e.unref(o).searcherKey.value,"onUpdate:modelValue":I[0]||(I[0]=B=>e.unref(o).searcherKey.value=B),name:"searcher_key",addChanger:c.addChanger},null,8,["options","modelValue","addChanger"]),!c.onlySearcher&&e.unref(o).searcherKey.value!==e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$4,{key:0,class:"top-select-region",options:e.unref(a).optionByRegionIndex.value,modelValue:e.unref(a).regionIndex.value,"onUpdate:modelValue":I[1]||(I[1]=B=>e.unref(a).regionIndex.value=B),name:c.forFrequency?"region_key":"region_index",addChanger:c.addChanger,"data-top-icon":c.addRegionIcon?"":void 0},null,8,["options","modelValue","name","addChanger","data-top-icon"])):e.createCommentVNode("",!0),c.addCompare&&!c.onlySearcher&&e.unref(o).searcherKey.value===e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main,{key:1,name:"compare",onClick:m,"data-count-compare-regions-indexes":e.unref(s).regionsIndexes.value.length},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$i18n.Common.Selected_regions),1)]),_:1},8,["data-count-compare-regions-indexes"])):e.createCommentVNode("",!0)],2))}}),Se=[{id:"1",name:"Without Tag",color_id:"1"},{id:"2",name:"Red",color_id:"2"},{id:"3",name:"Orange",color_id:"3"},{id:"4",name:"Yellow",color_id:"4"},{id:"5",name:"Blue",color_id:"5"},{id:"6",name:"Purple",color_id:"6"},{id:"7",name:"Green",color_id:"7"},{id:"8",name:"Magenta",color_id:"8"},{id:"9",name:"Dark blue",color_id:"9"},{id:"10",name:"Turquoise",color_id:"10"}],X=n=>"-"+n,K=n=>n[0]==="-"?n.substring(1):n,O=(n,l)=>{n=K(n);const r=l.find(t=>t.id===n);if(r)return r},ke=["data-tag_id","data-tag_color_id","title"],D=e.defineComponent({__name:"tagIcon",props:{id:{},colorId:{},name:{},state:{}},setup(n){return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tagSelector_tagIcon":!0,"top-tagSelector-active":!!l.state,"top-tagSelector-excluded":l.state==="excluded"}),"data-tag_id":l.id,"data-tag_color_id":l.colorId,title:l.name},null,10,ke))}}),Ie=["contenteditable","onKeydown"],Z=e.defineComponent({__name:"tagPopupListItem",props:e.mergeModels({editable:{type:Boolean},disabled:{type:Boolean},canExclude:{type:Boolean},id:{},colorId:{},name:{},state:{}},{name:{required:!0},nameModifiers:{}}),emits:e.mergeModels(["update:name","unselect","exclude","select"],["update:name"]),setup(n,{emit:l}){const r=n,t=l,d=e.useModel(n,"name"),o=e.ref(null),a=e.computed(()=>navigator.userAgent.indexOf("Firefox")!=-1?{contenteditable:s.value,onpaste:m=>m.preventDefault()}:{}),s=e.ref(!1),v=async()=>{var m;s.value=!0,await e.nextTick(),(m=o.value)==null||m.focus()},h=()=>{var c;const m=(c=o.value)==null?void 0:c.innerText;if(!m)return S();o.value&&(o.value.innerText=m),s.value=!1,t("update:name",m)},S=async()=>{o.value&&(o.value.innerText=r.name),s.value=!1},i=m=>{if(s.value||r.disabled)return;let c="selected";r.canExclude&&(m.ctrlKey||m.metaKey)&&(c="excluded"),r.state==c&&(c=""),c===""&&t("unselect"),c==="selected"&&t("select"),c==="excluded"&&t("exclude")};return(m,c)=>(e.openBlock(),e.createBlock(E._sfc_main$1,{class:e.normalizeClass({"top-tagSelector_tagListItem":!0,"top-tagSelector_tagListItem-inEdit":s.value,"top-tagSelector_tagListItem-disabled":m.disabled,"top-tagSelector_tagListItem-canExclude":m.canExclude,"top-tagSelector-active":!!m.state,"top-tagSelector-excluded":m.state==="excluded"}),onClick:e.withModifiers(i,["stop"])},{default:e.withCtx(()=>[e.createVNode(D,{id:m.id,name:d.value,colorId:m.colorId,state:m.state},null,8,["id","name","colorId","state"]),e.createElementVNode("span",e.mergeProps({ref_key:"elName",ref:o,class:"top-tagSelector_tagListItemName",contenteditable:s.value?"plaintext-only":!1},a.value,{onKeydown:[e.withKeys(e.withModifiers(h,["stop"]),["enter"]),e.withKeys(e.withModifiers(S,["stop"]),["esc"])]}),e.toDisplayString(d.value),17,Ie),m.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("span",{key:1,"data-top-icon":"",class:"top-tagSelector_edit",onClick:e.withModifiers(h,["stop"])})):(e.openBlock(),e.createElementBlock("span",{key:0,"data-top-icon":"",class:"top-tagSelector_edit",onClick:v}))],64)):e.createCommentVNode("",!0)]),_:1},8,["class"]))}}),xe={key:1},ee=e.defineComponent({inheritAttrs:!1,__name:"popupOpener",props:e.mergeModels({modelValue:{},id:{},tags:{},mode:{},targetId:{},filters:{},useTopButton:{type:Boolean},payload:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=l.useTopButton?x._sfc_main:"div",d=l.useTopButton?"html":"default",o={model:r,mode:l.mode,targetId:l.targetId,filters:l.filters,payload:l.payload};return(a,s)=>{const v=e.resolveDirective("top-data");return e.openBlock(),e.createBlock(E._sfc_main$2,{id:a.id},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),e.mergeProps({class:{"top-tagSelector":!0,"top-tagSelector-filter":l.mode==="filter","top-tagSelector-setter_single":l.mode==="setter"&&!a.filters,"top-tagSelector-setter_several":l.mode==="setter"&&a.filters,"top-tagSelector-selectedOne":!r.value.length||r.value.length===1,"top-tagSelector-toTwoLine":r.value.length>5},color:"theme",styling:""},a.$attrs),{[e.unref(d)]:e.withCtx(()=>[!r.value.length&&a.mode==="filter"?(e.openBlock(),e.createBlock(D,{key:0,id:"all",colorId:"",name:a.$i18n.Common.All_tags??"",state:""},null,8,["name"])):e.createCommentVNode("",!0),a.mode==="setter"&&a.filters?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(a.$slots,"default")])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(r.value,h=>{var S,i;return e.openBlock(),e.createBlock(D,{id:e.unref(K)(h),colorId:((S=e.unref(O)(h,a.tags))==null?void 0:S.color_id)??"",name:((i=e.unref(O)(h,a.tags))==null?void 0:i.name)??"",state:e.unref(K)(h)===h?"selected":"excluded"},null,8,["id","colorId","name","state"])}),256))]),_:2},1040,["class"])),[[v,o,"topTagSelectorTarget"]])]),_:3},8,["id"])}}}),Ce=e.defineComponent({__name:"tagSelector",props:e.mergeModels({modelValue:{},tags:{},tagsEditable:{type:Boolean},tagsMax:{default:10},id:{},singleMode:{type:Boolean},requiredForSetter:{type:Boolean,default:!0},maxTagsForSetter:{},emitDelay:{default:500}},{modelValue:{required:!0},modelModifiers:{},tags:{default:e.reactive(Se)},tagsModifiers:{}}),emits:e.mergeModels(["selector","setter","tagsChanged"],["update:modelValue","update:tags"]),setup(n,{emit:l}){const r=x.useI18n(),t=n,d=e.useModel(n,"modelValue"),o=e.useModel(n,"tags"),a=l,s=x.debounce((u,g)=>{a(u,g)},t.emitDelay);t.singleMode&&!d.value.length&&(d.value=[o.value[0].id]);const v=t.id??"top-popup-id-"+Math.random(),h=e.ref("add"),S=()=>{var p;const u=" "+((p=r.Common.Tags)==null?void 0:p.toLowerCase()),g=new Map;return g.set("add",{value:"add",title:r.Common.Add+u}),g.set("replace",{value:"replace",title:r.Common.Replace+u}),g.set("delete",{value:"delete",title:r.Common.Delete+u}),g};let i=e.shallowRef({model:d,mode:"filter",targetId:void 0,filters:void 0,payload:void 0});e.watch(d,()=>{s("selector",d.value)});const m=e.computed(()=>{if(i.value.mode==="setter"&&t.maxTagsForSetter&&!i.value.filters)return i.value.model.value.length>=t.maxTagsForSetter}),c=u=>{if(u!=="all"){if(i.value.model.value.includes(u))return"selected";if(i.value.model.value.includes(X(u)))return"excluded"}return u==="all"&&!i.value.model.value.length?"selected":""},I=(u,g)=>{const p=X(u);let k=i.value.model.value.filter(M=>M!==u&&M!==p);g==="select"&&k.push(u),g==="exclude"&&k.push(p),i.value.mode==="setter"&&i.value.targetId!==void 0&&t.requiredForSetter&&(k.length||k.push("1"),k.length===2&&i.value.model.value.length===1&&i.value.model.value[0]==="1"&&(k=k.filter(M=>M!=="1"))),t.singleMode&&!i.value.filters&&(k.length||(k=i.value.model.value),k.length>1&&(k=[k[k.length-1]])),k.sort((M,N)=>{if(!t.tags)return 0;const q=t.tags.findIndex(b=>b.id===M),R=t.tags.findIndex(b=>b.id===N);return q-R}),i.value.model.value=k,i.value.mode==="setter"&&i.value.targetId!==void 0&&s("setter",{tagsIds:k,targetId:i.value.targetId,payload:i.value.payload})},B=e.computed(()=>{let u="top-tagSelector_popup";return i.value.mode==="filter"&&(u+=" top-tagSelector_popup-filter"),i.value.mode==="setter"&&(u+=" top-tagSelector_popup-setter"),u}),C=()=>{const u=prompt("","New tag");if(!u||u==="New tag")return;const g=o.value.length+1;o.value.push({id:String(g),name:u,color_id:String((g-1)%10+1)}),a("tagsChanged",o.value)},V=u=>{var g;if(i.value=_.storage(u.elPopupOpener,"topTagSelectorTarget"),!i.value)throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");if(i.value.filters&&(h.value="add",i.value.model.value=[]),!((g=x.Core.$)!=null&&g.ui.sortable)){console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");return}!x.Core.state.isMobile&&!x.Core.state.isMobileUA&&o.value&&$(u.elPopup).sortable({items:'li:has([data-tag_id]:not([data-tag_id="all"]))',cancel:'[contenteditable="plaintext-only"], [contenteditable="true"]',distance:10,stop:function(p,k){if(!o.value)return;const M=$(k.item).parent().find("[data-tag_id]"),N=[];M.each((q,R)=>{if(!o.value)return;const b=$(R).attr("data-tag_id");N.push(b)}),o.value.sort((q,R)=>{const b=N.findIndex(j=>j===q.id),Ke=N.findIndex(j=>j===R.id);return b-Ke}),s("tagsChanged",o.value)}})},f=u=>{var g;(g=x.Core.$)!=null&&g.ui.sortable&&$(u.elPopup).data("ui-sortable")&&$(u.elPopup).sortable("destroy")};return(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(ee,{class:"top-select_arrow",modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=p=>d.value=p),id:e.unref(v),tags:o.value,mode:"filter",useTopButton:""},null,8,["modelValue","id","tags"]),e.createVNode(E._sfc_main,{id:e.unref(v),class:e.normalizeClass(B.value),onOpen:g[4]||(g[4]=p=>V(p)),onClose:g[5]||(g[5]=p=>f(p)),"transition-duration":50},e.createSlots({contentList:e.withCtx(()=>[e.unref(i).mode==="filter"&&!u.singleMode?(e.openBlock(),e.createBlock(Z,{key:0,id:"all",colorId:"",name:u.$i18n.Common.All_tags??"",state:e.unref(i).model.value.length?"":"selected",onSelect:g[3]||(g[3]=p=>e.unref(i).model.value=[])},null,8,["name","state"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,p=>(e.openBlock(),e.createBlock(Z,{key:p.id,id:p.id,colorId:p.color_id,name:p.name,state:c(p.id),canExclude:e.unref(i).mode==="filter"&&!u.singleMode,editable:u.tagsEditable,disabled:m.value&&c(p.id)==="",onUnselect:k=>I(p.id,"unselect"),onSelect:k=>I(p.id,"select"),onExclude:k=>I(p.id,"exclude"),"onUpdate:name":k=>{p.name=k,e.unref(s)("tagsChanged",o.value)}},null,8,["id","colorId","name","state","canExclude","editable","disabled","onUnselect","onSelect","onExclude","onUpdate:name"]))),128)),u.tagsEditable&&o.value.length<u.tagsMax&&o.value.length<20?(e.openBlock(),e.createBlock(E._sfc_main$1,{key:1,"data-top-icon":"",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Add),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"header",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$4,{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=p=>h.value=p),options:S()},null,8,["modelValue","options"])]),key:"0"}:void 0,e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"footer",fn:e.withCtx(()=>[e.createVNode(x._sfc_main,{color:"theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Cancel),1)]),_:1}),e.createVNode(x._sfc_main,{onClick:g[2]||(g[2]=p=>e.unref(s)("setter",{tagsIds:e.unref(i).model.value,filters:e.unref(i).filters,filtersAction:h.value,payload:e.unref(i).payload}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value==="add"?u.$i18n.Common.Add:"")+" "+e.toDisplayString(h.value==="replace"?u.$i18n.Common.Replace:"")+" "+e.toDisplayString(h.value==="delete"?u.$i18n.Common.Remove:""),1)]),_:1})]),key:"1"}:void 0]),1032,["id","class"])],64))}}),Be=(n,l)=>e.computed(()=>e.toValue(n).filter(d=>d.on>=0||d.id===l).map(d=>({value:d.id,title:d.url+` [${d.id}]`,icon:d.id===e.toValue(l)?"":"",content:d.name}))),Te=(n,l,r)=>{l||(l={id:n.id}),l.id=n.id;const t=ae.TopPopupWorker.genElPopupOpener("div",l);return t.classList.add("top-tagSelector"),n.useTopButton&&t.classList.add("top-button","top-color_theme"),n.mode==="filter"&&t.classList.add("top-tagSelector-filter"),n.mode==="setter"&&!n.filters&&t.classList.add("top-tagSelector-setter_single"),n.mode==="setter"&&n.filters&&t.classList.add("top-tagSelector-setter_several"),t.onclick=d=>{d.preventDefault(),d.stopPropagation(),t.onclick=null;const o=e.ref(n.modelValue),a={model:o,mode:n.mode,targetId:n.targetId,filters:n.filters,payload:n.payload};_.storage(t,"topTagSelectorTarget",a),delete t.dataset.topPopupDisabled,e.isRef(n.modelValue)||e.watch(o,()=>{n.modelValue=o.value,F(t,n,r)}),t.click()},e.isRef(n.modelValue)?e.watch(n.modelValue,()=>F(t,n,r)):_.storage(t,"topTagSelectorRender",d=>{n.modelValue=d;const o=_.storage(t,"topTagSelectorTarget");o&&(o.model.value=d),F(t,n,r)}),F(t,n,r),t},Ve=(n,l)=>{var r;(r=_.storage(n,"topTagSelectorRender"))==null||r(l)},F=(n,l,r)=>{var d;const t=e.unref(l.modelValue);if(n.classList.toggle("top-tagSelector-selectedOne",!t.length||t.length===1),n.classList.toggle("top-tagSelector-toTwoLine",t.length>5),l.mode==="setter"&&l.filters){n.innerHTML=`<div>${r}</div>`;return}if(n.innerHTML="",!t.length&&l.mode==="filter"){const o=te({id:"all",colorId:"",name:((d=x.useI18n().Common)==null?void 0:d.All_tags)??"",state:""});n.append(o)}t.forEach(o=>{var s,v;const a=te({id:K(o),colorId:((s=O(o,l.tags))==null?void 0:s.color_id)??"",name:((v=O(o,l.tags))==null?void 0:v.name)??"",state:K(o)===o?"selected":"excluded"});n.append(a)})},te=n=>{const l=document.createElement("div");return l.classList.add("top-tagSelector_tagIcon"),l.classList.toggle("top-tagSelector-active",!!n.state),l.classList.toggle("top-tagSelector-excluded",n.state==="excluded"),l.dataset.tag_id=n.id,l.dataset.tag_color_id=n.colorId,l.title=n.name,l},we=de,Me=he,be=Ce,Ee=ee,_e=D;T.TopSelectorCompetitors=we,T.TopSelectorRegion=Me,T.TopTagSelector=be,T.TopTagSelectorPopupOpener=Ee,T.TopTagSelectorTagIcon=_e,T.dialogSelectorRegions=Q,T.findRegion=H,T.genElTopTagSelectorPopupOpener=Te,T.genSearcherByKey=z,T.renderElTopTagSelectorPopupOpener=Ve,T.useItemsFromCompetitors=Be,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","vue","../.chunks/forms-CKYHAaPQ.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-C_ZN2Nia.amd","../.chunks/menu.vue_vue_type_style_index_0_lang-vyCH9NUZ.amd","../.chunks/utils-BPyrKdwc.amd","../utils/searchers.amd","../utils/dom.amd","../popup/worker.amd","../require/css.amd!../assets/project.css"],function(ne,T,e,x,E,oe,le,P,_,ae){"use strict";if(typeof e>"u")var e=window.Vue;const re={class:"top-selectorCompetitors"},ie={class:"top-ellipsis1"},de=e.defineComponent({__name:"selectorCompetitors",props:e.mergeModels({modelValue:{},items:{},showSelectAllItem:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=e.computed(()=>{if(l.showSelectAllItem)return{icon:"",title:x.useI18n().Common.Select_all,value:"all",content:""}});return(d,o)=>(e.openBlock(),e.createElementBlock("div",re,[e.unref(x.Core).state.isMobile?(e.openBlock(),e.createBlock(E._sfc_main,{key:0},{opener:e.withCtx(()=>[e.createVNode(x._sfc_main,{class:"top-selectorCompetitors_opener",color:"theme",icon:"",icon2:""},{default:e.withCtx(()=>{var a;return[e.createTextVNode(e.toDisplayString((a=d.items.find(s=>{var v;return s.value===((v=r.value)==null?void 0:v[0])}))==null?void 0:a.content),1)]}),_:1})]),contentList:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,a=>{var s;return e.openBlock(),e.createBlock(E._sfc_main$1,{class:e.normalizeClass({"top-active":(s=r.value)==null?void 0:s.includes(a.value)}),"data-top-icon":a.icon,title:a.title,onClick:()=>r.value=[a.value]},{default:e.withCtx(()=>[e.createElementVNode("span",ie,e.toDisplayString(a.content),1)]),_:2},1032,["class","data-top-icon","title","onClick"])}),256))]),_:1})):(e.openBlock(),e.createBlock(oe._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),items:d.items,isMultiple:!0,styling:"bar",canBeEmptyMultiple:!1,selectAllItem:t.value},null,8,["modelValue","items","selectAllItem"]))]))}}),w=-1,y=-2,L=-1,ue={0:"Yandex",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GoogleStore",20:"Yandex.com",21:"Yandex.com.tr"},J={key:y,name:"--",index:y},G={key:y,name:"--",regions:[J],regionByIndex:new Map([[y,J]])},A={key:y,name:"Autoselect",index:y},U={key:y,name:"Autoselect",regions:[A],regionByIndex:new Map([[y,A]])},Y={countryCode:"00",depth:1,device:0,key:L,index:L,lang:"ru",name:"Without region"},se=()=>(A.name=x.useI18n().Common.Autoselect,A),ce=()=>(se(),U.name=x.useI18n().Common.Autoselect,console.log(U),U),ge=()=>(Y.name=x.useI18n().Keywords.Without_region,Y),z=(n=!1,l=!1,r=[])=>{let t;return n?t=me(r):t=W(r),l&&t.set(y,ce()),t.size||t.set(y,G),t},W=(n,l=!0,r=[],t=!1)=>{const d=new Map;return n.forEach(o=>{if(!o.enabled||t&&typeof o.key=="number"&&o.key>1)return;const a={...o};a.regionByIndex=new Map,o.regions&&o.regions.forEach(s=>{if(l&&!s.enabled)return;const v={...s};a.regionByIndex.set(v.index,v)}),!a.regionByIndex.size&&r.length,(!o.regions||a.regionByIndex.size||r.length)&&typeof a.key=="number"&&d.set(a.key,a)}),r.forEach(o=>{if(d.has(o))return;const a={key:o,name:ue[o],regions:[],regionByIndex:new Map};d.set(a.key,a)}),d},me=n=>{const l=W(n,!1,[0,1],!0);if(l.has(2)){const r=l.get(2);r&&(r.regionByIndex=new Map)}return l.forEach(r=>{if(!r.regionByIndex)return;const t={...ge()};r.regionByIndex.set(t.index,t)}),l},H=(n,l,r=[])=>{const t=z(n,!1,r);let d;return t.forEach(o=>{if(!(l.searcher_key!==void 0&&l.searcher_key!=o.key)&&o.regions&&(o.regions.forEach(a=>{if(!d&&!(l.key!==void 0&&l.key!=a.key)&&!(l.index!==void 0&&l.index!=a.index)&&!(!n&&(l.lang!==void 0&&l.lang!=a.lang||l.device!==void 0&&l.device!=a.device)))return a.searcher_key=o.key,d=a,!1}),d))return!1}),d},Q=le.useAsyncTopDialog(()=>new Promise((n,l)=>ne(["../.chunks/dialog_selectorRegions-Bhblg2Ks.amd"],n,l))),fe=(n,l)=>{const r=x.useI18n(),t=e.ref(l.value.keys().next().value??y),d=e.computed(()=>{const o=new Map;if(l.value.forEach(a=>{let s={value:a.key,title:a.name};n.addSearcherIcon&&(s.icon=P.getSearcherGIcon(a.key)),o.set(a.key,s)}),n.addCompare&&!o.has(y)){const a={value:"",title:"--------------------",disabled:!0};o.set(a.value,a);const s={value:w,title:r.Common.Compare};o.set(s.value,s)}return o});return{searcherKey:t,optionBySearcherKey:d}},ve=(n,l)=>{var o,a,s;const r=x.useI18n(),t=e.ref(y);n.modelValue.length===1&&(t.value=n.modelValue[0]),t.value===y&&(n.forFrequency?t.value=((a=(o=l.value)==null?void 0:o.regionByIndex.values().next().value)==null?void 0:a.key)??y:t.value=((s=l.value)==null?void 0:s.regionByIndex.keys().next().value)??y);const d=e.computed(()=>{var h;const v=new Map;return(h=l.value.regionByIndex)==null||h.forEach(S=>{let i=S.name;if(n.forFrequency){const I={value:S.key,title:i};v.has(S.key)||v.set(S.key,I);return}S.device&&(i+=" ("+r.Common["Device_"+S.device]+")");const m=P.getLangLabel(l.value.key||0,S.lang??"");m&&(i+=" / "+m);const c={value:S.index,title:i,icon:S.device?P.getDeviceGIcon(S.device):void 0};v.set(S.index,c)}),v});return e.watch(d,(v,h)=>{var c;if(n.onlySearcher||t.value!==void 0&&v.get(t.value))return;let S=v.keys().next().value;if(t.value===y||S===y){t.value=S;return}let i=((c=h==null?void 0:h.get(t.value))==null?void 0:c.title)||"",m=-1;for(const[I,B]of v.entries()){const C=B.title;if(typeof C!="string"||typeof I=="string")break;if(C===i){S=I;break}const V=new RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`);let f=i,u=3;C.indexOf(f)===-1&&(f=i.replace(/^[^a-zа-я]/i,"").replace(V,""),u--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),u--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),f=f.replace(/^[^a-zа-я]/i,"").replace(V,""),u--),C.indexOf(f)!==-1&&(u<=m||(m=u,S=I))}t.value=S}),{regionIndex:t,optionByRegionIndex:d}},pe=(n,l,r)=>{const t=e.ref([]),d=()=>{if(n.onlySearcher&&l.value){t.value=Array.from(l.value.keys());return}let a=[];if(n.modelValue.length>1)a=[...n.modelValue];else try{a=JSON.parse(localStorage.getItem("ui:project:regionSelector"+n.projectId+":regionsIndexes"))??[]}catch{}a.length&&(a=a.filter(s=>r.value.has(s))),a.length||(a=Array.from(r.value)),t.value=[...a]},o=()=>{t.value.length?localStorage.setItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes",JSON.stringify(t.value)):localStorage.removeItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes")};return e.watch(t,()=>{o()}),n.addCompare&&d(),{regionsIndexes:t}},ye=n=>{const l=e.computed(()=>z(n.forFrequency,n.autoRegion,n.searchers)),r=e.computed(()=>l.value.get(d.searcherKey.value)||G),t=e.computed(()=>{const i=new Set;return l.value.forEach(m=>{m.regionByIndex.forEach(c=>{c.index!==L&&c.index!==y&&i.add(c.index)})}),i}),d=fe(n,l),o=ve(n,r),a=pe(n,l,t);e.watch(l,()=>{var m,c,I,B;if(n.onlySearcher?a.regionsIndexes.value=Array.from(l.value.keys()):a.regionsIndexes.value=a.regionsIndexes.value.filter(C=>t.value.has(C)),d.searcherKey.value===w)return;let i=l.value.keys().next().value;l.value.forEach(C=>{var V,f,u;if(n.onlySearcher&&C.key===d.searcherKey.value){i=d.searcherKey.value;return}if(o.regionIndex.value&&((V=C.regionByIndex)!=null&&V.has(o.regionIndex.value))&&(i=C.key),!n.onlySearcher){let g;i!==void 0&&(g=(f=l.value.get(i))==null?void 0:f.regionByIndex);const p=(u=l.value.get(C.key))==null?void 0:u.regionByIndex;g!=null&&g.has(y)&&!(p!=null&&p.has(y))&&(i=C.key)}}),i!==void 0&&(d.searcherKey.value=i),o.regionIndex.value!==void 0&&!((c=(m=r.value)==null?void 0:m.regionByIndex)!=null&&c.has(o.regionIndex.value))&&(o.regionIndex.value=(B=(I=r.value)==null?void 0:I.regions)==null?void 0:B.keys().next().value)},{immediate:!0});const s=()=>{if(!(d.searcherKey.value===w||d.searcherKey.value===y))return d.searcherKey.value},v=()=>{if(n.onlySearcher||o.regionIndex.value===y)return;let i=o.regionIndex.value;if(n.forFrequency){const m=o.regionIndex.value,c=H(n.forFrequency,{searcher_key:s(),key:m},n.searchers);i=c==null?void 0:c.index}return i},h=()=>{const i=s();if(i!==void 0)return l.value.get(i)};return{selectSearcher:d,selectRegion:o,compare:a,searcherByKey:l,allRegionsIndexes:t,getSearcher:h,getRegion:()=>{var m,c;const i=v();if(i!==void 0)return(c=(m=h())==null?void 0:m.regionByIndex)==null?void 0:c.get(i)}}},he=e.defineComponent({__name:"selectorRegion",props:e.mergeModels({projectId:{},searchers:{default:()=>[]},modelValue:{},modelValueSingle:{},addCompare:{type:Boolean},forFrequency:{type:Boolean},autoRegion:{type:Boolean},onlySearcher:{type:Boolean},addChanger:{type:Boolean,default:!0},addSearcherIcon:{type:Boolean,default:!0},addRegionIcon:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{},modelValueSingle:{},modelValueSingleModifiers:{}}),emits:["update:modelValue","update:modelValueSingle"],setup(n,{expose:l}){const r=n,t=e.useModel(n,"modelValue"),d=e.useModel(n,"modelValueSingle"),{selectSearcher:o,selectRegion:a,compare:s,searcherByKey:v,allRegionsIndexes:h,getSearcher:S,getRegion:i}=ye(r),m=()=>{const c=[];v.value.forEach(I=>{I.enabled&&I.regions.forEach(B=>{B.enabled&&c.push(B)})}),Q.open("selectorRegions",{regions:c,regionsIndexes:s.regionsIndexes.value,"@update:regionsIndexes":I=>s.regionsIndexes.value=I})};return e.watch([a.regionIndex,o.searcherKey,s.regionsIndexes],()=>{if(o.searcherKey.value===w&&s.regionsIndexes.value.length){if(JSON.stringify(t.value)===JSON.stringify(s.regionsIndexes.value))return;t.value=[...s.regionsIndexes.value]}else r.onlySearcher?(t.value=[o.searcherKey.value],o.searcherKey.value===y&&!r.autoRegion&&(t.value.length=0)):(t.value=[a.regionIndex.value],a.regionIndex.value===y&&!r.autoRegion&&(t.value.length=0));!r.onlySearcher&&!h.value.size&&(o.searcherKey.value=y)}),d.value&&e.watch(d,()=>{d.value&&(t.value=[d.value])},{immediate:!0}),e.watch(t,()=>{var c,I,B,C,V;if(t.value[0]&&(d.value=t.value[0]),r.onlySearcher){if(!t.value.length||t.value.length===1&&!v.value.has(t.value[0])||t.value.length===1&&t.value[0]===y&&!r.autoRegion){let f=v.value.keys().next().value;f===y&&!r.autoRegion&&(f=void 0,d.value=y),f!==void 0?t.value=[f]:t.value.length=0;return}if(t.value.length>1&&JSON.stringify(t.value)!==JSON.stringify(s.regionsIndexes.value)){t.value=[...s.regionsIndexes.value];return}}else{let f=[...new Set(t.value)],u=(I=(c=v.value.values().next().value)==null?void 0:c.regionByIndex)==null?void 0:I.keys().next().value;if(r.forFrequency&&(u=(V=(C=(B=v.value.values().next().value)==null?void 0:B.regionByIndex)==null?void 0:C.values().next().value)==null?void 0:V.key),u===y&&!r.autoRegion&&(u=void 0,d.value=y),!f.length)u!==void 0&&f.push(u);else if(f.length===1){let g=h.value;r.forFrequency&&(g=new Set,v.value.forEach(p=>{p.regionByIndex.forEach(k=>{k.index!==L&&k.index!==y&&g.add(k.key)})})),g.has(f[0])||(f=[],u!==void 0&&f.push(u))}else f=f.filter(g=>h.value.has(g)),!f.length&&u!==void 0&&f.push(u);if(JSON.stringify(t.value)!==JSON.stringify(f)){t.value=f;return}}if(!(t.value.length===1&&t.value[0]===(r.onlySearcher?o.searcherKey.value:a.regionIndex.value)))if(r.onlySearcher){if(t.value.length===1){o.searcherKey.value=t.value[0];return}o.searcherKey.value=w;return}else{if(!t.value.length)return;if(t.value.length===1&&o.searcherKey.value!==w){a.regionIndex.value=t.value[0];let f;for(const u of v.value.values()){for(const g of u.regionByIndex.values())if((r.forFrequency?g.key:g.index)===a.regionIndex.value){f=u.key;break}if(f!==void 0)break}f!==void 0&&(o.searcherKey.value=f)}else o.searcherKey.value=w,s.regionsIndexes.value=[...t.value]}},{immediate:!0}),l({getSearcher:S,getRegion:i}),(c,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-selectorRegion":!0,"top-selectorRegion-onlySearcher":c.onlySearcher})},[e.createVNode(x._sfc_main$4,{options:e.unref(o).optionBySearcherKey.value,modelValue:e.unref(o).searcherKey.value,"onUpdate:modelValue":I[0]||(I[0]=B=>e.unref(o).searcherKey.value=B),name:"searcher_key",addChanger:c.addChanger},null,8,["options","modelValue","addChanger"]),!c.onlySearcher&&e.unref(o).searcherKey.value!==e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$4,{key:0,class:"top-select-region",options:e.unref(a).optionByRegionIndex.value,modelValue:e.unref(a).regionIndex.value,"onUpdate:modelValue":I[1]||(I[1]=B=>e.unref(a).regionIndex.value=B),name:c.forFrequency?"region_key":"region_index",addChanger:c.addChanger,"data-top-icon":c.addRegionIcon?"":void 0},null,8,["options","modelValue","name","addChanger","data-top-icon"])):e.createCommentVNode("",!0),c.addCompare&&!c.onlySearcher&&e.unref(o).searcherKey.value===e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main,{key:1,name:"compare",onClick:m,"data-count-compare-regions-indexes":e.unref(s).regionsIndexes.value.length},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$i18n.Common.Selected_regions),1)]),_:1},8,["data-count-compare-regions-indexes"])):e.createCommentVNode("",!0)],2))}}),Se=[{id:"1",name:"Without Tag",color_id:"1"},{id:"2",name:"Red",color_id:"2"},{id:"3",name:"Orange",color_id:"3"},{id:"4",name:"Yellow",color_id:"4"},{id:"5",name:"Blue",color_id:"5"},{id:"6",name:"Purple",color_id:"6"},{id:"7",name:"Green",color_id:"7"},{id:"8",name:"Magenta",color_id:"8"},{id:"9",name:"Dark blue",color_id:"9"},{id:"10",name:"Turquoise",color_id:"10"}],X=n=>"-"+n,K=n=>n[0]==="-"?n.substring(1):n,O=(n,l)=>{n=K(n);const r=l.find(t=>t.id===n);if(r)return r},ke=["data-tag_id","data-tag_color_id","title"],D=e.defineComponent({__name:"tagIcon",props:{id:{},colorId:{},name:{},state:{}},setup(n){return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tagSelector_tagIcon":!0,"top-tagSelector-active":!!l.state,"top-tagSelector-excluded":l.state==="excluded"}),"data-tag_id":l.id,"data-tag_color_id":l.colorId,title:l.name},null,10,ke))}}),Ie=["contenteditable","onKeydown"],Z=e.defineComponent({__name:"tagPopupListItem",props:e.mergeModels({editable:{type:Boolean},disabled:{type:Boolean},canExclude:{type:Boolean},id:{},colorId:{},name:{},state:{}},{name:{required:!0},nameModifiers:{}}),emits:e.mergeModels(["update:name","unselect","exclude","select"],["update:name"]),setup(n,{emit:l}){const r=n,t=l,d=e.useModel(n,"name"),o=e.ref(null),a=e.computed(()=>navigator.userAgent.indexOf("Firefox")!=-1?{contenteditable:s.value,onpaste:m=>m.preventDefault()}:{}),s=e.ref(!1),v=async()=>{var m;s.value=!0,await e.nextTick(),(m=o.value)==null||m.focus()},h=()=>{var c;const m=(c=o.value)==null?void 0:c.innerText;if(!m)return S();o.value&&(o.value.innerText=m),s.value=!1,t("update:name",m)},S=async()=>{o.value&&(o.value.innerText=r.name),s.value=!1},i=m=>{if(s.value||r.disabled)return;let c="selected";r.canExclude&&(m.ctrlKey||m.metaKey)&&(c="excluded"),r.state==c&&(c=""),c===""&&t("unselect"),c==="selected"&&t("select"),c==="excluded"&&t("exclude")};return(m,c)=>(e.openBlock(),e.createBlock(E._sfc_main$1,{class:e.normalizeClass({"top-tagSelector_tagListItem":!0,"top-tagSelector_tagListItem-inEdit":s.value,"top-tagSelector_tagListItem-disabled":m.disabled,"top-tagSelector_tagListItem-canExclude":m.canExclude,"top-tagSelector-active":!!m.state,"top-tagSelector-excluded":m.state==="excluded"}),onClick:e.withModifiers(i,["stop"])},{default:e.withCtx(()=>[e.createVNode(D,{id:m.id,name:d.value,colorId:m.colorId,state:m.state},null,8,["id","name","colorId","state"]),e.createElementVNode("span",e.mergeProps({ref_key:"elName",ref:o,class:"top-tagSelector_tagListItemName",contenteditable:s.value?"plaintext-only":!1},a.value,{onKeydown:[e.withKeys(e.withModifiers(h,["stop"]),["enter"]),e.withKeys(e.withModifiers(S,["stop"]),["esc"])]}),e.toDisplayString(d.value),17,Ie),m.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("span",{key:1,"data-top-icon":"",class:"top-tagSelector_edit",onClick:e.withModifiers(h,["stop"])})):(e.openBlock(),e.createElementBlock("span",{key:0,"data-top-icon":"",class:"top-tagSelector_edit",onClick:v}))],64)):e.createCommentVNode("",!0)]),_:1},8,["class"]))}}),xe={key:1},ee=e.defineComponent({inheritAttrs:!1,__name:"popupOpener",props:e.mergeModels({modelValue:{},id:{},tags:{},mode:{},targetId:{},filters:{},useTopButton:{type:Boolean},payload:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=l.useTopButton?x._sfc_main:"div",d=l.useTopButton?"html":"default",o={model:r,mode:l.mode,targetId:l.targetId,filters:l.filters,payload:l.payload};return(a,s)=>{const v=e.resolveDirective("top-data");return e.openBlock(),e.createBlock(E._sfc_main$2,{id:a.id},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),e.mergeProps({class:{"top-tagSelector":!0,"top-tagSelector-filter":l.mode==="filter","top-tagSelector-setter_single":l.mode==="setter"&&!a.filters,"top-tagSelector-setter_several":l.mode==="setter"&&a.filters,"top-tagSelector-selectedOne":!r.value.length||r.value.length===1,"top-tagSelector-toTwoLine":r.value.length>5},color:"theme",styling:""},a.$attrs),{[e.unref(d)]:e.withCtx(()=>[!r.value.length&&a.mode==="filter"?(e.openBlock(),e.createBlock(D,{key:0,id:"all",colorId:"",name:a.$i18n.Common.All_tags??"",state:""},null,8,["name"])):e.createCommentVNode("",!0),a.mode==="setter"&&a.filters?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(a.$slots,"default")])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(r.value,h=>{var S,i;return e.openBlock(),e.createBlock(D,{id:e.unref(K)(h),colorId:((S=e.unref(O)(h,a.tags))==null?void 0:S.color_id)??"",name:((i=e.unref(O)(h,a.tags))==null?void 0:i.name)??"",state:e.unref(K)(h)===h?"selected":"excluded"},null,8,["id","colorId","name","state"])}),256))]),_:2},1040,["class"])),[[v,o,"topTagSelectorTarget"]])]),_:3},8,["id"])}}}),Ce=e.defineComponent({__name:"tagSelector",props:e.mergeModels({modelValue:{},tags:{},tagsEditable:{type:Boolean},tagsMax:{default:10},id:{},singleMode:{type:Boolean},requiredForSetter:{type:Boolean,default:!0},maxTagsForSetter:{},emitDelay:{default:500}},{modelValue:{required:!0},modelModifiers:{},tags:{default:e.reactive(Se)},tagsModifiers:{}}),emits:e.mergeModels(["selector","setter","tagsChanged"],["update:modelValue","update:tags"]),setup(n,{emit:l}){const r=x.useI18n(),t=n,d=e.useModel(n,"modelValue"),o=e.useModel(n,"tags"),a=l,s=x.debounce((u,g)=>{a(u,g)},t.emitDelay);t.singleMode&&!d.value.length&&(d.value=[o.value[0].id]);const v=t.id??"top-popup-id-"+Math.random(),h=e.ref("add"),S=()=>{var p;const u=" "+((p=r.Common.Tags)==null?void 0:p.toLowerCase()),g=new Map;return g.set("add",{value:"add",title:r.Common.Add+u}),g.set("replace",{value:"replace",title:r.Common.Replace+u}),g.set("delete",{value:"delete",title:r.Common.Delete+u}),g};let i=e.shallowRef({model:d,mode:"filter",targetId:void 0,filters:void 0,payload:void 0});e.watch(d,()=>{s("selector",d.value)});const m=e.computed(()=>{if(i.value.mode==="setter"&&t.maxTagsForSetter&&!i.value.filters)return i.value.model.value.length>=t.maxTagsForSetter}),c=u=>{if(u!=="all"){if(i.value.model.value.includes(u))return"selected";if(i.value.model.value.includes(X(u)))return"excluded"}return u==="all"&&!i.value.model.value.length?"selected":""},I=(u,g)=>{const p=X(u);let k=i.value.model.value.filter(M=>M!==u&&M!==p);g==="select"&&k.push(u),g==="exclude"&&k.push(p),i.value.mode==="setter"&&i.value.targetId!==void 0&&t.requiredForSetter&&(k.length||k.push("1"),k.length===2&&i.value.model.value.length===1&&i.value.model.value[0]==="1"&&(k=k.filter(M=>M!=="1"))),t.singleMode&&!i.value.filters&&(k.length||(k=i.value.model.value),k.length>1&&(k=[k[k.length-1]])),k.sort((M,N)=>{if(!t.tags)return 0;const q=t.tags.findIndex(b=>b.id===M),R=t.tags.findIndex(b=>b.id===N);return q-R}),i.value.model.value=k,i.value.mode==="setter"&&i.value.targetId!==void 0&&s("setter",{tagsIds:k,targetId:i.value.targetId,payload:i.value.payload})},B=e.computed(()=>{let u="top-tagSelector_popup";return i.value.mode==="filter"&&(u+=" top-tagSelector_popup-filter"),i.value.mode==="setter"&&(u+=" top-tagSelector_popup-setter"),u}),C=()=>{const u=prompt("","New tag");if(!u||u==="New tag")return;const g=o.value.length+1;o.value.push({id:String(g),name:u,color_id:String((g-1)%10+1)}),a("tagsChanged",o.value)},V=u=>{var g;if(i.value=_.storage(u.elPopupOpener,"topTagSelectorTarget"),!i.value)throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");if(i.value.filters&&(h.value="add",i.value.model.value=[]),!((g=x.Core.$)!=null&&g.ui.sortable)){console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");return}!x.Core.state.isMobile&&!x.Core.state.isMobileUA&&o.value&&$(u.elPopup).sortable({items:'li:has([data-tag_id]:not([data-tag_id="all"]))',cancel:'[contenteditable="plaintext-only"], [contenteditable="true"]',distance:10,stop:function(p,k){if(!o.value)return;const M=$(k.item).parent().find("[data-tag_id]"),N=[];M.each((q,R)=>{if(!o.value)return;const b=$(R).attr("data-tag_id");N.push(b)}),o.value.sort((q,R)=>{const b=N.findIndex(j=>j===q.id),Ke=N.findIndex(j=>j===R.id);return b-Ke}),s("tagsChanged",o.value)}})},f=u=>{var g;(g=x.Core.$)!=null&&g.ui.sortable&&$(u.elPopup).data("ui-sortable")&&$(u.elPopup).sortable("destroy")};return(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(ee,{class:"top-select_arrow",modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=p=>d.value=p),id:e.unref(v),tags:o.value,mode:"filter",useTopButton:""},null,8,["modelValue","id","tags"]),e.createVNode(E._sfc_main,{id:e.unref(v),class:e.normalizeClass(B.value),onOpen:g[4]||(g[4]=p=>V(p)),onClose:g[5]||(g[5]=p=>f(p)),"transition-duration":50},e.createSlots({contentList:e.withCtx(()=>[e.unref(i).mode==="filter"&&!u.singleMode?(e.openBlock(),e.createBlock(Z,{key:0,id:"all",colorId:"",name:u.$i18n.Common.All_tags??"",state:e.unref(i).model.value.length?"":"selected",onSelect:g[3]||(g[3]=p=>e.unref(i).model.value=[])},null,8,["name","state"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,p=>(e.openBlock(),e.createBlock(Z,{key:p.id,id:p.id,colorId:p.color_id,name:p.name,state:c(p.id),canExclude:e.unref(i).mode==="filter"&&!u.singleMode,editable:u.tagsEditable,disabled:m.value&&c(p.id)==="",onUnselect:k=>I(p.id,"unselect"),onSelect:k=>I(p.id,"select"),onExclude:k=>I(p.id,"exclude"),"onUpdate:name":k=>{p.name=k,e.unref(s)("tagsChanged",o.value)}},null,8,["id","colorId","name","state","canExclude","editable","disabled","onUnselect","onSelect","onExclude","onUpdate:name"]))),128)),u.tagsEditable&&o.value.length<u.tagsMax&&o.value.length<20?(e.openBlock(),e.createBlock(E._sfc_main$1,{key:1,"data-top-icon":"",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Add),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"header",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$4,{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=p=>h.value=p),options:S()},null,8,["modelValue","options"])]),key:"0"}:void 0,e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"footer",fn:e.withCtx(()=>[e.createVNode(x._sfc_main,{color:"theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Cancel),1)]),_:1}),e.createVNode(x._sfc_main,{onClick:g[2]||(g[2]=p=>e.unref(s)("setter",{tagsIds:e.unref(i).model.value,filters:e.unref(i).filters,filtersAction:h.value,payload:e.unref(i).payload}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value==="add"?u.$i18n.Common.Add:"")+" "+e.toDisplayString(h.value==="replace"?u.$i18n.Common.Replace:"")+" "+e.toDisplayString(h.value==="delete"?u.$i18n.Common.Remove:""),1)]),_:1})]),key:"1"}:void 0]),1032,["id","class"])],64))}}),Be=(n,l)=>e.computed(()=>e.toValue(n).filter(d=>d.on>=0||d.id===l).map(d=>({value:d.id,title:d.url+` [${d.id}]`,icon:d.id===e.toValue(l)?"":"",content:d.name}))),Te=(n,l,r)=>{l||(l={id:n.id}),l.id=n.id;const t=ae.TopPopupWorker.genElPopupOpener("div",l);return t.classList.add("top-tagSelector"),n.useTopButton&&t.classList.add("top-button","top-color_theme"),n.mode==="filter"&&t.classList.add("top-tagSelector-filter"),n.mode==="setter"&&!n.filters&&t.classList.add("top-tagSelector-setter_single"),n.mode==="setter"&&n.filters&&t.classList.add("top-tagSelector-setter_several"),t.onclick=d=>{d.preventDefault(),d.stopPropagation(),t.onclick=null;const o=e.ref(n.modelValue),a={model:o,mode:n.mode,targetId:n.targetId,filters:n.filters,payload:n.payload};_.storage(t,"topTagSelectorTarget",a),delete t.dataset.topPopupDisabled,e.isRef(n.modelValue)||e.watch(o,()=>{n.modelValue=o.value,F(t,n,r)}),t.click()},e.isRef(n.modelValue)?e.watch(n.modelValue,()=>F(t,n,r)):_.storage(t,"topTagSelectorRender",d=>{n.modelValue=d;const o=_.storage(t,"topTagSelectorTarget");o&&(o.model.value=d),F(t,n,r)}),F(t,n,r),t},Ve=(n,l)=>{var r;(r=_.storage(n,"topTagSelectorRender"))==null||r(l)},F=(n,l,r)=>{var d;const t=e.unref(l.modelValue);if(n.classList.toggle("top-tagSelector-selectedOne",!t.length||t.length===1),n.classList.toggle("top-tagSelector-toTwoLine",t.length>5),l.mode==="setter"&&l.filters){n.innerHTML=`<div>${r}</div>`;return}if(n.innerHTML="",!t.length&&l.mode==="filter"){const o=te({id:"all",colorId:"",name:((d=x.useI18n().Common)==null?void 0:d.All_tags)??"",state:""});n.append(o)}t.forEach(o=>{var s,v;const a=te({id:K(o),colorId:((s=O(o,l.tags))==null?void 0:s.color_id)??"",name:((v=O(o,l.tags))==null?void 0:v.name)??"",state:K(o)===o?"selected":"excluded"});n.append(a)})},te=n=>{const l=document.createElement("div");return l.classList.add("top-tagSelector_tagIcon"),l.classList.toggle("top-tagSelector-active",!!n.state),l.classList.toggle("top-tagSelector-excluded",n.state==="excluded"),l.dataset.tag_id=n.id,l.dataset.tag_color_id=n.colorId,l.title=n.name,l},we=de,Me=he,be=Ce,Ee=ee,_e=D;T.TopSelectorCompetitors=we,T.TopSelectorRegion=Me,T.TopTagSelector=be,T.TopTagSelectorPopupOpener=Ee,T.TopTagSelectorTagIcon=_e,T.dialogSelectorRegions=Q,T.findRegion=H,T.genElTopTagSelectorPopupOpener=Te,T.genSearcherByKey=z,T.renderElTopTagSelectorPopupOpener=Ve,T.useItemsFromCompetitors=Be,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=project.amd.js.map
@@ -1,9 +1,9 @@
1
1
  import { Core as be } from "../core/app.js";
2
2
  import { defineComponent as P, mergeModels as N, useModel as D, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as Y, renderList as se, normalizeClass as X, createElementVNode as he, toDisplayString as K, createVNode as A, createTextVNode as G, ref as F, watch as w, createCommentVNode as q, withModifiers as z, mergeProps as Se, withKeys as de, nextTick as Ve, resolveDirective as Ee, withDirectives as Me, resolveDynamicComponent as Ke, renderSlot as $e, shallowRef as we, createSlots as Le, reactive as Ae, toValue as ce, isRef as ge } from "vue";
3
- import { u as R, C as J, _ as H, y as ie, d as Re } from "../.chunks/forms-T8ev76fm.es.js";
4
- import { _ as Ie, a as ue, b as Oe } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BnkPoCHf.es.js";
5
- import { _ as Ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-D5I0ZtFp.es.js";
6
- import { u as De } from "../.chunks/utils-h__3Q6cC.es.js";
3
+ import { u as R, C as J, _ as H, y as ie, d as Re } from "../.chunks/forms-zDpk9gMK.es.js";
4
+ import { _ as Ie, a as ue, b as Oe } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Di1h6iID.es.js";
5
+ import { _ as Ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-B5fkWPo5.es.js";
6
+ import { u as De } from "../.chunks/utils-BPcGxQ0s.es.js";
7
7
  import { getSearcherGIcon as Fe, getLangLabel as qe, getDeviceGIcon as Pe } from "../utils/searchers.js";
8
8
  import { storage as W } from "../utils/dom.js";
9
9
  import { TopPopupWorker as Ue } from "../popup/worker.js";
@@ -165,7 +165,7 @@ const je = { class: "top-selectorCompetitors" }, ze = { class: "top-ellipsis1" }
165
165
  }), i))
166
166
  return !1;
167
167
  }), i;
168
- }, Ze = De(() => import("../.chunks/dialog_selectorRegions-c7-xcsto.es.js")), et = (t, l) => {
168
+ }, Ze = De(() => import("../.chunks/dialog_selectorRegions-Bkw1LXvI.es.js")), et = (t, l) => {
169
169
  const n = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
170
170
  const a = /* @__PURE__ */ new Map();
171
171
  if (l.value.forEach((o) => {
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","../.chunks/forms-C9txDxCB.amd","../utils/route.amd","../.chunks/store-esTid5oI.amd","../popup/popup.amd","../utils/system.amd","../require/css.amd!../assets/tabsView.css"],function(X,h,e,m,f,_,S,L){"use strict";if(typeof e>"u")var e=window.Vue;const g=(o,n)=>`top:${String(o)}:${n}`,y={loadLocalStorge:(o,n)=>{if(!n.$id)return;const t=g(o,n.$id);try{const a=JSON.parse(localStorage.getItem(t));typeof a==typeof n[o]&&(n[o]=a)}catch{console.warn(new Error(`В localStorage[${t}] не корректный json`))}},addSaverLocalStorge:(o,n)=>{if(!n.$id)return;const t=g(o,n.$id);e.watch(()=>n[o],()=>{localStorage.setItem(t,JSON.stringify(n[o]))},{immediate:!0})}},k=new Set;addEventListener("popstate",o=>{k.forEach(n=>n(o))});const V=Symbol(),C=(o,n)=>{const t=_.defineStore(V,()=>{const a=e.computed(()=>o.showMenuInPopup??m.Core.state.isMobile),i=e.computed(()=>o.pageMod),u=e.ref(!1),r=e.ref(void 0),l=e.ref(!0);return{showMenuInPopup:a,pageMod:i,isShort:u,activeItemName:n,component:r,scrollable:l}},o.idState);if(o.isShortable){const a="isShort";y.loadLocalStorge(a,t),y.addSaverLocalStorge(a,t)}if(t.$id){const a=i=>{n.value=f.getHash(t.$id)};k.add(a)}return t},w=()=>_.useStore(V),P={key:1,class:"top-ellipsis"},v=e.defineComponent({__name:"menuItem",props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(o){const n=o,t=w(),a=e.computed(()=>n.name&&t.$id?f.genHash(t.$id,n.name):n.href),i=e.computed(()=>t.showMenuInPopup?S.TopPopupListItem:a?"a":"button"),u=r=>{!n.href&&a.value&&r.preventDefault(),n.name&&(t.activeItemName=n.name)};return(r,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{target:"_self",class:e.normalizeClass({"top-tabsView_menuItem":!e.unref(t).showMenuInPopup,"top-active":r.name&&e.unref(t).activeItemName===r.name,"top-disabled":r.disabled,"top-spa-disabled":!0}),href:a.value,"data-top-icon":r.icon||void 0,disabled:r.disabled||void 0,onClick:u},{default:e.withCtx(()=>[e.unref(t).showMenuInPopup?e.renderSlot(r.$slots,"default",{key:0}):r.$slots.default&&!e.unref(t).isShort?(e.openBlock(),e.createElementBlock("span",P,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)]),_:3},8,["class","href","data-top-icon","disabled"]))}}),B=o=>(o==null?void 0:o.name)==="AsyncComponentWrapper"&&!(o!=null&&o.__asyncResolved),E=async(o,n)=>{(o==null?void 0:o.name)==="AsyncComponentWrapper"&&(o!=null&&o.__asyncResolved||(o.__asyncLoader(),await L.sleepWhile(()=>n()&&B(o),200)))},z={class:"top-tabsView_menuOpener"},R=["data-top-icon"],O={class:"top-ellipsis"},D={class:"top-tabsView_menuList"},H={key:0,class:"top-tabsView_menuFooter"},K=e.defineComponent({__name:"menu",props:e.mergeModels({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:["update:isLoading"],setup(o){const n=e.useModel(o,"isLoading"),t=w(),a=e.useSlots(),i=new Map,u=()=>{if(!a.default)return;const c=a.default({}).find(s=>s.key==="_menu");c&&r(c.children)},r=c=>{c.forEach(s=>{var M,$,N,T;if(s.type.__name&&s.type.__name!==v.__name)return;if(!s.type.__name&&typeof s.children=="object"){r(s.children);return}if(!((M=s.props)!=null&&M.name)||($=s.props)!=null&&$.disabled)return;const I={title:((T=(N=s.children).default)==null?void 0:T.call(N)[0].children).trim(),icon:s.props.icon,component:s.props.component?e.markRaw(s.props.component):v.props.component.default,scrollable:s.props.scrollable??v.props.scrollable.default};i.set(s.props.name,I)})},l=e.ref(null);let d=0;e.watch(()=>t.activeItemName,async()=>{const c=++d;if(i.size===0&&u(),i.size===0){t.activeItemName="";return}if(l.value=i.get(t.activeItemName)??null,!l.value&&t.$id){const s=f.getHash(t.$id);if(l.value=i.get(s)??null,l.value){t.activeItemName=s;return}}if(!l.value){t.activeItemName=i.keys().next().value;return}if(l.value.component===t.component){n.value=!1;return}t.$id&&f.setHash(t.$id,t.activeItemName,!1),n.value=!0,await E(l.value.component,()=>c===d),c===d&&(t.scrollable=l.value.scrollable,t.component=l.value.component,l.value&&!t.component&&console.warn(`Компонент вкладки ${t.activeItemName} не найден. Добавьте props.component для пункта меню ${t.activeItemName}.`))},{immediate:!0});const p=e.ref();let b;return e.onMounted(()=>{b=new ResizeObserver(()=>{p.value.parentElement.style.setProperty("--top-tabsView-contents-offset-top",p.value.offsetHeight+"px")}),b.observe(p.value)}),e.onUnmounted(()=>{b.disconnect()}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:p,class:e.normalizeClass({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!e.unref(t).showMenuInPopup,"top-tabsView_menu-inPopup_1":e.unref(t).showMenuInPopup,"top-tabsView_menu-short":e.unref(t).isShort&&!e.unref(t).showMenuInPopup})},[e.unref(t).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(S.TopPopup),{key:0},{opener:e.withCtx(()=>[e.createElementVNode("div",z,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-tabsView_menuOpenerActiveItem","data-top-icon":l.value.icon},[e.createElementVNode("span",O,e.toDisplayString(l.value.title),1)],8,R)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createElementVNode("div",{class:"top-tabsView_menuOpenerIcon","data-top-icon":""},null,-1))])]),contentList:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",D,[e.renderSlot(c.$slots,"default")]),c.isShortable?(e.openBlock(),e.createElementBlock("div",H,[c.isShortable?(e.openBlock(),e.createBlock(v,{key:0,icon:e.unref(t).isShort?"":"",onClick:s[0]||(s[0]=I=>e.unref(t).isShort=!e.unref(t).isShort)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t).isShort?"":"Свернуть"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))],2))}}),j=e.defineComponent({__name:"tabsView",props:e.mergeModels({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,t=e.useModel(o,"modelValue"),a=C(n,t),i=Math.random();n.pageMod&&m.Core.state.documentClassModificators.set(i,"top-hasTabsViewPageMod"),e.onUnmounted(()=>{n.pageMod&&m.Core.state.documentClassModificators.delete(i),a.$id&&f.delHash(a.$id,a.activeItemName,!0)});const u=e.ref(),r=e.ref(!1);return e.watch([u,()=>a.component],()=>{r.value=B(a.component)},{immediate:!0}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView":!0,"top-tabsView-pageMod":n.pageMod,"top-tabsView-inPopup":e.unref(a).showMenuInPopup})},[e.createVNode(K,{isShortable:l.isShortable,isLoading:r.value,"onUpdate:isLoading":d[0]||(d[0]=p=>r.value=p)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"menu")]),_:3},8,["isShortable","isLoading"]),e.createElementVNode("div",{class:e.normalizeClass({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":r.value,"top-tabsView_contents-noScrollable":!e.unref(a).scrollable})},[r.value?(e.openBlock(),e.createBlock(m.TopLoadbar$1,{key:0})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).component),{ref_key:"componentRef",ref:u},null,512))],1024))],2)],2))}}),A={},q={class:"top-tabsView_menuDelimeter"};function F(o,n){return e.openBlock(),e.createElementBlock("div",q)}const U=m._export_sfc(A,[["render",F]]),W=e.defineComponent({__name:"menuTitle",props:{isSubtitle:{type:Boolean}},setup(o){const n=w();return(t,a)=>e.unref(n).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(S.TopPopupListItem),{key:0,type:"title"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})):e.unref(n).isShort?(e.openBlock(),e.createBlock(U,{key:1})):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":t.isSubtitle})},[e.renderSlot(t.$slots,"default")],2))}}),J=j,G=v,Q=W;h.TopTabsView=J,h.TopTabsViewMenuItem=G,h.TopTabsViewMenuTitle=Q,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","vue","../.chunks/forms-CKYHAaPQ.amd","../utils/route.amd","../.chunks/store-esTid5oI.amd","../popup/popup.amd","../utils/system.amd","../require/css.amd!../assets/tabsView.css"],function(X,h,e,m,f,_,S,L){"use strict";if(typeof e>"u")var e=window.Vue;const g=(o,n)=>`top:${String(o)}:${n}`,y={loadLocalStorge:(o,n)=>{if(!n.$id)return;const t=g(o,n.$id);try{const a=JSON.parse(localStorage.getItem(t));typeof a==typeof n[o]&&(n[o]=a)}catch{console.warn(new Error(`В localStorage[${t}] не корректный json`))}},addSaverLocalStorge:(o,n)=>{if(!n.$id)return;const t=g(o,n.$id);e.watch(()=>n[o],()=>{localStorage.setItem(t,JSON.stringify(n[o]))},{immediate:!0})}},k=new Set;addEventListener("popstate",o=>{k.forEach(n=>n(o))});const V=Symbol(),C=(o,n)=>{const t=_.defineStore(V,()=>{const a=e.computed(()=>o.showMenuInPopup??m.Core.state.isMobile),i=e.computed(()=>o.pageMod),u=e.ref(!1),r=e.ref(void 0),l=e.ref(!0);return{showMenuInPopup:a,pageMod:i,isShort:u,activeItemName:n,component:r,scrollable:l}},o.idState);if(o.isShortable){const a="isShort";y.loadLocalStorge(a,t),y.addSaverLocalStorge(a,t)}if(t.$id){const a=i=>{n.value=f.getHash(t.$id)};k.add(a)}return t},w=()=>_.useStore(V),P={key:1,class:"top-ellipsis"},v=e.defineComponent({__name:"menuItem",props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(o){const n=o,t=w(),a=e.computed(()=>n.name&&t.$id?f.genHash(t.$id,n.name):n.href),i=e.computed(()=>t.showMenuInPopup?S.TopPopupListItem:a?"a":"button"),u=r=>{!n.href&&a.value&&r.preventDefault(),n.name&&(t.activeItemName=n.name)};return(r,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{target:"_self",class:e.normalizeClass({"top-tabsView_menuItem":!e.unref(t).showMenuInPopup,"top-active":r.name&&e.unref(t).activeItemName===r.name,"top-disabled":r.disabled,"top-spa-disabled":!0}),href:a.value,"data-top-icon":r.icon||void 0,disabled:r.disabled||void 0,onClick:u},{default:e.withCtx(()=>[e.unref(t).showMenuInPopup?e.renderSlot(r.$slots,"default",{key:0}):r.$slots.default&&!e.unref(t).isShort?(e.openBlock(),e.createElementBlock("span",P,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)]),_:3},8,["class","href","data-top-icon","disabled"]))}}),B=o=>(o==null?void 0:o.name)==="AsyncComponentWrapper"&&!(o!=null&&o.__asyncResolved),E=async(o,n)=>{(o==null?void 0:o.name)==="AsyncComponentWrapper"&&(o!=null&&o.__asyncResolved||(o.__asyncLoader(),await L.sleepWhile(()=>n()&&B(o),200)))},z={class:"top-tabsView_menuOpener"},R=["data-top-icon"],O={class:"top-ellipsis"},D={class:"top-tabsView_menuList"},H={key:0,class:"top-tabsView_menuFooter"},K=e.defineComponent({__name:"menu",props:e.mergeModels({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:["update:isLoading"],setup(o){const n=e.useModel(o,"isLoading"),t=w(),a=e.useSlots(),i=new Map,u=()=>{if(!a.default)return;const c=a.default({}).find(s=>s.key==="_menu");c&&r(c.children)},r=c=>{c.forEach(s=>{var M,$,N,T;if(s.type.__name&&s.type.__name!==v.__name)return;if(!s.type.__name&&typeof s.children=="object"){r(s.children);return}if(!((M=s.props)!=null&&M.name)||($=s.props)!=null&&$.disabled)return;const I={title:((T=(N=s.children).default)==null?void 0:T.call(N)[0].children).trim(),icon:s.props.icon,component:s.props.component?e.markRaw(s.props.component):v.props.component.default,scrollable:s.props.scrollable??v.props.scrollable.default};i.set(s.props.name,I)})},l=e.ref(null);let d=0;e.watch(()=>t.activeItemName,async()=>{const c=++d;if(i.size===0&&u(),i.size===0){t.activeItemName="";return}if(l.value=i.get(t.activeItemName)??null,!l.value&&t.$id){const s=f.getHash(t.$id);if(l.value=i.get(s)??null,l.value){t.activeItemName=s;return}}if(!l.value){t.activeItemName=i.keys().next().value;return}if(l.value.component===t.component){n.value=!1;return}t.$id&&f.setHash(t.$id,t.activeItemName,!1),n.value=!0,await E(l.value.component,()=>c===d),c===d&&(t.scrollable=l.value.scrollable,t.component=l.value.component,l.value&&!t.component&&console.warn(`Компонент вкладки ${t.activeItemName} не найден. Добавьте props.component для пункта меню ${t.activeItemName}.`))},{immediate:!0});const p=e.ref();let b;return e.onMounted(()=>{b=new ResizeObserver(()=>{p.value.parentElement.style.setProperty("--top-tabsView-contents-offset-top",p.value.offsetHeight+"px")}),b.observe(p.value)}),e.onUnmounted(()=>{b.disconnect()}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:p,class:e.normalizeClass({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!e.unref(t).showMenuInPopup,"top-tabsView_menu-inPopup_1":e.unref(t).showMenuInPopup,"top-tabsView_menu-short":e.unref(t).isShort&&!e.unref(t).showMenuInPopup})},[e.unref(t).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(S.TopPopup),{key:0},{opener:e.withCtx(()=>[e.createElementVNode("div",z,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-tabsView_menuOpenerActiveItem","data-top-icon":l.value.icon},[e.createElementVNode("span",O,e.toDisplayString(l.value.title),1)],8,R)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createElementVNode("div",{class:"top-tabsView_menuOpenerIcon","data-top-icon":""},null,-1))])]),contentList:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",D,[e.renderSlot(c.$slots,"default")]),c.isShortable?(e.openBlock(),e.createElementBlock("div",H,[c.isShortable?(e.openBlock(),e.createBlock(v,{key:0,icon:e.unref(t).isShort?"":"",onClick:s[0]||(s[0]=I=>e.unref(t).isShort=!e.unref(t).isShort)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t).isShort?"":"Свернуть"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))],2))}}),j=e.defineComponent({__name:"tabsView",props:e.mergeModels({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,t=e.useModel(o,"modelValue"),a=C(n,t),i=Math.random();n.pageMod&&m.Core.state.documentClassModificators.set(i,"top-hasTabsViewPageMod"),e.onUnmounted(()=>{n.pageMod&&m.Core.state.documentClassModificators.delete(i),a.$id&&f.delHash(a.$id,a.activeItemName,!0)});const u=e.ref(),r=e.ref(!1);return e.watch([u,()=>a.component],()=>{r.value=B(a.component)},{immediate:!0}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView":!0,"top-tabsView-pageMod":n.pageMod,"top-tabsView-inPopup":e.unref(a).showMenuInPopup})},[e.createVNode(K,{isShortable:l.isShortable,isLoading:r.value,"onUpdate:isLoading":d[0]||(d[0]=p=>r.value=p)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"menu")]),_:3},8,["isShortable","isLoading"]),e.createElementVNode("div",{class:e.normalizeClass({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":r.value,"top-tabsView_contents-noScrollable":!e.unref(a).scrollable})},[r.value?(e.openBlock(),e.createBlock(m.TopLoadbar$1,{key:0})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).component),{ref_key:"componentRef",ref:u},null,512))],1024))],2)],2))}}),A={},q={class:"top-tabsView_menuDelimeter"};function F(o,n){return e.openBlock(),e.createElementBlock("div",q)}const U=m._export_sfc(A,[["render",F]]),W=e.defineComponent({__name:"menuTitle",props:{isSubtitle:{type:Boolean}},setup(o){const n=w();return(t,a)=>e.unref(n).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(S.TopPopupListItem),{key:0,type:"title"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})):e.unref(n).isShort?(e.openBlock(),e.createBlock(U,{key:1})):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":t.isSubtitle})},[e.renderSlot(t.$slots,"default")],2))}}),J=j,G=v,Q=W;h.TopTabsView=J,h.TopTabsViewMenuItem=G,h.TopTabsViewMenuTitle=Q,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=tabsView.amd.js.map
@@ -1,6 +1,6 @@
1
1
  import { Core as U } from "../core/app.js";
2
2
  import { watch as k, computed as I, ref as f, defineComponent as M, createBlock as m, openBlock as l, resolveDynamicComponent as O, normalizeClass as w, unref as i, withCtx as b, renderSlot as v, createElementBlock as d, createCommentVNode as y, mergeModels as z, useModel as D, useSlots as G, onMounted as Q, onUnmounted as H, createElementVNode as S, toDisplayString as R, Fragment as X, createTextVNode as Y, markRaw as Z, createVNode as x, KeepAlive as ee } from "vue";
3
- import { C as $, v as te, t as oe } from "../.chunks/forms-T8ev76fm.es.js";
3
+ import { C as $, v as te, t as oe } from "../.chunks/forms-zDpk9gMK.es.js";
4
4
  import { getHash as K, genHash as ae, setHash as se, delHash as ne } from "../utils/route.js";
5
5
  import { u as ie, d as re } from "../.chunks/store-CX_6ZXhO.es.js";
6
6
  import { TopPopupListItem as A, TopPopup as le } from "../popup/popup.js";
@@ -1,4 +1,4 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd"],function(l,t,e){"use strict";if(typeof r>"u")var r=window.Vue;async function a(o,n=!1){let i=!1;return navigator.clipboard&&(await navigator.clipboard.writeText(o),i=!0,n&&e.Core.notice(e.useI18n().Common.Copied_to_clipboard+"","info")),i}async function u(o){let n=!1;e.isSafari()||(n=await a(o));const i='<a href="'+o+'" target="_blank">'+o+"</a>",c=e.useI18n().Common.Copied_to_clipboard+`:
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd"],function(l,t,e){"use strict";if(typeof r>"u")var r=window.Vue;async function a(o,n=!1){let i=!1;return navigator.clipboard&&(await navigator.clipboard.writeText(o),i=!0,n&&e.Core.notice(e.useI18n().Common.Copied_to_clipboard+"","info")),i}async function u(o){let n=!1;e.isSafari()||(n=await a(o));const i='<a href="'+o+'" target="_blank">'+o+"</a>",c=e.useI18n().Common.Copied_to_clipboard+`:
2
2
  `+i;if(n)e.Core.notice(c,"info");else{if(!navigator.clipboard){e.Core.notice(e.useI18n().Common.Cannot_copied_to_clipboard+`:
3
3
  `+e.useI18n().Common.Copy_guest_link_manually+`
4
4
  `+i,"error");return}const d={onclick:()=>a(o).then(()=>e.Core.notice(c,"info")),default:e.useI18n().Common.Copy+"",class:"copy"};await e.Core.notice(e.useI18n().Common.Guest_link_created+`
@@ -1,4 +1,4 @@
1
- import { C as t, u as a, b as s } from "../.chunks/forms-T8ev76fm.es.js";
1
+ import { C as t, u as a, b as s } from "../.chunks/forms-zDpk9gMK.es.js";
2
2
  async function r(o, e = !1) {
3
3
  let i = !1;
4
4
  return navigator.clipboard && (await navigator.clipboard.writeText(o), i = !0, e && t.notice(a().Common.Copied_to_clipboard + "", "info")), i;
package/utils/date.amd.js CHANGED
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd"],function(n,e,t){"use strict";if(typeof a>"u")var a=window.Vue;e.dateFormat=t.dateFormat,e.dateToString=t.dateToString,e.dateUnformat=t.dateUnformat,e.genDate=t.genDate,e.genDateMoscow=t.genDateMoscow,e.getDayOfWeek=t.getDayOfWeek,e.stringToDate=t.stringToDate,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd"],function(n,e,t){"use strict";if(typeof a>"u")var a=window.Vue;e.dateFormat=t.dateFormat,e.dateToString=t.dateToString,e.dateUnformat=t.dateUnformat,e.genDate=t.genDate,e.genDateMoscow=t.genDateMoscow,e.getDayOfWeek=t.getDayOfWeek,e.stringToDate=t.stringToDate,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=date.amd.js.map
package/utils/date.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as t, Q as s, V as o, S as r, U as g, P as n, R as D } from "../.chunks/forms-T8ev76fm.es.js";
1
+ import { c as t, Q as s, V as o, S as r, U as g, P as n, R as D } from "../.chunks/forms-zDpk9gMK.es.js";
2
2
  export {
3
3
  t as dateFormat,
4
4
  s as dateToString,
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd"],function(a,e,i){"use strict";if(typeof l>"u")var l=window.Vue;e.get$scroll=i.get$scroll,e.getCommandKeyLabel=i.getCommandKeyLabel,e.getElsScroll=i.getElsScroll,e.getOS=i.getOS,e.getOSAsync=i.getOSAsync,e.getScrollTop=i.getScrollTop,e.isApp=i.isApp,e.isMacOS=i.isMacOS,e.isMobile=i.isMobile,e.isRetina=i.isRetina,e.isSafari=i.isSafari,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd"],function(a,e,i){"use strict";if(typeof l>"u")var l=window.Vue;e.get$scroll=i.get$scroll,e.getCommandKeyLabel=i.getCommandKeyLabel,e.getElsScroll=i.getElsScroll,e.getOS=i.getOS,e.getOSAsync=i.getOSAsync,e.getScrollTop=i.getScrollTop,e.isApp=i.isApp,e.isMacOS=i.isMacOS,e.isMobile=i.isMobile,e.isRetina=i.isRetina,e.isSafari=i.isSafari,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=device.amd.js.map
package/utils/device.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as e, F as l, I as i, J as o, K as t, G as g, B as r, D as S, A as c, z as p, b } from "../.chunks/forms-T8ev76fm.es.js";
1
+ import { H as e, F as l, I as i, J as o, K as t, G as g, B as r, D as S, A as c, z as p, b } from "../.chunks/forms-zDpk9gMK.es.js";
2
2
  export {
3
3
  e as get$scroll,
4
4
  l as getCommandKeyLabel,
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd"],function(u,e,n){"use strict";if(typeof i>"u")var i=window.Vue;e.cloneDeep=n.cloneDeep,e.debounce=n.debounce,e.memoize=n.memoize,e.merge=n.merge,e.throttle=n.throttle,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd"],function(u,e,n){"use strict";if(typeof i>"u")var i=window.Vue;e.cloneDeep=n.cloneDeep,e.debounce=n.debounce,e.memoize=n.memoize,e.merge=n.merge,e.throttle=n.throttle,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=lodash.amd.js.map
package/utils/lodash.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as a, d as s, M as m, O as r, N as t } from "../.chunks/forms-T8ev76fm.es.js";
1
+ import { L as a, d as s, M as m, O as r, N as t } from "../.chunks/forms-zDpk9gMK.es.js";
2
2
  export {
3
3
  a as cloneDeep,
4
4
  s as debounce,
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd"],function(a,t,i){"use strict";if(typeof n>"u")var n=window.Vue;const u=(c,e,o=i.Core.state.currency)=>{e=e??i.useI18nLang().value;let r=c.toLocaleString(e,{style:"currency",currency:o,maximumFractionDigits:2});return r=r.replace(",","."),r};t.genPrice=u,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd"],function(a,t,i){"use strict";if(typeof n>"u")var n=window.Vue;const u=(c,e,o=i.Core.state.currency)=>{e=e??i.useI18nLang().value;let r=c.toLocaleString(e,{style:"currency",currency:o,maximumFractionDigits:2});return r=r.replace(",","."),r};t.genPrice=u,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=price.amd.js.map
package/utils/price.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as a, a as o } from "../.chunks/forms-T8ev76fm.es.js";
1
+ import { C as a, a as o } from "../.chunks/forms-zDpk9gMK.es.js";
2
2
  const i = (t, e, c = a.state.currency) => {
3
3
  e = e ?? o().value;
4
4
  let r = t.toLocaleString(e, { style: "currency", currency: c, maximumFractionDigits: 2 });
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-C9txDxCB.amd","../.chunks/core-BOmJlsQh.amd","vue","../.chunks/dialogs.vue_vue_type_script_setup_true_lang-B68tDOIP.amd"],function(b,c,g,f,r,d){"use strict";if(typeof r>"u")var r=window.Vue;const s={0:"Yandex",20:"Yandex.com",21:"Yandex.com.tr",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GooglePlay",101:"VK",102:"Facebook",103:"Twitter"},t=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a){case 0:e="";break;case 20:case 21:e="";break;case 1:e="";break;case 2:e="";break;case 3:e="";break;case 4:e="";break;case 5:e="";break;case 6:e="";break;case 7:e="";break;case 8:e="";break;case 9:e="";break;case null:e="";break}return e},n=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a%10){case 0:e="";break;case 1:e="";break;case 2:e="";break}return e},i=(a,e)=>{switch(typeof a=="string"&&(a=Number(a)),a*1){case 1:case 4:case 5:case 6:case 8:case 9:return e}return""},u=(a,e,k)=>{switch(e*1){case 0:switch(k*1){case 2:a=`"${a}"`;break;case 3:a=`"!${a}"`;break;case 5:a=`"[${a}]"`;break;case 6:a=`"[!${a}]"`;break}break;case 1:a=`[${a}]`;break}return a},o=(a,e)=>{switch(e===null&&(e=6),a){case 1:e=3;break;case 2:e=2;break;case 5:e>1&&(e=1);break;default:[1,2,3,5,6].includes(e)||(e=3)}return e};c.genVolumeLabel=u,c.getDeviceGIcon=n,c.getLangLabel=i,c.getSearcherGIcon=t,c.prepareVolumeType=o,c.searchersNames=s,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","../.chunks/forms-CKYHAaPQ.amd","../.chunks/core-BHvOvH4M.amd","vue","../.chunks/dialogs.vue_vue_type_script_setup_true_lang-CXtBj2Ah.amd"],function(b,c,g,f,r,d){"use strict";if(typeof r>"u")var r=window.Vue;const s={0:"Yandex",20:"Yandex.com",21:"Yandex.com.tr",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GooglePlay",101:"VK",102:"Facebook",103:"Twitter"},t=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a){case 0:e="";break;case 20:case 21:e="";break;case 1:e="";break;case 2:e="";break;case 3:e="";break;case 4:e="";break;case 5:e="";break;case 6:e="";break;case 7:e="";break;case 8:e="";break;case 9:e="";break;case null:e="";break}return e},n=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a%10){case 0:e="";break;case 1:e="";break;case 2:e="";break}return e},i=(a,e)=>{switch(typeof a=="string"&&(a=Number(a)),a*1){case 1:case 4:case 5:case 6:case 8:case 9:return e}return""},u=(a,e,k)=>{switch(e*1){case 0:switch(k*1){case 2:a=`"${a}"`;break;case 3:a=`"!${a}"`;break;case 5:a=`"[${a}]"`;break;case 6:a=`"[!${a}]"`;break}break;case 1:a=`[${a}]`;break}return a},o=(a,e)=>{switch(e===null&&(e=6),a){case 1:e=3;break;case 2:e=2;break;case 5:e>1&&(e=1);break;default:[1,2,3,5,6].includes(e)||(e=3)}return e};c.genVolumeLabel=u,c.getDeviceGIcon=n,c.getLangLabel=i,c.getSearcherGIcon=t,c.prepareVolumeType=o,c.searchersNames=s,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=searchers.amd.js.map
@@ -1,7 +1,7 @@
1
- import "../.chunks/forms-T8ev76fm.es.js";
2
- import "../.chunks/core-BM1cjH9-.es.js";
1
+ import "../.chunks/forms-zDpk9gMK.es.js";
2
+ import "../.chunks/core-CUNwUlL6.es.js";
3
3
  import "vue";
4
- import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-BFXZoJrj.es.js";
4
+ import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-JyillkBh.es.js";
5
5
  const k = {
6
6
  0: "Yandex",
7
7
  20: "Yandex.com",
@@ -1,2 +1,2 @@
1
- define(["require","exports","./check.amd","../.chunks/forms-C9txDxCB.amd"],function(S,c,i,u){"use strict";if(typeof p>"u")var p=window.Vue;const h=e=>{e+="";let l=0;if(!e.length)return l;for(let a=0;a<e.length;a++){const n=e.charCodeAt(a);l=(l<<5)-l+n,l=l&l}return l<0&&(l*=-1),l},s=e=>/^\w+:\/\/([\w-]+\.)+[\w-]+(:\d+)?(\/|$)/.test(e),f=e=>{let l=e+"";l=l.replace("-","–");let a=l.split("."),n=a[0],o=a.length>1?"."+a[1]:"";if(n.replace(/[+–]/,"").length<=4)return l;const r=/(\d+)(\d{3})/;for(;r.test(n);)n=n.replace(r,"$1 $2");return n+o},d=e=>e===void 0?"":e.replace(/\r\n|\r|\n/g,"<br>"),g=(e,l=2,a=1e3,n="")=>{const o=Math.pow(10,l);let r=String(e);return Math.abs(e)>Math.pow(a,3)?r=Math.round(e/Math.pow(a,3)*o)/o+" <small>G"+n+"</small>":Math.abs(e)>Math.pow(a,2)?r=Math.round(e/Math.pow(a,2)*o)/o+" <small>M"+n+"</small>":Math.abs(e)>a?r=Math.round(e/a*o)/o+" <small>K"+n+"</small>":r=Math.round(e*o)/o+"",r=r.replace(/^(-?\d+)(\d{3})/,"$1 $2"),r},m=(e,l,a=1)=>{if(e==null)return"";if(e+="",l==null||e.length<=l)return e;if(a===0)e=e.substr(e.length-l,l),e="..."+e;else if(a===1){const n=e.substr(0,l/2),o=e.substr(e.length-l/2,Math.ceil(l/2));e=n+"..."+o}else a===2&&(e=e.substr(0,l),e=e+"...");return e},w=(e,l,a,n)=>{if(u.useI18nLang().value==="en")return e===1?a:l;const o=e%100,r=e%10;return o>=5&&o<=20||r===0?l:r===1?a:r>=2&&r<=4?n:r>=5&&r<=9?l:n},C=e=>{if(u.useI18nLang().value!="ru"||e=="")return e;const l=e.split(" ");return $.map(l,function(a,n){a=a+"а",a=a.replace("оа","о"),a=a.replace("аяа","ой"),a=a.replace("шийа","шого"),a=a.replace("ыйа","ого"),a=a.replace("йа","я"),a=a.replace("ьа","я"),a=a.replace("яа","и"),a=a.replace("оваа","овой"),a=a.replace("аа","ы"),a=a.replace("кия","кого"),a=a.replace("каи","кой"),l[n]=a}),e=l.join(" "),e},M=e=>{const l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"j",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"shch",ъ:"",ы:"y",ь:"",э:"e",ю:"u",я:"ya"},a=e.split(" ");return $.map(a,function(n,o){const r=[];for(let t=0;t<n.length;++t)r.push(l[n[t]]||l[n[t].toLowerCase()]==null&&n[t]||l[n[t].toLowerCase()].replace(/^(.)/,function(A){return A.toUpperCase()}));a[o]=r.join("")}),e=a.join(" "),e},b=e=>(typeof e=="string"&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),e),k=(e,l)=>{let a=null;switch(l.operator){case"CONTAINS":case"REGEXP":try{let n=l.values[0];l.operator!="REGEXP"&&(n=n.replace(/([()\[\]])/g,"\\$1")),a=new RegExp("("+n+")","gi")}catch{return e}break}return e=e.replace(a,'<b class="found">$1</b>'),e},y=e=>{var l;return(l=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:l.map(a=>a.toLowerCase()).join("_")},v=e=>`/controller/file/?src=${"/cloud/common/flags/"+e.toUpperCase()+".svg"}`,L=e=>{const l=i.getDomainRegexp(),a="(([\\/?\\w&=%+#;:-]*(\\.\\w+)?))*",n=new RegExp(`(^|[\\s>(),])([a-z0-9а-яё_.]+@${l}${a})`,"gui");e=e.replace(n,'$1<a href="mailto:$2" target="_blank" rel="noopener">↑[$2]↓</a>');const o=new RegExp(`(^|[\\s>(),])(https?://)?(${l}${a})`,"gui");return e=e.replace(o,'$1<a href="√$2$3" target="_blank" rel="nofollow noopener">$2$3</a>'),e=e.replaceAll("√http","http"),e=e.replaceAll("√","http://"),e=e.replaceAll(/(↑\[|]↓)/g,""),e},R=e=>e.charAt(0).toUpperCase()+e.slice(1),E=(e=20)=>{const l="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";let a="";for(let n=0;n<e;n++)a+=l[Math.floor(Math.random()*l.length)];return a};c.addCommasWhite=f,c.addLinkTags=L,c.camelToSnakeCase=y,c.ellipsis=m,c.genFlagLinkByCountryCode=v,c.genIntHash=h,c.getRandomHash=E,c.highlightHtml=k,c.htmlspecialchars=b,c.isUrl=s,c.nl2br=d,c.numberEnding=w,c.numberWithWord=g,c.rusToLatin=M,c.toCapitalize=R,c.toRoditPadej=C,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
1
+ define(["require","exports","./check.amd","../.chunks/forms-CKYHAaPQ.amd"],function(S,c,i,u){"use strict";if(typeof p>"u")var p=window.Vue;const h=e=>{e+="";let l=0;if(!e.length)return l;for(let a=0;a<e.length;a++){const n=e.charCodeAt(a);l=(l<<5)-l+n,l=l&l}return l<0&&(l*=-1),l},s=e=>/^\w+:\/\/([\w-]+\.)+[\w-]+(:\d+)?(\/|$)/.test(e),f=e=>{let l=e+"";l=l.replace("-","–");let a=l.split("."),n=a[0],o=a.length>1?"."+a[1]:"";if(n.replace(/[+–]/,"").length<=4)return l;const r=/(\d+)(\d{3})/;for(;r.test(n);)n=n.replace(r,"$1 $2");return n+o},d=e=>e===void 0?"":e.replace(/\r\n|\r|\n/g,"<br>"),g=(e,l=2,a=1e3,n="")=>{const o=Math.pow(10,l);let r=String(e);return Math.abs(e)>Math.pow(a,3)?r=Math.round(e/Math.pow(a,3)*o)/o+" <small>G"+n+"</small>":Math.abs(e)>Math.pow(a,2)?r=Math.round(e/Math.pow(a,2)*o)/o+" <small>M"+n+"</small>":Math.abs(e)>a?r=Math.round(e/a*o)/o+" <small>K"+n+"</small>":r=Math.round(e*o)/o+"",r=r.replace(/^(-?\d+)(\d{3})/,"$1 $2"),r},m=(e,l,a=1)=>{if(e==null)return"";if(e+="",l==null||e.length<=l)return e;if(a===0)e=e.substr(e.length-l,l),e="..."+e;else if(a===1){const n=e.substr(0,l/2),o=e.substr(e.length-l/2,Math.ceil(l/2));e=n+"..."+o}else a===2&&(e=e.substr(0,l),e=e+"...");return e},w=(e,l,a,n)=>{if(u.useI18nLang().value==="en")return e===1?a:l;const o=e%100,r=e%10;return o>=5&&o<=20||r===0?l:r===1?a:r>=2&&r<=4?n:r>=5&&r<=9?l:n},C=e=>{if(u.useI18nLang().value!="ru"||e=="")return e;const l=e.split(" ");return $.map(l,function(a,n){a=a+"а",a=a.replace("оа","о"),a=a.replace("аяа","ой"),a=a.replace("шийа","шого"),a=a.replace("ыйа","ого"),a=a.replace("йа","я"),a=a.replace("ьа","я"),a=a.replace("яа","и"),a=a.replace("оваа","овой"),a=a.replace("аа","ы"),a=a.replace("кия","кого"),a=a.replace("каи","кой"),l[n]=a}),e=l.join(" "),e},M=e=>{const l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"j",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"shch",ъ:"",ы:"y",ь:"",э:"e",ю:"u",я:"ya"},a=e.split(" ");return $.map(a,function(n,o){const r=[];for(let t=0;t<n.length;++t)r.push(l[n[t]]||l[n[t].toLowerCase()]==null&&n[t]||l[n[t].toLowerCase()].replace(/^(.)/,function(A){return A.toUpperCase()}));a[o]=r.join("")}),e=a.join(" "),e},b=e=>(typeof e=="string"&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),e),k=(e,l)=>{let a=null;switch(l.operator){case"CONTAINS":case"REGEXP":try{let n=l.values[0];l.operator!="REGEXP"&&(n=n.replace(/([()\[\]])/g,"\\$1")),a=new RegExp("("+n+")","gi")}catch{return e}break}return e=e.replace(a,'<b class="found">$1</b>'),e},y=e=>{var l;return(l=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:l.map(a=>a.toLowerCase()).join("_")},v=e=>`/controller/file/?src=${"/cloud/common/flags/"+e.toUpperCase()+".svg"}`,L=e=>{const l=i.getDomainRegexp(),a="(([\\/?\\w&=%+#;:-]*(\\.\\w+)?))*",n=new RegExp(`(^|[\\s>(),])([a-z0-9а-яё_.]+@${l}${a})`,"gui");e=e.replace(n,'$1<a href="mailto:$2" target="_blank" rel="noopener">↑[$2]↓</a>');const o=new RegExp(`(^|[\\s>(),])(https?://)?(${l}${a})`,"gui");return e=e.replace(o,'$1<a href="√$2$3" target="_blank" rel="nofollow noopener">$2$3</a>'),e=e.replaceAll("√http","http"),e=e.replaceAll("√","http://"),e=e.replaceAll(/(↑\[|]↓)/g,""),e},R=e=>e.charAt(0).toUpperCase()+e.slice(1),E=(e=20)=>{const l="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";let a="";for(let n=0;n<e;n++)a+=l[Math.floor(Math.random()*l.length)];return a};c.addCommasWhite=f,c.addLinkTags=L,c.camelToSnakeCase=y,c.ellipsis=m,c.genFlagLinkByCountryCode=v,c.genIntHash=h,c.getRandomHash=E,c.highlightHtml=k,c.htmlspecialchars=b,c.isUrl=s,c.nl2br=d,c.numberEnding=w,c.numberWithWord=g,c.rusToLatin=M,c.toCapitalize=R,c.toRoditPadej=C,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=string.amd.js.map
package/utils/string.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { getDomainRegexp as u } from "./check.js";
2
- import { a as n } from "../.chunks/forms-T8ev76fm.es.js";
2
+ import { a as n } from "../.chunks/forms-zDpk9gMK.es.js";
3
3
  const i = (e) => {
4
4
  e += "";
5
5
  let l = 0;
@@ -1,2 +0,0 @@
1
- define(["require","exports","./forms-C9txDxCB.amd","../utils/dom.amd","../popup/worker.amd"],function(T,x,c,i,s){"use strict";if(typeof y>"u")var y=window.Vue;class P{static componentName="Top";componentName;className;uid;el;options={};unmountEls=[];unmountEvents=[];init(t,p,o){if(!p)throw t+": el is undefined";const e=P.getComponent(p,t);if(e)return e.reInit(o),e;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()}static getComponent(t,p){return i.default.storage(t,"#"+p)}_setComponent(t){i.default.storage(t,"#"+this.componentName,this)}mount(){throw"Please, add method mount() to component: "+this.componentName}unmount(){i.default.storage(this.el,"#"+this.componentName,null),this.unmountEls.forEach(t=>{t.remove()}),this.unmountEls=[],this.unmountEvents.forEach(t=>{t.el.removeEventListener(t.type,t.listener,t.options)}),this.unmountEvents=[]}registerElForUnmount(t){this.unmountEls.push(t)}addEventListenerWithUnmount(t,p,o,e){t.addEventListener(p,o,e),this.registerEventForUnmount(t,p,o,e)}registerEventForUnmount(t,p,o,e){const n={el:t,type:p,listener:o,options:e};this.unmountEvents.push(n)}reInit(t){throw"Please, add method reInit() to component: "+this.componentName}static detach(t){var p;if(t instanceof NodeList)t.forEach(o=>{var e;return(e=o.parentElement)==null?void 0:e.removeChild(o)});else{const o=t;(p=o.parentElement)==null||p.removeChild(o)}}}class _{static isInited=!1;static init(){this.isInited||(this.isInited=!0,document.addEventListener("click",this.onclickCapture,{capture:!0}),document.addEventListener("click",this.onclick),document.addEventListener("keydown",this.onkeydown))}static onclickCapture(t){var o;if(!(!(t.target instanceof HTMLElement)||!t.target.closest(".top-popup-wrapper"))){if(t.target.matches("[data-top-popup]")){const e=t.target.closest("ul"),n=t.target.closest("a, .a");e&&((o=e.querySelector("a.top-active, .a.top-active"))==null||o.classList.remove("top-active")),n&&n.classList.add("top-active"),t.stopPropagation();return}if(t.target.matches(".top-popup-wrapper")){const e=t.target;s.TopPopupWorker.close(e),t.stopPropagation();return}}}static onclick(t){if(!(t.target instanceof HTMLElement))return;const p=t.target.closest(".closer, a, .a, .top-button");if(p){const o=t.target.closest(".top-popup-wrapper");if(!o||p.matches(".top-popup-noCloser"))return;p.getAttribute("href")==="."&&t.preventDefault(),s.TopPopupWorker.close(o)}}static onkeydown(t){var e,n;if(!(t.target instanceof HTMLElement))return;const p=t.target.closest(".top-popup-wrapper");if(!p)return;const o=p.querySelector("ul.top-popup_content");switch(t.key){case"Escape":s.TopPopupWorker.close(p);break;case"Enter":if(!o){if(i.default.querySelectorVisible(p,".preloader"))break;const u=i.default.querySelectorVisible(p,".top-popup_footer .go, .top-popup_footer [data-action]");if(u instanceof HTMLElement){u.click();break}let m=i.default.querySelectorVisibleLast(p,".top-popup_footer .top-button:focus");m||(m=i.default.querySelectorVisibleLast(p,".top-popup_footer .top-button")),m instanceof HTMLElement&&m.click();break}const r=i.default.querySelectorVisible(p,"li > a.top-active");r&&r.getAttribute("href")&&(t.preventDefault(),location.href=r.getAttribute("href"));const a=p.querySelector("li > .top-active");a instanceof HTMLElement&&a.click();break;case"ArrowUp":case"ArrowRight":case"ArrowDown":case"ArrowLeft":if(!o)break;t.key==="ArrowRight"||t.key==="ArrowLeft"?i.default.querySelectorVisible(p,"ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active > .top-popup_listMore")&&t.preventDefault():t.preventDefault();const h=(e=p.querySelector("ul.top-popup_content > li:not(.top-popup_liNoSelectable) > .top-active"))==null?void 0:e.parentElement;if(t.key==="ArrowRight"&&h){const u=h.querySelector(".top-active > .top-popup_listMore");if(u instanceof HTMLElement)return u.click()}const d=i.default.querySelectorAllVisible(p,"ul.top-popup_content > li:not(.top-popup_liNoSelectable)"),f=d.length;if(!f)return;let l=-1;if(h&&(l=d.indexOf(h)),t.key==="ArrowUp"||t.key==="ArrowLeft"?l--:l++,t.key==="ArrowLeft"&&l===-1)return t.target.matches("input")?void 0:s.TopPopupWorker.close(p);if(t.key==="ArrowRight"&&l===f)return;l<0&&(l=f-1),l>f-1&&(l=0),p.querySelectorAll("ul.top-popup_content > li > .top-active").forEach(u=>u.classList.remove("top-active")),(n=d[l].querySelector(":scope > a, :scope > .a"))==null||n.classList.add("top-active"),s.TopPopupWorker.scrollToActive(p);break}}}const L=":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.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}",E=":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)}",k=".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}";c.Core.insertStyleToPage(L),c.Core.insertStyleToPage(E,"m"),c.Core.insertStyleToPage(k,"pc");class g extends P{static componentName="TopPopup";elActiveByDefault;elPopup;elPopupInner;elPopupHeader;elPopupWidget;elPopupBody;elPopupFooter;elFront;popupParent;$;elStartPosition;shift={top:0,left:0};isClosed=!1;isFirstClick=!0;type;options={popup:"",p:0,notch:!1,class:"",posBy:"left",frontSelector:"",invertX:!1,openByHover:!1,useOriginal:!1,transitionDuration:100,isFullScreen:!1};events={};constructor(t,p){super(),this.init(g.componentName,t,p)}async mount(){var e,n;if(!(this.el instanceof HTMLElement))return;const t=this.vueGetComponent();if(this.el.closest(".top-popup-wrapper")&&(this.popupParent=s.TopPopupWorker.getPopup(this.el.closest(".top-popup-wrapper"))),await this.mountJQuery(),i.default.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)this.type="vue",this.options.popup="",this.elPopup=i.default.genEl("div",{},this.options.popup);else if((e=this.options.popup)!=null&&e.match(/^[#.]/))this.type="selector",this.elPopup=document.querySelector(`${this.options.popup}.template`)||void 0;else{if(this.type="html",this.options.useOriginal)throw"Option useOriginal not allowed for text templates";this.elPopup=i.default.genEl("div",{},this.options.popup??"")}if(!this.elPopup||t!=null&&t.opened){if(this.options.useOriginal||t!=null&&t.opened){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){this.el.dataset.topPopupOpened="",this.elActiveByDefault||this.el.classList.remove("top-active"),s.TopPopupWorker.close(this.elPopup),setTimeout(()=>this.mount(),this.options.transitionDuration);return}throw"Option useOriginal state allowed only elements .template"}this.elPopup=document.querySelector(`${this.options.popup}:not(.top-popup-wrapper)`)||void 0}if(!this.elPopup)return;for(this.options.useOriginal?(this.elStartPosition=this.elPopup.closest(".top-popup-el-start-position"),this.elStartPosition||(this.elStartPosition=i.default.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.default.wrap(this.elPopup,"div")),this.type==="html"&&(this.elPopup.querySelector(":scope > .top-popup_content")||(this.elPopup.classList.add("top-popup_content"),this.elPopup=i.default.wrap(this.elPopup,"div"))),(this.type==="selector"&&!this.elPopup.matches(".template")||this.type==="html"||this.type==="vue")&&(i.default.querySelectorAllArray(this.elPopup,"[data-top-popup]").forEach(r=>{r instanceof HTMLElement&&(r.dataset.topPopupPosBy="fixed")}),i.default.querySelectorAllArray(this.elPopup,".top-popup-wrapper").forEach(r=>r.remove()))),s.TopPopupWorker.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("--top-popup-transition-delay",this.options.transitionDuration+"ms"))),this.elPopupInner=document.createElement("div"),this.elPopupInner.classList.add("top-popupPanel","top-popup");this.elPopup.firstChild;)this.elPopupInner.appendChild(this.elPopup.firstChild);if(this.elPopup.append(this.elPopupInner),this.elPopup.classList.add("top-popup-wrapper"),this.options.class){const r=this.options.class.split(" ");this.elPopup.classList.add(...r)}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");const p=!!this.elPopup.querySelector('[data-widget="search"]');if(this.options.isFullScreen&&!p){const r=c.useI18n();!this.elPopupHeader&&r.Common.Close&&(this.elPopupHeader=i.default.genEl("i",{class:"top-popup_header"}),this.elPopupInner.prepend(this.elPopupHeader),this.elPopupHeader.prepend(i.default.genEl("i",{class:"a closer"},r.Common.Close)),this.elPopupHeader.append(i.default.genEl("i",{class:"top-popup_headerButton"})))}i.default.storage(this.elPopup,g.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");let o=!!this.el.closest(".modal-header");o||(o=!!this.el.closest("#top_panel")),o||(o=!!this.el.closest("#secondmenu")),o&&this.elPopup.classList.add("p-from-top"),setTimeout(()=>{var r;return(r=this.elPopup)==null?void 0:r.classList.add("top-popup-wrapper-shown")}),this.elFront&&!this.elFront.matches("body")&&(this.elFront.append(this.elPopup),this.shift.top=i.default.offset(this.el).top-this.el.offsetTop-i.default.offset(this.elFront).top,this.shift.left=i.default.offset(this.el).left-this.el.offsetLeft-i.default.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.$&&c.Core.$&&this.$.trigger("aftershow.top-menu-popup",[c.Core.$(this.elPopup)]),this.recalcPosition(),this.elPopup.setAttribute("tabindex","0"),this.focus(),s.TopPopupWorker.decoratorAfterOpen(this),this.mountEvents()}async mountJQuery(){c.Core.$&&(this.$=c.Core.$(this.el))}focus(){let t;this.elPopup&&(t=i.default.querySelectorVisible(this.elPopup,".top-popup-autofocus"),t||(t=i.default.querySelectorVisible(this.elPopup,":read-write, select:not(:disabled)")),t||(t=i.default.querySelectorVisible(this.elPopup,".top-popup_footer .top-button")),t||(t=this.elPopup),t instanceof HTMLElement&&t.focus(),setTimeout(()=>{t instanceof HTMLElement&&t.focus()},this.options.transitionDuration))}mountEvents(){this.addEventListenerWithUnmount(document,"mousedown",t=>this.onMousedown(t)),this.elPopup&&this.elPopupInner&&(this.addEventListenerWithUnmount(this.elPopup,"focus",t=>this.onFocus(t)),this.options.openByHover&&(this.addEventListenerWithUnmount(this.elPopup,"mouseleave",t=>this.onMouseleave(t)),this.addEventListenerWithUnmount(this.elPopupInner,"mouseleave",t=>this.onMouseleave(t)))),this.options.isFullScreen&&this.elPopupBody&&this.addEventListenerWithUnmount(this.elPopupBody,"touchmove",t=>this.onTouchmove(t))}onMousedown(t){if(!this.elPopup||!(t.target instanceof Element)||!this.isFirstClick||(this.isFirstClick=!1,setTimeout(()=>this.isFirstClick=!0),t instanceof MouseEvent&&t.button!==0))return;let p=i.default.querySelectorVisibleLast(document.body,":scope > .top-popup-wrapper");p&&p!==this.elPopup||t.target.closest(".top-popup-front")&&(p=i.default.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.TopPopupWorker.decoratorIsIgnoreOuterClick(t)||s.TopPopupWorker.close(this.elPopup)}onFocus(t){if(t.target instanceof Element&&t.target.matches("input")||this.isClosed)return;s.TopPopupWorker.getAllVisible().forEach(o=>{var e,n,r,a;(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.TopPopupWorker.close(o)})}onMouseleave(t){setTimeout(()=>{this.elPopupInner&&this.elPopupInner.matches(":hover")||!this.elPopup||s.TopPopupWorker.close(this.elPopup)},100)}onResize(){this.elPopup&&this.elPopup.parentElement!==document.body&&document.body.append(this.elPopup),this.elPopup instanceof HTMLElement&&(this.elPopup.style.top=i.default.offset(this.el).top+"px",this.elPopup.style.left=i.default.offset(this.el).left+"px")}unmount(){super.unmount(),this.el instanceof HTMLElement&&(this.el.dataset.topPopupOpened=""),this.elActiveByDefault||this.el.classList.remove("top-active");let t=this.el.getAttribute("style");t&&(t=t.replace(/position:[^;]*;?/g,""),this.el.setAttribute("style",t))}recalcPosition(t){var b,w;if(!(this.elPopup instanceof HTMLElement))return;let p=t??this.options.p,o;if(this.el instanceof HTMLElement)switch(this.elPopup.style.height=this.el.offsetHeight+"px",this.elPopup.classList.remove("p0","p1","p2","p3","p4"),this.elPopup.classList.add("p"+p),this.options.posBy){case"left":o=this.el.offsetLeft+parseInt(this.el.style["margin-left"]||"0"),o+=this.shift.left,this.elPopup.style.left=o+"px";break;case"right":if(!(this.el.offsetParent instanceof HTMLElement))break;o=this.el.offsetLeft+parseInt(this.el.style["margin-left"]||"0"),this.elPopup.style.right=this.el.offsetParent.offsetWidth-this.el.offsetWidth-o+"px";break;case"fixed":this.addEventListenerWithUnmount(window,"resize",()=>this.onResize()),this.onResize();break;default:(b=this.options.posBy)==null||b.append(this.elPopup)}const e=this.elPopup.getBoundingClientRect();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");let n=!1,r=!1,a=!1,h=!1,d=e.left>window.innerWidth/2,f=e.top>window.innerHeight/2;p===4&&(d=!d),p===1&&(f=!f);const l=(w=this.elPopupInner)==null?void 0:w.getBoundingClientRect();let u,m;if(l){u=window.innerWidth-l.right,m=window.innerHeight-l.bottom;const v=8;l.top<v&&(n=!0),u<v&&(r=!0),m<v&&(a=!0),l.left<v&&(h=!0)}n&&(p===0||p===1)&&f&&(p=3),a&&p===3&&f&&(p=1),r&&p===2&&d&&(p=4),h&&p===4&&d&&(p=2),r&&(p===0||p===1||p===3)&&this.elPopup.classList.add("invert-x"),a&&(p===2||p===4)&&f&&(p===2&&!d&&this.elPopup.classList.add("invert-y"),p===4&&!d&&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.TopPopupWorker.scrollToActive(this.elPopup)}onTouchmove(t){var p,o,e;if(t.currentTarget instanceof HTMLElement&&t.target instanceof HTMLElement){if(t.currentTarget.scrollWidth>t.currentTarget.offsetWidth||(p=t.target.parentElement)!=null&&p.scrollWidth&&((o=t.target.parentElement)!=null&&o.offsetWidth)&&t.target.parentElement.scrollWidth>((e=t.target.parentElement)==null?void 0:e.offsetWidth))return;t.currentTarget.matches(".has_scroll")||t.preventDefault()}}close(){var t;this.isClosed||(this.isClosed=!0,this.$&&c.Core.$&&this.elPopup&&this.$.trigger("afterclose.top-menu-popup",[c.Core.$(this.elPopup)]),!s.TopPopupWorker.noClose&&(this.unmount(),(t=this.elPopup)==null||t.classList.add("top-popup-wrapper-closed"),setTimeout(()=>{var e,n,r,a,h;if(this.vueClose(),!this.elPopup)return;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(),(h=this.elPopupInner)==null||h.replaceWith(...this.elPopupInner.childNodes),i.default.storageClear(this.elPopup)):(i.default.storageClear(this.elPopup),this.elPopup.remove(),delete this.elPopup);const p=s.TopPopupWorker.getAllVisible(),o=p.length&&p[p.length-1];o?s.TopPopupWorker.getPopup(o).focus():document.documentElement.classList.remove("with_popup")},this.options.transitionDuration)))}async vueOpen(){var t;await((t=this.vueGetComponent())==null?void 0:t.onOpen(this))}vueClose(){var t;(t=this.vueGetComponent())==null||t.onClose(this)}vueGetComponent(){if(this.el instanceof HTMLElement&&this.options.id)return s.TopPopupWorker.vueConnectors.get(this.options.id)}}_.init(),x.TopLibPopup=g,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
2
- //# sourceMappingURL=popup-ClgV8wY0.amd.js.map