vgapp 0.5.3 → 0.5.4

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.
@@ -1,7 +1,7 @@
1
1
  import BaseModule from "../../base-module";
2
2
  import {
3
3
  isDisabled,
4
- isEmptyObj, isObject,
4
+ isEmptyObj, isObject, isVisible,
5
5
  mergeDeepObject,
6
6
  noop,
7
7
  normalizeData,
@@ -54,8 +54,6 @@ class VGSelect extends BaseModule {
54
54
  placeholder: '',
55
55
  }, params));
56
56
 
57
- element.parentElement.style.position = 'relative';
58
-
59
57
  this._drop = Selectors.find('.' + CLASS_NAME_DROPDOWN, this._element);
60
58
  this.refresh();
61
59
  }
@@ -148,19 +146,21 @@ class VGSelect extends BaseModule {
148
146
  }
149
147
  }
150
148
 
151
- static build(selector, reBuild) {
149
+ static build(selector, reBuild = false) {
152
150
  let option_selected,
153
151
  placeholder = selector.dataset.placeholder || '',
154
152
  isPlaceholder = !!placeholder,
155
153
  isSearch = selector.dataset.search || false;
156
154
 
157
- if (selector.dataset?.inited === 'true' && !reBuild) {
158
- return;
159
- } else if (reBuild) {
155
+ if (selector.dataset?.inited === 'true' || reBuild) {
160
156
  VGSelect.destroy(selector);
161
157
  }
162
158
 
163
- let isSelectedOption = [...selector.options].filter(el => Manipulator.has(el, 'selected')).length > 0;
159
+ selector.parentElement.style.position = 'relative';
160
+
161
+ let isSelectedOption = [... selector.options].filter(el => {
162
+ return Manipulator.has(el, 'selected') && el.value !== ''
163
+ }).length > 0;
164
164
 
165
165
  if (isPlaceholder && selector.selectedIndex === -1) {
166
166
  option_selected = '<span class="' + CLASS_NAME_PLACEHOLDER + '">' + placeholder + '<span>';
@@ -325,7 +325,8 @@ class VGSelect extends BaseModule {
325
325
  }
326
326
 
327
327
  static destroy(select) {
328
- let element = select.nextElementSibling;
328
+ let element = Selectors.next(select, '.' + CLASS_NAME_CONTAINER);
329
+ element = element.shift();
329
330
 
330
331
  if (element) {
331
332
  if (element.classList.contains(CLASS_NAME_CONTAINER)) {
package/build/vgapp.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see vgapp.js.LICENSE.txt */
2
- var vg;(()=>{"use strict";var e={d:(t,s)=>{for(var a in s)e.o(s,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}e.r(t),e.d(t,{VGAlert:()=>Le,VGCollapse:()=>je,VGDropdown:()=>Qe,VGFormSender:()=>ct,VGLawCookie:()=>yt,VGLoadMore:()=>At,VGModal:()=>Tt,VGNav:()=>zt,VGRollup:()=>Jt,VGSelect:()=>bs,VGSidebar:()=>Ns,VGSpy:()=>Xs,VGTabs:()=>wa,VGToast:()=>Ia});const a=e=>!!r(e)&&void 0!==e.nodeType,i=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"));function n(e){if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),s=e.closest("details:not([open])");if(!s)return t;if(s!==e){const t=e.closest("summary");if(t&&t.parentNode!==s)return!1;if(null===t)return!1}return t}function r(e){return e&&"object"==typeof e}function o(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function l(...e){const t=e=>e&&"object"==typeof e;if(t)return e.reduce(((e,s)=>(Object.keys(s).forEach((a=>{const i=e[a],n=s[a];Array.isArray(i)&&Array.isArray(n)?e[a]=i.concat(...n):t(i)&&t(n)?e[a]=l(i,n):e[a]=n})),e)),{})}function d(e,t=[],s=e){return"function"==typeof e?e(...t):s}const c="transitionend",h=e=>{e.offsetHeight},m=()=>{};function p(e=7){let t="";let s=0;for(;s<e;)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random())),s+=1;return t}function u(e,t){let s,a="й ц у к е н г ш щ з х ъ ф ы в а п р о л д ж э я ч с м и т ь б ю".split(/ +/g),i="q w e r t y u i o p [ ] a s d f g h j k l ; ' z x c v b n m , .".split(/ +/g);for(s=0;s<a.length;s++)e=(e=e.split(t?i[s]:a[s]).join(t?a[s]:i[s])).split(t?i[s].toUpperCase():a[s].toUpperCase()).join(t?a[s].toUpperCase():i[s].toUpperCase());return e}const g=()=>"rtl"===document.documentElement.dir,_=e=>{let t=e.getAttribute("data-vg-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t?t.split(",").map((e=>(e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e))(e))).join(","):null},f={find:(e,t=document.documentElement)=>a(e)?e:Element.prototype.querySelector.call(t,e),findAll:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),getSelectorFromElement(e){const t=_(e);return t&&f.find(t)?t:null},getElementFromSelector(e){const t=_(e);return t?f.find(t):null},getMultipleElementsFromSelector(e){const t=_(e);return t?f.findAll(t):[]},parents(e,t){const s=[];let a=e.parentNode.closest(t);for(;a;)s.push(a),a=a.parentNode.closest(t);return s},next(e,t){let s=e.nextElementSibling;for(;s;){if(s.matches(t))return[s];s=s.nextElementSibling}return[]},prev(e,t){let s=e.previousElementSibling;for(;s;){if(s.matches(t))return[s];s=s.previousElementSibling}return[]}},v=f,b=new Map,w={set(e,t,s){b.has(e)||b.set(e,new Map);const a=b.get(e);a.has(t)||0===a.size?a.set(t,s):console.error(`VGApp не допускает более одного экземпляра для каждого элемента. Связанный экземпляр: ${Array.from(a.keys())[0]}.`)},get:(e,t)=>b.has(e)&&b.get(e).get(t)||null,remove(e,t){if(!b.has(e))return;const s=b.get(e);s.delete(t),0===s.size&&b.delete(e)}},y={get(e,t="data",s=!0){if(!e)return{};if("data"===t){let t=["data-vg-toggle","data-vg-target","data-vg-dismiss"],a={},i=[].filter.call(e.attributes,(function(e){return/^data-/.test(e.name)}));return i.length&&i.forEach((function(e){let i=e.name;t.includes(i)||(s&&(i=i.slice(5)),a[i]=o(e.value))})),a}return"all"===t?e.getAttributeNames().reduce(((t,s)=>({...t,[s]:e.getAttribute(s)})),{}):e.getAttribute(t)},has:(e,t)=>e.hasAttribute(t),set(e,t,s){a(e)&&t&&e.setAttribute(t,s)},remove(e,t){a(e)&&t&&e.removeAttribute(t)},hide(e){e.style.display="none"},show(e,t="block"){e.style.display=t}},L=class{constructor(e,t=null){this._params=this.merge(e,t)}get(){return this._params}fromElement(e){return a(e)?y.get(e):{}}merge(e,t){let s=l(e,this.fromElement(t));for(let e in s)if(-1!==e.indexOf("-")){let t=e.split("-"),a=o(s[e]);t[0]in s&&t[1]in s[t[0]]&&(s[t[0]][t[1]]=a),delete s[e]}return"params"in s&&(s=l(s,s.params),delete s.params),s}},k=/[^.]*(?=\..*)\.|.*/,x=/\..*/,E=/::\d+$/,A={};let T=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","submit","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","popstate","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function M(e,t){return t&&`${t}::${T++}`||e.uidEvent||T++}function O(e){const t=M(e);return e.uidEvent=t,A[t]=A[t]||{},A[t]}function $(e,t,s=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===s))}function I(e,t,s){const a="string"==typeof t,i=a?s:t||s;let n=(r=(r=e).replace(x,""),C[r]||r);var r;return S.has(n)||(n=e),[a,i,n]}function N(e,t,s,a,i){if("string"!=typeof t||!e)return;let[n,r,o]=I(t,s,a);if(t in C){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=O(e),d=l[o]||(l[o]={}),c=$(d,r,n?s:null);if(c)return void(c.oneOff=c.oneOff&&i);const h=M(r,t.replace(k,"")),m=n?function(e,t,s){return function a(i){const n=e.querySelectorAll(t);for(let{target:r}=i;r&&r!==this;r=r.parentNode)for(const o of n)if(o===r)return H(i,{delegateTarget:r}),a.oneOff&&D.off(e,i.type,t,s),s.apply(r,[i])}}(e,s,r):function(e,t){return function s(a){return H(a,{delegateTarget:e}),s.oneOff&&D.off(e,a.type,t),t.apply(e,[a])}}(e,r);m.delegationSelector=n?s:null,m.callable=r,m.oneOff=i,m.uidEvent=h,d[h]=m,e.addEventListener(o,m,n)}function P(e,t,s,a,i){const n=$(t[s],a,i);n&&(e.removeEventListener(s,n,Boolean(i)),delete t[s][n.uidEvent])}function j(e,t,s,a){const i=t[s]||{};for(const[n,r]of Object.entries(i))n.includes(a)&&P(e,t,s,r.callable,r.delegationSelector)}function H(e,t={}){for(const[s,a]of Object.entries(t))try{e[s]=a}catch{Object.defineProperty(e,s,{configurable:!0,get:()=>a})}return e}const D={on(e,t,s,a){N(e,t,s,a,!1)},one(e,t,s,a){N(e,t,s,a,!0)},off(e,t,s,a){if("string"!=typeof t||!e)return;const[i,n,r]=I(t,s,a),o=r!==t,l=O(e),d=l[r]||{},c=t.startsWith(".");if(void 0===n){if(c)for(const s of Object.keys(l))j(e,l,s,t.slice(1));for(const[s,a]of Object.entries(d)){const i=s.replace(E,"");o&&!t.includes(i)||P(e,l,r,a.callable,a.delegationSelector)}}else{if(!Object.keys(d).length)return;P(e,l,r,n,i?s:null)}},trigger(e,t,s){if("string"!=typeof t||!e)return null;const a=H(new Event(t,{bubbles:!0,cancelable:!0}),s);return e.dispatchEvent(a),a}},q=D,R=e=>({error:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-success" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-2" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(252, 191, 191, .5)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-error-circle" stroke="#F74444" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-error-line1" d="M22.244224,22 L60.4279902,60.1837662" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path><path class="ui-error-line2" d="M60.755776,21 L23.244224,59.8443492" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path></g></g></svg>',success:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-error" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(117, 183, 152, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-success-circle" id="Oval-2" stroke="#A5DC86" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><polyline class="ui-success-path" id="Path-2" stroke="#A5DC86" stroke-width="4" points="19 38.8036813 31.1020744 54.8046875 63.299221 28"></polyline></g></g></svg>',waiting:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-waiting" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(255, 218, 106, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-waiting-circle" id="Oval-2" stroke="#ffda6a" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-waiting-line1" d="M43 63C54.598 63 64 53.598 64 42C64 30.402 54.598 21 43 21C31.402 21 22 30.402 22 42C22 53.598 31.402 63 43 63Z" stroke-width="3" stroke="#ffda6a" stroke-linecap="round" stroke-linejoin="round"/><path class="ui-waiting-line2" d="M40.6667 32.6641V44.3307H52.3334" stroke="#ffda6a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots-vertical" viewBox="0 0 16 16"><path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>',cross:'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 224.512 224.512" xml:space="preserve"><g><polygon points="224.507,6.997 217.521,0 112.256,105.258 6.998,0 0.005,6.997 105.263,112.254 0.005,217.512 6.998,224.512 112.256,119.24 217.521,224.512 224.507,217.512 119.249,112.254 "/></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>'}[e]??{}),F=(e,t="hide")=>{const s=`click.dismiss.${e.EVENT_KEY}`,a=e.NAME;q.on(document,s,`[data-vg-dismiss="${a}"]`,(function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),i(this))return;const n=v.getSelectorFromElement(this)||this.closest(`.vg-${a}`);e.getOrCreateInstance(n)[t]()}))},B={x:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;let e,t=["MSXML2.XmlHttp.6.0","MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"];for(let s=0;s<t.length;s++)try{e=new ActiveXObject(t[s]);break}catch(e){}return e},send:function(e,t,s,a,i){void 0===i&&(i=!0);let n=B.x();n.open(s,e,i),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t("success",{text:n.statusText,response:n.responseText,code:n.status}):t("error",{text:n.statusText,response:n.responseText,code:n.status}))},n.send(a)},get:function(e,t,a,i){let n=[];if(!s(t))for(let e in t)console.log(e),n.push(encodeURIComponent(e)+"="+encodeURIComponent(t[e]));let r="";n.length&&(r+=e.includes("?")?"&":"?",r+=n.join("&")),B.send(e+r,a,"GET",null,i)},post:function(e,t,s,a){B.send(e,s,"POST",t,a)}},z=class{constructor(e,t,s={}){this._params=l({enable:!1,in:"animate__backInUp",out:"animate__backOutUp",delay:0,duration:800},s),this.classes={animated:"animate__animated",duration:"animate__duration-"+this._params.duration},this._params.enable&&a(e)&&(this._element=e,this._name_key=t,this._element.classList.contains(this.classes.animated)||(this._element.classList.add(this.classes.animated),this._element.classList.add(this.classes.duration)),this._triggers())}_triggers(){q.on(this._element,this._name_key+".show",(()=>{this._element.classList.remove(this._params.out),this._element.classList.add(this._params.in)})),q.on(this._element,this._name_key+".hide",(()=>{this._element.classList.remove(this._params.in),this._element.classList.add(this._params.out)})),q.on(this._element,this._name_key+".hidden",(()=>{this._element.classList.remove(this._params.out)}))}},Y=class{constructor(e){if(e){if(this._element=v.find(e),!this._element)throw new Error("Товарищ! Первый параметр не должен быть пустым!");this._params={},this._isLoaded=!1,w.set(this._element,this.constructor.NAME_KEY,this)}}_getParams(e,t){return new L(t,e).get()}dispose(){w.remove(this._element,this.constructor.NAME_KEY),q.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_route(e){const t=this;let s=null;if(t._isLoaded)return;const a=e=>{s&&(s.innerHTML=e)};t._params.hasOwnProperty("ajax")&&t._params.ajax.route&&(!1 in t._params.ajax&&(t._params.ajax.method="get"),"target"in t._params.ajax&&t._params.ajax.target&&(s=v.find(t._params.ajax.target)),"loader"in t._params.ajax&&t._params.ajax.loader&&"output"in t._params.ajax&&t._params.ajax.output&&a('<div class="vg-loader"></div>'),B[t._params.ajax.method](t._params.ajax.route,t._params.ajax.data||{},(function(i,n){"once"in t._params.ajax&&t._params.ajax.once&&(t._isLoaded=!0),"output"in t._params.ajax&&t._params.ajax.output&&a(n.response),d(e,[i,n,s])})))}_dismissElement(){let e=R("cross"),t=this._element.querySelector(".vg-btn-close");t&&(t.querySelector("svg")||t.insertAdjacentHTML("beforeend",e))}_queueCallback(e,t,s=!0,a){!function(e,t,s=!0,a){if(!s)return void d(e);const i=a||(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:s}=window.getComputedStyle(e);const a=Number.parseFloat(t),i=Number.parseFloat(s);return a||i?(t=t.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(s))):0})(t)+5;let n=!1;const r=({target:s})=>{s===t&&(n=!0,t.removeEventListener(c,r),d(e))};t.addEventListener(c,r),setTimeout((()=>{n||(e=>{e.dispatchEvent(new Event(c))})(t)}),i)}(e,t,s,a)}_animation(e,t,s={}){new z(e,t,s)}static getInstance(e){return w.get(v.find(e),this.NAME_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,s(t)?{}:t)}static get DATA_KEY(){return`vg.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}},X=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",K=".sticky-top",V="padding-right",U="margin-right",G=class{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,V,(t=>t+e)),this._setElementAttributes(X,V,(t=>t+e)),this._setElementAttributes(K,U,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,V),this._resetElementAttributes(X,V),this._resetElementAttributes(K,U)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,s){const a=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+a)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${s(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const s=e.style.getPropertyValue(t);s&&y.get(e,t,s)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const s=y.get(e,t);null!==s?(y.remove(e,t),e.style.setProperty(t,s)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const s of v.findAll(e,this._element))t(s)}},W=class{static append(){document.body.style.paddingRight=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+"px",document.body.style.overflow="hidden"}static destroy(){document.body.style.overflow="",document.body.style.paddingRight="",y.get(document.body,"style")||y.remove(document.body,"style")}},J="vg-backdrop",Z="fade";class Q{static show(e){Q._append(),d(e)}static hide(e){Q._destroy(),d(e)}static _append(){if(v.find("."+J))return!1;let e=document.createElement("div");e.classList.add(J),document.body.append(e),setTimeout((()=>{e.classList.add(Z)}),50),q.on(e,"mousedown.vg.backdrop",(()=>{Q.hide(),W.destroy()}))}static _destroy(){let e=v.find("."+J);e&&(e.classList.remove(Z),setTimeout((()=>{e.remove()}),500))}}const ee=Q,te="vg.modal",se="vg-modal-open",ae="show",ie="vg-modal-static",ne=`${te}.hide`,re=`${te}.hidden`,oe=`${te}.show`,le=`${te}.shown`,de=`${te}.resize`,ce=`${te}.loaded`,he=`keydown.dismiss.${te}`,me=`hidePrevented.${te}`,pe=`click.${te}.data.api`,ue=`mousedown.dismiss${te}`,ge=`click.dismiss${te}`,_e=`DOMContentLoaded.${te}.data.api`,fe=`popstate.${te}.data.api`;class ve extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,focus:!0,keyboard:!0,fields:[],hash:!1,centered:!1,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0},animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:100,duration:800},classes:{general:"vg-modal",dialog:"vg-modal-dialog",content:"vg-modal-content",header:"vg-modal-header",title:"vg-modal-title",body:"vg-modal-body",footer:"vg-modal-footer"}},t)),this._button=null,this._dialog=v.find(".vg-modal-dialog",this._element),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new G,this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,ve.NAME_KEY,this._params.animation)}static get NAME(){return"modal"}static get NAME_KEY(){return te}static init(e,t,s){ve.build(e,t,s)}static build(e,t,s){if("string"!=typeof e)return;let a=document.createElement("div");a.classList.add("vg-modal","fade"),a.id=e;let i=document.createElement("div");i.classList.add("vg-modal-dialog"),"centered"in t&&t.centered&&i.classList.add("vg-modal-dialog-centered");let n=document.createElement("div");n.classList.add("vg-modal-content");let r=document.createElement("button");y.set(r,"type","button"),y.set(r,"data-vg-dismiss","modal"),y.set(r,"data-vg-target","#"+e),y.set(r,"aria-label","close"),r.classList.add("vg-btn-close"),n.append(r);let o=document.createElement("div");o.classList.add("vg-modal-body"),n.append(o),i.append(n),a.append(i),document.body.append(a);const l=ve.getOrCreateInstance(a,t);return d(s,[l]),l}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(this._params=this._getParams(e,this._params),t._route((function(e,s){q.trigger(t._element,ce,{stats:e,data:s})})),q.trigger(this._element,oe,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),q.on(window,fe,(()=>{this.hide()}))),this._scrollBar.hide(),document.body.classList.add(se),this._addFieldsInModal(e),this._adjustDialog(),ee.show((()=>this._showElement(e)))))}hide(e=[]){this._isShown&&!this._isTransitioning&&(q.trigger(this._element,ne).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,setTimeout((()=>{this._element.classList.remove(ae),this._queueCallback((()=>this._hideModal(e)),this._element,this._isAnimatedFade())}),this._params.animation.delay)))}_hideModal(e){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,e.length||(this._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),ee.hide((()=>{document.body.classList.remove(se),this._resetAdjustments(),this._scrollBar.reset(),q.trigger(this._element,re)})))}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=v.find(".vg-modal-body",this._dialog);t&&(t.scrollTop=0),h(this._element),this._element.classList.add(ae),this._queueCallback((()=>{this._isTransitioning=!1,q.trigger(this._element,le,{relatedTarget:e})}),this._dialog,this._isAnimatedFade())}_isAnimatedFade(){return this._element.classList.contains("fade")}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),s=t>0;if(s&&!e){const e=g()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!s&&e){const e=g()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}_addEventListeners(){q.on(this._element,he,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():this._triggerBackdropTransition())})),q.on(window,de,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),q.on(this._element,ue,(e=>{q.one(this._element,ge,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._params.backdrop?this._params.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_triggerBackdropTransition(){if(q.trigger(this._element,me).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(ie)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(ie),this._queueCallback((()=>{this._element.classList.remove(ie),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog))}_addFieldsInModal(e){this._params=this._getParams(e,this._params),this._params.fields.length&&this._params.fields.forEach((e=>{if(!1 in e&&!1 in e)return;let t=v.findAll("[data-"+e.name+"]",this._element);if(t.length)for(const s of t)switch(s.tagName){case"INPUT":s.value=e.value;break;case"IMG":y.set(s,"src",e.value);break;default:s.innerHTML=e.value}}))}}F(ve),q.on(document,pe,'[data-vg-toggle="modal"]',(function(e){const t=v.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),q.one(t,oe,(e=>{e.defaultPrevented}));const s=v.find(".vg-modal.show");s&&ve.getInstance(s).hide([s]),ve.getOrCreateInstance(t).toggle(this)})),q.on(document,_e,(function(){let e=window.location.hash.slice(1);if(e){let t=v.find("#"+e);if(t&&t.classList.contains("vg-modal")){if(i(t))return;ve.getOrCreateInstance(t).toggle()}}}));const be=ve,we="vg.alert",ye=`click.${we}.data.api`;q.on(document,ye,'[data-vg-toggle="alert"]',(function(e){}));const Le=class extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({modal:{centered:!1,backdrop:!0,overflow:!0,keyboard:!0,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:0}},toast:{},elements:{button:""},dialog:"modal",mode:"alert"},t))}static get NAME(){return"alert"}static get NAME_KEY(){return we}static run(...e){}toggle(e){}promise(e){}_build(){return"modal"===this._params.dialog?this._buildModal():"toast"===this._params.dialog?this._buildToast():void 0}_buildModal(){let e="vg-alert-"+p(),t=v.find(".vg-alert-modal");return t&&t.remove(),be.build(e,this._params.modal,(e=>{let t=e._element;t.classList.add("vg-alert-modal");let s=v.find(".vg-modal-body",t);if(s){let e='<div class="message">'+this._params.message+"</div>";e+='<div class="buttons">',this._params.elements.button&&(e+='<a href="#" data-vg-dismiss="modal" class="btn btn-primary">'+this._params.elements.button+"</a>"),e+="</div>",s.innerHTML=e}}))}_buildToast(){}},ke="vg.collapse",xe="show",Ee="vg-collapse",Ae="vg-collapsing",Te=`:scope .${Ee} .${Ee}`,Ce='[data-vg-toggle="collapse"]',Se=`${ke}.hide`,Me=`${ke}.hidden`,Oe=`${ke}.show`,$e=`${ke}.shown`,Ie=`click.${ke}.data.api`;class Ne extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({toggle:!0,parent:null,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._isTransitioning=!1,this._triggerArray=[];const s=v.findAll(Ce);for(const e of s){const t=v.getSelectorFromElement(e),s=v.findAll(t).filter((e=>e===this._element));null!==t&&s.length&&this._triggerArray.push(e)}this._initializeChildren(),this._params.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._params.toggle&&this.toggle()}static get NAME(){return"collapse"}static get NAME_KEY(){return ke}toggle(e){return this._isShown()?this.hide():this.show(e)}show(){const e=this;if(e._isTransitioning||e._isShown())return;let t=[];if(!(e._params.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Ne.getOrCreateInstance(e,{toggle:!1})))),t.length&&t[0]._isTransitioning||q.trigger(e._element,Oe).defaultPrevented)){for(const e of t)e.hide();e._element.classList.remove(Ee),e._element.classList.add(Ae),e._element.style.height=0,e._addAriaAndCollapsedClass(e._triggerArray,!0),e._isTransitioning=!0,e._route(),e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(Ae),e._element.classList.add(Ee,xe),e._element.style.height="",q.trigger(e._element,$e)}),e._element,!0),e._element.style.height=`${e._element.scrollHeight}px`}}hide(){const e=this;if(!e._isTransitioning&&e._isShown()&&!q.trigger(e._element,Se).defaultPrevented){e._element.style.height=`${this._element.getBoundingClientRect().height}px`,h(e._element),e._element.classList.add(Ae),e._element.classList.remove(Ee,xe);for(const t of e._triggerArray){const s=v.getElementFromSelector(t);s&&!e._isShown(s)&&e._addAriaAndCollapsedClass([t],!1)}e._isTransitioning=!0,e._element.style.height="",e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(Ae),e._element.classList.add(Ee),q.trigger(e._element,Me)}),e._element,!0)}}dispose(){super.dispose()}_isShown(e=this._element){return e.classList.contains(xe)}_addAriaAndCollapsedClass(e,t){if(e.length)for(const s of e)this._changeStateButton(s,t)}_initializeChildren(){if(!this._params.parent)return;const e=this._getFirstLevelChildren(Ce);for(const t of e){const e=v.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=v.find(Te,this._params.parent);return v.find(e,this._params.parent).filter((e=>!t.includes(e)))}_changeStateButton(e,t){e.classList.toggle("vg-collapsed",!t),e.setAttribute("aria-expanded",t),e.innerHTML=y.get(e,`data-${t?"hide":"show"}-text`)||e.innerHTML}}q.on(document,Ie,Ce,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault(),v.getMultipleElementsFromSelector(this).forEach((function(e){Ne.getOrCreateInstance(e,{toggle:!1}).toggle()}))}));const Pe=Ne,je=Pe,He=class{constructor(e={}){this.params=l({element:null,drop:null},e)}_getPlacement(){const e=this,t=e=>{let s=e.parentNode,a=getComputedStyle(s).overflow;return"BODY"===s.tagName?null:"visible"!==a?s:void t(s)};let s,a,i=!1,n=e.params.drop.getBoundingClientRect(),r=e.params.element.getBoundingClientRect();if(t(e.params.element))i=!0,s=n.top,a=n.left;else{let t=getComputedStyle(e.params.drop);s=o(t.top.slice(0,-2)),a=o(t.left.slice(0,-2))}return n.left+n.width>window.innerWidth&&(a=r.width-n.width),{isFixed:i,top:s,left:a}}},De="vg.dropdown",qe="show",Re="fade",Fe="vg-dropdown-content",Be='[data-vg-toggle="dropdown"]',ze=`${De}.hide`,Ye=`${De}.hidden`,Xe=`${De}.show`,Ke=`${De}.shown`,Ve=`keyup.${De}.data.api`,Ue=`keydown.${De}.data.api`,Ge=`click.${De}.data.api`,We=`mouseover.${De}.data.api`,Je=`mouseout.${De}.data.api`;class Ze extends Y{constructor(e,t){super(e,t);let s={offset:[0,2],backdrop:!1,overflow:!1,keyboard:!1,placement:"bottom",timeoutAnimation:350,hover:!1,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0},animation:{enable:!1,in:"animate__flipInY",out:"animate__flipOutY",delay:800}};"offset"in t&&Array.isArray(t.offset)&&(s.offset=t.offset),this._params=this._getParams(e,l(s,t));const a=v.getElementFromSelector(this._element);this._parent=this._element.parentNode,this._drop=a||v.find("."+Fe,this._parent),this._isPlacement=!1,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._drop,Ze.NAME_KEY,this._params.animation)}static get NAME(){return"dropdown"}static get NAME_KEY(){return De}toggle(){return this._isShown()?this.hide():this.show()}show(){if(i(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!q.trigger(this._element,Xe,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.on(e,"mouseover",m);this._route(),this._element.setAttribute("aria-expanded",!0),this._element.classList.add(qe),this._drop.classList.add(qe),this._setPlacement(),this._params.backdrop&&!this._params.hover&&ee.show(),this._params.overflow&&(W.append(),document.body.classList.add("dropdown-open")),this._queueCallback((()=>{this._drop.classList.add(Re),q.trigger(this._element,Ke,e)}),this._drop,!0,50)}}hide(){if(i(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){return super.dispose()}_isShown(){return this._element.classList.contains(qe)}_completeHide(e){if(!q.trigger(this._element,ze,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.off(e,"mouseover",m);if(this._drop.classList.remove(Re),this._element.classList.remove(qe),this._element.setAttribute("aria-expanded","false"),this._params.backdrop&&!this._params.hover){const e=this;ee.hide((function(){e._params.overflow&&W.destroy()}))}this._params.overflow&&(W.destroy(),document.body.classList.remove("dropdown-open")),setTimeout((()=>{this._queueCallback((()=>{this._drop.classList.remove(qe),q.trigger(this._element,Ye,e)}),this._parent,!0,10)}),this._params.animation.delay)}}_setPlacement(){const e=this;if(!e._isPlacement){let t=new He({element:this._parent,drop:this._drop})._getPlacement();t.isFixed&&(e._drop.style.position="fixed",e._drop.style.transform="translateY(-20%)"),e._drop.style.left=t.left+"px",e._drop.style.top=t.top+"px"}e._params.offset&&(e._drop.style.paddingTop=e._params.offset[1]+"px",e._drop.style.paddingRight=e._params.offset[0]+"px"),e._isPlacement=!0}static init(e,t={}){const s=Ze.getOrCreateInstance(e,t);if(s._params.hover){let e=null;q.on(s._parent,We,(function(t){if(e)return;Ze.hideOpenToggles(t);let a=t.target.closest(".vg-dropdown");a&&s._parent.contains(a)&&(e=a,s.show())})),q.on(s._parent,Je,(function(t){if(!e)return;let a=t.relatedTarget;for(;a;){if(a===e)return;a=a.parentNode}e=null,s._completeHide({relatedTarget:s._element})}))}else q.on(document,Ve,Be,Ze.keydownHandler),q.on(document,Ue,"."+Fe,Ze.keydownHandler),q.on(document,Ve,Ze.clearDrops),q.on(document,Ge,Ze.clearDrops),q.on(e,Ge,(function(e){e.preventDefault(),s.toggle()}))}static hideOpenToggles(e){const t=v.findAll('[data-vg-toggle="dropdown"]:not(.disabled):not(:disabled).show');for(const s of t){const t=Ze.getInstance(s);if(!t)continue;if(e.target.closest("."+Fe)===t._drop)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static keydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),s="Escape"===e.key,a=["ArrowUp","ArrowDown"].includes(e.key);if(!a&&!s)return;if(t&&!s)return;e.preventDefault();const i=this.matches(Be)?this:v.find(Be,e.delegateTarget.parentNode),n=Ze.getOrCreateInstance(i);if(a)return e.stopPropagation(),void n.show();n._isShown()&&(e.stopPropagation(),n.hide(),i.focus())}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||Ze.hideOpenToggles(e)}}const Qe=Ze,et=[{type:"pass-open",template:'<span data-vg-toggle="pass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/></svg></span>'},{type:"pass-close",template:'<span data-vg-toggle="pass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"/></svg></span>'},{type:"loader",template:'<div class="vg-loader"></div>'}],tt=class{constructor(e,t={}){if(!e)throw new Error("Element is required");this._element=e,this._params=l({insert:"afterend",classes:[]},t)}render(e,t){let s=this.toHTML(e,t);"afterend"===this._params.insert&&this._element.insertAdjacentHTML("afterend",s)}toHTML(e=0,t){let s="";for(const e of et)e.type===this._params.template&&(s=e.template);if(s)return s=s.replace("[[classes]]",this._params.classes.join(" ")),d(t,[this._element,this._params,s]),s}setContent(){}},st="vg.hideshowpass",at="show",it=`click.${st}.data.api`;class nt extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({},t))}static get NAME(){return"hideshowpass"}static get NAME_KEY(){return st}toggle(e){return this._isShown()?this.hide(e):this.show(e)}show(e){e&&(this._params=this._getParams(e,this._params)),this._element.classList.add(at),e.remove(),this.build(!0),y.set(this._element,"type","text")}hide(e){this._element.classList.remove(at),e.remove(),this.build(!1),y.set(this._element,"type","password")}_isShown(){return this._element.classList.contains(at)}static init(e,t){nt.getOrCreateInstance(e,t).build(!1)}build(e=!1){this._params.template=e?"pass-open":"pass-close",new tt(this._element,this._params).render()}}q.on(document,it,'[data-vg-toggle="pass"]',(function(e){const t=v.prev(this,"input");t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),nt.getOrCreateInstance(t.shift()).toggle(this)))}));const rt=nt,ot="vg.fs",lt=`submit.${ot}.data.api`;class dt extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({response:{enabled:!1,errors:!1,title:"",message:""},redirect:{error:"",success:""},validate:!1,submit:!1,fields:[],timeout:50,pass:{enabled:!0,template:"pass-open",classes:["vg-form-sender--hide-show-pass"],insert:"afterend"},alert:{enabled:!0,type:"modal",errors:!0,delay:0},ajax:{route:"",target:"",method:"get"},classes:{general:"vg-form-sender",alertCollapse:"vg-form-sender-collapse",alertModal:"vg-form-sender-modal",validation:"needs-validation",wasValidate:"was-validated",content:"vg-form-sender--content"},callback:{afterInit:m,afterSuccess:m,afterError:m},interceptors:{success:!1,error:!1}},t)),this._params.ajax.route=y.get(this._element,"action").toLowerCase(),this._params.ajax.method=y.get(this._element,"method").toLowerCase(),this._button=v.find('[type="submit"]',this._element)||v.find('[form="'+this._element.id+'"]')||null,this._params.isBtnText="false"!==y.get(this._element,"data-btn-text"),this._params.isJsonParse="false"!==y.get(this._element,"data-json-parse"),this._params.isShowPass="true"===y.get(this._element,"data-show-pass")}static get NAME(){return"form-sender"}static get NAME_KEY(){return ot}build(){return this._element.classList.add(this._params.classes.general),[...v.findAll("input, textarea, select",this._element)].forEach((e=>{n(e)&&e.parentElement.classList.add(this._params.classes.content)})),this._params.validate&&(y.set(this._element,"novalidate",""),this._element.classList.add(this._params.classes.validation)),this._params.pass.enabled&&[...v.findAll('input[type="password"]',this._element)].forEach((e=>{rt.init(e,this._params.pass)})),d(this._params.callback.afterInit,[this._element,this]),this}request(e,t){const s=this;s._alertBefore(),s._params.ajax.data=e,s._route((function(e,a){s._element.classList.remove("was-validated"),s._params.response.enabled&&(a.response=s._params.response),s._params.alert.enabled&&("string"==typeof e&&"error"===e?s._params.redirect.error?window.location.href=s._params.redirect.error:(s._params.interceptors.error||s._alertError(t,a),d(s._params.callback.afterError,[s._element,s,t,a])):"string"==typeof e&&"success"===e&&(s._params.redirect.success?window.location.href=s._params.redirect.success:(s._params.interceptors.success||s._alertSuccess(t,a),d(s._params.callback.afterSuccess,[s._element,s,t,a]))))}))}_alertBefore(){const e=this;"collapse"===e._params.alert.type&&[...document.getElementsByClassName(e._params.classes.alertCollapse)].forEach((function(e){e&&e.classList.contains("show")&&Pe.getOrCreateInstance(e,{toggle:!1}).hide()})),e._statusButton("before"),q.trigger(e._element,"vg.fs.before",e)}_alertError(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"error"),q.trigger(s._element,"vg.fs.error",[e,s,t])}_alertSuccess(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"success"),q.trigger(s._element,"vg.fs.success",[e,s,t])}_statusButton(e){const t=this;if(!t._button)return;let s=t._button,a={send:"Отправляем...",text:"Отправить"};if(y.has(t._button,"data-spinner")&&"before"===e&&t._button.insertAdjacentHTML("afterbegin",'<span class="spinner-border spinner-border-sm me-2"></span>'),y.has(t._button,"data-text"))a.text=y.get(t._button,"data-text");else{let e=t._button.querySelector("[data-text]");e&&(a.text=y.get(e,"data-text"),s=e)}if(y.has(t._button,"data-text-send"))a.send=y.get(t._button,"data-text-send");else{let e=t._button.querySelector("[data-text-send]");e&&(a.send=y.get(e,"data-text-send"),s=e)}if("before"===e&&(t._params.isBtnText&&(s.innerHTML=a.send),y.set(t._button,"disabled","disabled")),"after"===e){t._params.isBtnText&&(s.innerHTML=a.text),y.remove(t._button,"disabled");let e=t._button.querySelector(".spinner-border");e&&e.remove()}}_jsonParse(e,t){const s=this;if(s._params.isJsonParse&&"string"==typeof e){let a={};try{a=JSON.parse(e),s.alert(a,t)}catch(a){s.alert(e,t)}}else s.alert(e,t)}alert(e,t){const s=this;if(r(e)&&"code"in e&&e.code&&200===e.code&&"response"in e&&e.response){let s=o(e.response);"string"==typeof s?-1===s.indexOf("Parse error")&&-1===s.indexOf("syntax error")||(t="error",e={response:{title:"Error",message:"Something went wrong, please repeat later"},text:"Something went wrong, please repeat later"}):"errors"in s&&o(s.errors)&&(t=o(s.errors)?"error":"success")}s._params.alert.enabled&&("modal"===s._params.alert.type&&s._alertModal(e,t),"collapse"===s._params.alert.type&&s._alertCollapse(e,t))}_alertModal(e,t){const s=this;[...document.getElementsByClassName("modal")].forEach((function(e){e&&e.classList.contains("show")&&bootstrap.Modal.getOrCreateInstance(e).hide()})),[...document.getElementsByClassName("vg-modal")].forEach((function(e){if(e&&e.classList.contains("show")){const t=be.getOrCreateInstance(e);t.hide([t])}}));let a=s._params.classes.general+"-"+p(),i=v.find("."+s._params.classes.alertModal);i&&i.remove(),setTimeout((()=>{be.init(a,{classes:{alert:s._params.classes.alertModal}},(function(a){let i=a._element;i.classList.add(s._params.classes.alertModal);let n=v.find(".vg-modal-body",i);n&&n.append(s.setDataRelationStatus(i,t,e,"modal")),a.toggle(),s._params.alert.delay>0&&setTimeout((()=>{a.hide()}),s._params.alert.delay)}))}),s._params.timeout)}_alertCollapse(e,t){const s=this;let a=v.find("."+s._params.classes.alertCollapse);a||(a=document.createElement("div"),a.classList.add(s._params.classes.alertCollapse),a.classList.add("vg-collapse"),a.id=s._params.classes.general+"-"+p(),a.append(s.setDataRelationStatus(a,t,e,"collapse")),s._element.prepend(a));let i=Pe.getOrCreateInstance(a,{toggle:!1});i.toggle(),s._params.alert.delay>0&&setTimeout((()=>{i.hide()}),s._params.alert.delay)}setDataRelationStatus(e,t,s,a){let i=v.find(".vg-alert-"+t,e);if(r(s)){if("error"===t&&"code"in s&&200!==s.code&&"text"in s&&!s.text)switch(s.text="Something went wrong, please repeat later",s.code){case 400:s.text="Bad Request";break;case 401:case 403:s.text="Unauthorized";break;case 413:s.text="Forbidden";break;case 404:s.text="Not Found";break;case 422:s.text="Unprocessable Entity";break;case 500:s.text="Internal Server Error";break;case 504:s.text="Gateway Timeout"}if("response"in s){let e=o(s.response),a="",i="",n="";if("string"!=typeof e){if(!("view"in e)){if("title"in e&&(a=e.title),"error"===t&&200!==s.code&&this._params.alert.errors&&(n=" "+s.text+" ("+s.code+")"),i+=a?'<h4 class="vg-alert-content--title">'+a+"</h4>":'<h4 class="vg-alert-content--title">'+n+"</h4>","message"in e&&(i+='<div class="vg-alert-content--message">'+e.message+"</div>"),"errors"in e&&this._params.alert.errors){let t=o(e.errors)||null;if(r(t))for(const e in t)Array.isArray(t[e])?t[e].forEach((function(e){i+="<div>"+e+"</div>"})):i="<div>"+t[e]+"</div>"}s={view:i}}}else s.view=e}}if(i)v.find(".vg-alert-content--text",i).innerHTML=s.view;else{i=document.createElement("div"),i.classList.add("vg-alert","vg-alert-"+t,"vg-alert-"+a);let e=document.createElement("div");e.classList.add("vg-alert-content");let n=document.createElement("div");n.classList.add("vg-alert-content--icon");let r=document.createElement("i");r.innerHTML=R(t),n.append(r),e.append(n);let o=document.createElement("div");o.classList.add("vg-alert-content--text"),o.innerHTML=s.view,e.append(o),i.append(e)}return i}static init(e,t={}){dt.getOrCreateInstance(e,t).build()}}q.on(document,lt,(function(e){if(!y.has(e.target,"data-vgformsender"))return;const t=dt.getOrCreateInstance(e.target,{});if(t){if(t._params.validate&&!t._element.checkValidity())return e.preventDefault(),e.stopPropagation(),t._element.classList.add(t._params.classes.wasValidate),!1;if(!t._params.submit){e.preventDefault();let s=new FormData(t._element);return t.request(s,e)}}}));const ct=dt;function ht(e){for(let t=1;t<arguments.length;t++){let s=arguments[t];for(let t in s)e[t]=s[t]}return e}const mt=function e(t,s){function a(e,a,i){if("undefined"==typeof document)return;"number"==typeof(i=ht({},s,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);let n="";for(let e in i)i[e]&&(n+="; "+e,!0!==i[e]&&(n+="="+i[e].split(";")[0]));return document.cookie=e+"="+t.write(a,e)+n}return Object.create({set:a,get:function(e){if("undefined"==typeof document||arguments.length&&!e)return;let s=document.cookie?document.cookie.split("; "):[],a={};for(let i=0;i<s.length;i++){let n=s[i].split("="),r=n.slice(1).join("=");try{let s=decodeURIComponent(n[0]);if(a[s]=t.read(r,s),e===s)break}catch(e){}}return e?a[e]:a},remove:function(e,t){a(e,"",ht({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,ht({},this.attributes,t))},withConverter:function(t){return e(ht({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),pt="vg.lawcookie",ut="show",gt=`${pt}.hide`,_t=`${pt}.hidden`,ft=`${pt}.show`,vt=`${pt}.shown`,bt=`click.${pt}.data.api`;class wt extends Y{static sParams={};constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({storage:"local",delay:500,cookie:{name:"lawCookie",value:"yes",attributes:{}},animation:{enable:!0,in:"animate__fadeInUp",out:"animate__fadeOutDown",delay:800},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),wt.sParams=this._params,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,wt.NAME_KEY,this._params.animation)}static get NAME(){return"lawcookie"}static get NAME_KEY(){return pt}toggle(){return this._isShown()?this.hide():this.show()}_isShown(){return this.storage().get()}show(){i(this._element)||q.trigger(this._element,ft,{}).defaultPrevented||(this._element.classList.add(ut),this._queueCallback((()=>{q.trigger(this._element,vt,{})}),this._element,!0,this._params.delay))}hide(){q.trigger(this._element,gt).defaultPrevented||setTimeout((()=>{this._element.classList.remove(ut),this._queueCallback((()=>q.trigger(this._element,_t)),this._element,!0)}),this._params.animation.delay)}storage(){return this._storage={isCookie:"cookie"===this._params.storage,storage:"cookie"===this._params.storage?mt:localStorage,name:this._params.cookie.name,value:this._params.cookie.value,attributes:this._params.cookie.attributes},this}get(){return this._storage.isCookie?this._storage.storage.get(this._storage.name):this._storage.storage.getItem(this._storage.name)}set(){this._storage.isCookie?this._storage.storage.set(this._storage.name,this._storage.value,this._storage.attributes):this._storage.storage.setItem(this._storage.name,this._storage.value)}dispose(){super.dispose()}static reset(){mt.remove(wt.sParams.cookie.name),localStorage.clear(),location.reload()}static init(e,t={}){wt.getOrCreateInstance(e,t).toggle()}}F(wt),q.on(document,bt,'[data-vg-toggle="lawcookie"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=v.find("#vg-lawcookie");if(!t)return;const s=wt.getOrCreateInstance(t);s.storage().set(),s.hide()})),q.on(document,bt,'[data-vg-toggle="lawcookie-clear"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=v.find("#vg-lawcookie");t&&(wt.getOrCreateInstance(t).dispose(),location.reload())}));const yt=wt,Lt="vg.loadmore",kt=`${Lt}.loaded`,xt=`click.${Lt}.data.api`;class Et extends Y{constructor(e,t){super(e,t),this._params=this._getParams(e,l({limit:0,offset:0,output:!0,autohide:!0,button:{text:"",send:"Загружаем..."},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!1}},t)),this.fOffset=this._params.offset,this._params.button.text||(this._params.button.text=this._element.innerHTML)}static get NAME(){return"loadmore"}static get NAME_KEY(){return Lt}toggle(e){this._params.ajax.data={limit:this._params.limit,offset:this._params.offset},this._params.button.send&&(this._element.innerHTML=this._params.button.send),this._route(((t,s,a)=>{if("loader"in this._params.ajax&&this._params.ajax.loader){let e=v.find(".vg-loader",a);e&&e.remove()}"output"in this._params&&this._params.output&&a.insertAdjacentHTML("beforeend",s.response),this._params.offset=this.fOffset+this._params.offset,this._element.innerHTML=this._params.button.text,"autohide"in this._params&&this._params.autohide&&(s.response||this._element.remove()),q.trigger(this._element,kt,{stats:t,data:s}),d(e,[this,s,a,t])}))}}q.on(document,xt,'[data-vg-toggle="loadmore"]',(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),Et.getOrCreateInstance(this).toggle()}));const At=Et,Tt=be,Ct=class{constructor(){this.breakpoints={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600}}static check(e){return(new this).define(e)}static checkMobileOrTablet(){let e=!1;var t;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.slice(0,4)))&&(e=!0),e}define(e){let t=window.innerWidth,s=this._checkResponsiveClass(e),a=this.breakpoints,i=Object.keys(a).find((e=>a[e]===s)),n=Object.keys(a),r=n.indexOf(i);return t>=a[n[r+1]]}_checkResponsiveClass(e){let t=e._element,s=e._params,a=0;return a=t.classList.contains(s.classes.XXXL)?this.breakpoints.xxxl:t.classList.contains(s.classes.XXL)?this.breakpoints.xxl:t.classList.contains(s.classes.XL)?this.breakpoints.xl:t.classList.contains(s.classes.LG)?this.breakpoints.lg:t.classList.contains(s.classes.MD)?this.breakpoints.md:t.classList.contains(s.classes.SM)?this.breakpoints.sm:(t.classList.contains(s.classes.XS),this.breakpoints.xs),a}},St="vg.nav",Mt="show",Ot="fade",$t="active",It=`${St}.hide`,Nt=`${St}.hidden`,Pt=`${St}.show`,jt=`${St}.shown`,Ht=`mouseover.${St}.data.api`,Dt=`mouseout.${St}.data.api`,qt=`click.${St}.data.api`,Rt=`keyup.${St}.data.api`,Ft=`resize.${St}.data.api`;class Bt extends Y{constructor(e,t={}){super(e),this._params=this._getParams(e,l({breakpoint:!1,placement:"horizontal",classes:{hamburgerActive:"vg-nav-hamburger-active",hamburgerAlways:"vg-nav-hamburger-always",hamburger:"vg-nav-hamburger",container:"vg-nav-container",wrapper:"vg-nav-wrapper",active:"vg-nav-active",expand:"vg-nav-expand",cloned:"vg-nav-cloned",hover:"vg-nav-hover",flip:"vg-nav-flip",XXXL:"vg-nav-xxxl",XXL:"vg-nav-xxl",XL:"vg-nav-xl",LG:"vg-nav-lg",MD:"vg-nav-md",SM:"vg-nav-sm",XS:"vg-nav-xs"},expand:!0,hover:!1,position:!0,collapse:!0,toggle:'<span class="default"></span>',hamburger:{enable:!0,always:!1,title:"",body:null},callback:m,animation:!0,timeoutAnimation:300,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._navigation=null,this.navigation="."+this._params.classes.wrapper,this.movedLinks=[],this.$links=v.findAll("."+this._params.classes.wrapper+" > li",this.navigation),!1===this._params.animation&&(this._params.timeoutAnimation=10)}static get NAME(){return"nav"}static get NAME_KEY(){return St}get navigation(){return this._navigation}set navigation(e){let t=v.find(e,this._element);t&&(this._navigation=t)}build(){if(!this.navigation)return;let e=this._params;if(this._element.classList.add(e.classes.container),this._element.classList.add("vg-nav-"+e.placement),e.breakpoint||(e.expand=!1),e.hamburger.always?this._element.classList.add(e.classes.hamburgerAlways):e.breakpoint&&e.expand?!1!==e.breakpoint&&this._element.classList.add("vg-nav-"+e.breakpoint):this._element.classList.add(e.classes.expand),e.hover&&(this._element.classList.add(e.classes.hover),Ct.checkMobileOrTablet()&&this._element.classList.remove(e.classes.hover)),e.expand&&!e.hamburger.body&&null===v.find("."+e.classes.hamburger,this._element)){let t="",s='<span class="'+e.classes.hamburger+'--lines"><span></span><span></span><span></span></span>';e.hamburger.title&&(t='<span class="'+e.classes.hamburger+'--title">'+e.hamburger.title+"</span>"),null!==e.hamburger.body&&(s=e.hamburger.body),this._element.insertAdjacentHTML("afterbegin",'<a href="#sidebar-nav" class="'+e.classes.hamburger+'" data-vg-toggle="sidebar">'+t+s+"</a>")}if(e.toggle){let t=[...v.findAll(".dropdown-mega > a, .dropdown > a",this._element)],s='<span class="toggle">'+e.toggle+"</span>";t.length&&t.forEach((function(e){e.querySelector(".toggle")||e.closest(".dots")||(e.setAttribute("aria-expanded","false"),e.insertAdjacentHTML("beforeend",s))}))}e.collapse&&Ct.check(this)&&"vertical"!==e.placement&&function(e){let t=e.navigation.clientWidth,s=0,a=v.find(".dots",e.navigation),i=R("dots");if(e.$links.length){if(a)s=a.clientWidth;else{let t=v.find("a",e.$links[0]),a=getComputedStyle(t);s=o(a.paddingLeft.slice(0,-2))+o(a.paddingRight.slice(0,-2))+16}for(let i of e.$links)s+=i.getBoundingClientRect().width,t<s?(e.movedLinks.push(i),i.remove()):e.movedLinks.length&&(a?e.navigation.insertBefore(e.movedLinks[0],a):e.navigation.appendChild(e.movedLinks[0]),e.movedLinks.splice(0,1));e.movedLinks.length?a||e.navigation.insertAdjacentHTML("beforeend",'<li class="dropdown dots"><a href="#" aria-expanded="false">'+i+"</a></li>"):a&&a.remove();let n=e.navigation.querySelector(".dots");if(n&&e.movedLinks.length){let t=n.querySelector("ul");if(t)for(let s of e.movedLinks)t.prepend(s);else{let t=document.createElement("ul");t.classList.add("dropdown-content"),t.classList.add("right");for(let s of e.movedLinks)t.prepend(s);n.appendChild(t)}}}}(this),"afterInit"in this._params.callback&&d(this._params.callback.afterInit,[this])}show(e){let t=e.relatedTarget;if(!t||i(t))return;if(t.closest(".dropdown-content")||t.classList.add("first"),q.trigger(t,Pt,{relatedTarget:e}).defaultPrevented)return;let s=v.find(".dropdown-content",t),a=t.firstElementChild;a&&a.setAttribute("aria-expanded","true"),s.classList.add(Mt),t.classList.add($t),function(e){let{width:t,right:s}=e.getBoundingClientRect(),a=window.innerWidth-s-t;e.classList.remove("right"),e.classList.remove("left");let i=e.closest("li").querySelectorAll("ul");if(a>t)for(const e of i)e.classList.add("left");else for(const e of i)e.classList.add("right")}(s),this._queueCallback((()=>{s.classList.add(Ot),q.trigger(t,jt,e)}),s,!0,50)}hide(e){const t=this;if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.off(e,"mouseover",m);let s=e.relatedTarget;if("elm"in e&&e.elm&&(s=e.elm),s){if(q.trigger(s,It).defaultPrevented)return;s.classList.remove($t),s.classList.contains("first")&&s.classList.remove("first"),[...v.findAll("."+Mt,s)].forEach((function(s,a){s.classList.remove(Ot);let i=s.closest(".dropdown");i.classList.contains($t)&&i.classList.remove($t);let n=s.previousElementSibling;if(n&&n.setAttribute("aria-expanded","false"),0===a){const a=()=>{s.classList.remove(Mt),q.trigger(s,Nt,e)};t._queueCallback(a,s,!0,500)}}))}}static init(e,t={}){const s=Bt.getOrCreateInstance(e,t);s.build();let a=v.findAll(".dropdown",s._navigation);s._params.hover?[...a].forEach((function(e){let t=null;q.on(e,Ht,(function(e){if(t)return;Bt.hideOpenDrops(e);let a=e.target.closest(".dropdown");if(!a)return;if(!s.navigation.contains(a))return;t=a;let i={relatedTarget:a};s.show(i)})),q.on(e,Dt,(function(e){if(!t)return;let a=e.relatedTarget.closest(".dropdown"),i=t;for(;a;){if(a===t)return;a=a.parentNode}t=null,s.hide({relatedTarget:a,elm:i})}))})):(q.on(document,Rt,Bt.clearDrops),q.on(document,qt,Bt.clearDrops),q.on(document,qt,".vg-nav a",(function(e){if(!y.has(this,"aria-expanded"))return;"click"in s._params.callback&&d(s._params.callback.click,[this]),e.preventDefault();let t=this.closest(".vg-nav"),a=t.querySelector(".first"),r=this.closest(".dropdown");if(r&&(!i(r)||n(r))){if(a&&this.closest(".first")){if(r.classList.contains("active"))return void s.hide({relatedTarget:r})}else[...v.findAll(".active",t)].forEach((function(e){e&&e!==r&&s.hide({relatedTarget:e})}));s.show({relatedTarget:r})}})));const r=document.getElementById("sidebar-nav");let o=s._element.querySelector("."+s._params.classes.hamburger);r&&o&&(r.addEventListener("vg.sidebar.show",(function(){o.classList.add(s._params.classes.hamburgerActive)})),r.addEventListener("vg.sidebar.hide",(function(){o.classList.remove(s._params.classes.hamburgerActive)})))}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||Bt.hideOpenDrops(e)}static hideOpenDrops(e){const t=v.findAll(".dropdown:not(.disabled):not(:disabled).active");for(const s of t){const t=Bt.getInstance(s.closest(".vg-nav"));if(!t)continue;if(e.target.closest(".first"))return;const a={relatedTarget:s};"click"===e.type&&(a.clickEvent=e),t.hide(a)}}}q.on(window,Ft,(function(){v.find(".vg-nav")&&Bt.getOrCreateInstance(".vg-nav",{}).build()}));const zt=Bt,Yt="vg.rollup",Xt="show",Kt="vg-rollup-display--none",Vt=`${Yt}.hide`,Ut=`${Yt}.show`,Gt=`click.${Yt}.data.api`;class Wt extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({content:"text",offset:0,cnt:0,fade:!0,transition:!1,number:!1,height:0,ellipsis:{line:null},more:" еще ",button:{enable:!0,more:"Показать",less:"Свернуть"}},t)),this.classes={container:"vg-rollup",hidden:"vg-rollup-content--hidden",fade:"vg-rollup-content--fade",ellipsis:"vg-rollup-content--ellipsis",button:"vg-rollup-content--button",transition:"vg-rollup-content--transition"},this.total=0,this.count=0,this.offset=0,this.isOffset=!1,this._params.offset>0&&(this.offset=this._params.offset||0,this.isOffset=!0),this.build()}static get NAME(){return"rollup"}static get NAME_KEY(){return Yt}static toggle(e,t){const s=Wt.getOrCreateInstance(e);if(s.isShow()){let e="";if(s._params.number){let t=s.total-s.count;t>0&&(e=s._params.more+t)}t.setAttribute("aria-expanded",!1),s._element.classList.remove(Xt),t.innerHTML=s._params.button.more+e,s.switch(s._element,!0),q.trigger(s._element,Vt,{relatedTarget:t})}else s._element.classList.add(Xt),t.innerHTML=s._params.button.less,s.offset>0&&(s.isOffset?t.innerHTML=s._params.button.more:t.innerHTML=s._params.button.less),s.switch(s._element,!1),q.trigger(s._element,Ut,{relatedTarget:t})}build(e=null,t=!0){let s=this,a=e||s._element,i=a.clientHeight,n=s._params.height||i/2;a.classList.add(s.classes.container);let r=s._params.fade,o=s._params.transition,l=null!==s._params.ellipsis.line,d=s._params.button.enable,c=s._params.number;if(t||s.switch(a),i>n&&"text"===s._params.content)a.classList.add(s.classes.hidden),a.style.height=n+"px",h(),m(),p(),u();else if("elements"===s._params.content){let e=s._params.elements||"item",t=a.querySelectorAll("."+e),i=s._params.cnt||5,n=1;s.total=t.length,s.count=i;for(const e of t)n>i&&e.classList.add(Kt),n++;!0===d&&(d=n-1>i),h(),m(),p(),u()}function h(){if(l){let e=s._params.ellipsis.line;r=!1,e?(a.classList.add(s.classes.ellipsis),a.style.webkitLineClamp=e):console.log("Переменная [data-line] или параметр[line] не должны быть пустыми")}}function m(){o&&a.classList.add(s.classes.transition)}function p(){r&&a.classList.add(s.classes.fade)}function u(){if(t&&(a.setAttribute("id",a.id),d)){let e="";if(c){let t=s.total-s.count;t>0&&(e=s._params.more+t)}let t=s._params.button.more;a.insertAdjacentHTML("afterend",'<div class="'+s.classes.button+'"><a href="#" aria-expanded="false" data-vg-toggle="rollup" data-vg-target="#'+a.id+'">'+t+e+"</a></div>")}}}switch(e,t=!1){const s=this;if(t&&!s.isOffset)this.build(e,!1),this._params.offset>0&&(s.offset=this._params.offset,s.offset>0&&(this.isOffset=!0));else if(e.classList.remove(this.classes.hidden),e.classList.remove(this.classes.ellipsis),e.classList.remove(this.classes.fade),e.removeAttribute("style"),"elements"===s._params.content){let t=s._params.elements,a=v.findAll("."+t,e);a.length&&(s.offset>0?(a.slice(s.offset,s.offset+s.count).forEach((e=>e.classList.remove(Kt))),s.offset=s.offset+s._params.offset,s.offset>=a.length-s.count&&(s.isOffset=!1,s.offset=0)):a.forEach((e=>e.classList.remove(Kt))))}}isShow(){return this._element.classList.contains(Xt)}static init(e,t={},s){d(s,[Wt.getOrCreateInstance(e,t)])}}q.on(document,Gt,'[data-vg-toggle="rollup"]',(function(e){const t=v.getElementFromSelector(this);t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),Wt.toggle(t,this)))}));const Jt=Wt,Zt="vg.select",Qt="show",es="active",ts="vg-select",ss="vg-select-dropdown",as="vg-select-list",is="vg-select-list--option",ns="vg-select-list--optgroup",rs="vg-select-current",os="vg-select-current--placeholder",ls=`click.${Zt}.data.api`,ds=`keyup.${Zt}.data.api`,cs=`reset.${Zt}.data.api`,hs=`${Zt}.change`,ms=`${Zt}.hide`,ps=`${Zt}.hidden`,us=`${Zt}.show`,gs=`${Zt}.shown`,_s='[data-vg-toggle="select"]';let fs;class vs extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({search:!1,placeholder:""},t)),e.parentElement.style.position="relative",this._drop=v.find("."+ss,this._element),this.refresh()}static get NAME(){return"select"}static get NAME_KEY(){return Zt}static buildListOptions(e,t,a){let i=e.options,n=document.createElement("ul");if(a&&!([...i].filter((e=>y.has(e,"selected"))).length>0)){let e=document.createElement("option");y.set(e,"hidden",""),y.set(e,"selected",""),i.add(e,0)}n.classList.add(as);let r=e.querySelectorAll("optgroup");if(r.length){let e=!1;[...r].forEach((function(t){let s=document.createElement("ol");s.classList.add(ns);let a=document.createElement("li");a.innerHTML=t.label.trim(),a.classList.add("vg-select-list--optgroup-title"),s.prepend(a),o(v.findAll("option",t),s,e),n.append(s),e=!0}))}else o(i,n,!1);return t.append(n),n;function o(t,a,i){let n=0;for(const r of t){let t=document.createElement("li");t.innerHTML=r.innerHTML.trim().replace(/<\/[^>]+(>|$)/g,""),t.dataset.value=y.get(r,"value"),t.classList.add(is),y.set(t,"data-vg-toggle","select-option");let o=y.get(r);if(!s(o))for(const e of Object.keys(o))y.set(t,"data-"+e,o[e]);n!==e.selectedIndex||i||t.classList.add("selected"),y.has(r,"disabled")&&t.classList.add("disabled"),y.has(r,"hidden")&&t.classList.add("hidden"),a.append(t),n++}}}static build(e,t){let a,i=e.dataset.placeholder||"",n=!!i,r=e.dataset.search||!1;if("true"===e.dataset?.inited&&!t)return;t&&vs.destroy(e);let o=[...e.options].filter((e=>y.has(e,"selected"))).length>0;n&&-1===e.selectedIndex?(a='<span class="'+os+'">'+i+"<span>",y.set(e,"disabled","")):n||-1!==e.selectedIndex?a=n?n&&o?e.options[e.selectedIndex].innerText:n&&!o?'<span class="'+os+'">'+i+"<span>":n||o?'<span class="'+os+'">-<span>':e.options[e.selectedIndex].innerText:e.options[e.selectedIndex].innerText:(a='<span class="'+os+'">-<span>',y.set(e,"disabled",""));let l=y.get(e,"class"),d=document.createElement("div");l=l.split(" ");for(const e of l)d.classList.add(e);y.has(e,"disabled")&&d.classList.add("disabled");let c=y.get(e);if(!s(c))for(const e of Object.keys(c))y.set(d,"data-"+e,c[e]);let h=document.createElement("div");h.classList.add(rs),y.set(h,"data-vg-toggle","select"),y.set(h,"aria-expanded","false"),h.innerHTML=a.trim(),d.append(h);let m=document.createElement("div");if(m.classList.add(ss),d.append(m),vs.buildListOptions(e,m,n),e.insertAdjacentElement("afterend",d),e.dataset.inited="true",r){let e=document.createElement("div");e.classList.add("vg-select-search");let t=document.createElement("input");y.set(t,"name","vg-select-search"),y.set(t,"type","text"),y.set(t,"placeholder","Поиск..."),y.set(t,"autocomplete","off"),e.append(t),m.prepend(e)}return d}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){if(!i(this._element)&&!q.trigger(this._element,us,{relatedTarget:e}).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.on(e,"mouseover",m);if(this._element.classList.add(Qt),this._params.search){let e=v.find("input",this._element);e&&e.focus()}this._queueCallback((()=>{this._element.classList.add(es),q.trigger(this._element,gs,{relatedTarget:e})}),this._drop,!0,50)}}hide(){!i(this._element)&&this._isShown()&&this._completeHide()}_completeHide(){if(q.trigger(this._element,ms,{}).defaultPrevented)return;this._element.classList.remove(es);let e=v.find(_s,this._element);if(y.set(e,"aria-expanded","false"),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.off(e,"mouseover",m);this._queueCallback((()=>{this._element.classList.remove(Qt),q.trigger(this._element,ps,{})}),this._drop,!0,10)}_isShown(){return this._element.classList.contains(Qt)}refresh(){const e=this._element.previousSibling;new MutationObserver((()=>{clearTimeout(fs),fs=setTimeout((()=>{vs.build(e,!0)}),100)})).observe(e,{attributeFilter:["disabled","required","style","hidden"],childList:!0,subtree:!0,characterDataOldValue:!0})}dispose(){super.dispose()}static destroy(e){let t=e.nextElementSibling;t&&t.classList.contains(ts)&&(t.remove(),e.selectedIndex=0,[...e.querySelectorAll("option")].forEach((function(t,s){t.hasAttribute("selected")&&(e.selectedIndex=s)})))}static hideOpenToggles(e){const t=v.findAll(".vg-select:not(.disabled):not(:disabled).show");for(const s of t){const t=vs.getInstance(s);if(!t)continue;if(e.target.closest("."+ts)===t._element)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||vs.hideOpenToggles(e)}static changeSelector(e,t,a={}){!r(a)&&s(a)||(e.value=o(t),q.trigger(e,hs,{data:a}),q.trigger(e,"change",{data:a}))}static init(e,t={},s=!1){let a=vs.build(e);vs.getOrCreateInstance(a,t)}}q.on(document,ls,vs.clearDrops),q.on(document,ls,_s,(function(){const e=this.closest("."+ts);y.set(this,"aria-expanded",!0);const t=v.find(".vg-select.show");t&&t!==e&&vs.getInstance(t).hide(),vs.getOrCreateInstance(e).toggle(this)})),q.on(document,ls,'[data-vg-toggle="select-option"]',(function(e){let t=e.target;if(!t.classList.contains("disabled")){let e=t.closest("."+ts),s=e.querySelectorAll("."+is);if(s.length)for(const e of s)e.classList.remove("selected");t.classList.add("selected"),e.querySelector("."+rs).innerText=t.innerText,e.classList.remove("show");let a=e.previousSibling;vs.changeSelector(a,t.dataset.value,{value:t.dataset.value,title:t.innerHTML})}})),q.on(document,ds,"[name=vg-select-search]",(function(e){let t=this,s=t?.closest("."+ss).querySelector("."+as);if(s){let e=[...s.querySelectorAll("."+is)],a=[...s.querySelectorAll("."+ns)],i=t?.value;e=e.concat(a);for(const t of e)y.show(t);if(i.length){i=i.trim(),i=i.toLowerCase();let t=[];[i,u(i),u(i,!0)].forEach((s=>{for(const a of e){let e=a.innerText.toLowerCase();y.hide(a),e.includes(s)&&t.push(a)}})),t.forEach((e=>y.show(e)))}}})),q.on(document,cs,"form",(function(){v.findAll("select."+ts,this).forEach((e=>{vs.build(e,!0)}))}));const bs=vs,ws="vg.sidebar",ys="show",Ls="vg-sidebar-open",ks=`${ws}.hide`,xs=`${ws}.hidden`,Es=`${ws}.show`,As=`${ws}.shown`,Ts=`${ws}.loaded`,Cs=`keydown.dismiss.${ws}`,Ss=`hidePrevented.${ws}`,Ms=`click.${ws}.data.api`,Os=`popstate.${ws}.data.api`,$s=`DOMContentLoaded.${ws}.data.api`;class Is extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,overflow:!0,keyboard:!0,hash:!1,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:800},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,Is.NAME_KEY,this._params.animation)}static get NAME(){return"sidebar"}static get NAME_KEY(){return ws}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(e&&(t._params=t._getParams(e,t._params)),t._route((function(e,s){q.trigger(t._element,Ts,{stats:e,data:s})})),q.trigger(t._element,Es,{relatedTarget:e}).defaultPrevented||(t._params.backdrop&&ee.show(),t._params.overflow&&W.append(),this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),q.on(window,Os,(()=>{this.hide()}))),t._element.classList.add(ys),document.body.classList.add(Ls),t._queueCallback((()=>{q.on(v.find(".vg-backdrop"),"mousedown.vg.backdrop",(function(){t.hide()})),q.trigger(t._element,As,{relatedTarget:e})}),t._element,!0,50)))}hide(){const e=this;i(e._element)||q.trigger(this._element,ks).defaultPrevented||setTimeout((()=>{e._element.setAttribute("aria-expanded",!1),e._element.classList.remove(ys),this._queueCallback((()=>{e._params.backdrop&&ee.hide((function(){e._params.overflow&&W.destroy()})),e._params.overflow&&W.destroy(),e._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),document.body.classList.remove(Ls),q.trigger(this._element,xs)}),this._element,!0)}),this._params.animation.delay)}dispose(){super.dispose()}_isShown(){return this._element.classList.contains(ys)}_addEventListeners(){q.on(document,Cs,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():q.trigger(this._element,Ss))}))}}F(Is),q.on(document,Ms,'[data-vg-toggle="sidebar"]',(function(e){const t=v.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;this.setAttribute("aria-expanded",!0),q.one(t,xs,(()=>{this.setAttribute("aria-expanded",!1)}));const s=v.find(".vg-sidebar.show");s&&s!==t&&Is.getInstance(s).hide(),Is.getOrCreateInstance(t).toggle(this)})),q.on(document,$s,(function(){let e=window.location.hash.slice(1);if(e){let t=v.find("#"+e);if(t&&t.classList.contains("vg-sidebar")){if(i(t))return;Is.getOrCreateInstance(t).toggle()}}}));const Ns=Is,Ps="vg.spy",js=`.${Ps}`,Hs=`activate${js}`,Ds=`click${js}`,qs=`load${js}.data-api`,Rs="active",Fs="[href]",Bs=".nav-link",zs=`${Bs}, .nav-item > ${Bs}, .list-group-item`;class Ys extends Y{constructor(e,t){super(e,t),this._params=this._getParams(e,l({offset:null,rootMargin:"0px 0px -25%",smoothScroll:!0,target:this._element,threshold:[.1,.5,1]},t)),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this._params=this._configAfterMerge(this._params),console.log(this._params),this.refresh()}static get NAME(){return"spy"}static get NAME_KEY(){return Ps}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=(t=e.target,(a(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(((s=t)&&window.CSS&&window.CSS.escape&&(s=s.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),s)):null)||document.body),e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e;var t,s}_maybeEnableSmoothScroll(){this._params.smoothScroll&&(q.off(this._params.target,Ds),q.on(this._params.target,Ds,Fs,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const s=this._rootElement||window,a=t.offsetTop-this._element.offsetTop;if(s.scrollTo)return void s.scrollTo({top:a,behavior:"smooth"});s.scrollTop=a}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._params.threshold,rootMargin:this._params.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),s=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},a=(this._rootElement||document.documentElement).scrollTop,i=a>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=a;for(const n of e){if(!n.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(n));continue}const e=n.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(s(n),!a)return}else i||e||s(n)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=v.findAll(Fs,this._params.target);for(const t of e){if(!t.hash||i(t))continue;const e=v.find(decodeURI(t.hash));n(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._params.target),this._activeTarget=e,e.classList.add(Rs),this._activateParents(e),q.trigger(this._element,Hs,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("vg-dropdown-item"))v.find('[data-vg-toggle="dropdown"]',e.closest(".vg-dropdown")).classList.add(Rs);else for(const t of v.parents(e,".nav, .list-group"))for(const e of v.prev(t,zs))e.classList.add(Rs)}_clearActiveClass(e){e.classList.remove(Rs);const t=v.findAll(`${Fs}.${Rs}`,e);for(const e of t)e.classList.remove(Rs)}}q.on(window,qs,(()=>{for(const e of v.findAll('[data-vg-toggle="spy"]'))Ys.getOrCreateInstance(e)}));const Xs=Ys,Ks="vg.tabs",Vs=`${Ks}.hide`,Us=`${Ks}.hidden`,Gs=`${Ks}.show`,Ws=`${Ks}.shown`,Js=`${Ks}.loaded`,Zs=`keydown.${Ks}`,Qs=`load.${Ks}`,ea=`click.${Ks}`,ta=`mouseover.${Ks}`,sa=`mouseout.${Ks}`,aa="ArrowLeft",ia="ArrowRight",na="ArrowUp",ra="ArrowDown",oa="Home",la="End",da="active",ca="hover",ha="fade",ma="show",pa="vg-tabs-slider",ua='[data-vg-toggle="dropdown"]',ga=`:not(${ua})`,_a='[data-vg-toggle="tab"]',fa=`.vg-tabs-link${ga}, .list-group-item${ga}, [role="tab"]${ga}, ${_a}`,va=`.${da}[data-vg-toggle="tab"]`;class ba extends Y{constructor(e,t){if(super(e,t),this._params=l({slide:!1,hash:!1,ajax:{route:"",target:"",method:"get",loader:!1,once:!0,output:!0}},this._params),this._parent=this._element.closest('.list-group, .vg-tabs-panel, [role="tablist"]'),this._main_parent=this._parent.closest(".vg-tabs"),this._params=this._getParams(this._main_parent,this._params),this._params=this._getParams(this._element,this._params),!this._parent)throw new TypeError(`${e.outerHTML} не имеет родителя ${fa}`);this._setInitialAttributes(this._parent,this._getChildren()),this._setInitialSlider(),this._setTabHash(),q.on(this._element,Zs,(e=>this._keydown(e)))}static get NAME(){return"tabs"}static get NAME_KEY(){return Ks}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),s=t?q.trigger(t,Vs,{relatedTarget:e}):null;q.trigger(e,Gs,{relatedTarget:t}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_elemIsActive(e){return e.classList.contains(da)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_activate(e,t){e&&(e.classList.add(da),this._activate(v.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(this._route(((e,t)=>{q.trigger(this._element,Js,{stats:e,data:t})})),e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),q.trigger(e,Ws,{relatedTarget:t})):e.classList.add(ma)}),e,e.classList.contains(ha)))}_deactivate(e,t){e&&(e.classList.remove(da),e.blur(),this._deactivate(v.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),q.trigger(e,Us,{relatedTarget:t})):e.classList.remove(ma)}),e,e.classList.contains(ha)))}_keydown(e){if(![aa,ia,na,ra,oa,la].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!i(e)));let s;if([oa,la].includes(e.key))s=t[e.key===oa?0:t.length-1];else{const a=[ia,ra].includes(e.key);s=((e,t,s)=>{const a=e.length;let i=e.indexOf(t);return-1===i?s?e[0]:e[a-1]:(i+=s?1:-1,i=(i+a)%a,e[Math.max(0,Math.min(i,a-1))])})(t,e.target,a)}s&&(s.focus({preventScroll:!0}),ba.getOrCreateInstance(s).show())}_setTabHash(){if(!this._params.hash)return;let e=document.location.toString();if(e.match("#")){let t=e.split("#")[1],s=v.find('[href="#'+t+'"]',this._parent)||v.find('[data-vg-target="#'+t+'"]',this._element)||null;s&&ba.getOrCreateInstance(s).show()}}_setInitialSlider(){if(!this._params.slide)return;let e=v.find("."+pa,this._main_parent);e||(e=document.createElement("span"),e.classList.add(pa),this._main_parent.prepend(e)),this._main_parent.classList.add("vg-tabs-with-slider");let t=v.find("."+da,this._parent),{width:s,height:a}=window.getComputedStyle(t);t.classList.add(ca),e.style.width=s,e.style.height=a,e.style.left=t.offsetLeft+"px",q.on(this._main_parent,ta,_a,(t=>{let s=t.target,{width:a,height:n}=window.getComputedStyle(s);if(["A","AREA"].includes(t.target.tagName)&&t.preventDefault(),i(s))return;let r=v.find("."+ca,this._parent);r&&r.classList.remove(ca),s.classList.add(ca),e.style.width=a,e.style.height=n,e.style.left=s.offsetLeft+"px"})),q.on(this._main_parent,sa,_a,(t=>{["A","AREA"].includes(t.target.tagName)&&t.preventDefault();let s=v.find("."+da,this._parent),{width:a,height:i}=window.getComputedStyle(s);[...v.findAll("."+ca,this._parent)].forEach((e=>{e.classList.remove(ca)})),s.classList.add(ca),e.style.width=a,e.style.height=i,e.style.left=s.offsetLeft+"px"}))}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),s=this._getOuterElement(e);e.setAttribute("aria-selected",t),s!==e&&this._setAttributeIfNotExists(s,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=v.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_setAttributeIfNotExists(e,t,s){e.hasAttribute(t)||e.setAttribute(t,s)}_getChildren(){return v.findAll(fa,this._parent)}_getInnerElement(e){return e.matches(fa)?e:v.find(fa,e)}_getOuterElement(e){return e.closest(".vg-tabs-item, .list-group-item")||e}_toggleDropDown(e,t){const s=this._getOuterElement(e);if(!s.classList.contains("dropdown"))return;const a=(e,a)=>{const i=v.find(e,s);i&&i.classList.toggle(a,t)};a(ua,da),a(".dropdown-content",ma),s.setAttribute("aria-expanded",t)}}q.on(document,ea,_a,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||ba.getOrCreateInstance(this).show()})),q.on(window,Qs,(()=>{for(const e of v.findAll(va))ba.getOrCreateInstance(e)}));const wa=ba,ya="vg.toast",La="vg-toast-open",ka="show",xa=`${ya}.hide`,Ea=`${ya}.hidden`,Aa=`${ya}.show`,Ta=`${ya}.shown`,Ca=`${ya}.loaded`,Sa=`keydown.dismiss.${ya}`,Ma=`hidePrevented.${ya}`,Oa=`click.${ya}.data.api`;class $a extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({static:!0,placement:"bottom center",autohide:!1,delay:3e3,enableClickToast:!0,enableButtonClose:!0,keyboard:!0,theme:"dark",stack:{enable:!0,max:5},animation:{enable:!0,in:"animate__fadeIn",out:"animate__fadeOut",delay:400},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,$a.NAME_KEY,this._params.animation),this._dismissElement(),this._addEventListeners(),this._timeout=null}static get NAME(){return"toast"}static get NAME_KEY(){return ya}static run(e,t={},s){return $a.build(e,t,s)}static build(e,t,s){t=l({placement:"bottom center",static:!1,theme:"dark",stack:{enable:!1}},t);let a=document.createElement("div");a.classList.add("vg-toast"),a.id="vg-toast-"+p(),"theme"in t&&a.classList.add("vg-toast-"+t.theme),"placement"in t&&t.placement.split(" ").forEach((e=>a.classList.add(e)));let i=document.createElement("div");if(i.classList.add("vg-toast-wrapper"),"type"in t){let e=document.createElement("div");e.classList.add("vg-toast-icon"),i.append(e)}let n=document.createElement("div");n.classList.add("vg-toast-content");let r=document.createElement("div");if(r.classList.add("vg-toast-body"),"string"==typeof e)r.innerHTML=e,n.append(r);else if(Array.isArray(e))if(e.length>1){let t=document.createElement("div");t.classList.add("vg-toast-header"),t.innerHTML=e[0],n.append(t),r.innerHTML=e[1],n.append(r)}else r.innerHTML=e[0],n.append(r);if(i.append(n),"enableButtonClose"in t&&t.enableButtonClose){let e=document.createElement("div");e.classList.add("vg-toast-button"),e.innerHTML='<button class="vg-btn-close" data-vg-dismiss="toast"></button>',i.append(e)}a.append(i),document.body.append(a);let o=$a.getOrCreateInstance(a,t);d(s,[o]),o.show()}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){i(this._element)||(this._clearTimeout(),this._params=this._getParams(e||{},this._params),this._route((function(e,t){q.trigger(this._element,Ca,{stats:e,data:t})})),q.trigger(this._element,Aa,{relatedTarget:e}).defaultPrevented||(this._element.classList.add(ka),document.body.classList.add(La),this._setPlacement(),this._queueCallback((()=>{this._element.classList.add(ka),q.trigger(this._element,Ta,{relatedTarget:e}),this._scheduleHide()}),this._element,!0,0)))}hide(){i(this._element)||q.trigger(this._element,xa).defaultPrevented||setTimeout((()=>{this._element?.classList.remove(ka),this._queueCallback((()=>{document.body.classList.remove(La),q.trigger(this._element,Ea),this._params.stack.enable&&this._setPlacement(),this._params.static||this.dispose()}),this._element,!1,this._params.animation.delay)}),this._params.animation.delay)}dispose(){this._clearTimeout(),this._isShown()&&this._element.classList.remove(ka),this._params.static||this._element.remove(),super.dispose()}_scheduleHide(){this._params.autohide&&(this._timeout=setTimeout((()=>{this.hide()}),this._params.delay))}_isShown(){return this._element.classList.contains(ka)}_setPlacement(){let e=this._enableStack();if(this._params.stack.enable&&e.length>this._params.stack.max){let t=e.shift();$a.getInstance(t.el).hide()}e.forEach((e=>{let t=e.el.classList.contains("top"),s=e.el.classList.contains("bottom"),a=e.el.classList.contains("left"),i=e.el.classList.contains("right"),n=e.el.classList.contains("center");t||s||n||i||a||(s=!0,n=!0),n?a?(e.el.style.left=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):i?(e.el.style.right=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):s?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.bottom=e.top+"px"):t?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.top=e.top+"px"):(e.el.style.left="calc(50% - ("+e.el.clientHeight+"px) / 2)",e.el.style.bottom="calc(50% - "+e.top+"px)"):(a&&(e.el.style.left=0),s&&(e.el.style.bottom=e.top+"px"),t&&(e.el.style.top=e.top+"px"),i&&(e.el.style.right=0))}))}_enableStack(){let e=[...v.findAll(".vg-toast.show")],t=0;return this._params.stack.enable?(e=e.map((e=>({el:e,top:e.clientHeight}))),e.map((function(e,s){return 0===s?{el:e.el,top:0}:(t+=e.top,{el:e.el,top:t})}))):(e.forEach((e=>{e!==this._element&&$a.getInstance(e).hide()})),[{el:this._element,top:0}])}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}_addEventListeners(){q.on(document,Sa,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():q.trigger(this._element,Ma))})),this._params.enableClickToast&&(this._element.classList.add("vg-toast-pointer"),q.on(document,Oa,"#"+this._element.id,(()=>{this.hide()})))}}F($a),q.on(document,Oa,'[data-vg-toggle="toast"]',(function(e){const t=v.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),q.one(t,Ea,(()=>{this.setAttribute("aria-expanded",!1)})),$a.getOrCreateInstance(t).toggle(this))}));const Ia=$a;vg=t})();
2
+ var vg;(()=>{"use strict";var e={d:(t,s)=>{for(var a in s)e.o(s,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}e.r(t),e.d(t,{VGAlert:()=>Le,VGCollapse:()=>je,VGDropdown:()=>Qe,VGFormSender:()=>ct,VGLawCookie:()=>yt,VGLoadMore:()=>At,VGModal:()=>Tt,VGNav:()=>zt,VGRollup:()=>Jt,VGSelect:()=>bs,VGSidebar:()=>Ns,VGSpy:()=>Xs,VGTabs:()=>wa,VGToast:()=>Ia});const a=e=>!!r(e)&&void 0!==e.nodeType,i=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"));function n(e){if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),s=e.closest("details:not([open])");if(!s)return t;if(s!==e){const t=e.closest("summary");if(t&&t.parentNode!==s)return!1;if(null===t)return!1}return t}function r(e){return e&&"object"==typeof e}function o(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function l(...e){const t=e=>e&&"object"==typeof e;if(t)return e.reduce(((e,s)=>(Object.keys(s).forEach((a=>{const i=e[a],n=s[a];Array.isArray(i)&&Array.isArray(n)?e[a]=i.concat(...n):t(i)&&t(n)?e[a]=l(i,n):e[a]=n})),e)),{})}function d(e,t=[],s=e){return"function"==typeof e?e(...t):s}const c="transitionend",h=e=>{e.offsetHeight},m=()=>{};function p(e=7){let t="";let s=0;for(;s<e;)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random())),s+=1;return t}function u(e,t){let s,a="й ц у к е н г ш щ з х ъ ф ы в а п р о л д ж э я ч с м и т ь б ю".split(/ +/g),i="q w e r t y u i o p [ ] a s d f g h j k l ; ' z x c v b n m , .".split(/ +/g);for(s=0;s<a.length;s++)e=(e=e.split(t?i[s]:a[s]).join(t?a[s]:i[s])).split(t?i[s].toUpperCase():a[s].toUpperCase()).join(t?a[s].toUpperCase():i[s].toUpperCase());return e}const g=()=>"rtl"===document.documentElement.dir,_=e=>{let t=e.getAttribute("data-vg-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t?t.split(",").map((e=>(e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e))(e))).join(","):null},f={find:(e,t=document.documentElement)=>a(e)?e:Element.prototype.querySelector.call(t,e),findAll:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),getSelectorFromElement(e){const t=_(e);return t&&f.find(t)?t:null},getElementFromSelector(e){const t=_(e);return t?f.find(t):null},getMultipleElementsFromSelector(e){const t=_(e);return t?f.findAll(t):[]},parents(e,t){const s=[];let a=e.parentNode.closest(t);for(;a;)s.push(a),a=a.parentNode.closest(t);return s},next(e,t){let s=e.nextElementSibling;for(;s;){if(s.matches(t))return[s];s=s.nextElementSibling}return[]},prev(e,t){let s=e.previousElementSibling;for(;s;){if(s.matches(t))return[s];s=s.previousElementSibling}return[]}},v=f,b=new Map,w={set(e,t,s){b.has(e)||b.set(e,new Map);const a=b.get(e);a.has(t)||0===a.size?a.set(t,s):console.error(`VGApp не допускает более одного экземпляра для каждого элемента. Связанный экземпляр: ${Array.from(a.keys())[0]}.`)},get:(e,t)=>b.has(e)&&b.get(e).get(t)||null,remove(e,t){if(!b.has(e))return;const s=b.get(e);s.delete(t),0===s.size&&b.delete(e)}},y={get(e,t="data",s=!0){if(!e)return{};if("data"===t){let t=["data-vg-toggle","data-vg-target","data-vg-dismiss"],a={},i=[].filter.call(e.attributes,(function(e){return/^data-/.test(e.name)}));return i.length&&i.forEach((function(e){let i=e.name;t.includes(i)||(s&&(i=i.slice(5)),a[i]=o(e.value))})),a}return"all"===t?e.getAttributeNames().reduce(((t,s)=>({...t,[s]:e.getAttribute(s)})),{}):e.getAttribute(t)},has:(e,t)=>e.hasAttribute(t),set(e,t,s){a(e)&&t&&e.setAttribute(t,s)},remove(e,t){a(e)&&t&&e.removeAttribute(t)},hide(e){e.style.display="none"},show(e,t="block"){e.style.display=t}},L=class{constructor(e,t=null){this._params=this.merge(e,t)}get(){return this._params}fromElement(e){return a(e)?y.get(e):{}}merge(e,t){let s=l(e,this.fromElement(t));for(let e in s)if(-1!==e.indexOf("-")){let t=e.split("-"),a=o(s[e]);t[0]in s&&t[1]in s[t[0]]&&(s[t[0]][t[1]]=a),delete s[e]}return"params"in s&&(s=l(s,s.params),delete s.params),s}},k=/[^.]*(?=\..*)\.|.*/,x=/\..*/,E=/::\d+$/,A={};let T=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","submit","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","popstate","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function M(e,t){return t&&`${t}::${T++}`||e.uidEvent||T++}function O(e){const t=M(e);return e.uidEvent=t,A[t]=A[t]||{},A[t]}function $(e,t,s=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===s))}function I(e,t,s){const a="string"==typeof t,i=a?s:t||s;let n=(r=(r=e).replace(x,""),C[r]||r);var r;return S.has(n)||(n=e),[a,i,n]}function N(e,t,s,a,i){if("string"!=typeof t||!e)return;let[n,r,o]=I(t,s,a);if(t in C){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=O(e),d=l[o]||(l[o]={}),c=$(d,r,n?s:null);if(c)return void(c.oneOff=c.oneOff&&i);const h=M(r,t.replace(k,"")),m=n?function(e,t,s){return function a(i){const n=e.querySelectorAll(t);for(let{target:r}=i;r&&r!==this;r=r.parentNode)for(const o of n)if(o===r)return H(i,{delegateTarget:r}),a.oneOff&&D.off(e,i.type,t,s),s.apply(r,[i])}}(e,s,r):function(e,t){return function s(a){return H(a,{delegateTarget:e}),s.oneOff&&D.off(e,a.type,t),t.apply(e,[a])}}(e,r);m.delegationSelector=n?s:null,m.callable=r,m.oneOff=i,m.uidEvent=h,d[h]=m,e.addEventListener(o,m,n)}function P(e,t,s,a,i){const n=$(t[s],a,i);n&&(e.removeEventListener(s,n,Boolean(i)),delete t[s][n.uidEvent])}function j(e,t,s,a){const i=t[s]||{};for(const[n,r]of Object.entries(i))n.includes(a)&&P(e,t,s,r.callable,r.delegationSelector)}function H(e,t={}){for(const[s,a]of Object.entries(t))try{e[s]=a}catch{Object.defineProperty(e,s,{configurable:!0,get:()=>a})}return e}const D={on(e,t,s,a){N(e,t,s,a,!1)},one(e,t,s,a){N(e,t,s,a,!0)},off(e,t,s,a){if("string"!=typeof t||!e)return;const[i,n,r]=I(t,s,a),o=r!==t,l=O(e),d=l[r]||{},c=t.startsWith(".");if(void 0===n){if(c)for(const s of Object.keys(l))j(e,l,s,t.slice(1));for(const[s,a]of Object.entries(d)){const i=s.replace(E,"");o&&!t.includes(i)||P(e,l,r,a.callable,a.delegationSelector)}}else{if(!Object.keys(d).length)return;P(e,l,r,n,i?s:null)}},trigger(e,t,s){if("string"!=typeof t||!e)return null;const a=H(new Event(t,{bubbles:!0,cancelable:!0}),s);return e.dispatchEvent(a),a}},q=D,R=e=>({error:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-success" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-2" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(252, 191, 191, .5)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-error-circle" stroke="#F74444" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-error-line1" d="M22.244224,22 L60.4279902,60.1837662" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path><path class="ui-error-line2" d="M60.755776,21 L23.244224,59.8443492" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path></g></g></svg>',success:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-error" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(117, 183, 152, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-success-circle" id="Oval-2" stroke="#A5DC86" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><polyline class="ui-success-path" id="Path-2" stroke="#A5DC86" stroke-width="4" points="19 38.8036813 31.1020744 54.8046875 63.299221 28"></polyline></g></g></svg>',waiting:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-waiting" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(255, 218, 106, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-waiting-circle" id="Oval-2" stroke="#ffda6a" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-waiting-line1" d="M43 63C54.598 63 64 53.598 64 42C64 30.402 54.598 21 43 21C31.402 21 22 30.402 22 42C22 53.598 31.402 63 43 63Z" stroke-width="3" stroke="#ffda6a" stroke-linecap="round" stroke-linejoin="round"/><path class="ui-waiting-line2" d="M40.6667 32.6641V44.3307H52.3334" stroke="#ffda6a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots-vertical" viewBox="0 0 16 16"><path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>',cross:'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 224.512 224.512" xml:space="preserve"><g><polygon points="224.507,6.997 217.521,0 112.256,105.258 6.998,0 0.005,6.997 105.263,112.254 0.005,217.512 6.998,224.512 112.256,119.24 217.521,224.512 224.507,217.512 119.249,112.254 "/></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>'}[e]??{}),F=(e,t="hide")=>{const s=`click.dismiss.${e.EVENT_KEY}`,a=e.NAME;q.on(document,s,`[data-vg-dismiss="${a}"]`,(function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),i(this))return;const n=v.getSelectorFromElement(this)||this.closest(`.vg-${a}`);e.getOrCreateInstance(n)[t]()}))},B={x:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;let e,t=["MSXML2.XmlHttp.6.0","MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"];for(let s=0;s<t.length;s++)try{e=new ActiveXObject(t[s]);break}catch(e){}return e},send:function(e,t,s,a,i){void 0===i&&(i=!0);let n=B.x();n.open(s,e,i),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t("success",{text:n.statusText,response:n.responseText,code:n.status}):t("error",{text:n.statusText,response:n.responseText,code:n.status}))},n.send(a)},get:function(e,t,a,i){let n=[];if(!s(t))for(let e in t)console.log(e),n.push(encodeURIComponent(e)+"="+encodeURIComponent(t[e]));let r="";n.length&&(r+=e.includes("?")?"&":"?",r+=n.join("&")),B.send(e+r,a,"GET",null,i)},post:function(e,t,s,a){B.send(e,s,"POST",t,a)}},z=class{constructor(e,t,s={}){this._params=l({enable:!1,in:"animate__backInUp",out:"animate__backOutUp",delay:0,duration:800},s),this.classes={animated:"animate__animated",duration:"animate__duration-"+this._params.duration},this._params.enable&&a(e)&&(this._element=e,this._name_key=t,this._element.classList.contains(this.classes.animated)||(this._element.classList.add(this.classes.animated),this._element.classList.add(this.classes.duration)),this._triggers())}_triggers(){q.on(this._element,this._name_key+".show",(()=>{this._element.classList.remove(this._params.out),this._element.classList.add(this._params.in)})),q.on(this._element,this._name_key+".hide",(()=>{this._element.classList.remove(this._params.in),this._element.classList.add(this._params.out)})),q.on(this._element,this._name_key+".hidden",(()=>{this._element.classList.remove(this._params.out)}))}},Y=class{constructor(e){if(e){if(this._element=v.find(e),!this._element)throw new Error("Товарищ! Первый параметр не должен быть пустым!");this._params={},this._isLoaded=!1,w.set(this._element,this.constructor.NAME_KEY,this)}}_getParams(e,t){return new L(t,e).get()}dispose(){w.remove(this._element,this.constructor.NAME_KEY),q.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_route(e){const t=this;let s=null;if(t._isLoaded)return;const a=e=>{s&&(s.innerHTML=e)};t._params.hasOwnProperty("ajax")&&t._params.ajax.route&&(!1 in t._params.ajax&&(t._params.ajax.method="get"),"target"in t._params.ajax&&t._params.ajax.target&&(s=v.find(t._params.ajax.target)),"loader"in t._params.ajax&&t._params.ajax.loader&&"output"in t._params.ajax&&t._params.ajax.output&&a('<div class="vg-loader"></div>'),B[t._params.ajax.method](t._params.ajax.route,t._params.ajax.data||{},(function(i,n){"once"in t._params.ajax&&t._params.ajax.once&&(t._isLoaded=!0),"output"in t._params.ajax&&t._params.ajax.output&&a(n.response),d(e,[i,n,s])})))}_dismissElement(){let e=R("cross"),t=this._element.querySelector(".vg-btn-close");t&&(t.querySelector("svg")||t.insertAdjacentHTML("beforeend",e))}_queueCallback(e,t,s=!0,a){!function(e,t,s=!0,a){if(!s)return void d(e);const i=a||(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:s}=window.getComputedStyle(e);const a=Number.parseFloat(t),i=Number.parseFloat(s);return a||i?(t=t.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(s))):0})(t)+5;let n=!1;const r=({target:s})=>{s===t&&(n=!0,t.removeEventListener(c,r),d(e))};t.addEventListener(c,r),setTimeout((()=>{n||(e=>{e.dispatchEvent(new Event(c))})(t)}),i)}(e,t,s,a)}_animation(e,t,s={}){new z(e,t,s)}static getInstance(e){return w.get(v.find(e),this.NAME_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,s(t)?{}:t)}static get DATA_KEY(){return`vg.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}},X=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",K=".sticky-top",V="padding-right",U="margin-right",G=class{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,V,(t=>t+e)),this._setElementAttributes(X,V,(t=>t+e)),this._setElementAttributes(K,U,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,V),this._resetElementAttributes(X,V),this._resetElementAttributes(K,U)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,s){const a=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+a)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${s(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const s=e.style.getPropertyValue(t);s&&y.get(e,t,s)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const s=y.get(e,t);null!==s?(y.remove(e,t),e.style.setProperty(t,s)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const s of v.findAll(e,this._element))t(s)}},W=class{static append(){document.body.style.paddingRight=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+"px",document.body.style.overflow="hidden"}static destroy(){document.body.style.overflow="",document.body.style.paddingRight="",y.get(document.body,"style")||y.remove(document.body,"style")}},J="vg-backdrop",Z="fade";class Q{static show(e){Q._append(),d(e)}static hide(e){Q._destroy(),d(e)}static _append(){if(v.find("."+J))return!1;let e=document.createElement("div");e.classList.add(J),document.body.append(e),setTimeout((()=>{e.classList.add(Z)}),50),q.on(e,"mousedown.vg.backdrop",(()=>{Q.hide(),W.destroy()}))}static _destroy(){let e=v.find("."+J);e&&(e.classList.remove(Z),setTimeout((()=>{e.remove()}),500))}}const ee=Q,te="vg.modal",se="vg-modal-open",ae="show",ie="vg-modal-static",ne=`${te}.hide`,re=`${te}.hidden`,oe=`${te}.show`,le=`${te}.shown`,de=`${te}.resize`,ce=`${te}.loaded`,he=`keydown.dismiss.${te}`,me=`hidePrevented.${te}`,pe=`click.${te}.data.api`,ue=`mousedown.dismiss${te}`,ge=`click.dismiss${te}`,_e=`DOMContentLoaded.${te}.data.api`,fe=`popstate.${te}.data.api`;class ve extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,focus:!0,keyboard:!0,fields:[],hash:!1,centered:!1,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0},animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:100,duration:800},classes:{general:"vg-modal",dialog:"vg-modal-dialog",content:"vg-modal-content",header:"vg-modal-header",title:"vg-modal-title",body:"vg-modal-body",footer:"vg-modal-footer"}},t)),this._button=null,this._dialog=v.find(".vg-modal-dialog",this._element),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new G,this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,ve.NAME_KEY,this._params.animation)}static get NAME(){return"modal"}static get NAME_KEY(){return te}static init(e,t,s){ve.build(e,t,s)}static build(e,t,s){if("string"!=typeof e)return;let a=document.createElement("div");a.classList.add("vg-modal","fade"),a.id=e;let i=document.createElement("div");i.classList.add("vg-modal-dialog"),"centered"in t&&t.centered&&i.classList.add("vg-modal-dialog-centered");let n=document.createElement("div");n.classList.add("vg-modal-content");let r=document.createElement("button");y.set(r,"type","button"),y.set(r,"data-vg-dismiss","modal"),y.set(r,"data-vg-target","#"+e),y.set(r,"aria-label","close"),r.classList.add("vg-btn-close"),n.append(r);let o=document.createElement("div");o.classList.add("vg-modal-body"),n.append(o),i.append(n),a.append(i),document.body.append(a);const l=ve.getOrCreateInstance(a,t);return d(s,[l]),l}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(this._params=this._getParams(e,this._params),t._route((function(e,s){q.trigger(t._element,ce,{stats:e,data:s})})),q.trigger(this._element,oe,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),q.on(window,fe,(()=>{this.hide()}))),this._scrollBar.hide(),document.body.classList.add(se),this._addFieldsInModal(e),this._adjustDialog(),ee.show((()=>this._showElement(e)))))}hide(e=[]){this._isShown&&!this._isTransitioning&&(q.trigger(this._element,ne).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,setTimeout((()=>{this._element.classList.remove(ae),this._queueCallback((()=>this._hideModal(e)),this._element,this._isAnimatedFade())}),this._params.animation.delay)))}_hideModal(e){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,e.length||(this._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),ee.hide((()=>{document.body.classList.remove(se),this._resetAdjustments(),this._scrollBar.reset(),q.trigger(this._element,re)})))}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=v.find(".vg-modal-body",this._dialog);t&&(t.scrollTop=0),h(this._element),this._element.classList.add(ae),this._queueCallback((()=>{this._isTransitioning=!1,q.trigger(this._element,le,{relatedTarget:e})}),this._dialog,this._isAnimatedFade())}_isAnimatedFade(){return this._element.classList.contains("fade")}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),s=t>0;if(s&&!e){const e=g()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!s&&e){const e=g()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}_addEventListeners(){q.on(this._element,he,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():this._triggerBackdropTransition())})),q.on(window,de,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),q.on(this._element,ue,(e=>{q.one(this._element,ge,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._params.backdrop?this._params.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_triggerBackdropTransition(){if(q.trigger(this._element,me).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(ie)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(ie),this._queueCallback((()=>{this._element.classList.remove(ie),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog))}_addFieldsInModal(e){this._params=this._getParams(e,this._params),this._params.fields.length&&this._params.fields.forEach((e=>{if(!1 in e&&!1 in e)return;let t=v.findAll("[data-"+e.name+"]",this._element);if(t.length)for(const s of t)switch(s.tagName){case"INPUT":s.value=e.value;break;case"IMG":y.set(s,"src",e.value);break;default:s.innerHTML=e.value}}))}}F(ve),q.on(document,pe,'[data-vg-toggle="modal"]',(function(e){const t=v.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),q.one(t,oe,(e=>{e.defaultPrevented}));const s=v.find(".vg-modal.show");s&&ve.getInstance(s).hide([s]),ve.getOrCreateInstance(t).toggle(this)})),q.on(document,_e,(function(){let e=window.location.hash.slice(1);if(e){let t=v.find("#"+e);if(t&&t.classList.contains("vg-modal")){if(i(t))return;ve.getOrCreateInstance(t).toggle()}}}));const be=ve,we="vg.alert",ye=`click.${we}.data.api`;q.on(document,ye,'[data-vg-toggle="alert"]',(function(e){}));const Le=class extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({modal:{centered:!1,backdrop:!0,overflow:!0,keyboard:!0,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:0}},toast:{},elements:{button:""},dialog:"modal",mode:"alert"},t))}static get NAME(){return"alert"}static get NAME_KEY(){return we}static run(...e){}toggle(e){}promise(e){}_build(){return"modal"===this._params.dialog?this._buildModal():"toast"===this._params.dialog?this._buildToast():void 0}_buildModal(){let e="vg-alert-"+p(),t=v.find(".vg-alert-modal");return t&&t.remove(),be.build(e,this._params.modal,(e=>{let t=e._element;t.classList.add("vg-alert-modal");let s=v.find(".vg-modal-body",t);if(s){let e='<div class="message">'+this._params.message+"</div>";e+='<div class="buttons">',this._params.elements.button&&(e+='<a href="#" data-vg-dismiss="modal" class="btn btn-primary">'+this._params.elements.button+"</a>"),e+="</div>",s.innerHTML=e}}))}_buildToast(){}},ke="vg.collapse",xe="show",Ee="vg-collapse",Ae="vg-collapsing",Te=`:scope .${Ee} .${Ee}`,Ce='[data-vg-toggle="collapse"]',Se=`${ke}.hide`,Me=`${ke}.hidden`,Oe=`${ke}.show`,$e=`${ke}.shown`,Ie=`click.${ke}.data.api`;class Ne extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({toggle:!0,parent:null,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._isTransitioning=!1,this._triggerArray=[];const s=v.findAll(Ce);for(const e of s){const t=v.getSelectorFromElement(e),s=v.findAll(t).filter((e=>e===this._element));null!==t&&s.length&&this._triggerArray.push(e)}this._initializeChildren(),this._params.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._params.toggle&&this.toggle()}static get NAME(){return"collapse"}static get NAME_KEY(){return ke}toggle(e){return this._isShown()?this.hide():this.show(e)}show(){const e=this;if(e._isTransitioning||e._isShown())return;let t=[];if(!(e._params.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Ne.getOrCreateInstance(e,{toggle:!1})))),t.length&&t[0]._isTransitioning||q.trigger(e._element,Oe).defaultPrevented)){for(const e of t)e.hide();e._element.classList.remove(Ee),e._element.classList.add(Ae),e._element.style.height=0,e._addAriaAndCollapsedClass(e._triggerArray,!0),e._isTransitioning=!0,e._route(),e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(Ae),e._element.classList.add(Ee,xe),e._element.style.height="",q.trigger(e._element,$e)}),e._element,!0),e._element.style.height=`${e._element.scrollHeight}px`}}hide(){const e=this;if(!e._isTransitioning&&e._isShown()&&!q.trigger(e._element,Se).defaultPrevented){e._element.style.height=`${this._element.getBoundingClientRect().height}px`,h(e._element),e._element.classList.add(Ae),e._element.classList.remove(Ee,xe);for(const t of e._triggerArray){const s=v.getElementFromSelector(t);s&&!e._isShown(s)&&e._addAriaAndCollapsedClass([t],!1)}e._isTransitioning=!0,e._element.style.height="",e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(Ae),e._element.classList.add(Ee),q.trigger(e._element,Me)}),e._element,!0)}}dispose(){super.dispose()}_isShown(e=this._element){return e.classList.contains(xe)}_addAriaAndCollapsedClass(e,t){if(e.length)for(const s of e)this._changeStateButton(s,t)}_initializeChildren(){if(!this._params.parent)return;const e=this._getFirstLevelChildren(Ce);for(const t of e){const e=v.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=v.find(Te,this._params.parent);return v.find(e,this._params.parent).filter((e=>!t.includes(e)))}_changeStateButton(e,t){e.classList.toggle("vg-collapsed",!t),e.setAttribute("aria-expanded",t),e.innerHTML=y.get(e,`data-${t?"hide":"show"}-text`)||e.innerHTML}}q.on(document,Ie,Ce,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault(),v.getMultipleElementsFromSelector(this).forEach((function(e){Ne.getOrCreateInstance(e,{toggle:!1}).toggle()}))}));const Pe=Ne,je=Pe,He=class{constructor(e={}){this.params=l({element:null,drop:null},e)}_getPlacement(){const e=this,t=e=>{let s=e.parentNode,a=getComputedStyle(s).overflow;return"BODY"===s.tagName?null:"visible"!==a?s:void t(s)};let s,a,i=!1,n=e.params.drop.getBoundingClientRect(),r=e.params.element.getBoundingClientRect();if(t(e.params.element))i=!0,s=n.top,a=n.left;else{let t=getComputedStyle(e.params.drop);s=o(t.top.slice(0,-2)),a=o(t.left.slice(0,-2))}return n.left+n.width>window.innerWidth&&(a=r.width-n.width),{isFixed:i,top:s,left:a}}},De="vg.dropdown",qe="show",Re="fade",Fe="vg-dropdown-content",Be='[data-vg-toggle="dropdown"]',ze=`${De}.hide`,Ye=`${De}.hidden`,Xe=`${De}.show`,Ke=`${De}.shown`,Ve=`keyup.${De}.data.api`,Ue=`keydown.${De}.data.api`,Ge=`click.${De}.data.api`,We=`mouseover.${De}.data.api`,Je=`mouseout.${De}.data.api`;class Ze extends Y{constructor(e,t){super(e,t);let s={offset:[0,2],backdrop:!1,overflow:!1,keyboard:!1,placement:"bottom",timeoutAnimation:350,hover:!1,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0},animation:{enable:!1,in:"animate__flipInY",out:"animate__flipOutY",delay:800}};"offset"in t&&Array.isArray(t.offset)&&(s.offset=t.offset),this._params=this._getParams(e,l(s,t));const a=v.getElementFromSelector(this._element);this._parent=this._element.parentNode,this._drop=a||v.find("."+Fe,this._parent),this._isPlacement=!1,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._drop,Ze.NAME_KEY,this._params.animation)}static get NAME(){return"dropdown"}static get NAME_KEY(){return De}toggle(){return this._isShown()?this.hide():this.show()}show(){if(i(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!q.trigger(this._element,Xe,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.on(e,"mouseover",m);this._route(),this._element.setAttribute("aria-expanded",!0),this._element.classList.add(qe),this._drop.classList.add(qe),this._setPlacement(),this._params.backdrop&&!this._params.hover&&ee.show(),this._params.overflow&&(W.append(),document.body.classList.add("dropdown-open")),this._queueCallback((()=>{this._drop.classList.add(Re),q.trigger(this._element,Ke,e)}),this._drop,!0,50)}}hide(){if(i(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){return super.dispose()}_isShown(){return this._element.classList.contains(qe)}_completeHide(e){if(!q.trigger(this._element,ze,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.off(e,"mouseover",m);if(this._drop.classList.remove(Re),this._element.classList.remove(qe),this._element.setAttribute("aria-expanded","false"),this._params.backdrop&&!this._params.hover){const e=this;ee.hide((function(){e._params.overflow&&W.destroy()}))}this._params.overflow&&(W.destroy(),document.body.classList.remove("dropdown-open")),setTimeout((()=>{this._queueCallback((()=>{this._drop.classList.remove(qe),q.trigger(this._element,Ye,e)}),this._parent,!0,10)}),this._params.animation.delay)}}_setPlacement(){const e=this;if(!e._isPlacement){let t=new He({element:this._parent,drop:this._drop})._getPlacement();t.isFixed&&(e._drop.style.position="fixed",e._drop.style.transform="translateY(-20%)"),e._drop.style.left=t.left+"px",e._drop.style.top=t.top+"px"}e._params.offset&&(e._drop.style.paddingTop=e._params.offset[1]+"px",e._drop.style.paddingRight=e._params.offset[0]+"px"),e._isPlacement=!0}static init(e,t={}){const s=Ze.getOrCreateInstance(e,t);if(s._params.hover){let e=null;q.on(s._parent,We,(function(t){if(e)return;Ze.hideOpenToggles(t);let a=t.target.closest(".vg-dropdown");a&&s._parent.contains(a)&&(e=a,s.show())})),q.on(s._parent,Je,(function(t){if(!e)return;let a=t.relatedTarget;for(;a;){if(a===e)return;a=a.parentNode}e=null,s._completeHide({relatedTarget:s._element})}))}else q.on(document,Ve,Be,Ze.keydownHandler),q.on(document,Ue,"."+Fe,Ze.keydownHandler),q.on(document,Ve,Ze.clearDrops),q.on(document,Ge,Ze.clearDrops),q.on(e,Ge,(function(e){e.preventDefault(),s.toggle()}))}static hideOpenToggles(e){const t=v.findAll('[data-vg-toggle="dropdown"]:not(.disabled):not(:disabled).show');for(const s of t){const t=Ze.getInstance(s);if(!t)continue;if(e.target.closest("."+Fe)===t._drop)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static keydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),s="Escape"===e.key,a=["ArrowUp","ArrowDown"].includes(e.key);if(!a&&!s)return;if(t&&!s)return;e.preventDefault();const i=this.matches(Be)?this:v.find(Be,e.delegateTarget.parentNode),n=Ze.getOrCreateInstance(i);if(a)return e.stopPropagation(),void n.show();n._isShown()&&(e.stopPropagation(),n.hide(),i.focus())}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||Ze.hideOpenToggles(e)}}const Qe=Ze,et=[{type:"pass-open",template:'<span data-vg-toggle="pass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/></svg></span>'},{type:"pass-close",template:'<span data-vg-toggle="pass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"/></svg></span>'},{type:"loader",template:'<div class="vg-loader"></div>'}],tt=class{constructor(e,t={}){if(!e)throw new Error("Element is required");this._element=e,this._params=l({insert:"afterend",classes:[]},t)}render(e,t){let s=this.toHTML(e,t);"afterend"===this._params.insert&&this._element.insertAdjacentHTML("afterend",s)}toHTML(e=0,t){let s="";for(const e of et)e.type===this._params.template&&(s=e.template);if(s)return s=s.replace("[[classes]]",this._params.classes.join(" ")),d(t,[this._element,this._params,s]),s}setContent(){}},st="vg.hideshowpass",at="show",it=`click.${st}.data.api`;class nt extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({},t))}static get NAME(){return"hideshowpass"}static get NAME_KEY(){return st}toggle(e){return this._isShown()?this.hide(e):this.show(e)}show(e){e&&(this._params=this._getParams(e,this._params)),this._element.classList.add(at),e.remove(),this.build(!0),y.set(this._element,"type","text")}hide(e){this._element.classList.remove(at),e.remove(),this.build(!1),y.set(this._element,"type","password")}_isShown(){return this._element.classList.contains(at)}static init(e,t){nt.getOrCreateInstance(e,t).build(!1)}build(e=!1){this._params.template=e?"pass-open":"pass-close",new tt(this._element,this._params).render()}}q.on(document,it,'[data-vg-toggle="pass"]',(function(e){const t=v.prev(this,"input");t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),nt.getOrCreateInstance(t.shift()).toggle(this)))}));const rt=nt,ot="vg.fs",lt=`submit.${ot}.data.api`;class dt extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({response:{enabled:!1,errors:!1,title:"",message:""},redirect:{error:"",success:""},validate:!1,submit:!1,fields:[],timeout:50,pass:{enabled:!0,template:"pass-open",classes:["vg-form-sender--hide-show-pass"],insert:"afterend"},alert:{enabled:!0,type:"modal",errors:!0,delay:0},ajax:{route:"",target:"",method:"get"},classes:{general:"vg-form-sender",alertCollapse:"vg-form-sender-collapse",alertModal:"vg-form-sender-modal",validation:"needs-validation",wasValidate:"was-validated",content:"vg-form-sender--content"},callback:{afterInit:m,afterSuccess:m,afterError:m},interceptors:{success:!1,error:!1}},t)),this._params.ajax.route=y.get(this._element,"action").toLowerCase(),this._params.ajax.method=y.get(this._element,"method").toLowerCase(),this._button=v.find('[type="submit"]',this._element)||v.find('[form="'+this._element.id+'"]')||null,this._params.isBtnText="false"!==y.get(this._element,"data-btn-text"),this._params.isJsonParse="false"!==y.get(this._element,"data-json-parse"),this._params.isShowPass="true"===y.get(this._element,"data-show-pass")}static get NAME(){return"form-sender"}static get NAME_KEY(){return ot}build(){return this._element.classList.add(this._params.classes.general),[...v.findAll("input, textarea, select",this._element)].forEach((e=>{n(e)&&e.parentElement.classList.add(this._params.classes.content)})),this._params.validate&&(y.set(this._element,"novalidate",""),this._element.classList.add(this._params.classes.validation)),this._params.pass.enabled&&[...v.findAll('input[type="password"]',this._element)].forEach((e=>{rt.init(e,this._params.pass)})),d(this._params.callback.afterInit,[this._element,this]),this}request(e,t){const s=this;s._alertBefore(),s._params.ajax.data=e,s._route((function(e,a){s._element.classList.remove("was-validated"),s._params.response.enabled&&(a.response=s._params.response),s._params.alert.enabled&&("string"==typeof e&&"error"===e?s._params.redirect.error?window.location.href=s._params.redirect.error:(s._params.interceptors.error||s._alertError(t,a),d(s._params.callback.afterError,[s._element,s,t,a])):"string"==typeof e&&"success"===e&&(s._params.redirect.success?window.location.href=s._params.redirect.success:(s._params.interceptors.success||s._alertSuccess(t,a),d(s._params.callback.afterSuccess,[s._element,s,t,a]))))}))}_alertBefore(){const e=this;"collapse"===e._params.alert.type&&[...document.getElementsByClassName(e._params.classes.alertCollapse)].forEach((function(e){e&&e.classList.contains("show")&&Pe.getOrCreateInstance(e,{toggle:!1}).hide()})),e._statusButton("before"),q.trigger(e._element,"vg.fs.before",e)}_alertError(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"error"),q.trigger(s._element,"vg.fs.error",[e,s,t])}_alertSuccess(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"success"),q.trigger(s._element,"vg.fs.success",[e,s,t])}_statusButton(e){const t=this;if(!t._button)return;let s=t._button,a={send:"Отправляем...",text:"Отправить"};if(y.has(t._button,"data-spinner")&&"before"===e&&t._button.insertAdjacentHTML("afterbegin",'<span class="spinner-border spinner-border-sm me-2"></span>'),y.has(t._button,"data-text"))a.text=y.get(t._button,"data-text");else{let e=t._button.querySelector("[data-text]");e&&(a.text=y.get(e,"data-text"),s=e)}if(y.has(t._button,"data-text-send"))a.send=y.get(t._button,"data-text-send");else{let e=t._button.querySelector("[data-text-send]");e&&(a.send=y.get(e,"data-text-send"),s=e)}if("before"===e&&(t._params.isBtnText&&(s.innerHTML=a.send),y.set(t._button,"disabled","disabled")),"after"===e){t._params.isBtnText&&(s.innerHTML=a.text),y.remove(t._button,"disabled");let e=t._button.querySelector(".spinner-border");e&&e.remove()}}_jsonParse(e,t){const s=this;if(s._params.isJsonParse&&"string"==typeof e){let a={};try{a=JSON.parse(e),s.alert(a,t)}catch(a){s.alert(e,t)}}else s.alert(e,t)}alert(e,t){const s=this;if(r(e)&&"code"in e&&e.code&&200===e.code&&"response"in e&&e.response){let s=o(e.response);"string"==typeof s?-1===s.indexOf("Parse error")&&-1===s.indexOf("syntax error")||(t="error",e={response:{title:"Error",message:"Something went wrong, please repeat later"},text:"Something went wrong, please repeat later"}):"errors"in s&&o(s.errors)&&(t=o(s.errors)?"error":"success")}s._params.alert.enabled&&("modal"===s._params.alert.type&&s._alertModal(e,t),"collapse"===s._params.alert.type&&s._alertCollapse(e,t))}_alertModal(e,t){const s=this;[...document.getElementsByClassName("modal")].forEach((function(e){e&&e.classList.contains("show")&&bootstrap.Modal.getOrCreateInstance(e).hide()})),[...document.getElementsByClassName("vg-modal")].forEach((function(e){if(e&&e.classList.contains("show")){const t=be.getOrCreateInstance(e);t.hide([t])}}));let a=s._params.classes.general+"-"+p(),i=v.find("."+s._params.classes.alertModal);i&&i.remove(),setTimeout((()=>{be.init(a,{classes:{alert:s._params.classes.alertModal}},(function(a){let i=a._element;i.classList.add(s._params.classes.alertModal);let n=v.find(".vg-modal-body",i);n&&n.append(s.setDataRelationStatus(i,t,e,"modal")),a.toggle(),s._params.alert.delay>0&&setTimeout((()=>{a.hide()}),s._params.alert.delay)}))}),s._params.timeout)}_alertCollapse(e,t){const s=this;let a=v.find("."+s._params.classes.alertCollapse);a||(a=document.createElement("div"),a.classList.add(s._params.classes.alertCollapse),a.classList.add("vg-collapse"),a.id=s._params.classes.general+"-"+p(),a.append(s.setDataRelationStatus(a,t,e,"collapse")),s._element.prepend(a));let i=Pe.getOrCreateInstance(a,{toggle:!1});i.toggle(),s._params.alert.delay>0&&setTimeout((()=>{i.hide()}),s._params.alert.delay)}setDataRelationStatus(e,t,s,a){let i=v.find(".vg-alert-"+t,e);if(r(s)){if("error"===t&&"code"in s&&200!==s.code&&"text"in s&&!s.text)switch(s.text="Something went wrong, please repeat later",s.code){case 400:s.text="Bad Request";break;case 401:case 403:s.text="Unauthorized";break;case 413:s.text="Forbidden";break;case 404:s.text="Not Found";break;case 422:s.text="Unprocessable Entity";break;case 500:s.text="Internal Server Error";break;case 504:s.text="Gateway Timeout"}if("response"in s){let e=o(s.response),a="",i="",n="";if("string"!=typeof e){if(!("view"in e)){if("title"in e&&(a=e.title),"error"===t&&200!==s.code&&this._params.alert.errors&&(n=" "+s.text+" ("+s.code+")"),i+=a?'<h4 class="vg-alert-content--title">'+a+"</h4>":'<h4 class="vg-alert-content--title">'+n+"</h4>","message"in e&&(i+='<div class="vg-alert-content--message">'+e.message+"</div>"),"errors"in e&&this._params.alert.errors){let t=o(e.errors)||null;if(r(t))for(const e in t)Array.isArray(t[e])?t[e].forEach((function(e){i+="<div>"+e+"</div>"})):i="<div>"+t[e]+"</div>"}s={view:i}}}else s.view=e}}if(i)v.find(".vg-alert-content--text",i).innerHTML=s.view;else{i=document.createElement("div"),i.classList.add("vg-alert","vg-alert-"+t,"vg-alert-"+a);let e=document.createElement("div");e.classList.add("vg-alert-content");let n=document.createElement("div");n.classList.add("vg-alert-content--icon");let r=document.createElement("i");r.innerHTML=R(t),n.append(r),e.append(n);let o=document.createElement("div");o.classList.add("vg-alert-content--text"),o.innerHTML=s.view,e.append(o),i.append(e)}return i}static init(e,t={}){dt.getOrCreateInstance(e,t).build()}}q.on(document,lt,(function(e){if(!y.has(e.target,"data-vgformsender"))return;const t=dt.getOrCreateInstance(e.target,{});if(t){if(t._params.validate&&!t._element.checkValidity())return e.preventDefault(),e.stopPropagation(),t._element.classList.add(t._params.classes.wasValidate),!1;if(!t._params.submit){e.preventDefault();let s=new FormData(t._element);return t.request(s,e)}}}));const ct=dt;function ht(e){for(let t=1;t<arguments.length;t++){let s=arguments[t];for(let t in s)e[t]=s[t]}return e}const mt=function e(t,s){function a(e,a,i){if("undefined"==typeof document)return;"number"==typeof(i=ht({},s,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);let n="";for(let e in i)i[e]&&(n+="; "+e,!0!==i[e]&&(n+="="+i[e].split(";")[0]));return document.cookie=e+"="+t.write(a,e)+n}return Object.create({set:a,get:function(e){if("undefined"==typeof document||arguments.length&&!e)return;let s=document.cookie?document.cookie.split("; "):[],a={};for(let i=0;i<s.length;i++){let n=s[i].split("="),r=n.slice(1).join("=");try{let s=decodeURIComponent(n[0]);if(a[s]=t.read(r,s),e===s)break}catch(e){}}return e?a[e]:a},remove:function(e,t){a(e,"",ht({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,ht({},this.attributes,t))},withConverter:function(t){return e(ht({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),pt="vg.lawcookie",ut="show",gt=`${pt}.hide`,_t=`${pt}.hidden`,ft=`${pt}.show`,vt=`${pt}.shown`,bt=`click.${pt}.data.api`;class wt extends Y{static sParams={};constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({storage:"local",delay:500,cookie:{name:"lawCookie",value:"yes",attributes:{}},animation:{enable:!0,in:"animate__fadeInUp",out:"animate__fadeOutDown",delay:800},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),wt.sParams=this._params,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,wt.NAME_KEY,this._params.animation)}static get NAME(){return"lawcookie"}static get NAME_KEY(){return pt}toggle(){return this._isShown()?this.hide():this.show()}_isShown(){return this.storage().get()}show(){i(this._element)||q.trigger(this._element,ft,{}).defaultPrevented||(this._element.classList.add(ut),this._queueCallback((()=>{q.trigger(this._element,vt,{})}),this._element,!0,this._params.delay))}hide(){q.trigger(this._element,gt).defaultPrevented||setTimeout((()=>{this._element.classList.remove(ut),this._queueCallback((()=>q.trigger(this._element,_t)),this._element,!0)}),this._params.animation.delay)}storage(){return this._storage={isCookie:"cookie"===this._params.storage,storage:"cookie"===this._params.storage?mt:localStorage,name:this._params.cookie.name,value:this._params.cookie.value,attributes:this._params.cookie.attributes},this}get(){return this._storage.isCookie?this._storage.storage.get(this._storage.name):this._storage.storage.getItem(this._storage.name)}set(){this._storage.isCookie?this._storage.storage.set(this._storage.name,this._storage.value,this._storage.attributes):this._storage.storage.setItem(this._storage.name,this._storage.value)}dispose(){super.dispose()}static reset(){mt.remove(wt.sParams.cookie.name),localStorage.clear(),location.reload()}static init(e,t={}){wt.getOrCreateInstance(e,t).toggle()}}F(wt),q.on(document,bt,'[data-vg-toggle="lawcookie"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=v.find("#vg-lawcookie");if(!t)return;const s=wt.getOrCreateInstance(t);s.storage().set(),s.hide()})),q.on(document,bt,'[data-vg-toggle="lawcookie-clear"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=v.find("#vg-lawcookie");t&&(wt.getOrCreateInstance(t).dispose(),location.reload())}));const yt=wt,Lt="vg.loadmore",kt=`${Lt}.loaded`,xt=`click.${Lt}.data.api`;class Et extends Y{constructor(e,t){super(e,t),this._params=this._getParams(e,l({limit:0,offset:0,output:!0,autohide:!0,button:{text:"",send:"Загружаем..."},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!1}},t)),this.fOffset=this._params.offset,this._params.button.text||(this._params.button.text=this._element.innerHTML)}static get NAME(){return"loadmore"}static get NAME_KEY(){return Lt}toggle(e){this._params.ajax.data={limit:this._params.limit,offset:this._params.offset},this._params.button.send&&(this._element.innerHTML=this._params.button.send),this._route(((t,s,a)=>{if("loader"in this._params.ajax&&this._params.ajax.loader){let e=v.find(".vg-loader",a);e&&e.remove()}"output"in this._params&&this._params.output&&a.insertAdjacentHTML("beforeend",s.response),this._params.offset=this.fOffset+this._params.offset,this._element.innerHTML=this._params.button.text,"autohide"in this._params&&this._params.autohide&&(s.response||this._element.remove()),q.trigger(this._element,kt,{stats:t,data:s}),d(e,[this,s,a,t])}))}}q.on(document,xt,'[data-vg-toggle="loadmore"]',(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),Et.getOrCreateInstance(this).toggle()}));const At=Et,Tt=be,Ct=class{constructor(){this.breakpoints={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600}}static check(e){return(new this).define(e)}static checkMobileOrTablet(){let e=!1;var t;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.slice(0,4)))&&(e=!0),e}define(e){let t=window.innerWidth,s=this._checkResponsiveClass(e),a=this.breakpoints,i=Object.keys(a).find((e=>a[e]===s)),n=Object.keys(a),r=n.indexOf(i);return t>=a[n[r+1]]}_checkResponsiveClass(e){let t=e._element,s=e._params,a=0;return a=t.classList.contains(s.classes.XXXL)?this.breakpoints.xxxl:t.classList.contains(s.classes.XXL)?this.breakpoints.xxl:t.classList.contains(s.classes.XL)?this.breakpoints.xl:t.classList.contains(s.classes.LG)?this.breakpoints.lg:t.classList.contains(s.classes.MD)?this.breakpoints.md:t.classList.contains(s.classes.SM)?this.breakpoints.sm:(t.classList.contains(s.classes.XS),this.breakpoints.xs),a}},St="vg.nav",Mt="show",Ot="fade",$t="active",It=`${St}.hide`,Nt=`${St}.hidden`,Pt=`${St}.show`,jt=`${St}.shown`,Ht=`mouseover.${St}.data.api`,Dt=`mouseout.${St}.data.api`,qt=`click.${St}.data.api`,Rt=`keyup.${St}.data.api`,Ft=`resize.${St}.data.api`;class Bt extends Y{constructor(e,t={}){super(e),this._params=this._getParams(e,l({breakpoint:!1,placement:"horizontal",classes:{hamburgerActive:"vg-nav-hamburger-active",hamburgerAlways:"vg-nav-hamburger-always",hamburger:"vg-nav-hamburger",container:"vg-nav-container",wrapper:"vg-nav-wrapper",active:"vg-nav-active",expand:"vg-nav-expand",cloned:"vg-nav-cloned",hover:"vg-nav-hover",flip:"vg-nav-flip",XXXL:"vg-nav-xxxl",XXL:"vg-nav-xxl",XL:"vg-nav-xl",LG:"vg-nav-lg",MD:"vg-nav-md",SM:"vg-nav-sm",XS:"vg-nav-xs"},expand:!0,hover:!1,position:!0,collapse:!0,toggle:'<span class="default"></span>',hamburger:{enable:!0,always:!1,title:"",body:null},callback:m,animation:!0,timeoutAnimation:300,ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._navigation=null,this.navigation="."+this._params.classes.wrapper,this.movedLinks=[],this.$links=v.findAll("."+this._params.classes.wrapper+" > li",this.navigation),!1===this._params.animation&&(this._params.timeoutAnimation=10)}static get NAME(){return"nav"}static get NAME_KEY(){return St}get navigation(){return this._navigation}set navigation(e){let t=v.find(e,this._element);t&&(this._navigation=t)}build(){if(!this.navigation)return;let e=this._params;if(this._element.classList.add(e.classes.container),this._element.classList.add("vg-nav-"+e.placement),e.breakpoint||(e.expand=!1),e.hamburger.always?this._element.classList.add(e.classes.hamburgerAlways):e.breakpoint&&e.expand?!1!==e.breakpoint&&this._element.classList.add("vg-nav-"+e.breakpoint):this._element.classList.add(e.classes.expand),e.hover&&(this._element.classList.add(e.classes.hover),Ct.checkMobileOrTablet()&&this._element.classList.remove(e.classes.hover)),e.expand&&!e.hamburger.body&&null===v.find("."+e.classes.hamburger,this._element)){let t="",s='<span class="'+e.classes.hamburger+'--lines"><span></span><span></span><span></span></span>';e.hamburger.title&&(t='<span class="'+e.classes.hamburger+'--title">'+e.hamburger.title+"</span>"),null!==e.hamburger.body&&(s=e.hamburger.body),this._element.insertAdjacentHTML("afterbegin",'<a href="#sidebar-nav" class="'+e.classes.hamburger+'" data-vg-toggle="sidebar">'+t+s+"</a>")}if(e.toggle){let t=[...v.findAll(".dropdown-mega > a, .dropdown > a",this._element)],s='<span class="toggle">'+e.toggle+"</span>";t.length&&t.forEach((function(e){e.querySelector(".toggle")||e.closest(".dots")||(e.setAttribute("aria-expanded","false"),e.insertAdjacentHTML("beforeend",s))}))}e.collapse&&Ct.check(this)&&"vertical"!==e.placement&&function(e){let t=e.navigation.clientWidth,s=0,a=v.find(".dots",e.navigation),i=R("dots");if(e.$links.length){if(a)s=a.clientWidth;else{let t=v.find("a",e.$links[0]),a=getComputedStyle(t);s=o(a.paddingLeft.slice(0,-2))+o(a.paddingRight.slice(0,-2))+16}for(let i of e.$links)s+=i.getBoundingClientRect().width,t<s?(e.movedLinks.push(i),i.remove()):e.movedLinks.length&&(a?e.navigation.insertBefore(e.movedLinks[0],a):e.navigation.appendChild(e.movedLinks[0]),e.movedLinks.splice(0,1));e.movedLinks.length?a||e.navigation.insertAdjacentHTML("beforeend",'<li class="dropdown dots"><a href="#" aria-expanded="false">'+i+"</a></li>"):a&&a.remove();let n=e.navigation.querySelector(".dots");if(n&&e.movedLinks.length){let t=n.querySelector("ul");if(t)for(let s of e.movedLinks)t.prepend(s);else{let t=document.createElement("ul");t.classList.add("dropdown-content"),t.classList.add("right");for(let s of e.movedLinks)t.prepend(s);n.appendChild(t)}}}}(this),"afterInit"in this._params.callback&&d(this._params.callback.afterInit,[this])}show(e){let t=e.relatedTarget;if(!t||i(t))return;if(t.closest(".dropdown-content")||t.classList.add("first"),q.trigger(t,Pt,{relatedTarget:e}).defaultPrevented)return;let s=v.find(".dropdown-content",t),a=t.firstElementChild;a&&a.setAttribute("aria-expanded","true"),s.classList.add(Mt),t.classList.add($t),function(e){let{width:t,right:s}=e.getBoundingClientRect(),a=window.innerWidth-s-t;e.classList.remove("right"),e.classList.remove("left");let i=e.closest("li").querySelectorAll("ul");if(a>t)for(const e of i)e.classList.add("left");else for(const e of i)e.classList.add("right")}(s),this._queueCallback((()=>{s.classList.add(Ot),q.trigger(t,jt,e)}),s,!0,50)}hide(e){const t=this;if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.off(e,"mouseover",m);let s=e.relatedTarget;if("elm"in e&&e.elm&&(s=e.elm),s){if(q.trigger(s,It).defaultPrevented)return;s.classList.remove($t),s.classList.contains("first")&&s.classList.remove("first"),[...v.findAll("."+Mt,s)].forEach((function(s,a){s.classList.remove(Ot);let i=s.closest(".dropdown");i.classList.contains($t)&&i.classList.remove($t);let n=s.previousElementSibling;if(n&&n.setAttribute("aria-expanded","false"),0===a){const a=()=>{s.classList.remove(Mt),q.trigger(s,Nt,e)};t._queueCallback(a,s,!0,500)}}))}}static init(e,t={}){const s=Bt.getOrCreateInstance(e,t);s.build();let a=v.findAll(".dropdown",s._navigation);s._params.hover?[...a].forEach((function(e){let t=null;q.on(e,Ht,(function(e){if(t)return;Bt.hideOpenDrops(e);let a=e.target.closest(".dropdown");if(!a)return;if(!s.navigation.contains(a))return;t=a;let i={relatedTarget:a};s.show(i)})),q.on(e,Dt,(function(e){if(!t)return;let a=e.relatedTarget.closest(".dropdown"),i=t;for(;a;){if(a===t)return;a=a.parentNode}t=null,s.hide({relatedTarget:a,elm:i})}))})):(q.on(document,Rt,Bt.clearDrops),q.on(document,qt,Bt.clearDrops),q.on(document,qt,".vg-nav a",(function(e){if(!y.has(this,"aria-expanded"))return;"click"in s._params.callback&&d(s._params.callback.click,[this]),e.preventDefault();let t=this.closest(".vg-nav"),a=t.querySelector(".first"),r=this.closest(".dropdown");if(r&&(!i(r)||n(r))){if(a&&this.closest(".first")){if(r.classList.contains("active"))return void s.hide({relatedTarget:r})}else[...v.findAll(".active",t)].forEach((function(e){e&&e!==r&&s.hide({relatedTarget:e})}));s.show({relatedTarget:r})}})));const r=document.getElementById("sidebar-nav");let o=s._element.querySelector("."+s._params.classes.hamburger);r&&o&&(r.addEventListener("vg.sidebar.show",(function(){o.classList.add(s._params.classes.hamburgerActive)})),r.addEventListener("vg.sidebar.hide",(function(){o.classList.remove(s._params.classes.hamburgerActive)})))}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||Bt.hideOpenDrops(e)}static hideOpenDrops(e){const t=v.findAll(".dropdown:not(.disabled):not(:disabled).active");for(const s of t){const t=Bt.getInstance(s.closest(".vg-nav"));if(!t)continue;if(e.target.closest(".first"))return;const a={relatedTarget:s};"click"===e.type&&(a.clickEvent=e),t.hide(a)}}}q.on(window,Ft,(function(){v.find(".vg-nav")&&Bt.getOrCreateInstance(".vg-nav",{}).build()}));const zt=Bt,Yt="vg.rollup",Xt="show",Kt="vg-rollup-display--none",Vt=`${Yt}.hide`,Ut=`${Yt}.show`,Gt=`click.${Yt}.data.api`;class Wt extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({content:"text",offset:0,cnt:0,fade:!0,transition:!1,number:!1,height:0,ellipsis:{line:null},more:" еще ",button:{enable:!0,more:"Показать",less:"Свернуть"}},t)),this.classes={container:"vg-rollup",hidden:"vg-rollup-content--hidden",fade:"vg-rollup-content--fade",ellipsis:"vg-rollup-content--ellipsis",button:"vg-rollup-content--button",transition:"vg-rollup-content--transition"},this.total=0,this.count=0,this.offset=0,this.isOffset=!1,this._params.offset>0&&(this.offset=this._params.offset||0,this.isOffset=!0),this.build()}static get NAME(){return"rollup"}static get NAME_KEY(){return Yt}static toggle(e,t){const s=Wt.getOrCreateInstance(e);if(s.isShow()){let e="";if(s._params.number){let t=s.total-s.count;t>0&&(e=s._params.more+t)}t.setAttribute("aria-expanded",!1),s._element.classList.remove(Xt),t.innerHTML=s._params.button.more+e,s.switch(s._element,!0),q.trigger(s._element,Vt,{relatedTarget:t})}else s._element.classList.add(Xt),t.innerHTML=s._params.button.less,s.offset>0&&(s.isOffset?t.innerHTML=s._params.button.more:t.innerHTML=s._params.button.less),s.switch(s._element,!1),q.trigger(s._element,Ut,{relatedTarget:t})}build(e=null,t=!0){let s=this,a=e||s._element,i=a.clientHeight,n=s._params.height||i/2;a.classList.add(s.classes.container);let r=s._params.fade,o=s._params.transition,l=null!==s._params.ellipsis.line,d=s._params.button.enable,c=s._params.number;if(t||s.switch(a),i>n&&"text"===s._params.content)a.classList.add(s.classes.hidden),a.style.height=n+"px",h(),m(),p(),u();else if("elements"===s._params.content){let e=s._params.elements||"item",t=a.querySelectorAll("."+e),i=s._params.cnt||5,n=1;s.total=t.length,s.count=i;for(const e of t)n>i&&e.classList.add(Kt),n++;!0===d&&(d=n-1>i),h(),m(),p(),u()}function h(){if(l){let e=s._params.ellipsis.line;r=!1,e?(a.classList.add(s.classes.ellipsis),a.style.webkitLineClamp=e):console.log("Переменная [data-line] или параметр[line] не должны быть пустыми")}}function m(){o&&a.classList.add(s.classes.transition)}function p(){r&&a.classList.add(s.classes.fade)}function u(){if(t&&(a.setAttribute("id",a.id),d)){let e="";if(c){let t=s.total-s.count;t>0&&(e=s._params.more+t)}let t=s._params.button.more;a.insertAdjacentHTML("afterend",'<div class="'+s.classes.button+'"><a href="#" aria-expanded="false" data-vg-toggle="rollup" data-vg-target="#'+a.id+'">'+t+e+"</a></div>")}}}switch(e,t=!1){const s=this;if(t&&!s.isOffset)this.build(e,!1),this._params.offset>0&&(s.offset=this._params.offset,s.offset>0&&(this.isOffset=!0));else if(e.classList.remove(this.classes.hidden),e.classList.remove(this.classes.ellipsis),e.classList.remove(this.classes.fade),e.removeAttribute("style"),"elements"===s._params.content){let t=s._params.elements,a=v.findAll("."+t,e);a.length&&(s.offset>0?(a.slice(s.offset,s.offset+s.count).forEach((e=>e.classList.remove(Kt))),s.offset=s.offset+s._params.offset,s.offset>=a.length-s.count&&(s.isOffset=!1,s.offset=0)):a.forEach((e=>e.classList.remove(Kt))))}}isShow(){return this._element.classList.contains(Xt)}static init(e,t={},s){d(s,[Wt.getOrCreateInstance(e,t)])}}q.on(document,Gt,'[data-vg-toggle="rollup"]',(function(e){const t=v.getElementFromSelector(this);t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),Wt.toggle(t,this)))}));const Jt=Wt,Zt="vg.select",Qt="show",es="active",ts="vg-select",ss="vg-select-dropdown",as="vg-select-list",is="vg-select-list--option",ns="vg-select-list--optgroup",rs="vg-select-current",os="vg-select-current--placeholder",ls=`click.${Zt}.data.api`,ds=`keyup.${Zt}.data.api`,cs=`reset.${Zt}.data.api`,hs=`${Zt}.change`,ms=`${Zt}.hide`,ps=`${Zt}.hidden`,us=`${Zt}.show`,gs=`${Zt}.shown`,_s='[data-vg-toggle="select"]';let fs;class vs extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({search:!1,placeholder:""},t)),this._drop=v.find("."+ss,this._element),this.refresh()}static get NAME(){return"select"}static get NAME_KEY(){return Zt}static buildListOptions(e,t,a){let i=e.options,n=document.createElement("ul");if(a&&!([...i].filter((e=>y.has(e,"selected"))).length>0)){let e=document.createElement("option");y.set(e,"hidden",""),y.set(e,"selected",""),i.add(e,0)}n.classList.add(as);let r=e.querySelectorAll("optgroup");if(r.length){let e=!1;[...r].forEach((function(t){let s=document.createElement("ol");s.classList.add(ns);let a=document.createElement("li");a.innerHTML=t.label.trim(),a.classList.add("vg-select-list--optgroup-title"),s.prepend(a),o(v.findAll("option",t),s,e),n.append(s),e=!0}))}else o(i,n,!1);return t.append(n),n;function o(t,a,i){let n=0;for(const r of t){let t=document.createElement("li");t.innerHTML=r.innerHTML.trim().replace(/<\/[^>]+(>|$)/g,""),t.dataset.value=y.get(r,"value"),t.classList.add(is),y.set(t,"data-vg-toggle","select-option");let o=y.get(r);if(!s(o))for(const e of Object.keys(o))y.set(t,"data-"+e,o[e]);n!==e.selectedIndex||i||t.classList.add("selected"),y.has(r,"disabled")&&t.classList.add("disabled"),y.has(r,"hidden")&&t.classList.add("hidden"),a.append(t),n++}}}static build(e,t=!1){let a,i=e.dataset.placeholder||"",n=!!i,r=e.dataset.search||!1;("true"===e.dataset?.inited||t)&&vs.destroy(e),e.parentElement.style.position="relative";let o=[...e.options].filter((e=>y.has(e,"selected")&&""!==e.value)).length>0;n&&-1===e.selectedIndex?(a='<span class="'+os+'">'+i+"<span>",y.set(e,"disabled","")):n||-1!==e.selectedIndex?a=n?n&&o?e.options[e.selectedIndex].innerText:n&&!o?'<span class="'+os+'">'+i+"<span>":n||o?'<span class="'+os+'">-<span>':e.options[e.selectedIndex].innerText:e.options[e.selectedIndex].innerText:(a='<span class="'+os+'">-<span>',y.set(e,"disabled",""));let l=y.get(e,"class"),d=document.createElement("div");l=l.split(" ");for(const e of l)d.classList.add(e);y.has(e,"disabled")&&d.classList.add("disabled");let c=y.get(e);if(!s(c))for(const e of Object.keys(c))y.set(d,"data-"+e,c[e]);let h=document.createElement("div");h.classList.add(rs),y.set(h,"data-vg-toggle","select"),y.set(h,"aria-expanded","false"),h.innerHTML=a.trim(),d.append(h);let m=document.createElement("div");if(m.classList.add(ss),d.append(m),vs.buildListOptions(e,m,n),e.insertAdjacentElement("afterend",d),e.dataset.inited="true",r){let e=document.createElement("div");e.classList.add("vg-select-search");let t=document.createElement("input");y.set(t,"name","vg-select-search"),y.set(t,"type","text"),y.set(t,"placeholder","Поиск..."),y.set(t,"autocomplete","off"),e.append(t),m.prepend(e)}return d}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){if(!i(this._element)&&!q.trigger(this._element,us,{relatedTarget:e}).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.on(e,"mouseover",m);if(this._element.classList.add(Qt),this._params.search){let e=v.find("input",this._element);e&&e.focus()}this._queueCallback((()=>{this._element.classList.add(es),q.trigger(this._element,gs,{relatedTarget:e})}),this._drop,!0,50)}}hide(){!i(this._element)&&this._isShown()&&this._completeHide()}_completeHide(){if(q.trigger(this._element,ms,{}).defaultPrevented)return;this._element.classList.remove(es);let e=v.find(_s,this._element);if(y.set(e,"aria-expanded","false"),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))q.off(e,"mouseover",m);this._queueCallback((()=>{this._element.classList.remove(Qt),q.trigger(this._element,ps,{})}),this._drop,!0,10)}_isShown(){return this._element.classList.contains(Qt)}refresh(){const e=this._element.previousSibling;new MutationObserver((()=>{clearTimeout(fs),fs=setTimeout((()=>{vs.build(e,!0)}),100)})).observe(e,{attributeFilter:["disabled","required","style","hidden"],childList:!0,subtree:!0,characterDataOldValue:!0})}dispose(){super.dispose()}static destroy(e){let t=v.next(e,"."+ts);t=t.shift(),t&&t.classList.contains(ts)&&(t.remove(),e.selectedIndex=0,[...e.querySelectorAll("option")].forEach((function(t,s){t.hasAttribute("selected")&&(e.selectedIndex=s)})))}static hideOpenToggles(e){const t=v.findAll(".vg-select:not(.disabled):not(:disabled).show");for(const s of t){const t=vs.getInstance(s);if(!t)continue;if(e.target.closest("."+ts)===t._element)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||vs.hideOpenToggles(e)}static changeSelector(e,t,a={}){!r(a)&&s(a)||(e.value=o(t),q.trigger(e,hs,{data:a}),q.trigger(e,"change",{data:a}))}static init(e,t={},s=!1){let a=vs.build(e);vs.getOrCreateInstance(a,t)}}q.on(document,ls,vs.clearDrops),q.on(document,ls,_s,(function(){const e=this.closest("."+ts);y.set(this,"aria-expanded",!0);const t=v.find(".vg-select.show");t&&t!==e&&vs.getInstance(t).hide(),vs.getOrCreateInstance(e).toggle(this)})),q.on(document,ls,'[data-vg-toggle="select-option"]',(function(e){let t=e.target;if(!t.classList.contains("disabled")){let e=t.closest("."+ts),s=e.querySelectorAll("."+is);if(s.length)for(const e of s)e.classList.remove("selected");t.classList.add("selected"),e.querySelector("."+rs).innerText=t.innerText,e.classList.remove("show");let a=e.previousSibling;vs.changeSelector(a,t.dataset.value,{value:t.dataset.value,title:t.innerHTML})}})),q.on(document,ds,"[name=vg-select-search]",(function(e){let t=this,s=t?.closest("."+ss).querySelector("."+as);if(s){let e=[...s.querySelectorAll("."+is)],a=[...s.querySelectorAll("."+ns)],i=t?.value;e=e.concat(a);for(const t of e)y.show(t);if(i.length){i=i.trim(),i=i.toLowerCase();let t=[];[i,u(i),u(i,!0)].forEach((s=>{for(const a of e){let e=a.innerText.toLowerCase();y.hide(a),e.includes(s)&&t.push(a)}})),t.forEach((e=>y.show(e)))}}})),q.on(document,cs,"form",(function(){v.findAll("select."+ts,this).forEach((e=>{vs.build(e,!0)}))}));const bs=vs,ws="vg.sidebar",ys="show",Ls="vg-sidebar-open",ks=`${ws}.hide`,xs=`${ws}.hidden`,Es=`${ws}.show`,As=`${ws}.shown`,Ts=`${ws}.loaded`,Cs=`keydown.dismiss.${ws}`,Ss=`hidePrevented.${ws}`,Ms=`click.${ws}.data.api`,Os=`popstate.${ws}.data.api`,$s=`DOMContentLoaded.${ws}.data.api`;class Is extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,overflow:!0,keyboard:!0,hash:!1,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:800},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,Is.NAME_KEY,this._params.animation)}static get NAME(){return"sidebar"}static get NAME_KEY(){return ws}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(e&&(t._params=t._getParams(e,t._params)),t._route((function(e,s){q.trigger(t._element,Ts,{stats:e,data:s})})),q.trigger(t._element,Es,{relatedTarget:e}).defaultPrevented||(t._params.backdrop&&ee.show(),t._params.overflow&&W.append(),this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),q.on(window,Os,(()=>{this.hide()}))),t._element.classList.add(ys),document.body.classList.add(Ls),t._queueCallback((()=>{q.on(v.find(".vg-backdrop"),"mousedown.vg.backdrop",(function(){t.hide()})),q.trigger(t._element,As,{relatedTarget:e})}),t._element,!0,50)))}hide(){const e=this;i(e._element)||q.trigger(this._element,ks).defaultPrevented||setTimeout((()=>{e._element.setAttribute("aria-expanded",!1),e._element.classList.remove(ys),this._queueCallback((()=>{e._params.backdrop&&ee.hide((function(){e._params.overflow&&W.destroy()})),e._params.overflow&&W.destroy(),e._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),document.body.classList.remove(Ls),q.trigger(this._element,xs)}),this._element,!0)}),this._params.animation.delay)}dispose(){super.dispose()}_isShown(){return this._element.classList.contains(ys)}_addEventListeners(){q.on(document,Cs,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():q.trigger(this._element,Ss))}))}}F(Is),q.on(document,Ms,'[data-vg-toggle="sidebar"]',(function(e){const t=v.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;this.setAttribute("aria-expanded",!0),q.one(t,xs,(()=>{this.setAttribute("aria-expanded",!1)}));const s=v.find(".vg-sidebar.show");s&&s!==t&&Is.getInstance(s).hide(),Is.getOrCreateInstance(t).toggle(this)})),q.on(document,$s,(function(){let e=window.location.hash.slice(1);if(e){let t=v.find("#"+e);if(t&&t.classList.contains("vg-sidebar")){if(i(t))return;Is.getOrCreateInstance(t).toggle()}}}));const Ns=Is,Ps="vg.spy",js=`.${Ps}`,Hs=`activate${js}`,Ds=`click${js}`,qs=`load${js}.data-api`,Rs="active",Fs="[href]",Bs=".nav-link",zs=`${Bs}, .nav-item > ${Bs}, .list-group-item`;class Ys extends Y{constructor(e,t){super(e,t),this._params=this._getParams(e,l({offset:null,rootMargin:"0px 0px -25%",smoothScroll:!0,target:this._element,threshold:[.1,.5,1]},t)),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this._params=this._configAfterMerge(this._params),console.log(this._params),this.refresh()}static get NAME(){return"spy"}static get NAME_KEY(){return Ps}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=(t=e.target,(a(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(((s=t)&&window.CSS&&window.CSS.escape&&(s=s.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),s)):null)||document.body),e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e;var t,s}_maybeEnableSmoothScroll(){this._params.smoothScroll&&(q.off(this._params.target,Ds),q.on(this._params.target,Ds,Fs,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const s=this._rootElement||window,a=t.offsetTop-this._element.offsetTop;if(s.scrollTo)return void s.scrollTo({top:a,behavior:"smooth"});s.scrollTop=a}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._params.threshold,rootMargin:this._params.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),s=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},a=(this._rootElement||document.documentElement).scrollTop,i=a>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=a;for(const n of e){if(!n.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(n));continue}const e=n.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(s(n),!a)return}else i||e||s(n)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=v.findAll(Fs,this._params.target);for(const t of e){if(!t.hash||i(t))continue;const e=v.find(decodeURI(t.hash));n(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._params.target),this._activeTarget=e,e.classList.add(Rs),this._activateParents(e),q.trigger(this._element,Hs,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("vg-dropdown-item"))v.find('[data-vg-toggle="dropdown"]',e.closest(".vg-dropdown")).classList.add(Rs);else for(const t of v.parents(e,".nav, .list-group"))for(const e of v.prev(t,zs))e.classList.add(Rs)}_clearActiveClass(e){e.classList.remove(Rs);const t=v.findAll(`${Fs}.${Rs}`,e);for(const e of t)e.classList.remove(Rs)}}q.on(window,qs,(()=>{for(const e of v.findAll('[data-vg-toggle="spy"]'))Ys.getOrCreateInstance(e)}));const Xs=Ys,Ks="vg.tabs",Vs=`${Ks}.hide`,Us=`${Ks}.hidden`,Gs=`${Ks}.show`,Ws=`${Ks}.shown`,Js=`${Ks}.loaded`,Zs=`keydown.${Ks}`,Qs=`load.${Ks}`,ea=`click.${Ks}`,ta=`mouseover.${Ks}`,sa=`mouseout.${Ks}`,aa="ArrowLeft",ia="ArrowRight",na="ArrowUp",ra="ArrowDown",oa="Home",la="End",da="active",ca="hover",ha="fade",ma="show",pa="vg-tabs-slider",ua='[data-vg-toggle="dropdown"]',ga=`:not(${ua})`,_a='[data-vg-toggle="tab"]',fa=`.vg-tabs-link${ga}, .list-group-item${ga}, [role="tab"]${ga}, ${_a}`,va=`.${da}[data-vg-toggle="tab"]`;class ba extends Y{constructor(e,t){if(super(e,t),this._params=l({slide:!1,hash:!1,ajax:{route:"",target:"",method:"get",loader:!1,once:!0,output:!0}},this._params),this._parent=this._element.closest('.list-group, .vg-tabs-panel, [role="tablist"]'),this._main_parent=this._parent.closest(".vg-tabs"),this._params=this._getParams(this._main_parent,this._params),this._params=this._getParams(this._element,this._params),!this._parent)throw new TypeError(`${e.outerHTML} не имеет родителя ${fa}`);this._setInitialAttributes(this._parent,this._getChildren()),this._setInitialSlider(),this._setTabHash(),q.on(this._element,Zs,(e=>this._keydown(e)))}static get NAME(){return"tabs"}static get NAME_KEY(){return Ks}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),s=t?q.trigger(t,Vs,{relatedTarget:e}):null;q.trigger(e,Gs,{relatedTarget:t}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_elemIsActive(e){return e.classList.contains(da)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_activate(e,t){e&&(e.classList.add(da),this._activate(v.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(this._route(((e,t)=>{q.trigger(this._element,Js,{stats:e,data:t})})),e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),q.trigger(e,Ws,{relatedTarget:t})):e.classList.add(ma)}),e,e.classList.contains(ha)))}_deactivate(e,t){e&&(e.classList.remove(da),e.blur(),this._deactivate(v.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),q.trigger(e,Us,{relatedTarget:t})):e.classList.remove(ma)}),e,e.classList.contains(ha)))}_keydown(e){if(![aa,ia,na,ra,oa,la].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!i(e)));let s;if([oa,la].includes(e.key))s=t[e.key===oa?0:t.length-1];else{const a=[ia,ra].includes(e.key);s=((e,t,s)=>{const a=e.length;let i=e.indexOf(t);return-1===i?s?e[0]:e[a-1]:(i+=s?1:-1,i=(i+a)%a,e[Math.max(0,Math.min(i,a-1))])})(t,e.target,a)}s&&(s.focus({preventScroll:!0}),ba.getOrCreateInstance(s).show())}_setTabHash(){if(!this._params.hash)return;let e=document.location.toString();if(e.match("#")){let t=e.split("#")[1],s=v.find('[href="#'+t+'"]',this._parent)||v.find('[data-vg-target="#'+t+'"]',this._element)||null;s&&ba.getOrCreateInstance(s).show()}}_setInitialSlider(){if(!this._params.slide)return;let e=v.find("."+pa,this._main_parent);e||(e=document.createElement("span"),e.classList.add(pa),this._main_parent.prepend(e)),this._main_parent.classList.add("vg-tabs-with-slider");let t=v.find("."+da,this._parent),{width:s,height:a}=window.getComputedStyle(t);t.classList.add(ca),e.style.width=s,e.style.height=a,e.style.left=t.offsetLeft+"px",q.on(this._main_parent,ta,_a,(t=>{let s=t.target,{width:a,height:n}=window.getComputedStyle(s);if(["A","AREA"].includes(t.target.tagName)&&t.preventDefault(),i(s))return;let r=v.find("."+ca,this._parent);r&&r.classList.remove(ca),s.classList.add(ca),e.style.width=a,e.style.height=n,e.style.left=s.offsetLeft+"px"})),q.on(this._main_parent,sa,_a,(t=>{["A","AREA"].includes(t.target.tagName)&&t.preventDefault();let s=v.find("."+da,this._parent),{width:a,height:i}=window.getComputedStyle(s);[...v.findAll("."+ca,this._parent)].forEach((e=>{e.classList.remove(ca)})),s.classList.add(ca),e.style.width=a,e.style.height=i,e.style.left=s.offsetLeft+"px"}))}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),s=this._getOuterElement(e);e.setAttribute("aria-selected",t),s!==e&&this._setAttributeIfNotExists(s,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=v.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_setAttributeIfNotExists(e,t,s){e.hasAttribute(t)||e.setAttribute(t,s)}_getChildren(){return v.findAll(fa,this._parent)}_getInnerElement(e){return e.matches(fa)?e:v.find(fa,e)}_getOuterElement(e){return e.closest(".vg-tabs-item, .list-group-item")||e}_toggleDropDown(e,t){const s=this._getOuterElement(e);if(!s.classList.contains("dropdown"))return;const a=(e,a)=>{const i=v.find(e,s);i&&i.classList.toggle(a,t)};a(ua,da),a(".dropdown-content",ma),s.setAttribute("aria-expanded",t)}}q.on(document,ea,_a,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||ba.getOrCreateInstance(this).show()})),q.on(window,Qs,(()=>{for(const e of v.findAll(va))ba.getOrCreateInstance(e)}));const wa=ba,ya="vg.toast",La="vg-toast-open",ka="show",xa=`${ya}.hide`,Ea=`${ya}.hidden`,Aa=`${ya}.show`,Ta=`${ya}.shown`,Ca=`${ya}.loaded`,Sa=`keydown.dismiss.${ya}`,Ma=`hidePrevented.${ya}`,Oa=`click.${ya}.data.api`;class $a extends Y{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({static:!0,placement:"bottom center",autohide:!1,delay:3e3,enableClickToast:!0,enableButtonClose:!0,keyboard:!0,theme:"dark",stack:{enable:!0,max:5},animation:{enable:!0,in:"animate__fadeIn",out:"animate__fadeOut",delay:400},ajax:{route:"",target:"",method:"get",loader:!1,once:!1,output:!0}},t)),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,$a.NAME_KEY,this._params.animation),this._dismissElement(),this._addEventListeners(),this._timeout=null}static get NAME(){return"toast"}static get NAME_KEY(){return ya}static run(e,t={},s){return $a.build(e,t,s)}static build(e,t,s){t=l({placement:"bottom center",static:!1,theme:"dark",stack:{enable:!1}},t);let a=document.createElement("div");a.classList.add("vg-toast"),a.id="vg-toast-"+p(),"theme"in t&&a.classList.add("vg-toast-"+t.theme),"placement"in t&&t.placement.split(" ").forEach((e=>a.classList.add(e)));let i=document.createElement("div");if(i.classList.add("vg-toast-wrapper"),"type"in t){let e=document.createElement("div");e.classList.add("vg-toast-icon"),i.append(e)}let n=document.createElement("div");n.classList.add("vg-toast-content");let r=document.createElement("div");if(r.classList.add("vg-toast-body"),"string"==typeof e)r.innerHTML=e,n.append(r);else if(Array.isArray(e))if(e.length>1){let t=document.createElement("div");t.classList.add("vg-toast-header"),t.innerHTML=e[0],n.append(t),r.innerHTML=e[1],n.append(r)}else r.innerHTML=e[0],n.append(r);if(i.append(n),"enableButtonClose"in t&&t.enableButtonClose){let e=document.createElement("div");e.classList.add("vg-toast-button"),e.innerHTML='<button class="vg-btn-close" data-vg-dismiss="toast"></button>',i.append(e)}a.append(i),document.body.append(a);let o=$a.getOrCreateInstance(a,t);d(s,[o]),o.show()}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){i(this._element)||(this._clearTimeout(),this._params=this._getParams(e||{},this._params),this._route((function(e,t){q.trigger(this._element,Ca,{stats:e,data:t})})),q.trigger(this._element,Aa,{relatedTarget:e}).defaultPrevented||(this._element.classList.add(ka),document.body.classList.add(La),this._setPlacement(),this._queueCallback((()=>{this._element.classList.add(ka),q.trigger(this._element,Ta,{relatedTarget:e}),this._scheduleHide()}),this._element,!0,0)))}hide(){i(this._element)||q.trigger(this._element,xa).defaultPrevented||setTimeout((()=>{this._element?.classList.remove(ka),this._queueCallback((()=>{document.body.classList.remove(La),q.trigger(this._element,Ea),this._params.stack.enable&&this._setPlacement(),this._params.static||this.dispose()}),this._element,!1,this._params.animation.delay)}),this._params.animation.delay)}dispose(){this._clearTimeout(),this._isShown()&&this._element.classList.remove(ka),this._params.static||this._element.remove(),super.dispose()}_scheduleHide(){this._params.autohide&&(this._timeout=setTimeout((()=>{this.hide()}),this._params.delay))}_isShown(){return this._element.classList.contains(ka)}_setPlacement(){let e=this._enableStack();if(this._params.stack.enable&&e.length>this._params.stack.max){let t=e.shift();$a.getInstance(t.el).hide()}e.forEach((e=>{let t=e.el.classList.contains("top"),s=e.el.classList.contains("bottom"),a=e.el.classList.contains("left"),i=e.el.classList.contains("right"),n=e.el.classList.contains("center");t||s||n||i||a||(s=!0,n=!0),n?a?(e.el.style.left=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):i?(e.el.style.right=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):s?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.bottom=e.top+"px"):t?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.top=e.top+"px"):(e.el.style.left="calc(50% - ("+e.el.clientHeight+"px) / 2)",e.el.style.bottom="calc(50% - "+e.top+"px)"):(a&&(e.el.style.left=0),s&&(e.el.style.bottom=e.top+"px"),t&&(e.el.style.top=e.top+"px"),i&&(e.el.style.right=0))}))}_enableStack(){let e=[...v.findAll(".vg-toast.show")],t=0;return this._params.stack.enable?(e=e.map((e=>({el:e,top:e.clientHeight}))),e.map((function(e,s){return 0===s?{el:e.el,top:0}:(t+=e.top,{el:e.el,top:t})}))):(e.forEach((e=>{e!==this._element&&$a.getInstance(e).hide()})),[{el:this._element,top:0}])}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}_addEventListeners(){q.on(document,Sa,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():q.trigger(this._element,Ma))})),this._params.enableClickToast&&(this._element.classList.add("vg-toast-pointer"),q.on(document,Oa,"#"+this._element.id,(()=>{this.hide()})))}}F($a),q.on(document,Oa,'[data-vg-toggle="toast"]',(function(e){const t=v.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),q.one(t,Ea,(()=>{this.setAttribute("aria-expanded",!1)})),$a.getOrCreateInstance(t).toggle(this))}));const Ia=$a;vg=t})();
3
3
  //# sourceMappingURL=vgapp.js.map