PageSourceSearch

https://fabergemuseum.ru/assets/built/js/min/built.js?1592420882

js fabergemuseum.ru collected 2026-10-02 03:58:53 UTC 351,003 bytes, 25 lines download raw bytes

1!function o(n,a,h){function l(e,t){if(!a[e]){if(!n[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(c)return c(e,!0);var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}var r=a[e]={exports:{}};n[e][0].call(r.exports,function(t){return l(n[e][1][t]||t)},r,r.exports,o,n,a,h)}return a[e].exports}for(var c="function"==typeof require&&require,t=0;t<h.length;t++)l(h[t]);return l}({1:[function(t,e,i){"use strict";var s=new(t("../v-js/v-export").V)({console:!!(null!==document.body.getAttribute("data-v-console")&"false"!==document.body.getAttribute("data-v-console")),page:document.body.getAttribute("data-v-page"),tablet:parseInt(document.body.getAttribute("data-v-tablet")),mobile:parseInt(document.body.getAttribute("data-v-mobile"))});s=s.init(),window.v=s},{"../v-js/v-export":2}],2:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var c=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],s=!0,r=!1,o=void 0;try{for(var n,a=t[Symbol.iterator]();!(s=(n=a.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(t){r=!0,o=t}finally{try{!s&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},p=function t(e,i,s){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,s)}if("value"in r)return r.value;var n=r.get;return void 0!==n?n.call(s):void 0},o=function(){function s(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var g=i.V=function t(e){for(var i in d(this,t),this.time=+new Date,this.prop={console:!0,page:"index",tablet:1199,mobile:760},e)this.prop[i]=e[i];this.prefix="v-",this.name="V",this.eventListenerAttribute="v_eventListeners"};Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&Number.isFinite(t)&&!(t%1)},Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},[].includes||(Array.prototype.includes=function(t){var e=Object(this),i=parseInt(e.length)||0;if(0===i)return!1;var s,r=parseInt(arguments[1])||0;for(0<=r?s=r:(s=i+r)<0&&(s=0);s<i;){var o=e[s];if(t===o||t!=t&&o!=o)return!0;s++}return!1}),String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),s=1;s<arguments.length;s++){var r=arguments[s];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])}return i},writable:!0,configurable:!0}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),g.prototype.loaded=!1,g.prototype.page=[],g.prototype.doc=document,g.prototype.document=document.documentElement,g.prototype.body=document.body,g.prototype.vw=[],g.prototype.vh=[],g.prototype.resize=[],g.prototype.timeMin=25,g.prototype.ajaxTimeMax=5e3,g.prototype.console=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"";if(!0!==(3<arguments.length&&void 0!==arguments[3]?arguments[3]:this.prop.console))return!1;if(0<t.length){var s="font: 2.5em/1 Arial; color: #298DA4;",r="font: 1.25em/1 Arial; color: dodgerblue;",o="font: 1.25em/1 Arial; color: crimson;",n="font: 1.25em/1 Arial; color: orange;",a="font: 1.25em/1 Arial; color: darkgray;";switch(i){case"title":console.log("%c"+t,s);break;case"info":console.info("%c"+t,r);break;case"error":console.error("%c"+t,o);break;case"warn":console.warn("%c"+t,n);break;default:console.log("%c"+t,a)}}return null!==e&&console.dir(e),!0},g.prototype.checkType=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"function",e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if("function"===t){return e&&"[object Function]"==={}.toString.call(e)}if("dom"===t)return null!==this.doc.querySelector(e);
1if("htmlElement"===t)return e instanceof HTMLElement;if("object"===t)return"object"===(void 0===e?"undefined":u(e));if("string"===t)return"string"==typeof e;if("number"===t)return"number"==typeof e;if("integer"===t)return!!Number.isInteger(e);if("boolean"===t)return"boolean"==typeof e;if("array"===t)return!!Array.isArray(e);if("bezier"===t){var s=!0;if(!e)return!1;if(void 0!==e.on?"boolean"!=typeof e.on&&(s=!1):s=!1,"string"!=typeof e.name)if(e.values)if(Array.isArray(e.values))if(e.values.length<4)s=!1;else for(var r=0;r<e.values.length;r++)"number"!=typeof e.values[r]&&(s=!1);else s=!1;else s=!1;return s}if("numberArray"===t){if(!Array.isArray(e))return!1;if(e.length<i.count)return!1;for(var o=0;o<e.length;o++)if("number"!=typeof e[o])return!1;return!0}if("functionArray"===t){if(!Array.isArray(e))return!1;if(e.length<i.count)return!1;for(var n=0;n<e.length;n++)if("function"!=typeof e[n])return!1;return!0}if("stringArray"===t){if(!Array.isArray(e))return!1;if(e.length<i.count)return!1;for(var a=0;a<e.length;a++)if("string"!=typeof e[a])return!1;return!0}if("callback"===t)return void 0!==e.target&&("number"==typeof e.target&&(void 0!==e.do&&!!this.checkType("function",e.do)));if("callbacks"===t){if(!Array.isArray(e))return!1;for(var h=0;h<e.length;h++)if(!this.checkType("callback",e[h]))return!1;return!0}if("styleCallback"===t)return void 0!==e.scope&&(!!this.checkType("numberArray",e.scope,{count:2})&&(void 0!==e.property&&("string"==typeof e.property&&(void 0!==e.value&&!!this.checkType("function",e.value)))));if("styleCallbacks"===t){if(!Array.isArray(e))return!1;for(var l=0;l<e.length;l++)if(!this.checkType("styleCallback",e[l]))return!1;return!0}return!1},g.prototype.checkTypes=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{obj:{},name:"Name",console:!0,vars:[]},e=t.obj,i=void 0===e?{}:e,s=t.name,r=void 0===s?"Name":s,o=t.console,n=void 0===o||o,a=t.vars,h=void 0===a?[]:a;if(!this.checkType("object",i))return!1;if(!this.checkType("string",r))return!1;if(!this.checkType("boolean",n))return!1;if(!this.checkType("array",h))return!1;for(var l=[],c=0;c<h.length;c++)void 0===i[h[c][0]]?l.push(r+". "+h[c][0]+" doesn't exist in"):this.checkType(h[c][1],i[h[c][0]],h[c][2])||l.push(r+". "+h[c][0]+" must be a "+h[c][1]);if(0===l.length)return!0;for(var p=0;p<l.length;p++)this.console(l[p],i,"error",n);return!1},g.prototype.childOf=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(null===t||null===e)return!1;return function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(null===e||null===i)return!1;var s=!1;return e===i&&(s=!0),!0===s||null!==e&&t(e.parentNode,i)}(t,e)},g.prototype.removeChildren=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(!this.checkType("htmlElement",t))return!1;for(;t.firstChild;)t.removeChild(t.firstChild);return!0},g.prototype.insertAfter=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(null==t||null==e)return!1;var s=null==i?t.parentNode:i,r=t.nextSibling;return r?s.insertBefore(e,r):s.appendChild(e),!0},g.prototype.bindEventListener=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e={el:null,target:"",do:function(){}};for(var i in t)e[i]=t[i];if(!this.checkType("htmlElement",e.el)&e.el!=window)return!1;if(!this.checkType("string",e.target))return!1;if(!this.checkType("function",e.do))return!1;this.checkType("object",e.el[this.eventListenerAttribute])||(e.el[this.eventListenerAttribute]={});var s=e.target+"__"+Math.random();return e.el.addEventListener(e.target,e.do,!1),e.el[this.eventListenerAttribute][s]=e.do,{el:e.el,id:s}},g.prototype.getEventListener=function(t){var e={el:null,id:""};for(var i in t)e[i]=t[i];if(!this.checkType("htmlElement",e.el)&e.el!=window)return!1;if(!this.checkType("string",e.id))return!1;if(!this.checkType("object",e.el[this.eventListenerAttribute]))return!1;for(var s in e.el[this.eventListenerAttribute])if(s===e.id)return{el:e.el,id:e.id,do:e.el[this.eventListenerAttribute][s]};return!1},g.prototype.unbindEventListener=function(t){var e=this.getEventListener(t);if(!e)return!1;var i=e.id;return i=i.split("__"),e.el.removeEventListener(i[0],e.do,!1),delete e.el[this.eventListenerAttribute][e.id],!0},g.prototype.loadEvent=function(){return this.load=[],window.addEventListener("load",function(){this.loaded=!0;for(var t=0;t<this.load.length;t++){var e=this.load[t][1];this.checkType("function",e)&&e()}this.body.classList.remove("v-loading"),this.time=+new Date-this.time,this.console("The page has been loaded for "+this.time/1e3+"s")}.bind(this)),!0},g.prototype.addLoad=function(t){var e="load-"+ +new Date/Math.random()*Math.random();return this.load.push([e,t]),e},g.prototype.deleteLoad=function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!1,i=0;i<this.load.length;i++){this.load[i][0]===t&&(this.load[i][1]=[],e=!0)}return e},g.prototype.setPage=function(){for(var t=this.prop.page.split(" "),e=0;e<t.length;e++)this.page.push(t[e]),this.document.classList.add(this.prefix+"page_"+t[e]);return this.console("Page:",this.page),this.page},g.prototype.checkPage=function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"index",e=0;e<this.page.length;e++)if(t===this.page[e])return!0;return!1},g.prototype.setOS=function(){var t=0;switch(-1!=navigator.userAgent.indexOf("Windows")&&(t=1),-1!=navigator.userAgent.indexOf("Linux")&&(t=2),-1!=navigator.userAgent.indexOf("Mac")&&(t=3),-1!=navigator.userAgent.indexOf("FreeBSD")&&(t=4),t){case 1:return"windows";case 2:return"linux";case 3:return"macos";case 4:return"freebsd";default:return"unknown"}},g.prototype.setBrowser=function(){var t=!!window.opr&&!!opr.addons||!!window.opera||0<=navigator.userAgent.indexOf(" OPR/"),e="undefined"!=typeof InstallTrigger,i=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||safari.pushNotification).toString(),s=!!document.documentMode,r=!s&&!!window.StyleMedia,o=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);return t?"opera":e?"firefox":i?"safari":s?"ie":r?"edge":o?"chrome":"unknown"},g.prototype.mobileCheck=function(){var t,e=!1;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 )|
1sy(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.substr(0,4)))&&(e=!0),e},g.prototype.Event=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));for(var i in e.prop={console:e.prop.console},t)e.prop[i]=t[i];return e.name="Event",e.events=[],e.targets=[],e.setEvent(),e}return l(s,g),o(s,[{key:"init",value:function(){var t=this;return{add:this.add.bind(this),delete:this.delete.bind(this),turn:this.turn.bind(this),get:this.getEvent.bind(this),events:function(){return t.events}}}},{key:"target",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!1,i=0;i<this.targets.length;i++)t===this.targets[i]&&(e=!0);return 0===this.targets.length&&(e=!0),e}},{key:"do",value:function(t){return!!this.checkType("function",t)}},{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return!!this.do(t.do)}},{key:"add",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.prop.console;if(this.checkEvent(t)){var s=this.name+"-"+ +new Date+"-"+Math.random(),r={id:s,on:e,data:t};return this.events.push(r),this.console(this.name+'. Event "'+s+'" added',r,"info",i),this.addCallback(s),s}return!1}},{key:"delete",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.prop.console,i=!1,s=[],r=0;r<this.events.length;r++){if(null!==this.events[r])this.events[r].id===t?(this.deleteC
1allback(t),i=!(this.events[r]=null),this.console(this.name+'. Event "'+t+'" deleted',null,"info",e)):s.push(this.events[r])}return this.events=s,i}},{key:"deleteAll",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.prop.console,e=0;e<this.events.length;e++)if(null!==this.events[e]){var i=this.events[e].id;this.deleteCallback(i),this.events[e]=null,this.console(this.name+'. Event "'+i+'" deleted',null,"info",t)}return this.events=[],!0}},{key:"turn",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.prop.console,s=!1,r=0;r<this.events.length;r++){if(null!==this.events[r])this.events[r].id===t&&(this.events[r].on=e,s=!0,this.console(this.name+'. Event "'+t+'" turned to '+e,null,"info",i))}return this.turnCallback(t),s}},{key:"setEvent",value:function(){return!0}},{key:"addCallback",value:function(){0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!0}},{key:"turnCallback",value:function(){0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!0}},{key:"deleteCallback",value:function(){0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!0}},{key:"getEvent",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=0;e<this.events.length;e++)if(null!==this.events[e]&&this.events[e].id===t)return this.events[e];return!1}},{key:"launchEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){},i=0;return t.data.timeout&&(i=t.data.timeout),0===i?e():setTimeout(e.bind(this),i),!0}},{key:"launchEvents",value:function(){for(var t=0;t<this.events.length;t++)null!==this.events[t]&&this.events[t].on&&this.launchEvent(this.events[t],this.events[t].data.do.bind(this));return!0}},{key:"launchEventsByTarget",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=0;i<this.events.length;i++)null!==this.events[i]&&void 0!==u(this.events[i].data.target)&&this.events[i].data.target===t&this.events[i].on&&this.launchEvent(this.events[i],this.events[i].data.do.bind(this,e));return!0}}]),s}(),g.prototype.Viewport=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,i);var e=h(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.name="Viewport",e.targets=["w","h","wh","hw"],e}return l(i,g.prototype.Event),o(i,[{key:"init",value:function(){var t=this;return{add:this.add.bind(this),delete:this.delete.bind(this),turn:this.turn.bind(this),get:this.getEvent.bind(this),events:function(){return t.events},vw:function(){return t.vw},vh:function(){return t.vh},dpr:function(){return t.dpr},desktop:function(){return t.desktop},tablet:function(){return t.tablet},mobile:function(){return t.mobile}}}},{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return!!p(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"checkEvent",this).call(this,t)&&(!!this.target(t.target)&&!(t.timeout&&!Number.isInteger(t.timeout)))}},{key:"setEvent",value:function(){return window.addEventListener("resize",this.implement.bind(this)),this.setViewport()}},{key:"implement",value:function(){this.vw[1]=this.document.clientWidth,this.vh[1]=this.document.clientHeight;for(var t=0;t<this.events.length;t++)null!==this.events[t]&&void 0!==u(this.events[t].data.target)&this.events[t].on&&("w"===this.events[t].data.target&this.vw[0]!==this.vw[1]&&this.launchEvent(this.events[t],this.events[t].data.do.bind(this)),"h"===this.events[t].data.target&this.vh[0]!==this.vh[1]&&this.launchEvent(this.events[t],this.events[t].data.do.bind(this)),"wh"!==this.events[t].data.target&&"hw"!==this.events[t].data.target||this.launchEvent(this.events[t],this.events[t].data.do.bind(this)));return this.setViewport(),!0}},{key:"setViewport",value:function(){return this.vw=[this.document.clientWidth,this.document.clientWidth],this.vh=[this.document.clientHeight,this.document.clientHeight],this.dpr=this.getDPR(),this.console("Viewport width: "+this.vw[1]+". Viewport height: "+this.vh[1]),this.setViewportClass(),this.setViewportBreakp
1oints(),this.setViewportMobile(),{vw:this.vw,vh:this.vh,dpr:this.dpr}}},{key:"getDPR",value:function(){var t=1;return void 0!==window.devicePixelRatio&&(t=window.devicePixelRatio),t}},{key:"setViewportClass",value:function(){this.vw[1]<=this.prop.tablet?this.document.classList.add(this.prefix+"tablet"):this.document.classList.remove(this.prefix+"tablet"),this.vw[1]<=this.prop.mobile?this.document.classList.add(this.prefix+"mobile"):this.document.classList.remove(this.prefix+"mobile"),this.vw[1]>this.vh[1]?(this.document.classList.add(this.prefix+"landscape"),this.document.classList.remove(this.prefix+"protrait")):this.vw[1]<this.vh[1]&&(this.document.classList.remove(this.prefix+"landscape"),this.document.classList.add(this.prefix+"protrait"))}},{key:"setViewportBreakpoints",value:function(){this.vw[1]>this.prop.tablet?(this.desktop=!0,this.tablet=!1,this.mobile=!1):this.vw[1]>this.prop.mobile?(this.desktop=!1,this.tablet=!0,this.mobile=!1):(this.desktop=!1,this.tablet=!1,this.mobile=!0)}},{key:"setViewportMobile",value:function(){this.mobileCheck()?this.document.classList.add(this.prefix+"mobile-device"):this.document.classList.remove(this.prefix+"mobile-device")}}]),i}(),g.prototype.addResize=function(t){var e={};if(v.checkType("array",t)){if(t.length<2)return!1;if(!this.checkType("function",t[1]))return!1;var i=this.timeMin;t[2]?Number.isInteger(t[2])&&(i=t[2]):i=this.timeMin,e={target:t[0],do:t[1],timeout:i,name:"none"}}else e=t;return this.viewport.add(e)},g.prototype.deleteResize=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return this.viewport.delete(t)},g.prototype.turnResize=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return this.viewport.turn(t,e)},g.prototype.getParam=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{name:"name",url:window.location.href},e=t.name,i=void 0===e?"name":e,s=t.url,r=void 0===s?window.location.href:s;i=i.replace(/[\[\]]/g,"\\$&");var o=new RegExp("[?&]"+i+"(=([^&#]*)|&|#|$)").exec(r);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null},g.prototype.setParam=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{name:"name",value:"value",push:!1,url:""},e=t.name,i=void 0===e?"name":e,s=t.value,r=void 0===s?"value":s,o=t.push,n=void 0===o||o,a=t.url,h=void 0===a?"":a;i=encodeURI(i),r=encodeURI(r);for(var l=null,c=""===(l=0<h.length?new URL(h):window.location).search.substr(1)?[]:l.search.substr(1).split("&"),p=c.length,u=void 0;p--;)if((u=c[p].split("="))[0]==i){u[1]=r,c[p]=u.join("=");break}p<0&&(c[c.length]=[i,r].join("="));var d=l.pathname+"?"+c.join("&");return 0===r.length&&(d=(d=(d=(d=d.replace("?"+i+"=&","?")).replace("?"+i+"=","")).replace("&"+i+"=","")).replace(i+"=","")),!0===n&&window.history.pushState(null,"",d),d},g.prototype.popState=function(){return!0},g.prototype.ajaxCache={},g.prototype.ajaxGetCache=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=!1;for(var i in this.ajaxCache)if(i==t.url)for(var s=0;s<this.ajaxCache[i].length;s++){var r=this.ajaxCache[i][s];if(t.method==r.method){var o=Object.keys(t.data).length,n=0;for(var a in r.data)for(var h in t.data)a==h&r.data[a]==t.data[h]&&n++;n==o&&(e=r)}}return e},g.prototype.ajaxSetCache=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return void 0===this.ajaxCache[t.url]&&(this.ajaxCache[t.url]=[]),this.ajaxCache[t.url].push(t),!0},g.prototype.ajaxClearCache=function(){return this.ajaxCache={},!0},g.prototype.ajax=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this.checkType("object",t))return!1;var i={method:"post",url:window.location.href,data:{},cache:!1,abortOnError:!0,callback:function(){},fail:function(){},error:function(){}};for(var e in t)i[e]=t[e];if(!this.checkTypes({obj:i,console:!1,vars:[["method","string"],["url","string"],["data","object"],["cache","boolean"],["abortOnError","boolean"],["callback","function"],["fail","function"],["error","function"]]}))return!1;if(i.method=i.method.toLocaleLowerCase(),"post"!==i.method&"get"!==i.method)return!1;var s=!1;if(i.cache&&(s=this.ajaxGetCache(i)),s)i.callback(s.content);else{var r=$[i.method](i.url,i.data,function(t){i.cache&&this.ajaxSetCache(Object.assign({content:t},i)),i.callback.call(this,t)}.bind(this)).fail(function(t,e){"error"==e&i.abortOnError?i.error(t,e,t.responseText):("error"==e&&i.error(t,e,t.responseText),i.fail())}.bind(this));setTimeout(function(t){t.abort()}.bind(this,r),this.ajaxTimeMax)}return!0},g.prototype.bezier=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{values:[1,1,1,1],x:0,t:1,b:0,c:0,d:1e3,name:null},e=t.values,i=void 0===e?[1,1,1,1]:e,s=t.x,r=void 0===s?0:s,o=t.t,n=void 0===o?1:o,a=t.b,h=void 0===a?0:a,l=t.c,c=void 0===l?0:l,p=t.d,u=void 0===p?1e3:p,d=t.name,v=void 0===d?null:d,g=n;if(null===v)g=this.bezierCurve(i,n);else switch(v){case"easeInQuad":return c*(n/=u)*n+h;case"easeOutQuad":return-c*(n/=u)*(n-2)+h;case"easeInOutQuad":return(n/=u/2)<1?c/2*n*n+h:-c/2*(--n*(n-2)-1)+h;case"easeInCubic":return c*(n/=u)*n*n+h;case"easeOutCubic":return c*((n=n/u-1)*n*n+1)+h;case"easeInOutCubic":return(n/=u/2)<1?c/2*n*n*n+h:c/2*((n-=2)*n*n+2)+h;case"easeInQuart":return c*(n/=u)*n*n*n+h;case"easeOutQuart":return-c*((n=n/u-1)*n*n*n-1)+h;case"easeInOutQuart":return(n/=u/2)<1?c/2*n*n*n*n+h:-c/2*((n-=2)*n*n*n-2)+h;case"easeInQuint":return c*(n/=u)*n*n*n*n+h;case"easeOutQuint":return c*((n=n/u-1)*n*n*n*n+1)+h;case"easeInOutQuint":return(n/=u/2)<1?c/2*n*n*n*n*n+h:c/2*((n-=2)*n*n*n*n+2)+h;case"easeInSine":return-c*Math.cos(n/u*(Math.PI/2))+c+h;case"easeOutSine":return c*Math.sin(n/u*(Math.PI/2))+h;case"easeInOutSine":return-c/2*(Math.cos(Math.PI*n/u)-1)+h;case"easeInExpo":return 0==n?h:c*Math.pow(2,10*(n/u-1))+h;case"easeOutExpo":return n==u?h+c:c*(1-Math.pow(2,-10*n/u))+h;case"easeInOutExpo":return 0==n?h:n==u?h+c:(n/=u/2)<1?c/2*Math.pow(2,10*(n-1))+h:c/2*(2-Math.pow(2,-10*--n))+h;case"easeInCirc":return-c*(Math.sqrt(1-(n/=u)*n)-1)+h;case"easeOutCirc":return c*Math.sqrt(1-(n=n/u-1)*n)+h;case"easeInOutCirc":return(n/=u/2)<1?-c/2*(Math.sqrt(1-n*n)-1)+h:c/2*(Math.sqrt(1-(n-=2)*n)+1)+h;case"easeInElastic":var f=1.70158;if(0==n)return h;if(1==(n/=u))return h+c;if((m=0)||(m=.3*u),(y=c)<Math.abs(c)){y=c;f=m/4}else f=m/(2*Math.PI)*Math.asin(c/y);return-y*Math.pow(2,10*(n-=1))*Math.sin((n*u-f)*(2*Math.PI)/m)+h;case"easeOutElastic":f=1.70158;if(0==n)return h;if(1==(n/=u))return h+c;if((m=0)||(m=.3*u),(y=c)<Math.abs(c)){y=c;f=m/4}else f=m/(2*Math.PI)*Math.asin(c/y);return y*Math.pow(2,-10*n)*Math.sin((n*u-f)*(2*Math.PI)/m)+c+h;case"easeInOutElastic":var m,y;f=1.70158;if(0==n)return h;if(2==(n/=u/2))return h+c;if((m=0)||(m=u*(.3*1.5)),(y=c)<Math.abs(c)){y=c;f=m/4}else f=m/(2*Math.PI)*Math.asin(c/y);return n<1?y*Math.pow(2,10*(n-=1))*Math.sin((n*u-f)*(2*Math.PI)/m)*-.5+h:y*Math.pow(2,-10*(n-=1))*Math.sin((n*u-f)*(2*Math.PI)/m)*.5+c+h;case"easeInBack":return null==f&&(f=1.70158),c*(n/=u)*n*((f+1)*n-f)+h;case"easeOutBack":return null==f&&(f=1.70158),c*((n=n/u-1)*n*((f+1)*n+f)+1)+h;case"easeInOutBack":return null==f&&(f=1.70158),(n/=u/2)<1?c/2*(n*n*((1+(f*=1.525))*n-f))+h:c/2*((n-=2)*n*((1+(f*=1.525))*n+f)+2)+h;case"easeInBounce":return c-this.bezier({name:"easeOutBounce",x:r,t:u-n,b:0,c:c,d:u})+h;case"easeOutBounce":return(n/=u)<1/2.75?c*(7.5625*n*n)+h:n<2/2.75?c*(7.5625*(n-=1.5/2.75)*n+.75)+h:n<2.5/2.75?c*(7.5625*(n-=2.25/2.75)*n+.9375)+h:c*(7.5625*(n-=2.625/2.75)*n+.984375)+h;case"easeInOutBounce":return n<u/2?.5*this.bezier({name:"easeOutBounce",x:r,t:2*n,b:0,c:c,d:u})+h:.5*this.bezier({name:"easeOutBounce",x:r,t:2*n-u,b:0,c:c,d:u})+.5*c+h;default:g=n}return g},g.prototype.bezierCurve=function(t,e){var i=c(t,4),s=i[0],r=i[1],o=i[2],n=i[3];if(s===r&&o===n)return e;for(var a=[],h=0;h<11;++h)a[h]=this.bezierCalc(.1*h,s,o);return 0===e?0:1===e?1:this.bezierCalc(this.bezierCurveGetX([s,r,o,n],e,a),r,n)}
1,g.prototype.bezierCurveGetX=function(t,e,i){for(var s=c(t,4),r=s[0],o=(s[1],s[2]),n=(s[3],0),a=1;10!==a&&i[a]<=e;++a)n+=.1;var h=n+.1*((e-i[--a])/(i[a+1]-i[a])),l=this.bezierCurveGetSlope(h,r,o);return.001<=l?this.bezierCurveNewtonRaphsonIterate(e,h,r,o):0===l?h:this.bezierCurveBinarySubdivide(e,n,n+.1,r,o)},g.prototype.bezierCurveGetSlope=function(t,e,i){return 3*this.bezierCalcA(e,i)*t*t+2*this.bezierCalcB(e,i)*t+this.bezierCalcC(e)},g.prototype.bezierCurveNewtonRaphsonIterate=function(t,e,i,s){for(var r=0;r<4;++r){var o=this.bezierCurveGetSlope(e,i,s);if(0===o)return e;e-=(this.bezierCalc(e,i,s)-t)/o}return e},g.prototype.bezierCurveBinarySubdivide=function(t,e,i,s,r){for(var o,n,a=0;n=e+(i-e)/2,0<(o=this.bezierCalc(n,s,r)-t)?i=n:e=n,1e-7<Math.abs(o)&&++a<10;);return n},g.prototype.bezierCalc=function(t,e,i){return((this.bezierCalcA(e,i)*t+this.bezierCalcB(e,i))*t+this.bezierCalcC(e))*t},g.prototype.bezierCalcA=function(t,e){return 1-3*e+3*t},g.prototype.bezierCalcB=function(t,e){return 3*e-6*t},g.prototype.bezierCalcC=function(t){return 3*t},g.prototype.depthPercent=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{scope:[0,1],t:.5},e=t.scope,i=void 0===e?[0,1]:e,s=t.t,r=void 0===s?.5:s;return!!this.checkType("numberArray",i,{count:2})&&("number"==typeof r&&(r-i[0])/(i[1]-i[0]))},g.prototype.randInt=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100;if(!Number.isInteger(t))return!1;if(!Number.isInteger(e))return!1;if(t=Math.ceil(t),e=Math.ceil(e),t<0||1e10<e)return 0;var i=t+Math.random()*(e-t);return i=Math.round(i)},g.prototype.radians=function(t){return t*Math.PI/180},g.prototype.degrees=function(t){return 180*t/Math.PI},g.prototype.shuffle=function(t){var e=void 0,i=void 0,s=void 0;for(s=t.length-1;0<s;s--)e=Math.floor(Math.random()*(s+1)),i=t[s],t[s]=t[e],t[e]=i;return t},g.prototype.imageSize=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{img:null,size:"cover",width:100,height:100,maxWidth:n,maxHeight:h},e=t.img,i=void 0===e?null:e,s=t.size,r=void 0===s?"cover":s,o=t.width,n=void 0===o?100:o,a=t.height,h=void 0===a?100:a,l=t.maxWidth,c=void 0===l?n:l,p=t.maxHeight,u=void 0===p?h:p;if(null===i)return!1;if("cover"!==r&"contain"!==r)return!1;if("number"!=typeof n)return!1;if("number"!=typeof h)return!1;if("number"!=typeof c)return!1;if("number"!=typeof u)return!1;var d=0,v=0,g=0,f=0,m=0,y=0;return"VIDEO"==i.tagName?(m=i.videoWidth,y=i.videoHeight):(m=i.width,y=i.height),"cover"===r?(g=0,f=(h-(v=y*(d=n)/m))/2,v<h&&(g=(n-(d=m*(v=h)/y))/2,f=0),c===n&&u===h||(g=(c-d)/2,f=(u-v)/2)):"contain"===r&&(y<m?(g=0,f=(h-(v=y*(d=n)/m))/2):m<=y&&(g=(n-(d=m*(v=h)/y))/2,f=0)),{img:i,imageWidth:d,imageHeight:v,x:g,y:f,size:r}},g.prototype.Keydown=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,i);var e=h(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.name="Keydown",e.syncInterval=250,e.targets=["stack","once","sync"],e}return l(i,g.prototype.Event),o(i,[{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!p(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"checkEvent",this).call(this,t))return!1;if(!this.target(t.target))return!1;if(!t.key)return!1;for(var e=0;e<t.key.length;e++)if(!Number.isInteger(t.key[e]))return!1;return!(t.timeout&&!Number.isInteger(t.timeout))}},{key:"implement",value:function(t){for(var e=0;e<this.events.length;e++)if(null!==this.events[e]&&!0===this.events[e].on){if("once"===this.events[e].data.target&&t.keyCode===this.events[e].data.key[0]&&this.launchEvent(this.events[e],this.events[e].data.do.bind(t,this.events[e])),"stack"===this.events[e].data.target){if(void 0===this.events[e].string&&(this.events[e].string=""),this.events[e].string+="-"+t.keyCode,void 0===this.events[e].compareString){this.events[e].compareString="";for(var i=0;i<this.events[e].data.key.length;i++)this.events[e].compareString+="-"+this.events[e].data.key[i]}this.events[e].string.includes(this.events[e].compareString)&&(this.lau
1nchEvent(this.events[e],this.events[e].data.do.bind(t,this.events[e])),this.events[e].string="")}if("sync"===this.events[e].data.target){void 0===this.events[e].array&&(this.events[e].array=[]),this.events[e].array.push(t.keyCode),setTimeout(function(t){t.array=[]}.bind(this,this.events[e]),this.syncInterval);for(var s=0,r=0;r<this.events[e].data.key.length;r++)for(var o=0;o<this.events[e].array.length;o++)this.events[e].data.key[r]===this.events[e].array[o]&&s++;this.events[e].data.key.length===s&&(this.launchEvent(this.events[e],this.events[e].data.do.bind(t,this.events[e])),this.events[e].array=[])}}return!0}},{key:"setEvent",value:function(){return this.document.addEventListener("keydown",function(t){this.implement(t)}.bind(this)),!0}}]),i}(),g.prototype.DragSwipe=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,i);var e=h(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.name="DragSwipe",e.targets=["start","end","move","up","down","left","right"],e.targetsOnce=["up","down","left","right"],e.x=null,e.y=null,e.xStart=null,e.yStart=null,e.global={x:0,y:0},e.startedBool=!1,e}return l(i,g.prototype.Event),o(i,[{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return!!p(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"checkEvent",this).call(this,t)&&(!!this.target(t.target)&&!(t.timeout&&!Number.isInteger(t.timeout)))}},{key:"eventNeeded",value:function(t,e,i){var s=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(null===e)return!1;if(!0!==e.on)return!1;void 0===e.data.outer&&(e.data.outer=this.body);var r=!1;return void 0===e.data.ignoreOuter?r=!1:e.data.ignoreOuter&&(r=!0),s&&(r=!0),!(!r&&!0!==this.childOf(t.target,e.data.outer))&&(e.data.target==i&&e)}},{key:"eventImplement",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=arguments[2];if("start"==e&&(this.startedBool=!0),!("start"!=e&!this.startedBool)){"end"==e&&(this.startedBool=!1),this.global={x:this.x,y:this.y},"start"==e?(this.x=i.pageX,this.y=i.pageY,this.xStart=i.pageX,this.yStart=i.pageY,"swipe"==t&&(this.x=i.targetTouches[0].pageX,this.y=i.targetTouches[0].pageY,this.xStart=i.targetTouches[0].pageX,this.yStart=i.targetTouches[0].pageY),this.global.x=this.x,this.global.y=this.y):(this.global.x=i.pageX,this.global.y=i.pageY,"swipe"==t&&("end"!=e&!this.targetsOnce.includes(e)?(this.global.x=i.targetTouches[0].pageX,this.global.y=i.targetTouches[0].pageY):(this.global.x=i.changedTouches[0].pageX,this.global.y=i.changedTouches[0].pageY)));var s=!1;"end"==e&&(s=!0);for(var r=0;r<this.events.length;r++){var o=this.eventNeeded(i,this.events[r],e,s);if(o){this.events[r]=o;var n=this.events[r].data.outer,a={top:0,left:0},h={x:0,y:0},l={x:0,y:0};h.x=this.global.x,h.y=this.global.y,n!=window&n!=this.doc&n!=this.body&&(a=n.getBoundingClientRect(),h.x=this.global.x-a.left,h.y=this.global.y-a.top),l.x=h.x-(this.x-a.left),l.y=h.y-(this.y-a.top),this.launchEventCoords(this.events[r],this.global,h,l)}}"start"!=e&&(this.x=this.global.x,this.y=this.global.y)}}},{key:"launchEventCoords",value:function(t,e,i,s){if(this.targetsOnce.includes(t.data.target))return this.launchEventOnce(t,e,i,s);this.launchEvent(t,t.data.do.bind(this,{global:e,inner:i,diff:s},t))}},{key:"launchEventOnce",value:function(t,e,i,s){var r=!1;"up"==t.data.target&&e.y<this.yStart&&Math.abs(this.yStart-e.y)>Math.abs(t.data.k)&&(r=!0),"down"==t.data.target&&e.y>this.yStart&&Math.abs(this.yStart-e.y)>Math.abs(t.data.k)&&(r=!0),"left"==t.data.target&&e.x<this.xStart&&Math.abs(this.xStart-e.x)>Math.abs(t.data.k)&&(r=!0),"right"==t.data.target&&e.x>this.xStart&&Math.abs(this.xStart-e.x)>Math.abs(t.data.k)&&(r=!0),r&&this.launchEvent(t,t.data.do.bind(this,t))}}]),i}(),g.prototype.Swipe=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,i);var e=h(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.name="Swipe",e}return l(i,g.prototype.DragSwipe),o(i,[{key:"setEvent",value:function(){var e=this;return this.body.addEventListener("touchstart",this.eventImplement.bind(this,"swipe","start")),this.body.addEventListener("touchmove",this.eventImplement.bind(this,"swipe","move")),this.document.addEventListener("touchend",function(t){e.eventImplement("swipe","up",t),e.eventImplement("swipe","down",t),e.eventImplement("swipe","left",t),e.eventImplement("swipe","right",t),e.eventImplement("swipe","end",t)}),!0}}]),i}(),g.prototype.Drag=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,i);var e=h(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.name="Drag",e}return l(i,g.prototype.DragSwipe),o(i,[{key:"setEvent",value:function(){var e=this;return this.document.addEventListener("mousedown",function(t){1==t.which&&e.eventImplement("drag","start",t)}),this.document.addEventListener("mousemove",this.eventImplement.bind(this,"drag","move")),this.document.addEventListener("mouseup",function(t){e.eventImplement("drag","up",t),e.eventImplement("drag","down",t),e.eventImplement("drag","left",t),e.eventImplement("drag","right",t),e.eventImplement("drag","end",t)}),window.addEventListener("blur",function(t){e.eventImplement("drag","end",t)}),!0}}]),i}(),g.prototype.Wheel=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,r);var e=h(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return e.name="Wheel",e.targets=["up","down","left","right"],e.timeInterval=200,e}return l(r,g.prototype.Event),o(r,[{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return!!p(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"checkEvent",this).call(this,t)&&(!!this.target(t.target)&&(!!t.k&&(!!this.checkType("number",t.k)&&(!(t.timeout&&!Number.isInteger(t.timeout))&&!!this.checkType("htmlElement",t.outer)))))}},{key:"add",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.prop.console;t.time=(new Date).getTime();var s=p(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"add",this).call(this,t,e,i);return!1!==s?this.setEventListener(s):s}},{key:"implement",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=arguments[1],i=this.getEvent(t);if(i&&null!==i&&!0===i.on){var s=(new Date).getTime();if(!(s-i.data.time<this.timeInterval)){i.data.time=s;var r=this.normalizeWheel(e),o=r.spinY,n=r.spinX;return"up"===i.data.target&&o<0&o<-1*i.data.k&&this.launchEvent(i,i.data.do.bind(e,i)),"down"===i.data.target&&0<o&o>i.data.k&&this.launchEvent(i,i.data.do.bind(e,i)),"left"===i.data.target&&n<0&n<-1*i.data.k&&this.launchEvent(i,i.data.do.bind(e,i)),"right"===i.data.target&&0<n&n>i.data.k&&this.launchEvent(i,i.data.do.bind(e,i)),!0}}}},{key:"setEventListener",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=this.getEvent(t);return!!e&&(e.data.outer.addEventListener("wheel",this.implement.bind(this,t)),e.id)}}]),r}(),g.prototype.Interval=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,i);var e=h(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.name="Interval",e}return l(i,g.prototype.Event),o(i,[{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return!!p(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"checkEvent",this).call(this,t)&&(!!this.target(t.target)&&(!!t.time&&!!Number.isInteger(t.time)))}},{key:"addCallback",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=this.getEvent(t);return!!e&&(e.onUniversal=e.on,e.intervalFunc=!1,e.on&&this.on(t),window.addEventListener("focus",this.on.bind(this,t,"window")),window.addEventListener("blur",this.off.bind(this,t,"window")),!0)}},{key:"turnCallback",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=this.getEvent(t);return!!e&&(e.on?this.on(t):this.off(t),!0)}}
1,{key:"deleteCallback",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=this.getEvent(t);return!!e&&(!1!==e.intervalFunc&&clearInterval(e.intervalFunc),e.intervalFunc=!1,e.on=!1,!(e.onUniversal=!1))}},{key:"on",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=this.getEvent(t);if(!i)return!1;this.off(t,e);var s=!1;return"window"===e?i.onUniversal&&(s=!0):s=!0,s&&(i.intervalFunc=setInterval(i.data.do.bind(this,i),i.data.time),i.on=!0,i.onUniversal=!0),!0}},{key:"off",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=this.getEvent(t);return!!i&&(!1!==i.intervalFunc&&clearInterval(i.intervalFunc),i.intervalFunc=!1,i.on=!1,"window"!==e&&(i.onUniversal=!1),!0)}}]),i}(),g.prototype.normalizeWheel_PIXEL_STEP=10,g.prototype.normalizeWheel_LINE_HEIGHT=40,g.prototype.normalizeWheel_PAGE_HEIGHT=800,g.prototype.normalizeWheel=function(t){var e=0,i=0,s=0,r=0;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),s=e*this.normalizeWheel_PIXEL_STEP,r=i*this.normalizeWheel_PIXEL_STEP,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(s=t.deltaX),(s||r)&&t.deltaMode&&(1==t.deltaMode?(s*=this.normalizeWheel_LINE_HEIGHT,r*=this.normalizeWheel_LINE_HEIGHT):(s*=this.normalizeWheel_PAGE_HEIGHT,r*=this.normalizeWheel_PAGE_HEIGHT)),s&&!e&&(e=s<1?-1:1),r&&!i&&(i=r<1?-1:1),{spinX:e,spinY:i,pixelX:s,pixelY:r}},g.prototype.Class=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));for(var i in e.name=e.constructor.name,e.prop=Object.assign(e.prop,{v:window.v,console:void 0===window.v||window.v.prop().console,eventsStorage:!1}),t)e.prop[i]=t[i];return(e.eventsStorage=e).eventsStorageCustom=!1,e.checkType("object",e.prop.eventsStorage)&&e.prop.eventsStorage.hasOwnProperty("addEventListener")&e.prop.eventsStorage.hasOwnProperty("removeEventListeners")&e.prop.eventsStorage.hasOwnProperty("getEventListeners")&&(e.eventsStorage=e.prop.eventsStorage,e.eventsStorageCustom=!0),e}return l(s,g.prototype.Event),o(s,[{key:"check",value:function(){return!0}},{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return!(t.timeout&&!Number.isInteger(t.timeout))&&!!this.do(t.do)}},{key:"changeProp",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};for(var e in t)this.prop[e]=t[e];return this.check()}},{key:"removeEventListeners",value:function(){if(this.eventsStorageCustom)return this.eventsStorage.removeEventListeners();this.checkType("array",this.eventListeners)||(this.eventListeners=[]);for(var t=0;t<this.eventListeners.length;t++)this.unbindEventListener(this.eventListeners[t]);return this.eventListeners=[],!0}},{key:"addEventListener",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this.eventsStorageCustom)return this.eventsStorage.addEventListener(t);var e=this.bindEventListener(t);return!!e&&(this.eventListeners.push(e),!0)}},{key:"getEventListeners",value:function(){return this.eventsStorageCustom?this.eventsStorage.getEventListeners():this.eventListeners}},{key:"init",value:function(){var t=this;return this.eventListeners=[],!!this.check()&&(this.console(this.name+". Using "+this.name+" for",this.prop,"info",this.prop.console),{removeEventListeners:this.eventsStorage.removeEventListeners.bind(this),addEventListener:this.eventsStorage.addEventListener.bind(this),getEventListeners:this.eventsStorage.getEventListeners.bind(this),add:this.add.bind(this),delete:this.delete.bind(this),turn:this.turn.bind(this),events:function(){return t.events},prop:function(){return t.prop},changeProp:this.changeProp.bind(this),targets:function(){return t.targets},launchEventsByTarget:this.launchEventsByTarget.bind(this)})}}]),s}(),g.prototype.Preloader=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"preloader",e.dataPrefix="data-"+e.prefix,e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,animation:750,animationInner:25,progress:{on:!1,animate:!1,k:.01,forceEnd:!1,duration:3e3,bezier:{on:!1,name:"linear"}},hide:!0}),t)e.prop[i]=t[i];return e.targets=["progress","progressAnimate","hide","hidden"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["animation","integer"],["animationInner","integer"],["progress","object"],["hide","boolean"]]});return!!t&&(!!(t=this.checkTypes({obj:this.prop.progress,name:this.name,console:this.prop.console,vars:[["on","boolean"],["animate","boolean"],["k","number"],["forceEnd","boolean"],["duration","number"],["bezier","bezier"]]}))&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),this.outer.classList.add(""+this.prefix),!0))}},{key:"checkEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.target&&(t.target="hidden"),p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"checkEvent",this).call(this,t)}},{key:"setStyles",value:function(){return this.outer.style.opacity="1",this.outer.style.transition=this.prop.animation/1e3+"s",!0}},{key:"start",value:function(){var t=this;return this.prop.animationInner=this.prop.animationInner+this.prop.v.timeMin(),setTimeout(function(){t.outer.classList.add(t.prefix+"_animate")},this.prop.v.timeMin()),this.setEvents(),!0}},{key:"setEvents",value:function(){var t=this;this.prop.v.addLoad(function(){t.loaded=!0,t.onloaded()}),this.prop.progress.on&&(this.getImages(),this.getVideos(),this.resourcesTotal=this.images.length+this.videos.length,this.resourcesLoad(),this.prop.progress.animate&&this.progressFrameSet())}},{key:"getImages",value:function(){for(var t=this.prop.v.document().querySelectorAll("*:not(script)"),e=0;e<t.length;e++){var i=getComputedStyle(t[e]).backgroundImage;if(-1==i.indexOf("none")&-1==i.indexOf("-gradient")){if(-1!=i.indexOf("url"))i=i.match(/url\((.*?)\)/)[1].replace(/\"/g,""),this.images.push(i)}else"IMG"==t[e].tagName&&this.images.push(t[e].src)}}},{key:"getVideos",value:function(){for(var t=this.prop.v.document().querySelectorAll("video"),e=0;e<t.length;e++)this.videos.push(t[e])}},{key:"resourcesLoad",value:function(){for(var t=this,e=0;e<this.images.length;e++){var i=new Image;i.onload=function(){t.resourceOnloaded()},i.onerror=function(){t.resourceOnloaded()},i.src=this.images[e]}for(var s=0;s<this.videos.length;s++)this.videos[s].load(),this.videos[s].onloadeddata=function(){t.resourceOnloaded()}}},{key:"resourceOnloaded",value:function(){this.resourcesLoaded++,this.currentProgress=this.resourcesLoaded/this.resourcesTotal,this.launchEventsByTarget("progress",{progress:this.currentProgress,loaded:this.resourcesLoaded,total:this.resourcesTotal})}},{key:"addResourcesTotal",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;this.resourcesTotal+=t}},{key:"addResourcesLoaded",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,e=0;e<t;e++)this.resourceOnloaded()}},{key:"progressFrameSet",value:function(){this.progressFrameId=window.requestAnimationFrame(this.progressFrame.bind(this))}},{key:"progressFrame",value:function(){if(this.progressBool){if(this.animationProgress+=(this.currentProgress-this.animationProgress)*this.prop.progress.k,.99<=this.animationProgress)return this.animationProgress=1,this.onloaded(),cancelAnimationFrame(this.progressFrameId),void this.launchEventsByTarget("progressAnimate",{progress:this.animationProgress,loaded:this.resourcesLoaded,total:this.resourcesTotal});this.launchEventsByTarget("progressAnimate",{progress:this.animationProgress,loaded:this.resourcesLoaded,total:this.resourcesTotal}),this.progressFrameId=window.requestAnimationFrame(this.progressFrame.bind(this))}}},{key:"progressFrameForce",value:function(t,e){var i=1-this.animationProgress,s=e*i;if(s==i)return this.animationProgress=1,this.onloaded(),void this.launchEventsByTarget("progressAnimate",{progress:this.animationProgress,loaded:this.resourcesLoaded,total:this.resourcesTotal});this.launchEventsByTarget("progressAnimate",{progress:this.animationProgress+s,loaded:this.resourcesLoaded,total:this.resourcesTotal})}},{key:"onloaded",value:function(){if(this.loaded){if(this.prop.progress.on){if(this.resourcesTotal>this.resourcesLoaded)return;if(this.prop.progress.animate&&this.animationProgress<1){if(!this.prop.progress.forceEnd)return;if(null==this.forceEndAnimate)return cancelAnimationFrame(this.progressFrameId),this.progressBool=!1,this.forceEndAnimate=new this.Animate({console:this.prop.console,duration:this.prop.progress.duration,bezier:this.prop.progress.bezier,do:this.progressFrameForce.bind(this)}
1),this.forceEndAnimate=this.forceEndAnimate.init(),void this.forceEndAnimate.run()}}this.launchEventsByTarget("hide"),this.prop.hide&&this.hide()}}},{key:"hide",value:function(){var t=this.getInterval();0===t?this.hideAnimate():setTimeout(this.hideAnimate.bind(this),t)}},{key:"getInterval",value:function(){var t=+new Date-this.startTime,e=0;return t<this.prop.animationInner&&(e=this.prop.animationInner-t),e}},{key:"hideAnimate",value:function(){this.outer.style.opacity="0",this.outer.classList.add(this.prefix+"_animated"),setTimeout(function(){this.outer.classList.add(this.prefix+"_hidden"),this.onhidden()}.bind(this),this.prop.animation)}},{key:"onhidden",value:function(){this.hidden=!0,this.launchEventsByTarget("hidden"),this.console(this.name+". Hide",null,"info",this.prop.console)}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.startTime=+new Date,this.hidden=!1,this.loaded=!1,this.images=[],this.videos=[],this.resourcesTotal=0,this.resourcesLoaded=0,this.currentProgress=0,this.animationProgress=0,this.progressFrameId=null,this.progressBool=!0,this.forceEndAnimate=null,this.setStyles(),this.start(),Object.assign(e,{hidden:function(){return t.hidden},loaded:function(){return t.loaded},resourcesTotal:function(){return t.resourcesTotal},resourcesLoaded:function(){return t.resourcesLoaded},animationProgress:function(){return t.animationProgress},hide:this.hide.bind(this),addResourcesTotal:this.addResourcesTotal.bind(this),addResourcesLoaded:this.addResourcesLoaded.bind(this)}))}}]),s}(),g.prototype.Scrollbar=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"scrollbar",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,init:!0}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["init","boolean"]]})&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),!0)}},{key:"destroy",value:function(){return jQuery(this.outer).scrollbar("destroy"),this.outer.classList.remove("scrollbar-macosx"),!0}},{key:"create",value:function(){return this.outer.classList.add("scrollbar-macosx"),jQuery(this.outer).scrollbar(),!0}},{key:"init",value:function(){var t=this;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&(this.outer.classList.add(""+this.prefix),this.prop.init&&this.create(),{create:this.create.bind(this),destroy:this.destroy.bind(this),prop:function(){return t.prop},changeProp:this.changeProp.bind(this)})}}]),s}(),g.prototype.Animate=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prop=Object.assign(e.prop,{duration:250,scope:[0,1],durationAuto:!1,delay:0,bezier:{on:!1,values:[1,1,1,1]},do:function(t,e){}}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["duration","number"],["scope","numberArray",{count:2}],["durationAuto","boolean"],["delay","number"],["bezier","bezier"],["do","function"]]});return!!t&&(this.prop.duration=parseInt(this.prop.duration),this.prop.delay=parseInt(this.prop.delay),!!(t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["duration","integer"],["delay","integer"]]})))}},{key:"animate",value:function(){this.animating=!0;var t=[this.prop.scope[0],this.prop.scope[1]];this.continued&&(t[0]=this.stopValue,this.reversed&&(t[1]=this.stopValue,t[0]=this.prop.scope[0]));var e=this.prop.duration;this.prop.durationAuto&&(e=(t[1]-t[0])*this.prop.duration);var i=t[1]-t[0],s=(Date.now()-this.time)/e,r=s*i+t[0];1<=s&&(r=t[s=1],this.animating=!1);var o=r;if(1!==s&&this.stopped&&(this.stopValue=r,this.animating=!1),this.reversed&&(r=(t[1]-t[0])*(1-s)+t[0],1<=s&&(r=this.prop.scope[0],this.reversed=!1)),o=r,this.prop.bezier.on){var n={};for(var a in this.prop.bezier)n[a]=this.prop.bezier[a];n.t=r,n.b=t[0],n.c=t[1],n.d=t[1],o=this.bezier(n)}1!==s&&this.stopped&&(this.stopValue=r,this.animating=!1),this.prop.do(r,o),this.stopped||s<1&&window.requestAnimationFrame(this.animate.bind(this))}},{key:"imitate",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t;this.prop.do(t,e)}},{key:"run",value:function(){return!this.animating&&(this.stopped?(this.continued=!0,this.stopped=!1,this.time=Date.now(),window.requestAnimationFrame(this.animate.bind(this))):(this.continued=!1,0===this.prop.delay?(this.time=Date.now(),window.requestAnimationFrame(this.animate.bind(this))):setTimeout(function(){this.time=Date.now(),window.requestAnimationFrame(this.animate.bind(this))}.bind(this),this.prop.delay)),!0)}},{key:"reverse",value:function(){return!this.animating&&(this.reversed=!0,this.run())}},{key:"stop",value:function(){return!!this.animating&&(this.stopped=!0)}},{key:"init",value:function(){var t=this;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&(this.continued=!1,this.stopValue=0,this.stopped=!1,this.animating=!1,this.reversed=!1,this.time=Date.now(),{run:this.run.bind(this),reverse:this.reverse.bind(this),stop:this.stop.bind(this),imitate:this.imitate.bind(this),prop:function(){return t.prop},changeProp:this.changeProp.bind(this)})}}]),s}(),g.prototype.AnimationFrame=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"animationFrame",e.prop=Object.assign(e.prop,{fps:60,run:!0}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["fps","integer"],["run","boolean"]]})}},{key:"changeProp",value:function(t){var e=this.prop.run;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.prop.run!==e&&this.run(),!0)}},{key:"run",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;this.prop.run&&(window.requestAnimationFrame(this.run.bind(this)),this.animate(t))}},{key:"animate",value:function(t){null==this.time&&(this.time=t);var e=Math.floor((t-this.time)/(1e3/this.prop.fps));e>this.frame&&(this.frame=e,this.launchEvents())}},{key:"init",value:function(){var t=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!t&&(this.time=null,this.frame=-1,this.run(),t)}}]),s}(),g.prototype.TextAnimate=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"text",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,resize:!0}),t)e.prop[i]=t[i];return e.types=["letter","word","string","stringletter","stringword"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["resize","boolean"]]})&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),!0)}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.setEvents(),!0)}},{key:"split",value:function(){return this.splitted||(this.text=this.outer.innerText,this.splitLetters(),this.splitLettersSpan(),this.splitWords(),this.splitWordsSpan(),this.splitted=!0),this.splitStrings(),!0}},{key:"splitLetters",value:function(){for(var t=0;t<this.text.length;t++)this.letters.push(this.text[t]);return!0}},{key:"splitLettersSpan",value:function(){for(var t=0;t<this.letters.length;t++){var e={element:null,spaces:!1,clear:!1,content:""},i=document.createElement("span");i.classList.add(this.prefix+"__letter"),i.classList.add(this.prefix+"__letter_"+t),32===this.letters[t].charCodeAt(0)||160===this.letters[t].charCodeAt(0)?(i.innerHTML="&nbsp;",e.spaces=!0):10===this.letters[t].charCodeAt(0)?((i=document.createElement("div")).classList.add("clear"),i.classList.add(this.prefix+"__space"),i.classList.add(this.prefix+"__space_"+t),i.innerHTML="",e.clear=!0):(i.innerHTML=this.letters[t],i.classList.add(this.prefix+"__letter_code-"+this.letters[t].charCodeAt().toString(16))),e.element=i,e.content=i.innerHTML,this.elements.letters.push(e)}this.outer.innerHTML="";for(var s=0;s<this.elements.letters.length;s++)this.outer.appendChild(this.elements.letters[s].element);return!0}},{key:"splitWords",value:function(){for(var t=-1,e=void 0,i=0,s=0;i<this.elements.letters.length;i++)this.elements.letters[i].clear&&(s+=1),t!==s&&(e={element:null,spaces:!1,clear:this.elements.letters[i].clear,letters:[],content:""},this.elements.words.push(e)),e.letters.push(this.elements.letters[i]),t=s,(this.elements.letters[i].spaces||this.elements.letters[i].clear)&&s++;for(var r=0;r<this.elements.words.length;r++){for(var o=0,n=0;n<this.elements.words[r].letters.length;n++)this.elements.words[r].letters[n].spaces&&o++,this.elements.words[r].content+=this.elements.words[r].letters[n].content;o===this.elements.words[r].letters.length&&(this.elements.words[r].spaces=!0)}return!0}},{key:"splitWordsSpan",value:function(){for(var t=0;t<this.elements.words.length;t++){var e=document.createElement("span");e.classList.add(this.prefix+"__word"),e.classList.add(this.prefix+"__word_"+t),this.elements.words[t].clear&&((e=document.createElement("div")).classList.add("clear"),e.classList.add(this.prefix+"__clear"),e.classList.add(this.prefix+"__clear_"+t)),this.outer.appendChild(e),this.elements.words[t].element=e}for(var i=0;i<this.elements.words.length;i++)for(var s=0;s<this.elements.words[i].letters.length;s++)this.elements.words[i].element.appendChild(this.elements.words[i].letters[s].element);for(var r=[],o=0;o<this.elements.words.length;o++)this.elements.words[o].clear||r.push(this.elements.words[o]);return this.elements.words=r,!0}},{key:"splitStrings",value:function(){var t=null,e=-1,i=void 0;this.elements.strings=[];for(var s=0,r=-1;s<this.elements.words.length;s++){this.elements.words[s].element.getBoundingClientRect().top!==t&&r++,e!==r&&(i={spaces:!1,clear:!1,words:[],content:""},this.elements.strings.push(i)),i.words.push(this.elements.words[s]),e=r,t=this.elements.words[s].element.getBoundingClientRect().top}for(var o=0;o<this.elements.strings.length;o++){for(var n=0,a=0;a<this.elements.strings[o].words.length;
1a++)this.elements.strings[o].words[a].spaces&&n++,this.elements.strings[o].content+=this.elements.strings[o].words[a].content;n===this.elements.strings[o].words.length&&(this.elements.strings[o].spaces=!0)}return!0}},{key:"setEvents",value:function(){return this.prop.resize?null==this.resizeId&&(this.resizeId=this.prop.v.viewport.add({target:"wh",name:this.name+" Resize",do:this.eventResize.bind(this),timeout:this.prop.v.timeMin()})):null!==this.resizeId&&(this.prop.v.viewport.delete(this.resizeId),this.resizeId=null),!0}},{key:"eventResize",value:function(){return!!this.splitted&&(this.splitStrings(),!0)}},{key:"checkVars",value:function(t){var e={types:["letter"],delay:0,duration:250,bezier:{on:!1,name:"linear"},letter:[],word:[],string:[],strings:[],shift:.2,shiftString:.2,ignoreSpaces:!0,reverse:!1,shuffle:!1,callbacks:[]};for(var i in t)e[i]=t[i];return!!this.checkTypes({obj:e,name:this.name,console:this.prop.console,vars:[["types","stringArray",{count:1}],["delay","integer"],["duration","integer"],["bezier","bezier"],["shift","number"],["shiftString","number"],["ignoreSpaces","boolean"],["reverse","boolean"],["shuffle","boolean"],["strings","array"],["callbacks","callbacks"],["letter","styleCallbacks"],["word","styleCallbacks"],["string","styleCallbacks"]]})&&e}},{key:"animate",value:function(t){if(this.animating)return!1;if(!this.checkVars(t))return!1;t=this.checkVars(t);for(var e=0;e<t.types.length;e++){var i=t.types[e],s=i;"letter"!==i&&"word"!==i||(s="elementary"),"stringletter"!==i&&"stringword"!==i||(s="string_elementary"),"string"===i&&(s="string"),void 0!==this["animate_"+s]&&(this.animating=!0,setTimeout(this["animate_"+s].bind(this,t,i),t.delay))}return!0}},{key:"calcTime",value:function(t){for(var e=[],i=0,s=0,r=0,o=0;r<t.elements.length;r++)!0===t.ignoreSpaces?!0!==t.elements[r].spaces&&(s=o*t.duration*t.shift,o++):(s=o*t.duration*shift,o++),e.push({time:s,percent:0}),i=s;var n=i+t.duration;n=parseInt(n);for(var a=0;a<e.length;a++)e[a].percent=e[a].time/n,e[a].percentEnd=(e[a].time+t.duration)/n;return{intervals:e,duration:t.duration,durationFull:n,elements:t.elements,shift:t.shift}}},{key:"splitAnimate",value:function(t){for(var e=[],i=0;i<t.callbacks.length;i++)e.push({target:t.callbacks[i].target,do:t.callbacks[i].do,proceeded:!1});var s=new this.Animate({console:this.prop.console,duration:t.animationInfo.durationFull,do:function(t,e,i,s,r){for(var o=0;o<t.intervals.length;o++){var n=void 0;n=s<t.intervals[o].percent?0:s>=t.intervals[o].percent&s<=t.intervals[o].percentEnd?this.depthPercent({scope:[t.intervals[o].percent,t.intervals[o].percentEnd],t:s}):1,e(t.elements[o],n)}1===s&&(this.animating=!1);for(var a=0;a<i.length;a++)s>=i[a].target&&(i[a].proceeded||(i[a].do(s),i[a].proceeded=!0))}.bind(this,t.animationInfo,t.do,e)});return(s=s.init()).run(),!0}},{key:"setStylesSimple",value:function(t){for(var e=0;e<t.properties.length;e++){var i=t.properties[e].scope,s=0,r=0;if(t.progress>=i[0]&t.progress<i[1]?s=this.depthPercent({scope:i,t:t.progress}):t.progress>=i[1]&&(s=1),t.bezier.on){var o={};for(var n in t.bezier)o[n]=t.bezier[n];o.t=s,o.b=0,o.c=1,o.d=1,r=this.bezier(o)}else r=s;var a=t.properties[e].property,h=t.properties[e].value(r);t.element.element.style[a]=h}}},{key:"setStyles",value:function(t){var e=new this.Animate({console:this.prop.console,duration:t.animationData.duration,bezier:t.bezier,do:function(t,e,i,s){for(var r=0;r<e.length;r++){var o=e[r].scope,n=0;s>=o[0]&s<o[1]?n=this.depthPercent({scope:o,t:s}):s>=o[1]&&(n=1);var a=e[r].property,h=e[r].value(n);t.element.style[a]=h}}.bind(this,t.element,t.properties)});return(e=e.init()).run(),!0}},{key:"init",value:function(){var t=this;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&(this.outer.classList.add(""+this.prefix),this.defaultHTML=this.outer.innerHTML,this.splitted=!1,this.animating=!1,this.text="",this.letters=[],this.elements={letters:[],words:[],strings:[]},this.resizeId=null,this.split(),this.setEvents(),{elements:function(){return t.elements},split:this.splitStrings.bind(this),animate:this.animate.bind(this),animating:function(){return t.animating},changeProp:this.changeProp.bind(this)})}}]),s}(),g.prototype.TextAnimate.prototype.animate_elementary=function(i,t){var e=[];e="word"===t?this.elements.words:this.elements.letters;var s=[];s="word"===t?i.word:i.letter,i.reverse&&(e=e.slice()).reverse(),i.shuffle&&(e=e.slice(),this.shuffle(e));var r=this.calcTime({elements:e,duration:i.duration,shift:i.shift,ignoreSpaces:i.ignoreSpaces});return this.splitAnimate({animationInfo:r,do:function(t,e){this.setStylesSimple({bezier:i.bezier,element:t,progress:e,properties:s})}.bind(this),callbacks:i.callbacks}),!0}
1,g.prototype.TextAnimate.prototype.animate_string=function(s,t){var e=this.elements.strings,r=s.string;s.reverse&&(e=e.slice()).reverse(),s.shuffle&&(e=e.slice(),this.shuffle(e));var i=this.calcTime({elements:e,duration:s.duration,shift:s.shift,ignoreSpaces:s.ignoreSpaces});return this.splitAnimate({animationInfo:i,do:function(t,e){for(var i=0;i<t.words.length;i++)this.setStylesSimple({bezier:s.bezier,element:t.words[i],progress:e,properties:r})}.bind(this),callbacks:s.callbacks}),!0},g.prototype.TextAnimate.prototype.animate_string_elementary=function(t,e){return this.animate_string_elementaryAnimate(t,e),!0},g.prototype.TextAnimate.prototype.animate_string_elementaryAnimate=function(i,t){i.definedProperties="stringword"===t?i.word:i.letter;for(var e=this.animate_string_elementaryGetElements(i,t),s=e.length,r=[],o=0;o<s;o++){var n=this.calcTime({elements:e[o],duration:i.duration,shift:i.shift,ignoreSpaces:i.ignoreSpaces});r.push(n)}for(var a=[],h=[],l=[],c=[],p=0;p<s;p++){var u=0,d=0;0!==p&&(u=r[p-1].durationFull*i.shiftString),h.push(u),a.push(r[p].durationFull);for(var v=0;v<h.length;v++)d+=h[v];l.push(d),c.push(d+r[p].durationFull)}for(var g={duration:i.duration,durationFull:Math.max.apply(Math,c),elements:r,intervals:[]},f=0;f<s;f++){var m={time:l[f],percent:l[f]/g.durationFull,percentEnd:c[f]/g.durationFull};g.intervals.push(m)}return this.splitAnimate({animationInfo:g,do:function(t,e){this.animate_string_elementaryAnimation(i,t,e)}.bind(this),callbacks:i.callbacks}),!0},g.prototype.TextAnimate.prototype.animate_string_elementaryGetElements=function(t,e){var i=[],s=this.elements.strings;t.reverse&&(s=s.slice()).reverse(),t.shuffle&&(s=s.slice(),this.shuffle(s));for(var r=0;r<s.length;r++){var o=[],n=s[r].words;if(t.reverse&&(n=n.slice()).reverse(),t.shuffle&&(n=n.slice(),this.shuffle(n)),"stringword"===e)o=n;else for(var a=0;a<n.length;a++){var h=s[r].words[a].letters;t.reverse&&(h=h.slice()).reverse(),t.shuffle&&(h=h.slice(),this.shuffle(h));for(var l=0;l<h.length;l++)o.push(h[l])}i.push(o)}return i},g.prototype.TextAnimate.prototype.animate_string_elementaryAnimation=function(t,e,i){for(var s=0;s<e.intervals.length;s++){var r=void 0;r=i<e.intervals[s].percent?0:i>=e.intervals[s].percent&i<=e.intervals[s].percentEnd?this.depthPercent({scope:[e.intervals[s].percent,e.intervals[s].percentEnd],t:i}):1,this.setStylesSimple({bezier:t.bezier,element:e.elements[s],progress:r,properties:t.definedProperties})}},g.prototype.Slider=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"slider",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorEvents:"#"+e.prefix,bezier:{on:!1,name:"linear"},duration:750,delay:0,direction:"h",disable:!1,loop:!0,start:!0,keydown:!1,swipe:!1,wheel:!1,interval:!1,time:5e3,control:!0,dot:!0,prev:!0,next:!0,resize:!0,resizeTimeout:0,active:0}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["bezier","bezier"],["duration","integer"],["delay","integer"],["direction","string"],["disable","boolean"],["loop","boolean"],["start","boolean"],["keydown","boolean"],["swipe","boolean"],["wheel","boolean"],["interval","boolean"],["time","integer"],["control","boolean"],["dot","boolean"],["prev","boolean"],["next","boolean"],["resize","boolean"],["active","integer"]]})&&(this.checkType("dom",this.prop.selectorEvents)||(this.prop.selectorEvents=this.prop.selector),this.outer=this.prop.v.document().querySelector(this.prop.selector),this.outerEvents=this.prop.v.document().querySelector(this.prop.selectorEvents),!("v"!==this.prop.direction&"h"!==this.prop.direction))}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.setKeydown(),this.setSwipe(),this.setWheel(),this.setInterval(),this.setControl(),this.setDot(),this.setEventsResize(),!0)}},{key:"checkItems",value:function(){var t=this.outer.querySelector("."+this.prefix+"__items");return null!==t&&(this.itemsSource=t.querySelectorAll("."+this.prefix+"__item"),0!==this.itemsSource.length)}},{key:"createControl",value:function(){return this.prev=document.createElement("div"),this.prev.classList.add(this.prefix+"__control"),this.prev.classList.add(this.prefix+"__control_prev"),this.outer.appendChild(this.prev),this.next=document.createElement("div"),this.next.classList.add(this.prefix+"__control"),this.next.classList.add(this.prefix+"__control_next"),this.outer.appendChild(this.next),!0}},{key:"setControl",value:function(){return this.prop.control?this.outer.classList.remove(this.prefix+"_control-hidden"):this.outer.classList.add(this.prefix+"_control-hidden"),!0}},{key:"setControlAbolished",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;return 0===t&!1===this.prop.loop?this.prev.classList.add(this.prefix+"__control_abolished"):this.prev.classList.remove(this.prefix+"__control_abolished"),t===this.count-1&!1===this.prop.loop?this.next.classList.add(this.prefix+"__control_abolished"):this.next.classList.remove(this.prefix+"__control_abolished"),!0}},{key:"createDot",value:function(){this.dots=document.createElement("div"),this.dots.classList.add(this.prefix+"__dots");for(var t=0;t<this.itemsSource.length;t++){var e=document.createElement("div");e.classList.add(this.prefix+"__dot"),this.dots.appendChild(e),this.dot.push(e)}return this.outer.appendChild(this.dots),!0}},{key:"setDot",value:function(){return this.prop.dot?this.outer.classList.remove(this.prefix+"_dot-hidden"):this.outer.classList.add(this.prefix+"_dot-hidden"),!0}},{key:"setDotActive",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active,e=0;e<this.dot.length;
1e++)e===t?this.dot[e].classList.add(this.prefix+"__dot_active"):this.dot[e].classList.remove(this.prefix+"__dot_active");return!0}},{key:"setPrevBool",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return"boolean"==typeof t&&(this.prevBool=t,!0===this.prevBool?this.prev.classList.remove(this.prefix+"__control_disabled"):this.prev.classList.add(this.prefix+"__control_disabled"),!0)}},{key:"setNextBool",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return"boolean"==typeof t&&(this.nextBool=t,!0===this.nextBool?this.next.classList.remove(this.prefix+"__control_disabled"):this.next.classList.add(this.prefix+"__control_disabled"),!0)}},{key:"setEvents",value:function(){this.keydownEventIDs.push(this.prop.v.keydown.add({target:"once",key:[37],do:this.keydownEvent.bind(this)},this.prop.keydown,this.prop.console)),this.keydownEventIDs.push(this.prop.v.keydown.add({target:"once",key:[38],do:this.keydownEvent.bind(this)},this.prop.keydown,this.prop.console)),this.keydownEventIDs.push(this.prop.v.keydown.add({target:"once",key:[39],do:this.keydownEvent.bind(this)},this.prop.keydown,this.prop.console)),this.keydownEventIDs.push(this.prop.v.keydown.add({target:"once",key:[40],do:this.keydownEvent.bind(this)},this.prop.keydown,this.prop.console)),this.swipeEventIDs.push(this.prop.v.swipe.add({target:"right",outer:this.outerEvents,k:100,do:this.swipeEvent.bind(this)},this.prop.swipe,this.prop.console)),this.swipeEventIDs.push(this.prop.v.swipe.add({target:"left",outer:this.outerEvents,k:100,do:this.swipeEvent.bind(this)},this.prop.swipe,this.prop.console)),this.swipeEventIDs.push(this.prop.v.swipe.add({target:"down",outer:this.outerEvents,k:100,do:this.swipeEvent.bind(this)},this.prop.swipe,this.prop.console)),this.swipeEventIDs.push(this.prop.v.swipe.add({target:"up",outer:this.outerEvents,k:100,do:this.swipeEvent.bind(this)},this.prop.swipe,this.prop.console)),this.wheelEventIDs.push(this.prop.v.wheel.add({target:"right",outer:this.outerEvents,k:.5,do:this.wheelEvent.bind(this)},this.prop.wheel,this.prop.console)),this.wheelEventIDs.push(this.prop.v.wheel.add({target:"left",outer:this.outerEvents,k:.5,do:this.wheelEvent.bind(this)},this.prop.wheel,this.prop.console)),this.wheelEventIDs.push(this.prop.v.wheel.add({target:"down",outer:this.outerEvents,k:.1,do:this.wheelEvent.bind(this)},this.prop.wheel,this.prop.console)),this.wheelEventIDs.push(this.prop.v.wheel.add({target:"up",outer:this.outerEvents,k:.1,do:this.wheelEvent.bind(this)},this.prop.wheel,this.prop.console)),this.intervalEventIDs.push(this.prop.v.interval.add({time:this.prop.time,do:this.setNext.bind(this)},this.prop.interval,this.prop.console)),this.addEventListener({el:this.prev,target:"click",do:this.setPrev.bind(this,"controlPrev")}),this.addEventListener({el:this.next,target:"click",do:this.setNext.bind(this,"controlNext")});for(var t=0;t<this.dot.length;t++)this.addEventListener({el:this.dot[t],target:"click",do:this.set.bind(this,t,!0,"dot","none")});return!0}},{key:"setEventsResize",value:function(){null!=this.resizeID&&(this.prop.v.viewport.delete(this.resizeID),this.resizeID=null);var t=this.prop.resizeTimeout;t<this.prop.v.timeMin()&&(t=this.prop.v.timeMin()),this.prop.resize&&(this.resizeID=this.prop.v.viewport.add({target:"wh",name:this.name+" Resize",do:function(){this.setSize(),this.startSlide(this.active)}.bind(this),timeout:t}))}},{key:"destroyEvents",value:function(){for(var t=0;t<this.keydownEventIDs.length;t++)this.prop.v.keydown.delete(this.keydownEventIDs[t]);for(var e=0;e<this.swipeEventIDs.length;e++)this.prop.v.swipe.delete(this.swipeEventIDs[e]);for(var i=0;i<this.wheelEventIDs.length;i++)this.prop.v.wheel.delete(this.wheelEventIDs[i]);null!=this.resizeID&&(this.prop.v.viewport.delete(this.resizeID),this.resizeID=null)}},{key:"keydownEvent",value:function(t){if("h"===this.prop.direction)if(37===t.data.key[0])this.setPrev("keydown");else{if(39!==t.data.key[0])return!1;this.setNext("keydown")}if("v"===this.prop.direction)if(38===t.data.key[0])this.setPrev("keydown");else{if(40!==t.data.key[0])return!1;this.setNext("keydown")}return!0}},{key:"swipeEvent",value:function(t){if("h"===this.prop.direction)if("right"===t.data.target)this.setPrev("swipe");else{if("left"!==t.data.target)return!1;this.setNext("swipe")}if("v"===this.prop.direction)if("down"===t.data.target)this.setPrev("swipe");else{if("up"!==t.data.target)return!1;this.setNext("swipe")}return!0}},{key:"wheelEvent",value:function(t){if("h"===this.prop.direction)if("left"===t.data.target)this.setPrev("wheel");else{if("right"!==t.data.target)return!1;this.setNext("wheel")}if("v"===this.prop.direction)if("up"===t.data.target)this.setPrev("swipe");else{if("down"!==t.data.target)return!1;this.setNext("swipe")}return!0}},{key:"setKeydown",value:function(){for(var t=0;t<this.keydownEventIDs.length;t++)this.prop.v.keydown.turn(this.keydownEventIDs[t],this.prop.keydown,this.prop.console);return!0}},{key:"setSwipe",value:function(){for(var t=0;t<this.swipeEventIDs.length;t++)this.prop.v.swipe.turn(this.swipeEventIDs[t],this.prop.swipe,this.prop.console);return!0}},{key:"setWheel",value:function(){for(var t=0;t<this.wheelEventIDs.length;t++)this.prop.v.wheel.turn(this.wheelEventIDs[t],this.prop.wheel,this.prop.console);return!0}},{key:"setInterval",value:function(){for(var t=0;t<this.intervalEventIDs.length;t++)this.prop.v.interval.turn(this.intervalEventIDs[t],this.prop.interval,this.prop.console);return!0}},{key:"setIntervalOff",value:function(){for(var t=0;t<this.intervalEventIDs.length;t++)this.prop.v.interval.turn(this.intervalEventIDs[t],!1,this.prop.console);return!0}},{key:"setSize",value:function(){return this.width=this.outer.clientWidth,this.height=this.outer.clientHeight,!0}},{key:"getPrev",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;if((t-=1)<0){if(!this.prop.loop)return!1;t=this.count-1}return t}},{key:"getNext",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;if((t+=1)>this.count-1){if(!this.prop.loop)return!1;t=0}return t}},{key:"setPrev",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"none";if(!0===this.animating||!0!==this.prevBool)return!1;var e=this.getPrev();return!1!==e&&(this.set(e,!0,"prev",t),!0)}},{key:"setNext",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"none";if(!0===this.animating||!0!==this.nextBool)return!1;var e=this.getNext();
1return!1!==e&&(this.set(e,!0,"next",t),!0)}},{key:"getActive",value:function(){return this.active}},{key:"set",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];2<arguments.length&&void 0!==arguments[2]&&arguments[2],3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(this.prop.disable)return!1;if(this.animating)return!1;if((t=parseInt(t))<0||t>this.count-1||t===this.active&this.activeShown)return!1;this.setIntervalOff(),setTimeout(this.setInterval.bind(this),this.prop.delay+this.prop.duration),this.setControlAbolished(t),e&&(this.active=t);for(var i=0;i<this.itemsSource.length;i++)t===i?this.itemsSource[i].classList.add(this.prefix+"__item_active"):this.itemsSource[i].classList.remove(this.prefix+"__item_active");return this.setDotActive(t),!0}},{key:"startSlide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active,e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!(!0===this.animating&!e)&&(!(this.firstStart&!this.prop.start)&&(!!this.activeShown&&(this.active=t,this.firstStart=!1,this.activeShown=!0,this.outer.classList.add(this.prefix+"_showActive"),this.itemsSource[t].classList.add(this.prefix+"__item_active"),this.setDotActive(t),!0)))}},{key:"showActive",value:function(){return!this.activeShown&&!this.animating&&(this.activeShown=!0,this.outer.classList.add(this.prefix+"_showActive"),this.itemsSource[this.active].classList.add(this.prefix+"__item_active"),this.setDotActive(this.active),!0)}},{key:"hideActive",value:function(){return!(!this.activeShown||this.animating)&&(this.activeShown=!1,this.outer.classList.remove(this.prefix+"_showActive"),this.itemsSource[this.active].classList.remove(this.prefix+"__item_active"),this.setDotActive(this.active),!0)}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.itemsSource=[],!!this.checkItems()&&(this.outer.classList.add(""+this.prefix),this.active=this.prop.active,this.animating=!1,this.firstStart=!0,this.activeShown=!1,this.prev=!1,this.next=!1,this.prevBool=!1,this.nextBool=!1,this.dots=!1,this.dot=[],this.keydownEventIDs=[],this.swipeEventIDs=[],this.wheelEventIDs=[],this.intervalEventIDs=[],this.resizeID=null,this.loopTypes=["keydown","wheel","swipe","controlPrev","controlNext"],this.createControl(),this.setControl(),this.setControlAbolished(),this.createDot(),this.setDot(),this.setDotActive(this.active),this.setPrevBool(this.prop.prev),this.setNextBool(this.prop.next),this.setEvents(),this.setEventsResize(),this.setSize(),Object.assign(e,{count:function(){return t.count},animating:function(){return t.animating},itemsSource:function(){return t.itemsSource},getActive:this.getActive.bind(this),setPrev:this.setPrevBool.bind(this),setNext:this.setNextBool.bind(this),set:this.set.bind(this),prev:this.setPrev.bind(this),next:this.setNext.bind(this),getPrev:this.getPrev.bind(this),getNext:this.getNext.bind(this),showActive:this.showActive.bind(this),hideActive:this.hideActive.bind(this),destroyEvents:this.destroyEvents.bind(this)})))}}]),s}(),g.prototype.SliderCanvas=function(t){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,n);var e=h(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t));for(var i in e.prefix=""+e.prefix,e.prop=Object.assign(e.prop,{animations:{prev:[0,.5],next:[.5,1]},resetAnimatingTimeout:0,parallaxX:0,parallaxY:0,parallaxPrev:!1,hidePrev:!0,fill:"transparent",reverse:!1,reverseSwipe:!1,zoom:!1,zoomHTML:!1,zoomK:2,zoomAnimation:350,useVideo:!1,tapVideo:!1,tapVideoText:"Tap and hold",tapVideoDuration:250,imageSize:"cover",asyncLoad:!1}),t)e.prop[i]=t[i];return e.targets=["prev","next","before","after","show","hide","start","firstStart","zoomGain","zoomDiscard"],e}return l(n,g.prototype.Slider),o(n,[{key:"check",value:function(){if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"check",this).call(this))return!1;var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["animations","object"],["resetAnimatingTimeout","integer"],["parallaxX","number"],["parallaxY","number"],["parallaxPrev","boolean"],["hidePrev","boolean"],["fill","string"],["reverse","boolean"],["reverseSwipe","boolean"],["zoom","boolean"],["zoomHTML","boolean"],["zoomK","number"],["zoomAnimation","integer"],["useVideo","boolean"],["tapVideo","boolean"],["tapVideoText","string"],["tapVideoDuration","integer"],["imageSize","string"],["asyncLoad","boolean"]]});return!!t&&!!(t=this.checkTypes({obj:this.prop.animations,name:this.name,console:this.prop.console,vars:[["prev","numberArray",{count:2}],["next","numberArray",{count:2}]]}))}},{key:"changeProp",value:function(t){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"changeProp",this).call(this,t)&&(this.setMaxParallax(),this.zoomSetProp(),this.tapSet(),!0)}},{key:"zoomInit",value:function(){this.zoomHTML=document.createElement("div"),this.zoomHTML.classList.add(this.prefix+"__zoom"),this.outer.appendChild(this.zoomHTML),this.zoomBg=document.createElement("div"),this.zoomBg.classList.add("bg-image"),this.zoomHTML.appendChild(this.zoomBg),this.zoomButton=document.createElement("div"),this.zoomButton.classList.add(this.prefix+"__zoom-button"),this.outer.appendChild(this.zoomButton),this.zoomSetProp()}},{key:"zoomEvents",value:function(){for(var t=0;t<this.canvas.length;t++)this.addEventListener({target:"click",el:this.canvas[t],do:function(){this.prop.zoomHTML||this.zoomCanvasClick()}.bind(this)}),this.addEventListener({target:"mousemove",el:this.canvas[t],do:function(t){this.prop.zoomHTML||(this.zoomX=t.offsetX,this.zoomY=t.offsetY)}.bind(this)});this.addEventListener({target:"click",el:this.zoomButton,do:this.zoomCanvasClick.bind(this)}),this.addEventListener({target:"scroll",el:this.zoomHTML,do:this.zoomScrollEvent.bind(this)})}},{key:"zoomScrollEvent",value:function(){var t=this.zoomHTML.scrollLeft/(this.zoomHTML.scrollWidth-this.zoomHTML.clientWidth),e=this.zoomHTML.scrollTop/(this.zoomHTML.scrollHeight-this.zoomHTML.clientHeight);this.zoomX=t*this.outer.clientWidth,this.zoomY=e*this.outer.clientHeight}},{key:"zoomSetProp",value:function(){this.prop.zoom?this.outer.classList.add(this.prefix+"_zoom"):this.outer.classList.remove(this.prefix+"_zoom"),this.prop.zoomHTML?this.outer.classList.add(this.prefix+"_zoom_html"):this.outer.classList.remove(this.prefix+"_zoom_html"),this.zoomResize()}},{key:"zoomResize",value:function(){if(this.zoomBg){var t=this.outer.clientWidth*this.prop.zoomK,e=this.outer.clientHeight*this.prop.zoomK;this.zoomBg.style.width=t+"px",this.zoomBg.style.height=e+"px"}}},{key:"zoomScroll",value:function(){$(this.zoomHTML).animate({scrollTop:(this.zoomBg.clientHeight-this.zoomHTML.clientHeight)/this.prop.zoomK,scrollLeft:(this.zoomBg.clientWidth-this.zoomHTML.clientWidth)/this.prop.zoomK},0)}},{key:"zoomCanvasClick",value:function(t){if(!this.prop.zoom||this.firstStartSlide||this.zoomAnimating)return!1;if(this.zoomed){this.zoomedHover=!1,this.zoomAnimating=!0,this.zoomButton.classList.remove(this.prefix+"__zoom-button_active");var e=new this.Animate({console:this.prop.console,duration:this.prop.zoomAnimation,bezier:this.prop.bezier,do:this.animateCanvas.bind(this,{ctx:0,num:this.active,action:"zoomDiscard",do:function(){this.zoomed=!1,this.animating=!1,this.zoomAnimating=!1,this.zoomHTML.classList.remove(this.prefix+"__zoom_shown"),this.startSlide()}.bind(this)})});(e=e.init()).run(),this.launchEventsByTarget("zoomDiscard")}else{this.prop.zoomHTML&!this.zoomHTML.classList.contains(this.prefix+"__zoom_shown")&&(this.zoomX=this.outer.clientWidth/2,this.zoomY=this.outer.clientHeight/2),this.zoomAnimating=!0,this.zoomButton.classList.add(this.prefix+"__zoom-button_active");var i=new this.Animate({console:this.prop.console,duration:this.prop.zoomAnimation,bezier:this.prop.bezier,do:this.animateCanvas.bind(this,{ctx:0,num:this.active,action:"zoomGain",do:function(){this.zoomed=!0,this.zoomedHover=!0,this.zoomAnimating=!1,this.zoomLoop(),this.zoomHTML.classList.add(this.prefix+"__zoom_shown"),this.zoomScroll(0)}.bind(this)})});(i=i.init()).run(),this.launchEventsByTarget("zoomGain")}}},{key:"zoomLoop",value:function(){this.animateCanvas({ctx:0,num:this.active,action:"zoomGain",do:function(){}},1,1),this.zoomedHover&&window.requestAnimationFrame(this.zoomLoop.bind(this))}},{key:"tapInit",value:function(){return this.isTap=!1,this.timeTap=0,this.tap=document.createElement("div"),this.tap.classList.add(this.prefix+"__tap"),this.outer.appendChild(this.tap),this.videoOuter=document.createElement("div"),this.videoOuter.classList.add(this.prefix+"__video"),this.outer.appendChild(this.videoOuter),!0}},{key:"tapSet",value:function(){return this.prop.tapVideo?this.outer.classList.remove(this.prefix+"_tap-hidden"):this.outer.classList.add(this.prefix+"_tap-hidden"),this.tap.innerHTML="<div></div><span>
1"+this.prop.tapVideoText+"</span>",!0}},{key:"tapShowHide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;null==this.videos[t]?this.outer.classList.add(this.prefix+"_tap-hide"):this.outer.classList.remove(this.prefix+"_tap-hide")}},{key:"tapEvents",value:function(){return this.tap.addEventListener("touchstart",this.tapEventOn.bind(this)),this.tap.addEventListener("touchend",this.tapEventOff.bind(this)),this.tap.addEventListener("mousedown",this.tapEventOn.bind(this)),this.tap.addEventListener("mouseup",this.tapEventOff.bind(this)),!0}},{key:"tapEventOn",value:function(){var t=this;this.animating||this.isTap||(this.isTap=!0,this.tap.classList.add(this.prefix+"__tap_active"),setTimeout(function(){t.isTap&&t.tapRender()},this.prop.tapVideoDuration))}},{key:"tapEventOff",value:function(){this.isTap=!1,this.tap.classList.remove(this.prefix+"__tap_active"),this.tapRender()}},{key:"tapRender",value:function(){var i=this.videos[this.active];if(null!=i)if(this.isTap){i.load();var t=i.play();void 0!==t&&t.then(function(){}).catch(function(t){}.bind(this)),i.classList.add("active")}else{var e=i.pause();void 0!==e&&e.then(function(){}).catch(function(t){var e=this;setTimeout(function(){e.isTap||(i.currentTime=0)},350)}.bind(this)),i.classList.remove("active")}}},{key:"createCanvas",value:function(){for(var t=0;t<this.canvasAmount;t++){var e=document.createElement("canvas");this.outer.appendChild(e),this.canvas.push(e)}for(var i=0;i<this.canvas.length;i++){this.ctx.push(this.canvas[i].getContext("2d"));var s=this.ctx[this.ctx.length-1];s.mozImageSmoothingEnabled=!1,s.webkitImageSmoothingEnabled=!1,s.msImageSmoothingEnabled=!1,s.imageSmoothingEnabled=!1}for(var r=0;r<this.canvasAmount;r++){var o=document.createElement("canvas");this.canvasAdditional.push(o)}for(var n=0;n<this.canvasAdditional.length;n++){this.ctxAdditional.push(this.canvasAdditional[n].getContext("2d"));var a=this.ctxAdditional[this.ctxAdditional.length-1];a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1}return!0}},{key:"createImages",value:function(){for(var t=0;t<this.itemsSource.length;t++){var e=this.itemsSource[t].querySelector("img");if(null!==e){var i=e.getAttribute("src");if(null===i||0===i.length)continue;var s=new Image;s[this.data.loaded]=!1,s.addEventListener("load",function(t){t[this.data.loaded]=!0,this.loaded++,this.startSlide(this.active)}.bind(this,s),!1),s.src=i,this.images.push(s),this.imagesTotal.push(s);var r=e.getAttribute(this.data.imageTablet);if(null===r||0===r.length)this.imagesTablet.push(s);else{var o=new Image;o[this.data.loaded]=!1,o.addEventListener("load",function(t){t[this.data.loaded]=!0,this.loaded++,this.startSlide(this.active)}.bind(this,o),!1),o.src=r,this.imagesTablet.push(o),this.imagesTotal.push(o)}var n=e.getAttribute(this.data.imageMobile);if(null===n||0===n.length)this.imagesMobile.push(s);else{var a=new Image;a[this.data.loaded]=!1,a.addEventListener("load",function(t){t[this.data.loaded]=!0,this.loaded++,this.startSlide(this.active)}.bind(this,a),!1),a.src=n,this.imagesMobile.push(a),this.imagesTotal.push(a)}if(this.prop.useVideo){var h=this.itemsSource[t].querySelector("video");null!==h&!(("firefox"==this.prop.v.browser()||"opera"==this.prop.v.browser())&!this.prop.v.desktop())?(h.setAttribute("playsinline","playsinline"),h.setAttribute("preload","metadata"),h.setAttribute("loop","loop"),h.setAttribute("muted",""),h[this.data.loaded]=!1,this.videos.push(h),h.addEventListener("loadedmetadata",function(t){t[this.data.loaded]=!0,this.loadedVideos++,this.startSlide(this.active)}.bind(this,h),!1),this.videoOuter.appendChild(h)):this.videos.push(null)}else this.videos.push(null)}}return!0}},{key:"setEvents",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setEvents",this).call(this)}},{key:"setSize",value:function(){if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setSize",this).call(this))return!1;if(this.videos)for(var t=0;t<this.videos.length;t++)if(null!=this.videos[t]){var e=this.imageSize({size:this.prop.imageSize,img:this.videos[t],width:this.width*this.maxParallax,height:this.height*this.maxParallax,maxWidth:this.width,maxHeight:this.height});this.videos[t].style.top=e.y+"px",this.videos[t].style.left=e.x+"px",this.videos[t].style.height=e.imageHeight+"px",this.videos[t].style.width=e.imageWidth+"px"}this.dpr=this.prop.v.dpr();var i=Math.floor(this.width*this.dpr),s=Math.floor(this.height*this.dpr);this.width===i&&this.height===s||(this.width=i,this.height=s);for(var r=0;r<this.canvas.length;r++)this.canvas[r].width=this.width,this.canvas[r].height=this.height;return this.imagesCurrent=this.images,this.prop.v.tablet()&&(this.imagesCurrent=this.imagesTablet),this.prop.v.mobile()&&(this.imagesCurrent=this.imagesMobile),!0}},{key:"setMaxParallax",value:function(){return this.maxParallax=1+2*Math.max(Math.abs(this.prop.parallaxX),Math.abs(this.prop.parallaxY)),!0}},{key:"startSlide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active,e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(this.prop.asyncLoad){if(!this.imagesCurrent[t][this.data.loaded])return!1;var i=this.videos[t];if(null!=i&&!i[this.data.loaded])return!1}else if(this.loaded<this.countImages||this.loadedVideos<this.countVideos)return!1;if(this.setSize(),!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"startSlide",this).call(this,t,e))return!1;this.ctx[0].save(),this.ctx[0].beginPath(),this.ctx[0].clearRect(0,0,this.width,this.height),this.ctx[0].rect(0,0,this.width,this.height),this.ctx[0].fillStyle=this.prop.fill,this.ctx[0].fillRect(0,0,this.width,this.height);var s,r,o=this.imagesCurrent[this.active];return r=o,s=this.imageSize({size:this.prop.imageSize,img:r,width:this.width*this.maxParallax,height:this.height*this.maxParallax,maxWidth:this.width,maxHeight:this.height}),this.imageInfo={outer:{width:this.width*this.maxParallax,height:this.height*this.maxParallax,maxWidth:this.width,maxHeight:this.height},size:s},this.ctx[0].drawImage(o,0,0,o.width,o.height,s.x,s.y,s.imageWidth,s.imageHeight),this.ctx[0].closePath(),this.ctx[0].restore(
1),this.ctx[1].save(),this.ctx[1].beginPath(),this.ctx[1].clearRect(0,0,this.width,this.height),this.ctx[1].closePath(),this.ctx[1].restore(),this.ctx[2].save(),this.ctx[2].beginPath(),this.ctx[2].clearRect(0,0,this.width,this.height),this.ctx[2].closePath(),this.ctx[2].restore(),this.tapShowHide(t),this.launchEventsByTarget("start"),this.firstStartSlide&&this.launchEventsByTarget("firstStart"),this.firstStartSlide=!1,!(this.animating=!1)}},{key:"set",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"next",s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"none",r=this.active;if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"set",this).call(this,t,!1,i,s))return!1;if(this.isTap)return!1;this.tapShowHide(t);var o={prev:{duration:(this.prop.animations.prev[1]-this.prop.animations.prev[0])*this.prop.duration,delay:this.prop.animations.prev[0]*this.prop.duration,reversed:!1},next:{duration:(this.prop.animations.next[1]-this.prop.animations.next[0])*this.prop.duration,delay:this.activeShown?this.prop.animations.next[0]*this.prop.duration:0,reversed:!1}};return this.loopTypes.includes(s)?"prev"===i?(o.prev.reversed=!0,o.next.reversed=!0):"next"===i&&t<r&&(o.prev.reversed=!1,o.next.reversed=!1):t<r&&(o.prev.reversed=!0,o.next.reversed=!0),"swipe"==s&this.prop.reverseSwipe&&(o.prev.reversed?o.prev.reversed=!1:o.prev.reversed=!0,o.next.reversed?o.next.reversed=!1:o.next.reversed=!0),this.launchEventsByTarget("before",{prev:r,next:t,dir:i,type:s}),r<t?this.launchEventsByTarget("next",{prev:r,next:t,dir:i,type:s}):this.launchEventsByTarget("prev",{prev:r,next:t,dir:i,type:s}),this.animating=!0,setTimeout(function(){if(!this.activeShown)return e&&(this.active=t),this.animating=!1,this.showActive();this.animate({duration:o.prev.duration,delay:o.prev.delay,ctx:1,num:r,action:"hide",reversed:o.prev.reversed}),this.animate({duration:o.next.duration,delay:o.next.delay,ctx:2,num:t,action:"show",reversed:o.next.reversed,do:function(t){var e=this;this.launchEventsByTarget("after",{prev:this.active,next:t,dir:i,type:s}),this.active=t,setTimeout(function(){e.animating=!1,e.startSlide(t)},this.prop.v.timeMin()+this.prop.resetAnimatingTimeout)}.bind(this,t)})}.bind(this),this.prop.delay),!0}},{key:"showActive",value:function(){if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"showActive",this).call(this))return!1;var t=(this.prop.animations.next[1]-this.prop.animations.next[0])*this.prop.duration;return this.animate({duration:t,ctx:1,num:this.active,action:"showActive",do:function(){this.firstStart&&(this.firstStart=!1),this.animating=!1,this.startSlide(),this.launchEventsByTarget("show")}.bind(this)}),!0}},{key:"hideActive",value:function(){if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"hideActive",this).call(this))return!1;var t=(this.prop.animations.next[1]-this.prop.animations.next[0])*this.prop.duration;return this.animate({duration:t,ctx:1,num:this.active,action:"hideActive",reversed:!1,do:function(){this.animating=!1,this.launchEventsByTarget("hide")}.bind(this)}),!0}},{key:"animate",value:function(t){var e={duration:this.prop.duration,delay:0,ctx:0,num:this.active,action:"show",reversed:!1,do:function(){}};for(var i in t)e[i]=t[i];this.ctx[0].save(),this.ctx[0].beginPath(),this.ctx[0].clearRect(0,0,this.width,this.height),this.ctx[0].closePath(),this.ctx[0].restore(),this.animateCanvas({ctx:e.ctx,num:e.num,action:e.action,reversed:e.reversed,do:e.do},0,0);var s=new this.Animate({console:this.prop.console,duration:parseInt(e.duration),delay:parseInt(e.delay),bezier:this.prop.bezier,do:this.animateCanvas.bind(this,{ctx:e.ctx,num:e.num,action:e.action,reversed:e.reversed,do:e.do})});return s=s.init(),s.run(),!0}},{key:"animateCanvas",value:function(t,e,i){var s={};for(var r in t)s[r]=t[r];this.animating=!0;var o=1;"zoomGain"==s.action?(o=(this.prop.zoomK-1)*i,o+=1):"zoomDiscard"==s.action&&(o=(this.prop.zoomK-1)*(1-i),o+=1);var n,a,h=this.imagesCurrent[s.num];a=h,n=this.imageSize({size:this.prop.imageSize,img:a,width:this.width*this.maxParallax*o,height:this.height*this.maxParallax*o,maxWidth:this.width,maxHeight:this.height}),this.prop.reverse&&(s.reversed?s.reversed=!1:s.reversed=!0);var l=void 0;l="show"===s.action||"showActive"===s.action?1-i:this.prop.parallaxPrev||"hideActive"===s.action?i:0,"zoomDiscard"!==s.action&&"zoomGain"!==s.action||(l=0);var c=this.prop.parallaxX,p=this.prop.parallaxY;"hide"!==s.action&&"hideActive"!==s.action||(c*=-1,p*=-1),s.reversed&&(c*=-1,p*=-1);var u=c*this.width*l,d=p*this.height*l,v=n.x-u,g=n.y-d,f=void 0,m=void 0,y=0,b=0,_=0,k=0;if("zoomGain"!==s.action&"zoomDiscard"!==s.action)"h"===this.prop.direction?(f=this.width*i,m=this.height,s.reversed&&(y=this.width-f),"hide"!==s.action&&"hideActive"!==s.action||(f=this.width*(1-i),y=this.width-f,"hide"===s.action&&(this.prop.hidePrev||(f=this.width,y=0)),s.reversed&&(y=0))):(f=this.width,m=this.height*i,s.reversed&&(b=this.height-m),m=this.height*i,f=this.width,s.reversed&&(b=this.height-m),"hide"!==s.action&&"hideActive"!==s.action||(m=this.height*(1-i),b=this.height-m,"hide"===s.action&&(this.prop.hidePrev||(m=this.height,b=0)),s.reversed&&(b=0))
1);else{var w=this.zoomX/this.outer.clientWidth,x=this.zoomY/this.outer.clientHeight,L=i;"zoomDiscard"==s.action&&(L=1-L),.5!=w&&(_=1-w/.5,_*=this.width*(this.prop.zoomK-1)/2,v+=_*=L),.5!=x&&(k=1-x/.5,k*=this.width*(this.prop.zoomK-1)/2,g+=k*=L),f=this.width,m=this.height}return this.ctx[s.ctx].save(),this.ctx[s.ctx].beginPath(),this.ctx[s.ctx].clearRect(0,0,this.width,this.height),this.ctx[s.ctx].rect(y,b,f,m),this.ctx[s.ctx].closePath(),this.ctx[s.ctx].clip(),this.ctx[s.ctx].fillStyle=this.prop.fill,this.ctx[s.ctx].fillRect(0,0,this.width,this.height),this.ctx[s.ctx].drawImage(h,0,0,h.width,h.height,v,g,n.imageWidth,n.imageHeight),this.ctx[s.ctx].restore(),1===e&&s.do.call(this),!0}},{key:"init",value:function(){var t=this;this.maxParallax=0,this.canvas=[],this.canvasAdditional=[];var e=p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"init",this).call(this);if(!e)return!1;this.data={imageTablet:"data-"+this.prefix+"-imageTablet",imageMobile:"data-"+this.prefix+"-imageMobile",loaded:"data-"+this.prefix+"-loaded"},this.canvasAmount=3,this.ctx=[],this.ctxAdditional=[],this.videos=[],this.loadedVideos=0,this.images=[],this.imagesCurrent=[],this.imagesTotal=[],this.imagesTablet=[],this.imagesMobile=[],this.videos=[],this.loaded=0,this.count=0,this.width=0,this.height=0,this.dpr=1,this.imageInfo=null,this.firstStartSlide=!0,this.prop.start&&(this.activeShown=!0),this.zoomBg=!1,this.zoomed=!1,this.zoomedHover=!1,this.zoomX=0,this.zoomY=0,this.zoomAnimating=!1,this.tapInit(),this.tapSet(),this.tapShowHide(),this.tapEvents(),this.createCanvas(),this.createImages(),this.count=this.images.length,this.countImages=this.imagesTotal.length;for(var i=this.countVideos=0;i<this.videos.length;i++)null!=this.videos[i]&&this.countVideos++;return this.zoomInit(),this.zoomEvents(),this.setMaxParallax(),this.setSize(),this.startSlide(),Object.assign(e,{images:function(){return t.images},imageInfo:function(){return t.imageInfo},firstStart:function(){return t.firstStartSlide},zoom:this.zoomCanvasClick.bind(this)})}}]),n}(),g.prototype.SliderContent=function(t){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,n);var e=h(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t));for(var i in e.prefixAdditional=e.prefix+"Content",t)e.prop[i]=t[i];return e.targets=["prev","next","before","after","show","hide"],e}return l(n,g.prototype.Slider),o(n,[{key:"check",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"check",this).call(this)}},{key:"checkItems",value:function(){var t=this.outer.querySelector("."+this.prefixAdditional+"__items");return null!==t&&(this.itemsSource=t.querySelectorAll("."+this.prefixAdditional+"__item"),0!==this.itemsSource.length)}},{key:"createControl",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"createControl",this).call(this)&&(this.prev.classList.add(this.prefixAdditional+"__control"),this.prev.classList.add(this.prefixAdditional+"__control_prev"),this.next.classList.add(this.prefixAdditional+"__control"),this.next.classList.add(this.prefixAdditional+"__control_next"),!0)}},{key:"setControl",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setControl",this).call(this)&&(this.prop.control?this.outer.classList.remove(this.prefixAdditional+"_control-hidden"):this.outer.classList.add(this.prefixAdditional+"_control-hidden"),!0)}},{key:"createDot",value:function(){if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"createDot",this).call(this))return!1;this.dots.classList.add(this.prefixAdditional+"__dots");for(var t=0;t<this.dot.length;t++)this.dot[t].classList.add(this.prefixAdditional+"__dot");return!0}},{key:"setDot",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setDot",this).call(this)&&(this.prop.dot?this.outer.classList.remove(this.prefixAdditional+"_dot-hidden"):this.outer.classList.add(this.prefixAdditional+"_dot-hidden"),!0)}},{key:"setDotActive",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setDotActive",this).call(this,t))return!1;for(var e=0;e<this.dot.length;
1e++)e===t?this.dot[e].classList.add(this.prefixAdditional+"__dot_active"):this.dot[e].classList.remove(this.prefixAdditional+"__dot_active");return!0}},{key:"setPrevBool",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setPrevBool",this).call(this,t)&&(!0===this.prevBool?this.prev.classList.remove(this.prefixAdditional+"__control_disabled"):this.prev.classList.add(this.prefixAdditional+"__control_disabled"),!0)}},{key:"setNextBool",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"setNextBool",this).call(this,t)&&(!0===this.nextBool?this.next.classList.remove(this.prefixAdditional+"__control_disabled"):this.next.classList.add(this.prefixAdditional+"__control_disabled"),!0)}},{key:"set",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"next",s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"none",r=this.active;if(!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"set",this).call(this,t,!1,i,s))return!1;0===(t=parseInt(t))&!1===this.prop.loop?this.prev.classList.add(this.prefixAdditional+"__control_abolished"):this.prev.classList.remove(this.prefixAdditional+"__control_abolished"),t===this.count-1&!1===this.prop.loop?this.next.classList.add(this.prefixAdditional+"__control_abolished"):this.next.classList.remove(this.prefixAdditional+"__control_abolished");for(var o=0;o<this.itemsSource.length;o++)t===o?this.itemsSource[o].classList.add(this.prefixAdditional+"__item_active"):this.itemsSource[o].classList.remove(this.prefixAdditional+"__item_active");return this.launchEventsByTarget("before",{prev:r,next:t,dir:i,type:s}),this.loopTypes.includes(s)?"prev"===i?this.launchEventsByTarget("prev",{prev:r,next:t,dir:i,type:s}):this.launchEventsByTarget("next",{prev:r,next:t,dir:i,type:s}):r<t?this.launchEventsByTarget("next",{prev:r,next:t,dir:i,type:s}):this.launchEventsByTarget("prev",{prev:r,next:t,dir:i,type:s}),this.animating=!0,this.activeShown?(setTimeout(function(){this.launchEventsByTarget("after",{prev:this.active,next:t,dir:i,type:s}),e&&(this.active=t),this.animating=!1,this.startSlide(t)}.bind(this),this.prop.delay+this.prop.duration),!0):(e&&(this.active=t),this.animating=!1,this.showActive())}},{key:"startSlide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"startSlide",this).call(this,t)&&(this.outer.classList.add(this.prefixAdditional+"_showActive"),this.itemsSource[t].classList.add(this.prefixAdditional+"__item_active"),!0)}},{key:"showActive",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"showActive",this).call(this)&&(this.outer.classList.add(this.prefixAdditional+"_showActive"),this.itemsSource[this.active].classList.add(this.prefixAdditional+"__item_active"),this.animating=!0,setTimeout(function(){this.firstStart&&(this.firstStart=!1),this.startSlide(),this.animating=!1,this.launchEventsByTarget("show")}.bind(this),this.prop.duration),!0)}},{key:"hideActive",value:function(){return!!p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"hideActive",this).call(this)&&(this.outer.classList.remove(this.prefixAdditional+"_showActive"),this.itemsSource[this.active].classList.remove(this.prefixAdditional+"__item_active"),this.animating=!0,setTimeout(function(){this.animating=!1,this.launchEventsByTarget("hide")}.bind(this),this.prop.duration),!0)}},{key:"init",value:function(){var t=p(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"init",this).call(this);return!!t&&(this.outer.classList.add(""+this.prefixAdditional),this.count=this.itemsSource.length,this.prop.start&&(this.activeShown=!0),this.startSlide(),t)}}]),n}(),g.prototype.Cursor=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"cursor",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorAnchor:"."+e.prefix+"__hover",k:{value:.3,size:.3,ignore:.1},run:!0,hideDefault:!1,width:36,height:36,radius:18,helpers:0,moveInner:{on:!0,k:.1,max:1e3,ignore:.1}}),t)e.prop[i]=t[i];return e.targets=[],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorAnchor","dom"],["k","object"],["run","boolean"],["hideDefault","boolean"],["width","integer"],["height","integer"],["radius","integer"],["helpers","integer"],["moveInner","object"]]});return!!t&&(!!(t=this.checkTypes({obj:this.prop.k,name:this.name,console:this.prop.console,vars:[["value","number"],["size","number"],["ignore","number"]]}))&&(!!(t=this.checkTypes({obj:this.prop.moveInner,name:this.name,console:this.prop.console,vars:[["on","boolean"],["k","number"],["max","number"],["ignore","number"]]}))&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),this.prop.hideDefault?this.outer.classList.add(this.prefix+"_hideDefault"):this.outer.classList.remove(this.prefix+"_hideDefault"),!0)))}},{key:"changeProp",value:function(t){var e=this.prop.run;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.prop.run!==e&&this.run(),!0)}},{key:"create",value:function(){this.outer.classList.add(""+this.prefix),this.element=document.createElement("div"),this.element.classList.add(this.prefix+"__element"),this.outer.appendChild(this.element),this.border=document.createElement("div"),this.border.classList.add(this.prefix+"__border"),this.element.appendChild(this.border);for(var t=0;t<this.prop.helpers;t++){var e=document.createElement("div");e.classList.add(this.prefix+"__helper"),e.classList.add(this.prefix+"__helper_"+t),this.element.appendChild(e),this.helpers.push(e)}return!0}},{key:"setEvents",value:function(){return this.addEventListener({el:this.outer,target:"mousemove",do:this.mousemove.bind(this)}),this.addEventListener({el:window,target:"mouseover",do:this.mouseover.bind(this)}),this.addEventListener({el:window,target:"mouseout",do:this.mouseout.bind(this)}),this.addEventListener({el:this.prop.v.document(),target:"mousedown",do:this.mousedown.bind(this)}),this.addEventListener({el:this.prop.v.document(),target:"mouseup",do:this.mouseup.bind(this)}),this.addEventListener({el:window,target:"blur",do:this.blur.bind(this)}),!0}},{key:"mousemove",value:function(t){this.coords.x=t.x,this.coords.y=t.y,this.shown||(this.shown=!0,this.element.classList.add(this.prefix+"__element_shown"),this.animate(!0))}},{key:"mouseover",value:function(t){this.element.classList.add(this.prefix+"__element_shown")}},{key:"mouseout",value:function(t){this.element.classList.remove(this.prefix+"__element_shown")}},{key:"mousedown",value:function(t){1==t.which&&this.element.classList.add(this.prefix+"__element_click")}},{key:"mouseup",value:function(t){this.element.classList.remove(this.prefix+"__element_click")}},{key:"blur",value:function(t){this.element.classList.remove(this.prefix+"__element_click")}},{key:"updateElements",value:function(){for(var t=this.prop.v.document().querySelectorAll(this.prop.selectorAnchor),e=[],i=0;i<this.elements.length;i++)this.childOf(this.elements[i],this.outer)&&e.push(this.elements[i]);this.elements=e;for(var s=0;s<t.length;s++){null==t[s].getAttribute(this.data.proceeded)&&(t[s][this.data.data]={hovered:!1,inner:t[s].parentNode.querySelector("."+this.prefix+"__inner"),bounding:{},x:0,y:0,xCurrent:0,yCurrent:0,moveInnerMax:null},t[s][this.data.data].inner&&(t[s][this.data.data].bounding=t[s].getBoundingClientRect()),t[s].getAttribute(this.data.moveInnerMax)&&(t[s][this.data.data].moveInnerMax=parseFloat(t[s].getAttribute(this.data.moveInnerMax))),this.elements.push(t[s]),this.addEventListener({el:t[s],target:"mouseover",do:this.mouseoverAnchor.bind(this,t[s])}),this.addEventListener({el:t[s],target:"mouseout",do:this.mouseoutAnchor.bind(this,t[s])}),t[s].setAttribute(this.data.proceeded,"true"))}}},{key:"mouseoverAnchor",value:function(t,e){if(this.prop.run){this.hovered=!0,t[this.data.data].hovered=!0;var i=t.getAttribute(this.data.width),s=t.getAttribute(this.data.height),r=t.getAttribute(this.data.borderColor),o=t.getAttribute(this.data.class);i?(i=parseInt(i),this.pos.width=i):this.pos.width=t.getBoundingClientRect().width,s?(s=parseInt(s),this.pos.height=s):this.pos.height=t.getBoundingClientRect().height,r&&(this.border.style.borderColor=r),this.pos.radius=this.pos.height/2,t.parentNode.classList.add(this.prefix+"_hovered"),o&&this.element.classList.add(o)}}},{key:"mouseoutAnchor",value:function(t,e){if(this.prop.run){this.hovered=!1,t[this.data.data].hovered=!1,this.border.style.borderColor="",this.pos.radius=this.prop.radius,t.parentNode.classList.remove(this.prefix+"_hovered");var i=t.getAttribute(this.data.class);i&&this.element.classList.remove(i)}}},{key:"resetHover",value:function(){this.hovered=!1;for(var t=0;t<this.elements.length;t++)this.mouseoutAnchor(this.elements[t])}},{key:"run",value:function(){this.prop.run&&(window.requestAnimationFrame(this.run.bind(this)),this.animate())}},{key:"r",value:function(t,e){return e=void 0!==e?Math.pow(10,e):1e3,Math.round(t*e)/e}},{key:"animatePos",value:function(t){var e=this.coords.x,i=this.coords.y;this.pos.x+=(e-this.pos.x)*t,this.pos.y+=(i-this.pos.y)*t;var s={x:Math.ceil(this.pos.x),y:Math.ceil(this.pos.y)};Math.abs(s.x-this.pos.x)<=this.prop.k.ignore&&(this.pos.x=s.x),Math.abs(s.y-this.pos.y)<=this.prop.k.ignore&&(this.pos.y=s.y)}},{key:"animateSizes",value:function(t){this.hovered?(this.pos.widthCurrent+=(this.pos.width-this.pos.widthCurrent)*t,this.pos.heightCurrent+=(this.pos.height-this.pos.heightCurrent)*t):(this.pos.widthCurrent-=(this.pos.widthCurrent-this.prop.width)*t,this.pos.heightCurrent-=(this.pos.heightCurrent-this.prop.height)*t),this.pos.widthCurrent=this.r(this.pos.widthCurrent),this.pos.heightCurrent=this.r(this.pos.heightCurrent);
1var e={w:Math.ceil(this.pos.widthCurrent),h:Math.ceil(this.pos.heightCurrent)};Math.abs(e.w-this.pos.widthCurrent)<=this.prop.k.ignore&&(this.pos.widthCurrent=e.w),Math.abs(e.h-this.pos.heightCurrent)<=this.prop.k.ignore&&(this.pos.heightCurrent=e.h),this.pos.xDiff=this.pos.widthCurrent/2,this.pos.yDiff=this.pos.heightCurrent/2}},{key:"animateRadius",value:function(t){this.hovered?this.pos.radiusCurrent+=(this.pos.radius-this.pos.radiusCurrent)*t:this.pos.radiusCurrent-=(this.pos.radiusCurrent-this.prop.radius)*t,this.pos.radiusCurrent=this.r(this.pos.radiusCurrent);var e=Math.ceil(this.pos.radiusCurrent);Math.abs(e-this.pos.radiusCurrent)<=this.prop.k.ignore&&(this.pos.radiusCurrent=e)}},{key:"animate",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.prop.k.value,i=this.prop.k.size;t&&(i=e=1),this.animateSizes(i),this.animateRadius(i),this.animatePos(e),this.element.style.transform="translate3d("+(this.pos.x-this.pos.xDiff)+"px, "+(this.pos.y-this.pos.yDiff)+"px, 0)",this.element.style.width=this.pos.widthCurrent+"px",this.element.style.height=this.pos.heightCurrent+"px",this.border.style.borderRadius=this.pos.radiusCurrent+"px";for(var s=this.prop.moveInner.max,r=0;r<this.elements.length;r++){var o=this.elements[r],n=o[this.data.data];if(n.hovered&null!=n.inner&this.prop.moveInner.on){o[this.data.data].bounding=o.getBoundingClientRect();var a=this.coords.x-n.bounding.left-this.pos.width/2-(o.clientWidth-this.pos.width)/2,h=this.coords.y-n.bounding.top-this.pos.height/2-(o.clientHeight-this.pos.height)/2;n.xCurrent+=(a-n.xCurrent)*this.prop.moveInner.k,n.yCurrent+=(h-n.yCurrent)*this.prop.moveInner.k,null!=n.moveInnerMax&&(s=n.moveInnerMax),Math.abs(n.xCurrent)>s&&(n.xCurrent<0?n.xCurrent=-s:0<n.xCurrent&&(n.xCurrent=s)),Math.abs(n.yCurrent)>s&&(n.yCurrent<0?n.yCurrent=-s:0<n.yCurrent&&(n.yCurrent=s)),n.inner.style.transform="translate3d("+n.xCurrent+"px, "+n.yCurrent+"px, 0)"}else if(!n.hovered&null!=n.inner){if((0==n.xCurrent||Math.abs(n.xCurrent)<=this.prop.moveInner.ignore)&(0==n.yCurrent||Math.abs(n.yCurrent)<=this.prop.moveInner.ignore))continue;n.xCurrent-=n.xCurrent*this.prop.moveInner.k,n.yCurrent-=n.yCurrent*this.prop.moveInner.k,n.inner.style.transform="translate3d("+n.xCurrent+"px, "+n.yCurrent+"px, 0)"}}}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.coords={x:0,y:0},this.pos={x:0,y:0,xDiff:0,yDiff:0,width:this.prop.width,widthCurrent:this.prop.width,height:this.prop.height,heightCurrent:this.prop.height,radius:this.prop.radius,radiusCurrent:this.prop.radius},this.data={proceeded:"data-"+this.prefix+"-proceeded",data:"data-"+this.prefix+"-data",width:"data-"+this.prefix+"-width",height:"data-"+this.prefix+"-height",borderColor:"data-"+this.prefix+"-borderColor",class:"data-"+this.prefix+"-class",moveInnerMax:"data-"+this.prefix+"-moveInnerMax",timeout:"data-"+this.prefix+"-timeout"},this.elements=[],this.helpers=[],this.hovered=!1,this.shown=!1,this.resizeId=null,this.create(),this.setEvents(),this.updateElements(),this.run(),Object.assign(e,{getElement:function(){return t.element},getElements:function(){return t.elements},getBorder:function(){return t.border},getHelpers:function(){return t.helpers},getOuter:function(){return t.outer},getPos:function(){return t.pos},updateElements:this.updateElements.bind(this),resetHover:this.resetHover.bind(this)}))}}]),s}(),g.prototype.Menu=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"menu",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorButton:"#"+e.prefix+"-button",animation:500,animationButton:650,animationInner:{on:!1,duration:500},delays:{show:0,hide:0},keydown:{on:!0,key:27},link:{on:!1,href:""}}),t)e.prop[i]=t[i];return e.targets=["show","shown","hide","hidden"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorButton","dom"],["animation","integer"],["animationButton","integer"],["animationInner","object"],["delays","object"],["keydown","object"],["link","object"]]});return!!t&&(!!(t=this.checkTypes({obj:this.prop.delays,name:this.name,console:this.prop.console,vars:[["show","integer"],["hide","integer"]]}))&&(!!(t=this.checkTypes({obj:this.prop.animationInner,name:this.name,console:this.prop.console,vars:[["on","boolean"],["duration","integer"]]}))&&(!!(t=this.checkTypes({obj:this.prop.keydown,name:this.name,console:this.prop.console,vars:[["on","boolean"],["key","integer"]]}))&&(!!(t=this.checkTypes({obj:this.prop.link,name:this.name,console:this.prop.console,vars:[["on","boolean"],["href","string"]]}))&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),this.button=this.prop.v.document().querySelector(this.prop.selectorButton),!0)))))}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.keydownEvents(),this.linkEvent(),!0)}},{key:"setEvents",value:function(){return this.buttonEvents(),this.keydownEvents(),this.linkEvent(),!0}},{key:"buttonEvents",value:function(){return this.button.setAttribute("data-"+this.prop.v.prefix()+"preloader-none",!0),this.addEventListener({el:this.button,target:"click",do:this.clickButton.bind(this)}),this.addEventListener({el:this.button,target:"mouseover",do:this.mouseoverButton.bind(this)}),this.addEventListener({el:this.button,target:"mouseleave",do:this.mouseleaveButton.bind(this)}),!0}},{key:"clickButton",value:function(t){t.preventDefault(),this.buttonClick()}},{key:"mouseoverButton",value:function(t){this.buttonHovered=!0}},{key:"mouseleaveButton",value:function(t){this.buttonHovered=!1}},{key:"keydownEvents",value:function(){for(var t=0;t<this.keydownEventIDs.length;t++)this.prop.v.keydown.delete(this.keydownEventIDs[t],this.prop.console);return this.keydownEventIDs.push(this.prop.v.keydown.add({target:"once",key:[this.prop.keydown.key],do:this.hide.bind(this)},this.prop.keydown.on,this.prop.console)),!0}},{key:"linkEvent",value:function(){return this.prop.link.on?(this.button.classList.add(this.prefix+"-button_close"),this.button.classList.add(this.prefix+"-button_forbidden-hover"),this.button.href=this.prop.link.href):!this.shown&!this.animating&&(this.button.classList.remove(this.prefix+"-button_close"),this.button.classList.remove(this.prefix+"-button_forbidden-hover"),this.button.href=""),!0}},{key:"buttonClick",value:function(){return this.prop.link.on?window.location.href=this.prop.link.href:this.showHide(),!0}},{key:"show",value:function(){return!this.shown&&this.showHide()}},{key:"hide",value:function(){return!!this.shown&&this.showHide()}},{key:"showHide",value:function(){return!this.animating&&(this.buttonHoverForbidden=!0,this.animating=!0,this.shown?(this.lau
1nchEventsByTarget("hide"),0===this.prop.delays.hide?this.hideFunc():setTimeout(this.hideFunc.bind(this),this.prop.delays.hide)):(this.launchEventsByTarget("show"),0===this.prop.delays.show?this.showFunc():setTimeout(this.showFunc.bind(this),this.prop.delays.show)),!0)}},{key:"showFunc",value:function(){return this.prop.v.document().classList.add(this.prefix+"_shown"),this.outer.classList.add(this.prefix+"_show"),this.button.classList.add(this.prefix+"-button_close"),this.outer.classList.remove(this.prefix+"_prepare-hide"),setTimeout(function(){this.outer.classList.add(this.prefix+"_prepare-show"),this.button.classList.add(this.prefix+"-button_forbidden-hover")}.bind(this),this.prop.v.timeMin()),setTimeout(function(){this.shown=!0,this.prop.animationInner.on?(this.outer.classList.add(this.prefix+"_animation-show"),setTimeout(function(){this.animating=!1,this.launchEventsByTarget("shown")}.bind(this),this.prop.animationInner.duration)):(this.animating=!1,this.launchEventsByTarget("shown"))}.bind(this),this.prop.animation),!0}},{key:"hideFunc",value:function(){return this.outer.classList.remove(this.prefix+"_animation-show"),this.prop.animationInner.on?setTimeout(this.hideFuncInner.bind(this),this.prop.animationInner.duration):this.hideFuncInner(),!0}},{key:"hideFuncInner",value:function(){return this.prop.v.document().classList.remove(this.prefix+"_shown"),this.button.classList.remove(this.prefix+"-button_close"),this.outer.classList.remove(this.prefix+"_prepare-show"),this.outer.classList.add(this.prefix+"_prepare-hide"),setTimeout(function(){this.outer.classList.remove(this.prefix+"_show"),this.shown=!1,this.animating=!1,this.launchEventsByTarget("hidden")}.bind(this),this.prop.animation),setTimeout(function(){this.buttonHovered?$(this.button).one("mouseleave",function(){this.buttonHoverForbidden&&this.button.classList.remove(this.prefix+"-button_forbidden-hover")}.bind(this)):this.button.classList.remove(this.prefix+"-button_forbidden-hover")}.bind(this),this.prop.animationButton),!0}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.outer.classList.add(""+this.prefix),this.button.classList.add(this.prefix+"-button"),this.shown=!1,this.animating=!1,this.buttonHovered=!1,this.buttonHoverForbidden=!1,this.keydownEventIDs=[],this.setEvents(),Object.assign(e,{shown:function(){return t.shown},animating:function(){return t.animating},show:this.show.bind(this),hide:this.hide.bind(this),showHide:this.showHide.bind(this)}))}}]),s}(),g.prototype.Filter=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"filter",e.prop=Object.assign(e.prop,{selectors:{item:"."+e.prefix+"__item",title:"."+e.prefix+"__title",value:"."+e.prefix+"__value",markers:"."+e.prefix+"__markers"},saveOnChange:!0,updateTitle:!0,updateCount:!0,removeDisabledActive:!0,start:!0,disabledTries:1e3,popstateEvent:!0,popstateEventReload:!0,setParamToNull:!1,param:"page",markers:!0,separator:"__",separatorAjax:"__",separatorAjaxCount:"--",cache:!1}),t)e.prop[i]=t[i];return e.targets=["title","value","start","reset","save","count"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selectors","object"],["saveOnChange","boolean"],["updateTitle","boolean"],["updateCount","boolean"],["removeDisabledActive","boolean"],["start","boolean"],["disabledTries","integer"],["popstateEvent","boolean"],["popstateEventReload","boolean"],["setParamToNull","boolean"],["param","string"],["markers","boolean"],["separator","string"],["separatorAjax","string"],["separatorAjaxCount","string"],["cache","boolean"]]});if(!t)return!1;if(!(t=this.checkTypes({obj:this.prop.selectors,name:this.name,console:this.prop.console,vars:[["item","string"],["title","string"],["value","string"],["markers","string"]]})))return!1;if(this.prop.markers&&!this.checkTypes({obj:this.prop.selectors,name:this.name,console:this.prop.console,vars:[["markers","dom"]]}))return!1;return!0}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(!!this.setItems()&&(this.start(),this.set(),!0))}},{key:"setItems",value:function(){return!!this.addMarkers()&&(this.addItems(),this.addValues(),!0)}},{key:"addMarkers",value:function(){return this.prop.markers&&(this.markers=this.prop.v.document().querySelector(this.prop.selectors.markers),this.markers.classList.add(this.prefix+"__markers")),!0}},{key:"addItems",value:function(){for(var t=this.prop.v.document().querySelectorAll(this.prop.selectors.item),e=0;e<t.length;e++){var i=t[e].getAttribute(this.data.id),s=t[e].getAttribute(this.data.proceeded);if(null!==i&&null===s){this.items.push(t[e]),this.ids.push(i);var r=this.prop.v.document().querySelector(this.prop.selectors.title+"["+this.data.id+'="'+i+'"]');null!==r&&(this.titles[i]=r,this.titlesDefault[i]=r.innerHTML,r.classList.add(this.prefix+"__title")),t[e].classList.add(this.prefix+"__item"),t[e].setAttribute(this.data.proceeded,
1!0)}}return!0}},{key:"addValues",value:function(){for(var t=0;t<this.ids.length;t++)for(var e=this.prop.v.document().querySelectorAll(this.prop.selectors.value+"["+this.data.id+'="'+this.ids[t]+'"]'),i=0;i<e.length;i++)null!=e[i].getAttribute(this.data.value)&&null===e[i].getAttribute(this.data.proceeded)&&(e[i].classList.add(this.prefix+"__value"),e[i].setAttribute(this.data.proceeded,!0),e[i].setAttribute("data-"+this.prop.v.prefix()+"preloader-none",!0),this.valueEvent(e[i]),this.values.push(e[i]));return!0}},{key:"getItem",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=null,i=0;i<this.items.length;i++)this.items[i].getAttribute(this.data.id)==t&&(e=this.items[i]);return e}},{key:"getValues",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=[],i=0;i<this.values.length;i++)this.values[i].getAttribute(this.data.id)==t&&e.push(this.values[i]);return e}},{key:"getValueActive",value:function(t){return t.classList.contains(this.classes.valueActive)}},{key:"getValueDisabled",value:function(t){return t.classList.contains(this.classes.valueDisabled)}},{key:"valuesRemoveActive",value:function(t,e){for(var i=0;i<t.length;i++)t[i].getAttribute(this.data.value)!=e&&t[i].classList.remove(this.classes.valueActive);return!0}},{key:"valueToggleActive",value:function(t){return this.getValueActive(t)?t.classList.remove(this.classes.valueActive):t.classList.add(this.classes.valueActive),!0}},{key:"markersToggleActive",value:function(){return 0<this.markers.children.length?this.markers.classList.remove(this.prefix+"__markers_empty"):this.markers.classList.add(this.prefix+"__markers_empty"),!0}},{key:"valueEvent",value:function(t){return this.addEventListener({el:t,target:"click",do:this.valueClick.bind(this,t)}),!0}},{key:"valueClick",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(null!==e&&e.preventDefault(),!this.valueClickCheck(t))return!1;var i=t.getAttribute(this.data.id),s=t.getAttribute(this.data.value),r=this.getItem(i);if(null===r)return!1;var o=this.getValues(i);if(null!==r.getAttribute(this.data.count)&&this.valuesRemoveActive(o,s),this.valueToggleActive(t),null==r.getAttribute(this.data.count)&null!==t.getAttribute(this.data.all))if(t.classList.contains(this.classes.valueActive))for(var n=0;n<o.length;n++)o[n].classList.add(this.classes.valueActive);else for(var a=0;a<o.length;a++)o[a].classList.remove(this.classes.valueActive);return this.launchEventsByTarget("value",{element:t,id:i,active:this.getValueActive(t),disabled:this.getValueDisabled(t)}),this.prop.saveOnChange?this.save():(this.set(),this.count()),!0}},{key:"valueClickCheck",value:function(t){return!(this.loading&this.prop.updateCount)&&(!(this.getValueDisabled(t)&!this.getValueActive(t))&&!(this.getValueActive(t)&!this.prop.removeDisabledActive))}},{key:"setTitle",value:function(){for(var t=0;t<this.ids.length;t++)if(void 0!==this.titles[this.ids[t]]){for(var e="",i=this.ids[t],s=this.getValues(i),r=0;r<s.length;r++){if(this.getValueActive(s[r]))e+=", "+s[r].innerHTML}e=""===e?this.titlesDefault[this.ids[t]]:this.prop.updateTitle?e.substring(2):this.titlesDefault[this.ids[t]],this.titles[this.ids[t]].innerHTML=e,this.launchEventsByTarget("title",{element:this.titles[this.ids[t]],id:this.ids[t],title:e})}return!0}},{key:"setMarker",value:function(){if(!this.prop.markers)return!1;this.removeChildren(this.markers);for(var t=0;t<this.ids.length;t++){for(var e=this.getValues(this.ids[t]),i=0;i<e.length;i++)if(this.getValueActive(e[i])&null===e[i].getAttribute(this.data.all)){var s=e[i].innerHTML,r=this.createMarker(s,e[i]);this.markers.appendChild(r)}this.markersToggleActive()}return!0}},{key:"createMarker",value:function(t,e){var i=document.createElement("div");return i.classList.add(this.prefix+"__marker"),i.innerHTML='\n            <div class="'+this.prefix+'__marker-outer">\n                '+t+'\n            </div>\n            <div class="'+this.prefix+'__marker-close"></div>\n        ',this.addEventListener({el:i,target:"click",do:this.valueClick.bind(this,e)}),i}},{key:"set",value:function(){return this.setTitle(),this.setMarker(),!0}},{key:"start",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if(this.loading&this.prop.updateCount&t)return!1;for(var e=0;e<this.values.length;e++){var i=this.getParam({name:this.values[e].getAttribute(this.data.id)});null!==i&&(i=i.split(this.prop.separator)).includes(this.values[e].getAttribute(this.data.value))?this.values[e].classList.add(this.classes.valueActive):this.values[e].classList.remove(this.classes.valueActive)}return this.launchEventsByTarget("start"),t&&(this.set(),this.count()),!0}},{key:"reset",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return!(this.loading&this.prop.updateCount)&&(this.valuesRemoveActive(this.values,"dfghfdh"),this.launchEventsByTarget("reset"),t&&this.save(),!0)}},{key:"save",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if(this.loading&this.prop.updateCount)return!1;this.set();for(var e=0;e<this.ids.length;e++){for(var i=this.ids[e],s=[],r=this.getValues(i),o=0;o<r.length;o++)this.getValueActive(r[o])&&s.push(r[o].getAttribute(this.data.value));for(var n="",a=!0,h=0;h<s.length;h++)n+=this.prop.separator+s[h];if(0===n.length?(a=!1,null!==this.getParam({name:i})&&(a=!0)):n=n.substr(this.prop.separator.length),a&t)if(this.prop.setParamToNull){var l=this.setParam({name:i,value:n,push:!1});l=location.origin+l,this.setParam({name:this.prop.param,value:"",url:l})}else this.setParam({name:i,value:n})}return this.count(),this.launchEventsByTarget("save"),!0}},{key:"count",value:function(){if(!this.prop.updateCount)return!1;if(this.loading)return!1;this.loading=!0;for(var t=[],e=0;e<this.ids.length;e++){for(var i=this.ids[e],s=[],r=this.getValues(i),o=0;o<r.length;o++)this.getValueActive(r[o])&&s.push(r[o].getAttribute(this.data.value));for(var n="",a=0;a<s.length;a++)n+=this.prop.separator+s[a];0<n.length&&(n=n.substr(this.prop.separator.length)),t.push([i,n])}for(var h=0;h<this.ids.length;h++){for(var l=this.ids[h],c=[],p=0;p<t.length;p++)t[p][0]!=l&&c.push(t[p]);this.prop.v.ajax({method:"post",data:{get:l,values:JSON.stringify(c)},cache:this.prop.cache,callback:this.countCallback.bind(this,l),fail:this.count.bind(this)})}return!0}},{key:"countCallback",value:function(t,e){for(var i=e.split(this.prop.separatorAjax),s=this.getValues(t),r=0;r<s.length;r++)for(var o=0;o<i.length;o++){var n=i[o].split(this.prop.separatorAjaxCount);s[r].getAttribute(this.data.value)==n[0]&&(0<parseInt(n[1])?s[r].classList.remove(this.classes.valueDisabled):s[r].classList.add(this.classes.valueDisabled))}return this.countLoading++,this.countLoading>=this.ids.length&&(this.loading=!1,this.countLoading=0,this.launchEventsByTarget("count")),!0}},{key:"popstate",value:function(){return this.disabledTries=0,this.addEventListener({el:window,target:"popstate",do:this.popstateEvent.bind(this)}),!0}},{key:"popstateEvent",value:function(t){return this.prop.popstateEvent?(this.catchStopLoading(),!0):(this.prop.popstateEventReload&&location.reload(),!1)}},{key:"catchStopLoading",value:function(){if(this.save(!1))this.start(!1),this.disabledTries=0;else if(this.disabledTries++,this.disabledTries<=this.prop.disabledTries
1)return window.requestAnimationFrame(this.catchStopLoading.bind(this)),!1;return!0}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.loading=!1,this.countLoading=0,this.markers=null,this.items=[],this.ids=[],this.titles={},this.titlesDefault={},this.values=[],this.data={id:"data-"+this.prefix+"-id",value:"data-"+this.prefix+"-value",proceeded:"data-"+this.prefix+"-proceeded",count:"data-"+this.prefix+"-count",all:"data-"+this.prefix+"-all"},this.classes={valueActive:this.prefix+"__value_active",valueDisabled:this.prefix+"__value_disabled"},this.popstate(),!!this.setItems()&&(this.prop.start&&this.start(),Object.assign(e,{items:function(){return t.items},ids:function(){return t.ids},titles:function(){return t.titles},titlesDefault:function(){return t.titlesDefault},values:function(){return t.values},valueClick:this.valueClick.bind(this),start:this.start.bind(this),reset:this.reset.bind(this),save:this.save.bind(this),count:this.count.bind(this)})))}}]),s}(),g.prototype.Media=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"media",e.dataPrefix="data-"+e.prefix,e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,duration:500,delay:0,bezier:{on:!1,name:"linear"}}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["duration","integer"],["delay","integer"],["bezier","bezier"]]})&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),null===this.outer.getAttribute(this.data.proceeded))}},{key:"checkMedia",value:function(){if(null!==this.outer.getAttribute(this.data.iframe))this.type="iframe";else if(null!==this.outer.getAttribute(this.data.mp4)||null!==this.outer.getAttribute(this.data.ogv)||null!==this.outer.getAttribute(this.data.webm))this.type="video";else{if(null===this.outer.getAttribute(this.data.image))return!1;this.type="image"}return!0}},{key:"set",value:function(){if("iframe"===this.type){var t=document.createElement("iframe");t.setAttribute("src",this.outer.getAttribute(this.data.iframe)),this.outer.appendChild(t),this.elements.iframe=t}if("video"===this.type){var e=document.createElement("video");if(e.setAttribute("controls",!0),null!==this.outer.getAttribute(this.data.mp4)){var i=document.createElement("source");i.setAttribute("src",this.outer.getAttribute(this.data.mp4)),i.setAttribute("type",'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),e.appendChild(i)}if(null!==this.outer.getAttribute(this.data.ogv)){var s=document.createElement("source");s.setAttribute("src",this.outer.getAttribute(this.data.ogv)),s.setAttribute("type",'video/ogg; codecs="theora, vorbis"'),e.appendChild(s)}if(null!==this.outer.getAttribute(this.data.webm)){var r=document.createElement("source");r.setAttribute("src",this.outer.getAttribute(this.data.webm)),r.setAttribute("type",'video/webm; codecs="vp8, vorbis"'),e.appendChild(r)}if(this.outer.appendChild(e),this.elements.video=e,null!==this.outer.getAttribute(this.data.image)){var o=document.createElement("div");o.classList.add(this.prefix+"__play"),o.innerHTML="<div></div>",this.outer.appendChild(o),this.elements.play=o}}if(("image"===this.type||"video"===this.type)&&null!==this.outer.getAttribute(this.data.image)){var n=document.createElement("div");n.classList.add("bg-image"),n.classList.add(this.prefix+"__image"),n.style.backgroundImage="url("+this.outer.getAttribute(this.data.image)+")",this.outer.appendChild(n),this.elements.image=n}if(null!==this.outer.getAttribute(this.data.link)){var a=document.createElement("a");a.classList.add(this.prefix+"__link"),a.setAttribute("href",this.outer.getAttribute(this.data.link)),this.outer.appendChild(a),this.elements.link=a,null!==this.outer.getAttribute(this.data.linkNonePreloader)&&a.setAttribute("data-"+this.prop.v.prefix()+"preloader-none",!0),null!==this.outer.getAttribute(this.data.linkAjaxPage)&&a.classList.add(this.prop.v.prefix()+"ajaxPage__link"),null!==this.outer.getAttribute(this.data.blank)&&a.setAttribute("target","_blank")}return"video"===this.type&&this.videoEvents(),this.elements.outer=this.outer,!0}},{key:"videoEvents",value:function(){return this.vars.opened=!1,this.addEventListener({el:this.elements.play,target:"click",do:this.videoToggle.bind(this)}),this.addEventListener({el:this.elements.image,target:"click",do:this.videoToggle.bind(this)}),!0}},{key:"videoToggle",value:function(){if(this.animating)return!1;if(this.animating=!0,this.vars.opened){this.elements.video.pause(),this.elements.image.classList.remove(this.prefix+"__hidden"),this.elements.play.classList.remove(this.prefix+"__hidden");var t=new this.prop.v.Animate({console:this.prop.console,bezier:this.prop.bezier,delay:this.prop.delay+this.prop.v.timeMin(),duration:this.prop.duration,do:function(t,e){var i=this;this.elements.image.style.opacity=e,this.elements.play.style.opacity=e,1===t&&setTimeout(function(){i.elements.video.currentTime=0,i.animating=!1},this.prop.v.timeMin())}.bind(this)});(t=t.init()).run(),this.vars.opened=!1}else{var e=new this.prop.v.Animate({console:this.prop.console,bezier:this.prop.bezier,delay:this.prop.delay,duration:this.prop.duration,do:function(t,e){var i=this;this.elements.image.style.opacity=1-e,this.elements.play.style.opacity=1-e,1===t&&setTimeout(function(){i.elements.image.classList.add(i.prefix+"__hidden"),i.elements.play.classList.add(i.prefix+"__hidden"),i.elements.video.play(),i.animating=!1},this.prop.v.timeMin())}.bind(this)});(e=e.init()).run(),this.vars.opened=!0}return!0}},{key:"init",value:function(){var t=this;
1if(this.type="",this.animating=!1,this.data={proceeded:this.dataPrefix+"-proceeded",link:this.dataPrefix+"-link",linkNonePreloader:this.dataPrefix+"-link-nonePreloader",linkAjaxPage:this.dataPrefix+"-link-ajaxPage",iframe:this.dataPrefix+"-iframe",mp4:this.dataPrefix+"-mp4",ogv:this.dataPrefix+"-ogv",webm:this.dataPrefix+"-webm",image:this.dataPrefix+"-image",blank:this.dataPrefix+"-blank"},this.types=["video","iframe","image"],!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this))return!1;if(this.elements={},this.vars={},!this.checkMedia())return!1;this.set(),this.outer.classList.add(""+this.prefix),this.outer.classList.add(this.prefix+"_"+this.type),this.outer.setAttribute(this.data.proceeded,!0);var e={type:function(){return t.type},elements:function(){return t.elements},prop:function(){return t.prop},changeProp:this.changeProp.bind(this)};return"video"===this.type&&(e=Object.assign({videoToggle:this.videoToggle.bind(this),opened:function(){return t.vars.opened}},e)),e}}]),s}(),g.prototype.SameHeight=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"sameHeight",e.prop=Object.assign(e.prop,{selector:"."+e.prefix,resize:!0}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","string"],["resize","boolean"]]})&&(this.items=this.prop.v.document().querySelectorAll(this.prop.selector),!0)}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.update(),this.setEvents(),!0)}},{key:"setEvents",value:function(){return this.prop.resize?null==this.resizeID&&(this.resizeID=this.prop.v.viewport.add({target:"w",name:this.name+" Resize",do:this.set.bind(this),timeout:this.prop.v.timeMin()})):(this.prop.v.viewport.delete(this.resizeID),this.resizeID=null),!0}},{key:"update",value:function(){return this.items=this.prop.v.document().querySelectorAll(this.prop.selector),this.set(),!0}},{key:"clear",value:function(){for(var t=0;t<this.items.length;t++)this.items[t].style.height="";return!0}},{key:"set",value:function(){return this.clear(),setTimeout(function(){for(var t=0,e=0;e<this.items.length;e++){var i=this.items[e].clientHeight;t<i&&(t=i)}for(var s=0;s<this.items.length;s++)this.items[s].style.height=t+"px"}.bind(this),this.prop.v.timeMin()),!0}},{key:"init",value:function(){var t=this;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&(this.resizeID=null,this.setEvents(),this.set(),{clear:this.clear.bind(this),set:this.set.bind(this),update:this.update.bind(this),prop:function(){return t.prop},changeProp:this.changeProp.bind(this)})}}]),s}(),g.prototype.AjaxContent=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"ajaxContent",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorAjax:"#"+e.prefix,param:"page",updateUrl:!1,updateTitle:!0,updateContent:!0,pagination:{on:!1,left:3,right:3,changeContent:!0,timeout:0},disabledTries:1e3,popstateEvent:!0,popstateEventReload:!0,setPageToOne:!1,staticUrl:!1,cache:!1}),t)e.prop[i]=t[i];return e.targets=["load","last","empty","pagination"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorAjax","string"],["param","string"],["updateUrl","boolean"],["updateTitle","boolean"],["updateContent","boolean"],["pagination","object"],["disabledTries","integer"],["popstateEvent","boolean"],["popstateEventReload","boolean"],["setPageToOne","boolean"],["staticUrl","boolean"],["cache","boolean"]]});return!!t&&(!!(t=this.checkTypes({obj:this.prop.pagination,name:this.name,console:this.prop.console,vars:[["on","boolean"],["left","integer"],["right","integer"],["changeContent","boolean"],["timeout","integer"]]}))&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),!0))}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.reload(),this.showHidePagination(),!0)}},{key:"getRange",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(null===t)return!1;var s=void 0;return e&&(s=t.getAttribute(this.data.active),s=parseInt(s),v.checkType("integer",s)?s<1&&(s=1):s=1,this.active=s),i&&(s=t.getAttribute(this.data.max),s=parseInt(s),v.checkType("integer",s)?s<1&&(s=1):s=1,this.max=s),s=t.getAttribute(this.data.total),this.total=parseInt(s),!0}},{key:"checkEmpty",value:function(){return this.max===this.active&&this.launchEventsByTarget("empty"),!0}},{key:"set",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(e){if(t>this.max||this.loading)return!1}else if(this.active>=this.max||this.loading)return!1;if(null===t)t=this.active+1;else if(t=parseInt(t),!this.checkType("integer",t))return!1;var s=!1;return this.prop.updateUrl&i&&(s=!0),this.prop.staticUrl&&(s=!1),this.prop.staticUrl||(this.url=this.setParam({name:this.prop.param,value:t,push:s})),this.loading=!0,this.prop.v.ajax({url:this.prop.staticUrl?this.url:window.location.href,method:"get",data:{ajaxContent:1,page:t},cache:this.prop.cache,callback:this.html.bind(this,!1,t,e),fail:this.set.bind(this)}),!0}},{key:"reload",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(this.loading)return!1;if(e&!this.prop.staticUrl){var i=this.getParam({name:this.prop.param});i=null!==i?parseInt(i):1,this.url!=window.location.pathname+window.location.search&&(this.active=i)}if(this.prop.staticUrl)this.active=1;else{var s=!1;this.prop.updateUrl&t&&(s=!0),this.url=this.setParam({name:this.prop.param,value:this.active,push:s})}return this.loading=!0,this.prop.v.ajax({url:this.prop.staticUrl?this.url:window.location.href,method:"get",data:{ajaxContent:1,page:this.active},cache:this.prop.cache,callback:this.html.bind(this,!0,this.active,!1),fail:this.reload.bind(this)}),!0}},{key:"html",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.active,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement("div");if(r.innerHTML=s,this.prop.updateTitle){var o={current:document.querySelector("title"),new:r.querySelector("title")};null!==o.current&null!==o.new&&(o.current.innerHTML=o.new.innerHTML)}var n={current:this.outer,new:r.querySelector(this.prop.selectorAjax)};if(null===n.new)return!1;var a;return a=n.new.innerHTML,this.prop.updateContent&&(t?(this.removeChildren(n.current),n.current.innerHTML=a):i&&this.prop.pagination.changeContent?(this.removeChildren(n.current),n.current.innerHTML=a):n.current.innerHTML+=a),this.getRange(n.new,!1,!0),this.launchEventsByTarget("load",{pagination:i,reload:t,outer:this.outer,docHTML:s,html:a,total:this.total}),this.active=e,this.active>=this.max&&this.launchEventsByTarget("last",{outer:this.outer,docHTML:s,html:a}),this.createPaginationLinks(),this.setEventsPagination(),this.setActivePagination(),r=null,!(this.loading=!1)}},{key:"showHidePagination",value:function(){return this.prop.pagination.on?this.pagination.classList.remove("display_none"):this.pagination.classList.add("display_none"),!0}},{key:"createPagination",value:function(){return this.pagination=document.createElement("div"),this.pagination.classList.add(this.prefix+"__pagination"),null===this.outer.nextElementSibling?this.outer.parentElement.appendChild(this.pagination):this.outer.parentElement.insertBefore(this.pagination,this.outer.nextElementSibling),!0}},{key:"createPaginationLinks",value:function(){this.removeEventListeners(),this.removeChildren(this.pagination),this.popstate(),this.paginationElements=[],this.paginationLinks=[],this.paginationDots=[];for(var t=0;t<this.max;t++){var e=document.createElement("div");this.paginationElements.push(e),e.classList.add(this.prefix+"__page");var i=document.createElement("a");i.setAttribute("data-"+this.prop.v.prefix()+"preloader-none",!0),e.appendChild(i),this.paginationLinks.push(i);var s=this.setParam({name:this.prop.param,value:t+1,push:!1});i.href=s;var r=t+1;t<9&&(r="0"+r),i.innerHTML="<span>"+r+"</span>",this.pagination.appendChild(e)}1===this.max?this.pagination.classList.add("display_none_important"):this.pagination.classList.remove("display_none_important");for(var o=[0,this.max-1],n=this.active-1;n>=this.active-1-this.prop.pagination.left;n--)o.push(n);for(var a=this.active-1;a<=this.active-1+this.prop.pagination.left;a++)o.push(a);for(var h=0;h<this.paginationLinks.length;h++){for(var l=!1,c=0;c<o.length;c++)h===o[c]&&(l=!0);if(l)this.paginationDots.push(null);else{this.paginationLinks[h].parentElement.classList.add(this.prefix+"__page_dot"),this.paginationDots.push(this.paginationLinks[h].parentElement),this.paginationLinks[h].classList.add("display_none");var p=document.createElement("span");p.innerHTML="...",this.paginationLinks[h].parentElement.appendChild(p)}}for(var u=0,d=0;u<this.active;u++)null!==this.paginationDots[u]&&(0<d&&this.paginationDots[u].classList.add("display_none"),d++);for(var v=this.active-1,g=0;v<this.max-1;v++)null!==this.paginationDots[v]&&(0<g&&this.paginationDots[v].classList.add("display_none"),g++);return!0}},{key:"setEventsPagination",value:function(){for(var t=0;t<this.paginationLinks.length;t++)this.addEventListener({el:this.paginationLinks[t],target:"click",do:this.clickEventPagination.bind(this,this.paginationLinks[t],t)});return!0}}
1,{key:"clickEventPagination",value:function(t,e,i){return i.preventDefault(),!t.parentElement.classList.contains(this.prefix+"__page_active")&&(e+=1,this.launchEventsByTarget("pagination",{outer:this.outer,num:e,link:t}),setTimeout(this.set.bind(this,e,!0),this.prop.pagination.timeout),!0)}},{key:"setActivePagination",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;t-=1;for(var e=0;e<this.paginationLinks.length;e++)e!==t?this.paginationLinks[e].parentElement.classList.remove(this.prefix+"__page_active"):this.paginationLinks[e].parentElement.classList.add(this.prefix+"__page_active");return!0}},{key:"popstate",value:function(){return this.disabledTries=0,this.addEventListener({el:window,target:"popstate",do:this.popstateEvent.bind(this)}),!0}},{key:"popstateEvent",value:function(t){return this.prop.popstateEvent?(this.catchStopLoading(),!0):(this.prop.popstateEventReload&&location.reload(),!1)}},{key:"catchStopLoading",value:function(){var t=this.url=this.getParam({name:this.prop.param});if(t=null!==t?parseInt(t):1,this.set(t,!0,!1))this.disabledTries=0;else if(this.disabledTries++,this.disabledTries<=this.prop.disabledTries
1)return window.requestAnimationFrame(this.catchStopLoading.bind(this)),!1;return!0}},{key:"init",value:function(){var t=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);if(!t)return!1;this.data={active:"data-"+this.prefix+"-active",max:"data-"+this.prefix+"-max",url:"data-"+this.prefix+"-url",total:"data-"+this.prefix+"-total"},this.active=1,this.max=1,this.total=0;var e=this.outer.getAttribute(""+this.data.url);if(null!=e&this.prop.staticUrl){var i=new URL(e);this.url=i.href}else this.url=window.location.href;return this.loading=!1,this.popstate(),this.getRange(this.outer),this.checkEmpty(),this.createPagination(),this.createPaginationLinks(),this.setEventsPagination(),this.setActivePagination(),this.showHidePagination(),Object.assign(t,{set:this.set.bind(this),reload:this.reload.bind(this)})}}]),s}(),g.prototype.Anchor=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"anchor",e.prop=Object.assign(e.prop,{selectorOuter:"#"+e.prefix+"__outer",selectorSection:"."+e.prefix+"__section",selectorAnchor:"."+e.prefix+"__anchor",duration:500,delay:0,edge:.5,edgeClick:.3}),t)e.prop[i]=t[i];return e.targets=["change","click"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selectorOuter","dom"],["selectorSection","dom"],["selectorAnchor","dom"],["duration","integer"],["delay","integer"],["edge","number"],["edgeClick","number"]]})}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.getElements(),this.setEvents(),!0)}},{key:"removeElements",value:function(){this.checkType("htmlElement",this.outer)&&this.outer.removeAttribute(this.data.proceeded);for(var t=0;t<this.anchors.length;t++)this.anchors[t].removeAttribute(this.data.proceeded);this.removeEventListeners()}},{key:"getElements",value:function(){this.removeElements(),this.outer=this.prop.v.doc().querySelector(this.prop.selectorOuter),this.sections=this.prop.v.doc().querySelectorAll(this.prop.selectorSection),this.anchors=this.prop.v.doc().querySelectorAll(this.prop.selectorAnchor),this.outer.classList.add(this.prefix+"__outer");for(var t=0;t<this.sections.length;t++)this.sections[t].classList.add(this.prefix+"__section");for(var e=0;e<this.anchors.length;e++)this.anchors[e].classList.add(this.prefix+"__anchor"),this.anchors[e].setAttribute("data-"+this.prop.v.prefix()+"preloader-none",!0);this.hrefs=[];for(var i=0;i<this.anchors.length;i++){var s=this.getHref(this.anchors[i]);s&&this.hrefs.push(s)}return!0}},{key:"setEvents",value:function(){if(null===this.outer.getAttribute(this.data.proceeded)||this.prevSelectorOuter!==this.prop.selectorOuter||this.prevSelectorSection!==this.prop.selectorSection||this.prevSelectorAnchor!==this.prop.selectorAnchor){var t=this.outer;this.outer!==window&&this.outer!==this.prop.v.document()&&this.outer!==this.prop.v.body()||(t=window),this.addEventListener({el:t,target:"scroll",do:this.seek.bind(this)}),this.outer.setAttribute(this.data.proceeded,!0),this.prevSelectorOuter=this.prop.selectorOuter,this.prevSelectorSection=this.prop.selectorSection,this.prevSelectorAnchor=this.prop.selectorAnchor}for(var e=0;e<this.anchors.length;e++){null===this.anchors[e].getAttribute(this.data.proceeded)&&(this.addEventListener({el:this.anchors[e],target:"click",do:this.anchorClick.bind(this,this.anchors[e])}),this.anchors[e].setAttribute(this.data.proceeded,!0))}return!0}},{key:"anchorClick",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;null!==e&&e.preventDefault();var i=this.getHref(t);if(!i)return!1;var s=this.getSection(i);return null!==s&&(this.launchEventsByTarget("click",{href:i,section:s,anch
1or:t}),this.scrollTo(s),!0)}},{key:"getHref",value:function(t){var e=t.getAttribute("href");return null!==e&&(0!==e.length&&(e=e.replace("#","")))}},{key:"getSection",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=null,i=0;i<this.sections.length;i++){this.sections[i].getAttribute("id")===t&&(e=this.sections[i])}return e}},{key:"getAnchor",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=null,i=0;i<this.anchors.length;i++){var s=this.anchors[i].getAttribute("href");(s=s.replace("#",""))===t&&(e=this.anchors[i])}return e}},{key:"scrollTo",value:function(t){var e=this.outer.scrollTop,i=this.outer.getBoundingClientRect().top,s=this.outer.clientHeight,r=t.getBoundingClientRect();this.outer!==window&&this.outer!==this.prop.v.document()&&this.outer!==this.prop.v.body()||(e=window.pageYOffset,s=this.prop.v.vh()[1],i=0);var o=e+r.top-i;o-=this.prop.edgeClick*s,o+=1;var n=this.outer;return this.outer!==window&&this.outer!==this.prop.v.document()&&this.outer!==this.prop.v.body()||(n="html, body"),$(n).stop().delay(this.prop.delay).animate({scrollTop:o},this.prop.duration),!0}},{key:"seek",value:function(){if(0===this.hrefs.length)return!1;var t="",e=this.outer.getBoundingClientRect(),i=this.outer.clientHeight,s=e.top;this.outer!==window&&this.outer!==this.prop.v.document()&&this.outer!==this.prop.v.body()||(i=this.prop.v.vh()[1],s=0);for(var r=0;r<this.hrefs.length;r++){var o=this.getSection(this.hrefs[r]);if(null!==o){var n=o.getBoundingClientRect(),a=s+i*this.prop.edge;n.top<=a&&(t=this.hrefs[r])}}return""===t&&(t=this.hrefs[0]),this.active!==t&&this.changeActive(t),!0}},{key:"changeActive",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=this.getAnchor(t);if(null===e)return!1;for(var i=0;i<this.anchors.length;i++)this.anchors[i]!=e?this.anchors[i].classList.remove(this.prefix+"__anchor_active"):this.anchors[i].classList.add(this.prefix+"__anchor_active");var s=this.active;return this.active=t,this.launchEventsByTarget("change",{prev:{href:s,section:this.getSection(s),anchor:this.getAnchor(s)},next:{href:this.active,section:this.getSection(this.active),anchor:this.getAnchor(this.active)}}),!0}},{key:"set",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=this.getSection(t);return null!==e&&(this.scrollTo(e),!0)}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.data={proceeded:"data-"+this.prefix+"-proceeded"},this.prevSelectorOuter="",this.prevSelectorSection="",this.prevSelectorAnchor="",this.active=null,this.anchors=[],this.getElements(),this.setEvents(),this.seek(),this.prop.v.addResize(["wh",this.seek.bind(this)]),Object.assign(e,{getActive:function(){return t.active},getHrefs:function(){return t.hrefs},getSections:function(){return t.sections},getAnchors:function(){return t.anchors},getOuter:function(){return t.outer},set:this.set.bind(this),seek:this.seek.bind(this)}))}}]),s}(),g.prototype.ScrollEvents=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"scrollEvents",e.prop=Object.assign(e.prop,{scrollSelector:"#"+e.prop.v.prefix()+"scrollbar",selector:"."+e.prefix,selectorInside:!0,init:!0,on:!0,resize:!0,nativeEvent:!0}),t)e.prop[i]=t[i];return e.targets=[],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["scrollSelector","dom"],["selector","dom"],["selectorInside","boolean"],["init","boolean"],["on","boolean"],["resize","boolean"]]})}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.firstLoad=!0,this.getElements(),this.setEvents(),this.setResizeEvents(),!0)}},{key:"removeElements",value:function(){this.checkType("htmlElement",this.outer)&&(this.outer[this.data.proceeded]=void 0),this.removeEventListeners()}},{key:"getElements",value:function(){this.removeElements(),this.outer=this.prop.v.doc().querySelector(this.prop.scrollSelector),this.prop.selectorInside?this.elements=this.outer.querySelectorAll(this.prop.selector):this.elements=this.prop.v.doc().querySelectorAll(this.prop.selector),this.outer.classList.add(this.prefix+"__outer");for(var t=0;t<this.elements.length;t++)this.elements[t].classList.add(""+this.prefix);return!0}},{key:"setResizeEvents",value:function(){null===this.resizeHeightId&this.prop.resize?this.resizeHeightId=this.prop.v.viewport.add({target:"wh",name:this.name+" Resize Height",do:this.setHeight.bind(this)}):null!==this.resizeHeightId&!this.prop.resize&&(this.prop.v.viewport.delete(this.resizeHeightId),this.resizeHeightId=null),null===this.resizeSeekId&this.prop.resize?this.resizeSeekId=this.prop.v.viewport.add({target:"wh",name:this.name+" Resize Seek",do:this.setHeight.bind(this)}):null!==this.resizeSeekId&!this.prop.resize&&(this.prop.v.viewport.delete(this.resizeSeekId),this.resizeSeekId=null)}},{key:"setEvents",value:function(){for(var t=0;t<this.elements.length;t++){void 0===this.elements[t][this.data.proceeded]&&(this.elements[t][this.data.proceeded]=!0)}return this.setScrollEvent(),!0}},{key:"setScrollEvent",value:function(){if(!this.firstLoad)return!1;if(void 0===this.outer[this.data.proceeded]||this.prevSelector!==this.prop.selector){var t=this.outer;this.outer!==window&&this.outer!==this.prop.v.document()&&this.outer!==this.prop.v.body()||(t=window),this.prop.nativeEvent&&this.addEventListener({el:t,target:"scroll",do:this.seek.bind(this,null)}),this.outer[this.data.proceeded]=!0,this.prevSelector=this.prop.selector}return this.prop.init&&(this.seek(),this.firstLoad=!1),!0}},{key:"setHeight",value:function(){return this.height=this.outer.clientHeight,this.outer!==window&&this.outer!==this.prop.v.document()&&this.outer!==this.prop.v.body()||(this.height=this.prop.v.vh()[1]),this.setScrollTop(),this.bounding=this.outer.getBoundingClientRect(),!0}},{key:"setScrollTop",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return this.outer===window||this.outer===this.prop.v.document()||this.outer===this.prop.v.body()?this.scrollTop=window.pageYOffset:this.scrollTop=null!=t?t:this.outer.scrollTop,!0}},{key:"seek",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return!!this.prop.on&&(this.setScrollTop(t),!0)}},{key:"init",value:function(){var t=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!t&&(this.data={proceeded:"data-"+this.prefix+"-proceeded"},this.prevSelector="",this.firstLoad=!0,this.height=0,this.scrollTop=0,this.resizeSeekId=null,this.resizeHeightId=null,this.getElements(),this.setHeight(),this.setEvents(),this.setResizeEvents(),t)}}]),s}(),g.prototype.View=function(t){function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,a);var e=h(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t));for(var i in e.prefix=e.prop.v.prefix()+"view",e.prop=Object.assign(e.prop,{selector:"."+e.prefix,percent:.3,load:!0,loadTimeout:1e3}),t)e.prop[i]=t[i];return e.targets=["in"],e}return l(a,g.prototype.ScrollEvents),o(a,[{key:"check",value:function(){return!!p(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"check",this).call(this)&&!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["percent","number"],["load","boolean"],["loadTimeout","integer"]]})}},{key:"changeProp",value:function(t){return!!p(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"changeProp",this).call(this,t)&&(this.setHeight(),!0)}},{key:"setEvents",value:function(){for(var t=0;t<this.elements.length;t++){void 0===this.elements[t][this.data.proceeded]&&(this.elements[t].in=!1,this.elements[t].out=!1,this.elements[t][this.data.proceeded]=!0)}return this.prop.load&!this.prop.v.loaded()?v.addLoad(function(){setTimeout(this.setScrollEvent.bind(this),this.prop.loadTimeout)}.bind(this)):this.setScrollEvent(),!0}},{key:"setHeight",value:function(){return!!p(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"setHeight",this).call(this)&&(this.percent=this.prop.percent*this.height,!0)}},{key:"seek",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(!p(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"seek",this).call(this,t))return!1;var e=this.percent;this.firstLoad&&(e=this.height);for(var i=0;i<this.elements.length;i++)if(!this.elements[i].in){var s=this.elements[i].getBoundingClientRect(),r=s.top-this.bounding.top,o=s.bottom-this.bounding.bottom;s.left,this.bounding.left,s.right,this.bounding.right;if((r<e&!this.elements[i].out||e<o&this.elements[i].out)&&r>-1*this.elements[i].clientHeight){var n=null;this.firstLoad&&(n=this.elements[i].getAttribute(this.data.firstStackDelay))&&(n=parseInt(n)),null!=n&this.firstLoad&&this.elements[i].classList.add(this.prefix+"_"+n),this.launchEventsByTarget("in",{in:!0,element:this.elements[i]}),this.elements[i].in=!0,this.elements[i].out=!1}}return this.firstLoad&&(this.firstLoad=!1),!0}},{key:"init",value:function(){var t=this;this.percent=0,this.add({target:"in",do:function(t){t.element.classList.add(this.prefix+"ed"),this.checkType("function",t.element[this.data.callback])&&t.element[this.data.callback]()}.bind(this)});var e=p(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"init",this).call(this);return!!e&&(this.data=Object.assign(this.data,{callback:this.prefix+"-callback",firstStackDelay:"data-"+this.prefix+"-firstStackDelay"}),Object.assign(e,{getElements:function(){return t.elements},getOuter:function(){return t.outer},seek:this.seek.bind(this)}))}}]),a}(),g.prototype.Parallax=function(t){function c(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,c);var e=h(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,t));for(var i in e.prefix=e.prop.v.prefix()+"parallax",e.prop=Object.assign(e.prop,{selector:"."+e.prefix,k:.2}),t)e.prop[i]=t[i];return e}return l(c,g.prototype.ScrollEvents),o(c,[{key:"check",value:function(){return!!p(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"check",this).call(this)&&!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["k","number"]]})}},{key:"setEvents",value:function(){this.data=Object.assign(this.data,{translateY:"data-"+this.prefix+"-translateY",k:"data-"+this.prefix+"-k"});for(var t=0;t<this.elements.length;t++){void 0===this.elements[t][this.data.proceeded]&&(this.elements[t][this.data.proceeded]=!0,void 0===this.elements[t][this.data.translateY]&&(this.elements[t][this.data.translateY]=0))}return this.setScrollEvent(),!0}},{key:"seek",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(!p(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"seek",this).call(this,t))return!1;t=null!=t?t:this.scrollTop;for(var e=0;e<this.elements.length;e++){var i=this.elements[e].getBoundingClientRect(),s=this.elements[e].clientHeight,r=i.top-this.elements[e][this.data.translateY]+s/2,o=-s/2,n=this.height+s/2,a=this.elements[e].getAttribute(this.data.k
1),h=1-this.depthPercent({scope:[o,n],t:r});if(0<=h&h<=1){var l=(a=null==a?this.prop.k:parseFloat(a))*s*h;this.elements[e].style.transform="translate3d(0, "+l+"px, 0)",this.elements[e][this.data.translateY]=l}}return!0}},{key:"init",value:function(){var t=this,e=p(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"init",this).call(this);return!!e&&Object.assign(e,{getElements:function(){return t.elements},getOuter:function(){return t.outer},seek:this.seek.bind(this)})}}]),c}(),g.prototype.SmoothScroll=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"smoothScroll",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorElements:"."+e.prefix+"__element",run:!0,autoResize:!0,allowScroll:!0,useScroll:!1,useTransform:!0,horizontal:!1,k:{value:.1,reduce:!0,reduceK:.005,ignoreK:.1},drag:{on:!1,k:.1,multiply:1,reset:!0,listenersOff:!0,listenersTimeout:10,min:1},ignoreDrag:!1,stopPropagation:!0,renderByPixels:!1}),t)e.prop[i]=t[i];return e.scrollTargets=[],e.targets=["update"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorElements","dom"],["run","boolean"],["autoResize","boolean"],["allowScroll","boolean"],["useScroll","boolean"],["useTransform","boolean"],["horizontal","boolean"],["k","object"],["drag","object"],["ignoreDrag","boolean"],["stopPropagation","boolean"],["renderByPixels","boolean"]]});return!!t&&(!!(t=this.checkTypes({obj:this.prop.k,name:this.name,console:this.prop.console,vars:[["value","number"],["reduce","boolean"],["reduceK","number"],["ignoreK","number"]]}))&&!!(t=this.checkTypes({obj:this.prop.drag,name:this.name,console:this.prop.console,vars:[["on","boolean"],["k","number"],["multiply","number"],["reset","boolean"],["listenersOff","boolean"],["listenersTimeout","integer"],["min","number"]]})))}},{key:"changeProp",value:function(t){var e=this.prop.run;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.getElements(),this.createElements(),this.prop.run!==e&&this.run(),!0)}},{key:"getElements",value:function(){return this.outer=this.prop.v.doc().querySelector(this.prop.selector),this.outer.classList.add(""+this.prefix),this.prop.useScroll?this.outer.classList.add(this.prefix+"_scroll"):this.outer.classList.remove(this.prefix+"_scroll"),this.elements=document.querySelectorAll(this.prop.selectorElements),this.elementsLength=this.elements.length,this.setItemsProperties(),!0}},{key:"createElements",value:function(){if(null===this.outer.getAttribute(this.data.proceeded)&this.prevSelector!==this.prop.selector){this.sub=document.createElement("div"),this.sub.classList.add(this.prefix+"__sub"),this.outer.appendChild(this.sub),this.container=document.createElement("div"),this.container.classList.add(this.prefix+"__container"),this.outer.appendChild(this.container);for(var t=0;t<this.outer.children.length;t++)this.outer.children[t]!==this.sub&this.outer.children[t]!==this.container&&this.container.appendChild(this.outer.children[t]);this.outer.setAttribute(this.data.proceeded,!0),this.prevSelector=this.prop.selector,this.removeEventListeners(),this.setEvents()}return this.setEventsDrag(),this.setSize(),!0}},{key:"setItemsProperties",value:function(){for(var t=0;t<this.elementsLength;t++){var e=void 0,i=this.elements[t].getAttribute(this.data.k);e=null!==i?parseFloat(i):this.getReducedK(t),this.checkType("number",e)||(e=this.getReducedK(t)),this.elements[t][this.properties.k]=e,this.elements[t][this.properties.x]=0,this.elements[t][this.properties.y]=0,this.elements[t][this.properties.current]=[0,0]}}},{key:"setEvents",value:function(){return this.setSize(),this.setResize(),this.addEventListener({el:this.outer,target:"scroll",do:this.updateScrollTargets.bind(this)}),this.addEventListener({el:this.outer,target:"wheel",do:this.wheel.bind(this)}),!0}},{key:"setSize",value:function(){return this.prop.useScroll?(this.container.style.width=this.outer.clientWidth+"px",this.container.style.height=this.outer.clientHeight+"px",this.height=this.container.scrollHeight,this.width=this.container.scrollWidth):(this.container.style.width="",this.container.style.height="",this.height=this.container.clientHeight,this.width=this.container.clientWidth),this.sub.style.width=this.width+"px",this.sub.style.height=this.height+"px",this.scrollForce=!0}},{key:"setResize",value:function(){return null==this.resizeId&&(this.resizeId=this.prop.v.viewport.add({target:"wh",name:this.name+" Resize",do:this.setSize.bind(this)})),!0}},{key:"resetResize",value:function(){return null!==this.resizeId&&(this.prop.v.viewport.delete(this.resizeId),this.resizeId=null),!0}},{key:"setEventsDrag",value:function(){null!=this.dragIds.start&&(this.prop.v.drag.delete(this.dragIds.start),this.dragIds.start=null),null!=this.dragIds.end&&(this.prop.v.drag.delete(this.dragIds.end),this.dragIds.end=null),null!=this.dragIds.move&&(this.prop.v.drag.delete(this.dragIds.move),this.dragIds.move=null),null!=this.swipeIds.start&&(this.prop.v.swipe.delete(this.swipeIds.start),this.swipeIds.start=null),null!=this.swipeIds.end&&(this.prop.v.swipe.delete(this.swipeIds.end),this.swipeIds.end=null),null!=this.swipeIds.move&&(this.prop.v.swipe.delete(this.swipeIds.move),this.swipeIds.move=null),this.prop.drag.on&&this.prop.run&&(this.dragIds.start=this.prop.v.drag.add({target:"start",outer:this.outer,do:this.dragStart.bind(this)}),this.dragIds.end=this.prop.v.drag.add({target:"end",outer:this.outer,do:this.dragEnd.bind(this)}),this.dragIds.move=this.prop.v.drag.add({target:"move",outer:this.outer,do:this.dragMove.bind(this)}),this.swipeIds.start=this.prop.v.swipe.add({target:"start",outer:this.outer,do:this.dragStart.bind(this)}),this.swipeIds.end=this.prop.v.swipe.add({target:"end",outer:this.outer,do:this.dragEnd.bind(this)}),this.swipeIds.move=this.prop.v.swipe.add({target:"move",outer:this.outer,do:this.dragMove.bind(this)}))}},{key:"dragStart",value:function(){this.prop.run&&(this.dragging=!0,this.dragTargets=[0,0])}},{key:"dragEnd",value:function(){var t=this;this.prop.run&&(this.dragging=!1,this.dragTargets=[0,0],this.prop.drag.listenersOff&&setTimeout(function(){t.dragging||t.outer.classList.remove(t.prefix+"_dragging")},this.prop.drag.listenersTimeout))}},{key:"dragMove",value:function(t,e){if(this.prop.run&this.dragging){if(this.prop.ignoreDrag)return;this.dragTargets[0]+=t.diff.x*this.prop.drag.multiply,this.dragTargets[1]+=t.diff.y*this.prop.drag.multiply,this.prop.drag.listenersOff&&(Math.abs(t.diff.x)>this.prop.drag.min||Math.abs(t.diff.y)>this.prop.drag.min)&&this.outer.classList.add(this.prefix+"_dragging")}}},{key:"r",value:function(t,e){return e=void 0!==e?Math.pow(10,e):1e3,Math.round(t*e)/e}},{key:"getReducedK",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.elementsLength;return this.prop.k.reduce?this.prop.k.value-this.prop.k.reduceK*t:this.prop.k.value}},{key:"run",value:function(){this.prop.run?(this.setResize(),requestAnimationFrame(this.loop.bind(this))):this.resetResize()}},{key:"updateScrollTargets",value:function(){this.scrollTargets=[this.outer.scrollLeft,this.outer.scrollTop],this.scrollValues=[this.outer.scrollLeft,this.outer.scrollTop]}},{key:"wheel",value:function(t){if(this.prop.run&this.prop.allowScroll){this.prop.stopPropagation&&(t.preventDefault(),t.stopPropagation());var e=this.normalizeWheel(t);return this.prop.horizontal?(this.outer.scrollLeft+=e.pixelY,this.outer.scrollTop+=e.pixelX):(this.outer.scrollLeft+=e.pixelX,this.outer.scrollTop+=e.pixelY),this.prop.renderByPixels&&(this.outer.scrollLeft=Math.round(this.outer.scrollLeft),this.outer.scrollTop=Math.round(this.outer.scrollTop)),!0}}}
1,{key:"loop",value:function(){if(this.prop.run){if(this.prop.autoResize){var t=this.container.clientHeight,e=this.container.clientWidth;this.prop.useScroll&&(t=this.container.scrollHeight,e=this.container.scrollWidth),t==this.height&&e==this.width||this.setSize()}this.dragRender();var i=!1;this.scrollForce&&(i=!0,this.scrollForce=!1);for(var s=0;s<this.elementsLength;s++){var r=[this.scrollTargets[0]-this.elements[s][this.properties.current][0],this.scrollTargets[1]-this.elements[s][this.properties.current][1]],o=this.elements[s][this.properties.k];i&&(o=1),this.elements[s][this.properties.current][0]+=r[0]*o,this.elements[s][this.properties.current][1]+=r[1]*o}this.render(),requestAnimationFrame(this.loop.bind(this))}}},{key:"dragRender",value:function(){this.prop.drag.on&&(this.dragValues[0]+=(this.dragTargets[0]-this.dragValues[0])*this.prop.drag.k,this.prop.drag.reset&&(this.dragTargets[0]=0),this.dragValues[1]+=(this.dragTargets[1]-this.dragValues[1])*this.prop.drag.k,this.prop.drag.reset&&(this.dragTargets[1]=0),this.outer.scrollLeft-=this.dragValues[0],this.outer.scrollTop-=this.dragValues[1])}},{key:"render",value:function(){for(var t={left:0,top:0},e=0;e<this.elementsLength;e++){var i=this.r(this.elements[e][this.properties.current][0]),s=this.r(this.elements[e][this.properties.current][1]),r=Math.ceil(i);Math.abs(r-i)<=this.prop.k.ignoreK&&(i=r);var o=Math.ceil(s);Math.abs(o-s)<=this.prop.k.ignoreK&&(s=o),this.elements[e][this.properties.x]=i,this.elements[e][this.properties.y]=s,t.left=i,t.top=s,this.prop.useScroll||(this.prop.useTransform?this.elements[e].style.transform="translate3d(-"+i+"px, -"+s+"px, 0)":(this.elements[e].style.left="-"+i+"px",this.elements[e].style.top="-"+s+"px"))}this.prop.useScroll&&(this.container.scrollLeft=t.left,this.container.scrollTop=t.top),this.launchEventsByTarget("update",{scrollValues:this.scrollValues,scrollTargets:[t.left,t.top]})}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.data={proceeded:"data-"+this.prefix+"-proceeded",k:"data-"+this.prefix+"-k"},this.properties={current:this.prefix+"-current",k:this.prefix+"-k",y:this.prefix+"-y",x:this.prefix+"-x"},this.scrollTargets=[0,0],this.scrollValues=[0,0],this.scrollForce=!1,this.prevSelector="",this.resizeId=null,this.dragIds={start:null,end:null,move:null},this.swipeIds={start:null,end:null,move:null},this.dragging=!1,this.dragTargets=[0,0],this.dragValues=[0,0],this.getElements(),this.createElements(),this.run(),Object.assign(e,{getOuter:function(){return t.outer},getElements:function(){return t.elements},setSize:this.setSize.bind(this),scrollValues:function(){return t.scrollValues},scrollTargets:function(){return t.scrollTargets}}))}}]),s}(),g.prototype.Select=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"select",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,showSelected:!0,changeSelectedText:!0,scroll:!0,duration:350,shift:.1,animation:"fade",search:!0,searchPlaceholder:"Type to search",closeOnOutClick:!0,closeOnChange:!0,changeOnClick:!0}),t)e.prop[i]=t[i];return e.targets=["show","hide","change","click"],e.animations={fade:{},slide:{},queue:{},queueSlide:{}},e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){if(!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["showSelected","boolean"],["changeSelectedText","boolean"],["scroll","boolean"],["duration","integer"],["shift","number"],["animation","string"],["search","boolean"],["searchPlaceholder","string"],["closeOnOutClick","boolean"],["closeOnChange","boolean"],["changeOnClick","boolean"]]}))return!1;var t=!1;for(var e in this.animations)e.toLowerCase()==this.prop.animation.toLowerCase()&&(t=!0);return!!t}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.prop.search?this.outer.classList.add(this.prefix+"_searchable"):this.outer.classList.remove(this.prefix+"_searchable"),this.searchInput.setAttribute("placeholder",this.prop.searchPlaceholder),this.prop.scroll?(this.outer.classList.add(this.prefix+"_scroll"),this.scrollbar.create()):(this.outer.classList.remove(this.prefix+"_scroll"),this.scrollbar.destroy()),!0)}},{key:"getElements",value:function(){return this.select=this.prop.v.document().querySelector(this.prop.selector),"SELECT"==this.select.tagName&&(this.select.classList.add("display_none"),this.options=this.select.querySelectorAll("option"),0!==this.options.length&&(this.parent=this.select.parentElement,this.parent.classList.contains(this.prop.v.prefix()+"form__input")&&this.parent.classList.add(this.prop.v.prefix()+"form__input_select"),!0))}},{key:"createElements",value:function(){this.outer=document.createElement("div"),this.outer.classList.add(""+this.prefix),this.parent.insertBefore(this.outer,this.select),this.prop.showSelected&&this.outer.classList.add(this.prefix+"_show-selected"),this.selected=document.createElement("div"),this.selected.classList.add(this.prefix+"__selected"),this.outer.appendChild(this.selected),this.outerUl=document.createElement("div"),this.outerUl.classList.add(this.prefix+"__outerUl"),this.outer.appendChild(this.outerUl),this.content=document.createElement("div"),this.content.classList.add(this.prefix+"__content"),this.outerUl.appendChild(this.content);var t=this.randInt(0,1e3);this.content.setAttribute("id",this.prefix+"__content_"+t),this.scrollbar=new this.prop.v.Scrollbar({console:this.prop.console,init:!1,selector:"#"+this.prefix+"__content_"+t}),this.scrollbar.init(),this.prop.scroll&&(this.outer.classList.add(this.prefix+"_scroll"),this.scrollbar.create()),this.searchOuter=document.createElement("div"),this.searchOuter.classList.add(this.prefix+"__search"),this.content.appendChild(this.searchOuter),this.searchInput=document.createElement("input"),this.searchInput.setAttribute("type","text"),this.searchInput.setAttribute("placeholder",this.prop.searchPlaceholder),this.searchInput.classList.add(this.prefix+"__search-input"),this.searchOuter.appendChild(this.searchInput),this.prop.search&&this.outer.classList.add(this.prefix+"_searchable"),this.ul=document.createElement("ul"),this.ul.classList.add(this.prefix+"__ul"),this.content.appendChild(this.ul);for(var e=0;e<this.options.length;e++){var i=this.options[e],s=i.innerHTML,r=document.createElement("li");r.classList.add(this.prefix+"__li"),r.innerHTML=s,null!==i.getAttribute("selected")&&(r.classList.add(this.prefix+"__li_active"),this.selected.innerHTML=s,this.active=e),this.li.push(r),this.ul.appendChild(r)}return 0<this.options.length&!this.prop.changeSelectedText&&(this.selected.innerHTML=this.options[0].innerHTML),!0}},{key:"setEvents",value:function(){this.selected.onclick=this.toggle.bind(this);for(var t=0;t<this.li.length;t++)this.li[t].onclick=this.change.bind(this,t);return this.addEventListener({el:window,target:"click",do:this.clickWindow.bind(this)}),this.addEventListener({el:this.select,target:"change",do:this.changeSelect.bind(this)}),this.addEventListener({el:this.searchInput,target:"keyup",do:this.searchEvent.bind(this)}),!0}},{key:"clickWindow",value:function(t){!this.childOf(t.target,this.outer)&this.opened&this.prop.closeOnOutClick&&this.hide()}},{key:"changeSelect",value:function(t){for(var e=this.select.value,i=0;i<this.options.length;i++)this.options[i].value==e&&this.change(i)}},{key:"show",value:function(){return!this.opened&&(this.opened=!0,this.outer.classList.add(this.prefix+"_opened"),this.animations[this.prop.animation].show(),this.launchEventsByTarget("show",this.callbackData()),!0)}},{key:"hide",value:function(){return!!this.opened&&(this.opened=!1,this.outer.classList.remove(this.prefix+"_opened"),this.animations[this.prop.animation].hide(),this.launchEventsByTarget("hide",this.callbackData()),!0)}},{key:"showCallback",value:function(){return this.searchInput.value="",this.searchEvent(),!0}},{key:"getAnimationElements",value:function(){for(var t=[],e=0;e<this.li.length;e++)e===this.active?this.prop.showSelected&&t.push(this.li[e]):t.push(this.li[e]);return this.prop.search&&(t=[this.searchOuter].concat(t)),t}},{key:"setAnimations",value:function(){return this.animations.fade.show=function(){$(this.outerUl).stop().fadeIn(this.prop.duration,this.showCallback.bind(this))}.bind(this),this.animations.fade.hide=function(){$(this.outerUl).stop().fadeOut(this.prop.duration)}.bind(this),this.animations.slide.show=function(){$(this.outerUl).stop().slideDown(this.prop.duration,this.showCallback.bind(this))}.bind(this),this.animations.slide.hide=function(){$(this.outerUl).stop().slideUp(this.prop.duration)}.bind(this),this.animations.queue.show=function(){for(var i=this.getAnimationElements(),t=0;t<i.length;t++)$(i[t]).stop().fadeOut(0);$(this.outerUl).stop().delay(this.prop.v.timeMin()).fadeIn(0,function(){for(var t=0;t<i.length;t++){var e=parseInt(this.prop.shift*t*this.prop.duration);$(i[t]).stop().delay(e).fadeIn(this.prop.duration)}}.bind(this))}.bind(this),this.animations.queue.hide=function(){for(var e=this.getAnimationElements(),t=e.length-1,i=0;0<=t;t--,i++){var s=parseInt(this.prop.shift*i*this.prop.duration);0!==t?$(e[t]).stop().delay(s).fadeOut(this.prop.duration):$(e[t]).stop().delay(s).fadeOut(this.prop.duration,function(){$(this.outerUl).stop().fadeOut(0,function(){for(var t=0;t<e.length;t++)e[t].style.opacity="",e[t].style.display=""}.bind(this))}.bind(this))}}.bind(this),this.animations.queueSlide.show=function(){for(var s=this.getAnimationElements(),t=0;t<s.length;t++)$(s[t]).stop().fadeOut(0);$(this.outerUl).stop().delay(this.prop.v.timeMin()).fadeIn(0,function(){for(var t=0;t<s.length;t++)$(s[t]).css("display","block"),$(s[t]).stop().animate({opacity:0,top:"-12px"},0);for(var e=s.length-1;0<=e;e--){var i=parseInt(0*this.prop.shift*this.prop.duration);$(s[e]).delay(i).animate({opacity:1,top:"0px"},this.prop.duration)}}.bind(this))}.bind(this),this.animations.queueSlide.hide=function(){for(var e=this.getAnimationElements(),t=0;t<e.length;t++){var i=parseInt(this.prop.shift*t*this.prop.duration);t!==e.length-1?$(e[t]).delay(i).animate({opacity:0,top:"-12px"},this.prop.duration):$(e[t]).delay(i).animate({opacity:0,top:"-12px"},this.prop.duration,function(){$(this.outerUl).stop().fadeOut(0,function(){for(var t=0;t<e.length;t++)e[t].style.opacity="",e[t].style.display=""}.bind(this))}.bind(this))}}.bind(this),!0}},{key:"toggle",value:function(){return this.opened?this.hide():this.show(),!0}},{key:"callbackData",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e={opened:this.opened,active:this.active,value:this.value,changes:this.changes,options:this.options,select:this.select,outer:this.outer};return null!==t&&(e=Object.assign(e,{clickNum:t,clickValue:this.options[t].value,clickLi:this.li[t]})),e}},{key:"searchEvent",value:function(){if(!0!==this.prop.search)return!1;var t=this.searchInput.value;if(0===t.length)for(var e=0;e<this.li.length;e++)this.li[e].classList.remove("display_none_important");else for(var i=0;i<this.li.length;i++){this.li[i].innerHTML.toUpperCase().includes(t.toUpperCase())?this.li[i].classList.remove("display_none_important"):this.li[i].classList.add("display_none_important")}return!0}},{key:"change",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.active;if((t=parseInt(t))>this.li.length||t<0)return!1;if(this.prop.changeOnClick||-1===this.changes){for(var e=0;e<this.options.length;e++)this.options[e].removeAttribute("selected");for(var i=0;i<this.li.length;i++)this.li[i].classList.remove(this.prefix+"__li_active");this.active=t,this.options[this.active].setAttribute("selected",!0),this.li[this.active].classList.add(this.prefix+"__li_active"),this.value=this.options[this.active].value,this.prop.changeSelectedText&&(this.selected.innerHTML="<span>"+this.options[this.active].innerHTML+"</span>"),this.changes++,this.launchEventsByTarget("change",this.callbackData()),this.opened&this.prop.closeOnChange&&this.hide()}return this.launchEventsByTarget("click",this.callbackData(t)),!0}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(!!this.getElements()&&(this.opened=!1,this.active=0,this.value="",this.changes=-1,this.li=[],this.createElements(),this.setAnimations(),this.setEvents(),this.change(this.active),Object.assign(e,{opened:function(){return t.opened},active:function(){return t.active},value:function(){return t.value},changes:function(){return t.changes},options:function(){return t.options},li:function(){return t.li},toggle:this.toggle.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),change:this.change.bind(this)})))}}]),s}(),g.prototype.Audio=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"audio",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,forceLoad:!0,waitLoad:!0,draggable:!0,resetOnEnd:!0,undefined:"Undefined"}),t)e.prop[i]=t[i];return e.targets=["load","play","playToggle","pause","pauseToggle","timeupdate","end","dragStart","drag","dragEnd"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["forceLoad","boolean"],["waitLoad","boolean"],["draggable","boolean"],["resetOnEnd","boolean"],["undefined","string"]]})&&(this.setDraggable(),!0)}},{key:"getElements",value:function(){return this.audio=this.prop.v.document().querySelector(this.prop.selector),this.audio.classList.add("display_none"),this.parent=this.audio.parentNode,!0}},{key:"setValues",value:function(){this.audio.volume=1}},{key:"createElements",value:function(){this.outer=document.createElement("div"),this.outer.classList.add(this.prefix+"__el"),this.outer.classList.add(this.prefix+"_notloaded"),this.wrapper=document.createElement("div"),this.wrapper.classList.add(this.prefix+"__wrapper"),this.outer.appendChild(this.wrapper),this.container=document.createElement("div"),this.container.classList.add(this.prefix+"__container"),this.wrapper.appendChild(this.container),this.button=document.createElement("div"),this.button.classList.add(this.prefix+"__button"),this.container.appendChild(this.button),this.buttonPlay=document.createElement("div"),this.buttonPlay.classList.add(this.prefix+"__play"),this.button.appendChild(this.buttonPlay),this.buttonPause=document.createElement("div"),this.buttonPause.classList.add(this.prefix+"__pause"),this.button.appendChild(this.buttonPause),this.nameDom=document.createElement("div"),this.nameDom.classList.add(this.prefix+"__name"),this.container.appendChild(this.nameDom);var t=this.audio.getAttribute(this.data.name);return this.nameDom.innerHTML=t||this.prop.undefined,this.bar=document.createElement("div"),this.bar.classList.add(this.prefix+"__bar"),this.wrapper.appendChild(this.bar),this.progress=document.createElement("div"),this.progress.classList.add(this.prefix+"__progress"),this.bar.appendChild(this.progress),this.dot=document.createElement("div"),this.dot.classList.add(this.prefix+"__dot"),this.progress.appendChild(this.dot),this.time=document.createElement("div"),this.time.classList.add(this.prefix+"__time"),this.container.appendChild(this.time),this.current=document.createElement("div"),this.current.classList.add(this.prefix+"__current"),this.current.innerHTML=this.formatTime(0),this.time.appendChild(this.current),this.separator=document.createElement("div"),this.separator.classList.add(this.prefix+"__separator"),this.time.appendChild(this.separator),this.total=document.createElement("div"),this.total.classList.add(this.prefix+"__total"),this.total.innerHTML=this.formatTime(0),this.time.appendChild(this.total),this.parent.insertBefore(this.outer,this.audio),!0}},{key:"setEvents",value:function(){var t=this;return this.prop.waitLoad&&this.audio.addEventListener("loadedmetadata",function(){t.loaded=!0,t.total.innerHTML=t.formatTime(t.audio.duration),t.outer.classList.remove(t.prefix+"_notloaded"),t.launchEventsByTarget("lo
1ad")}),this.prop.waitLoad||(this.loaded=!0,this.total.innerHTML=this.audio.getAttribute(this.data.duration),this.outer.classList.remove(this.prefix+"_notloaded")),this.prop.forceLoad&&this.audio.load(),this.button.addEventListener("click",this.toggle.bind(this)),this.audio.addEventListener("play",function(){t.toggleClass(),t.launchEventsByTarget("play")}),this.audio.addEventListener("pause",function(){t.toggleClass(),t.launchEventsByTarget("pause")}),this.audio.addEventListener("timeupdate",this.updateProgress.bind(this)),this.audio.addEventListener("ended",function(){t.prop.resetOnEnd&&(t.audio.currentTime=0),t.launchEventsByTarget("end")}),this.dragIds.push(this.prop.v.drag.add({target:"start",outer:this.bar,ignoreOuter:!1,do:this.dragStart.bind(this)},this.prop.draggable)),this.dragIds.push(this.prop.v.drag.add({target:"end",outer:this.bar,ignoreOuter:!0,do:this.dragEnd.bind(this)},this.prop.draggable)),this.dragIds.push(this.prop.v.drag.add({target:"move",outer:this.bar,ignoreOuter:!0,do:this.dragMove.bind(this)},this.prop.draggable)),this.swipeIds.push(this.prop.v.swipe.add({target:"start",outer:this.bar,ignoreOuter:!1,do:this.dragStart.bind(this)},this.prop.draggable)),this.swipeIds.push(this.prop.v.swipe.add({target:"end",outer:this.bar,ignoreOuter:!0,do:this.dragEnd.bind(this)},this.prop.draggable)),this.swipeIds.push(this.prop.v.swipe.add({target:"move",outer:this.bar,ignoreOuter:!0,do:this.dragMove.bind(this)},this.prop.draggable)),!0}},{key:"toggle",value:function(){this.audio.paused?(this.audio.play(),this.launchEventsByTarget("playToggle")):(this.audio.pause(),this.launchEventsByTarget("pauseToggle"))}},{key:"toggleClass",value:function(){this.audio.paused?this.outer.classList.remove(this.prefix+"_playing"):this.outer.classList.add(this.prefix+"_playing")}},{key:"updateProgress",value:function(){if(this.loaded){var t=this.audio.currentTime,e=t/this.audio.duration*100;this.dragging||(this.progress.style.width=e+"%"),this.current.innerHTML=this.formatTime(t),this.launchEventsByTarget("timeupdate",{currentTime:this.audio.currentTime,progress:e/100})}}},{key:"setDraggable",value:function(){for(var t=0;t<this.dragIds.length;t++)this.prop.v.drag.turn(this.dragIds[t],this.prop.draggable);for(var e=0;e<this.swipeIds.length;e++)this.prop.v.swipe.turn(this.swipeIds[e],this.prop.draggable)}},{key:"removeDragEvents",value:function(){for(var t=0;t<this.dragIds.length;t++)this.prop.v.drag.delete(this.dragIds[t]);for(var e=0;e<this.swipeIds.length;e++)this.prop.v.swipe.delete(this.swipeIds[e])}},{key:"dragStart",value:function(t,e){this.dragging=!0,this.launchEventsByTarget("dragStart",{data:t}),this.dragMove(t,e),this.outer.classList.add(this.prefix+"_dragging")}},{key:"dragEnd",value:function(t,e){this.dragging&&(this.dragging=!1,this.launchEventsByTarget("dragEnd",{data:t}),this.audio.currentTime=this.dragCurrent,this.outer.classList.remove(this.prefix+"_dragging"))}},{key:"dragMove",value:function(t,e){if(this.dragging&this.loaded){var i=t.inner.x;i<0&&(i=0),i>this.bar.clientWidth&&(i=this.bar.clientWidth);var s=i/this.bar.clientWidth,r=s*this.audio.duration;this.dragCurrent=r;var o=this.dragCurrent/this.audio.duration*100;this.progress.style.width=o+"%",this.launchEventsByTarget("drag",{currentTime:r,progress:s,x:i,data:t})}}},{key:"formatTime",value:function(t){var e=Math.floor(t/60),i=Math.floor(t%60);return e<10&&(e="0"+e),i<10&&(i="0"+i),e+":"+i}},{key:"init",value:function(){var t=this;this.data={name:"data-"+this.prefix+"-name",duration:"data-"+this.prefix+"-duration"},this.dragIds=[],this.swipeIds=[],this.loaded=!1,this.dragging=!1,this.dragCurrent=0;var e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(!!this.getElements()&&(this.setValues(),this.createElements(),this.setEvents(),Object.assign(e,{outer:function(){return t.outer},audio:function(){return t.audio},loaded:function(){return t.loaded},removeDragEvents:this.removeDragEvents.bind(this)})))}}]),s}(),g.prototype.Form=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"form",e.dataPrefix="data-"+e.prefix,e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,addErrorClass:!0,errorInfoDuration:250,scrollSelector:"#"+e.prop.v.prefix()+"scrollbar",scroll:!0,scrollDuration:500,clearAfterSuccess:!0,autocomplete:!1,spellcheck:!1,separator:"__",useIn
1puts:!0,focusExeptions:["","none"],disabled:!1}),t)e.prop[i]=t[i];return e.targets=["success","fail"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["addErrorClass","boolean"],["errorInfoDuration","integer"],["scroll","boolean"],["scrollDuration","integer"],["clearAfterSuccess","boolean"],["autocomplete","boolean"],["spellcheck","boolean"],["separator","string"],["useInputs","boolean"],["focusExeptions","stringArray"],["disabled","boolean"]]});return!!t&&(!(this.prop.scroll&&!(t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["scrollSelector","dom"]]})))&&(this.getElements(),this.setEvents(),!0))}},{key:"getElements",value:function(){this.form=this.prop.v.doc().querySelector(this.prop.selector),this.form.classList.add(""+this.prefix),this.scroll=this.prop.v.doc().querySelector(this.prop.scrollSelector),this.action=this.form.getAttribute("action"),null===this.action&&this.form.setAttribute("action",window.location.href),this.method=this.form.getAttribute("method"),null===this.method?this.method="post":(this.method=this.method.toLowerCase(),"post"!==this.method&"get"!==this.method&&(this.method="post")),this.form.setAttribute("method",this.method),this.submit=this.form.querySelector("input[type='submit']"),null===this.submit&&(this.submit=this.form.querySelector("button[type='submit']"),null===this.submit&&(this.submit=document.createElement("button"),this.form.appendChild(this.submit))),this.elements=this.form.querySelectorAll("input, select, textarea");for(var t=0;t<this.elements.length;t++)this.prop.autocomplete?this.elements[t].removeAttribute("autocomplete"):this.elements[t].setAttribute("autocomplete","off"),this.prop.spellcheck?this.elements[t].removeAttribute("spellcheck"):this.elements[t].setAttribute("spellcheck","false"),this.eventBlurClass(this.elements[t]);return this.submitDisabled(),!0}},{key:"getInputs",value:function(){return this.inputs=this.form.querySelectorAll("input:not([type='submit']):not([type='button']), textarea, select"),this.inputs}},{key:"getErrorsEl",value:function(){return this.errors=this.form.querySelectorAll("."+this.prefix+"__error"),this.errors}},{key:"getInfosEl",value:function(){return this.infos=this.form.querySelectorAll("."+this.prefix+"__info"),this.infos}},{key:"getJSON",value:function(){return this.json=$(this.form).serializeObject(),this.json}},{key:"setEvents",value:function(){if(null==this.form[this.data.proceeded]){this.addEventListener({el:this.form,target:"submit",do:this.eventSubmit.bind(this)});for(var t=0;t<this.elements.length;t++)this.addEventListener({el:this.elements[t],target:"focus",do:this.eventFocus.bind(this,this.elements[t])}),this.addEventListener({el:this.elements[t],target:"blur",do:this.eventBlur.bind(this,this.elements[t])}),this.addEventListener({el:this.elements[t],target:"keyup",do:this.eventKeyup.bind(this,this.elements[t])});this.form[this.data.proceeded]=!0}return!0}},{key:"eventSubmit",value:function(t){t.preventDefault(),this.formEvent(t)}},{key:"eventFocus",value:function(t,e){var i=t.parentElement;i.classList.contains(this.prefix+"__input")&&i.classList.add(this.prefix+"__input_focus")}},{key:"eventKeyup",value:function(t,e){this.submitDisabled()}},{key:"eventBlur",value:function(t,e){$(t).is(":focus")||this.eventBlurClass(t),this.submitDisabled()}},{key:"eventBlurClass",value:function(t){var e=t.parentElement;e.classList.contains(this.prefix+"__input")&&(this.checkFilledValue(t)?e.classList.add(this.prefix+"__input_focus"):e.classList.remove(this.prefix+"__input_focus"))}},{key:"submitDisabled",value:function(){this.prop.disabled&&(this.checkFilled()?this.submit.removeAttribute("disabled"):this.submit.setAttribute("disabled","disabled"))}},{key:"checkFilled",value:function(){for(var t=0,e=0;e<this.elements.length;e++)this.checkFilledValue(this.elements[e])&&t++;return t==this.elements.length}},{key:"checkFilledValue",value:function(t){var e=t.value;return!this.prop.focusExeptions.includes(e)}},{key:"formEvent",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;null!==t&&t.preventDefault(),this.submit.setAttribute("disabled","disabled"),this.getInputs(),this.getErrorsEl(),this.getInfosEl(),this.getJSON();var e={};return e=this.prop.useInputs?{inputs:this.json}:this.json,this.prop.v.ajax({url:this.action,method:this.method,data:e,callback:this.formEventCallback.bind(this),fail:this.formEvent.bind(this)}),!0}},{key:"formEventCallback",value:function(t){if(this.submit.removeAttribute("disabled"),this.removeErrors(),"error_smtp"===t)return alert(this.name+". SMTP Error!"),!1;if("error_inputs"===t)return alert(this.name+". Inputs Error!"),!1;if("error_form"===t)return alert(this.name+". Form Error!"),!1;var e=this.getErrors(t);if(0===e.length){this.clearInputs(),this.hideErrors(),this.launchEventsByTarget("success",{json:this.json,inputs:this.inputs,data:t,form:this.form});var i=this.form.getAttribute(this.data.redirect);null!==i&&(location.href=i)}else this.addErrors(e),this.toggleErrors(e),this.scrollToError(e),this.launchEventsByTarget("fail",{errors:e,json:this.json,inputs:this.inputs,data:t,form:this.form});return!0}},{key:"removeErrors",value:function(){for(var t=0;t<this.inputs.length;t++){var e=this.inputs[t].parentElement;this.inputs[t].classList.remove(this.prefix+"__input_error"),e.classList.contains(this.prefix+"__input_select")&&e.classList.remove(this.prefix+"__input_select-error"),e.classList.contains(this.prefix+"__input")&&e.classList.remove(this.prefix+"__input_error-i")}return!0}},{key:"hideErrors",value:function(){for(var t=0;t<this.errors.length;t++)$(this.errors[t]).stop().slideUp(this.prop.errorInfoDuration);for(var e=0;e<this.infos.length;
1e++)$(this.infos[e]).stop().slideDown(this.prop.errorInfoDuration);return!0}},{key:"getErrors",value:function(t){for(var e=t.split(this.prop.separator),i=[],s=[],r=0;r<e.length;r++)i.push(e[r]);for(var o=0;o<this.inputs.length;o++){var n=this.inputs[o].getAttribute("name");if(null!==n)for(var a=0;a<i.length;a++)n.toLowerCase()===i[a].toLowerCase()&&s.push({name:i[a],e:this.inputs[o]})}return s}},{key:"addErrors",value:function(t){if(!this.prop.addErrorClass)return!1;for(var e=0;e<t.length;e++){t[e].name;var i=t[e].e,s=i.parentElement;if(i.classList.add(this.prefix+"__input_error"),s.classList.contains(this.prefix+"__input")&&s.classList.add(this.prefix+"__input_error-i"),s.classList.contains(this.prefix+"__input_select")&&s.classList.add(this.prefix+"__input_select-error"),i.classList.contains(this.prop.v.prefix()+"checkbox_hidden")){var r=i.previousElementSibling;null!==r&&r.classList.add(this.prefix+"__input_checkbox-error")}}return!0}},{key:"toggleErrors",value:function(t){for(var e=0;e<this.errors.length;e++){for(var i=!1,s=this.errors[e].getAttribute(this.data.name),r=0;r<t.length;r++)t[r].name==s&&(i=!0);if(i){for(var o=!1,n=0;n<this.infos.length;n++){o=!1,this.infos[n].getAttribute(this.data.name)==s&&(o=!0),o&&$(this.infos[n]).stop().slideUp(this.prop.errorInfoDuration)}o?$(this.errors[e]).stop().delay(this.prop.errorInfoDuration).slideDown(this.prop.errorInfoDuration):$(this.errors[e]).stop().slideDown(this.prop.errorInfoDuration)}else{$(this.errors[e]).stop().slideUp(this.prop.errorInfoDuration);for(var a=0;a<this.infos.length;a++){var h=!1;this.infos[a].getAttribute(this.data.name)==s&&(h=!0),h&&$(this.infos[a]).stop().delay(this.prop.errorInfoDuration).slideDown(this.prop.errorInfoDuration)}}}return!0}},{key:"scrollToError",value:function(t){if(!this.prop.scroll)return!1;if(0===t.length)return!1;t[0].name;var e=t[0].e,i=e.parentElement,s=void 0;if(i.classList.contains(this.prefix+"__input_select"))s=$(i).offset().top;else if(e.classList.contains(this.prop.v.prefix()+"checkbox_hidden")){var r=e.previousElementSibling;null===r&&(r=e),s=$(r).offset().top}else s=$(e).offset().top;return(s<this.prop.v.vh()[1]/2||s>.75*this.prop.v.vh()[1])&&$(this.scroll).stop().animate({scrollTop:$(this.scroll).scrollTop()+s-this.prop.v.vh()[1]/2},this.prop.scrollDuration),!0}},{key:"clearInputs",value:function(){if(this.prop.clearAfterSuccess)for(var t=0;t<this.inputs.length;t++)"hidden"!==this.inputs[t].getAttribute("type")&"checkbox"!==this.inputs[t].getAttribute("type")&"radio"!==this.inputs[t].getAttribute("type")&"SELECT"!==this.inputs[t].tagName&&(this.inputs[t].value=""),this.eventBlur(this.inputs[t]);return!0}},{key:"init",value:function(){this.data={proceeded:this.dataPrefix+"-proceeded",redirect:this.dataPrefix+"-redirect",name:this.dataPrefix+"-name"};var t=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!t&&(this.inputs=[],this.errors=[],this.infos=[],this.json={},Object.assign(t,{formEvent:this.formEvent.bind(this),getInputs:this.getInputs.bind(this),getErrors:this.getErrorsEl.bind(this),getInfos:this.getInfosEl.bind(this),getJSON:this.getJSON.bind(this),removeErrors:this.removeErrors.bind(this),clearInputs:this.clearInputs.bind(this)}))}}]),s}(),g.prototype.Popup=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"popup",e.prop=Object.assign(e.prop,{animation:500}),t)e.prop[i]=t[i];return e.targets=["show","shown","hide","hidden"],e.types=["standard","modal","media","text","auto"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["animation","integer"]]})}},{key:"create",value:function(){return!this.created&&(this.id=this.prefix+"_"+this.randInt(0,9999),this.outer=document.createElement("div"),this.outer.setAttribute("id",this.id),this.outer.classList.add(""+this.prefix),this.outer.classList.add(this.id),this.outer.classList.add("display_none"),this.overlay=document.createElement("div"),this.overlay.classList.add(this.prefix+"__overlay"),this.outer.appendChild(this.overlay),this.container=document.createElement("div"),this.container.classList.add(this.prefix+"__container"),this.outer.appendChild(this.container),this.content=document.createElement("div"),this.content.classList.add(this.prefix+"__content"),this.container.appendChild(this.content),this.levelsEl[0]=document.createElement("div"),this.levelsEl[0].classList.add(this.prefix+"__level"),this.levelsEl[0].classList.add(this.prefix+"__level_0"),this.content.appendChild(this.levelsEl[0]),this.levelsEl[1]=document.createElement("div"),this.levelsEl[1].classList.add(this.prefix+"__level"),this.levelsEl[1].classList.add(this.prefix+"__level_1"),this.content.appendChild(this.levelsEl[1]),this.close=document.createElement("div"),this.close.classList.add(this.prefix+"__close"),this.container.appendChild(this.close),this.prop.v.body().appendChild(this.outer),this.setEvents(),this.created=!0)}},{key:"setEvents",value:function(){return this.addEventListener({el:this.overlay,target:"click",do:this.hide.bind(this)}),this.addEventListener({el:this.close,target:"click",do:this.hide.bind(this)}),!0}},{key:"closeButtonsEvents",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=this.levelsEl[t].querySelectorAll("."+this.prefix+"__close-button"),i=0;i<e.length;i++)this.addEventListener({el:e[i],target:"click",do:this.clickCloseButton.bind(this)});return!0}},{key:"clickCloseButton",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;null!==t&&t.preventDefault(),this.hide()}},{key:"afterCloseEvent",value:function(){return this.addEventListener({el:this.levelsEl[0].querySelector("."+this.prefix+"__after-close"),target:"click",do:this.clickAfterClose.bind(this)}),!0}},{key:"clickAfterClose",value:function(){return this.levels[1]&&this.hide(),!0}},{key:"stopVideo",value:function(){for(var t=this.outer.querySelectorAll("video"),e=0;e<t.length;e++)t[e].pause();return!0}},{key:"getLevel",value:function(){for(var t=!1,e=0;e<this.levels.length;e++)this.levels[e]&&(t=e);return t}},{key:"getNextLevel",value:function(){var t=this.getLevel();return t=!1===t?0:1}},{key:"checkData",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e={selector:"."+this.prefix+"__html",types:["standard"]};for(var i in t)e[i]=t[i];if(!this.checkTypes({obj:e,name:this.name,console:this.prop.console,vars:[["selector","dom"],["types","stringArray",{count:1}]]}))return!1;for(var s=!1,r=0;r<e.types.length;r++)for(var o=0;o<this.types.length;o++)e.types[r]===this.types[o]&&(s=!0);s||e.types.push(this.types[0]);for(var n=0;n<e.types.length;n++)if(0===e.types[n].length)return!1;return e}},{key:"show",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this.created||this.create(),!(t=this.checkData(t)))return!1;var e=this.getNextLevel();if(this.levels[e])return!1;var i=this.prop.v.document().querySelector(t.selector);return this["showLevel_"+e](i,t.types),this.launchEventsByTarget("show",{outer:this.outer,level:e,types:t.types}),!0}},{key:"showLevel_0",value:function(t,e){this.levels[0]=!0,this.levels[1]=!1,this.activeTypes=e,this.shown=!0,this.levelsEl[0].innerHTML=t.innerHTML,this.levelsEl[0].innerHTML+='<div class="'+this.prefix+'__after-close"></div>',this.outer.classList.remove("display_none"),this.outer.classList.add("display_flex"),this.prop.v.document().classList.add(this.prefix+"_shown");for(var i=0;i<e.length;i++)this.outer.classList.add(this.prefix+"_"+e[i]);return setTimeout(function(){this.outer.classList.add(this.prefix+"_level_0"),this.outer.classList.remove(this.prefix+"_level_1"),this.prop.v.document().classList.add(this.prefix+"_shown_level_0"),this.prop.v.document().classList.remove(this.prefix+"_shown_level_1")}.bind(this),this.prop.v.timeMin()),this.afterCloseEvent(),this.closeButtonsEvents(0),setTimeout(function(){this.launchEventsByTarget("shown",{outer:this.outer,level:0,types:this.activeTypes})}.bind(this),this.prop.v.timeMin()+this.prop.animation),!0}},{key:"showLevel_1",value:function(t,e){return this.levels[0]=!0,this.levels[1]=!0,this.levelsEl[1].innerHTML=t.innerHTML,setTimeout(function(){this.outer.classList.add(this.prefix+"_level_1"),this.prop.v.document().classList.add(this.prefix+"_shown_level_1")}.bind(this),v.timeMin),this.afterCloseEvent(),this.closeButtonsEvents(1),setTimeout(function(){this.launchEventsByTarget("shown",{outer:this.outer,level:1,types:this.activeTypes})}.bind(this),this.prop.v.timeMin()+this.prop.animation),!0}},{key:"hide",value:function(){return!!this.show&&(this.stopVideo(),this.launchEventsByTarget("hide",{outer:this.outer,level:this.getLevel(),types:this.activeTypes}),1===this.getLevel()?this.hideLevel_1():0!==this.getLevel()||this.hideLevel_0())}},{key:"hideLevel_0",value:function(){return this.levels[0]=!1,this.levels[1]=!1,this.outer.classList.remove(this.prefix+"_level_0"),this.prop.v.document().classList.remove(this.prefix+"_shown_level_0"),this.prop.v.document().classList.remove(this.prefix+"_shown_level_1"),setTimeout(function(){this.prop.v.document().classList.remove(this.prefix+"_shown"),this.outer.classList.add("display_none"),this.outer.classList.remove("display_flex");for(var t=0;t<this.activeTypes.length;t++)this.outer.classList.remove(this.prefix+"_"+this.activeTypes[t]);this.levelsEl[0].innerHTML="",this.shown=!1,this.launchEventsByTarget("hidden",{outer:this.outer,level:0,types:this.activeTypes})}.bind(this),this.prop.animation),!0}},{key:"hideLevel_1",value:function(){return this.levels[0]=!0,this.levels[1]=!1,setTimeout(function(){this.outer.classList.remove(this.prefix+"_level_1"),this.prop.v.document().classList.remove(this.prefix+"_shown_level_1")}.bind(this),this.prop.v.timeMin()),setTimeout(function(){this.levelsEl[1].innerHTML="",this.launchEventsByTarget("hidden",{outer:this.outer,level:1,types:this.activeTypes})}.bind(this),this.prop.v.timeMin()+this.prop.animation),!0}},{key:"hideAll",value:function(){return this.levels[0]=!1,this.levels[1]=!1,this.launchEventsByTarget("hide",{outer:this.outer,level:0,types:this.activeTypes}),this.outer.classList.remove(this.prefix+"_level_0"),this.outer.classList.remove(this.prefix+"_level_1"),this.prop.v.document().classList.remove(this.prefix+"_shown_level_0"),this.prop.v.document().classList.remove(this.prefix+"_shown_level_1"),setTimeout(function(){this.prop.v.document().classList.remove(this.prefix+"_shown"),this.outer.classList.add("display_none"),this.outer.classList.remove("display_flex");for(var t=0;t<this.activeTypes.length;t++)this.outer.classList.remove(this.prefix+"_"+this.activeTypes[t]);this.levelsEl[0].innerHTML="",this.levelsEl[1].innerHTML="",this.shown=!1,this.launchEventsByTarget("hidden",{outer:this.outer,level:0,types:this.activeTypes})}.bind(this),this.prop.animation),!0}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.created=!1,this.shown=!1,this.levels=[!1,!1],this.levelsEl=[],this.activeTypes=[],Object.assign(e,{level:this.getLevel.bind(this),shown:function(){return t.shown},id:function(){return t.id},activeTypes:function(){return t.activeTypes},show:this.show.bind(this),hide:this.hide.bind(this),hideAll:this.hideAll.bind(this)}))}}]),s}(),g.prototype.AjaxPage=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"ajaxPage",e.prop=Object.assign(e.prop,{selectorLinks:"."+e.prefix+"__link",selectorOuter:"#"+e.prefix+"__outer",selectorVData:"body",disabled:!1,disabledTries:1e3,popstateEvent:!0,popstateEventReload:!0,on:!0,updateUrl:!0,updateTitle:!0,updateContent:!0,timeoutAjax:0,timeoutUpdate:0,timeoutAfter:0,maxChanges:999,changeSame:!0,cache:!1}),t)e.prop[i]=t[i];return e.targets=["before","load","after","changeSame"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selectorLinks","dom"],["selectorOuter","dom"],["selectorVData","string"],["disabled","boolean"],["disabledTries","integer"],["popstateEvent","boolean"],["popstateEventReload","boolean"],["on","boolean"],["updateUrl","boolean"],["updateTitle","boolean"],["updateContent","boolean"],["timeoutAjax","integer"],["t
1imeoutUpdate","integer"],["timeoutAfter","integer"],["maxChanges","integer"],["changeSame","boolean"],["cache","boolean"]]})}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.getElements(),this.setEvents(),!0)}},{key:"getElements",value:function(){this.outer=this.prop.v.doc().querySelector(this.prop.selectorOuter);for(var t=this.prop.v.doc().querySelectorAll(this.prop.selectorLinks),e=0;e<t.length;e++)void 0===t[e][this.data.proceeded]&&this.links.push(t[e]);return this.links}},{key:"setEvents",value:function(){for(var t=0;t<this.links.length;t++)void 0===this.links[t][this.data.proceeded]&&(this.addEventListener({el:this.links[t],target:"click",do:this.load.bind(this,this.links[t],!0,!1)}),this.links[t].setAttribute("data-"+this.prop.v.prefix()+"preloader-none",!0),this.links[t][this.data.proceeded]=!0);return!0}},{key:"checkHref",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(null===t)return!1;var e="";if("string"==typeof t)e=t;else{if(!this.checkType("htmlElement",t))return!1;if(null===t.getAttribute("href"))return!1;e=t.href}return e}},{key:"setTimeout",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,i=+new Date-this.startLoading;return i<e?setTimeout(t.bind(this),e-i):t(),!0})},{key:"getVPage",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(null===t)return!1;var e=t.getAttribute("data-"+this.prop.v.prefix()+"page");if(null!==e){for(var i=e.split(" "),s=[],r=0;r<i.length;r++)s.push(i[r]);return s}return!1}},{key:"load",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;if(this.prop.on){if(null!==s&&s.preventDefault(),this.loading)return!1;if(this.prop.disabled)return!1;var r=this.checkHref(t);if(!r)return!1;if(v.checkType("function",t.getAttribute))if(null!==t.getAttribute("target"))return void(window.location.href=r);return r.includes(window.location.host)?this.changes>=this.prop.maxChanges?void(window.location.href=r):!this.prop.changeSame&!i&&r==location.href?void this.launchEventsByTarget("changeSame",{link:t}):(this.loading=!0,this.launchEventsByTarget("before",{link:t,onpopstate:i}),setTimeout(function(t,e,i){this.startLoading=+new Date,this.ajaxLoad(t,e,i),this.changes++}.bind(this,r,e,i),this.prop.timeoutAjax),!0):void(window.location.href=r)}}},{key:"ajaxLoad",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return this.loading=!0,this.prop.v.ajax({url:t,method:"post",data:{ajaxPage:1},cache:this.prop.cache,abortOnError:!0,callback:this.update.bind(this,t,e,i),fail:this.ajaxLoad.bind(this,t),error:this.error.bind(this,t,e,i)}),!0}},{key:"error",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=arguments[3],r=(arguments[4],5<arguments.length&&void 0!==arguments[5]?arguments[5]:"");return 404==s.status?this.update(t,e,i,r):window.location.href=t,!0}},{key:"update",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement("html");r.innerHTML=s;var o=r.querySelector(this.prop.selectorVData),n=this.getVPage(o);if(!n)return window.location.href=t,!1;var a={current:this.outer,new:r.querySelector(this.prop.selectorOuter)};if(null===a.new)return window.location.href=t,!1;this.setTimeout(function(){this.prop.updateUrl&e&&window.history.pushState(null,"",t)}.bind(this),this.prop.timeoutUpdate),this.setTimeout(function(){if(this.prop.updateTitle){var t={current:document.querySelector("title"),new:r.querySelector("title")};null!==t.current&null!==t.new&&(t.current.innerHTML=t.new.innerHTML)}}.bind(this),this.prop.timeoutUpdate);var h=a.new.innerHTML;return this.setTimeout(function(){this.prop.updateContent&&(a.current.innerHTML=h,this.getElements(),this.setEvents())}.bind(this),this.prop.timeoutUpdate),this.setTimeout(function(){this.launchEventsByTarget("load",{prev:this.page,next:n,url:t,html:h,htmlFull:s,onpopstate:i})}.bind(this),this.prop.timeoutUpdate),this.setTimeout(function(){setTimeout(function(){this.launchEventsByTarget("after",{prev:this.page,next:n,url:t,html:h,onpopstate:i})}.bind(this),this.prop.timeoutAfter)}.bind(this),this.prop.timeoutUpdate),this.setTimeout(function(){setTimeout(function(){this.loading=!1,this.url=t,this.page=n}.bind(this),this.prop.timeoutAfter)}.bind(this),this.prop.timeoutUpdate),!0}},{key:"popstate",value:function(){return this.disabledTries=0,window.onpopstate=this.popstateEvent.bind(this),!0}},{key:"popstateEvent",value:function(t){return this.prop.popstateEvent?(this.catchStopLoading(),!0):(this.prop.popstateEventReload&&location.reload(),!1)}},{key:"catchStopLoading",value:function(){!this.loading&!this.prop.disabled?(this.load(location.href,!1,!0),this.disabledTries=0):(this.disabledTries++,this.disabledTries<=this.prop.disabledTries&&window.requestAnimationFrame(this.catchStopLoading.bind(this)))}},{key:"setUrl",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";this.url=t}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.data={proceeded:this.prefix+"-proceeded"},this.outer=null,this.links=[],this.changes=0,this.url=window.location.href,this.page=this.prop.v.getPage(),this.startLoading=0,this.loading=!1,this.popstate(),this.getElements(),this.setEvents(),Object.assign(e,{changes:function(){return t.changes},links:function(){return t.links},outer:function(){return t.outer},url:function(){return t.url},page:function(){return t.page},loading:function(){return t.loading},getElements:this.getElements.bind(this),setEvents:this.setEvents.bind(this),load:this.load.bind(this),setUrl:this.setUrl.bind(this)}))}}]),s}(),g.prototype.Page=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prop=Object.assign(e.prop,{name:""+e.prefix,images:!1}),t)e.prop[i]=t[i];return e.targets=["create","show","hide","destroy","resize","resizeW","resizeH"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["name","string"],["images","boolean"]]})}},{key:"resize",value:function(){return this.launchEventsByTarget("resize"),!0}},{key:"resizeW",value:function(){return this.launchEventsByTarget("resizeW"),!0}},{key:"resizeH",value:function(){return this.launchEventsByTarget("resizeH"),!0}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(this.created)return!1;this.created=!0,this.ajaxBool=t;var e=this.prop.v.viewport;return this.resizeId=e.add({target:"wh",name:this.name+" Resize",do:this.resize.bind(this)}),this.resizeWId=e.add({target:"w",name:this.name+" Resize Width",do:this.resizeW.bind(this)}),this.resizeHId=e.add({target:"h",name:this.name+" Resize Height",do:this.resizeH.bind(this)}),this.launchEventsByTarget("create"),this.imagesLoaded=0,this.showAfterImages=!1,this.prop.images?(this.imagesLoadedAll=!1,this.imagesLoad()):this.imagesLoadedAll=!0,!0}},{key:"show",value:function(){0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.ajaxBool;return!this.shown&&(this.imagesLoadedAll?(this.shown=!0,this.launchEventsByTarget("show"),!0):!(this.showAfterImages=!0))}},{key:"hide",value:function(){0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.ajaxBool;return!!this.shown&&(this.shown=!1,this.launchEventsByTarget("hide"),!0)}},{key:"destroy",value:function(){0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.ajaxBool;return!!this.created&&(this.created=!1,null!==this.resizeId&&(this.prop.v.viewport.delete(this.resizeId),this.resizeId=null),null!==this.resizeWId&&(this.prop.v.viewport.delete(this.resizeWId),this.resizeWId=null),null!==this.resizeHId&&(this.prop.v.viewport.delete(this.resizeHId),this.resizeHId=null),this.launchEventsByTarget("destroy"),this.removeEventListeners(),this.deleteAll(this.prop.console),!0)}},{key:"imagesLoad",value:function(){this.imgs=document.querySelectorAll("img");for(var t=0;t<this.imgs.length;t++){var e=new Image;e.onload=this.imagesOnLoad.bind(this),e.onerror=this.imagesOnLoad.bind(this),e.src=this.imgs[t].src}0==this.imgs.length&&(this.imagesLoadedAll=!0)}},{key:"imagesOnLoad",value:function(){this.imagesLoaded++,this.imagesLoaded>=this.imgs.length&&(this.imagesLoadedAll=!0,this.showAfterImages&&this.show(this.ajaxBool))}},{key:"init",value:function(){var t=this,e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.ajaxBool=!1,this.created=!1,this.shown=!1,this.resizeId=null,this.resizeWId=null,this.resizeHId=null,this.imgs=[],this.imagesLoaded=0,this.imagesLoadedAll=!1,this.showAfterImages=!1,this.prop.v.pages instanceof Array||(this.prop.v.pages=[]),this.prop.v.pages.push(this.prop.name),Object.assign(e,{shown:function(){return t.shown},created:function(){return t.created},create:this.create.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),destroy:this.destroy.bind(this)}))}}]),s}(),g.prototype.Faq=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"faq",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorItem:"."+e.prefix+"__item",selectorQuestion:"."+e.prefix+"__question",selectorAnswer:"."+e.prefix+"__answer",selectorClose:"."+e.prefix+"__close",duration:350,multiShow:!1}),t)e.prop[i]=t[i];return e.targets=["toggle","show","hide"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorItem","dom"],["selectorQuestion","dom"],["selectorAnswer","dom"],["selectorClose","string"],["duration","integer"],["multiSh
1ow","boolean"]]})&&!!this.getElements()}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(!!this.getElements()&&(this.setEvents(),!0))}},{key:"getElements",value:function(){this.removeEventListeners(),this.outer=this.prop.v.doc().querySelector(this.prop.selector);var t=this.outer.getAttribute(this.data.proceeded);null===t&&(t=this.name+"-"+ +new Date+"-"+Math.random(),this.outer.setAttribute(this.data.proceeded,t),this.outer.classList.add(""+this.prefix));for(var e=this.outer.querySelectorAll(this.prop.selectorItem),i=0;i<e.length;i++){if(null===e[i].getAttribute(this.data.proceeded)){var s={id:this.name+"-"+ +new Date+"-"+Math.random(),item:e[i],questions:e[i].querySelectorAll(this.prop.selectorQuestion),answers:e[i].querySelectorAll(this.prop.selectorAnswer),closes:e[i].querySelectorAll(this.prop.selectorClose),proceededEvents:!1,shown:!1};this.items.push(s),e[i].setAttribute(this.data.proceeded,s.id),e[i].classList.add(this.prefix+"__item");for(var r=0;r<s.questions.length;r++)s.questions[r].classList.add(this.prefix+"__question");for(var o=0;o<s.answers.length;o++)s.answers[o].classList.add(this.prefix+"__answer");for(var n=0;n<s.closes.length;n++)s.closes[n].classList.add(this.prefix+"__close")}}for(var a=0;a<this.items.length;a++)this.items[a].proceededEvents=!1;return!0}},{key:"getItem",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.checkType("integer",t))return!(t<0&t>=this.items.length)&&this.items[t];if(this.checkType("string",t))for(var e=0;e<this.items.length;e++)if(this.items[e].id===t)return this.items[e];return!1}},{key:"getActive",value:function(){for(var t=[],e=0;e<this.items.length;e++)this.items[e].shown&&t.push(this.items[e]);return t}},{key:"setEvents",value:function(){for(var t=0;t<this.items.length;t++)if(!this.items[t].proceededEvents){for(var e=0;e<this.items[t].questions.length;e++)this.addEventListener({el:this.items[t].questions[e],target:"click",do:this.clickQuestion.bind(this,this.items[t].id)});for(var i=0;i<this.items[t].closes.length;i++)this.addEventListener({el:this.items[t].closes[i],target:"click",do:this.clickClose.bind(this,this.items[t].id)});this.items[t].proceededEvents=!0}return!0}},{key:"clickQuestion",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return null!==e&&e.preventDefault(),this.toggle(t),!0}},{key:"clickClose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return null!==e&&(e.preventDefault(),e.stopPropagation()),this.toggle(t),!0}},{key:"toggle",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.prop.duration;if(!this.checkType("integer",e))return!1;var i=this.getItem(t);return!!i&&(i.shown?this.hide(t,e):this.show(t,e),this.launchEventsByTarget("toggle",i),!0)}},{key:"show",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.prop.duration;if(!this.checkType("integer",e))return!1;var i=this.getItem(t);if(!i)return!1;if(i.shown)return!1;if(this.toggleClassActive(i,"add"),this.showAnimation(i,e),i.shown=!0,!this.prop.multiShow)for(var s=0;s<this.items.length;s++)this.items[s]!=i&&this.hide(this.items[s].id,e);return this.launchEventsByTarget("show",i),!0}},{key:"hide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.prop.duration;if(!this.checkType("integer",e))return!1;var i=this.getItem(t);return!!i&&(!!i.shown&&(this.toggleClassActive(i,"remove"),this.hideAnimation(i,e),i.shown=!1,this.launchEventsByTarget("hide",i),!0))}},{key:"toggleClassActive",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"add";t.item.classList[e](this.prefix+"__item_active");for(var i=0;i<t.questions.length;i++)t.questions[i].classList[e](this.prefix+"__question_active");for(var s=0;s<t.answers.length;s++)t.answers[s].classList[e](this.prefix+"__answer_active");for(var r=0;r<t.closes.length;r++)t.closes[r].classList[e](this.prefix+"__close_active")}},{key:"showAnimation",value:function(t,e){for(var i=0;i<t.answers.length;i++)$(t.answers[i]).stop().slideDown(e);return!0}},{key:"hideAnimation",value:function(t,e){for(var i=0;i<t.answers.length;i++)$(t.answers[i]).stop().slideUp(e);return!0}},{key:"addItem",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if(!this.checkType("string",t))return!1;if(!this.checkType("string",e))return!1;var i=document.createElement("div");i.classList.add(this.prefix+"__item"),this.outer.appendChild(i);var s=document.createElement("div");s.classList.add(this.prefix+"__question"),s.innerHTML=t,i.appendChild(s);var r=document.createElement("div");return r.classList.add(this.prefix+"__answer"),r.innerHTML=e,i.appendChild(r),this.getElements(),this.setEvents(),!0}},{key:"addHtml",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement("div");e.innerHTML=t;for(var i=e.querySelectorAll(this.prop.selectorItem),s=0;s<i.length;s++){var r=i[s].querySelector(this.prop.selectorQuestion),o="";null!==r&&(o=r.innerHTML);var n=i[s].querySelector(this.prop.selectorAnswer),a="";null!==n&&(a=n.innerHTML),this.addItem(o,a)}return!(e=null)}},{key:"init",value:function(){this.data={proceeded:"data-"+this.prefix+"-proceeded"},this.outer=null,this.items=[];var t=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!t&&(this.setEvents(),Object.assign(t,{getItem:this.getItem.bind(this),toggle:this.toggle.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),getActive:this.getActive.bind(this),addItem:this.addItem.bind(this),addHtml:this.addHtml.bind(this)}))}}]),s}(),g.prototype.Map=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"map",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,styles:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],address:"London",icon:"",iconSize:[50,50],zoom:16,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,rotateControl:!0,fullscreenControl:!0,scrollwheel:!1,mapTypeId:"roadmap",
1init:!0}),e.mapTypeIds=["roadmap","satellite","hybrid","terrain"],t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){if(!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["styles","array"],["address","string"],["icon","string"],["iconSize","numberArray"],["zoom","integer"],["zoomControl","boolean"],["mapTypeControl","boolean"],["scaleControl","boolean"],["streetViewControl","boolean"],["rotateControl","boolean"],["fullscreenControl","boolean"],["scrollwheel","boolean"],["mapTypeId","string"],["init","boolean"]]}))return!1;for(var t=!1,e=0;e<this.mapTypeIds.length;e++)this.mapTypeIds[e].toLowerCase()==this.prop.mapTypeId.toLowerCase()&&(t=!0);return!!t&&(this.outer=this.prop.v.document().querySelector(this.prop.selector),!0)}},{key:"create",value:function(){var s=this;this.created=!0;this.outer.querySelector("."+this.prefix+"__outer");return $(this.prop.selector+" ."+this.prefix+"__outer").gmap3("destroy").remove(),this.outer.innerHTML='<div class="'+this.prefix+'__outer relative col_12 row_12"></div>',setTimeout(function(){var t=s.outer.querySelector("."+s.prefix+"__outer"),e=s.prop.icon,i=s.prop.iconSize;s.map=$(t).gmap3({map:{options:{zoom:s.prop.zoom,zoomControl:s.prop.zoomControl,mapTypeControl:s.prop.mapTypeControl,scaleControl:s.prop.scaleControl,streetViewControl:s.prop.streetViewControl,rotateControl:s.prop.rotateControl,fullscreenControl:s.prop.fullscreenControl,mapTypeId:1<s.prop.styles.length&!s.prop.mapTypeControl?""+s.prefix:s.prop.mapTypeId,scrollwheel:s.prop.scrollwheel},callback:function(s){(this.googleMap=s).addListener("maptypeid_changed",function(){var i=this;setTimeout(function(){var t=i.outer.querySelector("."+i.prefix+"__outer");if(null!==t){for(var e=0;e<i.mapTypeIds.length;e++)t.classList.remove(i.prefix+"__outer_"+i.mapTypeIds[e]);i.prop.mapTypeId=s.mapTypeId.toLowerCase(),t.classList.add(i.prefix+"__outer_"+i.prop.mapTypeId)}},250)}.bind(this))}.bind(s)},getlatlng:{address:s.prop.address,callback:function(t){t&&($(this).gmap3({marker:{latLng:t[0].geometry.location,labelClass:"map-label",options:{icon:new google.maps.MarkerImage(e,new google.maps.Size(i[0],i[1]),new google.maps.Point(0,0),new google.maps.Point(i[0]/2,i[1]/2))}}}),$(this).gmap3("get").setCenter(new google.maps.LatLng(t[0].geometry.location.lat(),t[0].geometry.location.lng())))}},styledmaptype:1<s.prop.styles.length&!s.prop.mapTypeControl?{id:""+s.prefix,options:{name:""+s.prefix},styles:s.prop.styles}:{}})},v.timeMin()),!0}},{key:"init",value:function(){var t=this;return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&(this.outer.classList.add(""+this.prefix),this.created=!1,this.map=!1,this.googleMap=!1,this.prop.init&&this.create(),{create:this.create.bind(this),created:function(){return t.created},map:function(){return t.map},googleMap:function(){return t.googleMap},prop:function(){return t.prop},changeProp:this.changeProp.bind(this)})}}]),s}(),g.prototype.Columns=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"columns",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorItem:"#"+e.prefix,columns:[0,1,2]}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorItem","dom"],["columns","numberArray"]]})&&(this.firstLoad&&this.getElements(),this.moveItemsToParent(),this.deleteColumns(),this.createColumns(),this.insertItems(),!(this.firstLoad=!1))}},{key:"getElements",value:function(){return this.outer=this.prop.v.doc().querySelector(this.prop.selector),this.outer.classList.add(""+this.prefix),this.elements=this.outer.querySelectorAll(this.prop.selectorItem),!0}},{key:"moveItemsToParent",value:function(){for(var t=0;t<this.elements.length;t++)this.outer.appendChild(this.elements[t]);return!0}},{key:"deleteColumns",value:function(){this.outer.classList.remove(this.prefix+"_"+this.columns.length);for(var t=0;t<this.columns.length;t++)this.outer.removeChild(this.columns[t]);return this.columns=[],!(this.lastColumn=0)}},{key:"createColumns",value:function(){this.outer.classList.add(this.prefix+"_"+this.prop.columns.length);for(var t=0;t<this.prop.columns.length;t++){var e=document.createElement("div");e.classList.add(this.prefix+"__column"),e.classList.add(this.prefix+"__column_"+t),this.outer.appendChild(e),this.columns.push(e)}return!0}},{key:"insertItems",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.elements,e=0;t!==this.elements&&(e=this.lastColumn+1)>=this.prop.columns.length&&(e=0);for(var i=0,s=e;i<t.length;s++,i++){var r=this.prop.columns[s];this.columns[r].appendChild(t[i]),(this.lastColumn=s)>=this.prop.columns.length-1&&(s=-1)}return!0}},{key:"addItem",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!this.checkType("htmlElement",t)&&(this.insertItems([t]),!0)}},{key:"addHtml",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";if(!this.checkType("string",t))return!1;var e=document.createElement("html");e.innerHTML=t;for(var i=e.querySelectorAll(this.prop.selectorItem),s=0;s<i.length;s++)this.addItem(i[s]);return!0}},{key:"init",value:function(){var t=this;return this.firstLoad=!0,this.outer=null,this.elements=[],this.columns=[],this.lastColumn=0,!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&{addHtml:this.addHtml.bind(this),addItem:this.addItem.bind(this),getElements:this.getElements.bind(this),prop:function(){return t.prop},changeProp:this.changeProp.bind(this)}}}]),s}(),g.prototype.Clear=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"clear",e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,selectorItem:"."+e.prefix+"__item",skipClass:e.prefix+"__skip",step:2}),t)e.prop[i]=t[i];return e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorItem","dom"],["skipClass","string"],["step","integer"]]})&&(this.getElements(),this.addClears(),!0)}},{key:"getElements",value:function(){return this.outer=this.prop.v.doc().querySelector(this.prop.selector),this.outer.classList.add(""+this.prefix),this.elements=this.outer.querySelectorAll(this.prop.selectorItem),!0}},{key:"moveItemsToParent",value:function(){for(var t=0;t<this.elements.length;t++)this.outer.appendChild(this.elements[t]);return!0}},{key:"removeClears",value:function(){for(var t=0;t<this.clears.length;t++)this.childOf(this.clears[t],this.outer)&&this.outer.removeChild(this.clears[t]);this.clears=[];for(var e=0;e<this.elements.length;e++)for(var i=0;i<=this.lastStep;i++)this.elements[e].classList.remove(this.prefix+"__item_"+i);return this.lastStep=this.prop.step,!0}},{key:"addClears",value:function(){this.lastStep!==this.prop.step&&this.removeClears();for(var t=0,e=0;t<this.elements.length;t++)if(!this.elements[t].classList.contains(this.prop.skipClass)){if(e>this.prop.step-1&&(e=0),this.elements[t].classList.add(this.prefix+"__item_"+e),e==this.prop.step-1&&null!==this.elements[t].nextElementSibling){if(this.elements[t].nextElementSibling.classList.contains(this.prefix+"__clear")){e++;continue}var i=document.createElement("div");i.classList.add(this.prefix+"__clear"),i.classList.add("clear"),this.insertAfter(this.elements[t],i,this.outer),this.clears.push(i)}e++}}},{key:"addItem",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!this.checkType("htmlElement",t)&&(this.outer.appendChild(t),this.getElements(),this.addClears(),!0)}},{key:"addHtml",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";if(!this.checkType("string",t))return!1;var e=document.createElement("html");e.innerHTML=t;for(var i=e.querySelectorAll(this.prop.selectorItem),s=0;s<i.length;s++)this.addItem(i[s]);return!0}},{key:"init",value:function(){var t=this;return this.outer=null,this.elements=[],this.clears=[],this.lastStep=0,!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this)&&{prop:function(){return t.prop},changeProp:this.changeProp.bind(this),getElements:this.getElements.bind(this),removeClears:this.removeClears.bind(this),addClears:this.addClears.bind(this),addHtml:this.addHtml.bind(this),addItem:this.addItem.bind(this)}}}]),s}(),g.prototype.ElasticButton=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"elasticButton",e.dataPrefix="data-"+e.prefix,e.prop=Object.assign(e.prop,{selector:"#"+e.prefix,run:!0,widthSegments:10,padding:20,lineWidth:2,buldge:5,color:"#000",fillColor:"#ccc",opacity:1,noStroke:!1,lineIn:1,tapScale:2}),t)e.prop[i]=t[i];return e.targets=["mouseover","mouseleave","mousemove","mousedown","mouseup"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){return!!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["selector","dom"],["run","boolean"],["widthSegments","integer"],["lineWidth","number"],["buldge","integer"],["color","string"],["fillColor","string"],["o
1pacity","number"],["noStroke","boolean"],["lineIn","number"],["tapScale","number"]]})}},{key:"changeProp",value:function(t){return!!p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"changeProp",this).call(this,t)&&(this.run(),!0)}},{key:"setVars",value:function(){this.animPow=50,this.wiggleDis=10,this.wigglePow=.5,this.MOUSE_ATTRACT_DIS=130,this.TAP_POWER=1,this.maskP=1,this.maskSpeed=0,this.preMaskP=1,this.gradientX=1,this.gradientP=0,this.gradientAlpha=0,this.DRAG=.2,this.DIS_DRAG=.15,this.ELASTIC=.65,this.DIS_ELASTIC=-.05,this.fill={value:0,velocity:0}}},{key:"create",value:function(){return this.update(),null!==this.resizeID&&(this.prop.v.deleteResize(this.resizeID),this.resizeID=null),this.resizeID=this.prop.v.addResize(["wh",this.setSize.bind(this),this.prop.v.timeMin()]),!0}},{key:"update",value:function(){this.outers=this.prop.v.doc().querySelectorAll(this.prop.selector);for(var t=0;t<this.outers.length;t++){this.outers[t].getAttribute(this.data.proceeded)||(this.outers[t].setAttribute(this.data.proceeded,"true"),this.outers[t].classList.add(""+this.prefix),this.createCanvas(this.outers[t]),this.el.push(this.outers[t]),this.setEvents(this.outers[t]))}this.setSize()}},{key:"createCanvas",value:function(t){t.innerHTML="<span>"+t.innerHTML+"</span>",t[this.var.points]=[],t[this.var.isActive]=!1,t[this.var.needsUpdate]=!1,t[this.var.updateTimeout]=null;var e=t.getBoundingClientRect();t[this.var.width]=e.width+2*this.prop.padding,t[this.var.height]=e.height+2*this.prop.padding,t[this.var.ctx]=Object(this.createCanvasObj)(t[this.var.width],t[this.var.height]),t[this.var.ctx].canvas.style.top="-"+this.prop.padding+"px",t[this.var.ctx].canvas.style.left="-"+this.prop.padding+"px",t[this.var.temp]=Object(this.createCanvasObj)(t[this.var.width],t[this.var.height]),t.appendChild(t[this.var.ctx].canvas)}},{key:"createCanvasObj",value:function(t,e){var i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],s=arguments[3],r=document.createElement("canvas"),o=r.getContext("2d"),n=window.devicePixelRatio?window.devicePixelRatio:1;return n=Math.max(n,1),r.width=t,r.height=e,r.style.width=t+"px",r.style.height=e+"px",i&&(s&&(n=Math.min(n,s)),r.width=t*n,r.height=e*n,o.scale(n,n)),o}},{key:"createCanvasSize",value:function(t,e,i){var s=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],r=arguments[4],o=window.devicePixelRatio?window.devicePixelRatio:1;o=Math.max(o,1),t.canvas.width=e,t.canvas.height=i,t.canvas.style.width=e+"px",t.canvas.style.height=i+"px",s&&(r&&(o=Math.min(o,r)),t.canvas.width=e*o,t.canvas.height=i*o,t.scale(o,o))}},{key:"setSize",value:function(){this.dpr=1,void 0!==window.devicePixelRatio&&(this.dpr=window.devicePixelRatio);for(var t=0;t<this.el.length;t++){var e=this.el[t].getBoundingClientRect(),i=this.el[t];i[this.var.width]=e.width+2*this.prop.padding,i[this.var.height]=e.height+2*this.prop.padding,this.gradientTouchX=-i[this.var.width],Object(this.createCanvasSize)(i[this.var.ctx],i[this.var.width],i[this.var.height]),i[this.var.points]=[];for(var s=e.height,r=e.height/2,o=(e.width-2*r)/this.prop.widthSegments,n=this.prop.padding,a=0;a<2;a++)for(var h=s*a-(2*a-1)*this.prop.lineWidth+n,l=0;l<=this.prop.widthSegments;l++){var c=o*l+r+n,p=.1*Math.abs(1-l/(this.prop.widthSegments/2)),u=.3-.3*Math.abs(1-l/(this.prop.widthSegments/2));i[this.var.points].push({pos:{x:c,y:h},fpos:{x:c,y:h},offset:{x:0,y:0},offsetSpeed:{x:0,y:0},elasticAdd:p,dragAdd:u,ydir:2*a-1})}}this.renderCanvas(!0)}},{key:"renderCanvas",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=0;e<this.el.length;e++)if(!(!t&!this.el[e][this.var.needsUpdate])){var i=this.el[e],s=this.el[e].pos,r=this.getDynamicVars(i);i[this.var.isActive]&&(r.buldge*=-1),i[this.var.ctx].globalCompositeOperation="source-over";var o=i[this.var.width]*(1-this.maskP);this.maskSpeed=this.maskP-this.preMaskP,this.preMaskP=this.maskP;for(var n=0;n<i[this.var.points].length;n++){var a=i[this.var.points][n],h={x:0,y:0},l=1;if(s){var c=s.x-a.pos.x,p=s.y-a.pos.y,u=Math.sqrt(c*c+p*p);l=1-Math.max(0,(this.MOUSE_ATTRACT_DIS-u)/this.MOUSE_ATTRACT_DIS),h.x=0,h.y=r.tapScale*a.ydir}h.y+=Math.max(0,this.wiggleDis-Math.abs(o-a.fpos.x)*this.wigglePow)*this.maskSpeed*this.animPow*a.ydir,a.offsetSpeed.x=(h.x-a.offset.x)*(this.DRAG-this.DIS_DRAG*l+a.dragAdd)+a.offsetSpeed.x*(this.ELASTIC-this.DIS_ELASTIC*l+a.elasticAdd),a.offsetSpeed.y=(h.y+(1-l)*a.ydir*r.buldge-a.offset.y+a.dragAdd)*(this.DRAG-this.DIS_DRAG*l)+a.offsetSpeed.y*(this.ELASTIC-this.DIS_ELASTIC*l+a.elasticAdd),a.offset.y+=a.offsetSpeed.y,a.offset.x+=a.offsetSpeed.x,a.fpos.y=a.offset.y+a.pos.y,a.fpos.x=a.offset.x+a.pos.x}var d=((s?.9:0)-this.fill.value)*(s?.4:.9);
1if(this.fill.velocity*=s?.45:.1,this.fill.velocity+=d,this.fill.value+=this.fill.velocity,i[this.var.ctx].clearRect(0,0,i[this.var.width],i[this.var.height]),i[this.var.ctx].save(),i[this.var.ctx].beginPath(),i[this.var.ctx].strokeStyle=r.color,i[this.var.ctx].lineWidth=this.prop.lineWidth,this.drawOutline(i[this.var.ctx],i),r.noStroke||i[this.var.ctx].stroke(),i[this.var.ctx].globalAlpha=r.opacity,r.fillColor?(i[this.var.ctx].globalAlpha=r.opacity,i[this.var.ctx].fillStyle=r.fillColor):(i[this.var.ctx].globalAlpha=r.opacity,i[this.var.ctx].fillStyle=r.color,i[this.var.ctx].fill(),i[this.var.ctx].fillStyle=r.color),i[this.var.ctx].fill(),this.gradientAlpha-=.1*this.gradientAlpha,i[this.var.ctx].restore(),this.prop.drawGradient){var v=2*i[this.var.width]*(1-this.gradientP)-i[this.var.width];s?(this.gradientTouchX=(.5*i[this.var.width]-s.x)*this.dpr,this.gradientX+=.5*(this.gradientTouchX-this.gradientX)):(this.gradientX+=.5*(v-this.gradientX),this.gradientTouchX+=.1*(-i[this.var.width]-this.gradientTouchX));var g=i[this.var.width]/this.dpr,f=i[this.var.height]/this.dpr;i[this.var.temp].clearRect(0,0,i[this.var.width],i[this.var.height]),i[this.var.temp].globalCompositeOperation="source-over",i[this.var.temp].drawImage(i[this.var.top].canvas,this.gradientX,0,g,f,0,0,g,f),i[this.var.temp].globalCompositeOperation="destination-in",i[this.var.temp].drawImage(i[this.var.ctx].canvas,0,0,g,f,0,0,g,f),i[this.var.ctx].globalCompositeOperation="screen",i[this.var.ctx].globalAlpha=this.gradientAlpha,i[this.var.ctx].drawImage(i[this.var.temp].canvas,0,0,g,f,0,0,g,f),i[this.var.ctx].globalAlpha=1}this.maskP<1&&(i[this.var.ctx].globalCompositeOperation="destination-in",i[this.var.ctx].fillRect(o,0,i[this.var.width],i[this.var.height])),i[this.var.ctx].globalCompositeOperation="source-over",i[this.var.ctx].beginPath();var m=i[this.var.points].length/2-1,y=i[this.var.points].length-1,b=(i[this.var.points][m].fpos.x+i[this.var.points][y].fpos.x)/2,_=(i[this.var.points][m].fpos.y,i[this.var.points][y].fpos.y,(i[this.var.points][m+1].fpos.x+i[this.var.points][0].fpos.x)/2),k=(i[this.var.points][m+1].fpos.y,i[this.var.points][0].fpos.y,b+.5*Math.abs(i[this.var.points][m].fpos.y-i[this.var.points][y].fpos.y)),w=_-.5*Math.abs(i[this.var.points][m+1].fpos.y-i[this.var.points][0].fpos.y);i[this.var.ctx].moveTo(Math.max(w,Math.min(k,(4*r.lineIn-3)*i[this.var.width])),.5*i[this.var.height]),i[this.var.ctx].lineTo(Math.max(w,Math.min(k,i[this.var.width]*r.lineIn)),.5*i[this.var.height]),i[this.var.ctx].closePath(),i[this.var.ctx].strokeStyle=r.color,i[this.var.ctx].lineWidth=this.prop.lineWidth,i[this.var.ctx].stroke()}}},{key:"drawOutline",value:function(t,e){var i=e[this.var.points].length/2-1,s=e[this.var.points].length-1,r=(e[this.var.points][i].fpos.x+e[this.var.points][s].fpos.x)/2,o=(e[this.var.points][i].fpos.y+e[this.var.points][s].fpos.y)/2,n=(e[this.var.points][i+1].fpos.x+e[this.var.points][0].fpos.x)/2,a=(e[this.var.points][i+1].fpos.y+e[this.var.points][0].fpos.y)/2,h=Math.abs(e[this.var.points][i].fpos.y-e[this.var.points][s].fpos.y),l=Math.abs(e[this.var.points][i+1].fpos.y-e[this.var.points][0].fpos.y);t.moveTo(e[this.var.points][0].fpos.x,e[this.var.points][0].fpos.y);for(var c=1;c<e[this.var.points].length/2;c++){var p=e[this.var.points][c];t.lineTo(p.fpos.x,p.fpos.y)}for(t.arc(r,o,.5*h,.5*-Math.PI,.5*Math.PI),c=s;i<c;c--)p=e[this.var.points][c],t.lineTo(p.fpos.x,p.fpos.y);t.arc(n,a,.5*l,.5*+Math.PI,.5*-Math.PI)}},{key:"getDynamicVars",value:function(t){for(var e={},i=0;i<this.dynamicVars.length;i++){var s=this.dynamicVars[i],r=t.getAttribute(this.dataPrefix+"-"+s),o=null;null!==r?"buldge"==s?o=parseInt(r):"color"==s?o=r:"fillColor"==s?o=r:"opacity"==s?o=parseFloat(r):"noStroke"==s?o=!!r:"lineIn"==s?o=parseFloat(r):"tapScale"==s&&(o=parseFloat(r)):o=this.prop[s],e[s]=o}return e}},{key:"setEvents",value:function(t){t.pos=!1,this.addEventListener({el:t,target:"mouseover",do:this.onMouseOver.bind(this,t)}),this.addEventListener({el:t,target:"mouseleave",do:this.onMouseLeave.bind(this,t)}),this.addEventListener({el:t,target:"mousemove",do:this.onMouseMove.bind(this,t)}),this.addEventListener({el:t,target:"mousedown",do:this.onMouseDown.bind(this,t)})}},{key:"setEventsUniversal",value:function(){this.addEventListener({el:window,target:"mouseup",do:this.onMouseUp.bind(this)})}},{key:"onMouseOver",value:function(t,e){t[this.var.needsUpdate]=!0,null!=t[this.var.updateTimeout]&&(clearInterval(t[this.var.updateTimeout]),t[this.var.updateTimeout]=null),this.launchEventsByTarget("mouseover",{el:t,e:e})}},{key:"onMouseLeave",value:function(t,e){t.pos=!1,t[this.var.updateTimeout]=setTimeout(function(){t[this.var.needsUpdate]=!1,t[this.var.updateTimeout]=null}.bind(this),500),this.launchEventsByTarget("mouseleave",{el:t,e:e})}},{key:"onMouseMove",value:function(t,e){t.pos={x:e.offsetX,y:e.offsetY},this.launchEventsByTarget("mousemove",{el:t,e:e})}},{key:"onMouseDown",value:function(t,e){t[this.var.isActive]=!0,this.launchEventsByTarget("mousedown",{el:t,e:e})}},{key:"onMouseUp",value:function(t){for(var e=0;e<this.el.length;e++)this.el[e][this.var.isActive]=!1;this.launchEventsByTarget("mouseup",{e:t})}},{key:"run",value:function(){this.prop.run&!this.running&&(this.running=!0,window.requestAnimationFrame(this.loop.bind(this)))}},{key:"loop",value:function(){this.prop.run?window.requestAnimationFrame(this.loop.bind(this)):this.running=!1,this.renderCanvas()}},{key:"clearPos",value:function(){for(var t=0;t<this.el.length;t++)this.el[t].pos=null}},{key:"init",value:function(){this.data={proceeded:this.dataPrefix+"-proceeded"},this.var={isActive:this.prefix+"-isActive",needsUpdate:this.prefix+"-needsUpdate",updateTimeout:this.prefix+"-updateTimeout",points:this.prefix+"-points",width:this.prefix+"-width",height:this.prefix+"-height",ctx:this.prefix+"-ctx",temp:this.prefix+"-temp"},this.dynamicVars=["buldge","color","fillColor","opacity","noStroke","lineIn","tapScale"],this.running=!1,this.resizeID=null,this.el=[];var t=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!t&&(this.setVars(),this.create(),this.setEventsUniversal(),this.run(),Object.assign(t,{update:this.update.bind(this),clearPos:this.clearPos.bind(this),setSize:this.setSize.bind(this),renderCanvas:this.renderCanvas.bind(this)}))}}]),s}(),g.prototype.Cart=function(t){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d(this,s);var e=h(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,t));for(var i in e.prefix=e.prefix+"cart",e.prop=Object.assign(e.prop,{urls:{add:"",addArray:"",remove:"",removeArray:"",change:"",changeArray:"",update:""},initLoad:!0,separator:",",selectorTotal:"."+e.prefix+"__total",selectorAdd:"."+e.prefix+"__add",total:0}),t)e.prop[i]=t[i];return e.targets=["start","html","total","add","change","remove"],e}return l(s,g.prototype.Class),o(s,[{key:"check",value:function(){var t=this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["urls","object"],["initLoad","boolean"],["separator","string"],["selectorTotal","string"],["selectorAdd","string"],["total","integer"]]});return!!t&&!!(t=this.checkTypes({obj:this.prop.urls,name:this.name,console:this.prop.console,vars:[["add","string"],["addArray","string"],["remove","string"],["removeArray","string"],["change","string"],["changeArray","string"],["update","string"]]}))}},{key:"start",value:function(){this.prop.initLoad&&this.loadHTML(),this.totalGet(),this.totalSet(),this.setAdd(),this.launchEventsByTarget("start")}},{key:"setAdd",value:function(){for(var t=this.prop.v.doc().querySelectorAll(this.prop.selectorAdd),e=0;e<t.length;e++)void 0===t[e][this.data.proceeded]&&(t[e].addEventListener("click",this.eventAdd.bind(this,t[e])),t[e][this.data.proceeded]=!0)}},{key:"loadHTML",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){};this.prop.v.ajax({url:this.prop.urls.update,method:"post",data:{ajaxCart:1},callback:this.loadHTMLCallback.bind(this,t),fail:this.loadHTML.bind(this)})}},{key:"loadHTMLCallback",value:function(t,e){t(this.html=e),this.launchEventsByTarget("html",{html:e})}},{key:"set",value:function(t){var e=this.setCheck(t);if(!e)return!1;var i=this.setCreate(e);return this.obj[i.id]=i,this.setElements(i),!0}},{key:"setCheck",value:function(t){var e={selector:"#"+this.prefix,selectorProduct:"."+this.prefix+"__product",selectorItem:"."+this.prefix+"__item",selectorRemove:"."+this.prefix+"__remove",selectorCount:"."+this.prefix+"__count",selectorPlus:"."+this.prefix+"__plus",selectorMinus:"."+this.prefix+"__minus",selectorUpdate:"."+this.prefix+"__update"};for(var i in t)e[i]=t[i];if(!this.checkTypes({obj:e,name:this.name,console:this.prop.console,vars:[["selector","dom"],["selectorProduct","string"],["selectorItem","string"],["selectorRemove","string"],["selectorPlus","string"],["selectorMinus","string"],["selectorCount","string"],["selectorUpdate","string"]]}))return!1;var s=this.prop.v.doc().querySelector(e.selector);return void 0===s[this.data.proceeded]&&(s[this.data.proceeded]=!0,e)}},{key:"setCreate",value:function(t){var e=this.prop.v.doc().querySelector(t.selector);return{id:this.prefix+"_"+ +new Date+"_"+this.randInt(0,1e3),prop:t,outer:e,remove:[],plus:[],minus:[],count:[]}}},{key:"setElements",value:function(t){this.setRemove(t),this.setCount(t),this.setPlus(t),this.setMinus(t)}},{key:"setRemove",value:function(t){var e=t.outer.querySelectorAll(t.prop.selectorRemove);t.remove=e;for(var i=0;i<e.length;i++)void 0===e[i][this.data.proceeded]&&(e[i].addEventListener("click",this.eventRemove.bind(this,e[i])),e[i][this.data.proceeded]=!0)}},{key:"setCount",value:function(t){var e=t.outer.querySelectorAll(t.prop.selectorCount);t.count=e;for(var i=0;i<e.length;i++)void 0===e[i][this.data.proceeded]&&("INPUT"==e[i].tagName||"TEXTAREA"==e[i].tagName?(e[i].addEventListener("keypress",this.eventChangeKeypress.bind(this,t,e[i])),e[i].addEventListener("blur",this.eventChangeValue.bind(this,t,e[i])),void 0===e[i][this.data.prevValue]&&(e[i][this.data.prevValue]=
1parseInt(e[i].value))):void 0===e[i][this.data.prevValue]&&(e[i][this.data.prevValue]=parseInt(e[i].innerText)),e[i][this.data.proceeded]=!0)}},{key:"setPlus",value:function(t){var e=t.outer.querySelectorAll(t.prop.selectorPlus);t.plus=e;for(var i=0;i<e.length;i++)void 0===e[i][this.data.proceeded]&&(e[i].addEventListener("click",this.eventPlusMinus.bind(this,t,e[i],"plus")),e[i][this.data.proceeded]=!0)}},{key:"setMinus",value:function(t){var e=t.outer.querySelectorAll(t.prop.selectorMinus);t.minus=e;for(var i=0;i<e.length;i++)void 0===e[i][this.data.proceeded]&&(e[i].addEventListener("click",this.eventPlusMinus.bind(this,t,e[i],"minus")),e[i][this.data.proceeded]=!0)}},{key:"loadingCheck",value:function(){return!this.loading}},{key:"getIds",value:function(t){return"number"==typeof t&&(t+=""),"string"==typeof t&&(t=t.split(this.prop.separator)),t}},{key:"eventRemove",value:function(t,e){if(e.preventDefault(),!this.loadingCheck())return!1;var i=t.getAttribute(this.data.id);if(null==i)return!1;this.remove(i)}},{key:"remove",value:function(t){if(!this.loadingCheck())return!1;this.loading=!0;var e="";1==(t=this.getIds(t)).length?(e=this.prop.urls.remove,t=t[0]):e=this.prop.urls.removeArray,this.prop.v.ajax({url:e,method:"post",data:{ajaxCart:1,id:t},callback:this.actionCallback.bind(this,"remove"),fail:this.remove.bind(this,t)})}},{key:"eventChangeKeypress",value:function(t,e,i){if(!this.loadingCheck())return i.preventDefault(),!1;var s=(i=i||window.event).which?i.which:i.keyCode;31<s&&(s<48||57<s)&&i.preventDefault()}},{key:"eventChangeValue",value:function(t,e,i){if(!this.loadingCheck())return!1;var s=e.getAttribute(this.data.id);if(null==s)return!1;var r="",o=!0;if(e[this.data.prevValue]==(r="INPUT"==e.tagName||"TEXTAREA"==e.tagName?parseInt(e.value):parseInt(e.innerText))&&(o=!1),0<r?r<10&&(r="0"+r):r="0",o||("INPUT"==e.tagName||"TEXTAREA"==e.tagName?e.value=r:e.innerHTML=r),o){for(var n=[],a=0;a<t.count.length;a++){t.count[a].getAttribute(this.data.id)==s&&("INPUT"==t.count[a].tagName||"TEXTAREA"==t.count[a].tagName?t.count[a].value=r:t.count[a].innerHTML=r,t.count[a][this.data.prevValue]=parseInt(r),n.push(parseInt(r)))}this.change(s,n)}}},{key:"eventPlusMinus",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"plus";if(arguments[3].preventDefault(),!this.loadingCheck())return!1;var s=e.getAttribute(this.data.id);if(null==s)return!1;var r=1;"minus"==i&&(r=-1);for(var o=[],n=0;n<t.count.length;n++){if(t.count[n].getAttribute(this.data.id)==s){var a=0;"INPUT"==t.count[n].tagName||"TEXTAREA"==t.count[n].tagName?(0<(a=parseInt(t.count[n].value)+r)?a<10&&(a="0"+a):a="0",t.count[n].value=a):(0<(a=parseInt(t.count[n].innerHTML)+r)?a<10&&(a="0"+a):a="0",t.count[n].innerHTML=a),t.count[n][this.data.prevValue]=parseInt(a),o.push(parseInt(a))}}this.change(s,o)}},{key:"change",value:function(t,e){if(!this.loadingCheck())return!1;this.loading=!0;var i="";1==(t=this.getIds(t)).length?(i=this.prop.urls.change,t=t[0],e=e[0]):i=this.prop.urls.changeArray,this.prop.v.ajax({url:i,method:"post",data:{ajaxCart:1,id:t,quantity:e},callback:this.actionCallback.bind(this,"change"),fail:this.change.bind(this,t)})}},{key:"isJSON",value:function(t){return!!/^[\],:{}\s]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))}},{key:"eventAdd",value:function(t,e){if(e.preventDefault(),!this.loadingCheck())return!1;var i=t.getAttribute(this.data.data);return null!=i&&(!!this.isJSON(i)&&(i=JSON.parse(i),void this.addToCart(i)))}},{key:"addToCart",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this.loadingCheck())return!1;this.loading=!0;var e="";e=1==Object.keys(t).length?this.prop.urls.add:this.prop.urls.addArray,t=Object.assign(t,{ajaxCart:1}),this.prop.v.ajax({url:e,method:"post",data:t,callback:this.actionCallback.bind(this,"add"),fail:this.addToCart.bind(this,t)})}},{key:"actionCallback",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=arguments[1];"string"==typeof e&&(e=JSON.parse(e));var i=parseInt(e.success),s=parseInt(e.count);if(1!=i)return!1;this.update(t),this.totalSet(s)}},{key:"update",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";this.loadHTML(this.updateCallback.bind(this,t))}},{key:"updateCallback",value:function(t,e){var i=document.createElement("html");i.innerHTML=e,this.updateElements(i),this.updateItems(i,"selectorItem"),this.updateItems(i,"selectorProduct",this.data.idProduct),this.launchEventsByTarget(t,{}),this.loading=!1}},{key:"updateElements",value:function(t){for(var e in this.obj)for(var i=this.obj[e].outer.querySelectorAll(this.obj[e].prop.selectorUpdate),s=t.querySelectorAll(this.obj[e].prop.selectorUpdate),r=0;r<i.length;r++)for(var o=i[r].getAttribute(this.data.update),n=0;n<s.length;n++){s[n].getAttribute(this.data.update)==o&&(i[r].innerHTML=s[n].innerHTML)}}},{key:"updateItems",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"selectorItem",i=2<
1arguments.length&&void 0!==arguments[2]?arguments[2]:this.data.id;for(var s in this.obj)for(var r=this.obj[s].outer.querySelectorAll(this.obj[s].prop[e]),o=t.querySelectorAll(this.obj[s].prop[e]),n=0;n<r.length;n++){for(var a=r[n].getAttribute(i),h=!1,l=0;l<o.length;l++){o[l].getAttribute(i)==a&&(h=!0)}h||$(r[n]).stop().slideUp(350,function(t){t.parentNode.removeChild(t)}.bind(this,r[n]))}}},{key:"totalGet",value:function(){this.totals=this.prop.v.doc().querySelectorAll(this.prop.selectorTotal)}},{key:"totalSet",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.prop.total;t<10&&(t="0"+t);for(var e=0;e<this.totals.length;e++)0<t?this.totals[e].classList.add(this.prefix+"__total_empty"):this.totals[e].classList.remove(this.prefix+"__total_empty"),this.totals[e].innerHTML=t;this.total=parseInt(t),this.launchEventsByTarget("total",{total:this.total})}},{key:"init",value:function(){var t=this;this.data={proceeded:this.prefix+"-proceeded",prevValue:this.prefix+"-prevValue",id:"data-"+this.prefix+"-id",idProduct:"data-"+this.prefix+"-id-product",data:"data-"+this.prefix+"-data",update:"data-"+this.prefix+"-update"},this.html="",this.loading=!1,this.obj={};var e=p(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.total=0,this.totals=[],this.start(),Object.assign(e,{html:function(){return t.html},loading:function(){return t.loading},set:this.set.bind(this),obj:function(){return t.obj},update:this.update.bind(this),remove:this.remove.bind(this),change:this.change.bind(this),addToCart:this.addToCart.bind(this),total:function(){return t.total},totalGet:this.totalGet.bind(this),totalSet:this.totalSet.bind(this),setAdd:this.setAdd.bind(this)}))}}]),s}(),g.prototype.init=function(){var t=this;if(!this.checkTypes({obj:this.prop,name:this.name,console:this.prop.console,vars:[["console","boolean"],["page","string"],["tablet","integer"],["mobile","integer"]]}))return!1;this.console("Hello, V!",null,"title",!0),this.loadEvent(),this.setPage(),this.os=this.setOS(),this.document.classList.add(this.prefix+"os_"+this.os),this.console("OS: "+this.os),this.browser=this.setBrowser(),this.document.classList.add(this.prefix+"browser_"+this.browser),this.console("Browser: "+this.browser),this.popState(),this.viewport=new this.Viewport(this.prop),this.viewport=this.viewport.init();var e=new this.Keydown({console:this.prop.console});e=e.init();var i=new this.Swipe({console:this.prop.console});i=i.init();var s=new this.Drag({console:this.prop.console});s=s.init();var r=new this.Wheel({console:this.prop.console});r=r.init();var o=new this.Interval({console:this.prop.console});return o=o.init(),{prop:function(){return t.prop},prefix:function(){return t.prefix},time:function(){return t.time},loaded:function(){return t.loaded},addLoad:this.addLoad.bind(this),deleteLoad:this.deleteLoad.bind(this),checkType:this.checkType.bind(this),checkTypes:this.checkTypes.bind(this),childOf:this.childOf.bind(this),removeChildren:this.removeChildren.bind(this),insertAfter:this.insertAfter.bind(this),bindEventListener:this.bindEventListener.bind(this),getEventListener:this.getEventListener.bind(this),unbindEventListener:this.unbindEventListener.bind(this),getPage:function(){return t.page},os:function(){return t.os},browser:function(){return t.browser},console:this.console.bind(this),checkPage:this.checkPage.bind(this),timeMin:function(){return t.timeMin},ajaxTimeMax:function(){return t.ajaxTimeMax},doc:function(){return t.doc},document:function(){return t.document},body:function(){return t.body},viewport:this.viewport,vw:this.viewport.vw.bind(this),vh:this.viewport.vh.bind(this),dpr:this.viewport.dpr.bind(this),desktop:this.viewport.desktop.bind(this),tablet:this.viewport.tablet.bind(this),mobile:this.viewport.mobile.bind(this),mobileCheck:this.mobileCheck.bind(this),getResize:this.viewport.events.bind(this),addResize:this.addResize.bind(this),deleteResize:this.deleteResize.bind(this),turnResize:this.turnResize.bind(this),getParam:this.getParam.bind(this),setParam:this.setParam.bind(this),ajax:this.ajax.bind(this),ajaxCache:function(){return t.ajaxCache},ajaxClearCache:this.ajaxClearCache.bind(this),bezier:this.bezier.bind(this),depthPercent:this.depthPercent.bind(this),randInt:this.randInt.bind(this),radians:this.radians.bind(this),degrees:this.degrees.bind(this),imageSize:this.imageSize.bind(this),Class:this.Class,Event:this.Event,keydown:e,swipe:i,drag:s,wheel:r,interval:o,normalizeWheel:this.normalizeWheel,Preloader:this.Preloader,Scrollbar:this.Scrollbar,Animate:this.Animate,AnimationFrame:this.AnimationFrame,TextAnimate:this.TextAnimate,Slider:this.Slider,SliderCanvas:this.SliderCanvas,SliderContent:this.SliderContent,Cursor:this.Cursor,Menu:this.Menu,Filter:this.Filter,Media:this.Media,AjaxContent:this.AjaxContent,AjaxPage:this.AjaxPage,Page:this.Page,Anchor:this.Anchor,ScrollEvents:this.ScrollEvents,View:this.View,Parallax:this.Parallax,SmoothScroll:this.SmoothScroll,Select:this.Select,Audio:this.Audio,Form:this.Form,Popup:this.Popup,Faq:this.Faq,Map:this.Map,Columns:this.Columns,Clear:this.Clear,SameHeight:this.SameHeight,ElasticButton:this.ElasticButton,Cart:this.Cart}}},{}]},{},[1]),function o(n,a,h){function l(e,t){if(!a[e]){if(!n[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(c)return c(e,!0);var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}var r=a[e]={exports:{}};n[e][0].call(r.exports,function(t){return l(n[e][1][t]||t)}
1,r,r.exports,o,n,a,h)}return a[e].exports}for(var c="function"==typeof require&&require,t=0;t<h.length;t++)l(h[t]);return l}({1:[function(t,e,i){"use strict";var o=function(){function s(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}}(),h=function t(e,i,s){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,s)}if("value"in r)return r.value;var n=r.get;return void 0!==n?n.call(s):void 0};function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}window.page={bezier:{on:!0,values:[.25,.1,.25,1]},bezierText:{on:!0,values:[.25,.1,.25,1]},current:!1,prevName:"",smoothScroll:!1,scrollSelector:void 0,ajaxBool:!0,ajaxHideBool:!0},page.preloaderHidden=!1,page.preloaderObj={k:.03,duration:3e3,init:function(){this.outer=document.querySelector(".v-preloader"),this.before=document.querySelector(".v-preloader__before"),this.percent=document.querySelector(".v-preloader__percent"),this.progress=document.querySelector(".v-preloader__progress"),page.preloader=new v.Preloader({console:!1,animationInner:0,animation:v.checkPage("home")?0:500,progress:{on:!!v.checkPage("home"),animate:!0,k:this.k,forceEnd:!0,duration:this.duration,bezier:page.bezier},hide:!v.checkPage("home")}),page.preloader=page.preloader.init(),this.events()},events:function(){var i=this;page.preloader.add({do:function(){i.onhidden()}}),page.preloader.add({target:"progressAnimate",do:function(t){i.progressAnimate(t)}}),page.preloader.add({target:"hide",do:function(){i.outer.classList.add("hide");var t=document.querySelector(".home__screen");if(null!=t){var e=t.getBoundingClientRect();i.before.style.height=t.clientHeight+e.top+"px",setTimeout(function(){i.before.classList.add("hide")},500),setTimeout(function(){page.preloader.hide()},1e3)}else setTimeout(function(){page.preloader.hide()},750)}})},onhidden:function(){page.helpers.showAfterLoad(),page.preloaderHidden=!0},progressAnimate:function(t){this.progress.style.width=100*t.progress+"%";var e=parseInt(100*t.progress);100==e&&(e=99),e<10&&(e="0"+e),this.percent.innerHTML=e+"%"}},page.helpers={getElements:function(){return page.wrap=document.querySelector(".page-wrap"),page.screen=document.querySelector(".page__screen"),page.default=document.querySelector(".default"),page.header=document.querySelector(".v-header"),page.logo=document.querySelector(".v-header__logo"),page.languages=document.querySelector(".v-header__languages"),page.footer=document.querySelector(".v-footer"),page.headerCart=document.querySelector("#shop__cart"),page.headerWishlist=document.querySelector("#shop__wishlist"),page.headerSearch=document.querySelector(".v-header__search"),!0},elementsEvents:function(){(null!==page.headerCart&&page.headerCart.addEventListener("click",function(t){t.preventDefault(),page.headerCart.classList.contains("empty")||v.popupCart.show({selector:"#popup__cart",types:["2level","cart"]})}.bind(this)),null!==page.headerSearch)&&(null===page.headerSearch.getAttribute("data-click-proceeded")&&(page.headerSearch.addEventListener("click",function(t){t.preventDefault(),page.search.init(),page.search.show()}.bind(this)),page.headerSearch.setAttribute("data-click-proceeded","true")));return!0},changeAjaxElements:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(null===t)return!1;var e={old:document.querySelector(".v-header__logo"),new:t.querySelector(".v-header__logo")};null!==e.old&null!==e.new&&(e.old.innerHTML=e.new.innerHTML);document.querySelectorAll(".v-header__menu li"),t.querySelectorAll(".v-header__menu li");this.changeLinks(t,".v-header__menu","a"),this.changeLinks(t,".v-header__menu","section");for(var i={old:document.querySelectorAll(".v-menu__links a"),new:t.querySelectorAll(".v-footer__menu a, .v-footer__submenu_sub a")},s=0;s<i.old.length;s++){for(var r=i.old[s].getAttribute("href"),o=!1,n=0;n<i.new.length;n++){i.new[n].getAttribute("href")==r&&i.new[n].classList.contains("active")&&(o=!0)}o?i.old[s].classList.add("active"):i.old[s].classList.remove("active")}for(var a={old:document.querySelectorAll(".v-header__languages option"),new:t.querySelectorAll(".v-header__languages option")},h=0;h<a.old.length;h++){var l=a.old[h].innerHTML;l=(l=l.replace(/\s+/g," ").trim()).toLowerCase();for(var c=0;c<a.new.length;c++){var p=a.new[c].innerHTML;l==(p=(p=p.replace(/\s+/g," ").trim()).toLowerCase())&&a.old[h].setAttribute("value",a.new[c].getAttribute("value"))}}return page.helpers.getElements(),!0},changeLinks:function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=2<
1arguments.length&&void 0!==arguments[2]?arguments[2]:"",s=document.querySelectorAll(e+" "+i),r=t.querySelectorAll(e+" "+i),o=[],n=0;n<r.length;n++)r[n].classList.contains("active")&&o.push(n);for(var a=0;a<s.length;a++){for(var h=!1,l=0;l<o.length;l++)o[l]==a&&(h=!0);h?s[a].classList.add("active"):s[a].classList.remove("active")}},showAjaxHidden:function(){for(var t=document.querySelectorAll(".ajax_hidden"),e=0;e<t.length;e++)t[e].classList.remove("ajax_hidden");return!0},scrollSelector:function(){if(void 0===page.scrollSelector)return this.changeScrollSelector(),v.viewport.add({target:"w",name:"Scroll Selector",do:this.changeScrollSelector.bind(this),timeout:50}),!0},changeScrollSelector:function(){v.mobile()||v.tablet()?page.scrollSelector="#wrap":page.scrollSelector="#v-scrollbar"},setFullHeight:function(){for(var t=document.querySelectorAll(".fullHeight"),e=0;e<t.length;e++)t[e].style.height=v.vh()[1]+"px";for(var i=document.querySelectorAll(".fullHeightMin"),s=0;s<i.length;s++)i[s].style.minHeight=v.vh()[1]+"px";for(var r=document.querySelectorAll(".fullHeight-110"),o=0;o<r.length;o++)v.desktop()?r[o].style.minHeight="0":v.tablet()?r[o].style.minHeight=v.vh()[1]-110+"px":600<=v.vw()[1]?r[o].style.minHeight=v.vh()[1]-85+"px":r[o].style.minHeight=v.vh()[1]-120+"px"},setRem:function(){var t=v.vw()[1],e=0;v.desktop()?e=v.vw()[1]<=1620&1440<=v.vw()[1]?1+.125*((v.vw()[1]-1440)/180):1620<v.vw()[1]?1.125:t/1440:v.mobile()&&(700<v.vw()[1]?e=t/768:window.innerHeight>window.innerWidth&&(e=t/320));var i=Math.floor(16*e);0==i&&(i=16),"ie"!=v.browser()&&"edge"!=v.browser()||(i=16),v.document().style.fontSize=i+"px"},showAfterLoad:function(){for(var t=document.querySelectorAll(".page__afterLoad"),e=0;e<t.length;e++)t[e].classList.add("show")},miniHeader:function(){var t=document.querySelector("#v-scrollbar");return null!==(page.helpers.miniHeaderScrollOuter=t)&&page.current.addEventListener({el:t,target:"scroll",do:page.helpers.miniHeaderFunc.bind(this)}),page.current.addEventListener({el:window,target:"scroll",do:page.helpers.miniHeaderFunc.bind(this)}),page.helpers.miniHeaderFunc(),!0},miniHeaderFunc:function(){var t=0;return"html"===page.scrollSelector?t=window.pageYOffset:null!==page.helpers.miniHeaderScrollOuter&&(t=page.helpers.miniHeaderScrollOuter.scrollTop),150<=t?page.header.classList.contains("v-header_mini")||page.header.classList.add("v-header_mini"):page.header.classList.contains("v-header_mini")&&page.header.classList.remove("v-header_mini"),!0},sticky:function(){if("edge"!=v.browser()&&"ie"!=v.browser()&&(this.stickyBlocks=document.querySelectorAll(".sticky"),this.stickyTriggers=document.querySelectorAll(".sticky_el"),0!=this.stickyBlocks.length&&0!=this.stickyTriggers.length)){for(var t=0;t<this.stickyBlocks.length;t++){var e=document.createElement("div");for(e.classList.add("sticky__inner");0<this.stickyBlocks[t].childNodes.length;)e.appendChild(this.stickyBlocks[t].childNodes[0]);this.stickyBlocks[t].appendChild(e),this.stickyBlocks[t].innerBlock=e,this.stickyBlocks[t].firstStart=!0}this.stickyResize(),v.addLoad(this.stickyResize.bind(this)),page.current.add({target:"resizeW",do:this.stickyResize.bind(this),timeout:500});var i=document.querySelector("#v-scrollbar");null!==i&&(page.current.addEventListener({el:i,target:"scroll",do:this.stickyFunc.bind(this)}),page.current.addEventListener({el:i,target:"wheel",do:this.stickyFunc.bind(this)}));var s=document.querySelector("#wrap");return null!==s&&page.current.addEventListener({el:s,target:"scroll",do:this.stickyFunc.bind(this)}),this.stickyFunc(!1),!0}},stickyResize:function(){for(var t=0;t<this.stickyBlocks.length;t++)this.stickyBlocks[t].style.height=this.stickyBlocks[t].innerBlock.clientHeight+"px"},stickyFunc:function(){for(var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=0;e<this.stickyBlocks.length;e++){if(t&&this.stickyBlocks[e].firstStart){for(var i=this.stickyBlocks[e].querySelectorAll(".v-view"),s=0;s<i.length;s++)i[s].classList.add("v-viewed");this.stickyBlocks[e].firstStart=!1}var r=this.stickyBlocks[e].getBoundingClientRect(),o=this.stickyBlocks[e].innerBlock,n=Math.round(r.top+o.getBoundingClientRect().height-page.footer.getBoundingClientRect().top+.2*v.vh()[1]),a=1.5*page.header.clientHeight;r.top-a<=0?r.top-a<=n?(o.classList.add("stop"),o.classList.remove("run"),o.style.top=-n+"px"):(o.classList.add("run"),o.classList.remove("stop"),o.style.top=a+"px"):(o.classList.remove("run"),o.classList.remove("stop"),o.style.top="")}},footerSubscribe:function(){var t=new v.Form({console:!1,selector:".v-footer .v-footer__subscribe .v-form",clearAfterSuccess:!1,scroll:!1});return(t=t.init())&&t.add({target:"success",do:function(t){v.popup.show({selector:"#popup__subscribe",types:["modal","subscribe"]}),setTimeout(function(){v.popup.hideAll()},7e3)}.bind(this)}),!0},footerMenu:function(){for(var t=document.querySelector(".v-footer .v-footer__submenu"),e=document.querySelector(".v-footer .v-footer__submenu_sub"),i=t.querySelectorAll("li"),s=e.querySelectorAll("a"),r=null,o=null,n=0,a=0;n<s.length;n++)0==a&&((r=document.createElement("li")).classList.add("v-footer__submenu-links"),r.classList.add("footermenu"),t.insertBefore(r,i[i.length-1]),o=document.createElement("nav"),r.appendChild(o)),o.appendChild(s[n]),3<=++a&&(a=0)},locationeEnable:function(){page.location=!1,window.onload=function(){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(t){page.location={latitude:t.coords.latitude,longitude:t.coords.longitude},page.helpers.howToGetLinks()},function(t){console.log("Error occurred. Error code: "+t.code),page.helpers.howToGetLinks()})}}.bind(this)},howToGetLinks:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".how-to-get-link",e=document.querySelectorAll(t),i=0;i<e.length;i++){var s=e[i];page.location?s.setAttribute("href","https://www.google.ru/maps/dir/'"+page.location.latitude+","+page.location.longitude+"'/'59.9347205,30.342881199999965'"):s.setAttribute("href","https://goo.gl/maps/M31aCDmVrF6qiMip8")}}},page.product={wishlistAdd:v.body().getAttribute("data-wishlist-add"),wishlistRemove:v.body().getAttribute("data-wishlist-remove"),cartAdd:v.body().getAttribute("data-cart-add"),cartRemove:v.body().getAttribute("data-cart-remove"),cartChange:v.body().getAttribute("data-cart-change"),cartUpdate:v.body().getAttribute("data-cart-update"),waitingAdd:v.body().getAttribute("data-waiting-ad
1d"),waitingRemove:v.body().getAttribute("data-waiting-remove"),getCategory:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"cart",e=null;return"cart"===t?e=page.headerCart:"wishlist"===t&&(e=page.headerWishlist),null!==e&&e},add:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"cart",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){};if(!page.product.getCategory(t)&"waiting"!==t)return!1;v.ajax({method:"get",url:page.product[t+"Add"],data:{id:e},callback:function(t,e){var i=e,s=parseInt(i.success),r=parseInt(i.count);1==s&&(o(e),page.product.initCount(t,r),page.product.updateCart("cart"===t,"add"))}.bind(this,t)});return!0},remove:function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"cart",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){};if(!page.product.getCategory(r)&"waiting"!==r)return!1;v.ajax({method:"get",url:page.product[r+"Remove"],data:{id:t},callback:function(t){var e=t,i=parseInt(e.success),s=parseInt(e.count);1==i&&(o(t),page.product.initCount(r,s),page.product.updateCart())}.bind(this)});return!0},change:function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"cart",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){};if(!page.product.getCategory(r))return!1;v.ajax({method:"get",url:page.product[r+"Change"],data:{id:t,count:e},callback:function(t){var e=t,i=parseInt(e.success),s=parseInt(e.count);1==i&&(o(t),page.product.initCount(r,s),page.product.updateCart(!1,"change"))}.bind(this)});return!0},updateCart:function(){var n=0<arguments.length&&void 0!==arguments[0]&&arguments[0],a=(1<arguments.length&&void 0!==arguments[1]&&arguments[1],document.querySelector("#popup__cart .popup__cart"));if(null===a)return!1;v.ajax({method:"get",data:{},url:page.product.cartUpdate,callback:function(t){var e=document.createElement("html");e.innerHTML=t;var i=a.querySelector(".cart__items"),s=e.querySelector(".cart__items");null!==i&null!==s&&(i.innerHTML=s.innerHTML);var r=a.querySelector(".cart__total b"),o=e.querySelector(".cart__total b");null!==r&null!==o&&(r.innerHTML=o.innerHTML),n&!v.popupCart.shown()&&v.popupCart.show({selector:"#popup__cart",types:["2level","cart"]}),setTimeout(page.cart.update.bind(this),v.timeMin())}.bind(this)});return!0},initCount:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"cart",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=page.product.getCategory(t);if(!s)return!1;var r=s.querySelector(".count");if(null==r)return!1;i&&(e=r.innerHTML);var o=e=parseInt(e);o<10&&(o="0"+o),0<o&&(r.innerHTML=o);return i&&0,0<e?s.classList.contains("empty")&&s.classList.remove("empty"):s.classList.contains("empty")||(s.classList.add("empty"),r.innerHTML=o),!0},initProductItems:function(){return page.product.setWishlistClick(),page.product.setCartClick(),!0},setWishlistClick:function(){for(var t=document.querySelectorAll(".product__wishlist-add"),e=0;e<t.length;e++){null===t[e].getAttribute("data-product-proceeded")&&(t[e].setAttribute("data-product-proceeded","true"),page.current.p().addEventListener({el:t[e],target:"click",do:page.product.wishlistClick.bind(this,t[e])}))}},wishlistClick:function(e,t){t.preventDefault();var i=e.getAttribute("data-id");e.classList.contains("active")?page.product.remove("wishlist",i,function(){if(e.classList.remove("active"),page.default.classList.contains("wishlist")&&e.parentNode.parentNode.classList.contains("catalog__item")){e.parentNode.parentNode.classList.add("disabled");var t=e.parentNode.parentNode.querySelector(".catalog__cart");null!==t&&$(t).stop().slideUp(250)}}.bind(this)):page.product.add("wishlist",i,function(){e.classList.add("active"),page.default.classList.contains("wishlist")&&e.parentNode.parentNode.classList.contains("catalog__item")&&e.parentNode.parentNode.classList.remove("disabled")}.bind(this))},setCartClick:function(){for(var t=document.querySelectorAll(".shop__add, .product__cart-add"),e=0;e<t.length;e++){null===t[e].getAttribute("data-product-proceeded")&&(t[e].setAttribute("data-product-proceeded","true"),page.current.p().addEventListener({el:t[e],target:"click",do:page.product.cartClick.bind(this,t[e])}))}},cartClick:function(t,e){e.preventDefault();var i=t.getAttribute("data-id");page.product.add("cart",i),t.classList.contains("product__cart-add")&&t.classList.add("active")}},page.popup={init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".v-popup";if(null===document.querySelector(t))return!1;page.popup.scroll(t)},scroll:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".v-popup",e=document.querySelectorAll(t+" .popup__scroll"),i=0;i<e.length;i++){var s="popup__scroll_"+v.randInt(0,500)+"_"+ +new Date;e[i].setAttribute("id",s);var r=new v.Scrollbar({console:!1,selector:t+" #"+s});
1r=r.init()}}},page.cart={ids:[],outer:null,items:[],popupHTML:document.querySelector("#popup__cart .popup__cart"),outerProceed:null,init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".v-popup",e=document.querySelector(t);if(null===e)return!1;if(page.cart.outer=e.querySelector(".popup__cart"),null!=page.cart.outer){page.cart.getProductIds(),page.cart.deleteEvents(),page.cart.changeEvents();var i=e.querySelector(".a-button");i&&i.removeAttribute("data-v-ajaxPage-proceeded"),page.ajax&&(page.ajax.getElements(),page.ajax.setEvents()),page.cart.updateStock()}},update:function(){if(!("cartPage"!==page.current.name()&!v.popupCart.shown())){var t={old:page.cart.outer.querySelector(".cart__total b"),new:page.cart.popupHTML.querySelector(".cart__total b")};null!==t.old&null!==t.new&&(t.old.innerHTML=t.new.innerHTML);var e={old:page.cart.outer.querySelectorAll(".cart__items .cart__item"),new:page.cart.popupHTML.querySelectorAll(".cart__items .cart__item")};page.cart.updateItems(e.old,e.new),page.cart.updateStock()}},updateStock:function(){var t=page.cart.outer.querySelector(".popup__title_error");null!==t&&(0<page.cart.outer.querySelectorAll(".cart__stock").length?t.classList.remove("display_none"):t.classList.add("display_none"))},updateItems:function(t,e){for(var i=[],s=0;s<e.length;s++){var r=e[s].getAttribute("data-id");r=parseInt(r);for(var o=!1,n=0;n<page.cart.ids.length;n++)r==page.cart.ids[n]&&(o=!0);o||i.push(e[s]);for(var a=0;a<t.length;a++){var h=t[a].getAttribute("data-id");if((h=parseInt(h))==r){var l=e[s].querySelector(".cart__price"),c=t[a].querySelector(".cart__price");null!==l&null!==c&&(c.innerHTML=l.innerHTML);var p=e[s].querySelector(".cart__price_total"),u=t[a].querySelector(".cart__price_total");null!==p&null!==u&&(u.innerHTML=p.innerHTML)}}}var d=page.cart.outer.querySelector(".cart__items");if(null!=d)for(var g=0;g<i.length;g++){var f=document.createElement("html");f.innerHTML=i[g].outerHTML;for(var m=f.querySelectorAll("a"),y=0;y<m.length;y++)m[y].removeAttribute("data-v-ajaxPage-proceeded");var b=f.querySelector(".cart__item");null!==b&&(b.classList.add("display_none"),0<d.children.length?d.insertBefore(b,d.children[0]):d.appendChild(b),$(b).stop().slideDown(350))}"cartPage"!==page.current.name()?page.cart.init("#"+v.popupCart.id()):page.cart.init("#cartPage__items"),setTimeout(function(){page.cart.updateStock()},375)},getProductIds:function(){page.cart.items=page.cart.outer.querySelectorAll(".cart__item");for(var t=[],e=0;e<page.cart.items.length;e++){var i=page.cart.items[e].getAttribute("data-id");i=parseInt(i);for(var s=!1,r=0;r<t;r++)t[r]===i&&(s=!0);s||t.push(i)}if(page.cart.ids=t,0===page.cart.ids.length&&(v.popupCart.shown()&&v.popupCart.hideAll(),"cartPage"==page.current.name())){var o=document.querySelector(".cartPage__left"),n="";o&&(n=o.getAttribute("data-href")),location.href=n}},removeProductId:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;t=parseInt(t);for(var e=[],i=0;i<page.cart.ids.length;i++)page.cart.ids[i]!==t&&e.push(page.cart.ids[i]);page.cart.ids=e},deleteEvents:function(){for(var t=page.cart.outer.querySelectorAll(".cart__delete a"),e=0;e<t.length;e++){null===t[e].getAttribute("data-click-proceeded")&&(t[e].addEventListener("click",function(t,e){e.preventDefault();var i=t.getAttribute("data-id");i=parseInt(i),page.cart.removeProductId(i),page.cart.removeItem(i),page.product.remove("cart",i)}.bind(this,t[e])),t[e].setAttribute("data-click-proceeded","true"))}},changeEvents:function(){for(var t=page.cart.outer.querySelectorAll(".cart__count"),e=0;e<t.length;e++){if(null===t[e].getAttribute("data-proceeded")){var i=t[e].getAttribute("data-id");i=parseInt(i);var s=t[e].querySelector('input[name="count"]');if(null!==s)s.prevValue=parseInt(s.value.replace(/\s+/g,"")),s.addEventListener("keypress",function(t,e){var i=(e=e||window.event).which?e.which:e.keyCode;31<i&&(i<48||57<i)&&e.preventDefault()}.bind(this,s)),s.addEventListener("blur",page.cart.changeBlur.bind(this,s,i)),t[e].querySelector(".cart__minus").addEventListener("click",function(t,e,
1i){i.preventDefault();var s=t.value;s=parseInt(s.replace(/\s+/g,"")),(s-=1)<10&&(s="0"+s),t.value=s,page.cart.changeBlur(t,e)}.bind(this,s,i)),t[e].querySelector(".cart__plus").addEventListener("click",function(t,e,i){i.preventDefault();var s=t.value;s=parseInt(s.replace(/\s+/g,"")),(s+=1)<10&&(s="0"+s),t.value=s,page.cart.changeBlur(t,e)}.bind(this,s,i)),t[e].setAttribute("data-proceeded","true")}}},changeBlur:function(t,e,i){var s=null;((s=0!=t.value.length?parseInt(t.value.replace(/\s+/g,"")):0)<0||0==s)&&(s=0);var r=s.toString().replace(/(\d{1,3})(?=((\d{3})*)$)/g," $1");" "==r.charAt(0)&&(r=r.substring(1)),t.value=r;var o=parseInt(t.value.replace(/\s+/g,"")),n=o;if(o!=t.prevValue){if(0===o)return page.cart.removeProductId(e),page.cart.removeItem(e),void page.product.remove("cart",e);o<10&&(o="0"+o,t.value=o),t.prevValue=o,page.product.change("cart",e,n)}},removeItem:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;t=parseInt(t),page.cart.items=page.cart.outer.querySelectorAll(".cart__item");for(var e=0;e<page.cart.items.length;e++){var i=page.cart.items[e].getAttribute("data-id");t==(i=parseInt(i))&&$(page.cart.items[e]).stop().slideUp(350,function(t){t.parentNode.removeChild(t),page.cart.getProductIds()}.bind(this,page.cart.items[e]))}},initProceed:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".v-popup";if(page.cart.outerProceed=document.querySelector(t),null===page.cart.outerProceed)return!1;page.form.setForm(t),document.querySelector(t+" .v-form").v_Form_callback=function(t){if(0===t.data.length){page.product.initCount("cart",0),v.popup.show({selector:"#popup__cartsuccess",types:["2level","cartsuccess"]});var i=v.popup.add({target:"hide",do:function(){v.popup.delete(i);var t=document.querySelector(".cartPage__left"),e="";t&&(e=t.getAttribute("data-href")),location.href=e}})}else alert("proceed payment!")};var e=new v.Select({console:!1,selector:t+" .proceed__delivery",scroll:!1,animation:"slide",search:!1,showSelected:!1});(e=e.init()).add({target:"change",do:function(t){if("none"==t.value?t.select.parentNode.classList.remove("v-form__input_focus"):t.select.parentNode.classList.add("v-form__input_focus"),null!==t.options[t.active].getAttribute("data-address")?$(".v-form__input_delivery-address").stop().slideDown(250):$(".v-form__input_delivery-address").stop().slideUp(250),"none"!=t.value){var e=t.options[t.active].getAttribute("data-price");if(null!==e){e=parseInt(e);var i=document.querySelector(".cart__delivery b");null!==i&&(i.innerHTML=e,$(".cart__proceed_delivery .cart__delivery").stop().slideDown(250),$(".cart__proceed_delivery .cart__address").stop().slideUp(250)),$(".cart__proceed_delivery").stop().slideDown(250)}else $(".cart__proceed_delivery").stop().slideDown(250),$(".cart__proceed_delivery .cart__delivery").stop().slideUp(250),$(".cart__proceed_delivery .cart__address").stop().slideDown(250)}else $(".cart__proceed_delivery").stop().slideUp(250),$(".cart__proceed_delivery .cart__delivery").stop().slideUp(250),$(".cart__proceed_delivery .cart__address").stop().slideUp(250)}.bind(this)});var i=new v.Select({console:!1,selector:t+" .proceed__payment",scroll:!1,animation:"slide",search:!1,showSelected:!1});(i=i.init()).add({target:"change",do:function(t){"none"==t.value?t.select.parentNode.classList.remove("v-form__input_focus"):t.select.parentNode.classList.add("v-form__input_focus")}.bind(this)})}},page.form={setForm:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".v-popup",r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=document.querySelectorAll(t+" .v-form"),i=0;i<e.length;i++){var s="v-form_"+v.randInt(0,500)+"_"+ +new Date;e[i].setAttribute("id",s);var o=new v.Form({console:!1,selector:t+" #"+s,clearAfterSuccess:r,scroll:!1});o=o.init(),(e[i].vForm=o).add({target:"success",do:function(t){var e=t.form.getAttribute("data-form-redirect");null!==e&!page.loginCart&&(location.href=e);for(var i=0;i<t.inputs.length;i++)t.inputs[i].parentNode.classList.remove("error");if(t.form.v_Form_callback&&t.form.v_Form_callback(t),r)for(var s=0;s<t.inputs.length;s++)page.form.blurEvent(t.inputs[s].parentNode,t.inputs[s])}.bind(this)}),o.add({target:"fail",do:function(t){for(var e=0;e<t.inputs.length;e++)t.inputs[e].parentNode.classList.remove("error");for(var i=0;i<t.errors.length;i++)t.errors[i].e.parentNode.classList.add("error")}.bind(this)})}return!0}},page.search={shown:!1,outer:document.querySelector("#search__outer"),closeButton:document.querySelector("#search__outer .search__close"),input:document.querySelector("#search__outer .search__input input"),ico:document.querySelector("#search__outer .search__ico"),results:document.querySelector("#search__outer .search__results"),resultsWrap:document.querySelector("#search__outer .search__results .wrap"),inited:!1,all:null,form:!1,mini:!1,view:!1,resizes:[],init:function(){page.search.inited||(page.search.inited=!0,page.search.closeButton.addEventListener("click",function(t){t.preventDefault(),page.search.hide()}.bind(this)),page.search.input.addEventListener("keyup",page.search.keyup.bind(this)),page.search.scrollbarResults=new v.Scrollbar({console:!1,selector:"#search__outer .search__results-scroll"}),page.search.scrollbarResults=page.search.scrollbarResults.init(),page.search.form=new v.Form({console:!1,selector:"#search__outer .search__form",clearAfterSuccess:!1,scroll:!1,useInputs:!1}
1),page.search.form=page.search.form.init(),page.search.form.add({target:"success",do:function(t){if(!(page.search.input.value.length<3)){page.search.outer.classList.add("mini"),page.search.mini=!0,setTimeout(function(){$(page.search.results).stop().fadeIn(250)},150);var e=document.createElement("html");e.innerHTML=t.data;var i=e.querySelector(".collection__items"),s=e.querySelector(".search__separate"),r=e.querySelector(".items"),o=e.querySelector(".search__none");0==i.children.length&0==r.children.length&&o.classList.remove("display_none_important"),0<i.children.length&0<r.children.length&&s.classList.remove("display_none_important"),0==i.children.length&&i.classList.add("display_none_important"),0==r.children.length&&r.classList.add("display_none_important"),page.search.resultsWrap.innerHTML=e.innerHTML,this.clear(),this.columns(),page.current.obj().itemImage(),page.ajax.getElements(),page.ajax.setEvents()}}.bind(this)}),page.search.ico.addEventListener("click",function(){page.search.form.formEvent()}.bind(this)))},show:function(){$(page.search.outer).stop().fadeIn(350,function(){page.search.outer.classList.add("shown")}.bind(this)),page.search.shown=!0},hide:function(){$(page.search.outer).stop().fadeOut(350)},keyup:function(t){t&&t.keyCode},clear:function(){for(var t=this.resultsWrap.querySelectorAll(".v-clear"),e=0;e<t.length;e++){var i="v-clear_"+v.randInt(0,100)*v.randInt(0,100);t[e].classList.add(i);var s=new v.Clear({selector:"."+i,step:2});s=s.init(),t[e].clear=s}},columns:function(){for(var t=0;t<this.resizes.length;t++)v.viewport.delete(this.resizes[t]);this.resizes=[];for(var e=this.resultsWrap.querySelectorAll(".v-columns"),i=0;i<e.length;i++){var s="v-columns_"+v.randInt(10,100)*v.randInt(10,100);if(e[i].classList.add(s),!e[i].getAttribute("data-columns-proceeded")){var r=this.getDataColumns(e[i]),o=new v.Columns({console:!1,selector:"."+s,selectorItem:".v-columns__item ",columns:r});(o=o.init())&&this.resizes.push(v.viewport.add({target:"w",timeout:100,do:function(t,e){var i=this.getDataColumns(t);e.changeProp({columns:i})}.bind(this,e[i],o)})),e[i].setAttribute("data-columns-proceeded","true")}}},getDataColumns:function(t){var e=[0,1,2];return v.tablet()?e=[0,1]:v.mobile()&&(e=[0,1],v.vw()[1]<600&&(e=[0])),e}},v.SliderCanvasScale=function(t){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};n(this,i);var e=l(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e.scaleData={value:0},e}return c(i,v.SliderCanvas),o(i,[{key:"setEvents",value:function(){return!1!==h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"setEvents",this).call(this)}},{key:"animateCanvas",value:function(t,e,i){var s={};for(var r in t)s[r]=t[r];this.animating=!0;var o=1;"show"===s.action?o+=(1-i)*this.scaleData.value:o+=i*this.scaleData.value;var n=1;n="show"===s.action?i:1-i;var a=void 0;a="show"===s.action?1-i:this.prop.parallaxPrev||"hideActive"===s.action?i:0;var h=this.prop.parallaxX,l=this.prop.parallaxY;"hide"!==s.action&&"hideActive"!==s.action||(h*=-1,l*=-1),s.reversed&&(h*=-1,l*=-1);var c=this.imagesCurrent[s.num],p=this.imageSize({img:c,width:this.width*this.maxParallax*o,height:this.height*this.maxParallax*o,maxWidth:this.width*o,maxHeight:this.height*o});this.prop.reverse&&(s.reversed?s.reversed=!1:s.reversed=!0);var u,d=h*this.width*a,v=l*this.height*a,g=p.x+this.width*(1-o)/2-d,f=p.y+this.height*(1-o)/2-v,m=void 0,y=0;return m=this.width,u=this.height,"hide"!==s.action&&"hideActive"!==s.action||(m=this.width*(1-i),y=this.width-m,"hide"===s.action&&(this.prop.hidePrev||(m=this.width,y=0)),s.reversed&&(y=0)),this.ctx[s.ctx].save(),this.ctx[s.ctx].beginPath(),this.ctx[s.ctx].clearRect(0,0,this.width,this.height),this.ctx[s.ctx].rect(y,0,m,u),this.ctx[s.ctx].closePath(),this.ctx[s.ctx].clip(),this.ctx[s.ctx].fillStyle=this.prop.fill,this.ctx[s.ctx].fillRect(0,0,this.width,this.height),this.ctx[s.ctx].globalAlpha=n,this.ctx[s.ctx].drawImage(c,0,0,c.width,c.height,g,f,p.imageWidth,p.imageHeight),this.ctx[s.ctx].restore(),1===e&&s.do.call(this),!0}},{key:"init",value:function(){var t=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);if(!1===t)return!1;var e={};return e=Object.assign(e,t)}}]),i}(),v.addLoad(function(){v.document().classList.remove("v-none-transition")}.bind(void 0)),page.helpers.setFullHeight(),v.addLoad(page.helpers.setFullHeight.bind(void 0)),v.viewport.add({target:"wh",name:"Set FullHeight",do:page.helpers.setFullHeight.bind(void 0),timeout:25}),page.helpers.setRem(),v.addLoad(page.helpers.setRem.bind(void 0)),v.viewport.add({target:"wh",name:"Set Rem",do:page.helpers.setRem.bind(void 0),timeout:25}),page.preloaderObj.init(),page.helpers.footerMenu();for(var s=document.querySelector(".v-menu__links"),r=document.querySelectorAll(".v-footer__menu > section"),a=document.querySelectorAll(".v-footer__submenu-links a"),p=0;p<r.length;p++)s.innerHTML+='<div class="v-menu__item v-menu__el">'+r[p].innerHTML+"</div>";var u=document.createElement("div");u.classList.add("v-menu__item"),u.classList.add("v-menu__item_other"),u.classList.add("v-menu__el"),s.appendChild(u);var d=document.createElement("span");d.innerHTML=v.body().getAttribute("data-lang-menuOther"),u.appendChild(d);for(var g=document.createElement("nav"),f=0;f<a.length;f++)g.innerHTML+=""+a[f].outerHTML;u.appendChild(g);var m=document.querySelectorAll(".v-menu__el");function y(){var t=[0,1,2];return v.mobile()&&(t=[0,1],v.vw()[1]<700&&(t=[0])),t}var b=new v.Columns({selector:".v-menu .v-menu__links",selectorItem:".v-menu__item ",columns:y()});b=b.init(),v.addResize(["w",function(){b.changeProp({columns:y()})},100]),window.menuAnimationInner,window.menuAnimationInner={on:!0,duration:50*(m.length-1)+0},page.menu=new v.Menu({console:!1,animationButton:500,animation:500,animationInner:window.menuAnimationInner}),page.menu=page.menu.init(),page.menu.add({target:"show",do:function(){var i=this;setTimeout(function(){for(var t=0,e=0;t<m.length;t++,e++)setTimeout(function(t){t.classList.add("show")}.bind(i,m[t]),50*e)},175)}.bind(void 0)}),page.menu.add({target:"hide",do:function(){for(var t=m.length-1,e=0;0<=t;t--,e++)setTimeout(function(t){t.classList.add("hide")}.bind(this,m[t]),50*e)}.bind(void 0)}),page.menu.add({target:"hidden",do:function(){for(var t=0;t<=m.length-1;t++)m[t].classList.remove("show"),m[t].classList.remove("hide");page.ajaxChange()}.bind(void 0)}),page.menu.add({target:"shown",do:function(){page.ajaxChange()}.bind(void 0)}),page.languages=new v.Select({selector:"#v-header__languages",scroll:!1,duration:350,search:!1,showSelected:!1}),page.languages=page.languages.init(),page.languages.add({target:"change",do:function(t){
2    if ($(t.options[t.active]).attr('target') === 'blank') {
3        console.log('blank');
4        window.open(t.options[t.active].value, '_blank');
5    } else {
6        location.href=t.options[t.active].value
7    }
8}}),v.popup=new v.Popup({console:!1}),v.popup=v.popup.init(),v.popup.add({target:"show",do:function(t){page.popup.init("#"+t.outer.id)}.bind(void 0)}),v.popupMedia=new v.Popup({console:!1}),v.popupMedia=v.popupMedia.init(),v.popupCart=new v.Popup({console:!1}),v.popupCart=v.popupCart.init(),v.popupCart.add({target:"show",do:function(t){page.popup.init("#"+t.outer.id),0===t.level&&page.cart.init("#"+t.outer.id)}.bind(void 0)}),v.popupCart.add({target:"hide",do:function(t){}.bind(void 0)}),jQuery.fn.addtocopy=function(t){var s={htmlcopytxt:'<br>More: <a href="'+window.location.href+'">'+window.location.href+"</a><br>",minlen:25,addcopyfirst:!1};$.extend(s,t);var r=document.createElement("span");return r.id="ctrlcopy",r.innerHTML=s.htmlcopytxt,this.each(function(){$(this).mousedown(function(){$("#ctrlcopy").remove()}),$(this).mouseup(function(){if(window.getSelection){if(!(i=(t=window.getSelection()).toString())||i.length<s.minlen)return;(i=(e=t.getRangeAt(0)).cloneRange()).collapse(s.addcopyfirst),i.insertNode(r),s.addcopyfirst||e.setEndAfter(r),t.removeAllRanges(),t.addRange(e)}else if(document.selection){var t,e,i;if(!(i=(e=(t=document.selection).createRange()).text)||i.length<s.minlen)return;(i=e.duplicate()).collapse(s.addcopyfirst),i.pasteHTML(r.outerHTML),s.addcopyfirst||(e.setEndPoint("EndToEnd",i),e.select())}})})},$("body").addtocopy({htmlcopytxt:"<br><br> "+v.body().getAttribute("data-lang-copytext")+' <a href="'+window.location.href+'">'+window.location.href+"</a>"}),page.helpers.locationeEnable();var _="home";page[_]=function(t){function s(){return n(this,s),l(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return c(s,v.Page),o(s,[{key:"init",value:function(){var t=this,e=h(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"create",this).call(this,t)&&(this.canvasSliders(),!0)}},{key:"show",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!h(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"show",this).call(this,t))return!1;for(var e=document.querySelector(".home video"),i=0;i<e.length;i++)e[i].play();return!0}},{key:"canvasSliders",value:function(){for(var o=document.querySelectorAll(".home__sliders"),t=function(t){var e=o[t].querySelector(".v-slider"),i=o[t].querySelector(".home__sliders-content .v-slider");if(null==e||null==i)return"continue";var s="home__canvasSlider_"+v.randInt(0,100)*v.randInt(0,100);e.setAttribute("id",s);var r="home__contentSlider_"+v.randInt(0,100)*v.randInt(0,100);i.setAttribute("id",r),e=(e=new v.SliderCanvasScale({selector:"#"+s,bezier:page.bezier,animations:{prev:[0,.9],next:[0,1]}
8,duration:1200,reverse:!0,parallaxX:-.15,parallaxPrev:!0,hidePrev:!1,dot:!1,control:!1})).init(),(i=(i=new v.SliderContent({console:!1,selector:"#"+r,duration:1300,reverse:!1,parallaxX:.15,parallaxPrev:!1,hidePrev:!1,dot:!1,control:!0})).init()).add({target:"before",do:function(t){e.set(t.next,!0,t.dir,t.type)}})},e=0;e<o.length;e++)t(e)}}]),s}(),v.pages=[_];_="persons";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.sameHeight(),!0)}},{key:"sameHeight",value:function(){this.sameHeightObj=new v.SameHeight({selector:".persons__item"}),this.sameHeightObj=this.sameHeightObj.init()}},{key:"destroy",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"destroy",this).call(this,t),this.sameHeightObj&&this.sameHeightObj.changeProp({resize:!1}),!0}}]),i}(),v.pages.push(_);_="rules";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t))return!1;var e=new v.Faq({console:!1,multiShow:!0});return(e=e.init())&&(e.show(0,0),e.add({target:"toggle",do:function(t){var e=setInterval(function(){page.current.obj().view.seek()},20);setTimeout(function(){clearInterval(e)},400)}})),!0}}]),i}(),v.pages.push(_);_="howtoget";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.map(),!0)}},{key:"map",value:function(){this.createMap(),this.searchEventMap()}},{key:"createMap",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],s=59.93472449999999,r=30.34294650000004;this.mapOuter=document.getElementById("howtoget__map"),this.mapError=document.querySelector(".howtoget__error");var o={zoom:16,center:new google.maps.LatLng(s,r),mapTypeId:google.maps.MapTypeId.ROADMAP,streetViewControl:!1,mapTypeControl:!1},n=new google.maps.Map(this.mapOuter,o);if(i)new google.maps.Marker({position:{lat:s,lng:r},map:n,title:this.mapOuter.getAttribute("data-marker")});if(!i){var a=new google.maps.DirectionsService,h={origin:t,destination:e,travelMode:google.maps.DirectionsTravelMode.DRIVING,unitSystem:google.maps.UnitSystem.METRIC};a.route(h,function(t,e){e==google.maps.DirectionsStatus.OK?(new google.maps.DirectionsRenderer({map:n,directions:t}),$(this.mapError).stop().slideUp(350)):$(this.mapError).stop().slideDown(350)}.bind(this))}}},{key:"searchEventMap",value:function(){var i=this,t=document.querySelector(".howtoget__search");if(void 0!==navigator.geolocation){var s=document.querySelector(".howtoget__search input");document.querySelector(".howtoget__search .a-button").addEventListener("click",function(t){if(t.preventDefault(),0<s.value.length){var e=i.mapOuter.getAttribute("data-address");i.createMap(s.value,e,!1)}}),s.addEventListener("keydown",function(t){if(13==t.keyCode){var e=i.mapOuter.getAttribute("data-address");i.createMap(s.value,e,!1)}})}else t.classList.add("display_none_important")}}]),i}(),v.pages.push(_);_="occurances";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.initSlickSlider(),!0)}},{key:"initSlickSlider",value:function(){var o=document.querySelectorAll(".occurances__description-item");
8$(".slider").on("beforeChange",function(t,e,i,s){for(var r=0;r<o.length;r++)r==s?o[r].classList.add("active"):o[r].classList.remove("active")}.bind(this))}}]),i}(),v.pages.push(_);_="calendar";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t))return!1;var e=new v.Faq({console:!1,multiShow:!0});return e=e.init(),(window.faq=e)&&(e.show(0,0),e.add({target:"toggle",do:function(t){var e=setInterval(function(){page.current.obj().view.seek()},20);setTimeout(function(){clearInterval(e)},400)}})),!0}}]),i}(),v.pages.push(_);_="collection";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.setFilter(),this.setFilterSelect(),this.updateFilterCount(),this.date(),this.search(),this.searchTablet(),this.mobileFilters(),!0)}},{key:"setFilter",value:function(){var t=this;this.ajaxContentOuter=document.querySelector("#v-ajaxContent"),this.ajaxContent=this.ajaxContentOuter.ajaxContent,this.selectors=[],this.filter=new v.Filter({console:!1,saveOnChange:700<v.vw()[1],updateTitle:!0,start:!0,updateCount:!1,removeDisabledActive:!0,markers:!1,separator:"__",separatorAjax:"__",separatorAjaxCount:"--",popstateEvent:!page.ajaxBool,popstateEventReload:!page.ajaxBool,setParamToNull:!0}),this.filter=this.filter.init(),this.filter.add({target:"save",do:this.ajaxContent.reload.bind(this,!1,!0)}),this.add({target:"resizeW",do:function(){t.filter.changeProp({saveOnChange:700<v.vw()[1]})},timeout:150})}},{key:"setFilterSelect",value:function(){var a=this;this._changeSelectors=!0;for(var l=document.querySelectorAll(".collection__filter-item"),t=function(h){var t=l[h].querySelector("ul"),e=document.createElement("select"),i=l[h].querySelectorAll("a");if(null==t)return"continue";for(var s=0;s<i.length;s++){var r=document.createElement("option");r.setAttribute("data-v-filter-id",i[s].getAttribute("data-v-filter-id")),r.setAttribute("value",i[s].getAttribute("data-v-filter-value")),i[s].classList.contains("v-filter__value_active")&&r.setAttribute("selected","selected"),r.innerHTML=i[s].innerHTML,e.appendChild(r)}l[h].appendChild(e);var o="selector_"+v.randInt(1,100)*v.randInt(1,100);e.setAttribute("id",o);var n=new v.Select({console:!1,selector:"#"+o,search:!1,showSelected:!0,changeSelectedText:!1,animation:"fade",duration:250});n=n.init(),a.selectors.push(n),n.add({target:"change",do:function(t){var e=this;if(this._changeSelectors){for(var i=null,s=this.filter.values(),r=t.options[t.active].getAttribute("value"),o=t.options[t.active].getAttribute("data-v-filter-id"),n=0;n<s.length;n++){s[n].getAttribute("data-v-filter-id")==o&s[n].getAttribute("data-v-filter-value")==r&&(i=s[n])}this.filter.reset(!1),this._changeSelectors=!1;for(var a=0;a<this.selectors.length;a++)a!=h&&this.selectors[a].change(0);setTimeout(function(){e._changeSelectors=!0},250),null!=i&&this.filter.valueClick(i)}}.bind(a)})},e=0;e<l.length;e++)t(e)}},{key:"updateFilterCount",value:function(){var p=this;this.filter.add({target:"count",do:function(t){for(var e=p.filter.values(),i=0;i<p.selectors.length;i++)for(var s=p.selectors[i],r=s.options(),o=s.li(),n=0;n<r.length;n++){for(var a=!1,h=r[n].getAttribute("data-v-filter-id"),l=r[n].getAttribute("value"),c=0;c<e.length;c++){e[c].getAttribute("data-v-filter-id")==h&e[c].getAttribute("data-v-filter-value")==l&&e[c].classList.contains("v-filter__value_disabled")&&(a=!0)}a?o[n].classList.add("disabled"):o[n].classList.remove("disabled")}}}),this.filter.changeProp({updateCount:!0}),this.filter.count()}},{key:"date",value:function(){this.dateButton(),this.dateMin=document.querySelector(".collection__range-inputs input[name='dateMin']"),this.dateMax=document.querySelector(".collection__range-inputs input[name='dateMax']"),this.dateInputs=[this.dateMin,this.dateMax],this.dateRangeFunc(),this.dateInputsRange()}},{key:"dateButton",value:function(){var e=document.querySelector(".collection__filter-item_date a");$(".collection__date").stop().slideUp(0),e.addEventListener("click",function(t){t.preventDefault(),e.classList.contains("active")?(e.classList.remove("active"),$(".collection__date").stop().slideUp(350)):(e.classList.add("active"),$(".collection__date").stop().slideDown(350))})}},{key:"dateRangeFunc",value:function(){$(".collection__range-input").ionRangeSlider({onFinish:this.dateRangeEvent.bind(this,!0),onUpdate:this.dateRangeEvent.bind(this,!1)}
8),this.dateRange=$(".collection__range-input").data("ionRangeSlider")}},{key:"dateRangeEvent",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=arguments[1];t&&(this.dateMin.value=e.from,this.dateInputBlur(this.dateMin,!0),this.dateMax.value=e.to,this.dateInputBlur(this.dateMax,!0)),v.setParam({name:"dateMin",value:e.from,push:!0}),v.setParam({name:"dateMax",value:e.to,push:!0}),v.setParam({name:"page",value:"",push:!0}),this.filter.count(),this.ajaxContent.reload()}},{key:"dateInputsRange",value:function(){for(var t=0;t<this.dateInputs.length;t++)this.dateInputs[t].prevValue=parseInt(this.dateInputs[t].value.replace(/\s+/g,"")),this.dateInputs[t].addEventListener("keypress",function(t,e){var i=(e=e||window.event).which?e.which:e.keyCode;31<i&&(i<48||57<i)&&e.preventDefault()}.bind(this,this.dateInputs[t])),this.dateInputs[t].addEventListener("blur",this.dateInputBlur.bind(this,this.dateInputs[t],!1))}},{key:"dateInputBlur",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=parseInt(t.getAttribute("data-value").replace(/\s+/g,"")),s=parseInt(t.getAttribute("data-min-value").replace(/\s+/g,"")),r=parseInt(t.getAttribute("data-max-value").replace(/\s+/g,"")),o=null;if(((o=0!=t.value.length?parseInt(t.value.replace(/\s+/g,"")):0)<0||0==o)&&(o=i),o<s&&(o=s),r<o&&(o=r),"dateMin"==t.name){var n=parseInt(this.dateMax.value.replace(/\s+/g,""));n<o&&(o=n)}if("dateMax"==t.name){var a=parseInt(this.dateMin.value.replace(/\s+/g,""));o<a&&(o=a)}var h=o.toString().replace(/(\d{1,3})(?=((\d{3})*)$)/g," $1");" "==h.charAt(0)&&(h=h.substring(1)),t.value=h;var l=parseInt(t.value.replace(/\s+/g,""));l!=t.prevValue&&(t.prevValue=l,e||("dateMin"==t.name&&this.dateRange.update({from:l}),"dateMax"==t.name&&this.dateRange.update({to:l})))}},{key:"mobileFilters",value:function(){var t=this;this.mfo={button:document.querySelector(".collection__filter-mobile-button"),content:document.querySelector(".collection__mobile-filters .collection__mobile-content"),outer:document.querySelector(".collection__mobile-filters"),submit:document.querySelector(".collection__mobile-submit .a-button"),close:document.querySelector(".collection__mobile-filters .popup__close")},this.dfo={outer:document.querySelector(".collection__filter"),content:document.querySelector(".collection__filter .collection__content"),search:document.querySelector(".collection__filter .collection__search"),date:document.querySelector(".collection__filter .collection__date")},this.mobileFiltersEvents(),this.filtersAdaptive(),this.add({target:"resizeW",do:function(){t.filtersAdaptive()},timeout:250})}},{key:"mobileFiltersEvents",value:function(){var e=this;this.mfo.button.addEventListener("click",function(t){t.preventDefault(),e.mfo.outer.classList.add("shown")}),this.mfo.submit.addEventListener("click",function(t){t.preventDefault(),e.mfo.outer.classList.remove("shown"),e.filter.save()}),this.mfo.close.addEventListener("click",function(t){t.preventDefault(),e.mfo.outer.classList.remove("shown")})}},{key:"filtersAdaptive",value:function(){700<v.vw()[1]?(this.dfo.content.parentElement!=this.dfo.outer&&this.dfo.outer.insertBefore(this.dfo.content,this.dfo.search),this.dfo.date.parentElement!=this.dfo.outer&&this.dfo.outer.appendChild(this.dfo.date)):(this.dfo.content.parentElement!=this.mfo.content&&this.mfo.content.appendChild(this.dfo.content),this.dfo.date.parentElement!=this.mfo.content&&this.mfo.content.appendChild(this.dfo.date))}},{key:"search",value:function(){this.searchInput=document.querySelector(".collection__search input"),this.searchButton=document.querySelector(".collection__search button"),this.searchInput.prevValue=this.searchInput.value.replace(/\s+/g," ").trim(),this.searchInput.addEventListener("keyup",function(t){13==t.keyCode&&this.searchSubmit()}.bind(this)),this.searchButton.addEventListener("click",function(t){this.searchSubmit()}.bind(this))}},{key:"searchSubmit",value:function(){var t=this.searchInput.value.replace(/\s+/g," ").trim();t!=this.searchInput.prevValue&&(v.setParam({name:"query",value:t,push:!0}),v.setParam({name:"page",value:"",push:!0}),this.searchInput.prevValue=t,this.ajaxContent.reload())}},{key:"searchTablet",value:function(){var e=this;this.searchTabletOuter=document.querySelector(".collection__search_tablet"),this.searchTabletInput=document.querySelector(".collection__search_tablet input"),this.searchTabletButton=document.querySelector(".collection__search_tablet button"),this.searchTabletInput.prevValue=this.searchInput.value.replace(/\s+/g," ").trim(),this.searchTabletInput.addEventListener("keyup",function(t){13==t.keyCode&&this.searchTabletSubmit()}.bind(this)),this.searchTabletButton.addEventListener("click",function(t){this.searchTabletOuter.classList.contains("show")?this.searchTabletSubmit():this.searchTabletOuter.classList.add("show")}.bind(this)),this.addEventListener({target:"click",el:window,do:function(t){v.childOf(t.target,e.searchTabletOuter)||e.searchTabletOuter.classList.remove("show")}})}},{key:"searchTabletSubmit",value:function(){var t=this.searchTabletInput.value.replace(/\s+/g," ").trim();t!=this.searchTabletInput.prevValue&&(v.setParam({name:"query",value:t,push:!0}),v.setParam({name:"page",value:"",push:!0}),this.searchTabletInput.prevValue=t,this.ajaxContent.reload())}}]),i}(),v.pages.push(_);_="shop";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.initSlickSlider(),this.ajaxContentOuter=document.querySelector("#v-ajaxContent"),this.ajaxContent=!1,this.ajaxContentOuter&&(this.ajaxContent=this.ajaxContentOuter.ajaxContent,this.price()
8),this.search(),page.product.initCount("cart",0,!0),page.product.initCount("wishlist",0,!0),page.product.initProductItems(),!0)}},{key:"initSlickSlider",value:function(){var o=document.querySelectorAll(".shop__description-item");$(".slider").on("beforeChange",function(t,e,i,s){for(var r=0;r<o.length;r++)r==s?o[r].classList.add("active"):o[r].classList.remove("active")}.bind(this))}},{key:"price",value:function(){this.priceMin=document.querySelector(".shop__range-inputs input[name='priceMin']"),this.priceMax=document.querySelector(".shop__range-inputs input[name='priceMax']"),this.priceInputs=[this.priceMin,this.priceMax],this.priceRangeFunc(),this.priceInputsRange()}},{key:"priceRangeFunc",value:function(){$(".shop__range-input").ionRangeSlider({onFinish:this.priceRangeEvent.bind(this,!0),onUpdate:this.priceRangeEvent.bind(this,!1)}),this.priceRange=$(".shop__range-input").data("ionRangeSlider")}},{key:"priceRangeEvent",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=arguments[1];t&&(this.priceMin.value=e.from,this.priceInputBlur(this.priceMin,!0),this.priceMax.value=e.to,this.priceInputBlur(this.priceMax,!0)),v.setParam({name:"priceMin",value:e.from,push:!0}),v.setParam({name:"priceMax",value:e.to,push:!0}),this.ajaxContent.reload()}},{key:"priceInputsRange",value:function(){for(var t=0;t<this.priceInputs.length;t++)this.priceInputs[t].prevValue=parseInt(this.priceInputs[t].value.replace(/\s+/g,"")),this.priceInputs[t].addEventListener("keypress",function(t,e){var i=(e=e||window.event).which?e.which:e.keyCode;31<i&&(i<48||57<i)&&e.preventDefault()}.bind(this,this.priceInputs[t])),this.priceInputs[t].addEventListener("blur",this.priceInputBlur.bind(this,this.priceInputs[t],!1))}},{key:"priceInputBlur",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=parseInt(t.getAttribute("data-value").replace(/\s+/g,"")),s=parseInt(t.getAttribute("data-min-value").replace(/\s+/g,"")),r=parseInt(t.getAttribute("data-max-value").replace(/\s+/g,"")),o=null;if(((o=0!=t.value.length?parseInt(t.value.replace(/\s+/g,"")):0)<0||0==o)&&(o=i),o<s&&(o=s),r<o&&(o=r),"priceMin"==t.name){var n=parseInt(this.priceMax.value.replace(/\s+/g,""));n<o&&(o=n)}if("priceMax"==t.name){var a=parseInt(this.priceMin.value.replace(/\s+/g,""));o<a&&(o=a)}var h=o.toString().replace(/(\d{1,3})(?=((\d{3})*)$)/g," $1");" "==h.charAt(0)&&(h=h.substring(1)),t.value=h;var l=parseInt(t.value.replace(/\s+/g,""));l!=t.prevValue&&(t.prevValue=l,e||("priceMin"==t.name&&this.priceRange.update({from:l}),"priceMax"==t.name&&this.priceRange.update({to:l})))}},{key:"search",value:function(){this.searchOuter=document.querySelector(".shop__search-outer"),null!=this.searchOuter&&(this.searchInput=this.searchOuter.querySelector("input"),this.searchButton=this.searchOuter.querySelector("a"),this.searchEvents())}},{key:"searchEvents",value:function(){var e=this;this.searchInput.prevValue=this.searchInput.value.replace(/\s+/g," ").trim(),this.searchInput.addEventListener("keyup",function(t){13==t.keyCode&&this.searchSubmit()}.bind(this)),this.searchButton.addEventListener("click",function(t){t.preventDefault(),this.searchSubmit()}.bind(this)),this.addEventListener({el:window,target:"click",do:function(t){v.childOf(t.target,e.searchOuter)||e.searchOuter.classList.remove("shown")}}),this.searchButton.addEventListener("click",function(t){t.preventDefault(),this.searchSubmit()}.bind(this)),page.preloader.add({do:function(){e.searchSize()}}),this.add({target:"resizeW",do:function(){e.searchSize()},timeout:500}),this.searchSize(),this.searchAdaptive(),this.add({target:"resizeW",do:function(){e.searchAdaptive()},timeout:250}),this.resultsEvents()}},{key:"searchSubmit",value:function(){if(this.searchOuter.classList.contains("shown")){var t=this.searchInput.value.replace(/\s+/g," ").trim();if(t!=this.searchInput.prevValue)if(this.searchInput.prevValue=t,0!=this.ajaxContent&!page.default.classList.contains("shopWishlist"))v.setParam({name:"query",value:t,push:!0}),v.setParam({name:"page",value:"",push:!0}),this.ajaxContent.reload();else{var e=this.searchInput.getAttribute("data-url");e=v.setParam({name:"query",value:t,push:!1,url:e});var i=document.createElement("a");i.setAttribute("href",e),page.ajax.load(i)}}else this.searchOuter.classList.add("shown")}},{key:"searchSize",value:function(){var t,e=0,i=0,s=document.querySelector(".content_wide");if(null!=s){e=s.clientWidth,v.tablet()&&(e=.92*v.vw()[1]),v.mobile()&&(e=.9*v.vw()[1]);var r=s.querySelector("h1 span");i=null==r?0:r.clientWidth;var o=s.querySelector(".shop__header");null!=o&&(t=o.clientWidth,this.searchInput.style.width=.9*(e-t-i)+"px")}}},{key:"searchAdaptive",value:function(){var t=document.querySelector(".tablet-navigation"),e=document.querySelector(".shop__header");null!=e&null!=e&&(700<v.vw()[1]?this.searchOuter.parentElement!=e&&e.insertBefore(this.searchOuter,e.children[0]):this.searchOuter.parentElement!=t&&t.appendChild(this.searchOuter))}},{key:"resultsEvents",value:function(){var e=this;this.results=document.querySelector(".v-ajaxContent__results"),null!=this.results&&(this.resultsTitle=this.results.querySelector(".v-ajaxContent__results-title span"),this.resultsNum=this.results.querySelector(".v-ajaxContent__results-num span"),this.resultsInit(),this.ajaxContent&&this.ajaxContent.add({target:"load",do:function(t){e.resultsInit(t.total)}}))}},{key:"resultsInit",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;null!=t&&(this.resultsNum.innerHTML=t),null!=t&&(this.results.classList.remove("v-view"),this.results.classList.remove("v-view_bottom")),null==v.getParam({name:"query"})?$(this.results).stop().slideUp(250):(this.resultsTitle.innerHTML=v.getParam({name:"query"}),$(this.results).stop().slideDown(250))}}]),i}(),v.pages.push(_);_="cartPage";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(page.cart.init("#cartPage__items"),page.cart.initProceed("#cartPage__proceed"),this.formSet(),!0)}},{key:"formSet",value:function(){this.formTelephone()}},{key:"formTelephone",value:function(){jQuery.fn.phoneMask=function(){return $(this).each(function(){$(this).inputmask({mask:["+7 999 999 99 99","+38 099 999 99 99","+375 99 999 99 99"],showMaskOnHover:!1})})};
8var t=document.querySelector(".v-form__outer input[name='telephone']");t&&$(t).phoneMask()}}]),i}(),v.pages.push(_);_="productPage";page[_]=function(t){function a(){return n(this,a),l(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return c(a,v.Page),o(a,[{key:"init",value:function(){var t=this,e=h(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!h(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"create",this).call(this,e))return!1;this.bgImageHeight(),this.add({target:"resizeW",do:function(){t.bgImageHeight()},timeout:125}),v.addLoad(function(){t.bgImageHeight()});document.querySelector(".shop__items");var i=document.querySelectorAll(".shop__item"),s=document.querySelector(".productPage__slick");if(s){var r=document.createElement("div");r.classList.add("shop__items"),r.classList.add("v-columns"),r.classList.add("desktop_hide"),r.classList.add("tablet_hide"),r.setAttribute("data-columns","4");for(var o=0;o<i.length;o++){var n=document.createElement("div");n.classList.add("shop__item"),n.classList.add("v-columns__item"),n.classList.add("v-view"),n.classList.add("v-view_bottom"),n.innerHTML=i[o].innerHTML,r.appendChild(n)}v.insertAfter(s,r)}return page.current.obj().columns(),page.current.obj().itemImage(),page.product.initCount("cart",0,!0),page.product.initCount("wishlist",0,!0),page.product.initProductItems(),!0}},{key:"bgImageHeight",value:function(){if(!v.mobile()){var t=document.querySelector(".productPage__description"),e=document.querySelector(".productPage__slider .bg-image");null!=t&null!=e&&(e.style.height=t.clientHeight+"px")}}}]),a}(),v.pages.push(_);_="media";page[_]=function(t){function r(){return n(this,r),l(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return c(r,v.Page),o(r,[{key:"init",value:function(){var t=this,e=h(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!h(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"create",this).call(this,t))return!1;var e=new v.Faq({console:!1,multiShow:!0});(e=e.init())&&(e.show(0,0),e.add({target:"toggle",do:function(t){var e=setInterval(function(){page.current.obj().view.seek()},20);setTimeout(function(){clearInterval(e)},400)}}));for(var i=document.querySelectorAll(".v-faq__date, .v-faq__answer .a-buttons"),s=0;s<i.length;s++)i[s].innerText.length<5&&i[s].classList.add("empty");return!0}}]),r}(),v.pages.push(_);_="exposition";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.exposition(),!0)}},{key:"exposition",value:function(){var t=this;this.expositionElements();var e=new Image;e.onload=function(){t.expositionMarkers(),t.expositionMarkersEvents(),t.expositionMarkersPosition()},e.src=this.schemeImg.src,v.addLoad(function(){t.expositionMarkersPosition()}),this.add({target:"resize",do:function(){t.expositionMarkersPosition()},timeout:100})}},{key:"expositionElements",value:function(){this.scheme=document.querySelector(".exposition__scheme"),this.schemeImg=document.querySelector(".exposition__scheme img"),this.schemeOuter=document.querySelector(".exposition__scheme-outer"),this.items=document.querySelectorAll(".exposition__item"),this.markers=document.querySelectorAll(".exposition__marker"),v.vw()[1]}},{key:"expositionMarkers",value:function(){this.markersTitle=[];for(var t=0;t<this.items.length;t++){var e=document.createElement("div");e.classList.add("exposition__marker-title");var i=this.items[t].querySelector(".bg-image");i&&(e.innerHTML=i.outerHTML);var s=this.items[t].querySelector(".exposition__title span");
8s&&(e.innerHTML+='<div class="title">'+s.innerHTML+"</div>"),this.scheme.appendChild(e),this.markersTitle.push(e)}}},{key:"expositionMarkersPosition",value:function(){for(var t=0;t<this.markersTitle.length;t++){for(var e=null,i=0;i<this.markers.length;i++)this.markers[t].classList.contains("exposition__marker_"+i)&&(e=this.markers[t]);if(null!==e){var s=e.getBoundingClientRect(),r=this.scheme.getBoundingClientRect(),o=this.schemeOuter.getBoundingClientRect();this.markersTitle[t].style.bottom=r.height-(s.top-r.top)+5+"px",this.markersTitle[t].style.left=s.left-o.left+s.width/2+"px"}}}},{key:"expositionMarkersEvents",value:function(){for(var t=0;t<this.markers.length;t++)this.markers[t].addEventListener("mouseenter",function(t){v.desktop()&&this.hoverMouseEnter(t)}.bind(this,t)),this.markers[t].addEventListener("mouseleave",this.hoverMouseLeave.bind(this,t)),this.markers[t].addEventListener("click",function(t,e){e.preventDefault(),v.desktop()||this.markersTitle[t].classList.contains("active")||this.hoverMouseEnter(t)}.bind(this,t))}},{key:"hoverMouseEnter",value:function(t,e){for(var i=0;i<this.markers.length;i++)i==t&&this.markers[i].classList.add("active");for(var s=0;s<this.markersTitle.length;s++)s==t&&this.markersTitle[s].classList.add("active");this.schemeImg.classList.add("hover")}},{key:"hoverMouseLeave",value:function(t,e){for(var i=0;i<this.markers.length;i++)i==t&&this.markers[i].classList.remove("active");for(var s=0;s<this.markersTitle.length;s++)s==t&&this.markersTitle[s].classList.remove("active");this.schemeImg.classList.remove("hover")}}]),i}(),v.pages.push(_);_="error";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(v.document().classList.add("fullPage"),!0)}},{key:"destroy",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"destroy",this).call(this,t)&&(v.document().classList.remove("fullPage"),!0)}}]),i}(),v.pages.push(_);_="ticketsForm";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(this.obj={},e=Object.assign(e,{obj:function(){return t.obj}}))}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return!!h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t)&&(this.formSet(),!0)}},{key:"formSelectCallback",value:function(t){"none"==t.value?t.select.parentNode.classList.remove("v-form__input_focus"):t.select.parentNode.classList.add("v-form__input_focus")}},{key:"formSet",value:function(){this.formTelephone();var t="#ticketsForm__proceed",e=document.querySelector(t+" .v-form");page.form.setForm(t),e.v_Form_callback=function(t){v.popup.show({selector:"#popup__ticketsform",types:["modal","ticketsform"]})};var i=new v.Select({console:!1,selector:t+" .v-form__outer_excursionType select",scroll:!1,animation:"slide",search:!1,showSelected:!1});(i=i.init()).add({target:"change",do:function(t){this.formSelectCallback(t);for(var e=t.options[t.active].getAttribute("data-value"),i=document.querySelectorAll(".v-form__outer_excursion"),s=0;s<i.length;s++)i[s].classList.contains("v-form__outer_excursion_"+e)?i[s].classList.add("show"):i[s].classList.remove("show")}.bind(this)}),this.formExcursions(),"ru"==v.document().getAttribute("lang")&&$.datepicker.setDefaults($.datepicker.regional.ru),$(".ticketsForm__form input[name='date']").datepicker({showOtherMonths:!0,selectOtherMonths:!0,minDate:0});var s=document.querySelector(".ticketsForm__form input[name='guests']");s.prevValue=s.value,s.addEventListener("keypress",function(t,e){var i=(e=e||window.event).which?e.which:e.keyCode;31<i&&(i<48||57<i)&&e.preventDefault()}.bind(this,s)),s.addEventListener("blur",function(t,e){var i=parseInt(t.getAttribute("data-value").replace(/\s+/g,"")),s=parseInt(t.getAttribute("data-min-value").replace(/\s+/g,"")),r=parseInt(t.getAttribute("data-max-value").replace(/\s+/g,"")),o=null;((o=0!=t.value.length?parseInt(t.value.replace(/\s+/g,"")):0)<0||0==o)&&(o=i),o<s&&(o=s),r<o&&(o=r);var n=o.toString().replace(/(\d{1,3})(?=((\d{3})*)$)/g," $1");" "==n.charAt(0)&&(n=n.substring(1)),t.value=n;var a=parseInt(t.value.replace(/\s+/g,""));a!=t.prevValue&&(t.prevValue=a)}.bind(this,s));var r=new v.Select({console:!1,selector:t+" .v-form__outer_language select",scroll:!1,animation:"slide",search:!1,showSelected:!1});
8(r=r.init()).add({target:"change",do:this.formSelectCallback.bind(this)});var o=new v.Select({console:!1,selector:t+" .v-form__outer_guide select",scroll:!1,animation:"slide",search:!1,showSelected:!1});(o=o.init()).add({target:"change",do:this.formSelectCallback.bind(this)});var n=new v.Select({console:!1,selector:t+" .v-form__outer_payment select",scroll:!1,animation:"slide",search:!1,showSelected:!1});(n=n.init()).add({target:"change",do:this.formSelectCallback.bind(this)})}},{key:"formTelephone",value:function(){jQuery.fn.phoneMask=function(){return $(this).each(function(){$(this).inputmask({mask:["+7 999 999 99 99","+38 099 999 99 99","+375 99 999 99 99"],showMaskOnHover:!1})})};var t=document.querySelector(".v-form__outer input[name='telephone']");t&&$(t).phoneMask()}},{key:"formExcursions",value:function(){for(var t=document.querySelectorAll(".v-form__outer_excursion"),e=document.querySelector('.ticketsForm__excursions input[name="excursion"]'),i=0;i<t.length;i++){var s=new v.Select({console:!1,selector:".ticketsForm__excursions .v-form__outer_excursion_"+(i+1)+" select",scroll:!1,animation:"slide",search:!1,showSelected:!1});(s=s.init()).add({target:"change",do:function(t){this.formSelectCallback(t),"none"==t.value?e.value="":e.value=t.value}.bind(this)})}}}]),i}(),v.pages.push(_);_="defaultPage";page[_]=function(t){function i(){return n(this,i),l(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,v.Page),o(i,[{key:"init",value:function(){var t=this,e=h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"init",this).call(this);return!!e&&(e=Object.assign(e,{name:function(){return t.pageName}}),this.obj={},this.p={},e=Object.assign(e,{obj:function(){return t.obj},p:function(){return t.p}}),this.showTimeouts={ajax:0,defaut:25,tablet:0,mobile:0},e)}},{key:"create",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"create",this).call(this,t),page.ajaxHideBool=!0,page.helpers.getElements(),page.helpers.elementsEvents(),page.helpers.scrollSelector(),page.helpers.setFullHeight(),this.obj.scroll={smoothScroll:this.smoothScroll(),srollbar:this.scrollbar(),bool:this.smoothScrollBool.bind(this),stopScroll:this.stopScroll.bind(this)},this.slick(),this.view(),this.createCallback=null,this.definePage(t),"home"==this.pageName?page.logo.style.pointerEvents="none":page.logo.style.pointerEvents="",page.default.classList.contains("home"),page.helpers.miniHeader(),page.helpers.sticky(),this.clears(),this.columns(),this.obj.columns=this.columns.bind(this),this.anchors(),this.itemImage(),this.obj.itemImage=this.itemImage.bind(this),this.ajaxContent(),this.video(),this.tabletNavigation(),this.tabletFooter(),page.helpers.footerSubscribe(),page.helpers.footerMenu(),page.helpers.howToGetLinks(),$(document).ready(function(){$("a[data-fancybox]").fancybox({transitionIn:"fade",transitionOut:"fade",speedIn:600,speedOut:200,overlayShow:!0,margin:[0,0,0,0],fullScreen:{autoStart:!1},buttons:["close"]})}),null!=this.createCallback&&this.createCallback(),t||page.preloader.add({do:this.show.bind(this,t),timeout:(v.mobile(),0)}),!0}},{key:"show",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"show",this).call(this,t),page.helpers.showAjaxHidden(),page.helpers.showAfterLoad();var e=this.showTimeouts.defaut;return t?e=this.showTimeouts.ajax:v.tablet()?e=this.showTimeouts.tablet:v.mobile()&&(e=this.showTimeouts.mobile),this.obj.view&&(this.obj.view.changeProp(),this.obj.view.seek(),this.obj.view.changeProp({percent:v.mobile()?1.2:.9}),this.obj.scroll.smoothScroll&&this.obj.scroll.smoothScroll.add({target:"update",do:this.obj.view.seek.bind(this)})),this.obj.scroll.smoothScroll&&this.obj.scroll.smoothScroll.setSize(),0<this.pageName.length&&(0<e?setTimeout(page[this.pageName].show.bind(this,t),e):page[this.pageName].show(t)),!0}},{key:"hide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"hide",this).call(this,t),0<this.pageName.length&&page[this.pageName].hide(t),this.obj.scroll.
8smoothScroll&&this.obj.scroll.smoothScroll.changeProp({run:!1,allowScroll:!1}),this.obj.view&&this.obj.view.changeProp({resize:!1}),!0}},{key:"destroy",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return h(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"destroy",this).call(this,t),0<this.pageName.length&&page[this.pageName].destroy(t),!0}},{key:"definePage",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this.pageName="";for(var e=0;e<v.pages.length;e++)page.default.classList.contains(v.pages[e])&&(this.pageName=v.pages[e]);0<this.pageName.length?(this.p=page[this.pageName],this.p instanceof Function&&(this.p=page[this.pageName]=new page[this.pageName]({console:!1,name:this.pageName}),page[this.pageName]=page[this.pageName].init()),this.createCallback=page[this.pageName].create.bind(this,t)):this.p=page.current,v.document().classList.remove("currentPage_"+page.prevName),page.prevName=this.pageName,v.document().classList.add("currentPage_"+page.prevName)}},{key:"slick",value:function(){var t=!1,e=!0,i=1,s=!0;page.default.classList.contains("productPage")&&(e=t=!1,s=!(i=5)),page.default.classList.contains("exposition")&&(s=!1,e=!(i=1)),$(".slider").slick({centerMode:t,dots:!1,arrows:!0,infinite:e,slidesToShow:1,slidesToScroll:i,draggable:!1,swipe:!0,speed:450,fade:!1,variableWidth:!0,focusOnSelect:s})}},{key:"viewChange",value:function(){this.obj.view&&this.obj.view.changeProp({scrollSelector:page.scrollSelector})}},{key:"view",value:function(){var t=this,e=v.View;this.obj.view=new e({console:!1,load:!1,init:!1,percent:1,scrollSelector:page.scrollSelector}),this.obj.view=this.obj.view.init(),this.add({target:"resizeW",do:function(){t.viewChange(),t.obj.view&&t.obj.view.seek()},timeout:100})}},{key:"scrollbar",value:function(){var t=new v.Scrollbar({console:!1});return t=t.init(),t}},{key:"smoothScroll",value:function(){this.scrollValues=[0,0];var t=new v.SmoothScroll({console:!1,selector:"#v-scrollbar",selectorElements:"#v-scrollbar .scroll__outer",k:{value:"firefox"==v.browser()?.1:.07,reduce:!0,reduceK:.005},autoResize:!0,run:!0,useTransform:"firefox"!=v.browser(),useScroll:(v.browser(),!1),horizontal:!!page.default.classList.contains("awards")});return t=t.init(),this.smoothScrollObj=t,this.smoothScrollClass(),this.add({target:"resize",do:this.smoothScrollClass.bind(this),timeout:25}),t}},{key:"smoothScrollBool",value:function(){var t=!1;return!!page.smoothScroll&&(("chrome"==v.browser()||"firefox"==v.browser())&"windows"==v.os()&&(t=!0),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/)&&(t=!1),(v.tablet()||v.mobile())&&(t=!1),t)}},{key:"smoothScrollClass",value:function(){this.smoothScrollBool()?(v.body().classList.remove("noSmoothScroll"),this.smoothScrollObj&&this.smoothScrollObj.changeProp({run:!0})):(v.body().classList.add("noSmoothScroll"),this.smoothScrollObj&&this.smoothScrollObj.changeProp({run:!1}))}},{key:"stopScroll",value:function(){this.smoothScrollBool()&&this.smoothScrollObj&&this.smoothScrollObj.changeProp({allowScroll:!1,run:!1})}},{key:"clears",value:function(){for(var t=document.querySelectorAll(".v-clear"),e=0;e<t.length;e++){var i="v-clear_"+v.randInt(0,100)*v.randInt(0,100);t[e].classList.add(i);var s=new v.Clear({selector:"."+i,step:2});s=s.init(),t[e].clear=s}}},{key:"columns",value:function(){for(var t=document.querySelectorAll(".v-columns:not(.v-menu__links)"),e=0;e<t.length;e++){var i="v-columns_"+v.randInt(10,100)*v.randInt(10,100);if(t[e].classList.add(i),!t[e].getAttribute("data-columns-proceeded")){var s=this.getDataColumns(t[e]),r=new v.Columns({console:!1,selector:"."+i,selectorItem:".v-columns__item ",columns:s});r=r.init(),t[e].cols=r,t[e].colsBool=!0,r&&this.add({target:"resizeW",timeout:100,do:function(t,e){var i=this.getDataColumns(t);e.changeProp({columns:i})}.bind(this,t[e],r)}),t[e].setAttribute("data-columns-proceeded","true")}}}},{key:"getDataColumns",value:function(t){var e=[0,1,2];return"4"==t.getAttribute("data-columns")&&(e=[0,1,2,3]),v.tablet()?("collection"==page.current.name()&&(e=[0,1]),"shop"==page.current.name()&&(e=[0,1],1024<v.vw()[1]&&(e=[0,1,2]))):v.mobile()&&("collection"==page.current.name()&&(e=[0,1],v.vw()[1]<750&&(e=[0,1],v.vw()[1]<600&&(e=[0]))),"shop"!=page.current.name()&&"productPage"!=page.current.name()||(e=[0,1,2],v.vw()[1]<750&&(e=[0,1],v.vw()[1]<600&&(e=[0]))),v.vw()[1]<=700&&page.default.classList.contains("calendarItem")&&(e=[0,1],v.vw()[1]<400&&(e=[0]))),e}},{key:"anchors",value:function(){var t,e,i,s=new v.Anchor({selectorOuter:page.scrollSelector,duration:500,delay:0,edge:.5,edgeClick:.3});s=s.init(),1<location.hash.length&&s.set(location.hash.replace("#","")),s&&this.add(((e="timeout")in(t={target:"resizeW",timeout:i=100,do:function(){s.changeProp({selectorOuter:page.scrollSelector})}})?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t)),this.anchor=s}},{key:"itemImage",value:function(){for(var t=document.querySelectorAll(".item__image, \n            .persons__image, \n            .content_right__item, \n            .calendar__items a, \n            .collection__image, \n            .shop__image"),e=0;e<t.length;e++)if(!t[e].classList.contains("loaded")){var i=t[e].querySelector("img");if(null!==i){var s=new Image;
8s.onload=function(t,e,i){t.classList.add("loaded")}.bind(this,t[e],i,s),s.src=i.src}}}},{key:"ajaxContent",value:function(){var p=document.querySelector("#v-ajaxContent__more"),t=document.querySelector("#v-ajaxContent"),u=document.querySelector(".v-ajaxContent__none");if(null!=t){var e=new v.AjaxContent({console:!1,pagination:{on:!1,left:2,right:2,changeContent:!0,timeout:350},updateUrl:!0,updateContent:!1,popstateEvent:!1,popstateEventReload:!1});e.add({target:"empty",do:function(t){null!==p&&p.classList.add("display_none_important")}.bind(this)}),e=e.init(),t.ajaxContent=e,null!==p&&page.current.p().addEventListener({el:p,target:"click",do:function(t){t.preventDefault(),e.set()}.bind(this)}),e.add({target:"load",do:function(t){p.classList.remove("display_none_important");var e=!1,i=!1;t.outer.colsBool&&(e=!0),t.outer.clear&&(i=!0);var s=document.createElement("div");s.innerHTML=t.html;var r=s.querySelectorAll(".item, .v-ajaxContent__item");if(!e)for(var o=0;o<r.length;o++)t.outer.appendChild(r[o]);if(e)if(t.reload){0===r.length?(u.innerHTML=t.html,u.classList.remove("display_none"),u.classList.add("v-viewed")):(u.classList.add("display_none"),u.classList.remove("v-viewed"));for(var n=t.outer.querySelectorAll(".v-columns__column"),a=0;a<n.length;a++)n[a].innerHTML="";if(t.outer.cols)for(var h=0;h<r.length;h++)t.outer.cols.addItem(r[h]);else{t.outer.innerHTML="";for(var l=0;l<r.length;l++)t.outer.innerHTML+=r[l].outerHTML;t.outer.removeAttribute("data-columns-proceeded")}t.outer.colsBool&&(t.outer.cols||this.columns())}else for(var c=0;c<r.length;c++)t.outer.cols.addItem(r[c]);i&&(t.outer.clear.getElements(),t.outer.clear.addClears()),page.current.obj().view&&(page.current.obj().view.changeProp({}),page.current.obj().view.seek()),page.ajax&&(page.ajax.getElements(),page.ajax.setEvents()),page.helpers.stickyFunc(),page.default.classList.contains("shop")&&page.product.initProductItems(),this.itemImage()}.bind(this)}),e.add({target:"last",do:function(t){null!==p&&p.classList.add("display_none_important")}.bind(this)})}}},{key:"video",value:function(){for(var t=document.querySelectorAll(".text-content video"),e=0;e<t.length;e++){var i=document.createElement("div");i.classList.add("video"),i.classList.add("v-view"),i.classList.add("v-view_bottom"),t[e].parentNode.insertBefore(i,t[e]);var s=document.createElement("div");s.classList.add("video__image"),i.appendChild(s);var r=document.createElement("div");r.classList.add("bg-image"),s.appendChild(r),t[e].getAttribute("poster")&&(r.style.backgroundImage="url("+t[e].getAttribute("poster")+")");var o="video_"+v.randInt(0,1e3);r.setAttribute("id",o),r.appendChild(t[e]),t[e].setAttribute("controls","");var n=document.createElement("div");n.classList.add("video__play"),i.appendChild(n),n.addEventListener("click",this.videoPlay.bind(this,t[e],o))}}},{key:"videoPlay",value:function(t,e,i){i.preventDefault(),v.popupMedia.show({selector:"#"+e,types:["media","video"]})}},{key:"tabletNavigation",value:function(){var e=this;if(page.default.classList.contains("cafe")||page.default.classList.contains("shop")){var t=document.querySelector(".content h1");if(null==t)return;var i=document.createElement("div");i.classList.add("tablet-navigation"),i.classList.add("v-view"),i.classList.add("v-view_bottom"),i.classList.add("desktop_hide"),i.classList.add("tablet_hide"),v.insertAfter(t,i);var s=document.createElement("select");s.setAttribute("id","tablet-navigation"),i.appendChild(s);var r=document.createElement("option");r.setAttribute("value","default"),r.innerHTML=v.body().getAttribute("data-lang-choseCategory"),s.appendChild(r);for(var o=document.querySelectorAll(".content_left li a"),n=0;n<o.length;n++){var a=document.createElement("option");a.innerHTML=o[n].innerText,a.setAttribute("value",o[n].getAttribute("href")),o[n].classList.contains("active")&&a.setAttribute("selected",""),s.appendChild(a)}var h=new v.Select({console:!1,selector:"#tablet-navigation",search:!1,showSelected:!1,changeSelectedText:!0});(h=h.init()).add({target:"change",do:function(t){t.value.includes("#")?e.anchor&&e.anchor.set(t.value.replace("#","")):page.ajax.load(o[t.active-1])}})}}},{key:"tabletFooter",value:function(){var t=page.footer.querySelector(".v-footer__developer"),e=page.footer.querySelector(".v-footer__social");null!=t&null!=e&&(t.innerHTML+=e.outerHTML)}}]),i}
8(),page.current=new page[_]({console:!1,name:_}),page.current=page.current.init(),page.current.create();page.ajaxChange=function(){page.menu.shown()?page.ajax.changeProp({timeoutAjax:window.menuAnimationInner.duration+400,timeoutUpdate:50,timeoutAfter:25}):page.ajax.changeProp({timeoutAjax:250,timeoutUpdate:50,timeoutAfter:25})},v.addLoad(function(){page.ajax=new v.AjaxPage({console:!1,timeoutAjax:0,timeoutUpdate:0,timeoutAfter:0,on:!0,popstateEvent:!0,selectorLinks:".v-al"}),page.ajax=page.ajax.init(),page.ajaxChange(),page.ajax&&(v.viewport.add({target:"w",name:"Ajax Page Define Bool",do:function(){page.ajax.changeProp({on:!0})},timeout:25}),page.ajax.add({target:"before",timeout:50,do:function(t){page.ajax.changeProp({disabled:!0}),page.current.hide(),page.current.destroy(),v.popupCart&&v.popupCart.shown()&&v.popupCart.hideAll(),page.menu&&page.menu.shown()&&page.menu.hide(),v.document().classList.add("hideMenu"),setTimeout(function(){v.document().classList.remove("hideMenu")},850),page.search&&page.search.shown&&setTimeout(page.search.hide.bind(this),250),page.ajaxHideBool&&page.screen.classList.add("hide")}.bind(void 0)}),page.ajax.add({target:"load",timeout:25,do:function(t){var e=document.createElement("html");e.innerHTML=t.htmlFull,page.current.create(!0),page.helpers.changeAjaxElements(e),e=null}.bind(void 0)}),page.ajax.add({target:"after",timeout:25,do:function(t){if(page.screen.classList.remove("hide"),page.menu)if(page.menu.shown()){page.menu.hide();var e=page.menu.prop().animation+page.menu.prop().animationInner.duration;setTimeout(function(){page.current.show(!0)},e)}else page.current.show(!0);else page.current.show(!0);page.current.show(!0),page.ajax.getElements(),page.ajax.setEvents(),setTimeout(function(){page.ajax.changeProp({disabled:!1})},250)}.bind(void 0)}))})},{}]},{},[1]);
9
10$( document ).ready(function() {
11    $(document).on('click', '.telegram-banner__close', function(e) {
12        e.preventDefault();
13        $('.telegram-banner').hide();
14    });
15
16    let banner = $('.telegram-banner');
17    if (banner.length) {
18        let bannerDelay = parseInt(banner.data('delay'));
19        console.log(bannerDelay);
20        setTimeout(function() {
21            console.log('hide banner');
22            $('.telegram-banner').delay(bannerDelay).hide();
23        }, bannerDelay);
24    }
25});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.