| 1 |
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var o=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,o?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}window.addEventListener("DOMContentLoaded",function(){var t=function(){_inherits(t,elementorModules.frontend.handlers.Base);var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.apply(this,arguments)}return _createClass(t,[{key:"animateAccordion",value:function(){var o=this.$element.find(".ui-e-item"),r=this.getElementSettings("multiple"),i=this.getElementSettings("collapsible"),s="yes"==this.getElementSettings("active_hash"),u="yes"==this.getElementSettings("active_scrollspy"),e=this.getElementSettings("accordion_animation"),c=Object.values(this.getElementSettings("hash_top_offset")||[0,0]),a=Object.values(this.getElementSettings("hash_scrollspy_delay")||[0,0]),l=Object.values(this.getElementSettings("hash_scrollspy_duration")||[0,0]),f=0;switch(e){case"ui-e-animation-acc-slow":f=400;break;case"ui-e-animation-acc-expand":f=250;break;default:f=void 0===e||""===e?0:200}function p(e,t,n){var o,r;u&&(o=parseInt(c[1]),r=e.offset().top-o,setTimeout(function(){jQuery("html, body").animate({scrollTop:r},t[1])},n[1]))}jQuery.easing.uiCustomEase=function(e,t,n,o,r){return 0==t?n:t==r?n+o:(t/=r/2)<1?o/2*Math.pow(2,10*(t-1))+n:o/2*(2-Math.pow(2,-10*--t))+n},u&&o.each(function(){jQuery(this).hasClass("ui-open")&&p(jQuery(this).find(".ui-e-content"),l,a)}),o.on("click",function(e){e.preventDefault();var e=jQuery(this),t=e.find(".ui-e-content"),n=e.find(".ui-e-title").attr("id");e.hasClass("ui-open")?(i||1<o.filter(".ui-open").length)&&(e.removeClass("ui-open"),t.slideUp(f,"uiCustomEase")):(r||(o.removeClass("ui-open"),o.find(".ui-e-content").slideUp(f,"uiCustomEase")),e.addClass("ui-open"),t.slideDown(f,"uiCustomEase"),s&&n&&p(t,l,a))})}},{key:"moveElements",value:function(){this.$element.find(".ui-section-id").each(function(){var e=jQuery(this).attr("id"),t=e.substring(3),e=jQuery("#"+e),n=jQuery("#"+t);0<n.length?n.detach().appendTo(e):e.html("<p>No element with the <code>"+t+"</code> ID was found on the page.</p>")})}},{key:"onInit",value:function(){this.animateAccordion(),elementorFrontend.isEditMode()||this.moveElements()}}]),t}();jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/uicore-accordion.default",function(e){elementorFrontend.elementsHandler.addHandler(t,{$element:e})})})}); |